I have a black and white video taken with a high speed camera and I notice a background flickering coming from my LED light. The images alternate from dim to bright and it makes the videos quite disorienting.

Besides getting a different light, is there any post-proccessing that can be done to remove this effect? Possibly something from the image processing toolbox in matlab, or something in imageJ would be helpful as well.

I have already acquired quite a few videos and would hate to have to repeat everything all over again so any help would be greatly appreciated.


  • $\begingroup$ Flickering from a LED indicates it's dimmed by a PWM drive? If that's right and if you have a control on the LEDs, may be you can change this on the hardware level first. A few frame examples would be helpful however... $\endgroup$
    – Fat32
    Jul 13, 2018 at 19:30
  • $\begingroup$ @Fat32, I'm looking to correct the videos I already have and avoid repeating all the tests actually. But my LED doesn't have any controllers, just a 2-pin plug that goes into a power brick. I'll see if I can find some frames to share... $\endgroup$
    – user19960
    Jul 13, 2018 at 21:11
  • $\begingroup$ If that's hard DC driven LED, flickering does not apply ? $\endgroup$
    – Fat32
    Jul 13, 2018 at 21:21
  • $\begingroup$ Sorry didn't mention that It has a 3rd wire that can be connected to an external dimmer signal. I don't have that add-on so for me it's just a 2-pin plug. Anyway I'm more interested in the possibility of correcting the videos I have right now. I can purchase the add-on or another light for future work. $\endgroup$
    – user19960
    Jul 13, 2018 at 21:48
  • $\begingroup$ Ok. Some images are needed then... $\endgroup$
    – Fat32
    Jul 13, 2018 at 21:49

2 Answers 2


For those classic Video Processing operations there is nothing better than the Plug In's of AviSynth.

Specifically for De Flickering look at:

  1. LMFlicker.
  2. ReduceFlicker.
  3. DeFlicker.

The source code of each is available so you can get inspiration from them.

All of them basically works on smoothing the Luma Data along the temporal dimension.

  • $\begingroup$ This is exactly what I was looking for! thank you @Royi $\endgroup$
    – user19960
    Jul 13, 2018 at 22:29

I've used in the past Julie Delon's flickering removal (pdf) approach which is based on midway image equalization. It's not hard to implement, and the parameters are easy enough to tune.

Since it seems that the brightness change impacts the whole frame, you probably don't need to use the patch oriented approach and can go for a pair-wise midway throughout the whole sequence. The midway some "clever" equalization as it doesn't try to flatten the histogram of images (like standard equalization) but instead attempts at also preserving the original dynamic.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy