atomic14 · youtube
1The phone screen is located by identifying the brightest object in a greyscale image using a pixel threshold and filtering by aspect ratio and size.
“The brightest object in the image should be the phone so we apply a simple threshold to each pixel of the image. This gives us blobs of pixels that could be the phone. We examine each of these blobs and create a rectangle that approximates the shape. We then filter out any shapes that are the wrong aspect ratio or are too small. The largest one that remains should be the phone screen.”