welcome.
that very much depends on how your light source looks in a picture. I can tell you right now, whether it’s LED or something else, will be hard/impossible to distinguish.
there is always the possibility that you won’t detect the “light source”, or that you will detect something as “light source” when it’s something else. approaches can be judged in how likely they are to make errors of these kinds.
you can approach this with varying complexity and quality. that can go as far as training a neural network… if you have the data.
simplest thing you can do is to find areas that are overexposed, i.e. almost perfect white. inRange
or threshold
, findContours
, boundingRect
or minEnclosingCircle
.