Ask Your Question
1

find a specific balck object with white spot on an image

asked 2013-01-31 16:32:23 -0600

zweistein gravatar image

updated 2013-02-06 05:20:42 -0600

Hey,

I'm, quit new with openCV, but i have a problem to solve quick and with reliable result.

First ,i have a video feed, i must find THE object on each frame.(the algorithm should be the same for 1 image) The Object is a black bag with a white light source on the middle, so its like a black ellipse with a white ellipse on it. image description

I need a simple solution which works in case the bag is closer or further on the image. I tired with finding ellipses, but it find more ellipse than i need and i'm not sure how to select the two on my "bag"...

I manged to identify the bag with lamp, however it is not working in every case, cuz there might be other black blobs with one or more white blob on it.

What should be a correct filtering? If the size of the bag chances in time, cuz i'm going closer and i observed that the proportion between the area of the bag and lamp is not a neighborhood of a value.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2013-01-31 22:36:07 -0600

unxnut gravatar image

Did you first segment the image appropriately. Looks like the object is very dark and a simple threshold close to black (changing the rest of the image to white) will give you the bag. You can follow this by a blob analysis to look for a blob that contains a white dot.

edit flag offensive delete link more

Comments

Hey, thx for the suggestions, one more question, how can I install the cvBlobLib (i found it ok for my problem) under Ubuntu? Or should I use some other blob lib? If yes could you be so kind to give the appropriate tutorial? Thx

zweistein gravatar imagezweistein ( 2013-02-01 12:45:54 -0600 )edit
1

I have used cvBlobsLib under Windows. Unfortunately, I do not have any experience of this on Ubuntu. I do feel that it should not be too difficult to do. I'll certainly be happy to answer any questions on its use.

unxnut gravatar imageunxnut ( 2013-02-01 22:39:54 -0600 )edit
0

answered 2013-02-06 14:27:18 -0600

unxnut gravatar image

I have just posted my code at: here. You should be able to use it for most part to get all the bags.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-01-31 16:32:23 -0600

Seen: 2,171 times

Last updated: Feb 06 '13