Ask Your Question
0

Smoothing an Noisy Image in OpenCV

asked 2014-01-13 08:38:41 -0600

sameera_ut gravatar image

updated 2014-01-13 10:44:40 -0600

Hi All,

I am developing an AOI system as a part of my research project. After doing pre-processing of PCB images i transformed the input image to a different color model. There i normally process 0th channel,since it gives me clear and distinct view of the components. But the images some time comes with this type of noisy as the image i have attached here and upto now i couldn't come up with a proper solution to remove black regions between the components.

Is there any adaptive or better way of removing these dark areas? I would be very thankful to you if you can give me any hint to come up with a solution. Thanks.

image description

image description

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-01-13 10:10:19 -0600

JohannesZ gravatar image

What do you exactly mean with "dark areas"? It would be useful to mark them with red circles for example.

For real image noise (gaussian noise for example), try to search for the bilateral filter or non local means filter in openCV. The median filter could also be usefull, especially if you deal with "salt and pepper" noise.

If the dark areas are to big, you could also try to use morphological operators like erosion and dilation. Or a combination of the morphological operators and image denoising.

Hope this helps! Johannes

edit flag offensive delete link more

Comments

Thanks a lot.I tried everything and still no use..As you can see it is some kind of uneven illumination in the image.So tried to use DCT for illumination normalization.But i still couldn't come up with proper way to process(removing or rescaling) DCT matrix.Any idea is highly appreciated.I have marked the uneven dark areas.Thanks.

sameera_ut gravatar imagesameera_ut ( 2014-01-13 10:48:19 -0600 )edit

Hm, if the dark scratches in the second image are known, your could try to use template matching algorithms. Or you train a classifier for the detection... as you mentioned, it seems really difficult.

JohannesZ gravatar imageJohannesZ ( 2014-01-15 01:59:13 -0600 )edit

Question Tools

Stats

Asked: 2014-01-13 08:38:41 -0600

Seen: 829 times

Last updated: Jan 13 '14