Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do we remove illumination noise?

I have a car detecting project in OpenCV2.3.1 and visual C++.

In foreground segmentation, there's reflections due to illumination. And this (reflections) become part of the foreground after the background has been removed. enter image description here

I need suggestions or ideas on how to remove this noise. As it causes some foreground objects to be connected up as one object, like seen when using findContours and drawContours functions. See image parts highlighted in red on attached image. I think this will simplify the blob detection stage.

*note - I am not allowed to use built-in cvBlobLib in OpenCV

like image 207
Ruzzar Avatar asked Oct 10 '12 23:10

Ruzzar


People also ask

How do you remove noise from an image in Python?

The mean filter is used to blur an image in order to remove noise. It involves determining the mean of the pixel values within a n x n kernel. The pixel intensity of the center element is then replaced by the mean. This eliminates some of the noise in the image and smooths the edges of the image.

What is noise in image processing?

Image noise is random variation of brightness or color information in images, and is usually an aspect of electronic noise. It can be produced by the image sensor and circuitry of a scanner or digital camera. Image noise can also originate in film grain and in the unavoidable shot noise of an ideal photon detector.

What is Gaussian noise in image?

Gaussian Noise is a statistical noise with a Gaussian (normal) distribution. It means that the noise values are distributed in a normal Gaussian way. An example of a normal (Gaussian) distribution. The Gaussian noise is added to the original image.


2 Answers

Issue here is that part of a glare can be either background or corresponding car.

Here is what I would do.

I believe you would not have a big problem with identifying glare parts by binarizing and thresholding or in a similar way.

Once identified all pixels of glares, I would replace each of the glare pixels with nearest non-glare pixel in the same row of the image. That way, a glare will be filled with car and background. With this method, then you would be able to detect cars without much problem.

like image 177
Tae-Sung Shin Avatar answered Sep 22 '22 02:09

Tae-Sung Shin


maybe try to convert the image to HSV then filter high V amounts

IplImage imgHSV = cvCreateImage(cvGetSize(imgInput), 8, 3);
IplImage imgThreshold = cvCreateImage(cvGetSize(imgHSV), 8, 1);
cvInRangeS(imgHSV, cvScalar(0, 0, 90, 0), cvScalar(0, 0, 100, 0), imgThreshold);

..adjust scalars as needed to remove glare

like image 40
Stanley Avatar answered Sep 22 '22 02:09

Stanley