-
Notifications
You must be signed in to change notification settings - Fork 78
Open
Description
This is my code
import cv2
import numpy as np
img = cv2.imread('index.jpeg',0)
ret,thresh = cv2.threshold(img,127,255,0)
_,contours,hierarchy= cv2.findContours(thresh, 1, 2)
cnt = contour[0]
M = cv2.moments(cnt)
print(M)
area = cv2.contourArea(cnt)
perimeter = cv2.arcLength(cnt,True)
I'm getting this error. some one pls help me resolving it.
error: /tmp/build/80754af9/opencv_1512491964794/work/modules/imgproc/src/shapedescr.cpp:319: error: (-215) npoints >= 0 && (depth == 5 || depth == 4) in function contourArea
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels