How do i smooth the curves(contours) in OpenCV?
Question
I am working on a black&white image just like the first one from the link : http://imageshack.us/g/33/firstwm.png/ It has a lot of "noise" so I applied a Median filter over it to smooth it, thus getting the second picture.
cvSmooth(TempImage, TempImage, CV_MEDIAN, 5, 0);
After this i get the contours and draw them on another image like the 3rd picture from the link. My problem is that the contours are still a little pixelated(edgy). Is there a way to smooth the B&W image even more so to obtain better contours? Or maybe do something with the contours. I have also tried Dilate and Erode with different kernels but the problem remains the same. Thank you for anything that helps.
EDIT: Also tried:
cvSmooth(TempImage, TempImage, CV_GAUSSIAN, 9, 9, 3);
cvThreshold(TempImage, TempImage, 127, 255, CV_THRESH_BINARY);
Same results as median filter, ok, but still leaves some pixelated contours.
No correct solution