Detection of repeated and frozen frames in a video signal

Abstract: An apparatus and method for the detection of repeated and frozen frames in a video signal obtains the absolute differences between pixels in corresponding fields of consecutive frames and generates a logic bit-map based on a threshold that is related to a maximum absolute difference for the field. The logic "1"s in the logic bit-map are counted to determine a normalized distribution count for the field and to determine an actual count in each of a plurality of segments of the logic bit-map. The actual counts are compared with bounds generated from the normalized distribution count and, if all the actual counts for the field are within the bounds, a repeated frame is reported. Alternatively in the absence of noise the actual counts are compared with a minimum value and, if all of the actual counts are below the minimum value, a repeated frame is reported.

Description: BACKGROUND OF THE INVENTION The present invention relates to detecting artifacts in a video signal, and more particularly to the detection of repeated and frozen frames in a video signal. Often when video compression is involved in video transport, if the bandwidth available for transport is insufficient, a compression coder may simple re-transmit a copy of a previous frame. The defect thus created is called "frame freeze" and is perceived by viewers as a "jerk" in a moving object shown in the video. Also compression coders sometimes stop encoding, i.e., they freeze. The last frame before this freezing occurs is retained and displayed by decoders, producing a still image or an image that flickers as interlaced field1 and field2 are shown in an alternating fashion. A trivial solution for the problem of repeated or "freeze" frames is to subtract the corresponding fields in consecutive frames pixel by pixel. If all of the resulting pixels in the bit-map are zero, the implication is that there is a repeated frame. However such a trivial solution does not work reliably in practice because there may be random noise present in the video. Depending upon where in the video chain such noise is added, the noise pattern may not repeat from video field to video field. Therefore where the meaningful video content in consecutive frames is repeated, the difference of two fields does not produce zero since the random noise patterns do not register, i.e. they are not identical. US-A-5828786, US-A-5606373, EP-A-0762772, Low-cost Telecine Detection for Real-Time Video Coding, R. Armitano, Proceedings of the Spie, Spie, Bellingham, Va. U.S. (11-1999), 3528, 261-268, and US-A-5929902 disclose the precharacterising features of the present claims. What is desired is a method and apparatus for the detection of repeated and frozen frames in a video signal that works reliably in a practical environment, i.e., in the presence of noise. BRIEF SUMMARY OF THE INVENTION According to a first aspect of this invention there is provided a method as claimed in claim 1 herein. According to a second aspect of this invention there is provided an apparatus as claimed in claim 4 herein. Thus the present invention provides an apparatus and method for the detection of repeated and frozen frames in a video signal by obtaining the absolute differences between pixels from corresponding fields in consecutive frames. From the absolute differences a logic bit-map is generated, a logic "1" being inserted into the logic bit-map for each pixel where the absolute difference exceeds a threshold that is a function of a maximum derived from the absolute differences for the field. A normalized distribution count is determined as the sum of all the logic "1"z in the logic bit-map. Then the logic bit-map is divided into a number of cells of equal size. The logic "1"s for each cell also are counted. Bounds are generated from the normalized distribution count, and the actual counts for each cell are compared with the bounds. If all of the actual counts for the field are within the bounds, a repeated frame is reported. Alternatively in a noiseless environment if all of the actual counts are less than a minimum value, a repeated frame is reported. The objects, advantages and other novel features of the present invention are apparent from the following detailed description when read in conjunction with the appended claims and attached drawing. BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWING Figs. 1A, 1B and 1C are graphic views showing the generation of logic bit-maps according to the present invention. Figs. 2A and 2B are graphic views showing logic bit-maps for (a) a video signal having motion and (b) a repeated frame with noise present. Figs. 3A and 3B are graphic views showing segmentation of logic bit-maps corresponding to Figs. 2A and 2B. Figs. 4A and 4B are graphic views showing actual cell count variations for the logic bit-maps corresponding to Figs. 3A and 3B. Fig. 5 is a block diagram view of an apparatus for detecting repeated frames in a video signal according to the present invention. DETAILED DESCRIPTION OF THE INVENTION The solution to the problem of repeated frames is as follows: For every two consecutive frames in a video sequence the luminance values in corresponding fields are subtracted, i.e., the luminance values in field1 of one frame are subtracted from the corresponding luminance values in field1 of the preceding frame, to produce a difference map. Having obtained the difference map, each difference value is replaced with its absolute value. A Maximum is found as the largest of these absolute values. The difference map of absolute values is converted into a logic map by placing values of "1" in places where the absolute value of the differences exceed a threshold based on a fraction of the Maximum, such as 50% of Maximum. Otherwise a "0" is placed in places where the absolute value of the differences does not exceed such threshold. In Figs. 1A, 1B and 1C the various difference maps are shown, (a) for the differences between luminance values in the corresponding fields of consecutive frames, (b) for the absolute differences, and (c) for the resulting logic map. Referring now to Figs. 2A and 2B logic maps for consecutive frames (a) having motion between the two frames and (b) having repeated frames are shown. The logic map having motion between consecutive frames shows an outline of the moving object, while the logic map for repeated frames shows only random noise. The next step is to divide the logic map into N equal areas, for example 60 rectangles, as shown in Figs. 3A and 3B for the corresponding logic maps shown in Figs. 2A and 2B. The noise values in each area are summed to produce an array of N numbers. Where moving video is present, some of the N numbers are considerably larger than others; while where only random noise is present in the video, the N numbers have approximately equal values within the limits of statistical fluctuation. as shown respectively in Figs. 4A and 4B respectively. Whether just random noise is present, i.e., the frame is repeated, is determined as follows: Determine a count C of the logic "1" pixels in each of the N cells corresponding to a uniform distribution over all cells. For only noise present the count in each cell is within bounds of some statistical measure, such as C' = C +/- 4*SQRT(C) where C' is the count of logic "1" for a particular one of the N cells. If there is a single cell where the value of C' exceeds these bounds, then the frame is not repeated. As another criterion to cover the case where no noise is present, if C' for each cell is less than some minimum number, such as five, then the frame is repeated. An apparatus to report instances of repeated frames is shown in Fig. 5. A capture module 12 receives the video signal, digitizes it if in analog form, separates the active video from timing information and decodes the active video to provide luminance values for each pixel of the active video. The luminance values for a field are input to a subtraction unit 14 and to a frame delay unit 16 , the output from the frame delay unit also being input to the subtraction unit. Thus the inputs to the subtraction unit 14 are corresponding fields from consecutive frames. The differences from the subtraction unit 14 are input to an absolute value unit 18 that produces absolute differences which are stored in a bit-map 20 . For each field the maximum absolute difference value Maximum is determined by a threshold generator 22 and multiplied by a specified fraction, such as 0.5, to produce a threshold value TH . For each field the absolute differences from the bit-map 20 are input to a comparator 24 together with the threshold value, and the output from the comparator is input to a logic bit-map 26 . The output from the logic bit-map 26 for each field is input to a normal distribution calculator 28 and to a segmentation counter 30 . The normal distribution calculator 28 totals the number of logic "1" values in the logic bit-map 26 and divides it by N, the number of segments into which the bit-map is divided, to produce the normal distribution count C. The segmentation counter 30 counts the number of logic "1" values for each segment of the logic bit-map 26 to produce the segment counts C'. The normal distribution count C is input to a limit circuit 32 to provide the bounds for the segment counts C'. The bounds from the limit circuit 32 are equal to C +/- K, where K may be equal to 4*SQRT(C). The bounds are input to respective comparators 34, 36 together with the segment counts C'. The outputs from the comparators 34, 36 are input to an AND gate 38 so that, if all segment counts C' for a field are within the bounds, an output is produced to indicate a repeated frame. Alternatively the segment counts C' are input to yet another comparator 40 where they are compared with a minimum value, such as 5. If all segment counts C' for a field are less than the minimum value, then the comparator 40 provides an output to indicate a repeated frame. The comparators 34, 36 include a flag circuit that is set when any of the segment values C' for a field are out of bounds, which flag circuit is reset at the start of the next field. Setting of the flag circuit inhibits the AND gate 38 so no repeat frame output is provided at the end of the field. The AND gate 38 is enabled by a field signal asserted at the end of each field to report the status of the flag circuit. Likewise an AND gate 42 at the output of the noiseless comparator 40 is enabled by the field signal so that the status of a flag circuit in that comparator, which is set if the minimum is exceeded by any segment count C' within the field, is reported. The outputs from the AND gates 38 , 42 may be combined by an OR gate 44 to provide the repeat frame output in either situation. The elements 14-44 may be replaced by a microprocessor 46 operating under software control to perform all the corresponding functions. Thus the present invention provides an apparatus and method for the detection of repeated and frozen frames in a video signal by building a logic bit-map for each field of the video signal, the logic bit-map representing the pixels from corresponding fields of consecutive frames that exceed a determined threshold, comparing the logic "1" count for each of N segments of the logic bit-map with a normalized count per cell for the entire logic bit-map, and reporting repeated frames when the segment count is outside bounds based upon the normalized count.

Claims: A method of detecting repeated frames in a video signal comprising the steps of: building (14 - 26) from corresponding fields of consecutive frames a logic bit-map for each field of the video signal as a function of absolute differences between pixels of the corresponding fields; characterised by segmenting (30) the logic bit-map into a plurality of cells; and reporting (28 - 44) repeated frames as a function of a count of the number of logic "1" values for each segment of the logic bit-map for each cell versus a normalized count for each cell. The method as recited in claim 1 wherein the building step comprises the steps of: differencing (14) the pixels from the corresponding fields of the consecutive frames to obtain the absolute differences; from the absolute differences determining (22) a threshold value; and inserting (24) a logic "1' into the logic bit-map for each pixel where the absolute difference exceeds the threshold value. The method as recited in claim 2 wherein the reporting step comprises the steps of: determining (30) the normalized cell count as the sum of the logic "1"s for the logic bit-map for each field divided by the number of cells; counting for each cell in each field the number of logic "1"s to produce the count for each cell; determining bounds from the normalized cell count; and reporting repeat frames when the count for all cells in the field are within the bounds. An apparatus for detecting repeated frames in a video signal comprising: means (14 - 26) for building from corresponding fields of consecutive frames a logic bit-map for each field of the video signal as a function of absolute differences between pixels of the corresponding fields ; characterised by means (30) for segmenting the logic bit-map into a plurality of cells; and means (28 - 44) for reporting repeated frames as a function of a count of the number of logic "1" values for each segment of the logic bit-map for each cell versus a normalized count for each cell. The apparatus as recited in claim 4 wherein the building means comprises: means for differencing (14) the pixels from the corresponding fields of the consecutive frames to obtain the absolute differences; means for determining (22) from the absolute differences a threshold value; and means for inserting (24) a logic "1' into the logic bit-map for each pixel where the absolute difference exceeds the threshold value. The apparatus as recited in claim 5 wherein the reporting means comprises: means for determining (28) the normalized cell count as the sum of the logic "1"s for the logic bit-map for each field divided by the number of cells; means for counting (30) for each cell in each field the number of logic "1"s to produce the count for each cell; means for determining (32) bounds from the normalized cell count; and means (34 - 44) for reporting repeat frames when the count for all cells in the field are within the bounds. The apparatus as recited in claim 4 wherein the building means comprises: a video capture module (12) having the video signal as an input, the video capture module building from corresponding fields of consecutive frames the logic bit-map for each field of the video signal as an output, wherein the segmenting means comprises a segmentor (30) having the logic bit-map as an output and the plurality of cells as an output; and wherein the reporting means comprises a processor having the plurality of cells as an input and providing as an output a report of the repeated frames. The apparatus as recited in claim 7 wherein the video capture module comprises: a differencing circuit (14) having the video signal as an input, the differencing circuit differencing the pixels from the corresponding fields of the consecutive frames to provide as an output the absolute differences; a threshold generator (22) having the absolute differences as an input, the threshold generator determining from the absolute differences a ethreshold value as an output; and a comparator (24) having the absolute differences and the threshold values as inputs, the comparator inserting a logic "1' into the logic bit-map for each pixel where the absolute difference exceeds the threshold value. The apparatus as recited in claim 8 wherein the comparator comprises: a normalizer (28) having the logic bit-map as an input, the normalizer producing as an output the normalized cell count as the sum of the logic "1"s for the logic bit-map for each field divided by the number of cells; a segmentation counter (30) having the logic bit-map as an input, the segmentation counter counting for each cell in each field the number of logic "1"s to produce as an output the count for each cell; a limiter (32) having the normalized cell count as an input, the limiter determining bounds as outputs, the bounds being a function of the normalized cell count; and a report comparator (34 - 44) having the bounds and the count for each cell of the field as inputs, the report comparator providing as an output a flag indicating repeat frames when the count for all cells in the field are within the bounds.

Inventors: JANKO BOZIDAR, PATEL KAMALESH, JANKO, BOZIDAR, PATEL, KAMALESH
Applicants: TEKTRONIX INC, TEKTRONIX, INC.
Application year: 2000
Main classification: H04N7
IPC codes: H04N7