I get a picture below but the picture has a very ugly edges. I want to use matlab programming to smooth the edges of the picture and make it look more pretty,any ideas or ways make sense?
thank you!!!
I get a picture below but the picture has a very ugly edges. I want to use matlab programming to smooth the edges of the picture and make it look more pretty,any ideas or ways make sense?
thank you!!!
You could use imopen to morphologically open the RGB image (dilation and erosion). The second input argument to imopen function is a structuring element which defines the amount of smoothing required in the morphological operation. For example, below is a code where I apply a disk structuring element of radius 10.
Here is an option (edited):
Result:
It's a bit rough, but that'll give you a start. You can try to fiddle with the number of iteration and the size of the circular filter and the median filter. Try changing the median with average, etc.
You could use
isocontour
[1] edge detection and then average adjacent pixels along the contour to smoothen the boundary.[1] http://www.mathworks.com/matlabcentral/fileexchange/30525-isocontour