Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have a bit noisy image where the background is not homogeneous. The image contains brigther convex spots, and I need to detect them. Here's a link for an example image:

I know there is a lot of circle detection algorithm, but the difference between the environment and the object is too small. Do you any suggestion, how to segment the brigther spot? Or any idea to increase the intensity difference between them?

update:

the OpenCV environment is C++. I tried the adaptive threshold with many parameters. Here's the result:

It is not bad, but the image contains a lot of other black spots. And sometimes the spots area near the same as the object, so in that way I can't distinguish later.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
283 views
Welcome To Ask or Share your Answers For Others

1 Answer

Generally, the technique is to blur the image so that small-scale details become irrelevant and only large-scale differences in the background illumination are retained. You then subtract the blurred image from the original to remove the uneven illumination, leaving only the localised features visible.

My preferred tool is ImageMagick, but the principle is the same in OpenCV. Here I clone your original image, blur it over 8 pixels and then subtract the blurred image from the original:

convert http://s8.postimg.org/to03oxzyd/example_image.png ( +clone -blur 0x8 ) -compose difference -composite -auto-level out.jpg

enter image description here

And here I blur over 32 pixels, and subtract the blurred image from the original:

convert http://s8.postimg.org/to03oxzyd/example_image.png ( +clone -blur 0x32 ) -compose difference -composite -auto-level out32.jpg

enter image description here

Keywords: Image processing, unsharp mask, uneven lighting.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...