Quantcast
Viewing all articles
Browse latest Browse all 40524

Tracking brightest Pixels

This can be done in a number of ways. The simplest brute-force method would be to look at each pixel, keeping track of the x / y position of the brightest one that you find. With an 8-bit image, the problem comes when there are more than one pixel with a maximum brightness of say -- 255. Which pixel position do you choose?

A second option is a "threshold" approach. Basically you apply a threshold to a image -- say a grayscale image -- and use the ofxOpenCv contour finder to find the positions of the "blobs" that represent the brightest pixels (after a thresholding operation). If you get multiple blobs back, you can choose the one that is the biggest based on the number of pixels in the blob or the size of the bounding box.


Viewing all articles
Browse latest Browse all 40524

Trending Articles