(a). Field of the Invention
The present invention relates to a method and an apparatus for sampling digital image, more particularly, to a method and an apparatus for down-scaling a digital image.
(b). Description of the Prior Arts
In the digital image system, the conversion of video format is accomplished by changing the corresponding sampling frequency for the digital image. For instance, the process for up-scaling 800×600 pixels of the image frame to 1024×768 pixels of the image frame. Such kind of process can also be referred as “up-sampling” or “up-scaling”. On the other hand, the process for down-scaling 1024×768 pixels of the image frame to 800×600 pixels of the image frame is referred as “down-sampling” or “down-scaling”.
The conventional methods for down-scaling an image frame are skip-through and interpolation. The skip-through method is an image frame adopting directly the m ost neighboring pixel of the down-scaling point in the original image frame. Yet, the interpolation method, which can be a liner interpolation or other kinds of polynomial interpolation, is an image frame adopting the intermediate value calculated using the neighboring pixels of the down-scaling point in the original image frame.
Generally speaking, the interpolation method, though will still cause an image blurring problem, can acquire a more accurate image compared with the skip-through method. Nevertheless, the interpolation method is implemented via an addition and multiplication operation of more than two original image pixels. Therefore, it is very costly to realize since it is necessary to store at least twice the original image pixels. In addition, the implementation of the circuits of the adder and the multiplier is costly as well. Please refer to
The hardware structure for realizing the skip-through method is very simple. Please refer to
Since the conventional methods are adopted for down-scaling, some original image information is due to lost. Under the circumstance, the object of down-scaling is to retain sufficient vital information for displaying. Accordingly, an extremely accurate interpolation is neither necessary nor meaningful to the users. In addition, a simple interpolation (½ accuracy) without multiplier sacrificing the quality of image is still in demand of a complex hardware structure to implement. Moreover, even worse that the down-scaled image using the skip-through method is unacceptable because the significant information might be lost. Therefore, the object of the present invention is to use the skip-through method for down-scaling and still retains sufficient vital image information with an accuracy equivalent to the simple interpolation (½ accuracy).
In view of the aforementioned drawbacks, the present invention is to provide a method and an apparatus which can down-scale a digital image via processing a series of images following a time sequence.
Another object of the present invention is to provide a mechanism that can preserve the original image data after down-scaling.
Yet another object of the present invention is to provide a method and an apparatus having the same realization cost as the skip-through method, but still having sufficient image data for recognition.
Yet another object of the present invention is to provide a method and an apparatus having the effect of simple interpolation with ½ accuracy.
Every conventional down-scaling method only considers the application for a single image frame, and never before considers the application for a series of continuous image frames. In the present invention, if an image frame A is succeeded by an image frame B, the image information skipped during down-scaling of the image frame A using the skip-through method will reappearing in the image frame B, that is, the complete image is still available for the user to recognize, and needs only to add an initial offset mechanism for achieving the down-scaling effect.
For the image composed of texts, the more original image information preserved during down-scaling, the better recognition can be achieved. Down-scaling using interpolation can cause image blurring which is not good for text recognition, on the other hand, the present invention can preserve more original image information which is more advantageous to text recognition compared with the down-scaled image using interpolation. Besides the original image, text recognition can benefit from less information switching between image frames A and B by using an initial offset setting.
For the graphic image, the method of the present invention can accomplish the effect of simple interpolation by setting an initial offset through utilizing the effect of persistence of vision.
In order to achieve the foregoing object, the device for down-scaling a digital image according to the present invention comprises: a FIFO-type data buffer and a down-scaling control circuit. The FIFO-type data buffer stores the pixels after down-scaling so as to overcome the asynchronous read/write problem in a real-time system. The down-scaling control circuit is used to decide whether the current inputting pixels should be written into the FIFO-type data buffer to act as the resulting output image of down-scaling. Thus, the present invention can utilize the persistence of vision via a selection of pixels from different position within a series of continuous images to achieve the object for down-scaling a digital image.
Other and further features, advantages and benefits of the invention will become apparent in the following description taken in conjunction with the following drawings. It is to be understood that the foregoing general description and following detailed description are exemplary and explanatory but are not to be restrictive of the invention. The accompanying drawings are incorporated in and constitute a part of this application and, together with the description, serve to explain the principles of the invention in general terms. Like numerals refer to like parts throughout the disclosure.
The objects, spirits and advantages of the preferred embodiments of the present invention will be readily understood by the accompanying drawings and detailed descriptions, wherein:
Offset1=(M/N)−1 of the present invention.
Offset1=¾ of the present invention.
The following embodiments will illustrate the apparatus and the method for down-scaling the continuous digital images of the present invention in detail.
As show in
As seen in
The input signals HR and VR of N bits are used to set up the horizontal and vertical down-scaling ratio of the present device. For instance, if N equals to 4, and an operation is proceeded to down-scale an image frame from 20×9 to 16×8, then the horizontal and vertical down-scaling ratio respectively are 5/4 and 9/8; when using the binary system to represent the decimal part of the down-scaling ratio, then HR=¼*24=[0100], VR=⅛*24=[0010].
The function of the 3-terminal AND gate 71 is to perform an AND logical operation on the selection signal NCR and the IDEN signal so as to output an WE signal needed for storing image data IDATA into the data buffer 41. Wherein the selection signal NCR is generated by the horizontal pixel selector 73 and the horizontal line selector 74, while the IDEN signal is inputted from outside. If the NCR outputted from the horizontal pixel selector 73 is equal to 0 (low), then the pixel data is skipped. That is, the pixel data will not be written into the data buffer 41. If the NCR outputted from the horizontal line selector 74 is equal to 0 (low), then the horizontal line is skipped. That is, the whole horizontal line will not be written into the data buffer 41. One embodiment of the odd/even frame decision unit 72 is a D-type flip-flop as shown in
The structure/architecture of the horizontal pixel selector 73 is similar to the horizontal line selector 74 with reference to
The concept for sampling the digital image by using the digital image down-scaling apparatus 40 of the present invention can be briefly demonstrated by
In view of the foregoing outcome, it is conceived that image is composed of continuous image frames and can be treated as interlacing odd image frames and even image frames. According to the concept of a digital image down-scaling apparatus 40 oft he present invention, the process to down-scale M pixels on the vertical or horizontal coordinate of a digital image to N pixels (wherein M, N are positive integers, and N<M<2N) is as following:
For the even image frame, the ideal down-scaling positions are M/N*X+Offset0, where X is an increasing sequence of integers between 0 and N−1, that is, the outcome of down-scaling the even image frame is the composition of N pixels located at the integer coordinate of M/N*X+Offset0 out of the original M pixels.
For the odd image frame, the ideal down-scaling positions are M/N*X+Offset1, where X is an increasing sequence of integers between 0 and N-1, that is, the outcome of down-scaling the even image frame is the composition of N pixels located at the integer coordinate of M/N*X+Offset1 out of the original M pixels.
The continuous output images are composed of the outcomes of down-scaled even image frames and odd image frames. Therefore, every pixels of the original image are preserved in the continuous output images that, through the persistence of vision, the overall graphic information of the original image frame can be displayed.
The mechanism using the coefficients Offset0 and Offset1 of the initial offset accumulator 91 can have different design according to different purpose. The two designing concepts of the present invention are: (1) minimizing image frame variations, and (2) approaching the effect of simple interpolation with ½ accuracy.
The object of minimizing image frame variations is to enable the continuous output images to have as many identical output points as possible, so that the output down-scaled image will be more stable and clear. Consequently, for user's sake, the texts within the image are easier for recognition. To fulfill this object, the difference between Offset0 and Offset1 should be equal to the residue of M/N, that is, |Offset1−Offset0|=(M/N)−1. Please refer to
Another object for approaching the effect of simple interpolation with ½ accuracy is accomplished basing on the persistence of vision for continuous images, which can be considered as averaging a series of images forming a time sequence so as to achieve the effect of the simple interpolation with ½ accuracy. The design of the object can have better effect of proportion for the graphic image. Using the setting Offset0=¼, Offset1=¾ to down-scale 1024 pixels to 800 pixels can have the effect similar to the effect of simple interpolation with ½ accuracy with reference to
Although the present invention has been described with reference to the preferred embodiment thereof, it will be understood that the invention is not limited to the details thereof. Various substitutions and modifications have suggested in the foregoing description, and other will occur to those of ordinary skill in the art. Therefore, all such substitutions and modifications are intended to be embraced within the scope of the invention as defined in the appended claim.
| Number | Date | Country | Kind |
|---|---|---|---|
| 91115760 | Nov 2002 | TW | national |