The invention relates to an apparatus and method for data processing, particularly to the apparatus and method can scale up or scale down digital data.
We have, in recent years, moved into a highly information-oriented era. The computer technology is developing and maturing rapidly, pushing digital technology into every aspect of human life. Digital format data are much easier to process than do analog format ones. For example, when image quality and size of a digitized image is not satisfied perhaps due to the limited capacity or functions of the image's fetching device, an image processing techniques can be used to scale up low resolution images or scale down high-resolution images.
When an image is too big or too small to be displayed or processed on the computer screen, scaling operation is required. An image in dot matrix format is composed of numerous pixels, just as an image on the screen is composed of numerous light dots. Numerous individual pixels of different colors together constitute a digital image. As the number of the pixels that constitutes a digital image is limited by the capacity of the image's acquisition device, scaling or rotating the image might alter the image's resolution, causing distortion. Generally, a digital image is scaled up or down by removing or adding pixels to the image in an even and uniform manner. However, simply adding or removing pixels similar to those in their neighborhood without further processing the image when performing image scaling, the output image will suffer rough edges (serrated edges) or eve deformational distortions.
A data processing apparatus used to scale a set of digital data is disclosed. The data processing apparatus comprises a ratio conversion module, and a scaling module. The ratio conversion module receives a ratio signal thereto generate a look-up table.
The scaling module connected to the ratio conversion module. The ratio conversion module generates a second set digital data based on the look-up table, and a first set digital data, by performing a digital scaling process.
A method for scaling a first set digital data according to the ratio signal is also provided. The method comprises receiving a ratio signal thereto generate a look-up table; receiving the first set digital data and then scaling according to the look-up table, and output a second set of digital data.
The advantages and features of the present invention will be better understood with the aid of the following detailed descriptions and illustrative figures.
The foregoing aspects and many of the attendant advantages of this invention will become more readily appreciated as the same becomes better understood by reference to the following detailed description, when taken in conjunction with the accompanying drawings, wherein:
An example of the preferred embodiments of the present invention is a data processing apparatus, used to receive a ratio signal and a first set digital data and, according to the ratio signal, perform scaling on the first set digital data.
Please refer to
The ratio signal 26 in
When the ratio signal 26 is received by the ratio conversion module 22, a look-up table will be generated according to this scaling ratio, as shown in
as the common difference and generates an arithmetic progression
Each item is then converted into a mixed fraction, wherein the proper fraction is a weighting ratio and integer portion is a sub-field number corresponding to a sub-field. The proper fractions of the all items of the arithmetic progression will be stored into sub-fields according to their field number, respectively.
the ratio conversion module 22, thereafter, generates an arithmetic progression, starting from 0, and a common difference
Hence, the arithmetic series is:
Each item is then converted into a mixed fractions series:
The integer portions “0, 2, 4 stand for sub-field numbers, and the proper fraction portions, 0, ⅓, ⅔ stand for the weighting ratios are then being stored into the sub-fields whose sub-field number corresponds to. For example, 0, ⅓, ⅔ are stored, respectively, into the sub-field of the sub-field number 0, 2 and 4. The remnant sub-fields of segment numbers are denoted with null to represent the sub-field numbers without an integer portion to correspond, as are shown in
Another embodiment is illustrates in
and an arithmetic progression starting from 0 and by taking the reciprocal of
as a common difference so that the arithmetic progression:
is generated. Converting each item of the arithmetic progression into mixed fraction, we thus obtain series:
Thereafter, the sub-field numbers generated thus include 0, 1, 2. The proper fractions represent weighting ratio, which include 0, 3/7, 6/7, 2/7, 5/7, 1/7, and 4/7. The proper fractions: 0, 3/7, 6/7 belong to sub-field number 0 and 2/7, 5/7 belong to sub-field number 1, and 1/7, and 4/7 belong to sub-field number 2 according to their integer portions. As shown in
The preceding description is the process in which the ratio conversion module 22 receives a ratio signal 26, identifies the scaling ratio, and generates a look-up table. When scaling up an image, it is very often that two consecutive sub-segments are synthesized according to various weighting ratios; therefore, the look-up table generated for image scaling up requires at least one weight ratios for each sub-field number. One thing is for sure, the ratio conversion module 22 will reserve required sub-fields according to the arithmetic progression. On the other hand, those empty sub-fields denoted by null means no integer portion to match the corresponding sub-field numbers. When scaling image, the scaling module 24 will ignore those sub-fields with null.
Please refer to
a look-up table is generated and stored in ratio conversion module 22, of which the process is described in
The scaling module 24 processes the image source 46 scaling according to the weight ratio in the corresponding sub-fields of the look-up table. An example is illustrating as follows: the quality of sub-segment 32a multiplied by
and the next sub-segment 34a multiplied by
are combined to obtain the sub-segment 48 in resulted digital image 47. Since the sub-field 34 (sub-field number 1) is null, the scaling ratio in the look-up table is thus skipped. Thereafter, the quality of sub-segment 36a multiplied by
and that of sub-segment 38a multiplied by
are combined to obtain the sub-segment 50 in the resulted digital image 47. Furthermore, the quality of sub-segment 40a multiplied by
and that of sub-segment 42a multiplied by
are combined to obtain the sub-segment 52 in resulted digital image 47. Aforementioned steps are repeatedly through all weight ratios in the look-up table and corresponding sub-segments in the digital image source 46, the resulted digital image 47 will be the original digital image 46 scaled by
in vertical direction thereof. Since each sub-segment in the output is the combination obtained from the neighboring sub-segments, no roughness or discontinuities are observed in the output image due to image scaling down.
Please refer to
a look-up table is generated and stored in ratio conversion module 22, of which the process is described in
sub-field 56 (sub-field number 1) are
and sub-field (sub-field number 2) 58 are
The remnant sub-segments are being denoted with null. Hence, scaling module 24 combines the sub-segments in digital image source 60 with the weight ratios in the corresponding look-up table, i.e. the quality of sub-segment 54a multiplied by
and that of sub-segment 56a multiplied by
are combined to obtain sub-segment 62 in the resulted digital image 61; the quality of sub-segment 54a multiplied by
and that of sub-segment 56a multiplied by
are combined to obtain the sub-segment 64 in resulted digital image 61; the quality of sub-segment 54a multiplied by
and that of sub-segment 56a multiplied by
are combined to obtain the sub-segment 66 in resulted digital image 61. All the sub-segments in digital image source 60 are combined by the rule as above, thus not intended to be repeated here. Using the same look-up table, perform the combination repeatedly on consecutive sub-segments of digital image source 60, the resulted output digital image 61 is the digital image 60 is scaled by 7/3 in vertical direction thereof. Since each sub-segment in the output is the combination obtained from the neighboring sub-segments, no roughness or discontinuities are observed in the output image during image scaling up.
Please refer to
it then obtains a arithmetical series
with the increment,
by taking the reciprocal of the scaling ratio, in which the proper fraction portion represents the weight ration while the integer portion stands for the sub-field number as mentioned before. The look-up table in
null. Hence, the scaling module 24 will combine the sub-segments in voiceprint 88 with the corresponding weight ratio in the look-up table, e.g. the quality of sub-segment 80a multiplied by
and that of sub-segment 82a multiplied by
are combined to obtain the sub-segment 80b in voiceprint 89; the quality of sub-segment 84a multiplied by
and that of sub-segment 86a multiplied by
are combined to obtain the sub-segment 84b in voiceprint 89. Using the same look-up table, perform the combinations as forgoing steps on consecutive segments of voiceprint 88, then the resulted output voiceprint 89 is the original voiceprint 88 multiplied by
in horizontal direction thereof. In addition, each sub-segment in the output is the combination obtained from the neighboring sub-segments, no roughness or discontinuities in the output voiceprint 89 will arise from condensation. On the other hand, supposed that the voiceprint shown in
According to the forgoing embodiments, in the case of image scaling down, scaling module 24 combines the corresponding sub-segments based on the consecutive sub-fields in the look-up table; the sub-segments after combination bear the same consecutive order. In the case of image scaling up, the scaling module 24 combines the corresponding sub-segments from left to right consecutively, based on the sub-segments in the look-up table; the sub-segments are arranged in successive order, thus the enlarged image is free of discontinuity to the naked eye. In the case of voiceprint shrinkage, since the digital sampling was used to obtain the sub-segments in clusters, an identical operation was used to shrink the voiceprint, i.e. change the pitch. Accordingly, the processes of the data processing apparatus according to the present invention is by receiving a ratio signal and a first set digital data, then generating a look-up table by identifying the scaling ratio according to the ratio signal. Thereafter, combining two consecutive sub-segments to produce a processed sub-segment with the corresponding weight ratios in the look-up table is performed. Finally, second set digital data is then outputted. The second set digital data, each is combined from the sub-segments in the first set digital data. Therefore, the processed image by the data processing apparatus in accordance with the present invention will not cause any roughness or discontinuity.
Please refer to
Step S90: Receiving a ratio signal and generating a look-up table accordingly.
Step S92: Receiving the first set digital data.
Step S94: performing combination of two consecutive sub-segments of the first set digital data into a sub-segment based on the look-up table.
Step S96: Outputting the second set digital data.
Comparing with known digital data scaling apparatus and methods, the data processing apparatus in the present invention perform the combination operations on two consecutive sub-segments of the first set digital data with the weighting ratio stored in the look-up table, in order to scale up or scale down the first set digital data, and improve the known technical defects dramatically.
Through the description in the above improved embodiment, it is hoped that the characteristics and essence of the present invention can be expressed clearer. However, the above descriptions are merely certain optimized embodiment cases, which are not intended to confine the embodiment of the present invention. That is to say the analogical alteration and modification are still under the coverage of the present invention.
Number | Date | Country | Kind |
---|---|---|---|
93112466 | May 2004 | TW | national |