Is there a good image processing method to get rid of the horizontal stripes in the images taken under fluorescent lighting? These stripes (flicker) occur when you take pictures indoors due to the 50 Hz (Europe) or 60 Hz (US) AC line frequency, and they reflect in the image as twice of this frequency (either 100 Hz or 120 Hz). One commonly suggested way is to choose a synchronized shutter speed (exposure time) such as 1/50s (1/60s) but how would you go about it, if the pictures are taken at an arbitrary shutter speed and you want to fix it in the post-processing?
Here is an example picture that displays the phenomenon:
It's almost impossible to remove them in post. You'd basically have to repaint the image digitally.
Choose a shutter speed that is slow enough to solve the problem in advance and in camera - it's always a better idea to solve problems as soon as practical.
Sadly, I don't know a good formula to determine the best speed, but you could just take a few test shots.
If you want to shoot at an arbitrary shutter speed, you have to use lights that are emitting continuously.
If the whole scene is illuminated by a single light source, it might be possible to create a "flat frame" by taking a picture of the uniform white background illuminated by that light source, and then using the flat frame to compensate your photo for uneven illumination (divide the photo by the flat frame in photoshop/gimp/other).
Preparing a good quality flat frame is normally difficult because it must be truly uniform, but in this case it would be easier because we can assume that:
The flat frame would only work for photos having exactly the same exposure time and will need adjusting (shifting up or down) as the light-induced color pattern will start at different phase each time (but the pattern should be otherwise identical).
I read that the Canon 7Dmk2 has a killer feature for sports lighting which times the exposure to synchronize with the lights.
To fix in post, try shooting a burst which will get the stipes in different positions on each frame. Stack them (auto-align) in Photoshop and use brightest choice for each pixel via blending mode and parameters.