Ask Your Question

Count LED blink

asked 2017-09-26 19:36:17 -0500

mateusguilherme gravatar image

Hi !

I want to count how many times the led blinked. it is positioned in the upper right corner of the webcam.

any suggestion?

Image attached.

image description

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2017-09-27 02:15:43 -0500

VxW gravatar image


The simplest way is to do a histogram matching (histogram matching opencv

For this, calculate the histogram for the ROI (blue rectangle) at this time, when the led is on (master template). Afterwards, using the master template to compare each frame within the ROI e.g., with Bhattacharyya, or Mahalanobis distance. If it is similar you have won!

However, there exists many solutions to do this and it depends on your requirements

(P.S.: when two classes have similar means but different standard deviations, the Mahalanobis distance would tend to zero, whereas the Bhattacharyya distance grows depending on the difference between the standard deviations Source: Wiki

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2017-09-26 19:36:17 -0500

Seen: 252 times

Last updated: Sep 27 '17