Code To Detect Laser Dot In Android Camera Using Realtime Image Processing
I have written a code to find brightest pixe(laser dot)l in camera viewfinder and draw a circle at that coordinate. Ideally the circle should be on dot. but due to some prob(maybe
Solution 1:
Just taking the brightest pixel you find will most definitely not help you, judging from your screenshot. The laserdot there ist probably 15x15 pixels large, with most of the area being oversaturated, i.e. all of those pixels are maxed out and will be "the brightest pixel".
A better heuristic would probably be, to take the coordinates of all pixels whose brightnessvalue (assuming you can use the HSL colormodel) is above a given threshold and then calculate some form of weighted average (with the weight of each pixel being relative to its brightness). For testingpurposes just calculating the average would probably do.
Post a Comment for "Code To Detect Laser Dot In Android Camera Using Realtime Image Processing"