Introduction
Film grain is a particular random noise on photographic film due to the presence of small particles of a metallic silver, or dye clouds:
Digital photography in virtue does not exhibit film grain. However a film grain overlay is sometimes added as a special effect onto digital content. There exist a number of film grain generation techniques (FGO methods) which mimic real film emulsion characteristics by using different levels of opacity and add the synthesized grain onto a digital file.
The film grain (regardless synthesized or real) poses a serious problem for encoders due to its noise-like character (larger high-frequencies, motion estimation locked on local minima etc.).
To preserve the film grain an encoder should shrink dead zones (the range that is quantized to zero is denoted as the dead-zone) in the quantization process:
“if the dead zone size is reduced, more grain is visible, if the dead-zone is increased, less grain gets visible“, according to the paper “Quantization with an Adaptive Dead Zone Size for H.264/AVC FRExt” by Thomas Wedi and Steffen Wittmann, 2004.
Grain Detection Method Outline
Since grain is a spatial noise, the following method is effective for detection of grainy image:
- Apply 3×3 non-linear median filter on original image
- Compute histogram of the absolute difference between the original and the filtered images
- If the number of pixels in the range [1..5] of the histogram exceeds 70% of zero pixels then the image is considered as grainy and dead-zones have to be reduced.
23+ years’ programming and theoretical experience in the computer science fields such as video compression, media streaming and artificial intelligence (co-author of several papers and patents).
the author is looking for new job, my resume