0

I am a newbie concerning opencv, and i would like to have some advices on how to proceed an image denoising and splitting.

I am currently working on object recognition with a kinect-like. At the end of the process , i get this type of picture:

enter image description here

The pink color is totally arbitrary by the way i can use another one if it's recommended)

In this case i would like to:

  1. De-noise the picture.

  2. split the different objects in the picture into multiple pictures, one picture for each objects.

About the 1: I know few noise filtering that mainly filter based on frequency and pattern, is it possible to filter objects that aren't "large" enough?

1
  • How about using contour extraction? You could examine the returned contour sets and discard any that are too "small" (using no. of returned contours, calculated area, etc) the remaining contour sets would be the outlines of your objects. Commented Jul 8, 2015 at 8:39

3 Answers 3

1

You can try this:

  1. Set all pink colors to black (background) and all others to white (foreground).
  2. Use findContours() to find all contours of each object, i.e. 3 in your case.
  3. Based on the contour information of each object, you can select any object that you want. You can also filter out small objects by checking their contour area.
Sign up to request clarification or add additional context in comments.

Comments

1

The scheme proposed by @herohuyongtao is reasonable. If you can use OpenCV 3.0, I'd recommend connectedComponents() instead of findControus(). The area of the object is returned by CC_STAT_AREA statistic. In your case you actually have about 7 connected components for this noise in the upper left corner. Set up some reasonable threshold on minimum possible area, it will be enough for simple cases.

Comments

0

Thanks to Mikhail and herohuyongtao i managed to do what i wanted.

This link also helped me a lot :

http://bytefish.de/blog/extracting_contours_with_opencv/

Cheers!

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.