PDA

View Full Version : identifying the position of a circle in image



qtlearner123
26th April 2012, 05:01
Hi all,

i have an image of a car with bulbs (a circle) , now i want to make the bulbs on or off (painting the circle) by painting red and green based on some condition, but i am failing to understand to get the boundary position of the bulbs to fill the area in order to paint using


image.setpixel(int x, int y, QRGB);


could someone please suggest me some idea on this how to get the boundary position.

thanks and regards,
satya

ChrisW67
26th April 2012, 05:51
Not sure what this has to do with Qt.

If it is single static image then the problem is best solved by use your image editor to determine the centre and radius of the circular headlight areas and coding that into your program.

If this has to work with arbitrary images then you are after edge detection (http://en.wikipedia.org/wiki/Edge_detection), segmentation (http://en.wikipedia.org/wiki/Segmentation_%28image_processing%29) or similar algorithms. You might find something you can use in OpenCv. It is not trivial: not all headlights are round, not all cars have visible headlights, not all images contain cars etc.

qtlearner123
26th April 2012, 06:14
Not sure what this has to do with Qt.
If it is single static image then the problem is best solved by use your image editor to determine the centre and radius of the circular headlight areas and coding that into your program.


yes it is a single static image. may be i am not clear in my question.

thanks and regards,
satya