Saturday, August 11, 2018

image processing - How to remove the noise without destroying the main edge?


I am working on a project. I want to segment a logo from a car and the picture's size is 3648*2432. The logo is selected by the red rectangle.


enter image description here


I extracted this area and turn into gray level. The area's size is 249*173. Then, I use histogram equalize to enhance the edge. Finally, I use adaptive canny to find edge.



enter image description here enter image description here


However, the result is not perfect. So, I used median filter to smooth the left picture. The result is as following.


enter image description here


I remove the small parts.


enter image description here


The result has been improved, but it is also not good. Besides, I have tried bilateral filter, mean filter and Gaussian filter, but the result is not good, too. I know that after passing histogram equalize, the noise can be enhance. But, in some case, low contrast, I need to adapt this step to enhance my picture. Is any one who can provide me any different comment? Thank you very much.



Answer



Use bilateral filter or anisotropic diffusion first.


The effect of anisotropic diffusion is as the following:


enter image description here. The MATLAB code can be found here.



Here is its effect on your image: enter image description here


Finally, non-local means is a also a good way to get rid of the noise. You might also want to take a look into that. I warn you though, it is slow.


No comments:

Post a Comment

periodic trends - Comparing radii in lithium, beryllium, magnesium, aluminium and sodium ions

Apparently the of last four, $\ce{Mg^2+}$ is closest in radius to $\ce{Li+}$. Is this true, and if so, why would a whole larger shell ($\ce{...