I am trying to find the area of a contour by implementing cv.contourArea() using this code:
contour = cv.findContours(img_mask,cv.RETR_EXTERNAL,cv.CHAIN_APPROX_NONE)[0]
for c in contour:
area = cv.contourArea(c)
cv.drawContours(drawing,[c],-1,red,3)
cv.imshow("drawing",drawing)
print(area) ### (1)
if area > 3500:
print(area) ### (2)
platform = True
The result of the first print is: print 1
The result of the second print is: print 2
Can anyone help me with this? Syntax wise I know that it is true