blinking interval: 0.4s
left : original video clip
right : the detection result with opencv
output the position of each led
The method of selecting keyframes:
get fps from opencv and flashing period from arduino code(0.4s), flashingInterval = 0.4 * fps
the opencv program disposes the video clip frame by frame
record the frame number when the first led lights up as startFrame
curFrame -(curLED * flashingInterval)-startFrame < 0.5 and curFrame -(curLED * flashingInterval)-startFrame >- 0.5 :
select it !