How to eliminate the noise after sobel filtering?

edge-detection, image-segmentation, opencv

Solution

Noise elimination is a big deal. The main answer is: it depends on what you have to do.

First of all, you have to give to the filter the best image possible, so try some pre-processing like blur, threshold, or histogram equalisation.

Then, morphological operator are normally a common way to proceed. You can find some documentation about those operators here or here.

Then, you can move on depending on what you have to do with this image. For example, if your goal is blob detection you can filter blobs eliminating the smallest blob calculating their area via image moments.

Or, if you need to detect lines, try to have a look at Hough transform.

EDIT: Blob and opencv

you can find a lot of tutorial on the net about blob detection. If you don't know what it is, is better to google a little bit, it is a fundamental part of computer vision. Here are some links: here, here, here, here or here. Also the opencv version 2.4.8 has a built in class for blob extraction: here. This is a simple tutorial that explains the main `cv::findContours` function.

In few words, blob detection is a process that get a binary image (black and white, of type `CV_8U`) and returns a set of contours that delimitate some connected-component regions. Contours (or blob) are actually some vector of 2d-points that delimitate a shape. You can find some properties like area, centroid, etc.

It is better to study a little bit some image processing and computer vision basics, I can advice you this famous book: Digital Image Processing, Rafael C. Gonzalez, Richard Eugene Woods. You can find it on google books or somewhere else in the net.

Have a look also at those introduction tutorials.

Problem

My question is simple. I did Sobel filtering to the median-filtered gray image. The sobel-filtered image is The rectangular object is of my interest. I am trying to extract it from the image. As you can see, along with the object, there are more noises due to the texture of the floor. Hence, the edge image is as below (with more false edges) How to eliminate the noise after sobel filtering ? Or How do I overcome this hurdle? Your suggestions or guidance will help me go a long way in understanding image processing and its challenges. Thank you

Original source

Related problems