Ask Your Question
2

Getting a smooth outline for a picture

asked Nov 5 '12

vickoza gravatar image

updated Nov 6 '12

I want to use OpenCV to convert a raster image to a vector based image my first step is to create a smooth outline of the objects in the image. To do this I use Cammy to find the edges and use FindContour to get the outline but the data I get from FindContours is jagged and rough. Also I am finding the FindContour is giving my broken and double contours I want to merge these contours. I thank the problem is with the setting I want to used the data from FindContours to smooth the image data rather then has a pixalated image. I want to a polyline or a spline curve

Thanks again in advance

Preview: (hide)

3 answers

Sort by » oldest newest most voted
4

answered Nov 5 '12

Ben gravatar image

You can use approxPolyDP() to simplify the contours returned from findContours().

Preview: (hide)
0

answered Mar 14 '13

disha gravatar image

You should first apply watershed segmentation on the image, nextly apply smoothing(median) preferably so as to clear the salt and pepper noise on the binary image obtained and lastly take the contours of the image. Hope this works.

Preview: (hide)
0

answered Nov 8 '12

you can use cvPyrSegmentation or cvPyrMeanShiftFiltering to vectorize the raster image

Preview: (hide)

Question Tools

1 follower

Stats

Asked: Nov 5 '12

Seen: 7,961 times

Last updated: Mar 14 '13