Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to detect the "external" pixels in an edge?

Hi there. My goal using OpenCV is to detect airplanes (or anything else in the sky) and get the position of the object (at the moment it's being done for images and live camera stream in the next step). I have already succeeded in detecting edges, as shown below:

image description

To get the position of this (or any other) plane I thought of drawing a rectangle based on the most externally placed points:

image description

But I don't really know what's the best way of doing this. I could look for pixels with luminance greater than 0 and take only these with min and max x,y coordinates, but the drawback is that there could also happen to be objects which I don't want to detect. Have you got any idea that could help me? Thanks in advance!