CROSS-REFERENCE TO RELATED APPLICATIONS
This application is a European divisional application of European patent application EP 18198246.3
(reference: A16054BEP02), for which EPO Form 1001 was filed 02 October 2018.
This invention relates to a technique for simulating film grain.
BACKGROUND OF THE INVENTION
Motion picture films comprise silver-halide crystals dispersed in an emulsion, which is coated in thin layers on a film base. The exposure and development of these crystals form the photographic image consisting of discrete tiny particles of silver. In color negatives, where the silver is chemically removed after development, tiny blobs of dye occur on the sites where the silver crystals form. These smalls specks of dye are commonly called 'grain' in color film. Grain appears randomly distributed on the resulting image because of the random formation of silver crystals on the original emulsion. Within a uniformly exposed area, some crystals develop after exposure while others do not.
Grain varies in size and shape. The faster the film, the larger the clumps of silver formed and blobs of dye generated, and the more they tend to group together in random patterns. The grain pattern is typically known as 'granularity'. The naked eye cannot distinguish individual grains, which vary from 0.0002 mm to about 0.002 mm. Instead, the eye resolves groups of grains, referred to as blobs. A viewer identifies these groups of blobs as film grain. As the image resolution becomes larger, the perception of the film grain becomes higher. Film grain becomes clearly noticeable on cinema and high-definition images, whereas film grain progressively loses importance in SDTV and becomes imperceptible in smaller formats.
Motion picture film typically contains image-dependent noise resulting either from the physical process of exposure and development of the photographic film or from the subsequent editing of the images. The photographic film possesses a characteristic quasi-random pattern, or texture, resulting from physical granularity of the photographic emulsion. Alternatively, a similar pattern can be simulated over computed-generated images in order to blend them with photographic film. In both cases, this image-dependent noise is referred to as grain. Quite often, moderate grain texture presents a desirable feature in motion pictures. In some instances, the film grain provides visual cues that facilitate the correct perception of two-dimensional pictures. Film grade is often varied within a single film to provide various clues as to time reference, point of view, etc. Many other technical and artistic uses exist for controlling grain texture in the motion picture industry. Therefore, preserving the grainy appearance of images throughout image processing and delivery chain has become a requirement in the motion picture industry.
Several commercially available products have the capability of simulating film grain, often for blending a computer-generated object into natural scene. Cineon® from Eastman Kodak Co, Rochester New York, one of the first digital film applications to implement grain simulation, produces very realistic results for many grain types. However, the Cineon® application does not yield good performance for many high speed films because of the noticeable diagonal stripes the application produces for high grain size settings. Further, the Cineon® application fails to simulate grain with adequate fidelity when images are subject to previous processing, for example, such as when the images are copied or digitally processed.
Another commercial product that simulates film grain is Grain Surgery™ from Visual Infinity Inc., which is used as a plug-in of Adobe ® After Effects ®. The Grain Surgery™ product appears to generate synthetic grain by filtering a set of random numbers. This approach suffers from disadvantage of a high computational complexity.
None of these past schemes solves the problem of restoring film grain in compressed video restoration. Film grain constitutes a high frequency quasi-random phenomenon that typically cannot undergo compression using conventional spatial and temporal methods that take advantage of redundancies in the video sequences. Attempts to process film-originated images using MPEG-2 or ITU-T/ISO H.264 compression techniques usually result in either an unacceptably low degree of compression or complete loss of the grain texture.
 US 5 641 596 A
describes a technique for adjusting film grain in an image by first stripping the existing film grain from the image and then adding synthesized grain. The film initially undergoes scanning to yield film grain information stored in a statistics file. The stored statistics aid in cleaning the film of film grain, and in film grain synthesis.
Thus, there exists a need for a technique for representing the film grain characteristics through one or more of a set of parameters.
SUMMARY OF THE INVENTION
Briefly, in accordance with a preferred embodiment of the present principles, there is provided a technique for simulating film grain. The method commences by characterizing in image information stream, such as for example, a video stream containing a film image, to provide information indicative of the film grain within the image information stream. The film grain information includes at least one parameter among a set of possible parameters specifying different attributes of the film grain in the image stream. The film grain information is then encoded for subsequent transmission.
BRIEF DESCRIPTION OF THE DRAWINGS
FIGURE 1 illustrates a block diagram of a first embodiment of a system in accordance with the present principles for simulating film grain in accordance with the present principles;
FIGURE 2 illustrates a block diagram of a second embodiment of a system in accordance with the present principles for simulating film grain in accordance with the present principles; and
FIGURE 3 illustrates a block diagram of a third embodiment of a system in accordance with the present principles for simulating film grain in accordance with the present principles.
FIGURE 1 depicts a block schematic diagram of a first embodiment of a system 10 in accordance with the present principles for performing film grain simulation in accordance with the present principles. The system 10 includes a Film Grain Remover 22 that serves to remove the film grain from an input video stream 12 to yield a filtered video stream 24 received at a Video Encoder 13. Film grain removal constitutes a particular case of noise filtering where the noise signal appears correlated with the image signal. Thus, the Film Grain Remover 22 can take the form of a classical image filter, although such a filter will not necessarily provide optimal performance. The Video Encoder 13 encodes the filtered video stream 24 to yield a coded video stream 14 for receipt at a Video Decoder 15 that decodes the coded stream to yield a decoded video stream 16. The Video Encoder 13 and the Video Decoder 15 utilize the same video coding scheme as are well known in the art. For example, the video coding scheme could comprise the ITU-T H.264 video-coding standard, or another type of block-based coding. Encoders and decoders that utilize the MPEG-2 and the ITU-T H.264 standard are well known.
The system 10 also includes a Film Grain Characterizer 23 that receives the input video stream 12 and the filtered video stream 24. From these video streams, the Film Grain Characterizer 23 outputs a message, hereinafter referred to as a grain message, that contains an identity of a model for simulating grain, as well at least one of a set of several parameters, including correlation parameters, intensity- independent parameters and intensity-dependent parameters used by the identified model. As discussed in detail below, the parameters in the film grain message enable simulation of the original image-dependent noise using the identified model. In the absence of any of the parameters, a default value is assigned to that missing parameter. (Indeed, if no model is identified, a default model for film grain is assumed. In one embodiment, the Film grain characterizer 23 generates the parameters in accordance with a model based on the physical process of exposure and development of the photographic film or upon processes added during the subsequent editing of the images.
Following generation of the grain message, a Film Grain characterization information Encoder 26 encodes the message for transmission to a Film Grain characterization information Decoder 28 in-band or out-of band from, the encoded video stream 14 transmitted by the Video Encoder 13 to a the Video Decoder 15. Both the Video Encoder 13 and the Film Grain characterization information Encoder 26 use the same encoding scheme. Thus, for example, when the Encoder 26 utilizes the ITU-T H.264 video-coding standard for encoding, the coded film grain characterization information stream 27 can take the form of the film grain Supplemental Enhancement Information (SEI) message as defined in the ITU-T H.264 video coding standard.
The Film Grain characterization information Decoder 28 decodes the coded film grain message 27 to yield a decoded film grain characterization information stream 29 for input to a Film Grain Restoration Processor 30. As described in detail hereinafter, the Processor 30 will simulate the film grain with a model identified in the grain message using parameters in message. In the absence of the identification of the model, the Processor 30 will assume a default mode. Likewise, in the absence of a specified value of a given parameter, the Processor 30 will assume a default value for that parameter.
In a preferred embodiment, the grain message 25 of FIG. 1 will typically include one or more correlation parameters specifying Spatial Correlation, Aspect Ratio, Color Correlation, and Temporal Correlation. Each of these parameters is discussed below
In an exemplary embodiment, the image-dependent correlation of the film grain in the spatial domain can be modeled with at least one parameter, Spatial Correlation. The measured spatial correlation determines the size of the blobs. A second order auto regression model and a convolution model for the Spatial Correlation are described hereinafter.
Ideally, film grain should appear isotropic, with identical characteristics both in X and Y direction. However, in practice, the film grain actually can appear stretched in one direction, often resulting from factors related to film recording, such as the use anamorphic optics or non-square detector geometry. For that reason, when modeling film grain, an intensity-independent parameter representing the aspect ratio factor will complement the spatial correlation measure. The aspect ratio of the grain blobs is specified with at least one parameter.
In accordance with the present principles, the layer-dependency of the film grain in color images is represented using color correlation. The measured color correlation determines the perceived tint of the grain. A weak color correlation implies that grain blobs created in the different color layers randomly overlay each other. Consequently, a viewer will perceive the grain as colored. A high color correlation implies that the grain blobs on one color component depend on other color components. In this case, a viewer will perceive the grain as monochromatic.
The temporal correlation of the grain in sequences is represented by at least one parameter. Grain by itself cannot exhibit any temporal correlation between frames, but the introduction of a parameter representing temporal correlation can help to simulate other observed effects caused by the editing of the film.
In conjunction with the previously discussed parameters representing the dependency of the film grain with the film image, a need exists to represent the intensity of the noise arising from the random processes that originate the film grain. Noise intensity can vary for each color component and will depend on the film image. The intensity of the grain determines the level in which noise is perceived in the image. Small grain intensity levels introduce small variations in the original image and hardly appear noticeable. High intensity levels become clearly visible as peaks superimposed in the image.
In addition to the parameters discussed above, the grain message can also include parameters that identify the color space in which to add the film grain, and the blending mode used to blend the grain with the video signal. Note that a different set of parameters could be transmitted for each color component and for different intensity levels of the film image. It is well known for example that film grain depends on the local intensity of the image, and that different color components can have different grain depending on the type of film stock.
The film grain characterizer 23 of FIG. 1 can generate different sets of parameters in accordance with the intensity levels of the image. If desired, the Film grain decoder 28 can interpolate the set of parameters to various intensity levels in order to derive a smooth transition of the film grain characteristics.
In order to interpret the set of parameters, the Film grain decoder 28 must have a specification of the model that generates the parameters. To understand how such a model can be specified, the following mathematical relationships will prove useful. First, the decoded image pixel value at image position (x, y), color channel c, and frame number t is represented by I(x, y, c, t). For convenience, assume that pixel values are scaled to have maximum value of one. Further, assume an RGB image representation (c = 1, 2, or 3), although this model can be directly to monochromatic images and, with obvious modifications, to YUV representation.
With an additive grain model, grain simulation changes each pixel value to J(x, y, c, t) where J(x, y, c, t) is given by the relationship:
where L(x, y, t) is a measure of local intensity in the image and G(x, y, c, t, L(x, y, t)) defines the grain value. One possible implementation is to define L as luminance, or a weighted sum of intensities I(x, y, c, t) over all color channels.
The additive model given by equation (1) is appropriate when a logarithmic intensity scale is used. For linear scale, the model of equation (1) can be replaced by the following multiplicative mode:
Whether an additive or a multiplicative grain model is implemented will depend on the format of the decoded image. In general, grain should comprise small fraction of maximum pixel value.
The following describes some examples of different kind of models for extracting a set of parameters in accordance with the present invention.
1. Autoregressive simulation of film grain pattern
In an exemplary embodiment, a second order auto regression scheme can be used to model spatial correlation and a first order regression scheme can be used to model cross-color and temporal correlations. All correlation factors depend on intensity of the decoded image. Horizontal and vertical spatial correlation factors are related by a constant aspect ratio factor. Under such conditions, the following formula will yield simulated grain values,
where N is a random value with normalized Gaussian distribution, A is a constant pixel aspect ratio, p, q, r, s, u, and v are correlation parameters. Parameter u is always zero for the first color channel, and the grain value G assumed to be zero whenever any index is out of range.
As can be seen from the structure of equation (2), grain values for a given pixel in a given color channel are calculated recursively using previously calculated grain values. Specifically, frames are calculated in order of increasing frame number (i.e., increasing t). Within each frame, color channels processing occurs in order of increasing color channel number (i.e., increasing c). Within each color channel, pixels are rasterized horizontally and then vertically in order of increasing x and y. When this order is followed, all grain values required by equation (2) are automatically calculated in advance.
Under certain circumstances, vertical rasterization proves more practical, i.e. pixels processing occurs by columns first. In such cases, equation (2) will require a slight modification to use only previously calculated values:
Implementing equation (2) or equation (2a)) requires certain minimum decoder capabilities. First, the Film Grain Information decoder 28 must perform all calculations real time. Second, the Film Grain Information decoder 28 needs to keep a number of previously calculated grain values in memory. Specifically, to implement temporal correlation (i.e., last term in equations (2) and (2a)), the Film Grain Information decoder 28 needs to keep grain values for a full previous frame. From this perspective, it is important that the model of equation (2) allow gradual scaling down requirements with some degradation of fidelity.
A system with slightly lower fidelity could ignore the last (temporal) term in equation (2). Doing so would eliminate the need to have an additional frame buffer to keep grain values from previous frame. Further cost savings would result by neglecting those terms in equation (2) that depend on s(c, L). Doing so eliminates need to store a second previous row in memory and reduces number of calculations. Neglecting diagonal correlations described by terms with r(c, L), and so on will achieve a further reduction of complexity. The lowest quality grain simulator will use only white noise term.
Whenever a term is neglected in a scaled-down system, a benefit occurs if the Film Grain Information decoder 28 adjusts the remaining parameters so that the effective first-order correlation and even more importantly, the autocorrelation (noise power) remain the same as they would in a full-scale implementation of the model embodied by equation (2). The same adjustment should occur for the first rows and columns of each frame in the absence of the availability of all of the previous grain values.
The flexibility of the model embodied in equation (2) will become further apparent by setting parameters p, q, r, and s to zero for all but first color channel, and by setting the color correlations u(c, L) for c > 1 to 1. Under such conditions, the grain becomes completely monochromatic. This set of parameters values can describe the case for color variations washed out by previous YUV 4:2:0 transformation of the color space.
For a set of three colors, the model of equation (2) describes the grain pattern in terms of a group of seventeen parameters for each luminance level, plus an aspect ratio that does not depend on luminance. Luminance-dependent parameters can be encoded for several fixed luminance levels. The decoder will interpolate parameters values for intermediate luminance levels.
Grain parameters do not have to be represented exactly in the form of equation (2). For example, any one-to-one transform of the parameters could be used. In addition, different set of reference intensity levels could be used for different parameters and different interpolation schemes could be used, etc.
2. Convolution in the spatial domain to simulate the film grain pattern
In another exemplary embodiment, the film grain pattern can be simulated by convolving a set of random numbers x by a linear, time-invariant, digital-filter h defined in the form:
This states that the filter output simulating film grain y(n)
is the convolution of the input x(n)
with the filter impulse response h(n)
Although equation (4) yields a simulation in one dimension, a two-dimensional pattern could be obtained by concatenating the vertical and horizontal convolutions in one dimension. Under such circumstances, the coefficients of the filter should be transmitted in addition to the aspect ratio factor.
A Film Grain Information decoder 28 with limited capabilities can limit the spatial size of the convolution kernel, which will result in decreased memory and processing power requirements.
3. Filtering in a transformed domain to simulate the film grain pattern
As discussed previously, convolving the impulse response of a filter h with a set of random numbers x can characterize the film grain pattern. This same operation can also be described by multiplication in the frequency domain by the Fourier Transform of the impulse response H and the Fourier Transform of the set of random numbers X:
Filtering in the frequency domain affords an advantage because it is computationally faster if a Fourier transform of the image is available for example as part of filtering or compression process."
The following set of parameters yielded satisfactory results to represent image-dependent grain according in accordance with the present principles. These parameters assume an autoregressive method of simulating grain. Parameters for other methods would be represented by similar tables.
Color space: logarithmic RGB
Blending mode: additive
Aspect ratio: 1
Number of intensity levels: 3
Parameters for the R component:
|level [0, 84]:
Parameters for the G component:
|level [0, 84]:
Parameters for the B component:
|level [0, 84]:
Correlation parameters not shown in this table are set to 0.
After specifying the color space, the blending mode, the aspect ratio and the number of intensity levels for which different parameters are defined, the film grain on each color component is encoded. Note that only the data in italics in addition to some level (intensity) information has to be transmitted.
FIGURE 2 depicts a second embodiment 10' of a system for simulating film grain in accordance with the present principles. The system 10' shares many of the same elements as the system 10 of FIG. 1 and like reference numbers describe like elements. Indeed, the system 10' of FIG. 2 differs only in the absence of the Film Grain characterization information Encoder 26 and Film Grain characterization information Decoder 28 of FIG. 1. The system 10' of FIG. 2 uses the Video Encoder 13 and Video Decoder 15 to encode and decode respectively the film grain characterization information 25 output of the Film Grain Characterizer 23. The system 10' of FIG. 2 requires the use of a video coding standard that supports the transmission film grain characterization information as parallel enhancement information.
FIGURE 3 depicts a third embodiment 10" of a system for simulating film grain in accordance with the present principles. The system 10" shares many of the same elements as the system 10' of FIG. 2 and like reference numbers describe like elements. Indeed, the system 10" of FIG. 3 differs only in the absence of the Film Grain Remover 22 of FIG. 2. The system 10" of FIG. 3 uses the reconstructed images available at the Video Encoder 13 to simulate the result of removing film grain. The system 10" of FIG. 3 affords two advantages as compared to the systems 10 of FIG. 1 and 10' of FIG 2. First, the system 10" of FIG. 3 reduces the computational complexity related to film grain removal, and secondly, it adapts the film grain characterization to the amount of film grain suppressed by the Video Encoder 13. Once the Film Grain Characterizer of FIG. 3 disposes of both the input video 12 with film grain, and a reconstructed video 24 resulting from Video Encoder 13, it can accomplish the task of characterizing the observed film grain.
The foregoing describes a technique for simulating film grain in a video signal. While the film grain simulation technique has been described in connection with the encoding and decoding of a video signal, the technique has equal applicability for other purposes, such as for example post-production of motion picture films for example. In this regard, the original image could exist as image information in a form other than a compressed video signal, and the film grain information could exist in a form other than as a message, such as an SEI message. For example, the image information could exist in one of a variety of different formats that exist in the art.
A method for simulating film grain, comprising:
receiving an encoded video stream;
receiving encoded film grain information, including at least one parameter specifying an attribute of the film grain in the video stream;
decoding the coded video stream to yield a decoded video stream;
decoding the encoded film grain information to yield decoded film grain information;
simulating film grain using the decoded film grain information; and
blending the simulated film grain with the decoded video stream, wherein the film grain information includes a set of parameters, each specifying a different film grain attribute, characterised in that
the set of parameters includes a plurality of intensity-independent parameters including a parameter defining an aspect ratio of the film grain.
2. The method of claim 1, wherein at least one of the encoded video stream and the encoded film grain information is received in a block based video coding format.
3. The method of claim 2, wherein the block based video coding format is the MPEG-2 video coding format or the ITU-T H.264 video coding format.
4. The method of claim 3, wherein the encoded video stream is received in the ITU-T H.264 video coding format and the encoded film grain information is received as a Supplemental Enhancement Information (SEI) message.
5. The method of any of claims 1-4, the set of parameters further including a plurality of correlation parameters.
6. The method of claim 5, wherein at least one correlation parameter defines a spatial correlation in a perceived pattern of film grain.
7. The method of claim 5 or 6, wherein at least one correlation parameter defines a correlation between color layers.
8. The method of any of claims 1-7, wherein at least one parameter defines intensity of a random component of the film grain.
9. The method of any of claims 1-8, wherein the film grain information is received out-of-band or in-band with respect to the video stream.
Verfahren zum Simulieren einer Filmkörnung, umfassend:
Empfangen eines codierten Videostroms;
Empfangen codierter Filmkörnungsinformationen, die mindestens einen Parameter einschließen, der ein Attribut der Filmkörnung in dem Videostrom spezifiziert;
Decodieren des codierten Videostroms, um einen decodierten Videostrom hervorzubringen;
Decodieren der codierten Filmkörnungsinformationen, um decodierte Filmkörnungsinformationen hervorzubringen;
Simulieren einer Filmkörnung unter Verwendung der decodierten Filmkörnungsinformationen; und
Mischen der simulierten Filmkörnung mit dem decodierten Videostrom, wobei die Filmkörnungsinformationen einen Satz von Parametern einschließen, die jeweils ein anderes Filmkörnungsattribut spezifizieren, dadurch gekennzeichnet, dass
der Satz von Parametern eine Vielzahl von intensitätsunabhängigen Parametern einschließt, einschließlich eines Parameters, der ein Seitenverhältnis der Filmkörnung definiert
2. Verfahren nach Anspruch 1, wobei mindestens einer des codierten Videostroms und der codierten Filmkörnungsinformationen in einem blockbasierten Videocodierungsformat empfangen wird.
3. Verfahren nach Anspruch 2, wobei das blockbasierte Videocodierungsformat das MPEG-2-Videocodierungsformat oder das ITU-T H.264-Videocodierungsformat ist.
4. Verfahren nach Anspruch 3, wobei der codierte Videostrom in dem ITU-T H.264-Videocodierungsformat empfangen wird und die codierten Filmkörnungsinformationen als eine Supplemental Enhancement Information-Nachricht (SEI-Nachricht) empfangen werden.
5. Verfahren nach einem der Ansprüche 1-4, wobei der Satz von Parametern weiter eine Vielzahl von Korrelationsparametern einschließt.
6. Verfahren nach Anspruch 5, wobei mindestens ein Korrelationsparameter eine räumliche Korrelation in einem wahrgenommenen Muster einer Filmkörnung definiert.
7. Verfahren nach Anspruch 5 oder 6, wobei mindestens ein Korrelationsparameter eine Korrelation zwischen Farbschichten definiert.
8. Verfahren nach einem der Ansprüche 1-7, wobei mindestens ein Parameter eine Intensität einer zufälligen Komponente der Filmkörnung definiert.
9. Verfahren nach einem der Ansprüche 1-8, wobei die Filmkörnungsinformationen bandextern oder bandintern in Bezug auf den Videostrom empfangen werden.
Procédé pour simuler le grain d'un film, comprenant les étapes consistant à :
recevoir un flux vidéo codé ;
recevoir des informations de grain de film codées, incluant au moins un paramètre spécifiant un attribut du grain de film dans le flux vidéo ;
décoder le flux vidéo codé pour produire un flux vidéo décodé ;
décoder les informations de grain de film codées pour produire des informations de grain de film décodées ;
simuler un grain de film en utilisant les informations de grain de film décodées ; et
mélanger le grain de film simulé avec le flux vidéo décodé,
dans lequel les informations de grain de film incluent un ensemble de paramètres, chacun spécifiant un attribut de grain de film différent, caractérisé en ce que l'ensemble de paramètres inclut une pluralité de paramètres indépendants de l'intensité, y compris un paramètre définissant un rapport hauteur/largeur du grain de film.
2. Procédé selon la revendication 1, dans lequel au moins l'un du flux vidéo codé et des informations de grain de film codées est reçu dans un format de codage vidéo à base de blocs.
3. Procédé selon la revendication 2, dans lequel le format de codage vidéo à base de blocs est le format de codage vidéo MPEG-2 ou le format de codage vidéo ITU-T H.264.
4. Procédé selon la revendication 3, dans lequel le flux vidéo codé est reçu au format de codage vidéo ITU-T H.264 et les informations de grain de film codées sont reçues sous la forme d'un message d'informations d'amélioration supplémentaires (SEI).
5. Procédé selon l'une quelconque des revendications 1 - 4, l'ensemble de paramètres incluant en outre une pluralité de paramètres de corrélation.
6. Procédé selon la revendication 5, dans lequel au moins un paramètre de corrélation définit une corrélation spatiale dans un motif perçu de grain de film.
7. Procédé selon la revendication 5 ou 6, dans lequel au moins un paramètre de corrélation définit une corrélation entre des couches de couleur.
8. Procédé selon l'une quelconque des revendications 1 - 7, dans lequel au moins un paramètre définit une intensité d'une composante aléatoire du grain du film.
9. Procédé selon l'une quelconque des revendications 1 - 8, dans lequel les informations de grain de film sont reçues hors bande ou en bande par rapport au flux vidéo.