问题
I need to perform image smoothing. I've searched the web but I didn't find anything - every thing I tried doesn't preform like I want.
for example:
as you see there are bumps or something like stairs, so what should I do so the lines will be straight?
thanks....
回答1:
If the resolution of the output image is higher than the resolution of the stairs, then you can do any number of things. To name a few.
- grayscale (or binary) morphological processing using
imclose
- edge-enhancing smoothing
- march around the edges of your objects, determine the corners in your mask, and make the image locally convex, but this will take some coding.
The Matlab File Exchange is your friend.
If the resolution of the output image is the same as the stairs, and the output is grayscale, you're pretty much constrained to spatial anti-aliasing filters.
If the resolution of the output image is the same as the stairs, and the output is binary, you can't do anything, obviously.
来源:https://stackoverflow.com/questions/6295974/smoothing-image-in-matlab