my question is similar to this one: OpenCV: Detect blinking lights in a video feed
I have a LED light, and my camera runs at 30fps. At each frame, I ant to know whet
if the background is just noisy, but does not change so much you can you backgroudn subtraction:
you have 2 frames, and you do Frame2-Frame1, then you apply a threshold (the value of the threshold depends on the intensity of the LED so you should test it), and you set to black the pixles lower than the threshold and to white the pixels higher than the threshold.
this is very easy if you convert your image in a grayscale one.
should be somenthign like this:
cvAbsDiff(img2, img1, img2);
cvThreshold(img2, img2, (double)threshold_value, 255 (if you are using an rgb image), CV_THRESH_BINARY);
if your led is off you should fine just noise, while if you led is on you will expect to find a white region where your light is illuminting.