answered Nov 18 '12
Are you completely sure that your image is gray level image with one channel, and your contours is vector of vector of Point and not Point2d or anything like that?