The method of detection flat/texture/detail areas in frequency domain is well-known and described in various variations in literature (therefore i omit referencing to specific articles). I provide rather schematical description of the method. Knowing of the type of a block (flat or detailed) enables to adjust quantization step-sizes (it is well known that the human visual system is less sensitive to distortion in high-detailed areas than that in smooth and flat areas. This property is utilized in video coding. The quantization step size increases at high-detailed areas and decreases at flat ones).
Idea
In preprocessing stage let’s divide a picture into 8×8 blocks. Then luma pixels of each 8×8 block are Hadamard transformed and separated into bands as follows:
The above block is dividing into bands of ascending frequencies. The distribution of energy in each AC band is distinctly depending on block status (flat/texture/detail).
For flat blocks the average energy for all bands (excepting perhaps the band 1) tends to be low. For ‘detailed’ blocks average AC energy tends to be high for low frequency bands (bands 2-4) and low for high frequency bands. Textured blocks are somewhere in-between ‘detailed’ and ‘flat’:
Energy of k-th band is the sum of absolute values of each coefficient in this band.
Flat/Texture/Detail Linear Classifier:
Input consists of seven normalized band energies and the output is a class type respectively – flat, texture, detail or unrecognized.
Normalized k-th band energy is specified as
Where ACBlkEnergy is the sum of absolute values of all AC coefficients in a given 8×8 block.
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