Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Input is an integer data (an image) and so the output is integer data as well (and this is the most precise answer). In general, in computer vision you are not getting 'smooth' output without performing additional processing. In your case I would recommend you to start from providing different flags to findContours. Instead of CV_CHAIN_APPROX_SIMPLE try using CV_CHAIN_APPROX_TC89_L1. This will perform some polygon simplification, i.e. it will 'smooth' contours a little in exchange for precision. Or you can perform simplification by using approxPolyDP after your call to findContours.