Counting of Lights

Hi, Is there a way to check for some flashing lights within an video / picture and let the software count them?
Thanks

Answers (1)

David Young
David Young on 11 Jan 2012

0 votes

Sure, but exactly how you do it depends on many factors which you haven't stated in your question.
Without that information, the best I can suggest is to use thresholding to pick out lights if they are brighter than other things in the images, and use image differencing to detect on/off transitions if there is little or no motion between frames. If there is motion, you might need to do some tracking to follow the lights.
If you have the Image Processing Toolbox, look through the Users Guide, and especially work through the demos, picking up relevant techniques as you go.

2 Comments

Sascha
Sascha on 11 Jan 2012
I have a recorded video with flashes of light popup in different places, there is close to no movement of the flashes. an example would be, imagine 100 people with a camera and they take a pictures with a flash and i want to count how many flashes.
David Young
David Young on 11 Jan 2012
For a start, you could see whether the average brightness of each frame is sufficient to detect the flashes. If a graph of the mean graylevel against frame number shows clear peaks, then maybe that's all you need.

Sign in to comment.

Tags

Asked:

on 11 Jan 2012

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!