Method and apparatus for modeling film grain patterns in the frequency domain
View Patent ↗Film grain patterns can be modeled in the frequency domain by estimating the cut frequencies that define a 2D band-pass filter. The film grain parameters can be conveyed in accordance with the ITU-T H.264|MPEG-4 AVC standard in an SEI message allowing film grain reinsertion at a decoder.
1. A method executed by a decoder for automatically modeling film grain patterns for insertion in a video sequence, comprising the steps of:
transforming a set of film grain samples to the frequency domain;
storing each set of coefficients resulting from such transform, the coefficients forming a pattern;
analyzing the pattern created by the transform coefficients; and
estimating the cut frequencies of a 2D band-pass filter that can effectively simulate the pattern of transform coefficients by filtering random noise in a frequency domain.
2. The method according to claim 1 further comprising the step of transmitting at least one cut frequency in a Supplemental Enhancement Information message.
3. The method according to claim 1 wherein the film grain samples are processed in blocks of N×N pixels.
4. The method according to claim 3 wherein the step of analyzing the pattern created by the transform coefficients further comprises the steps of:
computing a mean block of N×N transform coefficients by averaging the transform coefficients from all the stored blocks;
defining horizontal and vertical mean vectors of N components each by averaging the mean block of N×N coefficients along rows and columns, respectively, of each transformed block;
representing the horizontal and vertical mean vectors as separate curves; and
establishing horizontal and vertical cut frequencies from the curves represented by the horizontal and vertical mean vectors, respectively.
5. The method according to claim 4 further comprising the step of low pass filtering at least one mean vector.
6. The method according to claim 4 wherein the at least one cut frequency is established from an intersection point in the curve representing the mean vector.
7. The method according to claim 4 wherein each of a low and a high cut frequency is established from a first and second intersection points in the curve representing the mean vector.
8. The method according to claim 3 wherein the step of analyzing the pattern created by the transform coefficients further comprises the steps of:
computing a mean block of N×N transform coefficients by averaging the transform coefficients from all the stored blocks;
defining horizontal and vertical mean vectors of N components each by averaging the mean block of N×N transform coefficients along rows and columns, respectively, of each transformed block; averaging the horizontal and vertical mean vectors into a single mean vector;
representing the mean vectors as a curve; and establishing horizontal and vertical cut frequencies from the curve represented by the mean vector.
9. The method according to claim 8 further comprising the step of low pass filtering the mean vector.
10. The method according to claim 8 wherein at least one cut frequency is established from an intersection point in the curve representing the mean vector.
11. The method according to claim 8 wherein each of a low and a high cut frequency is established from a first and second intersection points in the curve representing the mean vector.
12. A method executed by a decoder for automatically modeling film grain patterns for insertion in a video sequence, comprising the steps of:
receiving a set of film grain samples performing a transform on the set of film grain samples to the frequency domain;
storing each set of coefficients resulting from such transform, the coefficients forming a pattern;
analyzing the pattern created by the transform coefficients; and
estimating the cut frequencies of a 2D band-pass filter that can effectively simulate the pattern of transform coefficients by filtering random noise in a frequency domain.