1. Field of the Invention
The present invention relates to an image processing apparatus and image processing method, and particularly relates to an image processing apparatus and image processing method that are able to convert the resolution of an inputted image from low resolution to high resolution, and output the resulting image.
2. Description of the Related Art
When printing an image, which was acquired from a scanning device such as a scanner at low resolution, at high resolution, it is necessary to convert the resolution of the image from low resolution to high resolution. Moreover, when transferring an image over a network at low resolution in order to reduce the network load, and then displaying or printing that image at high resolution, it is necessary to perform resolution conversion in order to convert the image from low resolution to high resolution.
In the past, many methods have been proposed as methods for converting the resolution of an image that was inputted at low resolution to high resolution. As an interpolation method that is often used when performing resolution conversion on a multi-gradation image, there is a nearest neighbor interpolation method that sets the signal value of the nearest dot from the interpolation point for which interpolation is to be performed as is as the signal value for the interpolation point. Moreover, there is a bi-linear interpolation method that sets the signal value of the interpolation point by a linear equation based on the signal value of a 2×2 pixel (4-pixel) dot around the interpolation point. Furthermore, there is a bi-cubic interpolation method that sets the signal value for the interpolation point by using a cubic polynomial equation from 4×4 pixels (16 pixels) around the interpolation point.
However, when performing resolution conversion using the above conventional methods, there are the following disadvantages. In the case of the nearest neighbor interpolation method, the algorithm is simple and it is possible to perform processing at high speed, however, as the enlargement rate becomes higher, degraded image quality such as mosaic shaped patterns near the edge sections, or jaggy edges in shaded sections can be seen. Moreover, in the bi-linear interpolation method or the bi-cubic interpolation method, which sets the interpolation point based on the signal values of a plurality of surrounding pixels, the degradation of the image quality such as jaggy edges when compared with the nearest neighbor interpolation method is reduced, however, by averaging the signal values of a plurality of points, the image is smoothed. Therefore, in portions where a sharp image is desired such as edge sections of an image or text, blurring of the image stands out.
In Japanese Patent Laid-Open No. H07-105359(1995), a method is disclosed in which sharp edges are reproduced based on linear interpolation information and edge information according to the size of the edges. However, in this method, resolution conversion is performed based on the size of the edge sections, so in a case where the size of the edges is small, such as in a scanned image, there is a problem in that it is difficult to restore the edges as sharp edges.
In Japanese Patent Laid-Open No. H06-227048(1994), a method is disclosed in which smoothing is performed using pattern matching on outline sections. However, in this method, it is necessary to have a large number of patterns to be used in the pattern matching, so there is a problem in that because of using a pattern having little gradation in order to suppress the memory load, the image after resolution conversion is generated using little gradation.
The object of the present invention is to provide an image processing apparatus and image processing method that are capable of reducing jaggy edges and blurred images that occur when performing resolution conversion from a low-resolution image to a high-resolution image.
The present invention is made to solve the problems described above. The image processing apparatus of the present invention is provided with: a storage unit that associates and stores a signal value pattern of a high-resolution image and a signal value pattern of a low-resolution image that has been converted to low resolution from the high-resolution image; an acquisition unit that, according to a result of matching a signal value pattern of an inputted image with the signal value pattern of the low-resolution image, acquires the signal value pattern of the high-resolution image that is associated with the signal value pattern of the low-resolution image from the storage unit; and a setting unit that, using the signal value pattern that was acquired by the acquisition unit, sets signal values of an image after high-resolution conversion of the inputted image.
With the present invention, it is possible to provide an image processing apparatus and image processing method that are capable of reducing jaggy edges and blurred images that occur when performing resolution conversion from a low-resolution image to a high-resolution image.
Further features of the present invention will become apparent from the following description of exemplary embodiments (with reference to the attached drawings).
In the following, embodiments of the present invention will be explained in detail with reference to the drawings. However, the component elements described in the embodiments are only examples, and the scope of the invention is not limited by these.
Referring to
A low-resolution image data input unit 101 is an input unit for inputting low-resolution image data that will be the object of the resolution conversion process. The low-resolution image data that is inputted by the low-resolution image data input unit 101 is sent to a signal value acquisition unit 102.
A signal value acquisition unit 102 acquires the signal values of respective pixels of the image having N x M pixels in the received low-resolution image as a signal value pattern (N and M are arbitrary natural numbers). More specifically, when performing resolution converting from a low-resolution image to a high-resolution image, the signal value acquisition unit 102 acquires signal values of N x M pixels that surround the pixel of interest that requires interpolation, as the signal value pattern. The signal value pattern acquired by the signal value acquisition unit 102 is sent to a pattern matching unit 103.
The pattern matching unit 103 searches a low/high-resolution pattern association storage unit 104 for a signal value pattern that coincides with the received signal value pattern or a signal value matching pattern that has the same signal value pattern. Then, taking the obtained signal value matching pattern to be a pattern for which the resolution is increased i times in the horizontal direction and j times in the vertical direction, the pattern matching unit 103 acquires from the low/high-resolution pattern association storage unit 104 a multi-gradation signal value substitution pattern that is associated with that signal value matching pattern. In other words, the pattern matching unit 103 acquires a signal value substitution pattern corresponding to the enlargement rate of the resolution conversion.
Here, the signal value substitution pattern is a pattern that expresses signal values for respective pixels of the high-resolution image having a predetermined area. The signal value matching pattern is a pattern that expresses the signal values for respective pixels of a low-resolution image having N×M pixels that were down sampled by 1/i times in the horizontal direction and 1/j times the vertical direction of the high-resolution image having the predetermined area. Signal value substitution patterns and signal value matching patterns before and after down sampling by a plurality of different enlargement rates are associated and stored in the low/high-resolution pattern association storage unit 104. For example, a plurality of signal value substitution patterns having different resolutions are associated with one signal value matching pattern and stored.
The signal value of the pixel of interest in the signal value substitution pattern that was acquired by the pattern matching unit 103 is sent to a signal value substitution unit 105. The signal value substitution unit 105 substitutes the signal value of the pixel requiring interpolation for converting the resolution from the low-resolution image to the high-resolution image with the received signal value. In other words, the signal value substitution unit 105 uses the signal value substitution pattern that was acquired by the pattern matching unit 103 and sets the signal values of the image after the resolution of the inputted image has been converted to high resolution.
The substitution process above is performed for all of the pixels that require interpolation for resolution conversion, and high-resolution image data that has been converted to the resolution that has been increased i times in the horizontal direction and j times in the vertical direction is outputted from a high-resolution image data output unit 106.
As described above, first, a signal value pattern (signal value substitution pattern) of a high-resolution image and a signal value pattern (signal value matching pattern) of a low-resolution image that was obtained by converting the high-resolution image to the low-resolution image are associated and stored in the low/high-resolution pattern association storage unit 104. Then, when converting the inputted image to high resolution, a signal value matching pattern that coincides with or is the same as a signal value pattern of an image in a predetermined area in the inputted image is searched for in the low/high-resolution pattern association storage unit 104. Then by using a signal value substitution pattern that is associated with the signal value matching pattern that was obtained from the search, the signal values for a high-resolution image after resolution conversion are set.
In this way, an interpolation method such as nearest neighbor interpolation, bi-linear interpolation, bi-cubic interpolation or the like is not used for the interpolation process in the conversion process to a high-resolution image, so the image degradation that results due to these methods does not occur. In other words, with the processing of this embodiment, it is possible to reduce jaggedness or blurring that occurs when performing the resolution conversion from a low-resolution image to a high-resolution image.
A high-resolution image data input unit 401 is an input unit to which a high-resolution image is inputted. A down-sampling processing unit 402 performs down sampling of the resolution of the image inputted from the high-resolution image data input unit 401 to a resolution that is 1/i times in the horizontal direction and 1/j times in the vertical direction. Moreover, the down-sampling process is repeated multiple times using a plurality of different magnification rates for one inputted image.
A low-resolution signal value pattern acquisition unit 403 acquires signal values for N×M pixels acquired from the low-resolution image that was acquired by the down-sampling process, as a signal value matching pattern. The size of the signal value matching pattern acquired is arbitrary, however, by acquiring a large sized signal value matching pattern, it is possible to consider a larger area when performing the resolution conversion described later. When taking into consideration the effect in a case where the size is increased, the specifications of the CPU, and the like, a size of 2×2 pixels or 4×4 pixels is adequate for the size of a signal value matching pattern.
Moreover, a high-resolution signal value pattern acquisition unit 404 acquires signal values of pixels in a predetermined area of the high-resolution image that was inputted from the high-resolution image data input unit 401 as a signal value substitution pattern. The coordinates of the pixels from which the signal value substitution pattern was acquired are set so that they include all of the pixels that correspond to the pixels from which the signal value matching pattern was acquired by the low-resolution signal value pattern acquisition unit 403. The pixel size of the signal value matching pattern is N×M, however, the pixel size of the signal value substitution pattern is (iN−(i−1))×(jM−(j−1)).
A signal value pattern integration unit 405 associates the plurality of signal value matching patterns and signal value substitution patterns that were acquired by the acquisition units 403 and 404 with each other, then writes and stores the patterns in the low/high-resolution pattern association storage unit 104.
By using the image acquired from a high-resolution scanner or the like for example as the high-resolution image to be used when creating a pattern, it is possible to create a learning pattern in which MTF (Modulation Transfer Function) characteristics of the apparatus when resolution conversion was performed are taken into consideration. By using the pattern that takes into consideration the MTF characteristics of the apparatus, in addition to resolution conversion of an image from a low-resolution scanner, it becomes possible to take into consideration the network load and the like when converting a down sampled image to an image having the same image quality as that acquired by a high-resolution scanner.
Moreover,
In order to acquire as many combinations of signal value patterns as possible, combinations of signal value patterns from inside many images are acquired and written in the low/high-resolution pattern association storage unit 104. In a case where there is a combination of signal value matching patterns having the same signal values, the average of the signal value substitution patterns is found and written.
In this embodiment, first, a signal value pattern (N×M) that was acquired by the signal value acquisition unit 102 is inputted from an input unit 301. An acquired signal value difference calculation unit 302 calculates the differences in the signal values of the respective pixels of the inputted signal value pattern. In
An acquired signal value difference branch processing unit 303 performs branch processing based on the values calculated by the acquired signal value difference calculation unit 302 and a preset threshold value. In this embodiment, the threshold value is not limited, however, a difference of about ±8 is used as the threshold value. In a case where the acquired signal value difference branch processing unit 303 determines that the difference between signal values is greater than the threshold value, the signal value pattern that was inputted from the input unit 301 is sent to a signal value search unit 304 in order to perform the pattern matching process.
The signal value search unit 304 searches the low/high-resolution pattern association storage unit 104 for and acquires a signal value substitution pattern that is associated with a signal value matching pattern that coincides with the received signal value pattern. Determining that the received signal value pattern matches a signal value matching pattern is not just when the patterns completely coincide, but can also include the case when the difference in signal values is within a predetermined threshold value. The signal value search unit 304 sends the acquired signal value substitution pattern to an interested pixel signal value calculation unit 305.
The interested pixel signal value calculation unit 305 uses the coordinates acquired by the interested pixel coordinate acquisition unit 202, and outputs the signal values of respective pixels of interest in the received signal value substitution pattern from an output unit 307.
In the acquired signal value difference branch processing unit 303, in a case where it is determined that the difference between signal values is less than the preset threshold value, the inputted signal value pattern is an image of ground or the like, so it is determined that it is not necessary to perform detailed resolution conversion, and pattern matching is not performed. Therefore, the acquired signal value pattern is sent to an acquired signal value averaging unit 306.
The acquired signal value averaging unit 306 calculates the average of the signal values of the pixels of the received signal value pattern that surround the pixel of interest, and outputs the calculation result from the output unit 307 as the signal value of the pixel of interest. Here, instead of the averaging process by the acquired signal value averaging unit 306, it is also possible to perform an up-sampling process such as zeroth order interpolation (nearest neighbor method), bi-linear interpolation (bi-linear method) or cubic convolution interpolation (cubic method).
The signal value of the pixel of interest outputted by the pattern matching unit 103 is used as a signal value for substitution in the signal value substitution unit 105.
In this way, with processing illustrated in
In order to perform the interpolation of the pixels indicated by A1 to A5 as pixels of interest, the signal values of the pixels (2×2 pixels=4 pixels) having known signal values that exist around the pixels of interest are acquired as illustrated in
In the pattern matching unit 103, the matching process is performed using the low/high-resolution pattern association storage unit 104. As illustrated in
As illustrated in
In this way, the signal values other than those of known signal value coordinates are substituted with the signal values extracted from the signal value substitution pattern. Moreover, other signal values (at least part of the signal values) are used as signal values of the image after high-resolution conversion of the signal values of the input image. By substituting only the signal values other than those of the known signal value coordinates with the signal values that were extracted from the signal value substitution pattern, it is possible to improve the processing speed. It is also possible to perform processing of interpolating the known signal values as well by extracting signal values of all of the pixels of the signal value substitution pattern illustrated in
By performing the process explained with reference to
The hardware configuration described above for the image-processing apparatus is only one example, and is not limited to this. For example, the configuration can further include a communication unit for inputting/outputting image data, or a hard disc for storing various data.
By performing signal value pattern matching based on the inclination of signal values introduced in this embodiment as described above, it becomes possible to use apparatus MTF characteristics that were taken into consideration when creating matching patterns, and perform more detailed resolution conversion.
In the first embodiment, a method of performing detailed resolution conversion by acquiring one N x M signal value matching pattern from inside a low-resolution image and using pattern matching to perform substitution with an associated high-resolution signal value substitution pattern was explained. By using an N×M pattern size, resolution conversion is possible that takes into consideration a wide range of signal value information, however, instead, the number of stored matching patterns increases, and the capacity of the low/high-resolution pattern association storage unit 104 increases.
Moreover, pattern matching that is used in interpolation can be performed only once, however, depending on the pattern used, there is a possibility that a large signal value difference will occur between neighboring coordinates, especially it is possible to see a zigzag like pattern on the edges. Therefore, in a second embodiment, a configuration is explained wherein under the condition that the size of the matching pattern is made narrower, and the capacity of the low/high-resolution pattern unit 104 is reduced, in addition to the same effects, the edge sections are changed to smooth signal values, and it is possible to achieve more natural image formation.
In this embodiment, an example of processing for performing resolution conversion by a different configuration than in the first embodiment illustrated in
When the pixel coordinates of interest are (X, Y)=(even number, even number), the signal values of five pixels that include the pixel of interest and the pixels above, below, to the left and right are acquired in the step indicated by reference number 205. Two kinds of signal value patterns having 3×1 pixels (3 pixels) are formed in the step indicated by reference number 206 from the acquired signal values of the 5 pixels, and the patterns are outputted from an output unit 204.
When the pixel coordinates of interest are (X, Y)=(odd number, even number), the signal values of four pixels on the left and right of the pixel of interest are acquired in the step indicated by reference number 207. Two kinds of signal value patterns having 3×1 pixels (3 pixels) are formed in the step indicated by reference number 208 from the acquired signal values of the 4 pixels, and the patterns are outputted from the output unit 204.
When the pixel coordinates of interest are (X, Y)=(even number, odd number), the signal values of four pixels above and below the pixel of interest are acquired in the step indicated by reference number 209. Two kinds of signal value patterns having 3×1 pixels (3 pixels) are formed in the step indicated by reference number 210 from the acquired signal values of the 4 pixels, and the patterns are outputted from the output unit 204.
When the pixel coordinates of interest are (X, Y)=(odd number, odd number), the signal values of eight pixels that diagonally surround the pixel of interest are acquired in the step indicated by reference number 211. Four kinds of signal value patterns having 3×1 pixels (3 pixels) are formed in the step indicated by reference number 212 from the acquired signal values of the 8 pixels, and the patterns are outputted from the output unit 204.
The combinations of multiple kinds of patterns illustrated here are not limiting, and for example, in the case of
The multiple signal value patterns that are outputted from the multiple signal value acquisition unit 107 are sent to the multiple pattern matching unit 109. The multiple pattern matching unit 109 uses the multiple received signal value patterns to search for a signal value matching pattern, and sends the associated multiple signal value substitution patterns to the interested signal value calculation unit 108.
In the interested signal value calculation unit 109, signal values that correspond to the respective pixels of interest are extracted from the multiple inputted signal value substitution patterns, and the average is then calculated and sent to the signal value substitution unit 105 as interested pixel signal values. The signal value substitution unit 105 substitutes the signal values of the pixels that are object of interpolation with the signal values of the pixels of interest received from the interested signal value calculation unit 108. In other words, in this embodiment, multiple signal value substitution patterns are used in order to set the signal value of one pixel in a high-resolution image.
By performing the processing from that of the signal value acquisition unit 107 to that of the signal value substitution unit 105 for all pixels for which resolution conversion is performed using the method described above, the result is outputted from the high-resolution image data output unit 106 as high-resolution image data.
Moreover, in this embodiment, the size of the signal value matching pattern was illustrated as 3×1 pixels (3 pixels), however, as illustrated in
In
In
In
In
The plurality of kinds of pattern combinations illustrated here are not limiting, and for example, instead of the four types of signal value patterns in the case in
Pattern matching is performed using the acquired multiple N×M signal value patterns. By performing matching by N×M sized patterns such as 2×2 pixels (4 pixels), the number of patterns increases, however, in resolution conversion, recovery is possible that has smoother image quality.
As described above, the reason for acquiring multiple matching patterns, and performing matching multiple times is because the size of the patterns is made smaller in order to reduce memory resources. When a multi-gradation pattern is maintained at a large size, there are an enormous number of patterns, so in this embodiment, a reduction in memory resources is performed by making the pattern size small. However, by making the pattern size small, signal values over a wide range are not taken into consideration, and it is not possible to perform detailed resolution conversion, however, by performing matching with sliding the matching pattern, virtually the same effect is obtained as when performing pattern matching using a large pattern.
Moreover, by performing matching multiple times using multiple patterns, it is also possible to reduce a zigzag like pattern on the edge sections, which is a concern of performing pattern matching one time, and thus more natural edge recovery is achieved.
In the first embodiment and the second embodiment, methods were explained in which detailed resolution conversion is performed by acquiring N x M signal value matching patterns from inside a low-resolution image for all of the pixels in the image, and using the pattern matching to perform substitution with an associated high-resolution signal value substitution pattern. However, locations where image degradation easily occurs when performing resolution conversion is limited to text sections or edge sections, and in locations where there is a low need for detailed recovery such as where the signal values change gently, there is no need to perform detailed recovery with this method. Therefore, in this third embodiment, a configuration is explained wherein attributes of the image are determined before performing resolution conversion, and the method used for resolution conversion is changed according to the attributes, thus making it possible to reduce the processing time.
The image area determination unit 111 acquires on a pixel basis attributes of pixels of interest in an image that was inputted from the low-resolution image data input unit 101, and determines according to the acquired attributes whether or not it is necessary to perform detailed recovery using resolution conversion. In a case where the input image is an image wherein the signal values suddenly change, such as in text sections or edge sections, the image area determination unit 111 determines that the detailed recovery using resolution conversion is necessary. In other words, the image area determination unit 111, according to the difference in signal values of pixels inside the inputted image, determines whether or not the detailed recovery using resolution conversion is necessary. Whether or not there are sudden changes in signal values in the image may be determined by whether or not the difference in the maximum signal value and minimum signal value inside the inputted image exceeds a predetermined value.
In a case where it is determined that the detailed recovery of the inputted image is necessary, the image area determination unit 111 sends the surrounding signal values around the pixel of interest to the signal value acquisition unit 102. The signal values surrounding the pixel of interest are acquired, matching is performed by the pattern matching unit 103, the signal value of the pixel of interest is calculated, and the result is sent to the signal value substitution unit 105.
In a case where it is determined that the detailed recovery of the inputted image is not necessary (in other words, the signal values of the pixels change gently), the image area determination unit 111 sends the signal values of the inputted image to the up-sampling unit 110.
The up-sampling unit 110 calculates the signal value of the pixel of interest after up-sampling by an interpolation method such as nearest neighbor interpolation or bi-linear interpolation that have a low processing load, or bi-cubic interpolation or the like, and sends the result to the signal value substitution unit 105.
With this third embodiment, it is possible to selectively perform resolution conversion according to the image attributes when performing the resolution conversion of an inputted image from low resolution to high resolution. Moreover, for locations inside the image where the signal values change gently and do not need the detailed recovery, an interpolation method that has little processing load is used, so it is possible to also reduce the processing time. Furthermore, in this embodiment, as in the first embodiment of resolution conversion using pattern matching, an example of the pattern matching unit 103 performing pattern matching one time was given. However, as in the second embodiment, it is also possible to respectively change the signal value acquisition unit 102 and pattern matching unit 103 to a multiple signal value acquisition unit 107 and multiple pattern matching unit 109, and add an interested signal value calculation unit in order to perform resolution conversion by performing matching multiple times.
Aspects of the present invention can also be realized by a computer of a system or apparatus (or devices such as a CPU or MPU) that reads out and executes a program recorded on a memory device to perform the functions of the above-described embodiments, and by a method, the steps of which are performed by a computer of a system or apparatus by, for example, reading out and executing a program recorded on a memory device to perform the functions of the above-described embodiments. For this purpose, the program is provided to the computer, for example via a network or from a recording medium of various types serving as the memory device (e.g., computer-readable medium).
While the present invention has been described with reference to exemplary embodiments, it is to be understood that the invention is not limited to the disclosed exemplary embodiments. The scope of the following claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.
This application claims the benefit of Japanese Patent Application No. 2011-249586, filed Nov. 15, 2011, which is hereby incorporated by reference herein in its entirety.
Number | Date | Country | Kind |
---|---|---|---|
2011-249586 | Nov 2011 | JP | national |