Falco Peregrinus
Falco Peregrinus

Reputation: 587

Precise detecting light sources center from the image with oversaturated pixels

I have a 16bit image on which the main objects are 6 LEDs, two reflective squares, and the rest of the image is pretty much dark. These two squares partially overlap two LEDs. Around 50% of visible LEDs are oversaturated (their center)with a pixel intensity of 65532. Around the center, close to the edge, an overflow of light can be seen which, I assume, can be used to precisely determine the centroid of each LED. I am trying to achieve subpixel precision by using astropy photutils package (https://photutils.readthedocs.io/en/stable/index.html), particularly its methods: source detection(), centroids(), aperture photometry... Two main tasks are how to distinguish overlapping LED with mentioned reflective square and how to precisely determine the center of each LED. I tried to increase the threshold, which partially works, squares are no longer visible, but I am also losing the edge of LED, which results in only having its oversaturated center.
Is someone familiar with the problem?

Upvotes: 0

Views: 515

Answers (1)

Francesco Callari
Francesco Callari

Reputation: 11785

Generally speaking, all subpixel localization methods that I an aware of assume that the observed image values are noisy samples drawn from an underlying smooth (continuous and differentiable) lightness distribution and, crucially, that the points to be located are critical points of that distribution - maxima, minima or saddle points. Sensor saturation around the points of interest generally breaks the latter assumption.

In your case, you could likely get away with further assumptions about the shape of the distribution (e.g. that the un-saturated LED's project into ellipses), such that you can ignore the saturated portions and infer a location from an un-saturated profile.

Or you could reduce the exposure and get rid of the saturation altogether, see Third Law of Computer Vision ("3/4 of the image-related problems in Computer Vision are due to misuse of perfectly adequate hardware, the remaining 1/4 requires hardware more expensive than you can afford")

Upvotes: 1

Related Questions