Object boundry Detection‏ in OpenCV

632 views
Skip to first unread message

Saleh

unread,
Oct 28, 2011, 12:24:20 AM10/28/11
to cvBlob
I want to detect the boundary of an object in a binary image.

A similar function is available in Matlab's image processing toolkit.

has anyone done it yet or knows anything about it.

Carlos Martins

unread,
Oct 28, 2011, 5:29:51 AM10/28/11
to cvb...@googlegroups.com
Do you mean "bounding box" boundaries, or the actual contour?

Saleh

unread,
Oct 28, 2011, 5:44:29 AM10/28/11
to cvBlob

yeah for example marking the boundary of human hand and leaving the
background and the inside of human hand...i can find contours but i
dont know how to extract useful contours of boundary and discard the
unwanted contours...

Cristóbal

unread,
Oct 28, 2011, 5:54:27 AM10/28/11
to cvBlob
The cvLabel function of cvBlob does what bwlabel function does in
Matlab. Read the "test.cpp" code to learn how to get the contour using
cvBlob:

http://code.google.com/p/cvblob/source/browse/trunk/test/test.cpp

Saleh

unread,
Oct 28, 2011, 6:27:57 AM10/28/11
to cvBlob
its gives all the connected components ... but i want to get only
boundary of object of interest... any idea how to obtain the boundary
of Object of interest discarding the boundaries of all the other
objects...

Cristóbal

unread,
Oct 28, 2011, 6:39:36 AM10/28/11
to cvb...@googlegroups.com
cvLabel gives you the connected components, the contours of the blobs, bounding box,... You must define which objects are the ones you are interested on, and then select them yourself.

Saleh

unread,
Oct 28, 2011, 6:47:19 AM10/28/11
to cvBlob
you are right but i want to automate the process .. so i can't mark
the ROI every time ... neither am i going to train a classifier ...
thats the requirement... thats why im searching for a function or an
algo to implement this...

Cristóbal

unread,
Oct 28, 2011, 6:59:23 AM10/28/11
to cvb...@googlegroups.com
In order to select the object you are interesting in you must find a way to recognize it. You can use the object color, size, shape features, etc. This way, after you binarize the image and extract the blobs with cvLabel, you can run through all blobs and can identify the one you want. But this depends on the particular problem you are working on, so you are not going to find a general solution.

The easier scenario is when you want to take the contour of the bigger object in the image. In this case you can use the function cvGreaterBlob, for example.

Saleh

unread,
Oct 28, 2011, 7:17:19 AM10/28/11
to cvBlob
well thanku so much for ur help... i'll see how to implement
it...thanks again!

SONIYA SINGHAL

unread,
Oct 28, 2011, 12:49:45 PM10/28/11
to cvb...@googlegroups.com
If u want to remove other things and just want the boundary of the hand(or any other object of interest) then u must suppress remaining things. A better way of doing it can be by using motion detector or skin detection or both working as filter for the detection of your hand. As said by Cristóbal, u need to know one of the main characteristics of your required object only then u can separate it from rest of the objects.
Reply all
Reply to author
Forward
0 new messages