Field of the Invention
The present invention relates to an image processing apparatus, an image processing method, and a non-transitory computer readable storage medium.
Description of the Related Art
In an image capturing apparatus such as a digital camera, when shooting a video or when displaying a live viewing image, it is desirable to reduce the size of pixels in an image signal and perform development processing as early as possible in the processing. The object is to reduce the scale of the development circuit and to suppress power consumption to a low level. The reduction processing at this time can be performed during readout by summing/thinning out pixels on an image sensor, or otherwise subsequently with the development circuit. Also, in the case in which the image size for video recording in full HD, QFHD or the like is different from the pixel size read out from the image sensor, enlargement or reduction of the size of pixels in the image signal is performed within the circuit, for example.
A decrease in image quality is brought about if reduction is performed using simple linear interpolation, for example, in order to reduce the image signal. In contrast, in Japanese Patent Laid-Open No. 2009-135598 and Japanese Patent Laid-Open No. 2006-67214, a reduced image that has retained its sharpness is generated by determining the direction of change between pixels and performing interpolation on the thinned out pixels.
However, no method of interpolating pixels according to a reduction rate is described in Japanese Patent Laid-Open No. 2009-135598 or Japanese Patent Laid-Open No. 2006-67214, and therefore there is a concern that, depending on the reduction rate, the sharpness will deteriorate greatly and that a large amount of aliasing will appear. Particularly, in the case in which reduction is performed at a magnification approximating equal magnification, if a filter with a narrow pixel reference range is used the desired bandwidth limiting cannot be performed due to limitations of the filter characteristics, and the sharpness of the reduced image signal deteriorates. For example, there are cases in which aliasing appears.
In contrast, it is also conceivable to perform bandwidth limiting using a filter with a wide pixel reference range. However, if such a filter is mounted to a circuit, the memory capacity for holding pixel signal values used by the filter increases, and the scale of the circuit increases.
Thus, the present invention provides image processing technology with which, in the case in which the reduction rate has changed, it is possible to obtain a reduced image in which aliasing is mitigated while providing sharpness, without using a filter with a wide reference range.
One of embodiments of the invention relates to an image processing apparatus, comprising an interpolation unit configured to determine, using a pixel signal included in a region referenced on a pixel of interest of an image, a direction having a high signal correlation in the region, and to perform, using pixel signals from neighboring pixels of the pixel of interest based on a result of the determination, interpolation processing for interpolating a pixel signal of the pixel of interest, and a reduction unit configured to perform reduction by reducing the number of pixels of the image interpolated by the interpolation unit, wherein the interpolation unit executes the interpolation processing according to a reduction rate used by the reduction unit, such that a high frequency component of the image decreases as a degree of reduction increases, while applying a weight to the pixel signal of a pixel, among the neighboring pixels, located in the direction determined as having the high correlation based on the result of the determination.
Further features of the present invention will become apparent from the following description of exemplary embodiments (with reference to the attached drawings).
Embodiments of the present invention will be described below with reference to the drawings. In the present embodiment, an image processing apparatus configured such as is shown in
The optical system 101 can include a focus lens, an aperture, and a shutter. The image sensor 102 converts the light amount of a subject formed in the optical system 101 into an electric signal using photoelectric conversion, and is configured as an image sensor such as a CMOS or a CCD, for example. In the present embodiment, the case in which the image sensor has a primary color Bayer array of R, G1, G2, and B is described as an example.
Next, a configuration and operations of the image reduction unit 105 corresponding to the embodiment of the invention will be described with reference to
The direction determination unit 202 determines the direction of the texture included in the image signal from the input Bayer image signal, and generates a direction determination signal indicating a direction having a high pixel signal correlation. HV filter processing units 203, 208, and 209 respectively perform filter processing in the horizontal and vertical directions on the input 0-insertion G, R, and B signals, and create a synchronized plane image. Note that synchronization refers to various types of signals being generated at the same pixel position. A H filter processing unit 204 performs filter processing in the horizontal direction on the 0-insertion G signal, and creates a synchronized G plane signal. The V filter processing unit 205 performs filter processing in the vertical direction on the 0-insertion G signal, and creates a synchronized G plane signal.
An adaptive interpolation weight determination unit 206 calculates the combining ratio of the G signals output from the HV filter processing unit 203, the H filter processing unit 204, and the V filter processing unit 205, based on the determination result of the direction determination indicated by the direction determination signal received from the direction determination unit 202. An image combining unit 207 combines the G signals that are output from the HV filter processing unit 203, the H filter processing unit 204, and the V filter processing unit 205, according to the combining ratio calculated by the adaptive interpolation weight determination unit 206, and creates an adaptive G plane image. Reduction units 210, 211, and 212 each perform reduction processing on the input plane image signal. An image conversion unit 213 performs image conversion processing on the reduced R, G, and B signals that are received from the reduction units 210, 211, and 212.
Next, operations of the image processing apparatus in the present embodiment will be described with reference to
First, in step S301, the A/D conversion unit 104 converts the analog image signal output by the image sensor 102 into a digital image signal. Next, in step S302, the image reduction unit 105 executes reduction processing on the digital image signal that has undergone A/D conversion, and subsequently performs image conversion processing to convert the image signal as necessary. Reduction processing is described in detail below with reference to the flowchart in
Next, reduction processing and image conversion processing will be described in detail as processing executed by the image reduction unit 105 in step S303 described above, with reference to the flowchart in
First, in step S401, the WB processing unit 201 performs white balance processing by multiplying the red (R), green (G), and blue (B) color signals of a Bayer image signal with a gain. It is sufficient to use a known technique for white balance processing in the WB processing unit 201, and therefore a detailed description thereof is omitted. Next, in step S402, the HV filter processing unit 203, the H filter processing unit 204, and the V filter processing unit 205 respectively perform filter processing on the 0-insertion G signal, and a synchronized G plane signal is generated.
For example, the HV filter processing unit 203 can perform (1, 4, 6, 4, 1) filter processing in each of the horizontal direction and the vertical direction. In this case, two pixels on the left and two pixels on the right in the horizontal direction and two pixels above and two pixels below in the vertical direction are the pixels that are targeted for filter processing, with a pixel of interest as the reference. For example, the H filter processing unit 204 can perform (1, 4, 6, 4, 1) filter processing in the horizontal direction, and the V filter processing unit 205 can perform (1, 4, 6, 4, 1) filter processing in the vertical direction. Note that when (1, 4, 6, 4, 1) filter processing is performed on the 0-insertion signal, synchronization is performed with (0, 4, 0, 4, 0) filter processing if the pixel of interest is the 0-insertion signal, and with (1, 0, 6, 0, 1) filter processing if the pixel of interest is not the 0-insertion signal.
As described above, in the HV filter processing unit 203, the H filter processing unit 204, and the V filter processing unit 205, a (1, 4, 6, 4, 1) filter is used, but it is desirable to change the frequency characteristics of the filters according to the reduction rate in the reduction units 210 to 212. In consideration of aliasing, a filter is used that more robustly performs bandwidth limiting by, for example, increasing the weighting that is applied to neighboring pixels, increasing the number of neighboring pixels, or the like the more an image is reduced, such that the frequency bandwidth is at the low frequency end.
Next, in step S403, the direction determination unit 202 creates a direction determination signal from the Bayer image signal. The method for creating the direction determination signal will be described with reference to
Pa=|2R0−R1−R2|+|G2−G1|−|2R0−R3−R4|−|G4−G3| (1)
Similarly, if the positional relationship between the pixel of interest and the color signals of the neighboring pixels is that of
Pb=|2G0−G1−G2|+|R2−R1|−|2G0−G3−G4|−|B2−B1| (2)
Pc=|2G0−G1−G2|+|B2−B1|−|2G0−G3−G4|−|R2−R1| (3)
Pd=|2B0−B1−B2|+|G2−G1|−|2B0−B3−B4|−|G4−G3| (4)
The equations (1) to (4) indicate differences between an absolute value resulting from applying the band-pass filter in the horizontal direction and an absolute value resulting from applying the band-pass filter in the vertical direction. The direction having a high pixel signal correlation and the strength of the correlation can be determined based on the sign and the size of the calculated value. In the case of the texture being in the vertical direction, the value resulting from applying the band-pass filter in the horizontal direction will be dominant, and thus the value will increase. On the other hand, in the case of the texture being in the horizontal direction, the value resulting from applying the band-pass filter in the vertical direction will be dominant, and thus the value will decrease. Note that performing white balance gain processing with the WB processing unit 201 is for aligning the gains for R, G, and B such that the values of the determination signals do not vary depending on the color of the pixel of interest.
Also, methods for calculating the direction determination signal other than the equations (1) to (4) may be applied. For example, as shown in
Pa=|2R0−R1−R2|+|(G1+3G2−3G3−G4)/2|−|2R0−R3−R4|−|(G5+3G6−3G7−G8)/2| (5)
Similarly, if the positional relationship between the pixel of interest and the color signals of the neighboring pixels is that of
Pb=|2G0−G1−G2|+|(R1+3R2−3R3−R4)/2|−|2G0−G3−G4|−|(B1+3B2−3B3−B4)/2| (6)
Pc=|2G0−G1−G2|+|(B1+3B2−3B3−B4)/2|−|2G0−G3−G4|−|(R1+3R2−3R3−R4)/2| (7)
Pd=|2B0−B1−B2|+|(G1+3G2−3G3−G4)/2|−|2B0−B3−B4|−|(G5+3G6−3G7−G8)/2| (8)
Here,
The more a CZP (Circular Zone Plate) moves toward an edge the more high-frequency components are included, and the dashed lines in
Next in step S404, the adaptive interpolation weight determination unit 206 calculates a combining ratio for the G signals that are output based on the direction determination signal created in step S403 from the HV filter processing unit 203, the H filter processing unit 204, and the V filter processing unit 205.
By thus performing filter processing that corresponds to the direction of the texture, it is possible to maintain the sharpness of the texture. Note that, as shown in
In the case of
In contrast, in the case of
In this way, weighted addition of the results of interpolation in the horizontal direction or the vertical direction is possible by combining the output result from the HV filter processing unit 203 with the output result from the H filter processing unit 204 or the V filter processing unit 205 according to the determination result of directional determination. On the other hand, in the case in which the degree of reduction is large, the weight in the horizontal and vertical directions is reduced, and preference is given to the signal output from the HV filter processing unit 203.
Here,
Then, in step S405, the G signals output from the HV filter processing unit 203, the H filter processing unit 204, and the V filter processing unit 205 are combined in the image combining unit 207 according to the combining ratio calculated in step S404, and an adaptive G plane signal is created.
Next in step S406, (1, 4, 6, 4, 1) filter processing is performed on the 0-insertion R and B signals in the horizontal direction and the vertical direction with the HV filter processing units 208 and 209, and synchronized R and B plane signals are created. In the present embodiment, (1, 4, 6, 4, 1) filter processing is used, but in consideration of aliasing, a filter is used that more robustly performs bandwidth limiting of a high frequency the more the image is reduced, similarly to the G-plane HV filter processing unit 203.
Then, in step S407, reduction of the adaptive G plane signal, the R plane signal, and the B plane signal is performed respectively in the reduction units 210 to 212. Regarding reduction, it is sufficient to perform linear interpolation processing with weighting that corresponds to the pixel sampling position before and after reduction, for example. Alternatively, reduction may be performed using other processing such as bicubic interpolation, or other methods may be employed.
In
Lastly, in step S408, the adaptive G plane signal, the R plane signal, and the B plane signal that were reduced in step S407 are converted in the image conversion unit 213. Conversion refers to processing such as performing sampling in the Bayer color array order from the R, G, and B plane images described above and generating a Bayer image signal, or creating YUV signals using equations (9) to (11).
Y=0.299×R+0.587×G+0.114×B (9)
U=0.169×R−0.331×G+0.500×B (10)
V=0.500×R−0.419×G+0.081×B (11)
It is sufficient to change the conversion processing according to the format used when saving a reduced image signal to the recording unit 107, or to the format of an image input to the development processing unit 106. Alternatively, in the case where it is desirable to not lose image signal information, it is sufficient to record the RGB plane image signals as is without performing conversion.
In the present invention as described above, by changing one of or both the band-pass filter characteristics used when creating a direction determination signal or the relationship of the combining ratio relative to the direction determination signal according to the reduction rate, an adaptive G plane image signal adjusted for aliasing and sharpness can be obtained.
In the present embodiment, both the band-pass filter characteristics and the relationship of the combining ratio relative to the direction determination signal were changed according to the reduction rate, but as shown in the images in
Also, the maximum reference range of the filter when the adaptive G plane is created will be either that of the band-pass filter used in the direction determination unit 202 or that of the filters used by the HV filter processing unit 203, the H filter processing unit 204, and the V filter processing unit 205. Even if there are limitations on the types of filter for the HV filter processing unit 203, it is possible to robustly apply bandwidth limiting with the HV filter processing unit 203, and to supplement portions lacking in sharpness by adjusting the combining ratio of the signals output by the H filter processing unit 204 or the V filter processing unit 205. Accordingly, aliasing and the sharpness can be adjusted with filter processing that has a relatively narrow reference range, even if the reduction rate changes.
Note that the present invention is not limited to the embodiment described above, and various improvements and design changes may be made without departing from the spirit of the present invention.
Embodiment(s) of the present invention can also be realized by a computer of a system or apparatus that reads out and executes computer executable instructions (e.g., one or more programs) recorded on a storage medium (which may also be referred to more fully as a ‘non-transitory computer-readable storage medium’) to perform the functions of one or more of the above-described embodiment(s) and/or that includes one or more circuits (e.g., application specific integrated circuit (ASIC)) for performing the functions of one or more of the above-described embodiment(s), and by a method performed by the computer of the system or apparatus by, for example, reading out and executing the computer executable instructions from the storage medium to perform the functions of one or more of the above-described embodiment(s) and/or controlling the one or more circuits to perform the functions of one or more of the above-described embodiment(s). The computer may comprise one or more processors (e.g., central processing unit (CPU), micro processing unit (MPU)) and may include a network of separate computers or separate processors to read out and execute the computer executable instructions. The computer executable instructions may be provided to the computer, for example, from a network or the storage medium. The storage medium may include, for example, one or more of a hard disk, a random-access memory (RAM), a read only memory (ROM), a storage of distributed computing systems, an optical disk (such as a compact disc (CD), digital versatile disc (DVD), or Blu-ray Disc (BD)™), a flash memory device, a memory card, and the like.
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. 2014-242302, filed on Nov. 28, 2014 which is hereby incorporated by reference herein in its entirety.
Number | Date | Country | Kind |
---|---|---|---|
2014-242302 | Nov 2014 | JP | national |
Number | Name | Date | Kind |
---|---|---|---|
4885786 | Anderson | Dec 1989 | A |
5214751 | Robert | May 1993 | A |
5920356 | Gupta | Jul 1999 | A |
5953463 | Tanaka | Sep 1999 | A |
6002810 | Wakisawa | Dec 1999 | A |
6389180 | Wakisawa | May 2002 | B1 |
6760489 | Kuwata | Jul 2004 | B1 |
6897425 | Osada | May 2005 | B2 |
7092582 | Hier | Aug 2006 | B2 |
7362915 | Vuylsteke | Apr 2008 | B2 |
7529405 | Masuno | May 2009 | B2 |
7941006 | Fuchigami | May 2011 | B2 |
7949204 | Thoms | May 2011 | B2 |
8169510 | Kondo | May 2012 | B2 |
8199812 | Ye | Jun 2012 | B2 |
8229212 | Siddiqui | Jul 2012 | B2 |
8253829 | Kawashima | Aug 2012 | B2 |
8259813 | Hvidsten | Sep 2012 | B2 |
8305458 | Hara | Nov 2012 | B2 |
8659673 | Hara | Feb 2014 | B2 |
Number | Date | Country |
---|---|---|
2006-067214 | Mar 2006 | JP |
2009-135598 | Jun 2009 | JP |
Number | Date | Country | |
---|---|---|---|
20160155213 A1 | Jun 2016 | US |