7
$\begingroup$

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.

$\endgroup$
7
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ Have a try on this: github.com/RoyiAvital/… Much more advanced than the Classic Anisotropic Diffusion. $\endgroup$ – Royi Jan 18 '15 at 17:35
  • 1
    $\begingroup$ @tbirdal: anisotropic diffusion seems interesting, if you can you provide a set of original and processed image examples together with generating matlab code, that would be appreciated. $\endgroup$ – Fat32 Jan 18 '15 at 19:20
  • $\begingroup$ check again please. $\endgroup$ – Tolga Birdal Jan 18 '15 at 19:36
  • $\begingroup$ Thank you for the examples and the code. I have provided my own much simple processing in the link: [IMG]i62.tinypic.com/2w3t6gz.jpg[/IMG]. Its effect on the Lena is alot better, but it is not an edge detector. Just a noise reductive image sharpener. $\endgroup$ – Fat32 Jan 18 '15 at 20:08
  • $\begingroup$ I will read the article about anisotropic diffusion. Besides, @Drazick , the code in github has error when the image is larger than about 328*228, but the result of small picture is good. Thank you very much for your enthusiastic reply. $\endgroup$ – Kuo Jan 19 '15 at 2:36
3
$\begingroup$

I would not suggest an equalization as the first step. Go with noise reduction.

$\endgroup$
  • $\begingroup$ So, you think that I need to reduce the noise first? Then implement histogram equalization? $\endgroup$ – Kuo Jan 18 '15 at 16:44
  • $\begingroup$ yes reduce the noice first. A blind histogram equalization may or may not improve your edges. So you better improve your edges adaptively. $\endgroup$ – Fat32 Jan 18 '15 at 17:58
  • $\begingroup$ When does edge sharpening reduce the noise? $\endgroup$ – Tolga Birdal Jan 19 '15 at 10:27
  • $\begingroup$ Is there any method that I can use to enhance my edge? I have tried highboost filtering, but in low contrast condition, highboost filtering can't perform well. $\endgroup$ – Kuo Jan 19 '15 at 12:32
  • $\begingroup$ @tbirdal noise is reduced before edge is sharpened, in fact my algorithm is a space-variant nonlinear edge adaptive image sharpener. Its main purpose is to produce visually high quality sharp images while still preserving texture and yet not amplifiying noise. However, since it tries to protect textures from being washed out by the noise reduction, it may not produce desired result for all types of noises. $\endgroup$ – Fat32 Jan 19 '15 at 18:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.