Thursday, July 19, 2012

Playing around with opencv convexity defects

Modifying a little the code of the previous post, removes the points too close to the convex hull:
Edit the end of the script as follow:

    cv2.line(img,start,end,[255,0,0],1)
    if d>1000:
        cv2.circle(img,far,3,[0,0,255],2)