findContours when image is cut off (part of the object in the image)
I have the following image (many immages of that kind, backgroud vary from image to image, might be dark, or light)
i use canny, then dilate, then I find largest contour with findContours and drawContour (CV_FILLED). This is my result:
the problem is that there is only part of the object in the image (part of the leg), and it seems that in the place where the photo is cut, contour is not closed. How i can somehow close the contour where the image is cut ?
Im not publishing my code here becouse i use binding for node, https://github.com/peterbraden/node-o... I ask my question here, becouse this is much bigger community!
Hi, its actually not alawys solid, here is another example: http://i.imgur.com/P6jyPNO.jpg my output (look at jeans) http://i.imgur.com/dOP2D2Y.png