Page 1 of 1

flashing led detection with changing ambiant light

Posted: Wed Dec 05, 2018 9:48 am
by chrisPyres66
Dear all,

I would like to discuss the best way (accuracy and consumption) to detect a flashing green led with a changing ambiant light from night to day.
The led is lighting very quickly (around 20ms) every 4s.

To be accurate, i used QQQVGA frame rate to have 84fps and catch the flashing light.

I tried these three methods to detect the light :
  • images difference: very sensitive to ambiant light change and to reflecting ambiant light
    find_blob : very sensitive to ambiant light change and to reflecting ambiant light
    grayscale threshold: very sensitive to reflecting ambiant light
Have you an idea which is the best method ?

Thanks,

Re: flashing led detection with changing ambiant light

Posted: Wed Dec 05, 2018 12:10 pm
by kwagyeman
I'd use get_stats() to get the color distribution of the area the light is in and then monitor the area color distribution over time. When the LED is flashing it should change the green color average of the area.