The present invention relates to an image processing technique, and more particularly, to an apparatus for dynamically detecting an image interlaced in a field, and a method thereof.
Image interlaced in a film (referred to as “interlaced image” herein), such as a news ticker or staff list scrolling across the screen at the end of a movie, must be distinguished from the film before decoding because the processing method for the interlaced image and the processing method for the film directly are different. One of the common techniques to process the interlaced image is interpolation.
After the interlaced image is distinguished and identified from the input film, it is processed separately; for example, the interpolation method is performed on the interlaced image simultaneously while a film process is performed on the other part of the input film. If an area of the interlaced image is incorrectly determined so that the interlaced image is processed by the film process and the input film is processed by the interpolation process, a sawtooth-effect or noise will occur in the decoding result thereby the picture quality is degraded with a great amount. Decoding performance of the input film is therefore highly related to the determining accuracy of where the interlaced image is located. The conventional interlaced-image detection device 100, however, can only detect interlaced images on a fixed location because the detection mechanism mentioned above is fixed. That is, if the location or area of the interlaced image changes over time (such as a news sticker running from the bottom right corner to the bottom left corner of a TV screen), the conventional interlaced-image detection device 100 is not able to detect this interlaced image correctly.
One objective of the present invention is therefore to provide an apparatus for dynamically detecting interlaced images in a film, and a method thereof, to overcome the above problems. The apparatus of the present invention can trace the moving direction of the interlaced image, and dynamically adjust the detection mechanism utilized to determine the area of the interlaced image according to the moving direction. Simple and efficient interlaced-image detection is therefore achieved.
According to an exemplary embodiment of the present invention, an apparatus for detecting an interlaced image is disclosed. The apparatus includes an interlaced image detection module and a buffering unit coupled to the interlaced image detection module. In the interlaced image detection module, a motion detector first detects motion values of an input field, and a film mode detector then detects film mode information of the input field according to the motion values. A mixed mode detector of the interlaced image detection module detects the interlaced image of the input field according to the motion values to generate a detection result, and selectively stores the detection result into the buffering unit according to the film mode information. Information of an interlaced image in a following input field is determined according to the detection result stored in the buffering unit and the film mode information.
According to another exemplary embodiment of the present invention, a method of detecting an interlaced image is disclosed. The method includes detecting motion values of a first input field, detecting a film mode information of the first input field according to the motion values, detecting the interlaced image of the first input field according to the motion values to generate a detection result, and selectively buffering the detection result according to the film mode information.
These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings.
Certain terms are used throughout the description and following claims to refer to particular components. As one skilled in the art will appreciate, manufacturers may refer to a component by different names. This document does not intend to distinguish between components that differ in name but not function. In the following description and in the claims, the terms “include” and “comprise” are used in an open-ended fashion, and thus should be interpreted to mean “include, but not limited to . . . ”. Also, the term “couple” is intended to mean either an indirect or direct electrical connection. Accordingly, if one device is coupled to another device, that connection may be through a direct electrical connection, or through an indirect electrical connection via other devices and connections.
Please refer to
Meanwhile, the motion values detected by the motion detector 310 are also delivered to the film mode detector 330 for detecting film mode information of the input field. The detected film mode information, such as a 3:2 pull-down mode or a 2:2 pull-down mode, is delivered to the mixed mode detector 320, which selectively stores detected information of the interlaced image into the buffering unit 340 according to the film mode information. Based on the detected information stored in the buffering unit 340 and the film mode information, the mixed range detector 350 can dynamically determine information of an interlaced image in another input field that the mixed mode detector 320 may be unable to detect.
In order to specifically explain the above operations, an example of a 3:2 pull-down video data sequence is shown in
The motion detector 310 is a frame motion detector in this embodiment. Therefore, the interlaced image in field A3 can be detected by the motion detector 310 when field A1 is compared to field A3, but the interlaced image in field A2 cannot be detected by the motion detector 310 when field A2 is compared to field B1. This is because the fields A1 and A3 belong to the same film frame, and the motion values detected by comparing the field A1 with the field A3 must correspond to the interlaced image in the field A3. The fields A2 and B1, however, belong to different film frames, and the motion values detected by comparing the field A2 with the field B1 are composed of motion values resulting from the different film frame and motion values resulting from the interlaced images. It is hard to obtain information of interlaced image from the motion values of fields A2 and B1. Therefore, only when the film mode information indicates that input fields processed by the motion detector 310 correspond to an identical field of a film frame (for example, fields A1 and A3, and fields C1 and C3) will the detection results of the mixed mode detector 320 be stored into the buffering unit 340.
Based on the information stored in the buffering unit 340 and the film mode information provided by the film mode detector 330, the mixed range detector 350 determines moving directions and positions of the interlaced images. In one embodiment, the mixed range detector 350 detects sequence information of the input fields (for example, field A3 is the third field in the input sequence, field C3 is the eighth field in the input sequence) according to the film mode information, then equally divides the position difference of the interlaced images in fields A3 and C3 by five (since there are five fields between the fields A3 and C3) to predict the locations of the interlaced images in fields B1-C2. This tendency can also be applied to predict the locations of the interlaced images in following fields (fields D1 and D2, etc.). In another embodiment, the mixed range detector 350 simply sets the locations of the interlaced images in fields B1-C2 by the detected location of the interlaced image in field A3. In this way, the calculation complexity is reduced while the detection accuracy of the apparatus 300 is slightly sacrificed.
The mixed range detector 350 can further transmit the information of the interlaced image to the mixed mode detector 320 to help the mixed mode detector 320 detect the interlaced image in following input fields. The tracing of the moving interlaced image is accomplished in the mixed mode detector 320, and the output of the mixed mode detector 320 is an adjusted information of the interlaced image in each field.
Please note that the frame motion detection method is only one example of the present invention. In another embodiment, field motion detection is implemented in the motion detector 310. Please refer to
Moreover, the accuracy of interlaced image detection can be further improved by adopting both frame motion detection and field motion detection.
The 3:2 pull-down mode is only an example and not a limitation of the present invention. The apparatus 300 or 600 can also be implemented to dynamically detect an interlaced image in a 2:2 pull-down film. Since a person skilled in the art can easily appreciate this modification, further description is omitted here for brevity.
By using the detection mechanism disclosed above, a moving interlaced image can be detected more accurately than in the prior art. Therefore, a better decoding performance of the film is obtained with the added advantages of simplicity and low cost.
Those skilled in the art will readily observe that numerous modifications and alterations of the device and method may be made while retaining the teachings of the invention.