1. Field of the Invention
The present invention relates to an image process technology, and more particularly, to motion detection methods of a threshold value used for dynamically adjusting, and related apparatuses.
2. Description of the Prior Art
Motion detection is very important for many image processing calculations. Typically, the motion detection can be divided into two categories, i.e. field motion detection and frame motion detection. Taking the field motion detection as an example, the prior art typically detects the pixel difference between a target field and a neighboring field, and compares the detected pixel difference with a fixed threshold value, to determine whether the field has field motion phenomenon.
However, there are many differences between image data at different time points in time domain. Thus, using the fixed threshold value to perform the motion detection for the image data at different time points usually causes detection errors. In addition, the amount of noise of the image data also affects the accuracy of the motion detection. Because the results of the motion detection seriously influence the efficiency of the following image processing operations (e.g., de-interlacing), it is a necessary to increase the accuracy and the reliability of the motion detection.
It is an objective of the claimed invention to provide methods and related apparatuses for the motion detection to solve the above-mentioned problems.
According to one embodiment of the claimed invention, a method for motion detection is disclosed. The method comprises: detecting at least one field to generate a plurality of statistical values; determining at least one threshold value according to the plurality of statistical values; and performing motion detection on pixel positions of a subsequent field according to the determined threshold value.
According to one embodiment of the claimed invention, a motion detection apparatus comprises: a detection module for performing detection on at least one field to generate a plurality of statistical values; a decision unit, coupled to the detection module, for determining at least one threshold value according to the plurality of statistical values; and a motion detection module, coupled to the decision unit, for performing motion detection on pixel positions of a subsequent field according to the threshold value determined by the decision unit.
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.
Different characteristics of the present invention are described with the accompanying figures, and similar components are labeled with the same notation in the figures. Please note that motion detection apparatuses and related methods disclosed in various embodiments of the present invention are applicable to many image processing operations such as motion adaptive de-interlacing, motion compensation de-interlacing, Y/C separation, false color suppression, and noise reduction. Additionally, in practice, the term “pixel value” in related descriptions of the claimed invention can be utilized for representing pixel luminance, pixel chrominance, or any other value capable of being utilized for motion detection, while the term “pixel position” covers a wide range, and can be utilized for defining a position of an existing pixel or a position of a pixel having a pixel value to be generated through interpolation.
Please refer to
The images at adjacent time points in time domain are usually similar to each other. Therefore, the motion detection apparatus 100 utilizes the detection module 102 to detect one or more fields, and further utilizes the decision unit 104 to analyze detection results from the detection module 102, in order to dynamically adjust a threshold value utilized for performing motion detection on a subsequent frame by the motion detection module 106. In other words, the motion detection apparatus 100 can adaptively adjust the threshold value utilized for motion detection to increase the accuracy of the motion detection.
In Step 210, the detection module 102 receives an image signal such as a video signal, and detects at least one field of the image signal to generate a plurality of statistical values. In practice, the number of statistical values generated by the detection module 102 can be determined according to system design considerations, and is not limited to utilizing a specific number.
In Step 220, the decision unit 104 determines at least one threshold value according to the plurality of statistical values.
And in Step 230, the motion detection module 106 performs the motion detection on pixel positions of a subsequent field according to the threshold value determined by the decision unit 104. In practice, the motion detection performed by the motion detection module 106 can be the field motion detection, the frame motion detection, or both.
In the first embodiment, in Step 210, the detection module 102 utilizes the motion value calculator 110 to calculate a motion value of each pixel position within a target field, in order to generate a plurality of first motion values. When performing the field motion detection or the frame motion detection on a specific pixel position, a pixel difference between the fields or a pixel difference between the frames regarding the specific pixel position is calculated first, so as to be a motion value of the specific pixel position. Then, the motion value is compared with the predetermined threshold value to determine whether the specific pixel position has field motion or the frame motion. In this embodiment, the methods for calculating each first motion value by motion value calculator 110 are substantially the same as the above-mentioned methods for calculating the motion value of the specific pixel position, and therefore, the detailed illustration is omitted for brevity.
The comparing unit 122 in the statistical unit 120 respectively compares the plurality of first motion values with the plurality of predetermined values to correspondingly generate a plurality of decision values.
Then, the calculator 124 in the statistical unit 120 calculates the number of pixel positions of the target field with the decision value 1 as a first statistical value SMP, and calculates the number of pixel positions of the target field with the decision value 2 or the decision value 3 as a second statistical value LMP. In addition, the calculator 124 calculates the degree of pixel value variation as a third statistical value VL. In practice, the degree of the pixel value variance of the target field can be measured by the change rate, standardized change rate, variance, coefficient of variance CV, or other statistical values of the pixel values of the target field.
In this embodiment, in Step 220, the decision unit 104 sets the threshold value utilized for performing the motion detection of the subsequent field by the motion detection module 106 according to the statistical values SMP, LMP, and VL generated from the statistical unit 120. For example, if the sum of the statistical values SMP and LMP is greater than a first threshold value th_1, the statistical value SMP is greater than a second threshold value th_2 (or greater than the statistical value LMP), and the statistical value VL is greater than a third threshold value th_3, the decision unit 104 determines that the target field has many noises, and increases the threshold value utilized for performing the motion detection on the subsequent field by the motion detection module 106 or directly sets the threshold value as a greater value, to decrease the probability of misjudgments due to the noise.
Additionally, if the statistical values SMP, LMP, and VL do not satisfy the aforementioned conditions, the decision unit 104 can set the threshold value utilized by the motion detection module 106 according to the magnitude of the first statistical value SMP. When the first statistical value SMP becomes smaller, the target field has fewer noises (i.e., the image signal of the target field is clearer). Therefore, the decision unit 104 decreases or sets the threshold value utilized by the motion detection module 106 as a smaller value.
In a second embodiment, in Step 210, the calculator 124 further calculates a fourth statistical value FDS_C.
In this embodiment, in Step 220, the decision unit 104 also decides the threshold value utilized by the motion detection module 106 according to the fourth statistical value FDS_C. For example, the statistical values SMP, LMP, and VL do not satisfy the three conditions comprising: the sum of SMP and LMP is greater than th_1; SMP is greater than th_2; and VL is greater than th_3. In this situation, if the fourth statistical value FDS_C is greater than a fourth threshold value th_4, the decision unit 104 sets the threshold value utilized by the motion detection module 106 as a smaller value, to make it possible for the motion detection module to detect all the pixel position with image motion in the central region of the target field 400. In addition, if the fourth statistical value FDS_C is less than or equal to the fourth threshold value th_4, the decision unit 104 sets the threshold value utilized by the motion detection module 106 according to the magnitude of the first statistical value SMP.
In a third embodiment, the calculator 124 also calculates the sum of the first motion values corresponding to all the pixel positions in the target field, or calculates the number of the pixel positions with decision value 3 within the target field 400, as the fifth statistical value FDS. In this embodiment, only when the fourth statistical value FDS_C reaches a predetermined ratio of the fifth statistical value FDS, the fourth statistical value FDS_C is involved in considerations for operations performed by the decision unit 104.
In a fourth embodiment, the calculator 124 also calculates the sum of the plurality of decision values which is outputted from the comparing unit 122 and corresponding to the target field as a sixth statistical value TMSum, and calculates the sum of decision values having the value 2 or the value 3 within the plurality of decision values as a seventh statistical value LMSum. As mentioned above, the decision unit 104 sets the threshold value used by the motion detection module 106 according to the first statistical value SMP. In this embodiment, the decision unit 104 can also determine whether the image of the target field is a zooming image or a slow motion image according to the sixth statistical value TMSum and the seventh statistical value LMSum. Furthermore, if the seventh statistical value LMSum reaches a specific ratio of the sixth statistical value TMSum, the decision unit 104 determines the target field as the zooming image or the slow motion image. At this situation, the decision unit 104 decreases the aforementioned threshold value determined according the first statistical value SMP, to increase the probability that the pixel positions within the target field are determined to have image motion.
In practice, the detection module 102 can also detect the number of the pixel positions corresponding to high frequency components in the target field, so the decision unit 104 may tune the threshold value determined from the above embodiment(s) according to the number of pixel positions. For example, in a fifth embodiment, the pattern detector 130 in the detection module 102 performs pattern detection on all the pixel positions of the target field. And the calculator 124 in the statistical unit 120 calculates the number of the pixel positions corresponding to specific pattern(s) determined by the pattern detector 130 as an eighth statistical value MHP. There are many methods for performing the pattern detection on a specific pixel position. For example, Sobel mask (i.e. Sobel filter) or Laplace mask (i.e. Laplace filter) can be utilized for detecting the edge pattern of the specific pixel position. Other methods for detecting image patterns at specific pixel positions can also be applied to the pattern detector 130 of this embodiment. In this embodiment, the pattern detector 130 is capable of determining whether a pixel position corresponds to a certain image pattern such as a horizontal edge pattern or a mess pattern, so the calculator 124 may calculate the number of pixel positions corresponding to the horizontal edge pattern or the mess pattern in the target field, and the number of pixel position is regarded as the eighth statistical value MHP.
The greater the eighth statistical value MHP, the more pixel positions correspond to high frequency components. The decision unit 104 can slightly increase the threshold value determined by the method according to the previous embodiment, to decrease the probability of misjudgment made by the motion detection module 106. On the contrary, in the case that the eighth statistical value MHP is smaller, the decision unit 104 can slightly decrease the threshold value determined by the method according to the previous embodiment.
In the previous embodiment, the comparing unit 122 of the statistical unit 120 compares the received motion values and the plurality of predetermined threshold values (i.e. the predetermined threshold values th_a, th_b, and th_c in this embodiment,) to correspondingly generate decision values, respectively. In one embodiment, as shown in
In Step 230, the motion detection module 106 performs the motion detection on the pixel positions of the subsequent field of the target field according to the threshold value determined by the decision unit 104. In the embodiment shown in
In practice, the functional blocks of the motion detection apparatus 100 can be implemented by utilizing individual circuit components. In addition, a portion or all of the functional blocks of the motion detection module 100 can also be integrated into a single chip. For example, the structure and the operation method of the motion value calculator 150 are quite similar to those of the motion value calculator 110 of the detection module 102, where the only difference between them is that the processed image signals correspond to difference time points. Therefore, in practice, the motion value calculator 150 and the motion value calculator 110 can be implemented by utilizing the same circuit to save hardware costs.
Please refer to
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.
Number | Date | Country | Kind |
---|---|---|---|
095142446 | Nov 2006 | TW | national |