1. Field of Invention
The invention relates to an image processing apparatus and an image processing method, and more particularly to an apparatus capable of detecting a scrolling direction of an image and a method of the same.
2. Related Art
On a computer or a television screen, a frame often scrolls, for example, up and down. In order to achieve the frame scrolling effect, a field corresponding to a display range of the screen moves instead of moving the displayed image picture, such that the observer can feel that the picture is scrolling.
Consequently, the conventional frame scrolling effect is achieved by moving the visible field, and the observer observes the flame is scrolling in a direction opposite to the moving direction of the visible field. The program designer may sometimes need to detect the image scrolling direction for the purpose of other image processing steps, such as an image scaling step.
In view of the foregoing, the invention is to provide an image processing apparatus and an image processing method of extracting a characteristic value of a scrolling image and detecting a scrolling direction of an image.
To achieve the above, an image scrolling detection apparatus of the invention includes an extracting module and a decision module. In the invention, the extracting module is used for catching a start address (SA) of a visible field and generating a first characteristic signal according to the start address. The decision module is used for receiving a plurality of continuous characteristic signals and generating a decision signal according to the characteristic signals. The decision signal identifies a scrolling direction of an image.
In addition, the invention also discloses a method for detecting image scrolling, which includes the following steps of: catching a start address (SA) of a visible field; generating a first characteristic signal according to the SA; storing a first characteristic value of the first characteristic signal; generating a second characteristic signal according to the SA caught after the visible field moves; generating a decision signal according to the first characteristic signal and the second characteristic signal; storing a second characteristic value of the second characteristic signal to replace the first characteristic value of the first characteristic signal; and waiting for the visible field to move.
As mentioned above, the apparatus and method of detecting a scrolling detection of an image according to the invention generate a characteristic signal according to a start position of a visible field, store a plurality of characteristic signals after the visible field moves so as to generate a characteristic difference and a characteristic difference absolute value, and generate a decision signal according to the characteristic difference and the characteristic difference absolute value. As a result, the decision signal is capable of identifying a scrolling direction of the image
The invention will become more fully understood from the detailed description given herein below illustration only, and thus is not limitative of the present invention, and wherein:
The present invention will be apparent from the following detailed description, which proceeds with reference to the accompanying drawings, wherein the same references relate to the same elements. The invention discloses an image processing apparatus and an image processing method of extracting a characteristic value of a scrolling image and detecting a scrolling direction of an image.
The extracting module 22 catches a start address (SA) of a visible field and generates a first characteristic signal 32 by corresponding the start address to a line number according to the start address. The storing module 26 receives the first characteristic signal 32 and stores a first characteristic value therein. After the visible field moves, the extracting module 22 catches the SA of the visible field again, and generates a second characteristic signal 34 in the same manner. The computing module 28 receives the second characteristic signal 34 to obtain a second characteristic value, generates a characteristic difference 36 by subtracting the first characteristic value from the second characteristic value based on the first characteristic value in the storing module 26, and further takes an absolute value of the characteristic difference 36 to generate a characteristic difference absolute value 38. After generating the characteristic difference 36 and the characteristic difference absolute value 38, the computing module 28 stores the second characteristic value back to the storing module 26 as a reference in the next computation.
When the visible field moves later, the extracting module 22 catches the SA of the visible field again, and generates a third characteristic signal in the same manner. The computing module 28 receives the third characteristic signal to obtain a third characteristic value, generates a characteristic difference- by subtracting the second characteristic value from the third characteristic value based on the second characteristic value in the storing module 26, and further takes an absolute value of the characteristic difference to generate a characteristic difference absolute value. After generating the characteristic difference and the characteristic difference absolute value, the computing module 28 stores the third characteristic value back to the storing module 26 as a reference in the next computation.
The above-mentioned operation of generating the characteristic difference and the characteristic difference absolute value is a one-cycle operation, which is triggered as long as the visible field moves. In addition, the characteristic value after the current movement is compared with that at the previous movement, such that the moving direction of the visible field is ensured, and the scrolling direction of the frame is obtained.
On the other hand, the judging module 30 receives the characteristic difference 36 and the characteristic difference absolute value 38, and generates a decision signal 40 according to the characteristic difference 36 and the characteristic difference absolute value 38. When the characteristic difference 36 is greater than zero, the characteristic difference absolute value 38 is smaller than a characteristic offset, and the characteristic difference absolute value 38 is smaller than a previously visible height, an up-scrolling decision signal is generated. When the characteristic difference 36 is smaller than zero, the characteristic difference absolute value 38 is smaller than the characteristic offset, and the characteristic difference absolute value 38 is smaller than a currently visible height, a down-scrolling decision signal is generated.
The apparatus of the invention for detecting the scrolling direction of the image generates the first characteristic signal 32 by corresponding the SA of the visible field 10 to the line number, generates the second characteristic signal 34 again in the same manner after the visible field 10 moves, and further generates the characteristic difference and the characteristic difference absolute value according to the first characteristic value and the second characteristic value. Then, the judging module 30 receives the characteristic difference and the characteristic difference absolute value, judges the scrolling direction of the image, and outputs the decision signal 40.
In addition, another precise condition is that the characteristic difference absolute value 38 is smaller than a previously visible height. This condition is set in order to prevent another situation from occurring.
Step S90 catches a start address of a visible field.
Step S92 generates a first characteristic signal according to the start address.
Step S94 stores a first characteristic value of the first characteristic signal.
Step S96 catches the start address after the visible field moves and generates a second characteristic signal.
Step S98 generates a decision signal according to the first characteristic signal and the second characteristic signal.
Step S100 stores a second characteristic value to replace the first characteristic value.
Step S102 waits for the visible field to move.
Herein, the step S102 is a waiting state. If the visible field moves, the step 96 is performed; otherwise, if the visible field does not move, the procedure holds at the step 102.
Step S982 generates a characteristic difference by subtracting the first characteristic value from the second characteristic value, and takes an absolute value of the characteristic difference to generate a characteristic difference absolute value.
Step S984 generates an up-scrolling decision signal when the characteristic difference is greater than zero, the characteristic difference absolute value is smaller than a characteristic offset and the characteristic difference absolute value is smaller than a previously visible height.
Step S986 generates a down-scrolling decision signal when the characteristic difference is smaller than zero, the characteristic difference absolute value is smaller than the characteristic offset and the characteristic difference absolute value is smaller than a currently visible height.
Differing from the prior art technology of implementing the frame scrolling effect, the invention converts the start address of the visible field into the characteristic value and judges the scrolling direction of the frame according to the characteristic value. These are two technological features of the invention.
While the invention has been described by way of an example and in terms of a preferred embodiment, it is to be understood that the invention is not limited to the disclosed embodiment. To the contrary, it is intended to cover various modifications. Therefore, the scope of the appended claims should be accorded the broadest interpretation so as to encompass all such modifications.
Number | Date | Country | Kind |
---|---|---|---|
094117124 | May 2005 | TW | national |