Hello,
is it possible not only to get the area inside a contour but also the corresponding points of the area?
1 | initial version |
Hello,
is it possible not only to get the area inside a contour but also the corresponding points of the area?
2 | No.2 Revision |
Hello,
is it possible not only to get the area inside a contour but also the corresponding points of the area?
EDIT -- Answer to my original problem (see below):
def getContourStat(contour,image):
mask = np.zeros(image.shape,dtype="uint8")
cv2.drawContours(mask, [contour], -1, 255, -1)
mean,stddev = cv2.meanStdDev(image,mask=mask)
return mean, stddev
Even if I dont get the points itself, I get the statistics I need. Nevertheless I think it's quite inefficient for many contours.