1. Field of the Invention
The present invention relates to an image processing apparatus that executes image processing involving resolution conversion, and a control method of the image processing apparatus.
2. Description of the Related Art
Conventionally, when forming and outputting an image, the following processing has been performed. Specifically, in this processing, as in spatial filtering, computation is performed using pixels in a neighborhood area of a pixel to be processed (hereinafter simply referred to as a “processing object pixel”) including the processing object pixel. Examples of the processing in which neighboring pixels are used include processing in which spatial filtering such as an edge emphasis process or blur processing is applied.
Japanese Patent No. 3733826 and Japanese Patent Laid-Open No. 2009-037348 disclose techniques in which digital image data is divided into rectangular regions (bands) and the processing in which neighboring pixels are used is performed in each of the rectangular regions.
Here, in contrast to a (main-scanning direction, sub-scanning direction) coordinate system of image data shown in FIG. 1A, as shown FIG. 1E, a (length direction, height direction) coordinate system is defined as a band area coordinate system, and the band size is represented by length×height. It should be noted that it is assumed that the sub-scanning direction crosses the main-scanning direction at right angles. Since an image is divided into strip-like bands, the length of the bands is either the length of the image data in the main-scanning direction or the length of the image data in the sub-scanning direction. On the other hand, the height of the bands can be an arbitrary value.
According to Japanese Patent No. 3733826, first, pixels in a first band are sequentially scanned one by one in the height direction of the band area, beginning from an upstream end in the main-scanning direction. This scanning operation is repeated in the main-scanning direction on a column-by-column basis to scan the whole band. When scanning of the band has been completed, scanning is repeated in the same manner in subsequent bands in the sub-scanning direction to scan the image data. In order to apply spatial filtering simultaneously with this scanning process, it is necessary to provide a delay memory in an upstream stage of a computation unit. When a reference area of a spatial filter with respect to one processing object pixel is set to [Fw×Fh], the capacity of the delay memory is an amount of (Fw−1) columns in a band. Here, it is assumed that an area [A×B] refers to a rectangular region having A pixels as its horizontal width (the length direction) and B pixels as its vertical width (the height direction). The delay memory used herein sequentially provides pixels in the [Fw×Fh] area to be referred to by the computation unit. In this case, one pixel is output each time one pixel is input (except in an end portion of the band), and the order in which pixels are output is the same as the scanning sequence (the order of input). Moreover, the capacity of the delay memory depends on the reference area of the filter and the band height.
According to Japanese Patent Laid-Open No. 2009-037348, first, a unit of scan consisting of two or more pixels that are contiguous in the length direction of a band area (hereinafter, a minimum scan width continuous in the length direction of a band area will be simply referred to as a unit of scan) is set. Pixels in the unit of scan are sequentially scanned one by one in the main-scanning direction. This scanning operation is repeated in the sub-scanning direction for as many times as the number of pixels of the height of the band, and furthermore, scanning is repeated downstream in the main-scanning direction in the same manner, thereby scanning a whole band. Then, subsequent bands in the sub-scanning direction are scanned to scan a whole set of image data. Thus, the number of times the delay memory is accessed per pixel is reduced. In order to apply common spatial filtering with this technique, it is necessary that a delay memory that is capable of storing (Fw−1) columns in a band be provided in an upstream stage of the computation unit, as is the case with Japanese Patent No. 3733826. This delay memory provides a [Fw×Fh] pixel area to the filter computation unit to output one pixel. At this time, one pixel is output each time one pixel is input (except in the end portion of the band), and the scanning sequence for output is the same as the scanning sequence for input.
In the following description, the number of pixels per unit of scan is set to Zw pixels in the length direction of the band. In this case, areas into which a single band is divided every Zw pixel columns are referred to as band columns. It should be noted that, when Zw=1, the scanning sequence is the same as that of Japanese Patent No. 3733826, and hereinbelow, the scanning method disclosed in Japanese Patent No. 3733826 and the scanning method disclosed in Japanese Patent Laid-Open No. 2009-037348 will be treated collectively assuming Zw is an integer of 1 or more.
Here, a resolution conversion method will be briefly described. A commonly known resolution conversion method is a method that uses interpolation computation. With this method, as in spatial filtering, pixel values of reference pixels located within an original image in the neighborhood of a processing object pixel are used. Enlargement processing (conversion to a higher resolution) that uses interpolation computation will be described using FIG. 2. In this diagram, solid lines 131 indicate boundaries of pixels of an image prior to enlargement, and broken lines 132 indicate boundaries of pixels of the image after enlargement. Moreover, an area 130 indicates a pixel to be processed. Each of zones “a”, “b”, “c”, “d”, and “e” indicates a single row in the original image, and each of zones “f”, “g”, “h”, “i”, and “j” indicates a single column in the original image.
For example, a bilinear interpolation method uses [2×2] reference pixels located in the neighborhood of the processing object pixel. That is to say, in order to calculate the pixel value of a processing object pixel 130-1, pixel values within a [2×2] area defined by the rows “b” and “c” and the columns “h” and “i” are referred to. On the other hand, in order to calculate the pixel value of a processing object pixel 130-2, the pixel values within the same [2×2] area defined by the rows “b” and “c” and the columns “h” and “i” as that in the case of the pixel 130-1 are referred to as well.
Moreover, in the case of a common bicubic interpolation method, in order to calculate the pixel values of the pixel 130-1 and the pixel 130-2, pixel values within a [4×4] area defined by the rows “a”-“d” and the columns “g”-“j” are referred to. As described above, in enlargement processing, there are cases where the same pixel area is referred to in order to perform computation of different processing object pixels.
Hereinbelow, an enlargement ratio and a reduction ratio in resolution conversion processing will be treated as scales. Here, a scale is a ratio in length. A scale of more than 1 indicates enlargement (an increase in resolution), and a scale of less than 1 indicates reduction (a decrease in resolution). For example, in the case of enlargement processing in which both of the scales in the length direction and the height direction are 2 (hereinafter simply referred to as resolution conversion processing with the scales of 2), [2×2] processing object pixels are calculated from the same reference area except in an end portion of the image.
When the aforementioned scanning method is applied to resolution conversion processing with the scales of 2 as described above, [2Zw×2] outputs are obtained for each input of Zw pixels. That is to say, if output pixels are output as they are in accordance with the order of input pixels, the number of pixels per unit of scan for output (the number of pixels to be successively output and arranged in the main-scanning direction) is twice the number of pixels per unit of scan for input. Similarly, in the case of reduction processing with the scales of ½, the number of pixels per unit of output scan is ½ times (when the number of pixels per unit of input scan is an even number). In this manner, the number of pixels per unit of output scan differs depending on the scales, and therefore even if the configuration disclosed in Japanese Patent No. 3733826 or Japanese Patent Laid-Open No. 2009-037348 is adopted, it is necessary to take the scales into consideration in constructing circuitry of a module in a downstream stage that handles pixel data after resolution conversion, and this has led to an increase in circuit size (because it is necessary to take the large values of the scales into consideration in providing a delay memory).
USPTO Backgrounds
USPTO Backgrounds