3

My question is simple. I did Sobel filtering to the median-filtered gray image. The sobel-filtered image is

a rectangular object in a textured-floor]![a rectangular object in a textured-floor

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)

enter image description here

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

Karthik_elan
  • 323
  • 1
  • 6
  • 13

2 Answers2

6

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.

Community
  • 1
  • 1
nkint
  • 11,513
  • 31
  • 103
  • 174
  • Sorry, I did medianBlur before doing sobel filtering (edited). I understand that good pre-processing of the image is the way to go. I will go through the links. Blob is a relatively new term for me. Could you please shed some light on that ? I hope your answer will lead me to a right way. – Karthik_elan Feb 26 '14 at 07:20
  • Pre-processing is an important step but the the only one to focus on. See the edits. – nkint Feb 26 '14 at 09:56
  • I tried morphologyEx (open) to image after Sobel filter, it worked to eliminate the noise – OatsMantou Jan 13 '15 at 23:54
1

With the suggestion from @nkint, I worked on the problem. Now, I am able to get rid off the noise from the Canny edge detection. The main contribution is from the Bilateral filter and also slightly from the sharpening filter.

My new canny edge-detected image is as below

enter image description here

The bilateral filter is said to be an edge-preserving filter. It works like a gaussian filter for surfaces having similar values. At the same time, It neglects the pixels which are less similar, thereby preserving the edges.

Community
  • 1
  • 1
Karthik_elan
  • 323
  • 1
  • 6
  • 13