|Publication number||US7835595 B2|
|Application number||US 11/652,534|
|Publication date||Nov 16, 2010|
|Priority date||Aug 23, 2006|
|Also published as||US20080050044|
|Publication number||11652534, 652534, US 7835595 B2, US 7835595B2, US-B2-7835595, US7835595 B2, US7835595B2|
|Inventors||Hui-Fen Chia, Ying-Yuan Tang|
|Original Assignee||Princton Technology Corporation|
|Export Citation||BiBTeX, EndNote, RefMan|
|Patent Citations (6), Classifications (8), Legal Events (2)|
|External Links: USPTO, USPTO Assignment, Espacenet|
1. Field of the Invention
The invention relates to image processing, and in particular, to an image processing system and method for scaling or resolution of an image.
2. Description of the Related Art
Image and display systems often require image resolution to be scaled up or down to meet various requirements. Images (pixels) resolution may be scaled upward from low resolution to high resolution. Images may also be scaled down when the original resolution is higher than the desired display resolution. When an original image is displayed in a different resolution to form a new image, the changed resolution causes the pixel value of each pixel point in a newly formed image to be formed by more pixel values of original pixel points in the original image with specific theoretical combination ratios applied thereto.
For example, if a pixel value of pixel point NA′ in the new image is formed by two pixel values of original pixel points NA and NB respectively in the original image, the pixel value of pixel point NA′ may be theoretically the summation of ⅔ the pixel value for pixel point NA and ⅓ the pixel value for pixel point NB or of half the pixel value summation of both pixel points NA and NB.
A common technique used to scale image resolution is linear interpolation. The linear interpolation utilizes pixel value of each pixel point needed for the new pixel point and its related theoretical combination ratio to generate the new pixel value of a pixel point in the new image resolution. As shown in
where the numbers 300 and 200 in formula (1) indicate theoretical combination ratios RA and RB for pixel values PA and PB forming the pixel value PA′, respectively. In addition, it can be observed from formula (1) to (3) that each theoretical combination ratio for the pixel value of pixel point NA, NB, NC, ND, or NE depends on the resolution used. In this example, each theoretical combination ratio is not exceeding 300 (i.e. the target resolution) and each denominator in the formula is 500 (i.e. the original resolution).
Scaling an image up or down directly by linear interpolation requires several multiplication and division operations, thus requiring hardware design with sufficient bit number of multipliers and dividers to perform the necessary operations. Typically, as the bit number of multiplier or divider increases, hardware cost and complexity increase accordingly. In this example, if the image is scaled from a resolution with 500 points to another resolution with 300 points, at least nine bits of multiplier/divider in the hardware are required to complete the operations.
Once the image is enlarged or becomes a two- or more dimension image, the bit number of multiplier/divider needed for hardware is also increased relatively. Accordingly, hardware costs and the time for operation increase.
Thus, a method and system for scaling image resolution with reduced hardware cost and operating time are desired.
An exemplary embodiment of a system for scaling an image from an original resolution to a target resolution is provided, wherein a pixel value PT of a target pixel point NT in the target resolution is theoretically composed of original pixel values P1-PK of original pixel points N1-NK in the original resolution, and K is a positive integer larger than 1. The system comprises a microcontroller, a memory, a table index generator and a scaler. The microcontroller generates a look-up table according to the original resolution, wherein the look-up table provides a conversion rule from a value to an integer not larger than 2n, and n is an integer. The memory provides the original pixel values P1-PK. The table index generator obtains from the look-up table corresponding weights W1-WK according to theoretical combination ratios R1-RK corresponding to the original pixel points N1-NK, wherein each of the corresponding weights W1-WK is an integer between 1 and 2n. The scaler generates the pixel value PT of the target pixel point NT according to the original pixel values P1-PK and the corresponding weights W1-WK. The microcontroller generates the theoretical combination ratios R1-RK.
The invention also provides an image processing method for scaling an image from an original resolution to a target resolution, wherein a pixel value PT of a target pixel point NT in the target resolution is theoretically composed of original pixel values P1-PK Of original pixel points N1-NK in the original resolution, and K is a positive integer larger than 1. First, theoretical combination ratios R1-RK corresponding to the original pixel points N1-NK are found. Then, the theoretical combination ratios R1-RK are converted to corresponding weights W1-WK, wherein each of the corresponding weights W1-WK is an integer between 1 and 2n, n is an integer, and the sum of the corresponding weights W1-WK is 2n. The original pixel values P1-PK are calculated with the corresponding weights W1-WK by using the scaler to generate the pixel value PT of the target pixel point NT and complete the image processing.
The invention can be more fully understood by reading the subsequent detailed description and examples with reference to the accompanying drawings, wherein:
The following description is of the best-contemplated mode of carrying out the invention. This description is made for the purpose of illustrating the general principles of the invention and should not be taken in a limiting sense. The scope of the invention is best determined by reference to the appended claims.
The invention provides a method and system to convert the theoretical combination ratios R1-RK corresponding to original pixel points N1-NK originally used by linear interpolation to smaller values using a digital processor or a microcontroller such that the aforementioned operations can be completed by a smaller bit number of multiplier/dividers. According to the invention, if the bit number of multiplier is an integer n, the combination ratios will be changed from a value, such as several hundreds, to a small integer between 1 and 2n by checking a table, such that the factors of the multiplication/division operations performed to the combination ratios are reduced from a large range to a small range. Reduced bit number of multipliers and no requirement for a divider reduce hardware cost and simplify related operations.
The look-up table T provides a conversion rule from a reference value to an integer not larger than 2n. To do this, for example, the look-up table T is divided into several table fields, in which a table field CX represents the Xth table field on the table T, and X represents its related field order. For example, the table field C1 represents the 1st table field on the table T and its related field order is set to one, the table field C2 represents the 2nd table field on the table T and its related field order is set to two and so on. In other words, the value of a specific field order X can be derived from the table field CX on the table T. In addition, each table field CX on the table T has a reference value UX, and bigger field order X gets bigger reference value. For example, if the table fields C1 and C2 have reference values U1 and U2 respectively, the reference value U2 should be bigger than the reference value U1 due to the related field order of table field C2 is bigger than that of table field C1. The range for the field order X of the table field CX depends on bit number n of multiplier utilized while the range for the reference value UX depends on original resolution.
The table index generator 230 generates table indices based on table T for looking up and finding a table field on table T according to a specific theoretical combination ratio RK. The table index generator 230 also stores memory addresses of the pixel values P1-PK so as to obtain a specific pixel value PK from the memory 220. The related field order of the found table field is set to a corresponding weight WK corresponding to the specific theoretical combination ratio RK. The scaler 240 comprises at least one n bit number of multiplier (not shown), performing the multiplication operations to generate the pixel value PT of the target pixel point NT in new resolution (target resolution) after scaling. The scaler 240 generates new pixel value PT of the target pixel point NT in new resolution to scale the image according to the original pixel values P1-PK and corresponding weights W1-WK corresponding to original pixel points N1-NK that form the target pixel point NT. Using the scaling system 200 of the invention, scaling between different image resolutions can be achieved so as to further drive a display (not shown) to display the scaled image and complete the image processing.
An original resolution Q before image scaling and a new resolution P to be scaled are provided to the scaling system 200. Microcontroller 210 receives the original resolution Q and generates a look-up table which has a number of table fields, each having a related reference value.
As shown in
Moreover, reference value U16 of largest table field C16 is set to the maximum possible value, 500 (i.e. original resolution Q) and reference value U1 of the smallest table field C1 is set to the minimum possible value. These reference values are used as a range when checking the look-up table T.
For example, as shown in
It should be noted that, in this embodiment, reference values within the table fields are arranged from smallest to largest, thus comparing and finding a reference value closest to the theoretical combination ratio RK entails finding the smallest reference value that exceeds or equals the theoretical combination ratio RK and field order of the table field related to the smallest reference value is the weight WK corresponding to the theoretical combination ratio RK. Nevertheless, the comparison for theoretical combination ratios R1-RK to find the corresponding weights W1-WK therefore may be obtained by other manners in some embodiments, such as by half-adjust rounding or rounding off method. For example, the corresponding weight WK is determined to be the field order of a first table field or the field order of a second table field using a half-adjust rounding or a rounding off method when the theoretical combination ratio RK is between a first reference value within the first table field and a second reference value within the second first table field.
In addition, if a target pixel value PT of a target pixel point NT in target resolution is theoretically composed of original pixel values P1-PK of original pixel points N1-NK in original resolution and k is an integer larger than 1, the corresponding weight WK can be obtained, without checking the look-up table, by the following in order to hold the sum of the corresponding weights W1-WK to be 2n:
where the Wi represents the corresponding weights W1-WK-1 obtained by checking the look-up table.
W B=16−W A=16−10=6
Formula (1) can be represented by formula (4) as:
As shown in formula (4), pixel value PA′ of pixel point NA′ can be determined using a 4 bit multiplier (i.e. bit number of multiplier is 4) and the division by 16 can be replaced by shifting right the result of (10×PA+6×PB) by four bits. Therefore, the pixel value PA′ of pixel point NA′ can be obtained without having a divider in the hardware.
Similarly, the pixel value PB′ of pixel point NB′ can be determined according to the remaining part of pixel value PB (i.e. 100) of original pixel point NB and pixel value PC of original pixel point NC. Formula (2) shows that:
By checking the look-up table T, since 100 is between U3 (94) and U4 (125), the weight WB corresponding to the pixel point NB is found to be 4. In the same way, the weight WC corresponding to the pixel point NC is found to be 10 which is the same as weight WA. Therefore, the weight WD corresponding to the pixel point ND can be determined by following formula:
W D=16−W B −W C=16−4−10=2
Formula (2) can be represented by formula (5) as:
where PD is the pixel value of pixel point ND. As shown in formula (5), pixel value PB′ of pixel point NB′ can also be determined using a 4 bit multiplier as previously discussed. Using the previously discussed operation, the formula (3) can be represented by formula (6) as:
Again, pixel value PC′ of pixel point NC′ can also be determined using a 4 bit multiplier as previously discussed. It should be noted that when a target pixel value PT of a target pixel point NT is theoretically composed of pixel values P1-PK of original pixel points N1-NK, the operations will be simplified by ignoring theoretical combination ratios less than a predetermined value. The theoretical combination ratio RK corresponding to a pixel point NK indicates a ratio for pixel value PK of the pixel point NK to form the target pixel value PT of the target pixel point NT, so the theoretical combination ratio RK can be ignored or its related weight set to zero if the theoretical combination ratio RK is less than a predetermined value. In this case, the pixel point next to the pixel point NK related to the ignored theoretical combination ratio RK is used to find the corresponding weight WK by checking the look-up table for simplification of the operations. According to the scaling method of the invention, a theoretical combination ratio RK corresponding to an original pixel point NK is first compared to a predetermined value before it is checked in the look-up table. When the theoretical combination ratio RK is less than the predetermined value, the theoretical combination ratio RK can be ignored or its related weight WK set to zero. This theoretical combination ratio RK can be added into theoretical combination ratio corresponding to the original pixel point next to the original pixel point NK for checking in the table.
For example, it is assumed that the predetermined value is 16 and the pixel value PD′ of target pixel point ND′ can be determined by:
In this example, when checking the table, the theoretical combination ratio corresponding to the pixel point NB is only 10 which is less than the predetermined value 16. Thus, the theoretical combination ratio 10 for pixel point NB is ignored and added into the theoretical combination ratio corresponding to next pixel point NC (300) so that the new theoretical combination ratio corresponding to pixel point NC becomes 310. Then, this theoretical combination ratio 310 corresponding to pixel point NC is used to check the table. By doing so, the formula (7) can be represented as:
In sum, if a pixel value PT of a target pixel point NT in a target resolution P is theoretically composed of original pixel values P1-PK of original pixel points N1-NK in an original resolution Q with related theoretical combination ratios R1-RK respectively, the pixel value PT of the target pixel point NT can be obtained from:
Where Ri is an integer between 1 and P. Using the method of the invention, the formula (9) can be converted to:
wherein each of the corresponding weights W1-WK is an integer between 1 and 2n and the sum of the corresponding weights W1-WK is 2n.
The invention provides a method using only n bit of multiplier to reduce the bit number of multiplier and remove the divider for operation such that hardware cost and complexity are significantly reduced. In addition, the value of bit number n can be adjusted properly to gain a better performance for the related operations. These benefits will be better observed especially when the image to be scaled is a two- or more dimensional image.
The operations in formula (11), require at least two 9 bits of multipliers/dividers in the hardware. Moreover, these operations are time consuming.
In this example, if a 4 bit of multiplier is used, the factor for operation is to be 2n, that is, 16. For a two-dimensional image, each pixel point has horizontal and vertical coordinates. Therefore, a weight corresponding to such pixel point comprises a horizontal weight related to the horizontal coordinate and a vertical weight related to the vertical coordinate. To find the weights corresponding to theoretical combination ratios corresponding to the pixel points in a two-dimensional image, one look-up table for the horizontal coordinate and one look-up table for vertical coordinate are utilized, from which the corresponding weights can be found. For example, the weight WA corresponding to the theoretical combination ratio RA corresponding to pixel point NA can be represented as IX×IY using the look-up tables, wherein IX represents the horizontal weight and IY represents the vertical weight corresponding to the theoretical combination ratio RA and both are integers between 1 and 2n. Once the weight WA is determined, the weight WB, WC and WD corresponding to the theoretical combination ratios RB, RC and RD corresponding to pixel points NB, NC and ND can also be determined by the following:
W B=(16−I X)×I Y ,W C=(16−I X)×I Y ,W D =I X×(16−I Y),
Thus, formula (11) can be represented as:
From formula (11), original 300×300 operations by 9 bit of multiplier are simplified using IX×IY operations by 4 bit of multiplier and the operation for divided by 500×500 also replaced by a operation for shifting the result generated by multiplier right by 8 bit, reducing not only the amount but the time needed for operations.
Although in the embodiment according to the invention the image is downscaled, it is to be understood that the invention can also be used for up-scaling in other embodiments.
For example, if pixel value PB′ of the original pixel point NB′ is to be obtained and theoretical combination ratio RA′ corresponding to the original pixel point NA is 200 which is known from formula (2)′, the weight corresponding to the theoretical combination ratio RA′ is set to 11 by checking the look-up table T (
Similarly, by converting the theoretical combination ratios corresponding to the pixel values PA′, PC′, PD′ and PE′ to integers between 1 and 16 using aforementioned method and rules, pixel values PA′, PC′, PD′ and PE′ of pixel points NA′, NC′, ND′ and NE′ can also be obtained as shown in
While the invention has been described by way of example and in terms of preferred embodiment, it is to be understood that the invention is not limited thereto. To the contrary, it is intended to cover various modifications and similar arrangements (as would be apparent to the skilled in the art). Therefore, the scope of the appended claims should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements.
|Cited Patent||Filing date||Publication date||Applicant||Title|
|US6259427||Apr 23, 1999||Jul 10, 2001||Silicon Image, Inc.||Scaling multi-dimensional signals using variable weighting factors|
|US7062077 *||Oct 25, 2000||Jun 13, 2006||Helena Laboratories Corporation||Scanner densitometer and data evaluation method|
|US20040052432 *||Mar 24, 2003||Mar 18, 2004||Samsung Electronics Co., Ltd.||Method for scaling a digital image in an embedded system|
|US20050210087 *||Jul 15, 2004||Sep 22, 2005||Via Technologies, Inc.||Apparatus and method for scaling digital data information|
|US20060078227 *||Sep 15, 2005||Apr 13, 2006||Yi-Shu Chang||Method and apparatus for scaling image block|
|TW244027B||Title not available|
|U.S. Classification||382/299, 382/298, 345/3.4, 345/3.3|
|International Classification||G06K9/32, G09G5/00|
|Jan 12, 2007||AS||Assignment|
Owner name: PRINCETON TECHNOLOGY CORPORATION, TAIWAN
Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:CHIA, HUI-FEN;TANG, YING-YUAN;REEL/FRAME:018793/0674
Effective date: 20061201
|May 15, 2014||FPAY||Fee payment|
Year of fee payment: 4