0704findLed.mov

blinking interval: 0.4s

blinking interval: 0.4s

left : original video clip

right : the detection result with opencv

output the position of each led

output the position of each led

The method of selecting keyframes:

  1. get fps from opencv and flashing period from arduino code(0.4s), flashingInterval = 0.4 * fps

  2. the opencv program disposes the video clip frame by frame

  3. record the frame number when the first led lights up as startFrame

  4. curFrame -(curLED * flashingInterval)-startFrame < 0.5 and curFrame -(curLED * flashingInterval)-startFrame >- 0.5 :

    select it !