Ask Your Question

Ideas to process challenging image

asked 2014-05-19 09:07:47 -0500

Hello everyone.

I'm working with Infra Red image that is an output of a 3D sensor. This sensors project a Infra Red pattern in order to draw a depth map, and, because of this, the IR image has a lot of white spots that reduce its quality. So, I want to process this image to make it smoother in order to make it possible to detect objects laying in the surface.

The original image looks like this: image description

My objective is to have something like this (which I obtained by blocking the IR projecter with my hand) : image description

I understand that this is a challenging problem. Any ideas?

Best regards

edit retag flag offensive close merge delete


Would be nice if you would post some feedback on your progress

Goosebumps gravatar imageGoosebumps ( 2014-06-02 08:50:05 -0500 )edit

3 answers

Sort by ยป oldest newest most voted

answered 2014-06-05 06:14:46 -0500

My main point on the noise removal was to have a cleaner image so it would be easier to detect objects. However, as I tried to find a solution for the problem, I realized that it was unrealistic to remove all noise from the image, since most of the image is actually noise.. So I had to find the objects despite the noise. Here is my aproach

1 - Initial image


2 - Background subtraction followed by opening operation to smooth noise


3 - Binary threshold


4 - Morphological operation close to make sure object has no edge discontinuities (necessary for thin objects)


5 - Fill holes + opening morphological operations to remove small noise blobs


6 - Detection


edit flag offensive delete link more

answered 2014-05-20 03:23:06 -0500

Goosebumps gravatar image

updated 2014-05-21 02:22:03 -0500

A morphological operation that could work is opening: image description

        int morphOpSize = 3;
        StructuringElementEx element =
            new StructuringElementEx(
                morphOpSize / 2,
                morphOpSize / 2,

        filtered = gray.MorphologyEx(

(sorry for my Emgu dialect)

Otherwise look for edge preserving low pass filtering.

edit flag offensive delete link more


The opening operation does remove some noise, but I think that before applying that it could be useful to apply a good noise removal operation that addresses those white spots.

Pedro Batista gravatar imagePedro Batista ( 2014-05-20 06:37:42 -0500 )edit

answered 2014-05-20 10:24:12 -0500

zerog80 gravatar image

Another filter with effect similar to morphological opening is the median... did you try it with a small radius? It should remove the majority of the noise while retaining the main shapes.

edit flag offensive delete link more

Question Tools


Asked: 2014-05-19 09:07:47 -0500

Seen: 655 times

Last updated: Jun 05 '14