WO2004110071A1 - 画像処理装置、画像処理プログラム - Google Patents

画像処理装置、画像処理プログラム Download PDF

Info

Publication number
WO2004110071A1
WO2004110071A1 PCT/JP2004/008144 JP2004008144W WO2004110071A1 WO 2004110071 A1 WO2004110071 A1 WO 2004110071A1 JP 2004008144 W JP2004008144 W JP 2004008144W WO 2004110071 A1 WO2004110071 A1 WO 2004110071A1
Authority
WO
WIPO (PCT)
Prior art keywords
pixel
image
image processing
sensitivity
color component
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/JP2004/008144
Other languages
English (en)
French (fr)
Inventor
Taketo Tsukioka
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Olympus Corp
Original Assignee
Olympus Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Olympus Corp filed Critical Olympus Corp
Publication of WO2004110071A1 publication Critical patent/WO2004110071A1/ja
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4015Image demosaicing, e.g. colour filter arrays [CFA] or Bayer patterns
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • H04N23/84Camera processing pipelines; Components thereof for processing colour signals
    • H04N23/843Demosaicing, e.g. interpolating colour pixel values
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N25/00Circuitry of solid-state image sensors [SSIS]; Control thereof
    • H04N25/10Circuitry of solid-state image sensors [SSIS]; Control thereof for transforming different wavelengths into image signals
    • H04N25/11Arrangement of colour filter arrays [CFA]; Filter mosaics
    • H04N25/13Arrangement of colour filter arrays [CFA]; Filter mosaics characterised by the spectral characteristics of the filter elements
    • H04N25/134Arrangement of colour filter arrays [CFA]; Filter mosaics characterised by the spectral characteristics of the filter elements based on three different wavelength filter elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N2209/00Details of colour television systems
    • H04N2209/04Picture signal generators
    • H04N2209/041Picture signal generators using solid-state devices
    • H04N2209/042Picture signal generators using solid-state devices having a single pick-up sensor
    • H04N2209/045Picture signal generators using solid-state devices having a single pick-up sensor using mosaic colour filter
    • H04N2209/046Colour interpolation to calculate the missing colour values

Definitions

  • the present invention provides an image processing apparatus that processes an image output from a single-chip imaging system, a two-chip imaging system, or a three-chip pixel-shift imaging system to generate a color digital image having three color component values for each pixel. It relates to an image processing program.
  • a single-chip imaging system often used in digital cameras and the like uses a single-chip imaging device equipped with a different color filter for each pixel, and an output image from the imaging device is one for each pixel. It has only different color component values. Therefore, in order to generate a color digital image, it is necessary to perform interpolation processing to compensate for missing color component values in each pixel. The need for interpolation processing to compensate for such missing color component values is also the same for an apparatus using a two-chip imaging system or an imaging system with three-chip pixel shift.
  • the resulting color image may have inferior shadows or false colors.
  • interpolation methods using various methods have been conventionally proposed, and are roughly classified into those based on an edge detection method and those based on a color correlation method.
  • FIG. 32 is a diagram for explaining a conventional interpolation process based on edge detection.
  • the single-chip image sensor is a single-chip Bayer array image sensor provided with color filters of a three-primary color Bayer array as shown in FIG.
  • the vicinity of the cross in the vertical and horizontal directions around the target pixel B5 is taken, and the horizontal G with respect to the target pixel is taken.
  • the interpolation value G h and the interpolation value G v for G in the vertical direction are estimated as shown in the following Equation 1.
  • G h (G 4 + G 6) / 2 + (2 XB 5— B 3 — B 7) / 4
  • Gv (G2 + G8) / 2 + (2 XB 5-B 1 -B 9) / 4
  • the symbol IXI represents the absolute value of X.
  • the interpolation value Gh or the interpolation value Gv in the direction in which the value is determined to be smaller and more flat is used.
  • FIG. 33 is a diagram for explaining a conventional interpolation process based on color correlation.
  • any one of the color components of the color filter formed in the image sensor for example, r, g, and b in the case of a primary color filter.
  • the component values Vp and Vq of the two types of color components P and q expressed by the following equations 3, expressed using the coefficients aqp and j3 qp,
  • Vq a qp X Vp + j3 qp
  • p and q are any of r, g, and b.
  • the component values Vp and Vq corresponding to the color components p and q, respectively, are values at pixels near the target pixel X.
  • the pixels in the neighborhood U ⁇ are classified according to the types of the obtained color components r, g, and b to form three subsets Ur, Ug, and Ub.
  • the above coefficients aqp and i3qp are calculated by calculating the average Ac of the pixel values in each part (where c is one of r, g, and b) and the standard deviation S c (where c is!:, G, b Estimate based on the following equation (4).
  • the value Xm of the missing color component m at the target pixel X is calculated from the value Xe of the color component e obtained at the target pixel X as Ask for it as shown.
  • n and e are each one of] :, g, and b.
  • the related art based on color correlation is characterized by estimating the pixel value correlation between different color components in the vicinity of the target pixel.
  • a difference in gain may occur between lines, and the spectral characteristics of the filters may differ slightly even between pixels having the same color filter. Sensitivity variation may occur between pixels from which components should be obtained.
  • the color components obtained in the pixel of interest are used as a result of the interpolation processing without any particular correction, so that the color components missing in the pixel of interest are eliminated.
  • the characteristics of the target pixel itself are directly reflected in the result.
  • the sensitivity differs between pixels that can obtain the same color component. In such a case, if such processing is performed, the sensitivity variation between pixels is directly reflected in the result of the interpolation processing, and side effects such as visible lattice stripes appear.
  • the present invention has been made in view of the above circumstances, and provides an image processing apparatus and an image processing program that can perform high-precision interpolation processing by reducing the influence of variations in sensitivity between pixels even if the sensitivity varies between pixels. It is aimed at. Disclosure of the invention
  • the image processing apparatus provides an image in which one or more color components are missing for each pixel obtained by capturing an optical image with a single-chip imaging system, a two-chip imaging system, or a three-chip pixel-shift imaging system.
  • the image processing apparatus includes: a sensitivity correction unit that corrects a difference; and an interpolation unit that compensates for a color component missing in each pixel in an image corrected by the sensitivity correction unit.
  • the image processing apparatus has a single-chip imaging system, a two-chip imaging system, or a three-chip pixel shift imaging system in which one or more types of color components are missing for each pixel obtained by capturing an optical image by the imaging system.
  • An image processing apparatus that processes an image that is located in a predetermined vicinity of a pixel of interest, and determines a magnitude of a sensitivity difference between pixels from which the color component is obtained for a specified type of color component;
  • Interpolating means for performing a process for compensating for a color component missing in the pixel of interest, and capable of changing processing content in accordance with a result of the determination by the determining means when performing the process. .
  • the image processing apparatus provides a single-chip imaging system, a two-chip imaging system, or a three-chip pixel-shifted imaging system in which each pixel obtained by capturing an optical image with one or more color components has one or more color components.
  • An image processing apparatus for processing a missing image comprising: an interpolating unit that compensates for a missing color component in each pixel; and a post-interpolation correcting unit that corrects a result of the interpolating unit. is there.
  • the image processing program provides a computer with one or more types of each pixel obtained by capturing an optical image by a single-chip imaging system, a two-chip imaging system, or a three-chip pixel-shifted imaging system.
  • An image processing program for processing an image lacking a color component the computer comprising: a sensitivity correction unit configured to correct a sensitivity difference between pixels having the same color component;
  • the image processing program according to the present invention provides a computer with one or more colors for each pixel obtained by capturing an optical image using a single-chip imaging system, a two-chip imaging system, or a three-chip pixel shift imaging system.
  • An image processing program for processing an image in which a component is missing the computer comprising: a computer that processes a pixel in which a color component corresponding to a specified type of color component is obtained in a predetermined vicinity of a target pixel; Determining means for determining the magnitude of the difference in sensitivity between the two, and performing processing for compensating for missing color components in the pixel of interest, and changing the processing content according to the determination result of the determining means when performing the processing.
  • the image processing program according to the present invention provides a computer with a single-chip imaging system, a two-chip imaging system, or a three-chip pixel-shifted imaging system for each pixel obtained by capturing an optical image.
  • An image processing program for processing an image in which one or more types of color components are missing comprising: a computer for interpolating means for capturing missing color components in each pixel; An image processing program for functioning as a post-interpolation correction means for performing correction.
  • FIG. 1 is a block diagram illustrating a configuration of a digital camera according to a first embodiment of the present invention.
  • FIG. 2 is a block diagram showing a configuration of a digital camera according to Embodiment 2 of the present invention.
  • FIG. 3 is a flowchart showing the processing of the G-stage difference detection circuit in the second embodiment.
  • FIG. 4 is a diagram illustrating pixel classification in a G-level difference detection circuit and a G interpolation circuit according to the second embodiment.
  • FIG. 5 is a flowchart showing the processing of the G interpolation circuit in the second embodiment.
  • FIG. 6 is a diagram for explaining the processing of step S16 in the processing of the G interpolation circuit shown in FIG.
  • FIG. 7 is a diagram illustrating a direction of weight calculation by a weight calculation circuit according to the second embodiment.
  • FIG. 8 is a flowchart illustrating a process of the RB interpolation circuit according to the second embodiment.
  • FIG. 9 is a diagram for explaining pixel selection in step S31 in the processing of the RB interpolation circuit shown in FIG.
  • FIG. 10 is a flowchart showing software processing performed by a computer in the second embodiment.
  • FIG. 11 is a flowchart showing G interpolation software processing performed by a computer in the second embodiment.
  • -FIG. 12 is a flowchart showing RB interpolation software processing performed by a computer in the second embodiment.
  • FIG. 13 is a block diagram illustrating a configuration of a digital camera according to Embodiment 3 of the present invention.
  • FIG. 14 is a diagram showing pixel numbers used when processing is performed by the correction circuit according to the third embodiment.
  • FIG. 15 is a flowchart illustrating processing of the correction circuit according to the third embodiment.
  • FIG. 16 is a flowchart showing software processing performed by a computer in the third embodiment.
  • FIG. 17 is a block diagram showing a configuration of a digital camera according to Embodiment 4 of the present invention.
  • FIG. 18 is a block diagram illustrating a configuration example of a level difference correction circuit according to the fourth embodiment.
  • FIG. 19 is a diagram for explaining a G step in the fourth embodiment.
  • FIG. 20 is a flowchart showing the processing of the level difference correction circuit in the fourth embodiment.
  • FIG. 21 is a diagram illustrating an example of the vicinity when performing the processing in the step difference correction circuit according to the fourth embodiment.
  • FIG. 22 is a diagram showing an example of a function for obtaining a correction amount ⁇ ⁇ ⁇ ⁇ in the fourth embodiment.
  • FIG. 23 is a block diagram showing another configuration example of the step difference correction circuit according to the fourth embodiment.
  • FIG. 24 is a diagram for explaining the combination average calculated by the combination average calculation circuit in the fourth embodiment.
  • FIG. 25 is a flowchart showing software processing performed by a computer in the fourth embodiment.
  • FIG. 26 is a block diagram illustrating a configuration of a digital camera according to Embodiment 5 of the present invention.
  • FIG. 27 is a block diagram illustrating a configuration example of a level difference smoothing circuit according to the fifth embodiment.
  • FIG. 28 is a flowchart showing the processing of the level difference smoothing circuit in the fifth embodiment.
  • FIG. 29 is a diagram illustrating an example of a function for calculating the coefficient mixture ratio ⁇ in the fifth embodiment.
  • FIG. 30 is a diagram illustrating frequency characteristics of filter coefficients set by the coefficient setting circuit in the fifth embodiment.
  • FIG. 31 is a block diagram showing another configuration example of the level difference smoothing circuit in the fifth embodiment.
  • FIG. 32 is a diagram for explaining conventional interpolation processing based on edge detection.
  • FIG. 33 is a diagram for explaining a conventional trapping process based on color correlation. BEST MODE FOR CARRYING OUT THE INVENTION
  • FIG. 1 shows a first embodiment of the present invention, and is a block diagram showing a configuration of a digital camera.
  • the image processing apparatus of the present invention is applied to a digital camera.
  • the digital camera 1 includes an optical system 2, a single-layer Bayer array CCD 3, a single-layer image buffer 4, a line correction circuit 5, a WB correction circuit 6, an interpolation circuit 7, Color It is configured to include an image buffer 8, an image quality adjustment circuit 9, a recording circuit 10, and a control circuit 11.
  • the optical system 2 is for condensing a subject light flux.
  • the single-plate Bayer array CCD3 photoelectrically converts a subject image formed by the optical system 2 and outputs an imaging signal.
  • the single-chip image buffer 4 stores image data output from the single-chip bay array CCD3 and digitized by an A / D conversion circuit or the like (not shown).
  • the line correction circuit 5 is sensitivity correction means for correcting a difference in gain between lines for an image stored in the single-chip image buffer 4.
  • the WB correction circuit 6 performs white balance processing on the image data output from the line correction circuit 5.
  • the interpolation circuit 7 interpolates a color component missing in each pixel in the single-plate image data output from the WB correction circuit 6 from information on neighboring pixels, thereby generating color image data. It is.
  • the force line image buffer 8 is for temporarily storing the force line image data of the three plates interpolated by the capturing circuit 7.
  • the image quality adjustment circuit 9 performs image quality adjustment processing such as color conversion edge enhancement on the color image stored in the color image buffer 8.
  • the recording circuit 10 is for recording three-plate color image data whose image quality has been adjusted by the image quality adjusting circuit 9.
  • the control circuit 11 is control means for comprehensively controlling the digital camera 1 including the above-described circuits.
  • the operation of the digital camera 1 is as follows.
  • the WB correction circuit 6 operates to calculate the ratio Crg of the R component and the G component and the ratio Cbg of the B component and the G component for the white object, and obtain the white balance coefficient.
  • pixel values are read from the single-chip image buffer 4 for each block of a predetermined size. In this block, a process of averaging pixel values for each type of color component obtained at each pixel is performed.
  • the RGB value of the average color of each block is obtained, but the ratio of the R component to the G component and the ratio of the B component to the G component are calculated, and these ratios satisfy a predetermined relationship. Select only those blocks that have Then, the ratio of the R component to the G component and the ratio of the B component to the G component of the selected block are further averaged to obtain final white balance coefficients Crg and Cbg.
  • This technique itself is known. However, during this calculation, when reading out the pixel values from the single-chip image buffer 4, the line correction circuit 5 acts to correct the pixel values.
  • the line correction circuit 5 corrects a gain step between the even-numbered lines and the odd-numbered lines generated when reading signals from the single-plate Bayer array CCD 3, and the circuit includes a correction circuit for the correction.
  • the coefficients (a, b) are retained. This coefficient is defined as V 1, the average of the pixel values of the pixels for which the G component is obtained on the odd-numbered lines, and V 1 on the even-numbered lines, with respect to the pixel values in the single-chip image buffer 4 when capturing a uniform gray object. Assuming that the average of the pixel values of the pixels from which the G component is obtained is V2,
  • V 2 a X V l + b
  • the line correction circuit 5 corrects the pixel value V of the pixel for which the G component is obtained in the odd line according to the sensitivity of the even line as shown in the following Expression 7, and
  • V a X V + b
  • the pixel value (correction value) v, after this correction is output to the WB correction circuit 6.
  • the interpolation circuit 7 performs an interpolation process on each pixel in the single-chip image buffer 4.
  • the algorithm of the interpolation processing performed by the intercepting circuit 7 is the same as that described in the above-mentioned Japanese Patent Application Laid-Open No. 8-289686, but in this embodiment, the single-chip image buffer 4 is used.
  • the pixels are read out every five lines and stored in an internal buffer (not shown) in the interpolation circuit ⁇ , and the interpolation processing is performed on the data in the buffer.
  • the line correction circuit 5 When transferring data from the single-chip image buffer 4 to the internal buffer, the line correction circuit 5 In addition, the WB correction circuit 6 operates to change the pixel value read from the single-chip image buffer 4.
  • a correction result (correction value) V ′ for the pixel value V read from the single-chip image buffer 4 by the line correction circuit 5 is used.
  • V " ⁇ '(when G component is obtained in readout pixel)
  • V " CrgX ⁇ '(when R component is obtained in the readout pixel)
  • V " CbgX v '(when the B component is obtained from the readout pixel)
  • the color image output to the color image buffer 8 by the interpolation circuit 7 is subjected to processing such as color conversion, edge enhancement, and gradation conversion by the image quality adjustment circuit 9, and is not shown by the recording circuit 10. It is recorded on a recording medium. Thus, the imaging operation of the digital camera 1 is completed.
  • the processing by the interpolation circuit 7 may be any processing that uses the pixel value as it is as the value of the G component after the interpolation processing in the pixel from which the color component G is obtained.
  • the single-chip imaging system is described as an example, but the same processing can be applied to a two-chip imaging system or a three-chip pixel shift imaging system.
  • a G component is obtained for all pixels from one of the two imaging elements, and an R component and a B component are obtained in a checkered pattern from the other.
  • the same technique as the sensitivity correction described in the present embodiment can be applied to the G component obtained in a checkered pattern in the single-layer Bayer array CCD3.
  • the pixels are corrected by the line correction circuit as the sensitivity correction unit and then interpolated as the interpolation unit. Since the processing of the circuit is performed, it is possible to prevent a difference in sensitivity from affecting the captured image, and obtain a higher quality image.
  • FIGS. 2 to 12 show a second embodiment of the present invention.
  • FIG. 2 is a block diagram showing a configuration of a digital camera
  • FIG. 3 is a flowchart showing processing of a G level difference detection circuit
  • FIG. 5 is a diagram showing the classification of pixels in the step detection circuit and the G interpolation circuit
  • FIG. 5 is a flow chart showing the processing of the G interpolation circuit
  • FIG. 6 is the flow chart of step S16 in the processing of the G interpolation circuit shown in FIG.
  • Fig. 7 is a diagram for explaining the processing
  • Fig. 7 is a diagram showing the direction of weight calculation by the weight calculation circuit
  • Fig. 8 is a flowchart showing the processing of the RB interpolation circuit
  • FIG. 10 is a diagram for explaining pixel selection in step S31 in the processing of FIG. 10,
  • FIG. 10 is a flowchart showing software processing performed by a computer,
  • FIG. 11 is a flowchart showing G interpolation software processing performed by a computer,
  • Figure 12 shows the computer 6 is a flowchart showing RB interpolation software processing performed by the data.
  • the image processing apparatus is applied to a digital camera.
  • the digital camera 21 according to the second embodiment is different from the digital camera 1 according to the first embodiment in that a G-level difference detection circuit 22 that is a determination unit and a feature amount calculation unit is added.
  • the difference is that a G interpolation circuit 23 as an interpolation means, a G image buffer 26 and an RB interpolation circuit 27 as an interpolation means are provided.
  • the G interpolation circuit 23 includes a weight calculation circuit 24 as a weighted averaging means for calculating a weight for a pixel to be interpolated based on the output from the G step difference detection circuit 22, and the weight calculation circuit 2. And an averaging circuit 25 as weighted averaging means for calculating a weighted average value based on the weights calculated in Step 4 and outputting the pixel value of the pixel to be interpolated to the G image buffer 26. Have been.
  • the optical image from the optical system 2 is picked up by the single-plate Bayer array CCD 3 as in Example 1 above, and the single-plate only has one type of color component per pixel.
  • the state image is stored in the single-plate image buffer 4.
  • the line correction circuit 5 and the WB correction circuit 6 operate in the same manner as in the first embodiment, and the white balance coefficients Crg and Cbg are calculated.
  • the G interpolation circuit 23 operates. At this time, first, a block of 5 ⁇ 5 pixels around each pixel related to the image data stored in the single-chip image buffer 4 is read into the internal buffer provided in the G interpolation circuit 23. At that time, the line correction circuit 5 and the WB correction circuit 6 operate to correct the pixel value, and the G-level difference detection circuit 22 operates to operate the G component as in the first embodiment. An estimate of the step between the even and odd lines of the pixel for which is obtained is calculated.
  • the G step difference detection circuit 22 classifies each pixel in the block of 5 ⁇ 5 pixels read into the internal buffer for each obtained color component, and calculates an average value of pixel values for each classification .
  • the G component is G1 when the color component obtained from horizontally adjacent pixels is R
  • B is the color component obtained from horizontally adjacent pixels as shown in Fig. 4.
  • Some cases are classified as G2, and are further classified into two types. Therefore, the calculated averages are of four types: the average of the R component is Ar, the average of the B component is Ab, the average of the G1 component is Agl, and the average of the G2 component is Ag2.
  • the pixels that are classified in G 1 or G 2 is the dispersion Vgl of pixel values within each classification, Vg 2 also calculated respectively (step S 1).
  • step S2 it is determined whether or not the variances Vgl and Vg2 are both equal to or less than a certain threshold T (step S2).
  • the step estimation value d is set as the difference Agl-Ag2 between the average values of the classifications G1 and G2, and the processing ends ( Step S3).
  • step S2 if at least one of the variances Vgl and Vg2 exceeds the threshold T, it is unknown whether the block is flat. Therefore, the difference between the R component and the B component in the block is further determined by the plane of the pixel from which the R component is obtained. The difference between the average value Ar and the average value Ab of the pixel from which the B component is obtained is evaluated by whether or not the difference is greater than a predetermined threshold Trb (Step S4).
  • the G level difference detection circuit 22 was obtained by photographing subjects of various colors and measuring how much a level difference d occurs in the G component between lines in each image.
  • the table T d is held in advance. This is because the G component is obtained according to the evenness of the line even if the sensitivity between the lines related to the image data is corrected by the line correction circuit 5 before the processing by the WB correction circuit 6. This is because a step may occur in the pixel value of the pixel.
  • the difference pi feature amount
  • the difference pi feature amount between the average value Ar of the pixel from which the R component is obtained and the average value Ab of the pixel from which the B component is obtained, and the average of the G component including both Gl and G2
  • d T d (p 1, p 2)
  • the processing of the G level difference detection is terminated (step S5).
  • step S6 If the difference I Ar-Ab I is equal to or smaller than the threshold Trb in the step S4, even if a G step occurs, it is necessary to estimate the extent of the step from the data in the block. Since G cannot be performed, the G step amount d is set to one 255, which indicates that estimation is impossible, and the process is terminated (step S6).
  • step S11 it is determined whether or not the classification of the central pixel of the block is G1 in the classification shown in FIG. 4 (step S11). As shown in FIG. 4, this classification m is classified into one of R, G 1,. G 2, and B according to the type of the obtained color component and the type of the horizontally adjacent pixel. Become.
  • the value V of the G component of the central pixel is set as the pixel value U0 of the central pixel of the block (step S12), and the process ends.
  • step S11 if the classification m of the center pixel of the block is not G1, it is further determined whether or not the classification m is G2 in the classification shown in FIG.
  • the classification m of the center pixel of the block is G2
  • step S14 when the estimated G-step value d is 1-255, the neighborhood of the 3 ⁇ 3 pixel with respect to the central pixel (the pixel whose pixel value is U0) is as shown in FIG. Then, the difference duj between the pixel values Ul to U4 of the pixels at which the G component is obtained at the four corners in the vicinity and the pixel value U0 of the central pixel is calculated as follows.
  • V (UO + Uj) NO2 is set as the value of the G component of the central pixel (step S16), and the process ends.
  • step S13 if the classification m of the center pixel of the block is not G2, it is determined whether or not the G step difference estimated value d is -255, that is, whether or not the force is set to be unestimable. (Step S17).
  • step S19 when the estimated G step value d is ⁇ 255 in step S17, the parameter ⁇ used in the calculation in step S20 described later is halved with respect to a preset value.
  • the parameter 3 used in the calculation in step S20] is doubled with respect to a preset value (step S19).
  • the weight calculation circuit 24 calculates the weight Wj (j is 1 to 4) of the central pixel in each of the upper, lower, left, and right directions as shown in FIG. 7 ( ⁇ ) to FIG. 7 (D). Is calculated as shown in Equation 10 below.
  • the averaging circuit 25 weights the pixel value of the pixel in each direction using the weight Wj calculated in step S20, and obtains the final G component of the central pixel by the following equation 11. Is calculated (step S2 1).
  • Vg W1 XG 6 + W2 XG8 + W3 XG4 + W4 XG 2
  • Vb W1 XB 7 + W2 XB 9 + W3 XB 3 + W4 XB 1
  • V Vg + (Vb-B5) / 2
  • the RB interpolation circuit 27 operates to generate a color image having no missing color components in all pixels and store the color image in the color image buffer 8.
  • the RB interpolation circuit 27 first reads, for each pixel in the single-chip image buffer 4, a 5 ⁇ 5 pixel block centered on the pixel. At the time of reading, the line correction circuit 5, the WB correction circuit 6, and the G The level difference detection circuit 22 is operated, and the pixel value after the change of the block composed of 5 ⁇ 5 pixels is obtained in the internal buffer (not shown) of the RB interpolation circuit 27, and the G level difference estimation value d in the block is also obtained.
  • the RB interpolation circuit 27 reads the value of the G component at the pixel position corresponding to the read block from the G image buffer 26 and similarly stores the value in an internal buffer (not shown).
  • the RB interpolation circuit 27 obtains the missing color component of the center pixel by the processing as shown in FIG.
  • the value of the designated color component c for the center pixel of the block is calculated from the data in the internal buffer by weighted averaging.
  • pixels P1 to Pn (n is an integer) in which the specified color component c is obtained are obtained in the block (step S31).
  • step S32 it is determined whether or not the estimated G-difference value d within the block is set to ⁇ 255, that is, the estimation is impossible.
  • the parameter ⁇ used in the calculation in step S34 described later is doubled to a preset value and used in the calculation in step S35 described later.
  • the parameter ⁇ is reduced to half of the preset value (step S33).
  • the force at which the processing in step S33 ends, or if the estimated value of the G step d is not ⁇ 255 in step S32, the weight Wj to be assigned to the pixel Pj is calculated as shown in the following equation 12. (Step S34).
  • j in the calculation of W is an integer from 1 to 4, and the sum of the denominators is taken for an integer k from 1 to 4.
  • is a constant, and is a predetermined value or changed in step S33. Take the updated value.
  • Equation 13 C j and G j are the values of the color components c and G obtained at the pixel P j (step S35).
  • Vc ⁇ Wj XCj (j is an integer from 1 to n)
  • Vg GO- ⁇ Wj XGj (j is an integer from 1 to n)
  • V Vc + ⁇ XVg
  • is a constant and takes a predetermined value or a value changed in step S33.
  • the color image buffer 8 restores the missing color components in all the pixels, that is, a so-called three-chip color image. Is obtained.
  • the subsequent operation is the same as in the first embodiment described above.
  • the obtained color image is subjected to processing such as color conversion, edge enhancement, and gradation conversion by the image quality adjustment circuit 9, and is recorded by the recording circuit 10.
  • the image is recorded on the medium, and the imaging operation of the digital camera 21 is completed.
  • the processing is performed by hardware (circuits and the like) inside the digital camera 21 which is an image processing apparatus.
  • processing is performed on a computer such as a PC (personal computer). It is also possible to use an image processing program.
  • 10 to 12 are flowcharts showing examples of software processing performed by the computer.
  • This software processing is performed on the images stored in the memory I n I mg, that is, the images that have not been obtained with one color component at each pixel immediately after being obtained by the single-layer Bayer array CCD 3. , And outputs a three-color image to the memory Out I mg.
  • the white balance coefficients Cr, Cb and the gain correction coefficients a, b between lines are given as parameters.
  • Figure 10 shows an overview of the flow of software processing.
  • step S42 G interpolation software processing as described later with reference to FIG. 11 is executed.
  • RB interpolation software processing as described later with reference to FIG. 12 is executed (step S43).
  • step S42 the details of the G interpolation software processing in step S42 will be described.
  • step S51 it is determined whether or not an unprocessed pixel exists in the memory I n I mg (step S51).
  • step S52 if there is an unprocessed pixel in the memory I n Img ⁇ , one of the unprocessed pixels is determined as a pixel to be processed, and the center of this pixel to be processed is determined.
  • the image data of the block consisting of X5 pixels is read (step S52).
  • a step difference estimation value d is calculated by performing a G step difference estimation process as shown in FIG. 3 (step S54).
  • step S55 G interpolation processing as shown in FIG. 5 is performed (step S55), and the G interpolation result V after processing is stored in the memory G img at the pixel value corresponding to the pixel to be processed. (Step S56), and the process returns to step S51.
  • step S51 If it is determined in step S51 that the processing of all the images in the memory I n Img has been completed, the processing ends.
  • step S61 When the processing is started, it is determined whether or not an unprocessed pixel exists in the memory I n I mg (step S61).
  • Step S62 Reads image data of a block consisting of X 5 pixels from memory I n I mg and memory G img respectively (Step S62).
  • a step difference estimation value d is calculated by performing a G step difference estimation process as shown in FIG. 3 (step S64).
  • step S61 if the type of the central pixel is B, the process returns to step S61 as it is, while if the type of the central pixel is not B, c is set to B and then as shown in FIG. RB interpolation processing is performed, and the interpolated result is recorded as the B component of the corresponding pixel in the memory Out I mg (step S68), and the process returns to step S61.
  • step S61 if all the processing of the images in the memory I nI mg has been completed, this processing is terminated.
  • This embodiment can be modified in several ways.
  • One of the preferred modifications is that the G interpolation circuit 23 and the RB interpolation circuit 27 have a function of generating an image having a smaller number of pixels than the image held in the single-chip image buffer 4.
  • the processing of the G-level difference detection circuit 22 is skipped.
  • the mode in which the number of pixels is reduced and output is standard in digital cameras, and in this case, the G interpolation circuit 23 and the RB interpolation circuit 27 transfer pixels from the single-chip image buffer 4. Processing is performed while reading out the data. Then, even if there is a sensitivity difference between the G pixels, the effect on the processing result is reduced.
  • the single-chip imaging system is described as an example, but the same processing can be applied to a two-chip imaging system or a three-chip pixel shift imaging system.
  • a G component is obtained for all pixels from one of the two imaging devices, and an R component and a B component are obtained from the other in a pine pattern.
  • the process from step S1 to step S3 in FIG. 3 is changed to detect the difference in the average value between the R pixel of the even-numbered line and the R pixel of the odd-numbered line.
  • the sensitivity difference correction may be performed accordingly.
  • the two of the three imaging elements obtain the G component, and the remaining one obtains the R and B components in a checkered pattern.
  • Some types generate high-definition luminance components.
  • the sensitivity correction of the R and B components obtained in a checkered pattern can be performed in the same manner as in the case of the two-chip imaging system.
  • the above-described table is, of course, a table in which the feature amount and the sensitivity difference amount for the designated color component are associated with each other. .
  • the weight calculation method in the weight calculation circuit 24 and the averaging circuit 25 as weighting and averaging means is based on the color of the type whose weight is determined to have a large sensitivity difference in the G-level difference detection circuit 22 as the determination means.
  • the method may be changed to another method as long as it is smaller for the pixel from which the component is obtained.
  • the equation for calculating the weight may be a function formula of another form for the pixel value difference between pixels in which the same kind of color component is obtained in the neighborhood, in addition to Equation 10.
  • the function formula is changed so that the influence of the pixel value difference on the color component is reduced. It is desirable to do.
  • the calculation of the weight for the pixel from which the color component of the type determined to have the sensitivity difference in the G-stage difference detection circuit 22 is performed so that the weight between the G pixels finally approaches evenly. It is desirable that this is achieved by adjusting ⁇ in Equation 10, but of course other equations may be used.
  • the pixels are corrected by the sensitivity correction unit and then processed by the interpolation unit. Therefore, it is possible to prevent a difference in sensitivity from affecting the interpolated image and obtain a higher quality image.
  • the determination means determines whether or not a pixel having the same color component has a large sensitivity difference or not.
  • the processing of the capturing unit is changed to a processing that is not easily affected by the sensitivity difference, that is, the value of the color component originally obtained is changed to a predetermined value for the sensitivity of the target pixel.
  • the reference sensitivity Since the processing is corrected to a value that should be taken into account and used for the interpolation result, the image quality of the finally obtained image can be improved without significantly reducing the processing efficiency.
  • the weight at the time of the interpolation process is changed according to the presence or absence of the sensitivity difference, the natural processing in which the image quality of the portion determined to have the sensitivity difference and the image quality of the portion not having the sensitivity difference do not switch greatly is This can be performed by a simple processing circuit.
  • the value of a missing color component is estimated using information of a plurality of color components.
  • the ratio of use of the information to color components including pixels having different sensitivities is reduced.
  • side effects such as the appearance of plaids can be reduced.
  • the weight calculation is performed based on the difference between pixels of the same color.In this calculation, too, the reliability of the data is low, and the effect of the difference between pixels of the same color having a sensitivity difference is reduced. However, the resulting side effects can be suppressed.
  • the sensitivity difference is likely to occur. It is determined whether or not the pattern is a pattern by using the feature quantity, and it is determined that the higher the rate of being determined to be the pattern is, the larger the sensitivity difference is. It is possible to perform processing without causing side effects.
  • the sensitivity difference generated for the pattern and the feature amount of the pattern are stored in a table in association with each other, so that the magnitude of the sensitivity difference can be determined more reliably. can do.
  • the sensitivity difference determination process is skipped, taking advantage of the fact that the side effect caused by the sensitivity difference is not noticeable in the end, and the efficiency of the process is reduced. Have improved.
  • FIGS. 13 to 16 show a third embodiment of the present invention.
  • FIG. 13 is a block diagram showing the configuration of a digital camera.
  • FIG. 14 is a diagram showing pixel numbers used when processing is performed by a correction circuit.
  • FIG. 15 is a flowchart showing processing of the correction circuit, and
  • FIG. 16 is a flowchart showing software processing performed by a computer.
  • the same components as those in the first and second embodiments are denoted by the same reference numerals, and description thereof will be omitted. Only different points will be mainly described.
  • the image processing apparatus is applied to a digital camera.
  • the digital camera 31 of the third embodiment is different from the digital camera 1 of the first embodiment in that a correction circuit 32 as a post-interpolation correction means is added between a color image buffer 8 and an image quality adjustment circuit 9. It has become.
  • the optical image by the optical system 2 is imaged by the single-plate Bayer array CCD 3 as in the first embodiment, and only one type of color component is detected for each pixel.
  • the image of the plate state is stored in the veneer image buffer 4.
  • the line correction circuit 5 and the WB correction circuit 6 operate.
  • the operation is the same as that of the first embodiment.
  • the white balance coefficients Crg and Cbg are calculated and held while performing sensitivity correction between lines.
  • the interpolation circuit 7 performs an interpolation process on each pixel in the single-chip image buffer 4, which is also the same as in the first embodiment, and a color image in which the missing color component of each pixel is supplemented is obtained.
  • the color image buffer 8 is obtained.
  • the correction circuit 32 After that, the correction circuit 32 performs the processing.
  • the correction circuit 32 sequentially scans each pixel in the color image buffer 8, reads out a 3 ⁇ 3 pixel neighborhood of each pixel, and performs a process as shown in FIG.
  • the corrected RGB values are output to the image quality adjustment circuit 9.
  • a luminance value Y is calculated from RGB components for each pixel in the neighborhood of 3 ⁇ 3 pixels (step S71). To calculate this luminance value, the following standard definition formula is used:
  • Step S72 Where: j is an integer from 1 to 8.
  • dYkl is the smallest of dYO to dY8
  • dYk2 is the second smallest dYO to dY8
  • step S74 it is determined whether dYkl is greater than T1 and dYk2 ⁇ dYkl is smaller than T2 with respect to the predetermined thresholds Tl and T2 (step S74).
  • This condition indicates that the probability that the center pixel is perceived as an isolated point when the condition is satisfied is high! / ⁇ .
  • the correction value (R 0,, GO,, BO,) for the central pixel is calculated by the following Expression 14, and
  • RO, (Rkl + Rk2) / 2
  • step S74 if the condition is not satisfied in step S74, the RGB pixel value of the center pixel is output without correction (step S76), and the process ends.
  • the corrected RGB values output to the image quality adjustment circuit 9 in this way are adjusted by the image quality adjustment circuit 9 and then recorded by the recording circuit 10 as in the first embodiment, and all the processing ends.
  • the processing is performed by hardware (circuits and the like) inside the digital camera 31 which is an image processing apparatus. However, such processing is performed on a computer such as a PC (personal computer).
  • This software can be executed by an image processing program.
  • This software is the same as that described in the second embodiment with reference to FIGS.
  • the image stored in the memory I n I mg that is, the image immediately after being obtained by the single-plate Bayer array CCD 3, in which only one kind of color component is obtained in each pixel, is processed. Then, a three-color image is output to the memory Out Img.
  • the white balance coefficients Cr and Cb and the gain correction coefficients a and b between lines are given as parameters.
  • FIG. 16 shows the flow of the soft processing.
  • step S81 a memory tmp img for holding an intermediate result in the interpolation process is secured.
  • step S82 it is determined whether or not an unprocessed pixel exists in the memory I n I mg (step S82).
  • one of the unprocessed pixels is determined as a processing target pixel, and a block of 5 ⁇ 5 pixels centered on the processing target pixel is stored in the memory. Read from I n lmg (step S83).
  • the line-to-line correction is performed by performing the calculation by the above equation 8
  • the WB correction is performed by the calculation of the above equation 9 (step S 84).
  • step S85 an interpolation process is performed by a known method to generate three color components of RGB for each pixel.
  • step S86 the result of the interpolation processing is recorded at the corresponding pixel position in tmp img (step S86), and the flow returns to step S82 to shift to processing of another pixel.
  • step S87 if there is no unprocessed pixel in the memory I n I mg in step S82, it is further determined whether or not there is a pixel in the memory tmp i mg that has not been subjected to the correction process. Yes (step S87).
  • step S88 the data in the vicinity of 3 ⁇ 3 pixels centered on the uncorrected pixel is read out from the memory tmp img (step S88). Then, the correction processing as shown in FIG. 15 is performed (step S89), and the result of the correction processing is recorded in the corresponding pixel position of the memory Out I mg (step S90). The flow returns to 87 to proceed to the processing of the next unprocessed pixel.
  • step S87 no correction process has been performed in the memory tmp img. If no pixel exists, the memory area secured as tmpimg is released (step S91), and the process ends.
  • the interpolation circuit 7 has a function of generating an image having a smaller number of pixels than the image held in the single-chip image buffer 4, and when the function is operated, This is to skip the processing of the correction circuit 32.
  • the mode in which the number of pixels is reduced and output is provided as standard in a digital camera, as described above.
  • the interpolation circuit 7 thins out the pixels from the single-chip image buffer 4 and Processing is performed while reading. Then, even if there is a sensitivity difference between the G pixels, the effect on the processing result is reduced, and the processing of the correction circuit 32 is performed according to the thinning rate (that is, when the reduction rate is equal to or less than a predetermined threshold). By stopping the process, it is possible to improve processing efficiency and reduce power consumption without affecting image quality.
  • the single-chip imaging system has been described as an example.However, a two-chip imaging system or a three-chip pixel-shift imaging system may also be used. Correction processing can be performed.
  • effects similar to those of the first and second embodiments described above are obtained, and a side effect that may occur due to a sensitivity difference between pixels is reduced by performing interpolation processing according to the sensitivity difference.
  • the image quality can be improved more easily by directly correcting the side effect pattern that may occur after the capture processing, instead of changing and preventing it.
  • the pixel value of the neighboring pixel having a high degree of harmony is mixed with the pixel value of the pixel of interest. Side effects can be reduced favorably.
  • the correction process after interpolation is skipped, taking advantage of the fact that the side effect due to the sensitivity difference will not be noticeable in the end, and the processing efficiency will be reduced. Can be improved.
  • FIGS. 17 to 25 show a fourth embodiment of the present invention.
  • FIG. 17 is a block diagram showing the configuration of a digital camera
  • FIG. 18 is a block diagram showing one configuration example of a step difference correction circuit.
  • FIG. 19 is a diagram for explaining the G level difference
  • FIG. 20 is a flowchart showing the process of the level difference correction circuit
  • FIG. 21 is a diagram showing an example of the vicinity when performing the process in the level difference correction circuit
  • FIG. Is a diagram showing an example of a function for obtaining the correction amount ⁇
  • FIG. 23 is a block diagram showing another example of the configuration of the level difference correction circuit
  • FIG. 25 is a diagram for explaining the combination average calculated by the combination average calculation circuit.
  • FIG. 25 is a flowchart showing software processing performed by the computer.
  • the image processing apparatus is applied to a digital camera.
  • the digital camera 41 of the fourth embodiment differs from the digital camera 1 of the first embodiment in that a step difference correction circuit 43 and a noise reduction circuit 44 are provided instead of the line correction circuit 5. And is provided.
  • the analog video signal output from the single-panel bay array CCD 3 is gain-adjusted and then converted to a digital video signal.
  • the AZD conversion circuit 42 is explicitly provided, but this is also provided in the above-described digital cameras of the first to third embodiments, and the illustration is simply omitted. It is only.
  • the AZD conversion circuit 42, the level difference correction circuit 43, and the noise reduction circuit 44 are controlled by the control circuit 11 described above.
  • the step difference correction circuit 43 is for performing the sensitivity difference correction of the G component on the image stored in the single-chip image buffer 4.
  • the noise reduction circuit 44 is for performing noise reduction processing on the signal output from the level difference correction circuit 43.
  • the step difference correction circuit 43 includes a correction circuit 51, an average calculation circuit 52, a step amount estimation circuit 53, and a correction amount calculation circuit 54.
  • the average calculation circuit 52 is configured to read image data from the single-chip image buffer 4 in units of blocks of a predetermined size and calculate an average value of G components other than the pixel of interest. .
  • the step difference estimation circuit 53 estimates the amount of the sensitivity difference by calculating the difference between the average value calculated by the average calculation circuit 52 and the G component value of the pixel of interest. .
  • the correction amount calculation circuit 54 calculates a feature amount from the image data in block units read from the single-plate image buffer 4, obtains a threshold value based on the feature amount, and calculates the threshold value and the step amount estimation circuit. Based on the sensitivity difference amount of the G component estimated in 53 and, the sensitivity difference correction amount of the image data read in block units from the single-chip image buffer 4 is calculated.
  • the correction circuit 51 corrects the G component value of the pixel of interest based on the sensitivity difference correction amount calculated by the correction amount calculation circuit 54, and outputs the G component value to the noise reduction circuit 44.
  • the level difference correction circuit 43 reads out a 3 ⁇ 3 block area in the vicinity for each pixel of the single-plate image buffer 4. Then, the pixel located at the center of the read-out 3 ⁇ 3 size block area is set as the target pixel.
  • the level difference correction circuit 43 performs the level difference correction process as described below only when the color component of the target pixel is the G component.
  • the single-panel Bayer array CCD 3 has a color filter array as shown in Fig. 19 (A).
  • the G pixels (Gr. ) And the G pixel on the even-numbered row (denoted as Gb) may have a sensitivity difference even though they are for the same G component acquisition. That is, for example, even when a flat subject is photographed such that an output value of “128” is obtained for all pixels, a pixel value of “180” is obtained from Gr as shown in FIG. 19 (B).
  • Gb gives a pixel value of “100”, which may cause a difference between the pixel values of Gr and Gb.
  • Such a difference is hereinafter referred to as a G step.
  • the level difference correction circuit 43 corrects the G level difference in accordance with the flow as shown in FIG. 20, and outputs a corrected pixel value.
  • the level difference correction circuit 43 first determines whether or not the read central pixel of the neighborhood block is either Gr or Gb (step S101).
  • the average calculation circuit 52 calculates the G pixel G located at the four corners of the pixel array as shown in FIG.
  • the average value A g (feature amount) of 0 to G 3 is calculated and output to the step amount estimation circuit 53.
  • the step difference estimation circuit 53 calculates the difference between the average value Ag calculated by the average calculation circuit 52 and the value of the central pixel G4 of the neighboring block as the sensitivity difference as shown in the following Expression 16. Step amount d And outputs the calculated step amount d to the correction amount calculation circuit 54 (Step S102) [Equation 16]
  • the correction amount calculation circuit 54 first calculates the average value R, (feature amount) of R pixels and the average value B, (feature amount) of B pixels included in the neighborhood block. Then, the correction amount calculation circuit 54 refers to a prediction table (lookup table: LUT) stored in the internal ROM of the correction amount calculation circuit 54, using the average values R, B, and B as indices. Thereby, a threshold value F (amount of sensitivity difference) of a correction amount for performing an appropriate level difference correction is obtained (step S103).
  • the above prediction table shows the upper limit value of the step amount generated between the Gr pixel and the Gb pixel when shooting various subjects under various lighting conditions, and the surrounding R pixel value and B pixel value. It was created by organizing the relationship between and in advance.
  • the correction amount calculating circuit 54 is for correcting the G step based on the correction amount threshold F calculated as described above and the step amount d estimated by the step amount estimating circuit 53. Then, a correction amount ⁇ ⁇ (sensitivity difference correction amount) that is appropriate is calculated (step S104). This calculation is also performed by referring to a table stored in the internal ROM of the correction amount calculation circuit 54.
  • the table stored in the partial ROM is, for example, a table created by discretely approximating a function f (predetermined function) as shown in FIG. This function f (X; p) is a function of the independent variable X with p as a parameter.
  • the correction circuit 51 subtracts half of the correction amount ⁇ obtained from the correction amount calculation circuit 54 from the central pixel value G 4 to obtain the final step difference correction value G, as shown in the following Expression 17. 4 '
  • the calculated step amount d is V 2 ⁇ VI.
  • step S101 If it is determined in step S101 that the center pixel is neither Gr nor Gb, the pixel value of the center pixel is output to the noise reduction circuit 44 as it is (step S106).
  • step S105 or step S106 the processing of the G level difference correction ends.
  • the pixel value after performing the G level difference correction for each pixel of the single-plate image buffer 4 is sequentially input to the noise reduction circuit 44.
  • the noise reduction circuit 44 performs a noise reduction process caused by the characteristics of the single-plate Bayer array CCD 3 and outputs the result to the WB correction circuit 6.
  • the order of the processes of the WB correction circuit 6, the noise reduction circuit 44, and the level difference correction circuit 43 is not limited to the above-described order, and can be changed to an arbitrary order.
  • the threshold value F may be set to a fixed value instead of predicting the threshold value F based on the feature amount of the neighboring pixel.
  • a fixed value is stored in the internal ROM of the correction amount calculation circuit 54 instead of the table.
  • the use of such means is within the practical range.
  • the level difference correction circuit 43 may be configured as shown in FIG.
  • the level difference correction circuit 43 includes a correction circuit 51, a combination average calculation circuit 56, A difference selection circuit 57 and a correction amount calculation circuit 54 are provided.
  • the configuration shown in FIG. 23 has a configuration in which a combination average calculation circuit 56 and a difference selection circuit 57 are provided instead of the average calculation circuit 52 and the step difference estimation circuit 53 in the configuration shown in FIG. .
  • the combination average calculation circuit 56 includes a selector for selecting a specific combination of pairs of G pixels included in the vicinity of 3 ⁇ 3, and a circuit for calculating an average of each pair sequentially selected by the selector. It is configured.
  • the combination pairs selected by the combination average calculation circuit 56 and their average values are, for example, A 0 to A 5 (feature amounts) as shown in FIG. 24, that is, A 0 to A 5 A 5,
  • the average values A0 to A5 calculated by the combination average calculation circuit 56 in this way are output to the difference selection circuit 57.
  • the difference selection circuit 57 calculates the difference Di-G4—Ai (i is an integer from 0 to 5) between each of the average values AO to A5 received from the combination average calculation circuit 56 and the central pixel value G4, and Of these, Di having the smallest absolute value is output to the correction amount calculation circuit 54 as an amount corresponding to the step amount d in step S102 in FIG. Subsequent processing of the correction amount calculation circuit 54 and processing of the correction circuit 51 are the same as described above.
  • the processing is performed by hardware (circuits and the like) inside the digital camera 41 as an image processing apparatus.
  • a computer such as a PC (personal computer).
  • This software can be used to perform development processing on RAW data files obtained by converting analog output from single-chip Bayer CCD 3 into digital signals. It has become something.
  • FIG. 25 5 shows the flow of the shift process.
  • a first buffer and a second buffer are secured as working storage areas in a memory area of a PC, for example.
  • step S111 single-plate image data is read from the RAW data file and stored in the first buffer as a two-dimensional array.
  • step S112 by scanning the first buffer in the row direction and then in the column direction, it is determined whether or not an unprocessed pixel exists in the image data (step S112).
  • Step S113 the 3X3 block near the selected unprocessed pixel is read from the first buffer (step S113), and the level difference correction processing as shown in FIG. 20 is performed. (Step S114).
  • step S115 the step detection result is written to the address corresponding to the unprocessed pixel in the second buffer secured separately from the first buffer (step S115), and the process returns to step S112 to return to the next step.
  • a determination is made for unprocessed pixels.
  • step SI12 determines whether there are no unprocessed pixels in the first buffer. If it is determined in step SI12 that there are no unprocessed pixels in the first buffer, noise reduction processing is performed on the image in the second buffer, and the processing result is sent to the first buffer. Output (Step S116).
  • the interpolation processing of the missing color component is performed on the image in the first buffer, and the result is output to the second buffer (step S118).
  • image quality adjustment processing such as edge enhancement is performed on the image in the second buffer, and the result is output to the first buffer (step S119).
  • the image in the first buffer is output to the specified file (step S120), and this processing ends.
  • the difference in sensitivity between pixels that can obtain the same kind of color component is corrected before performing the interpolation process of the missing pixel.
  • the missing pixel can be interpolated satisfactorily with the effect of the difference in sensitivity reduced.
  • optimal sensitivity correction according to the sensitivity difference can be performed.
  • the degree of the sensitivity difference is determined based on the feature amount extracted from the data near the target pixel.
  • the optimum sensitivity correction according to the sensitivity difference can be performed.
  • the correspondence between the feature amount and the amount of the sensitivity difference is investigated in advance and tabulated, so that highly accurate sensitivity correction can be performed at high speed.
  • the circuit configuration is simplified.
  • the sensitivity can be corrected without much blurring.
  • the sensitivity difference correction amount is calculated using a function that becomes 0 when the absolute value of the sensitivity difference amount is equal to or greater than a certain threshold, a very large estimated value of the sensitivity difference becomes If obtained, the amendment can be stopped. As a result, it is possible to appropriately prevent the edge from being blurred by the correction as it is.
  • the feature value is calculated from the pixel values of pixels of a color component of a type different from that of the target pixel, it is possible to cope with a case where a sensitivity difference occurs due to a color component other than the target color component. It becomes possible.
  • an average value of N pixel values of pixels of the same kind of color component as the target pixel is calculated and used as a feature amount, and the difference between the N feature amounts and the pixel value of the target pixel is minimized. Since is set as the amount of the sensitivity difference, the amount of the sensitivity difference can be estimated with higher accuracy.
  • FIGS. 26 to 31 show Embodiment 5 of the present invention.
  • FIG. 26 is a block diagram showing the configuration of a digital camera
  • FIG. 27 is a block diagram showing an example of the configuration of a level difference smoothing circuit.
  • FIG. 28 is a flowchart showing the processing of the level difference smoothing circuit
  • FIG. 29 is a diagram showing an example of a function for calculating the coefficient mixing ratio
  • FIG. 30 is a filter set by the coefficient setting circuit.
  • FIG. 31 is a block diagram showing another example of the configuration of the step smoothing circuit.
  • the same components as those in the above-described first to fourth embodiments are denoted by the same reference numerals, and description thereof will be omitted. Only different points will be mainly described.
  • the image processing apparatus is applied to a digital camera.
  • the digital camera 61 of the fifth embodiment is different from the digital camera 41 of the fourth embodiment in that a step smoothing circuit 62 is provided in place of the step correction circuit 43. It has become.
  • the step smoothing circuit 62 is controlled by the control circuit 11. More specifically, as shown in FIG. 27, the level difference smoothing circuit 62 includes a filter circuit 71, a correction amount calculation circuit 72, and a coefficient setting circuit 73. .
  • the correction amount calculating circuit 72 calculates the average value R of R pixels (characteristic amount) with respect to the center 3 X 3 pixels of the image data read out from the single-chip image buffer 4 in blocks of 7 X 7 pixels.
  • the average value B of the B pixels is calculated, and the characteristic amount is further referred to a table stored in the internal ROM of the correction amount calculating circuit 72 based on these characteristic amounts.
  • a threshold F (amount of sensitivity difference) is obtained, and a coefficient mixture ratio ⁇ is calculated as a function of the threshold F.
  • the coefficient setting circuit 73 calculates a filter coefficient used in the calculation performed by the filter circuit 71 based on the coefficient mixture ratio a calculated by the correction amount calculation circuit 72.
  • the filter circuit 71 performs a predetermined operation on the image data read from the single-chip image buffer 4 using the filter coefficients calculated by the coefficient setting circuit 73, and smoothes the G step. It is.
  • step smoothing circuit 62 The processing of the step smoothing circuit 62 will be described with reference to FIG. Note that, in FIG. 28, the same reference numerals are given to portions that perform the same processing as in FIG. 20 of the fourth embodiment. Further, as described above, the step-smoothing circuit 62 reads a neighborhood 7 ⁇ 7 size block area for each pixel of the single-chip image buffer and performs the following processing. It has become.
  • the correction amount calculation circuit 72 first calculates the average value R and the B pixel of the R pixels included in the center 3 ⁇ 3 pixels in the neighborhood block. Calculate the average value of B, and. Then, the correction amount calculation circuit 72 uses the calculated average values R,, B, as an index, refers to the prediction table stored in the internal ROM, and obtains an appropriate threshold value F for the level difference correction amount. (Step S1311).
  • This prediction tape ⁇ / is the same as the prediction table described in step S103 of FIG. 20 of the fourth embodiment.
  • the correction amount calculation circuit 72 calculates a coefficient mixing ratio a for determining a filter to be applied in the subsequent filter circuit 71 as a function of the threshold value F of the step correction amount (step S 1 3 2).
  • An example of a preferable function is shown in FIG. 29 in which 1 is obtained when F is 0, and ⁇ is 0 when F is a certain value T or more. The meaning of the coefficient mixture ratio will be described later.
  • the coefficient setting circuit 73 calculates a filter coefficient used for the calculation performed by the filter circuit 71 based on the coefficient mixture ratio calculated by the correction amount calculation circuit 72.
  • the filter circuit 71 performs linear filtering on the 7 ⁇ 7 neighborhood block read from the single-chip image buffer 4 after first setting the data at the position where the G component is not obtained to 0.
  • the value output from the coefficient setting circuit 73 is used as the filter coefficient at this time.
  • the coefficient setting circuit 73 previously holds therein coefficients of two types of 7 ⁇ 7 filters in order to set filter coefficients used in the filter circuit 71.
  • One of the two types of filter coefficients is a coefficient P_i, j (where i and j are integers from 1 to 7).
  • the coefficients P—i, j are 1 only for P_4, 4 at the center of the filter, and 0 for the others.
  • the other one of the two types of filter coefficients is a coefficient Q—i, j (where i and j are integers from 1 to 7).
  • the coefficients Q—i, j are such that their sum is 2 and their horizontal or vertical characteristics are zero at the Nyquist frequency, as shown by the solid line curve L 0 in FIG. The coefficient is set to.
  • the output from the filter circuit 71 is the center where no correction is performed. This is the pixel value.
  • the coefficient setting circuit 73 calculates the coefficient P_i, j and the coefficient Q—i, j as described above using the coefficient mixture ratio ⁇ obtained from the correction amount calculation circuit 72 as shown in Expression 19. By mixing, new filter coefficients C—i, j are generated and output to the filter circuit 71 (step S133)
  • the filter circuit 71 performs linear filtering on the neighboring blocks based on the filter coefficients C—i, j output from the coefficient setting circuit 73. Specifically, the following processing is performed.
  • the filtering result V is calculated using the following equation (20).
  • the filtering result calculated by the filter circuit 71 is output to the noise reduction circuit 44.
  • FIG. 31 shows a configuration example of a circuit for performing such processing.
  • the step smoothing circuit 62 shown in FIG. 31 is different from the step smoothing circuit 62 shown in FIG. 27 in that, instead of the filter circuit 71 and the coefficient setting circuit 73, two steps are used. It is provided with filter circuits 71 a and 71 b and a mixing circuit 75, and the output of the correction amount calculating circuit 72 is connected to the mixing circuit 75.
  • the filter circuit 71a performs filtering by the coefficient P-i, j and outputs a result VI.
  • the filter circuit 71b performs filtering by the coefficient Q-i, j and outputs a result V2.
  • the mixing circuit 75 receives the coefficient mixing ratio from the correction amount calculation circuit 72 and Using the output VI from the path 71a and the output V2 from the filter circuit 71b, the final result V3 is calculated by the following equation '21, and the calculated result V3 is calculated by the above noise. This is output to the reduction circuit 4 4.
  • V 3 a X V 1 + (1-a) X V 2
  • the number of filters to be mixed is not limited to two, and may be three or more.
  • the correction amount calculating circuit 72 calculates a plurality of mixture ratios as a function of the threshold value F of the step correction amount.
  • a switching circuit is provided instead of the mixing circuit, and the outputs of the filter circuits 71a and 71b are switched off according to the coefficient mixing ratio ⁇ . It is also possible to change them.
  • a pixel having the same kind of color component as the target pixel is obtained by a filter coefficient set based on the amount of sensitivity difference. Since the linear filter is applied, the sensitivity difference can be corrected more reliably even if the sensitivity difference is estimated incorrectly, compared to the case where the sensitivity difference correction amount is added to the pixel value. It becomes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Color Television Image Signal Generators (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)
  • Studio Devices (AREA)
  • Image Processing (AREA)

Abstract

光学系により結像される光学像を撮像することにより、各画素につき1種類以上の色成分が欠落している画像を生成して出力するベイヤー配列CCD(3)と、このCCD(3)から単板画像バッファ(4)を介して出力される画像に対してライン間でのゲインの違いを補正するライン補正回路(5)と、このライン補正回路(5)からWB補正回路(6)を介して出力される単板画像データの各画素で欠落している色成分を近傍画素の情報から補間することによりカラー画像データを生成する補間回路(7)と、を備えるデジタルカメラ(1)に適用された画像処理装置。

Description

画像処理装置、 画像処理プログラム 技術分 5r
この発明は、 単板撮像系、 二板撮像系、 または三板画素ずらし撮像系から出力された画 像を処理して、 画素毎に 3色成分値をもつカラーデジタル画像を生成する画像処理装置、 画像処理プログラムに関する。 明
背景技術 書
デジタルカメラ等において多く使用されている単板撮像系は、 画素毎に異なる色フィル タを装着した単板撮像素子を用いたものであり、 撮像素子からの出力画像は、 各画素につ いて一種類の色成分値しかもっていない。 従って、 カラーデジタル画像を生成するために は、 各画素において欠落している色成分値を補う補間処理を行うことが必要となる。 この ような欠落している色成分値を補う補間処理が必要となるのは、 二板撮像系や三板画素ず らし撮像系を用いた装置の場合にも同様である。
この補間処理は、 工夫しないと、 最終的に得られるカラー画像にぼけや偽色などの劣ィ匕 が生じることがある。 そのために、 従来より種々の方法による補間処理が提案されており 、 大別すると、 エッジ検出の方法に基づくものと、 色相関の方法に基づくものと、 に分類 される。
エッジ検出に基づく技術としては、 例えば特開平 8— 2 9 8 6 6 9号公報に記載のもの が挙げられる。 該公報に記載の技術について、 図 3 2を参照して説明する。 図 3 2は、 ェ ッジ検出に基づく従来の補間処理を説明するための図である。
単板撮像素子が、 例えば図 3 2 (A) に示すような 3原色べィヤー (Bayer) 配列の色 フィルタを備えた単板べィヤー配列撮像素子であるとする。 このとき、 図 3 2 (B ) に示 すように、 注目画素である B 5の周囲に縦方向および横方向に沿った十字状の近傍をとつ て、 該注目画素に対する水平方向の Gに対する補間値 G hと、 垂直方向の Gに対する補間 値 G vと、 を次の数式 1に示すように推定する。
[数式 1 ]
G h = (G 4 + G 6 ) / 2 + ( 2 X B 5— B 3—B 7 ) / 4 Gv= (G2+G8) /2+ (2 XB 5-B 1 -B 9) /4
次に、 水平方向と垂直方向との何れの方向に段差が多いかを示す評価値 dH, dVを、 次の数式 2に示すように、
[数式 2]
dH= I G4 -G 6 | + | B 3— 2 XB 5+B 7 |
d V= I G 2— G8 I + I B 1— 2 XB 5+B 9 I
と計算する。 ここに、 記号 I X Iは、 Xの絶対値を表している。 こうして計算した評価値 d H, d Vの内の、 値が小さくより平坦であると判断された方向の補間値 G hまたは補間 値 Gvを用いるようになつている。
一方、 色相関に基づく技術としては、 例えば特開平 1 1— 2 1 55 1 2号公報に記載の ものが挙げられる。 この公報に記載の技術について、 図 3 3を参照して説明する。 図 33 は、 色相関に基づく従来の補間処理を説明するための図である。
図 33に示すように、 まず、 注目画素 Xの付近で、 撮像素子に構成された色フィルタの 色成分 (例えば、 原色系の色フィルタである場合には r, g, b) の内の何れか 2種類の 色成分 P, qの各成分値 Vp , Vq同士の間に、 係数 aqp, j3 qpを用いて表現される次の 数式 3、
隱式 3]
Vq = a qp X Vp + j3 qp
のような直線的な相関関係が成立すると仮定する。 ここに、 撮像素子に構成された色フィ ルタが例えば原色系の色フィルタである場合には、 p, qは r, g, bの何れかである。 また、 色成分 p, qに各々対応する成分値 Vp, Vqは、 注目画素 Xの近傍の画素におけ る値である。
そして、 注目画素 Xの周囲に設定した近傍 Uにおいて、 該近傍 U內の画素を、 得られて いる色成分 r, g, bの種類により分類して 3つの部分集合 Ur, Ug, Ubを形成し、 上記係数 aqp, i3qpを、 各部 ^合における画素値の平均 Ac (ここに、 cは r, g, b の何れか) と標準偏差 S c (ここに、 cは!:, g, bの何れ力) とに基づいて、 次の数式 4により推定する。
[数式 4]
aqp= Sq /Sp , β qp = Aq ― qp Ap
これは、 色成分 pの分布幅 (標準偏差 Sp ) に対する色成分 qの分布幅 (標準偏差 Sq ) の比が、 上記数式 3に示した直線的な相関関係の傾き a qpを与え、 さらに求められた傾 き a qpの直線は、 色成分 pの平均値 Ap と色成分 qの平均値 Aq とでプロットされる点を 通るという考えに基づくものである。
そして、 推定した a qp, j3 qpに基づき、 注目画素 Xにおいて欠落している色成分 mの値 Xm を、 該注目画素 Xにおいて得られている色成分 eの値 Xeから、 次の数式 5に示すよ うにして求める。
[数式 5 ]
Xm = ame X Xe + ]3 me
ここに、 m, eは、 それぞれ]:, g, bの何れかをとる。
このように、 色相関に基づく従来技術は、 注目画素の近傍における異なる色成分間の画 素値の相関を推定することを特徴としている。
ところで、 実際の撮像系では、 ライン間でゲインの差が生じたり、 同じ色フィルタを有 する画素同士であつてもフィルタの分光特性が微妙に異なつていたりすることがあるため に、 同じ色成分が得られるはずの画素間に感度ばらつきが生じることがある。
し力 し、 上述した従来技術は、 何れも、 注目画素で得られている色成分自体を特に補正 することなくそのまま補間処理の結果として用いているために、 注目画素において欠落す る色成分を求める際にも、 注目画素自体の情報が結果にそのまま反映される特性となって いる。 通常は、 各画素で元々得られている色成分の情報を、 変更することなくそのまま捕 間処理の結果に使う方が効率が良いのであるが、 同じ色成分が得られる画素で感度が異な つている場合には、 このような処理を行うと、 画素間の感度ばらつきがそのまま補間処理 の結果に反映されてしまうことになり、 うつすらと格子縞が見えるなどの副作用が生じて いた。
本発明は上記事情に鑑みてなされたものであり、 画素間の感度にばらつきがあつたとし てもその影響を低減して高精度な補間処理を行い得る画像処理装置、 画像処理プログラム を提供することを目的としている。 発明の開示
本発明による画像処理装置は、 単板撮像系、 二板撮像系、 または三板画素ずらし撮像系 によって光学像を撮像することにより得られた各画素につき 1種類以上の色成分が欠落し ている画像を処理する画像処理装置であって、 同じ色成分が得られている画素の間の感度 差を補正する感度補正手段と、 上記感度補正手段により補正された後の画像に対して各画 素において欠落する色成分を補う補間手段と、 を具備したものである。
また、 本発明による画像処理装置は、 単板撮像系、 二板撮像系、 または三板画素ずらし 撮像系によって光学像を撮像することにより得られた各画素につき 1種類以上の色成分が 欠落している画像を処理する画像処理装置であって、 注目画素の所定の近傍において指定 された種類の色成分に対し当該色成分が得られている画素の間の感度差の大小を判定する 判定手段と、 上記注目画素において欠落する色成分を補う処理を行うものであって該処理 を行う際に上記判定手段による判定結果に応じて処理内容を変更可能な補間手段と、 を具 備したものである。
さらに、 本発明による画像処理装置は、 単板撮像系、 二板撮像系、 または三板画素ずら し撮像系によつて光学像を撮像することにより得られた各画素にっき 1種類以上の色成分 が欠落している画像を処理する画像処理装置であって、 各画素において欠落する色成分を 補う補間手段と、 上記補間手段による結果に対して補正を行う補間後補正手段と、 を具備 したものである。
そして、 本発明による画像処理プログラムは、 コンピュータに、 単板撮像系、 二板撮像 系、 または三板画素ずらし撮像系によつて光学像を撮像することにより得られた各画素に つき 1種類以上の色成分が欠落している画像を処理させるための画像処理プログラムであ つて、 該コンピュータを、 同じ色成分が得られている画素の間の感度差を補正する感度補 正手段、 上記感度補正手段により補正された後の画像に対して各画素において欠落する色 成分を補う補間手段、 として機能させるための画像処理プログラムである。
また、 本 明による画像処理プログラムは、 コンピュータに、 単板撮像系、 二板撮像系 、 または三板画素ずらし撮像系によって光学像を撮像することにより得られた各画素につ き 1種類以上の色成分が欠落している画像を処理させるための画像処理プログラムであつ て、 該コンピュータを、 注目画素の所定の近傍において指定された種類の色成分に対し当 該色成分が得られている画素の間の感度差の大小を判定する判定手段、 上記注目画素にお いて欠落する色成分を補う処理を行うものであって該処理を行う際に上記判定手段による 判定結果に応じて処理內容を変更可能な補間手段、 として機能させるための画像処理プロ グラムである。
さらに、 本発明による画像処理プログラムは、 コンピュータに、 単板撮像系、 二板撮像 系、 または三板画素ずらし撮像系によって光学像を撮像することにより得られた各画素に つき 1種類以上の色成分が欠落している画像を処理させるための画像処理プログラムであ つて、 該コンピュータを、 各画素において欠落する色成分を捕う補間手段、 上記補間手段 による結果に対して補正を行う補間後補正手段、 として機能させるための画像処理プログ ラムである。 図面の簡単な説明
図 1は、 本発明の実施例 1におけるデジタルカメラの構成を示すプロック図。
図 2は、 本発明の実施例 2におけるデジタルカメラの構成を示すプロック図。
図 3は、 上記実施例 2における G段差検出回路の処理を示すフローチヤ一ト。
図 4は、 上記実施例 2における G段差検出回路および G補間回路における画素の分類を 示す図。
図 5は、 上記実施例 2における G補間回路の処理を示すフローチヤ一ト。
図 6は、 上記図 5に示した G補間回路の処理におけるステップ S 1 6の処理を説明する ための図。
図 7は、 上記実施例 2における重み計算回路による重み計算の方向を示す図。
図 8は、 上記実施例 2における R B補間回路の処理を示すフローチャート。
図 9は、 上記図 8に示した R B補間回路の処理におけるステップ S 3 1の画素選択を説 明するための図。
図 1 0は、 上記実施例 2において、 コンピュータにより行われるソフト処理を示すフロ 一チヤ一ト。
図 1 1は、 上記実施例 2において、 コンピュータにより行われる G補間ソフト処理を示 すフローチャート。 - 図 1 2は、 上記実施例 2において、 コンピュータにより行われる R B補間ソフト処理を 示すフローチヤ一ト。
図 1 3は、 本発明の実施例 3におけるデジタルカメラの構成を示すブロック図。
図 1 4は、 上記実施例 3における補正回路により処理を行う際に用いる画素の番号を示 す図。
図 1 5は、 上記実施例 3における補正回路の処理を示すフローチャート。
図 1 6は、 上記実施例 3において、 コンピュータにより行われるソフト処理を示すフロ 一チヤ一卜。 図 1 7は、 本発明の実施例 4におけるデジタル力メラの構成を示すプロック図。
図 1 8は、 上記実施例 4における段差補正回路の一構成例を示すブロック図。
図 1 9は、 上記実施例 4における G段差を説明するための図。
図 2 0は、 上記実施例 4における段差補正回路の処理を示すフローチヤ一ト。
図 2 1は、 上記実施例 4の段差補正回路における処理を行う際の近傍の例を示す図。 図 2 2は、 上記実施例 4において、 補正量△を求めるための関数の例を示す線図。 図 2 3は、 上記実施例 4における段差補正回路の他の構成例を示すプロック図。
図 2 4は、 上記実施例 4において、 組み合わせ平均計算回路により計算される組み合わ せ平均を説明するための図。
図 2 5は、 上記実施例 4において、 コンピュータにより行われるソフト処理を示すフロ
• « ヤ1 ■ト
図 2 6は、 本発明の実施例 5におけるデジタルカメラの構成を示すプロック図。
図 2 7は、 上記実施例 5における段差平滑ィ匕回路の一構成例を示すブロック図。
図 2 8は、 上記実施例 5における段差平滑化回路の処理を示すフローチャート。
図 2 9は、 上記実施例 5において、 係数混合比 αを算出するための関数の例を示す線図 図 3 0は、 上記実施例 5の係数設定回路により設定されるフィルタ係数の周波数特性を 説明するための図。
図 3 1は、 上記実施例 5における段差平滑ィ匕回路の他の構成例を示すブロック図。 図 3 2は、 エッジ検出に基づく従来の補間処理を説明するための図。
図 3 3は、 色相関に基づく従来の捕間処理を説明するための図。 発明を実施するための最良の形態
以下、 図面を参照して本発明の実施の形態を説明する。
【実施例 1】
図 1は本発明の実施例 1を示したものであり、 デジタル力メラの構成を示すプロック図 である。
この実施例 1は、 本発明の画像処理装置をデジタルカメラに適用したものである。 デジタルカメラ 1は、 図 1に示すように、 光学系 2と、 単板べィヤー配列 C C D 3と、 単板画像パッファ 4と、 ライン補正回路 5と、 WB補正回路 6と、 補間回路 7と、 カラー 画像バッファ 8と、 画質調整回路 9と、 記録回路 1 0と、 制御回路 1 1と、 を有して構成 されている。
上記光学系 2は、 被写体光束を集光するためのものである。
上記単板べィヤー配列 C C D 3は、 この光学系 2により結像される被写体像を光電変換 して撮像信号を出力するものである。
上記単板画像バッファ 4は、 この単板べィヤー配列 C C D 3から出力され図示しない A /D変換回路等によりデジタル化された画像データをー且記憶するものである。
上記ライン補正回路 5は、 この単板画像バッファ 4内に記憶されている画像に対して、 ライン間でのゲインの違いを補正する感度補正手段である。
上記 WB補正回路 6は、 このライン補正回路 5から出力される画像データに、 ホワイト パランス処理を行うものである。
上記補間回路 7は、 この WB捕正回路 6から出力される単板画像データにおいて各画素 で欠落している色成分を、 近傍画素の情報から補間することにより、 カラー画像データを 生成する補間手段である。
上記力ラ一画像バッファ 8は、 この捕間回路 7により補間された三板の力ラ一画像デー タを一旦記憶するためのものである。
上記画質調整回路 9は、 このカラ一画像バッファ 8に記憶されているカラ一画像に対し て、 色変換ゃェッジ強調などの画質調整処理を行うものである。
上記記録回路 1 0は、 この画質調整回路 9により画質を調整された三板のカラー画像デ ータを記録するものである。
上記制御回路 1 1は、 上述したような各回路を含むこのデジタルカメラ 1を統括的に制 御するための制御手段である。
このようなデジタルカメラ 1の作用は、 以下のようになつている。
このデジタルカメラ 1に設けられている図示しないシャツタボタンがユーザーにより押 下されると、 まず、 光学系 2による光学像が単板べィヤー配列 C C D 3により撮像されて 、 各画素当たり一種類の色成分しかない単板状態の画像が単板画像バッファ 4に記憶され る。
次に、 WB補正回路 6が動作して、 白色の被写体に対する R成分と G成分との比 Crg、 および B成分と G成分との比 Cbg、 をそれぞれ計算してホワイトバランス係数とする。 本 実施例では、 上記単板画像バッファ 4から所定サイズのプロック毎に画素値を読み出して 、 このプロック内において、 各画素で得られてレヽる色成分の種類別に画素値の平均をとる 処理を行う。
その結果、 各ブロックの平均色の R G B値が得られるが、 さらに R成分と G成分との比 、 および B成分と G成分との比を計算して、 これらの比が所定の関係を満たしているプロ ックのみを選ぶ。 そして、 選んだブロックの R成分と G成分との比、 および B成分と G成 分との比、 をさらに平均して、 最終的なホワイトバランス係数 Crgおよび Cbgを求める。 この手法自体は公知のものである。 ただし、 この計算中、 単板画像バッファ 4から画素値 を読み出す際に、 ライン補正回路 5が作用して、 画素値の補正を行う。
すなわち、 上記ライン補正回路 5は、 単板べィヤー配列 C C D 3からの信号読み出し時 に生じる偶数ラインと奇数ラインとの間のゲイン段差を補正するものであり、 回路にはそ の補正のための係数 (a, b ) が保持されている。 この係数は、 均一なグレー被写体を撮 影した際の単板画像バッファ 4内の画素値に対して、 奇数ラインで G成分が得られている 画素の画素値の平均を V 1、 偶数ラインで G成分が得られている画素の画素値の平均を V 2として、
[数式 6 ]
V 2 = a X V l + b
となるように予め算出されている。 この係数を用いて、 ライン捕正回路 5では奇数ライン で G成分が得られている画素の画素値 Vを、 偶数ラインの感度に合わせて次の数式 7に示 すように捕正して、
[数式 7 ]
V = a X V + b
この捕正後の画素値 (補正値) v, を WB捕正回路 6に出力する。
上述したような WB補正回路 6の処理が終了すると、 上記ホワイトパランス係数 Crg, Cbgは、 該 WB捕正回路 6内に保持される。
次に、 補間回路 7が単板画像バッファ 4内の各画素に対して補間処理を行う。 この捕間 回路 7が行う補間処理のアルゴリズムは、 上述した特開平 8— 2 9 8 6 6 9号公報に記載 されているものと同様であるが、 本実施例においては、 単板画像バッファ 4から 5ライン ずつ画素を読み出して補間回路 Ί内の図示しない内部パッファに記憶させ、 該パッファ内 のデータに対して補間処理を行うようにしている。
そして、 単板画像バッファ 4から内部バッファにデータを移す際に、 ライン補正回路 5 および WB捕正回路 6が動作して、 単板画像バッファ 4から読み出した画素値が変更され る。
その際は、 まず、 ライン補正回路 5が単板画像バッファ4から読み出した画素値 Vに対 する補正結果 (補正値) V ' として
[数式 8 ]
v, = a X v + b (読出画素が奇数ラインで G成分が得られている場合)
v ' = v (その他の場合)
を計算し、 さらに、 WB補正回路 6が、 このライン補正回路 5の補正結果 (捕正値) v, に対して出力 V " を、
[数式 9 ]
V " = ν ' (読出画素で G成分が得られている場合)
V " = CrgX ν ' (読出画素で R成分が得られている場合)
V " = CbgX v ' (読出画素で B成分が得られている場合)
と計算して、 補間回路 7の内部バッファに V " を書き込む処理を行う。
その後に、 補間回路 7によりカラー画像バッファ 8に出力されたカラー画像は、 画質調 整回路 9により色変換、 エッジ強調、 階調変換などの処理が施されて、 上記記録回路 1 0 により図示しない記録媒体に記録される。 このようにして、 デジタルカメラ 1の撮像動作 が完了する。
なお、 この実施例 1は、 基本的な構成や処理を述べたものであり、 本実施例には多くの 変形例が考えられる。 上記補間回路 7による処理は、 色成分 Gが得られている画素におい て、 画素値をそのまま補間処理後の G成分の値として用いるものであれば何でも良い。 また、 本実施例では単板撮像系を例に挙げたが、 二板撮像系や三板画素ずらし撮像系に 対しても同様の処理を適用することが可能である。
例えば二板撮像系の場合には、 二枚の撮像素子の一方からは全画素で G成分が得られ、 他方からは市松状に R成分と B成分とが得られる。 例えば R成分に対する感度差の補正は 、 単板べィヤー配列 C C D 3において市松状に得られる G成分に対して本実施例で述べた 感度補正と同様の技術を適用することができる。
さらに、 三板画素ずらし撮像系の場合には、 3枚の撮像素子の内の 2枚で G成分を取得 し、 残りの 1枚で市松状に R, B成分を取得して、 これらの情報から高精細な輝度成分を 生成するタイプのものがある。 この場合にも、 巿松状に得られる R, B成分の感度補正を 、 上述と同様に行うことができる。
このような実施例 1によれば、 同じ色成分が得られる画素の間で、 特にライン間におい て感度が異なっていても、 感度補正手段たるライン補正回路で補正してから補間手段たる 捕間回路の処理を行うようにしているために、 捕間後の画像に感度の相異が影響を及ぼす のを防いで、 より高品質な画像を得ることができる。
【実施例 2】
図 2から図 1 2は本発明の実施例 2を示したものであり、 図 2はデジタル力メラの構成 を示すブロック図、 図 3は G段差検出回路の処理を示すフローチャート、 図 4は G段差検 出回路および G補間回路における画素の分類を示す図、 図 5は G補間回路の処理を示すフ ローチャート、 図 6は上記図 5に示した G補間回路の処理におけるステップ S 1 6の処理 を説明するための図、 図 7は重み計算回路による重み計算の方向を示す図、 図 8は R B補 間回路の処理を示すフローチヤ一ト、 図 9は上記図 8に示した R B補間回路の処理におけ るステップ S 3 1の画素選択を説明するための図、 図 1 0はコンピュータにより行われる ソフト処理を示すフローチャート、 図 1 1はコンピュータにより行われる G補間ソフト処 理を示すフローチャート、 図 1 2はコンピュータにより行われる R B補間ソフト処理を示 すフローチヤ一トである。
この実施例 2において、 上述の実施例 1と同様である部分については同一の符号を付し て説明を省略し、 主として異なる点についてのみ説明する。
この実施例 2は、 上述した実施例 1と同様に、 画像処理装置をデジタル力メラに適用し たものである。
この実施例 2のデジタルカメラ 2 1は、 該実施例 1のデジタルカメラ 1に対して、 判定 手段であり特徴量計算手段たる G段差検出回路 2 2が付加されており、 補間回路 7に代え て補間手段たる G補間回路 2 3、 G画像バッファ 2 6、 および補間手段たる R B補間回路 2 7を設けた点が異なっている。
また、 上記 G補間回路 2 3は、 上記 G段差検出回路 2 2からの出力に基づき補間対象の 画素に関する重みを計算するための重付平均手段たる重み計算回路 2 4と、 この重み計算 回路 2 4により算出された重みに基づき重み付きの平均値を計算して補間対象の画素の画 素値とし G画像バッファ 2 6へ出力する重付平均手段たる平均回路 2 5と、 を有して構成 されている。
次に、 このようなデジタルカメラ 2 1の作用を、 上述した実施例 1と異なる点を主とし て説明する。
シャツタポタンがユーザーにより押下されると、 上記実施例 1と同様に、 光学系 2によ る光学像が単板べィヤー配列 C C D 3により撮像されて、 各画素当たり一種類の色成分し かない単板状態の画像が単板画像バッファ 4に記憶される。
次に、 ライン補正回路 5および WB補正回路 6が上記実施例 1と同様に動作して、 ホヮ イトバランス係数 Crg, Cbgが算出される。
次に、 G補間回路 2 3が動作する。 このときには、 まず、 単板画像バッファ 4に記憶さ れている画像データに係る各画素の、 周囲 5 X 5画素でなるブロックがこの G補間回路 2 3に設けられている内部バッファに読み込まれる。 その際に、 上述した実施例 1と同様に 、 ライン補正回路 5と WB補正回路 6とが作動して、 画素値の補正がなされ、 さらに G段 差検出回路 2 2が作動して、 G成分が得られる画素の偶数ラインと奇数ラインとの間の段 差の推定値が計算される。
この G段差検出回路 2 2による段差推定について、 図 3のフローチャートに沿って説明 する。
G段差検出回路 2 2は、 内部バッファに読み込まれた 5 X 5画素でなるブロック内の各 画素を、 得られている色成分毎に分類して、 分類毎に画素値の平均値を計算する。 その際 に、 G成分については、 図 4に示すように、 水平方向に隣接する画素から得られる色成分 が Rである場合を G 1、 水平方向に隣接する画素から得られる色成分が Bである場合を G 2、 として、 さらに 2種類に分類する。 従って、 計算される平均値は 4種類となり、 R成 分の平均値が Ar、 B成分の平均値が Ab、 G 1成分の平均値が Agl、 G 2成分の平均値 が Ag2、 である。 そして、 G 1または G 2に分類された画素については、 各分類内の画素 値の分散 Vgl, Vg2もそれぞれ計算する (ステップ S 1 ) 。
次に、 上記分散 Vgl, Vg2が、 両方ともある閾値 T以下である力否かを判断する (ステ ップ S 2 ) 。
ここで両方とも閾値 T以下であって、 プロックが比較的平坦であると判断された場合に は、 段差推定値 dを分類 G 1と G 2の平均値の差 Agl— Ag2として、 終了する (ステップ S 3 ) 。
また、 上記ステップ S 2において、 分散 Vgl, Vg2の少なくとも一方が閾値 Tを越える 場合には、 ブロックが平坦であるかどうかが不明である。 そこでさらに、 プロック内にお いて R成分と B成分とがおよそどれだけ違っているかを、 R成分が得られている画素の平 均値 Ar と、 B成分が得られている画素の平均値 Ab と、 の差分 I Ar - Ab |力 所定 の閾値 Trbよりも大きいか否かにより評価する (ステップ S 4 )。
ここで、 上記差分 I Ar — Ab Iが閾値 Trbよりも大きい場合には、 以下のような処理 を行う。
まず、 本実施例においては、 上記 G段差検出回路 2 2が、 種々の色の被写体を撮影して 各画像でライン間の G成分に段差 dがどれだけ生じるかを測定することにより得られたテ 一ブル T dを、 予め保持している。 これは、 上記 WB補正回路 6で処理する前にライン補 正回路 5によつて画像データに係るライン間の感度補正がなされていても、 ラインの偶奇 に応じて、 G成分が得られている画素の画素値に段差が生じることがあるためである。 そして、 R成分が得られている画素の平均値 Ar と B成分が得られている画素の平均値 Ab との差 p i (特徴量) と、 G l, G 2の両方を含む G成分の平均的な大きさ p 2 (特 徴量) と、 の 2つのインデックスに対して、 生じ得る G段差量 dを、 d = T d ( p 1 , p 2 ) のようにテーブル参照して、 取得する。 ここでは、 このテーブル参照を行って G段差 量のおよその推定値 dを求めたら、 この G段差検出の処理を終了する (ステップ S 5 )。 また、 上記ステップ S 4において、 上記差分 I Ar - Ab Iが閾値 Trb以下である場合 には、 G段差が生じているとしても、 それがどの程度あるのかをブロック内のデータから は推定することができないために、 G段差量 dを、 推定不能を表す一 2 5 5に設定して、 終了する (ステップ S 6 )。
このようにして、 5 X 5画素でなるプロックの読み出しと、 ライン間の G成分の段差量 の推定値 と、 が得られると、 G捕間回路 2 3力 ブロックの中心画素の G成分を計算し て、 G画像バッファ 2 6に書きこむ。 このような処理について、 図 5のフローチャートを 参照して説明する。
処理を開始すると、 プロックの中心画素の分類 が、 上記図 4に示した分類における G 1である力否かを判断する (ステップ S 1 1 ) 。 この分類 mは、 該図 4に例示したように 、 得られている色成分の種類と水平隣接画素の種類とに応じて、 R, G 1 , . G 2 , Bの 4 種類の何れかになる。
ここで分類 mが G 1である場合には、 中心画素の G成分の値 Vを、 プロックの中心画素 の画素値 U0 そのものとして (ステップ S 1 2 ) 、 終了する。
また、 上記ステップ S 1 1において、 ブロックの中心画素の分類 mが G 1でない場合に は、 該分類 mが図 4に示した分類における G 2である力否かをさらに判断する (ステップ ここでブロックの中心画素の分類 mが G 2である場合には、 G段差推定値 dがー 255 である力否か、 つまり推定不能に設定されているか否かを判断する (ステップ S 14) 。
G段差推定値 dがー 255でない場合には、 中心画素の G成分の値 Vを、 プロック中心 画素の画素値 U0 と G段差推定値 dとに基づいて V = U0 +dと推定し (ステップ S 15 ) 、 終了する。
一方、 上記ステップ S 14において、 G段差推定値 dが一 255である場合には、 中心 画素 (画素値が U0 となっている画素) に対する 3 X 3画素の近傍を図 6に示すようにと り、 この近傍の四隅にある G成分が得られている画素の画素値 Ul 〜U4 と、 該中心画素 の画素値 U0 との差分 dujを、 以下のように計算する。
duj= I U0 一 Uj I
ここに jは、 1から 4の整数である。 これらの差分の内の、 最小の差分を与える jにつ いて、 V= (UO +Uj ) ノ 2を中心画素の G成分の値とし (ステップ S 16) 、 終了す る。
上記ステップ S 13において、 ブロックの中心画素の分類 mが G 2でない場合には、 G 段差推定値 dがー 255であるか否か、 つまり推定不能に設定されている力否かを判断す る (ステップ S 17) 。
ここで G段差推定値 dがー 255でない場合には、 ブロック内の G 2に分類された画素 kの画素値 Uk を、 Uk =Uk +dと補正する (ステップ S 18) 。
また、 上記ステップ S 17において G段差推定値 dがー 255である場合には、 後述す るステップ S 20の計算で用いるパラメータ αを、 予め設定された値に対して 1/2倍す るとともに、 該ステップ S 20の計算で用いるパラメータ] 3を、 予め設定された値に対し て 2倍する (ステップ S 19) 。
上記ステップ S 18またはステップ S 19が終了したら、 重み計算回路 24が、 図 7 ( Α) 〜図 7 (D) に示すような中心画素の上下左右の各方向の重み Wj (jは 1から 4の 整数) を以下の数式 10に示すように計算する。
[数式 10]
E 1 = I B 5-B 7 I
+ α X ( I G4-G6 I一 mi n ( | G4-G6 |, | G2-G8 | ) )
+ β
13 E 2= I B 5 -B 9 I
+ a X ( I G 2-G 8 I -m n (I G4-G 6 G 2 -G8 I ) )
+ β
E 3 = I B 5-B 3 I
+ α X ( I G4-G 6 |一 m G 2-G 8 I ) )
+ β
E 4= I B 5 -B 1 I
+ a X ( I G 2 -G 8 | —m n ( I G4— G 6 G 2-G8 I ) )
+ 0
Wj = (1/E j ) / (∑ (1/E k) )
この数式 1 0における o; ]3は定数であり、 予め定められた値、 または上記ステップ S 1 9において変更された値をとる。 また、 Wの計算における jは上述したように 1から 4 の整数、 分母の和は 1から 4の整数 kに対してとっている。 なお、 この計算式は、 図 7 ( A) 〜図 7 (D) の配置に対するものであり、 中心画素の分類が Bであるときの例である が、 中心画素の分類が Rである場合には、 Bと Rとを置き換えて計算をすれば良い (ステ ップ S 20) 。
次に、 平均回路 2 5が、 上記ステップ S 20において計算した重み Wj を用いて、 各方 向にある画素の画素値を重み付けして、 以下の数式 1 1により最終的な中心画素の G成分 を計算する (ステップ S 2 1) 。
[数式 1 1]
Vg =W1 XG 6 +W2 XG8 +W3 XG4+W4 XG 2
Vb =W1 XB 7+W2 XB 9 +W3 XB 3 +W4 XB 1
V =Vg + (Vb 一 B 5) /2
このような一連の処理が単板画像バッファ 4内の画像の全画素に対して終了すると、 G 画像バッファ 2 6には G成分の欠落が補われた画像が得られる。 すると、 次に RB補間回 路 27が動作して、 全ての画素で欠落色成分のないカラー画像を生成しカラー画像バッフ ァ 8に記憶させる。
すなわち、 RB補間回路 2 7は、 G補間回路 2 3と同様に、 単板画像バッファ 4内の各 画素に対して、 まず、 該画素を中心とする 5 X 5画素でなるブロックを読み出す。 この読 み出し時には、 G補間回路 2 3と同様に、 ライン補正回路 5、 WB補正回路 6、 および G 段差検出回路 22が作動して、 5 X 5画素でなるプロックの変更後の画素値が該 RB補間 回路 27の図示しない内部バッファに得られるとともに、 ブロック内の G段差推定値 dも 得られる。
次に、 RB補間回路 27は、 読み出したプロックに対応する画素位置の G成分の値を G 画像バッファ 26から読み出して、 同様に図示しない内部バッファに記憶する。
その後、 RB補間回路 27は、 図 8に示すような処理により、 中央画素の欠落色成分を 求める。 この図 8に示す処理は、 ブロックの中央画素に対する指定された色成分 cの値を 、 内部バッファのデータから重み付け平均により計算するものである。
このとき、 画素位置によって欠落する色成分が異なるために、 RB補間回路 27は、 ブ ロックの中央画素の分類が、 Rの場合には c =Bとして、 Bの場合には c=Rとして、 G 1または G 2の場合には c = Rおよび c = Bの各々の指定に対して、 図 8に示す処理を実 行するようになっている。
以下では、 図 8に示す処理を順に説明する。
処理を開始すると、 プロック内において、 指定された色成分 cが得られている画素 P1 〜Pn (nは整数) を求める (ステップ S 31) 。 図 9 (B) は、 図 9 (A) に示すよう な配置のプロックにおける c =Rに対する結果を示したものである。 この場合には、 画素 PI 〜P6が得られるために、 nは 6となる。
次に、 ブロック内の G段差推定値 dがー 255, つまり推定不能に設定されているか否 かを判断する (ステップ S 32) 。
ここで、 G段差推定値 dがー 255である場合には、 後述するステップ S 34の計算で 用いるパラメータ γを予め設定された値の 2倍にするとともに、 後述するステップ S 35 の計算で用いるパラメータ δを予め設定された値の半分にする (ステップ S 33) 。 このステップ S 33の処理が終了する力、 または、 上記ステップ S 32において G段差 推定値 dが— 255でない場合には、 画素 P jに割り当てる重み Wjを、 以下の数式 12 に示すように計算する (ステップ S 34) 。
[数式 12]
Ej = I Gj -GO I +γ
Wj = (1/E j ) / (∑ (1/Ek) )
ここに、 Wの計算における jは 1から 4の整数、 分母の和は 1から 4の整数 kに対して とっている。 また、 γは定数であり、 予め定められた値、 または上記ステップ S 33で変 更された値をとる。
次に、 中央画素における欠落色成分 cの値 Vを、 以下の数式 13に示すように計算する 。 この数式 13において、 C jおよび G jは、 画素 P jにおいて得られている色成分 cお ょぴ Gの値である (ステップ S 35) 。
式 13]
Vc =∑Wj XCj (jは 1から nの整数)
Vg =GO-∑Wj XGj (jは 1から nの整数)
V =Vc + δ XVg
ここに δは定数であり、 予め定められた値、 または上記ステップ S 33で変更された値 をとる。
ここまでの処理が単板画像バッファ 4内の画像の全ての画素に対して終了すると、 カラ 一画像バッファ 8には全画素で欠落色成分が復元されたカラー画像、 すなわち、 いわゆる 三板のカラー画像が得られる。
その後の作用は上述した実施例 1と同様であり、 得られたカラー画像が画質調整回路 9 により色変換、 エッジ強調、 階調変換などの処理を施され、 記録回路 10により図示しな い記録媒体に記録されて、 このデジタルカメラ 21の撮像動作が完了する。
なお、 上述では、 画像処理装置であるデジタルカメラ 21の内部のハードウェア (回路 等) により処理を行うようにしているが、 このような処理を、 PC (パーソナルコンビュ ータ) 等のコンピュータ上で画像処理プログラムにより行うようにすることも可能である 。 図 10〜図 12はコンピュータにより行われるソフト処理の例を示すフローチャートで ある。
このソフトウェア処理は、 メモリ I n I mgに記憶されている画像、 つまり、 単板べィ ヤー配列 CCD 3により得られた直後の、 各画素で一種類の色成分し力得られていない画 像、 を処理して、 メモリ Ou t I mgに 3色カラー画像を出力するものである。 ただし、 ホワイトパランス係数 C r, Cbおよびライン間のゲイン捕正係数 a, bは、 パラメータ として与えられるものとする。
以下では、 図 10〜図 12のフローチャートの各ステップについて説明する。
まず、 図 10は、 ソフト処理の流れの概要を示している。
すなわち、 処理を開始すると、 この処理の途中で全画素に対する G成分をまず計算する ことになるために、 該計算結果を記憶するためのメモリ G imgを確保する (ステップ S 41) 。
次に、 後で図 11を参照して説明するような G補間ソフト処理を実行する (ステップ S 42) o
さらに、 後で図 12を参照して説明するような RB補間ソフト処理を実行する (ステツ プ S 43) 。
その後、 確保したメモリ G i mgを開放してから (ステップ S 44) 、 このソフト処理 を終了する。
次に、 図 1 1を参照して、 上記ステップ S 42における G補間ソフト処理の詳細につい て説明する。
処理を開始すると、 メモリ I n I mg内に未処理の画素が存在するカゝ否かを判断する ( ステップ S 51) 。
ここで、 メモリ I n I mg內に未処理の画素が存在している場合には、 該未処理の画素 の内の 1つを処理対象画素として決定し、 この処理対象画素を中心とした 5 X 5画素でな るブロックの画像データを読み出す (ステップ S 52) 。
そして、 上記数式 8を計算することによりライン間補正を行うとともに上記数式 9を計 算することにより WB補正を行う (ステップ S 53) 。
さらに、 上記図 3に示したような G段差推定処理を行うことにより、 段差推定値 dを計 算する (ステップ S 54) 。
この G段差推定結果に基づいて図 5に示したような G補間処理を行い (ステップ S 55 ) 、 処理後の G補間結果 Vをメモリ G i mg中の処理対象画素に対応する位置の画素値と して記録してから (ステップ S 56) 、 上記ステップ S 51に戻る。
また、 上記ステップ S 51において、 メモリ I n Img内の画像の処理が全て終了して いる場合には、 この処理を終了する。
続いて、 図 12を参照して、 上記ステップ S 43における RB補間ソフト処理の詳細に ついて説明する。
処理を開始すると、 メモリ I n I mg内に未処理の画素が存在するカゝ否かを判断する ( ステップ S 61) 。
ここで、 メモリ I n I mg内に未処理の画素が存在している場合には、 該未処理の画素 の内の 1つを処理対象画素として決定し、 この処理対象画素を中心とした 5 X 5画素でな るブロックの画像データをメモリ I n I mgおよびメモリ G i m gからそれぞれ読み出す (ステップ S 6 2 ) 。
そして、 上記数式 8を計算することによりライン間補正を行うとともに上記数式 9を計 算することにより WB補正を行う (ステップ S 6 3 ) 。
さらに、 上記図 3に示したような G段差推定処理を行うことにより、 段差推定値 dを計 算する (ステップ S 6 4 ) 。
その後、 ブロックの中央画素の種類が Rである力否かを判断し (ステップ S 6 5 ) 、 R でない場合には、 c = Rとしてから上記図 8に示したような R B捕間処理を行い、 その補 間結果をメモリ O u t I m gの対応する画素の R成分として記録する (ステップ S 6 6 ) このステップ S 6 6が終了するか、 または上記ステップ S 6 5において中央画素の種類 が Rである場合には、 プロックの中央画素の種類が Bである力否かを判断する (ステップ S 6 7 ) 。
ここで、 中央画素の種類が Bである場合には、 そのまま上記ステップ S 6 1へ戻り、 一 方、 中央画素の種類が Bでない場合には、 c = Bとしてから上記図 8に示したような R B 補間処理を行い、 その捕間結果をメモリ O u t I m gの対応する画素の B成分として記録 してから (ステップ S 6 8 ) 上記ステップ S 6 1へ戻る。
そして、 上記ステップ S 6 1において、 メモリ I n I m g内の画像の処理が全て終了し ている場合には、 この処理を終了する。
なお、 この実施例は幾つかの変形が可能である。 好ましい変形例の一つは、 G補間回路 2 3および R B補間回路 2 7が単板画像バッファ 4に保持される画像よりも画素数の少な い画像を生成する機能を有するものであって、 該機能を働カゝせる場合に、 G段差検出回路 2 2の処理をスキップすることである。 画素数を少なくして出力するモードは、 デジタル カメラにおいては標準的に備えられたものであり、 この場合には、 G補間回路 2 3および R B補間回路 2 7が単板画像バッファ 4から画素を間引いて読み出しながら処理すること になる。 すると、 G画素に感度差があっても処理結果への影響が少なくなるために、 間引 き率に応じて (つまり、.縮小率が所定の閾値以下である場合に) G段差検出回路の処理を 中止し、 段差推定値として d =— 2 5 5を出力するようにすることにより、 処理効率を向 上し消費電力を低減することが可能となる。
また、 本実施例では単板撮像系を例に挙げたが、 二板撮像系や三板画素ずらし撮像系に 対しても同様の処理を適用することが可能である。 例えば二板撮像系の場合には、 二枚の撮像素子の一方からは全画素で G成分が得られ、 他方からは巿松状に R成分と B成分とが得られる。 このときには、 図 3のステップ S 1か らステップ S 3の処理を変更して、 偶数ラインの R画素と奇数ラインの R画素との間の平 均値の差を検出して、 その検出量に応じて感度差補正を行うようにすれば良い。
さらに、 三板画素ずらし撮像系の場合には、 3枚の撮像素子の内の 2枚で G成分を取得 し、 残りの 1枚で市松状に R, B成分を取得して、 これらの情報から高精細な輝度成分を 生成するタイプのものがある。 この場合にも、 市松状に得られる R, B成分の感度補正を 、 上記二板撮像系の場合と同様に行うことができる。
そして、 感度補正を G成分以外のこうした R成分や B成分について行うときには、 上記 テーブルは、 指定された色成分に対する特徴量と感度差の量とを対応付けたテーブルとな るのは勿論である。
また、 重付平均手段たる重み計算回路 2 4および平均回路 2 5における重みの計算法は 、 重みが、 判定手段である上記 G段差検出回路 2 2において感度差が大きいと判定された 種類の色成分が得られている画素に対して小さくなるようなものであれば他の方法に変更 しても良い。 例えば、 重みの計算式は、 数式 1 0以外に、 上記近傍内で同種の色成分が得 られている画素間の画素値差分に対する他の形の関数式でも良い。 但し、 上記 G段差検出 回路 2 2により特定の色成分に対して感度差が大きいと判定された場合には、 該関数式は 、 当該色成分に関する上記画素値差分の影響が小さくなるように変更することが望ましい 。 さらに、 上記 G段差検出回路 2 2において感度差があると判定された種類の色成分が得 られている画素に対する重みの計算は、 最終的に G画素間の重みが均等に近づくように計 算されることが望ましく、 それは数式 1 0では^の調整で実現できているが、 もちろん他 の計算式を用いても良い。
このような実施例 2によれば、 上述した実施例 1と同様に、 同じ色成分が得られる画素 で感度が異なっていても、 感度補正手段で補正してから補間手段の処理を行うようにして いるために、 補間後の画像に感度の相異が影響を及ぼすのを防いで、 より高品質な画像を 得ることができる。
その上、 この実施例 2によれば、 補間手段による処理を行う前に、 判定手段により同じ 色成分が得られる画素に大きな感度差がある力否かを判定して、 大きな感度差があると判 断された場合に、 捕間手段の処理を、 該感度差の影響を受け難い処理に変更しているため に、 つまり、 元々得られている色成分の値を注目画素の感度が所定の基準感度である場合 にとるはずの値に補正して補間結果に用いるような処理に変更しているために、 処理効率 をあまり落とすことなく、 最終的に得られる画像の画質を向上することができる。
さらに、 感度差の有無に応じて補間処理の際の重みを変更するようにしているために、 感度差があると判断された部分とそうでない部分との画質が大きく切り替わらない自然な 処理を、 簡単な処理回路で行うことが可能となる。
その際、 感度の異なる画素の重みが互いに等しくなるような計算を行っているために、 結果として副作用を少なくすることができる。
また、 この捕間処理では、 複数の色成分の情報を用いて欠落する色成分の値を推定して いるが、 その際に感度の異なる画素を含む色成分に対する情報の利用の割合を小さくする ようにしているために、 格子縞が見えるなどの副作用を起き難くすることができる。 さらに、 重み計算を同色画素の差分に基づいて行っているが、 その計算においても、 デ ータとして信頼性が低い、 感度差のある同色画素の差分の影響を小さくするようにしてい るために、 結果的に生じる副作用を抑制することができる。
加えて、 感度差を生じる原因には種々のものがある力 注目画素の近傍における画素値 のパターンが特定の条件を満たす場合に感度差が生じ易いことがあるために、 該近傍がこ うしたパターンとなっているかどうかを特徴量を使って判定して、 該パターンであると判 断される率が高いほど感度差も大きいと判断することにより、 局所的に生じる感度差に対 しても副作用が生じないように処理することを可能にしている。
その際、 感度差を生じ易い近傍の画素値パターンに関して、 該パターンに対して生じる 感度差とパターンの特徴量とを関連付けてテーブルとして保持しておくことにより、 感度 差の大小をより確実に判断することができる。
また、 感度差を生じる画素の位置関係が分かっていることを利用して、 位置毎に別々に 統計を取って、 その結果同士を比較しているので、 感度差が生じている力否かを確実に判 断することができる。 例えばべィヤー配列の場合には、 隣接する R, Bからの電荷の漏れ に影響されて、 ライン間の Gに感度差を生じることがあるが、 このような段差を検出する ことが可能となる。
さらに、 画素数を減らして結果を記録する場合には、 最終的に感度差に起因する副作用 が目立たなくなることを利用して、 感度差判定処理をスキップしているために、 処理の効 率を向上させている。
【実施例 3】 図 1 3から図 1 6は本発明の実施例 3を示したものであり、 図 1 3はデジタルカメラの 構成を示すプロック図、 図 1 4は補正回路により処理を行う際に用いる画素の番号を示す 図、 図 1 5は捕正回路の処理を示すフローチャート、 図 1 6はコンピュータにより行われ るソフト処理を示すフローチヤ一トである。
この実施例 3において、 上述の実施例 1, 2と同様である部分については同一の符号を 付して説明を省略し、 主として異なる点についてのみ説明する。
この実施例 3は、 上述した実施例 1と同様に、 画像処理装置をデジタル力メラに適用し たものである。
この実施例 3のデジタルカメラ 3 1は、 該実施例 1のデジタルカメラ 1に対して、 補間 後補正手段たる補正回路 3 2を、 カラ一画像パッファ 8と画質調整回路 9との間に付加し たものとなっている。
次に、 このようなデジタルカメラ 3 1の作用を、 上述した実施例 1と異なる点を主とし て説明する。
シャツタポタンがユーザーにより押下されると、 上記実施例 1と同様に、 光学系 2によ る光学像が単板べィヤー配列 C C D 3により撮像されて、 各画素当たり一種類の色成分し かなレヽ単板状態の画像が単板画像パッファ 4に記憶される。
次に、 ライン補正回路 5および WB補正回路 6が動作するが、 その作用は上記実施例 1 と同様であり、 ライン間の感度補正を行いながらホワイトバランス係数 Crg, Cbgを算出 して保持する。
続いて、 補間回路 7が、 単板画像バッファ 4内の各画素に対して補間処理を行うが、 こ れも実施例 1と同様であり、 各画素の欠落色成分が補われたカラー画像が、 カラー画像パ ッファ 8に得られる。
その後に、 補正回路 3 2が処理を行う。 この補正回路 3 2は、 カラー画像バッファ 8中 の各画素を順にスキャンして、 各画素の 3 X 3画素でなる近傍を読み出し、 図 1 5に示す ような処理を行うことにより、 中央画素の補正 R G B値を画質調整回路 9に出力するもの である。
以下では、 図 1 5のフローチャートの各ステップについて説明する。
処理を開始すると、 3 X 3画素でなる近傍内の各画素に対して、 R G B成分から輝度値 Yを計算する (ステップ S 7 1 ) 。 この輝度値の計算には、 次のような標準的な定義式、
Yj = 0 . 3 X Rj + 0 . 6 X Gj + 0 . 1 X B j を用いる。 なお、 各画素に対しては、 図 14に示すような番号が割り振られる。 以下では 、 各画素に関する値を、 その画素番号の沿え字を用いて j =0〜8などと表すことにする 次に、 中央画素と周辺画素との輝度差 (これは、 注目画素の画素値と近傍画素の画素値 との相関を示している。 ) を
dYj = | YO-Yj I
として計算する (ステップ S 72) 。 ここに; jは、 1から 8の整数である。
そして、 以下の条件 (1) , (2) 、
(1) dYklは dYOから dY8 の内で一番小さい
(2) dYk2は dYOから dY8 の内で 2番目に小さい
を満たすような整数 k l, k 2を探す (ステップ S 73) 。
次に、 所定の閾値 Tl, T2に対して、 dYklが T 1よりも大きく、 力、つ dYk2—dY klが T2よりも小さくなる力否かを調べる (ステップ S 74) 。 この条件は、 満たされた 場合に、 中央画素が孤立点であると知覚される確率が高!/ヽことを示す条件となっている。 ここで、 条件が満たされて孤立点と判断された場合には、 中央画素に対する補正値 (R 0, , GO, , BO, ) を、 以下の数式 14によって計算して、
[数式 14]
RO, = (Rkl + Rk2) /2
GO' = (Gkl + Gk2) /2
BO' = (Bkl+Bk2) /2
この計算結果を出力し終了する (ステップ S 75)。
一方、 上記ステップ S 74において、 条件が満たされていない場合には、 中央画素の R GB画素値を無補正のまま出力して (ステップ S 76) 、 終了する。
こうして画質調整回路 9に出力された捕正 RGB値は、 上述した実施例 1と同様に、 画 質調整回路 9で調整された後に記録回路 10により記録され、 全ての処理が終了する。 なお、 上述では、 画像処理装置であるデジタルカメラ 31の内部のハードウェア (回路 等) により処理を行うようにしているが、 このような処理を、 PC (パーソナルコンビュ ータ) 等のコンピュータ上で画像処理プログラムにより行うようにすることも可能である このソフトウェアは、 上述した実施例 2において図 10〜図 12を参照して説明したも のと同様に、 メモリ I n I mgに記憶されている画像、 つまり、 単板べィヤー配列 CCD 3により得られた直後の、 各画素で一種類の色成分しか得られていない画像、 を処理して 、 メモリ Ou t Imgに 3色カラー画像を出力するものである。 ただし、 ホワイトバラン ス係数 C r, Cbおよびライン間のゲイン補正係数 a, bは、 パラメータとして与えられ るものとする。
以下では、 図 16のフローチャートの各ステップについて説明する。 この図 16は、 ソ フト処理の流れを示したものである。
この処理を開始すると、 まず、 補間処理における中間結果を保持しておくためのメモリ tmp imgを確保する (ステップ S 81) 。
次に、 メモリ I n I mg内に未処理の画素が存在する力否かを判断する (ステップ S 8 2) 。
ここで、 未処理の画素が存在する場合には、 該未処理の画素の内の 1つを処理対象画素 として決定し、 この処理対象画素を中心とした 5 X 5画素でなるブロックを上記メモリ I n lmgから読み出す (ステップ S 83) 。
そして、 メモリ I n Imgから読み出したプロック内の画素に対して、 上記数式 8によ る計算を行うことによりライン間補正を行うとともに、 上記数式 9による計算を行うこと により WB補正を行う (ステップ S 84) 。
続いて、 公知の方法により補間処理を行って、 各画素について RGBの 3色成分を生成 する (ステップ S 85) 。
その後、 補間処理の結果を tmp img内の対応画素位置に記録して (ステップ S 86 ) 、 上記ステップ S 82に戻り他の画素の処理に移行する。
一方、 上記ステップ S 82において、 メモリ I n I mg内に未処理の画素が存在しない 場合には、 さらに、 メモリ tmp i mg内に捕正処理を受けていない画素が存在する力否 かを判断する (ステップ S 87) 。
ここで、 補正処理が行われていない画素が存在する場合には、 この未補正処理の画素を 中心とした 3 X 3画素でなる近傍のデータをメモリ tmp imgから読み出して (ステツ プ S 88) 、 上記図 15に示したような捕正処理を行い (ステップ S 89) 、 この補正処 理の結果をメモリ Ou t I mgの対応画素位置に記録してから (ステップ S 90) 、 上記 ステップ S 87へ戻って次の未処理の画素の処理へ移行する。
また、 上記ステップ S 87において、 メモリ tmp i mg内に補正処理を受けていない 画素が存在しない場合には、 t m p i m gとして確保していたメモリ領域を開放してから (ステップ S 9 1 ) 、 終了する。
なお、 この実施例は幾つかの変形が可能である。 好ましい変形例の一つは、 補間回路 7 が単板画像バッファ 4に保持される画像よりも画素数の少ない画像を生成する機能を有す るものであって、 該機能を働力せる場合に、 補正回路 3 2の処理をスキップすることであ る。 画素数を少なくして出力するモードは、 上述したように、 デジタルカメラにおいては 標準的に備えられたものであり、 この場合には、 補間回路 7が単板画像バッファ 4から画 素を間引いて読み出しながら処理することになる。 すると、 G画素に感度差があっても処 理結果への影響が少なくなるために、 間引き率に応じて (つまり、 縮小率が所定の閾値以 下である場合に) 補正回路 3 2の処理を中止するようにすることで、 画質に影響を及ぼす ことなく、 処理効率を向上し消費電力を低減することが可能となる。
また、 本実施例では単板撮像系を例に挙げたが、 二板撮像系や三板画素ずらし撮像系に 対しても.、 各方式に応じた補間処理でカラー画像を得た後に、 同様の補正処理を行うこと が可能である。
このような実施例 3によれば、 上述した実施例 1, 2とほぼ同様の効果を奏するととも に、 画素間の感度差によって生じる可能性がある副作用を、 補間処理を感度差に応じて変 更して防ぐのではなく、 捕間処理後に生じる可能性のありそうな副作用のパターンを直接 補正するようにしたために、 画質の改善をより簡易的に行うことができる。
また、 近傍画素と注目画素とが調和している力、否かを、 相関により調べて、 調和度の高 い近傍画素の画素値を注目画素の画素値に混合するようにしているために、 副作用を良好 に減らすことができる。
さらに、 画素数を減らして結果を記録する場合には、 最終的に感度差に起因する副作用 が目立たなくなることを利用して、 補間後の補正処理をスキップしているために、 処理の 効率を向上することができる。
【実施例 4】
図 1 7から図 2 5は本発明の実施例 4を示したものであり、 図 1 7はデジタル力メラの 構成を示すプロック図、 図 1 8は段差補正回路の一構成例を示すプロック図、 図 1 9は G 段差を説明するための図、 図 2 0は段差補正回路の処理を示すフローチャート、 図 2 1は 段差補正回路における処理を行う際の近傍の例を示す図、 図 2 2は補正量△を求めるため の関数の例を示す線図、 図 2 3は段差補正回路の他の構成例を示すプロック図、 図 2 4は 組み合わせ平均計算回路により計算される組み合わせ平均を説明するための図、 図 2 5は コンピュータにより行われるソフト処理を示すフローチヤ一トである。
この実施例 4において、 上述の実施例 1〜 3と同様である部分については同一の符号を 付して説明を省略し、 主として異なる点についてのみ説明する。
この実施例 4は、 上述した実施例 1と同様に、 画像処理装置をデジタルカメラに適用し たものである。
この実施例 4のデジタルカメラ 4 1は、 図 1 7に示すように、 該実施例 1のデジタル力 メラ 1に対して、 ライン補正回路 5に代えて段差補正回路 4 3とノィズ低減回路 4 4とを 設けたものとなっている。 また、 単板べィヤー配列 C C D 3と単板画像バッファ 4との間 には、 該単板べィヤー配列 C C D 3から出力されるアナログの映像信号をゲイン調整して からデジタルの映像信号に変換するための AZD変換回路 4 2が明示して設けられている が、 これは上述した第 1カ ら第 3の実施例のデジタル力メラにおいても同様に設けられて いて、 ただ単に図示を省略していただけのものである。 そして、 これら AZD変換回路 4 2、 段差補正回路 4 3、 およびノイズ低減回路 4 4は、 上記制御回路 1 1により制御され るようになっている。
上記段差補正回路 4 3は、 単板画像バッファ 4内に記憶されている画像に対して、 G成 分の感度差補正を行うためのものである。
上記ノイズ低減回路 4 4は、 この段差補正回路 4 3から出力される信号にノイズ低減処 理を行うためのものである。
上記段差補正回路 4 3は、 より詳しくは図 1 8に示すように、 補正回路 5 1と、 平均計 算回路 5 2と、 段差量推定回路 5 3と、 補正量算出回路 5 4と、 を有して構成されている 上記平均計算回路 5 2は、 上記単板画像バッファ 4から所定サイズのプロック単位で画 像データを読み出して、 注目画素以外の G成分の平均値を算出するものである。
上記段差量推定回路 5 3は、 上記平均計算回路 5 2により算出された平均値と、 注目画 素の G成分値と、 の差を算出することにより、 感度差の量を推定するものである。
上記補正量算出回路 5 4は、 上記単板画像パッファ 4から読み出したプロック単位の画 像データから特徴量を算出し、 該特徴量に基づいて閾値を求め、 この閾値と、 上記段差量 推定回路 5 3により推定された G成分の感度差の量と、 に基づいて、 上記単板画像バッフ ァ 4からブロック単位で読み出した画像データの感度差補正量を計算するものである。 上記補正回路 51は、 上記補正量算出回路 54により計算された感度差補正量に基づい て、 注目画素の G成分値を感度差補正し、 上記ノイズ低減回路 44へ出力するものである このようなデジタルカメラ 41の作用について、 上述した各実施例と異なる部分を説明 する。
段差補正回路 43は、 単板画像パッファ 4の各画素毎に、 近傍 3 X 3サイズのプロック 領域を読み出す。 そして、 読み出した 3 X 3サイズのブ口ック領域の中心に位置する画素 を注目画素とする。 該段差補正回路 43は、 注目画素の色成分が G成分である場合にのみ 、 以下に示すように段差補正処理を行うようになっている。
また、 ここで、 図 19を参照して、 G段差について説明する。 単板べィヤー配列 CCD 3は、 図 19 (A) に示すような色フィルタ配列を有しているが、 センサの特性上、 ある 撮影条件下では、 図中の奇数行目の G画素 (Grと記載している) と、 偶数行目の G画素 (Gbと記載している) と、 の間に、 同じ G成分取得用であるにも関わらず、 感度差が付 いてしまうことがある。 すなわち、 例えば全ての画素について 「128」 の出力値が得ら れるような平坦な被写体を撮影した場合でも、 図 19 (B) に示すように、 Grからは 「 180」 の画素値が得られ、 Gbからは 「100」 の画素値が得られて、 Grと Gbとの 画素値に差が生じてしまうことがある。 このような差のことを、 以下では G段差と呼ぶこ とにする。
段差捕正回路 43は、 図 20に示したような流れに沿って、 この G段差を補正して、 補 正された画素値を出力するようになっている。
すなわち、 段差補正回路 43は、 図 20に示す処理を開始すると、 まず、 読み出した近 傍プロックの中心画素が G rまたは Gbの何れかである力否かを判断する (ステップ S 1 01) 。
ここで、 中心画素が Grまたは Gbの何れかである場合には、 平均計算回路 52が、 次 の数式 15に示すように、 図 21に示すような画素配列の 4隅に位置する G画素 G 0〜G 3の平均値 A g (特徴量) を算出して、 段差量推定回路 53へ出力する。
[数式 15]
Ag= (G0+G1+G2+G3) /4
段差量推定回路 53は、 上記平均計算回路 52により算出された平均値 A gと、 近傍ブ ロックの中心画素 G 4の値との差を、 次の数式 16に示すように感度差の量たる段差量 d として算出し、 算出した段差量 dを補正量算出回路 54へ出力する (ステップ S 102) [数式 16]
d=Ag-G4
補正量算出回路 54は、 まず、 近傍プロックに含まれる R画素の平均値 R, (特徴量) と B画素の平均値 B, (特徴量) とを算出する。 そして、 補正量算出回路 54は、 これら の平均値 R, , B, をインデックスにして、 該補正量算出回路 54の内部 ROMに記憶さ れている予測テーブル (ルックアップテーブル: LUT) を参照することにより、 適切な 段差補正を行うための補正量の閾値 F (感度差の量) を求める (ステップ S 103) 。 な お、 上記予測テーブルは、 種々の照明条件で種々の被写体を撮影した際の、 Gr画素と G b画素との間に生じた段差量の上限値と、 周囲の R画素値および B画素値と、 の関係を予 め整理して作成されたものである。
次に、 補正量算出回路 54は、 上述したように算出した補正量の閾値 Fと、 上記段差量 推定回路 53により推定された段差量 dと、 に基づいて、 G段差を実際に補正するために 適切な補正量△ (感度差補正量) を算出する (ステップ S 104) 。 この算出も、 該補正 量算出回路 54の内部 ROMに記憶されているテーブルを参照することにより、 行うよう になっている。 この內部 ROMに記憶されているテーブルは、 例えば、 図 22に示すよう な関数 f (所定の関数) を離散近似して作成されたテーブルとなっている。 この関数 f ( X ; p) は、 pをパラメータとする独立変数 Xの関数であり、 I X Iが p以下のときに f (X ; p) = x、 I X Iが (閾値) 以上のときに 0となるような関数である。 なお、 I X Iが ρよりも大きく、 α ρ (閾値) よりも小さいときには、 これらを連続に結ぶ (例 えば直線で結ぶ) ような関数形状となっている。 ここに、 I X Iは Xの絶対値を示し、 ο; は予め定められた 1以上の定数となっている。 補正量算出回路 54は、 このような関数 f に対応するテーブルを x = d, p = Fとして参照することにより、 実質的に△= f (d ; F) として補正量△を求め、 求めた補正量△を上記補正回路 51へ出力する。
続いて、 補正回路 51は、 次の数式 17に示すように、 上記補正量算出回路 54から得 られた補正量△の半分を、 中央画素値 G 4から減算して最終的な段差補正値 G 4' を算出 し、
[数式 17]
G4' =G4— Δ/2 その後に、 この値 G4, を中央画素値として、 上記ノイズ低減回路 44へ出力する (ステ ップ S 105) 。
仮に、 被写体が平坦な場合で、 図 21に示したプロックにおける近傍 G 0〜G 3が同じ 値 VIをとるものとし、 中央画素 G 4が値 V 2をとるとすると、 上記ステップ S 102に より算出される段差量 dは V 2—VIとなる。 この V 2— VIの絶対値がステップ S 10 3で計算される閾値 F以下である場合には、 上記ステップ S 105により算出される補正 量厶は 2—¥ 1に一致する。 従って、 ステップ S 105で算出される G4, の値は、 V 2- (V2-V 1) /2= (V1+V2) 2となる。 このように、 段差量が閾値 Fより も小さい場合には、 補正結果は G r画素の画素値と G b画素の画素値との平均値に近付く ように補正されるのが、 本実施例における G段差捕正処理の特徴となっている。
また、 上記ステップ S 101において、 中心画素が G rと Gbとの何れでもないと判断 された場合には、 中央画素の画素値をそのままノイズ低減回路 44へ出力する (ステップ S 106) 。
こうして、 上記ステップ S 105またはステップ S 106の処理が行われたところで、 この G段差補正の処理を終了する。
段差捕正回路 43により上述したような処理が行われると、 ノィズ低減回路 44には、 単板画像バッファ 4の各画素に対して G段差補正を行った後の画素値が順次入力される。 ノィズ低減回路 44は、 単板べィヤー配列 CCD 3の特性に起因するノィズ低減処理を行 つて、 結果を WB捕正回路 6へ出力する。
その後の処理は、 上述した実施例 1と同様である。
なお、 本実施例は、 多くの変形例が考えられる。 例えば、 WB補正回路 6やノイズ低減 回路 44と段差補正回路 43の処理の順番は、 上述したものに限られるものではなく、 任 意の順番となるように変更することが可能である。
また、 回路を簡単化するための変形例としては、 段差補正回路 43による処理ステップ S 103において、 閾値 Fを、 近傍画素の特徴量に基づいて予測する代わりに、 固定値に することが考えられる。 この場合には、 補正量算出回路 54の内部 ROMには、 テーブル の代わりに、 固定値が記憶されることになる。 単板べィヤー配列 CCD 3の特性によって は、 このような手段を用いても実用可能範囲内となる。
あるいは、 段差補正回路 43を、 図 23に示すように構成しても良い。 この図 23に示 す構成例では、 段差補正回路 43は、 補正回路 51と、 組み合わせ平均計算回路 56と、 差分選択回路 57と、 補正量算出回路 54と、 を有して構成されている。 つまり、 この図 23に示す構成は、 上記図 18に示した構成における平均計算回路 52および段差量推定 回路 53に代えて、 組み合わせ平均計算回路 56および差分選択回路 57を設けた構成に なっている。
上記組み合わせ平均計算回路 56は、 3X 3近傍に含まれる G画素のペアの特定の組み 合わせを選択するセレクタと、 このセレクタにより順次選択される各ペアの平均を算出す る回路と、 を備えて構成されている。 この組み合わせ平均計算回路 56により選択される 組み合わせペアとその平均値とは、 例えば図 24に示すような A 0〜A 5 (特徴量) 、 つ まり、 次の数式 18に示すような A 0〜A 5、
[数式 18]
AO= (GO+G1) /2
A 1 = (G0+G2) /2
A2= (G1+G3) /2
A3= (G2+G3) /2
A4= (G 1 +G 2) /2
A5= (GO+G3) /2
となる。 こうして組み合わせ平均計算回路 56により算出された各平均値 A 0〜A 5は、 差分選択回路 57へ出力される。
差分選択回路 57は、 組み合わせ平均計算回路 56から受け取った各平均値 AO〜A 5 と中心画素値 G4との差 Di -G4— Ai ( iは 0から 5までの整数) をそれぞれ計算し て、 これらの中から絶対値が最小となる Di を、 上記図 20のステップ S 102における 段差量 dに相当する量として、 補正量算出回路 54へ出力する。 その後の補正量算出回路 54の処理おょぴ補正回路 51の処理は、 上述と同様である。
なお、 上述では、 画像処理装置であるデジタノレカメラ 41の内部のハードウェア (回路 等) により処理を行うようにしているが、 このような処理を、 PC (パーソナルコンビュ ータ) 等のコンピュータ上で画像処理プログラムにより行うようにすることも可能である このソフトウェアは、 単板べィヤー配列 CCD 3からのアナログ出力をデジタル信号に 変換して得られた RAWデータファイルに対して、 現像処理を行うものとなっている。 以下では、 図 25のフローチャートの各ステップについて説明する。 この図 25は、 ソ フト処理の流れを示したものである。
なお、 この処理を行うに当たって、 例えば PCのメモリ領域に、 作業用の記憶領域とし て、 第 1バッファと第 2バッファとが確保されているものとする。
この処理を開始すると、 まず、 RAWデータファイルから、 単板状態の画像データを読 み込んで、 第 1バッファに 2次元配列として格納する (ステップ S 1 11) 。
次に、 第 1バッファをまず行方向にスキャンし、 次に列方向にスキャンすることにより 、 画像データ内に未処理画素が存在するカゝ否かを判断する (ステップ S 1 12) 。
ここで、 未処理画素がある場合には、 選択した未処理画素の近傍 3 X 3ブロックを第 1 バッファから読み出して (ステップ S 1 13) 、 上記図 20に示したような段差補正処理 を行う (ステップ S 1 14) 。
そして、 段差捕正結果を、 第 1バッファとは別に確保された第 2バッファ内の未処理画 素に対応するァドレスに書き込んでから (ステップ S 1 15) 、 上記ステップ S 112へ 戻つて次の未処理画素に対する判断を行う。
一方、 上記ステップ S I 12において、 第 1バッファ内に未処理画素がないと判断され た場合には、 第 2バッファの画像に対してノイズ低減処理を行レヽ、 その処理結果を第 1バ ッファへ出力する (ステップ S 116) 。
次に、 この第 1バッファの画像に対して、 ホワイトパランス (WB) を補正する処理を 行って、 その結果を再び第 1バッファへ出力する (ステップ S 117) 。
さらに、 第 1バッファの画像に対して、 欠落色成分の補間処理を行い、 その結果を第 2 バッファへ出力する (ステップ S 1 18) 。
続いて、 第 2バッファの画像に対して、 エッジ強調などの画質調整処理を行って、 その 結果を第 1バッファへ出力する (ステップ S 1 19) 。
そして、 第 1バッファの画像を、 指定されたファイルへ出力して (ステップ S 120) 、 この処理を終了する。
このような実施例 4によれば、 上述した実施例 1〜 3とほぼ同様に、 同種の色成分が得 られる画素間の感度の相違を、 欠落画素の補間処理を行う前に、 補正するようにしたため に、 欠落画素の補間を感度の相違の影響を低減した状態で良好に行うことができる。 また、 注目画素と、 該注目画素と同種の色成分の画素と、 の感度差がどの程度あるのか を推定するようにしたために、 感度差に応じた最適な感度補正を行うことができる。 この とき、 感度差がどの程度あるのかを、 注目画素近傍のデータから抽出した特徴量に基づい て推定するようにしたために、 感度差に応じた最適な感度補正を行うことができる。 そして、 特徴量と感度差の量との対応関係を予め調査してテーブル化しておくようにし たために、 高精度な感度補正を高速に行うことが可能となる。
さらに、 感度差の量から所定の関数により感度差補正量を算出して、 算出した感度差補 正量を注目画素の画素値に加算して感度補正を行うようにしたために、 回路構成が簡単に なり、 力つボケをあまり生じることなく感度補正を行うことができる。
このとき、 感度差の量の絶対値がある閾値以上の場合に 0となるような関数を用いて感 度差補正量を算出するようにしているために、 非常に大きな感度差の推定値が得られた場 合に、 補正を中止することができる。 これにより、 そのまま補正してエッジがぼけてしま うのを適切に防止することができる。
また、 特徴量を、 注目画素と異なる種類の色成分の画素の画素値から計算するようにし たために、 注目している色成分以外の色成分の要因で感度差が生じる場合にも対応するこ とが可能となる。
さらに、 注目画素と同種の色成分の画素の画素値の N個の平均値を計算して特徴量とし 、 N個の特徴量と注目画素の画素値との差の絶対値が最小となる差を感度差の量とするよ うにしたために、 より高精度に感度差の量を推定することができる。
【実施例 5】
図 2 6から図 3 1は本発明の実施例 5を示したものであり、 図 2 6はデジタル力メラの 構成を示すプロック図、 図 2 7は段差平滑化回路の一構成例を示すプロック図、 図 2 8は 段差平滑化回路の処理を示すフローチャート、 図 2 9は係数混合比ひを算出するための関 数の例を示す線図、 図 3 0は係数設定回路により設定されるフィルタ係数の周波数特性を 説明するための図、 図 3 1は段差平滑ィ匕回路の他の構成例を示すプロック図である。 この実施例 5において、 上述の実施例 1〜4と同様である部分については同一の符号を 付して説明を省略し、 主として異なる点についてのみ説明する。
この実施例 5は、 上述した実施例 1と同様に、 画像処理装置をデジタルカメラに適用し たものである。
この実施例 5のデジタル力メラ 6 1は、 図 2 6に示すように、 上記実施例 4のデジタル カメラ 4 1に対して、 段差補正回路 4 3に代えて段差平滑ィ匕回路 6 2を設けたものとなつ ている。 そして、 この段差平滑ィ匕回路 6 2は、 上記制御回路 1 1により制御されるように なっている。 上記段差平滑化回路 6 2は、 より詳しくは図 2 7に示すように、 フィルタ回路 7 1と、 捕正量算出回路 7 2と、 係数設定回路 7 3と、 を有して構成されている。
上記補正量算出回路 7 2は、 上記単板画像バッファ 4から 7 X 7画素のプロック単位で 読み出した画像データの中心 3 X 3画素に対して、 R画素の平均値 R, (特徴量) と B画 素の平均値 B, (特徴量) とを算出し、 さらに、 これらの特徴量から該補正量算出回路 7 2の内部 R OMに記憶されたテーブルを参照して適切な段差補正量の閾値 F (感度差の量 ) を求め、 この閾値 Fの関数として係数混合比 αを算出するものである。
上記係数設定回路 7 3は、 上記補正量算出回路 7 2により算出された係数混合比 aに基 づいて、 上記フィルタ回路 7 1で行う計算に用いるフィルタ係数を算出するものである。 上記フィルタ回路 7 1は、 上記係数設定回路 7 3により算出されたフィルタ係数を用い て、 上記単板画像バッファ 4から読み出した画像データに所定の演算を行い、 G段差の平 滑化を行うものである。
このような段差平滑ィヒ回路 6 2の処理について、 図 2 8を参照して説明する。 なお、 こ の図 2 8において、 上記実施例 4の図 2 0と同様の処理を行う部分については、 同一の符 号を付している。 また、 この段差平滑ィ匕回路 6 2は、 上述したように、 単板画像バッファ の各画素毎に、 近傍 7 X 7サイズのブ口ック領域を読み出して、 以下に示すような処理 を行うようになっている。
この処理を開始すると、 まず、 上記ステップ S 1 0 1の処理を行って、 中心画素が G r または G bである力否かを確認する。
ここで、 中心画素が G rまたは G bである場合には、 補正量算出回路 7 2は、 まず、 近 傍プロック内の中心 3 X 3画素に含まれる R画素の平均値 R, と B画素の平均値 B, とを 算出する。 そして、 補正量算出回路 7 2は、 算出した平均値 R, , B, をインデックスに して、 内部 R OMに記憶している予測テーブルを参照し、 適切な段差補正量の閾値 Fを求 める (ステップ S 1 3 1 ) 。 この予測テープ^/は、 上記実施例 4の図 2 0のステップ S 1 0 3において説明した予測テーブルと同一である。
次に、 補正量算出回路 7 2は、 後段のフィルタ回路 7 1で適用されるフィルタを決定す るための係数混合比 aを、 段差捕正量の閾値 Fの関数として算出する (ステップ S 1 3 2 ) 。 好ましい関数の一例としては、 Fが 0のときに が 1、 Fがある値 T以上で αが 0と なる図 2 9に示すようなものを挙げることができる。 なお、 係数混合比の意味については 、 後で説明する。 続いて、 係数設定回路 7 3は、 補正量算出回路 7 2により算出された係数混合比ひに基 づいて、 フィルタ回路 7 1により行う計算に用いるフィルタ係数を算出する。 つまり、 フ ィルタ回路 7 1は、 単板画像バッファ 4から読み出した 7 X 7近傍プロックに対して、 ま ず G成分の得られていない位置のデータを 0にセットした上で線形フィルタリングを行う が、 このときのフィルタ係数として、 該係数設定回路 7 3から出力された値を用いるよう になっている。
係数設定回路 7 3は、 フィルタ回路 7 1で用いるフィルタ係数を設定するために、 予め 内部に、 2種類の 7 X 7フィルタの係数を保持している。 2種類のフィルタ係数の内の 1 つは、 係数 P_i, j ( i , jは各々 1から 7までの整数) である。 この係数 P— i, jは、 フィ ルタの中心に当たる P_4, 4のみが 1であり、 その他は 0の値をとる係数となっている。 ま た、 2種類のフィルタ係数の内の他の 1つは、 係数 Q— i, j ( i , jは各々 1から 7までの 整数) である。 この係数 Q— i, jは、 総和が 2であって、 かつ、 その水平方向または垂直方 向の特性が、 図 3 0において実線で示す曲線 L 0のように、 ナイキスト周波数で 0となる ように設定された係数となっている。
従って、 係数 P— i, jを用いて、 単板画像バッファ 4から読み出した 7 X 7近傍をフィル タリングした場合には、 フィルタ回路 7 1から出力されるのは、 何の捕正もされない中央 画素の値である。
—方、 係数 Q_i, jを用いて、 単板画像パッファ 4から読み出した 7 X 7近傍をフィルタ リングした場合には、 ナイキスト周波数付近の周波数成分だけを急に落とし、 その他の周 波数成分にはあまり影響を与えないような平滑ィヒがなされる。 G r画素と G b画素とに段 差が生じている場合は、 その影響が主にナイキスト周波数付近に現れる。 そのために、 フ ィルタリングを行った結果、 段差の影響は平滑化されて取り除かれるが、 エッジ部のボケ はあまり生じていないような中央画素の G成分値が得られる。
係数設定回路 7 3は、 上述したような係数 P_i, jと係数 Q— i, jとを、 上記補正量算出回 路 7 2から取得した係数混合比 αを用いて数式 1 9に示すように混合することにより、 新 たなフィルタ係数 C— i, jを生成して、 フィルタ回路 7 1へ出力する (ステップ S 1 3 3 )
[数式 1 9 ]
C— i, j= a X P一 i, j+ ( 1 - α ) X Q_i, j
この数式 1 9と、 図 2 9に示したような係数混合比 αと、 によれば、 近傍プロック内で 大きな段差が発生している場合には、 この段差が取り除かれる係数 Q—i, jに近い特性の図 3 0の点線に示す曲線 L 1のようなフィルタ係数がフィルタ回路 7 1へ出力される。 一方 、 近傍プロック内で段差がほとんど発生していない場合は、 係数 P— i, jに近い特性の図 3 0の一点鎖線に示す曲線 L 2のようなフィルタ係数がフィルタ回路 7 1へ出力される。 こ のようなフィルタ係数の混合を行うことにより、 帯域劣化と段差補正とが最適にバランス された処理を常に行うことが可能となる。
フィルタ回路 7 1は、 上述したように、 係数設定回路 7 3から出力されたフィルタ係数 C—i, jに基づいて、 近傍ブロックに対して線形フィルタリングを行う。 具体的には、 次の ような処理を行う。 ここに、 7 X 7近傍プロックの左上隅の座標を (1, 1 ) としたとき の位置 (i, j ) ( i , jは 1から 7までの整数) における画素値を x—i,jとする。 まず 、 G成分が得られていない位置における画素値 x—i,jを 0にセットする。 その後、 次のよ うな数式 2 0を用いて、 フィルタリング結果 Vを計算する。
[数式 2 0 ] ί=1ゾ =1
こうしてフィルタ回路 7 1により計算されたフィルタリング結果 が、 ノイズ低減回路 4 4へ出力される。
なお、 この実施例においても種々の変形を行うことが可能である。 例えば、 係数を混合 した後に、 混合された係数を用いてフィルタリングするのではなく、 2種類の係数を用い てそれぞれフィルタリングを行い、 フィルタリングされた結果を混合するようにして構わ ない。 図 3 1は、 このような処理を行うための回路の構成例を示している。
すなわち、 図 3 1に示す段差平滑ィ匕回路 6 2は、 上記図 2 7に示した段差平滑ィ匕回路 6 2に対して、 フィルタ回路 7 1および係数設定回路 7 3の代わりに、 2つのフィルタ回路 7 1 a , 7 1 bおよび混合回路 7 5を設けたものであり、 また、 補正量算出回路 7 2の出 カは該混合回路 7 5へ接続されている。
上記フィルタ回路 7 1 aは、 上記係数 P—i,jによるフィルタリングを行って、 結果 V I を出力するものである。
上記フィルタ回路 7 1 bは、 上記係数 Q—i,jによるフィルタリングを行って、 結果 V 2 を出力するものである。
混合回路 7 5は、 上記補正量算出回路 7 2から係数混合比ひを受けて、 上記フィルタ回 路 7 1 aからの出力 V Iと上記フィルタ回路 7 1 bからの出力 V 2とを用いて、 以下のよ うな数式' 2 1により最終結果 V 3を算出し、 算出した結果 V 3を上記ノィズ低減回路 4 4 へ出力するものである。
[数式 2 1 ]
V 3 = a X V 1 + ( 1 - a ) X V 2
また、 図 2 7に示した構成と、 図 3 1に示した構成と、 の何れにおいても、 混合するフ ィルタの数は 2つに限るものではなく、 3つ以上であっても構わない。 この場合には、 補 正量算出回路 7 2は、 複数の混合比を段差補正量の閾値 Fの関数として算出する。
さらに簡単な回路としては、 図 3 1に示す構成において、 混合回路の代わりに切換回路 を設けて、 係数混合比 αに応じてフィルタ回路 7 1 aとフィルタ回路 7 1 bとの出力を切 り換えるようにすることも可能である。
加えて、 図 2 5の処理において、 ステップ S 1 1 4の段差補正処理として、 上記図 2 0 に示したような処理を行う代わりに、 図 2 8に示したような処理を行うことにより、 本実 施例に対応するソフトウェア処理を実現することが可能となる。
このような実施例 5によれば、 上述した実施例 4とほぼ同様の効果を奏するとともに、 感度差の量に基づレ、て設定したフィルタ係数により、 注目画素と同種の色成分の画素に線 形フィルタを適用するようにしたために、 感度差補正量を画素値に加算する場合に比べて 、 感度差の推定を間違った場合であっても、 より確実に感度差を補正することが可能とな る。
なお、 本発明は上述した実施例に限定されるものではなく、 発明の主旨を逸脱しない範 囲内において種々の変形や応用が可能であることは勿論である。 産業上の利用可能性
以上説明したように本発明の画像処理装置、 画像処理プログラムによれば、 画素間の感 度にばらつきがあつたとしてもその影響を低減して高精度な補間処理を行うことが可能と なる。

Claims

請 求 の 範 囲
1 . 単板撮像系、 二板撮像系、 または三板画素ずらし撮像系によって光学像を撮像する ことにより得られた、 各画素につき 1種類以上の色成分が欠落している画像、 を処理する 画像処理装置であって、
同じ色成分が得られている画素の間の感度差を補正する感度補正手段と、
上記感度捕正手段により捕正された後の画像に対して、 各画素において欠落する色成分 を捕う補間手段と、
を具備したことを特徴とする画像処理装置。
2. 単板撮像系、 二板撮像系、 または三板画素ずらし撮像系によって光学像を撮像する ことにより得られた、 各画素につき 1種類以上の色成分が欠落している画像、 を処理する 画像処理装置であって、
注目画素の所定の近傍において、 指定された種類の色成分に対し、 当該色成分が得られ ている画素の間の感度差の大小を判定する判定手段と、
上記注目画素において欠落する色成分を補う処理を行うものであって、 該処理を行う際 に、 上記判定手段による判定結果に応じて処理内容を変更可能な補間手段と、
を具備したことを特徴とする画像処理装置。
3 . 上記補間手段は、 上記注目画素で得られている色成分に対して、 上記近傍内で当該 色成分が得られている画素の中から基準画素を定め、 上記注目画素の当該色成分に対する 感度を上記基準画素の当該色成分に対する感度に合わせた場合に上記注目画素がとるはず の当該色成分の画素値を補正値として計算し、 上記判定手段により判定された感度差の大 小に応じて、 上記注目画素の当該色成分の画素値を、 .上記補正値に変更するものであるこ とを特徴とする請求の範囲第 2項に記載の画像処理装置。
4. 上記補間手段は、 上記所定の近傍内の画素値を重み付け平均する重付平均手段を有 して構成されており、 該重付平均手段は、 上記判定手段の判定結果に応じて重みを変更し 重み付け平均により注目画素の画素値を算出するものであることを特徴とする請求の範囲 第 2項に記載の画像処理装置。
5 . 上記重付平均手段は、 上記重みを、 上記判定手段において感度差が大きいと判定さ れた種類の色成分が得られている画素に対して小さくなるように変更するものであること を特徴とする請求の範囲第 4項に記載の画像処理装置。
6 . 上記重付平均手段は、 上記重みを、 上記近傍内で同種の色成分が得られている画素 間の画素値差分の関数式として計算するものであって、 上記判定手段により特定の色成分 に対して感度差が大きいと判定された場合には、 該関数式を、 当該色成分に関する上記画 素値差分の影響が小さくなるように変更するものであることを特徴とする請求の範囲第 4 項に記載の画像処理装置。
7. 上記重付平均手段は、 上記判定手段において感度差があると判定された種類の色成 分が得られている画素に対して、 上記重みが当該画素間で均等に近付くように変更するも のであることを特徴とする請求の範囲第 4項に記載の画像処理装置。
8 . 上記判定手段は、 上記注目画素の所定の近傍内の画素値から所定の特徴量を計算す る特徴量計算手段を有して構成されており、 該特徴量の大小に基づいて上記感度差の大小 を判定するものであることを特徴とする請求の範囲第 2項に記載の画像処理装置。
9 . 上記判定手段は、 指定された色成分に関する上記特徴量と上記感度差の量とを対応 付けたテーブルをさらに有して構成されており、 該特徴量から該テーブルを参照すること により上記感度差の大小を判定するものであることを特徴とする請求の範囲第 8項に記載 の画像処理装置。
1 0 . 上記判定手段は、 上記近傍内において、 指定された色成分が得られている画素を 所定の方法で分類し、 各分類における画素値の平均値と変動量とに基づき、 上記特徴量を 計算するものであることを特徴とする請求の範囲第 8項または請求の範囲第 9項に記載の 画像処理装置。
1 1 . 上記判定手段は、 上記近傍内において、 指定された色成分が得られている画素の 画素値の平均値と、 指定された色成分と異なる所定の色成分が得られている画素の画素値 の平均値と、 に基づいて、 上記特徴量を計算するものであることを特徴とする請求の範囲 第 8項または請求の範囲第 9項に記載の画像処理装置。
1 2 . 上記補間手段は、 上記撮像系により得られる画像サイズを所定の縮小率で縮小し た力ラ一画像を生成し得るように構成されたものであり、
上記判定手段は、 該補間手段が縮小したカラー画像を生成する際には、 該縮小率が所定 の閾値以下である場合に、 感度差の判定を行わないものであることを特徴とする請求の範 囲第 2項に記載の画像処理装置。
1 3 . 単板撮像系、 二板撮像系、 または三板画素ずらし撮像系によって光学像を撮像す ることにより得られた、 各画素につき 1種類以上の色成分が欠落している画像、 を処理す る画像処理装置であって、
各画素において欠落する色成分を補う補間手段と、
上記補間手段による結果に対して補正を行う補間後補正手段と、
を具備したことを特徴とする画像処理装置。
1 4. 上記補間後補正手段は、 注目画素の画素値と該注目画素に係る所定の近傍画素の 画素値との相関を計算して、 相関の高い近傍画素の平均値に基づいて上記注目画素の画素 値を補正するものであることを特徴とする請求の範囲第 1 3項に記載の画像処理装置。
1 5 . 上記補間手段は、 上記撮像系により得られる画像サイズを所定の縮小率で縮小し たカラ一画像を生成し得るように構成されたものであり、
上記補正後補正手段は、 該捕間手段が縮小したカラー画像を生成する際には、 該縮小率 が所定の閾値以下である場合に、 補正を行わないものであることを特徴とする請求の範囲 第 1 3項に記載の画像処理装置。
1 6 . コンピュータに、 単板撮像系、 二板撮像系、 または三板画素ずらし撮像系によつ て光学像を撮像することにより得られた、 各画素につき 1種類以上の色成分が欠落してい る画像、 を処理させるための画像処理プログラムであって、
該コンピュータを、
同じ色成分が得られている画素の間の感度差を補正する感度捕正手段、
上記感度補正手段により補正された後の画像に対して、 各画素において欠落する色成分 を補う補間手段、
として機能させることを特徴とする画像処理プログラム。
1 7 . コンピュータに、 単板撮像系、 二板撮像系、 または三板画素ずらし撮像系によつ て光学像を撮像することにより得られた、 各画素につき 1種類以上の色成分が欠落してい る画像、 を処理させるための画像処理プログラムであって、
該コンピュータを、
注目画素の所定の近傍において、 指定された種類の色成分に対し、 当該色成分が得られ ている画素の間の感度差の大小を判定する判定手段、
上記注目画素において欠落する色成分を補う処理を行うものであって、 該処理を行う際 に、 上記判定手段による判定結果に応じて処理内容を変更可能な補間手段、
として機能させることを特徴とする画像処理プログラム。
1 8 . コンピュータに、 単板撮像系、 二板撮像系、 または三板画素ずらし撮像系によつ て光学像を撮像することにより得られた、 各画素につき 1種類以上の色成分が欠落してい る画像、 を処理させるための画像処理プログラムであって、
該コンピュータを、
各画素において欠落する色成分を捕う補間手段、
上記補間手段による結果に対して補正を行う補間後補正手段、
として機能させることを特徴とする画像処理プロダラム。
1 9 . 上記感度補正手段は、 注目画素の所定の近傍において、 注目画素と、 該注目画素 で得られている色成分と同種の色成分が得られている画素と、 の間の感度差の量を推定す る推定手段を有して構成され、 上記感度差の量に応じて感度補正を行うものであることを 特徴とする請求の範囲第 1項に記載の画像処理装置。
2 0 . 上記推定手段は、 上記注目画素の所定の近傍内の画素値から所定の特徴量を計算 する特徴計算手段を有して構成され、 該特徴量に基づいて上記感度差の量を推定するもの であることを特徴とする請求の範囲第 1 9項に記載の画像処理装置。
2 1 . 上記推定手段は、 上記特徴量と上記感度差の量とを対応付けたテーブルをさらに 有して構成され、 上記特徴量から上記テーブルを参照することにより、 上記感度差の量を 推定するものであることを特徴とする請求の範囲第 2 0項に記載の画像処理装置。
2 2 . 上記特徴計算手段は、 上記所定の近傍内で、 上記注目画素で得られる色成分と異 なる種類の色成分が得られている画素の画素値から、 上記特徴量を計算するものであるこ とを特徴とする請求の範囲第 2 0項に記載の画像処理装置。
2 3 . 上記特徴計算手段は、 上記所定の近傍内で、 上記注目画素で得られる色成分と同 種の色成分が得られている画素の N通り (Nは 1以上の整数) の組み合わせに対する N個 の平均値を計算して、 これらの計算結果を上記特徴量とするものであることを特徴とする 請求の範囲第 2 0項に記載の画像処理装置。
2 4 . 上記感度補正手段は、 上記 N個の平均値と上記注目画素の画素値との差 Di ( i は 1から Nまでの整数) を求めて、 これら N個の差 Di の内の絶対値が最小となる Di を 上記感度差の量とするものであることを特徴とする請求の範囲第 2 3項に記載の画像処理 装置。
2 5 . 上記感度補正手段は、 上記感度差の量から所定の関数により感度差補正量を算出 して、 算出した感度差補正量を上記注目画素の画素値に加算することにより、 感度捕正を 行うものであることを特徴とする請求の範囲第 1 9項に記載の画像処理装置。
2 6 . 上記所定の関数は、 上記感度差の量の絶対値がある閾値以上の場合に 0となるよ うな関数であることを特徴とする請求の範囲第 2 5項に記載の画像処理装置。
2 7 . 上記感度補正手段は、
上記感度差の量に基づいてブイルタ係数を設定する係数設定手段と、
上記近傍内で、 上記注目画素で得られる色成分と同種の色成分が得られている画素に対 して、 上記フィルタ係数を用いた線形フィルタを適用することにより感度補正を行うブイ ルタ手段と、
を有して構成されたものであることを特徴とする請求の範囲第 1 9項に記載の画像処理 装置。
2 8 . コンピュータに、 単板撮像系、 二板撮像系、 または三板画素ずらし撮像系によつ て光学像を撮像することにより得られた、 各画素につき 1種類以上の色成分が欠落してい る画像、 を処理させるための画像処理プログラムであって、
該コンピュータを、
注目画素の所定の近傍において、 注目画素と、 該注目画素で得られている色成分と同種 の色成分が得られている画素と、 の間の感度差の量を推定する推定手段を有し、 上記感度 差の量に応じて感度補正を行う感度補正手段、
上記感度補正手段により補正された後の画像に対して、 各画素において欠落する色成分 を補う補間手段、
として機能させることを特徴とする画像処理プログラム。
2 9 . コンピュータに、 単板撮像系、 二板撮像系、 または三板画素ずらし撮像系によつ て光学像を撮像することにより得られた、 各画素につき 1種類以上の色成分が欠落してい る画像、 を処理させるための画像処理プログラムであって、
該コンピュータを、
注目画素の所定の近傍において、 注目画素と、 該注目画素で得られている色成分と同種 の色成分が得られている画素と、 の間の感度差の量を推定する推定手段を有し、 上記感度 差の量から所定の関数により感度差捕正量を算出して、 算出した感度差補正量を上記注目 画素の画素値に加算することにより、 感度補正を行う感度補正手段、
上記感度捕正手段により補正された後の画像に対して、 各画素において欠落する色成分 を捕う補間手段、
として機能させることを特徴とする画像処理プログラム。
3 0 . コンピュータに、 単板撮像系、 二板撮像系、 または三板画素ずらし撮像系によつ て光学像を撮像することにより得られた、 各画素につき 1種類以上の色成分が欠落してい る画像、 を処理させるための画像処理プログラムであって、
該コンピュータを、
注目画素の所定の近傍において、 注目画素と、 該注目画素で得られている色成分と同種 の色成分が得られている画素と、 の間の感度差の量を推定する推定手段と、 上記感度差の 量に基づいてフィルタ係数を設定する係数設定手段と、 上記近傍内で、 上記注目画素で得 られる色成分と同種の色成分が得られている画素に対して、 上記フィルタ係数を用いた線 形フィルタを適用することにより感度補正を行うフィルタ手段と、 を有する感度補正手段 上記感度補正手段により補正された後の画像に対して、 各画素において欠落する色成分 を補う補間手段、
として機能させることを特徴とする画像処理プログラム。
PCT/JP2004/008144 2003-06-05 2004-06-04 画像処理装置、画像処理プログラム Ceased WO2004110071A1 (ja)

Applications Claiming Priority (6)

Application Number Priority Date Filing Date Title
JP2003161185 2003-06-05
JP2003-161185 2003-06-05
JP2004-155244 2004-05-25
JP2004155244 2004-05-25
JP2004-158924 2004-05-28
JP2004158924A JP4610930B2 (ja) 2003-06-05 2004-05-28 画像処理装置、画像処理プログラム

Publications (1)

Publication Number Publication Date
WO2004110071A1 true WO2004110071A1 (ja) 2004-12-16

Family

ID=33514565

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2004/008144 Ceased WO2004110071A1 (ja) 2003-06-05 2004-06-04 画像処理装置、画像処理プログラム

Country Status (3)

Country Link
US (1) US7373020B2 (ja)
JP (1) JP4610930B2 (ja)
WO (1) WO2004110071A1 (ja)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2308347A1 (de) 2004-08-16 2011-04-13 Julius Blum Gmbh Ausstossvorrichtung für ein bewegbares Möbelteil
CN102907103A (zh) * 2010-06-02 2013-01-30 索尼公司 图像处理设备、图像处理方法和程序

Families Citing this family (30)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4131052B2 (ja) 1998-07-17 2008-08-13 ソニー株式会社 撮像装置
US7720303B2 (en) * 2004-04-28 2010-05-18 Hewlett-Packard Development Company, L.P. Polynomial approximation based image filter methods, systems, and machine-readable media
JP2006042267A (ja) * 2004-07-30 2006-02-09 Canon Inc 画像処理方法、画像処理装置、およびプログラム
KR100967742B1 (ko) 2004-09-07 2010-07-06 크로스텍 캐피탈, 엘엘씨 이미지센서의 색 보간 방법
US7656441B2 (en) * 2005-01-05 2010-02-02 Eastman Kodak Company Hue correction for electronic imagers
US7417670B1 (en) 2005-01-12 2008-08-26 Ambarella, Inc. Digital video camera with binning or skipping correction
JP4621944B2 (ja) * 2005-01-19 2011-02-02 株式会社メガチップス 画像フィルタ装置、方法およびコンピュータプログラム
US7864235B2 (en) * 2005-03-30 2011-01-04 Hoya Corporation Imaging device and imaging method including generation of primary color signals
US8482625B2 (en) * 2005-11-16 2013-07-09 Hewlett-Packard Development Company, L.P. Image noise estimation based on color correlation
US7881563B2 (en) * 2006-02-15 2011-02-01 Nokia Corporation Distortion correction of images using hybrid interpolation technique
JP5040369B2 (ja) * 2006-05-22 2012-10-03 富士通セミコンダクター株式会社 画像処理装置、および画像処理方法
ES2486295T3 (es) 2007-04-11 2014-08-18 Red.Com, Inc. Cámara de vídeo
US8237830B2 (en) 2007-04-11 2012-08-07 Red.Com, Inc. Video camera
JP2009005166A (ja) * 2007-06-22 2009-01-08 Olympus Corp 色補間装置及び画像処理システム
JP4427592B2 (ja) * 2008-08-04 2010-03-10 株式会社東芝 画像処理装置、および画像処理方法
KR20100077367A (ko) * 2008-12-29 2010-07-08 주식회사 동부하이텍 화질 개선 장치 및 화질 개선 방법
JP4764938B2 (ja) * 2009-04-07 2011-09-07 シャープ株式会社 画像処理装置、画像形成装置、画像処理装置の制御方法、プログラム、記録媒体
JP5267290B2 (ja) * 2009-04-07 2013-08-21 株式会社リコー 画像処理装置、画像処理方法および画像処理プログラム
JP5563283B2 (ja) * 2009-12-09 2014-07-30 キヤノン株式会社 画像処理装置
KR101665137B1 (ko) 2010-04-07 2016-10-12 삼성전자주식회사 이미지 센서에서 발생되는 잡음을 제거하기 위한 장치 및 방법
JP5269016B2 (ja) * 2010-09-10 2013-08-21 株式会社東芝 画像処理装置
WO2014127153A1 (en) * 2013-02-14 2014-08-21 Red. Com, Inc. Video camera
RU2603495C1 (ru) * 2015-06-16 2016-11-27 Общество с ограниченной ответственностью "Аби Девелопмент" Классификация изображений документов на основе параметров цветовых слоев
KR101724308B1 (ko) * 2016-02-29 2017-04-07 (주)넥스트칩 고 해상도 재현을 위한 영상 처리 장치 및 방법
EP3649783B8 (en) 2017-07-05 2025-04-09 RED Digital Cinema, Inc. Video image data processing in electronic devices
US11748852B2 (en) * 2018-06-27 2023-09-05 Mitsubishi Electric Corporation Pixel interpolation device and pixel interpolation method, and image processing device, and program and recording medium
TWI677233B (zh) * 2018-08-02 2019-11-11 瑞昱半導體股份有限公司 決定濾波器係數的方法
US11490203B2 (en) 2019-07-17 2022-11-01 B/E Aerospace, Inc. Active focused field sound system
WO2022115809A1 (en) * 2020-11-30 2022-06-02 Lutron Technology Company Llc Sensor for detecting glare conditions
CN121190484B (zh) * 2025-11-25 2026-03-24 深圳精智达技术股份有限公司 一种发光器件阵列图像的矫正方法、装置及存储介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61218290A (ja) * 1985-03-25 1986-09-27 Hitachi Ltd 固体撮像装置
JPH08298669A (ja) * 1995-03-17 1996-11-12 Eastman Kodak Co 適応カラー補間単一センサカラー電子カメラ
JPH1155682A (ja) * 1997-08-06 1999-02-26 Minolta Co Ltd デジタルカメラ
JP2000324505A (ja) * 1999-05-11 2000-11-24 Nikon Corp 画像取り込み装置および交換レンズ
JP2000341700A (ja) * 1999-05-31 2000-12-08 Sony Corp カラー撮像装置
JP2001036917A (ja) * 1999-07-21 2001-02-09 Nikon Corp デジタルカメラおよび画像信号処理用記憶媒体
JP2002084547A (ja) * 2000-09-06 2002-03-22 Nikon Corp 画像データサイズ変換処理装置、電子スチルカメラ、および画像データサイズ変換処理用記録媒体

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08298668A (ja) 1995-04-26 1996-11-12 Sony Corp 撮像装置
JPH11122525A (ja) 1997-08-06 1999-04-30 Minolta Co Ltd デジタルカメラ
JPH1155558A (ja) 1997-08-06 1999-02-26 Minolta Co Ltd デジタルカメラ
US6571022B2 (en) 1997-08-06 2003-05-27 Minolta Co., Ltd. Image processing apparatus for generating a single image of an object using overlapping partial images
JP3914628B2 (ja) 1998-01-28 2007-05-16 オリンパス株式会社 画像処理装置
JP2000013806A (ja) * 1998-06-23 2000-01-14 Mitsubishi Electric Corp 画像処理装置及び画像処理方法
JP4077161B2 (ja) * 2001-02-08 2008-04-16 株式会社リコー 撮像装置、輝度補正方法、およびその方法をコンピュータで実行するためのプログラム
JP2002247593A (ja) * 2001-02-16 2002-08-30 Olympus Optical Co Ltd 画像処理装置
JP2003163937A (ja) * 2001-11-26 2003-06-06 Fuji Photo Film Co Ltd 固体撮像素子および撮像装置
JP3680827B2 (ja) * 2002-08-27 2005-08-10 コニカミノルタフォトイメージング株式会社 デジタルカメラ

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61218290A (ja) * 1985-03-25 1986-09-27 Hitachi Ltd 固体撮像装置
JPH08298669A (ja) * 1995-03-17 1996-11-12 Eastman Kodak Co 適応カラー補間単一センサカラー電子カメラ
JPH1155682A (ja) * 1997-08-06 1999-02-26 Minolta Co Ltd デジタルカメラ
JP2000324505A (ja) * 1999-05-11 2000-11-24 Nikon Corp 画像取り込み装置および交換レンズ
JP2000341700A (ja) * 1999-05-31 2000-12-08 Sony Corp カラー撮像装置
JP2001036917A (ja) * 1999-07-21 2001-02-09 Nikon Corp デジタルカメラおよび画像信号処理用記憶媒体
JP2002084547A (ja) * 2000-09-06 2002-03-22 Nikon Corp 画像データサイズ変換処理装置、電子スチルカメラ、および画像データサイズ変換処理用記録媒体

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2308347A1 (de) 2004-08-16 2011-04-13 Julius Blum Gmbh Ausstossvorrichtung für ein bewegbares Möbelteil
CN102907103A (zh) * 2010-06-02 2013-01-30 索尼公司 图像处理设备、图像处理方法和程序

Also Published As

Publication number Publication date
US7373020B2 (en) 2008-05-13
JP2006013558A (ja) 2006-01-12
JP4610930B2 (ja) 2011-01-12
US20050041116A1 (en) 2005-02-24

Similar Documents

Publication Publication Date Title
WO2004110071A1 (ja) 画像処理装置、画像処理プログラム
CN102197641B (zh) 改进缺陷色彩及全色滤色器阵列图像
US7170529B2 (en) Image processing
US8363123B2 (en) Image pickup apparatus, color noise reduction method, and color noise reduction program
US7916937B2 (en) Image processing device having color shift correcting function, image processing program and electronic camera
US7177463B2 (en) Image processing apparatus and method
CN102362501B (zh) 修改色彩及全色通道彩色滤光器阵列图像的方法
EP3804294A2 (en) Hdr image generation from single-shot hdr color image sensors
JP4700445B2 (ja) 画像処理装置および画像処理プログラム
US8013914B2 (en) Imaging apparatus including noise suppression circuit
CN101816171A (zh) 用于增强图像动态范围的多重曝光模式
JP2004534429A (ja) 色不連続性均等化を使用して生データイメージを非対称にデモザイク処理するシステムおよび方法
JP2010092461A (ja) 画像処理装置及び画像処理方法
JP2012054985A (ja) 画像処理装置
US9959633B2 (en) Texture detection in image processing
JP5096291B2 (ja) 画像読取装置、画像形成装置および画像データ処理プログラム
US8655058B2 (en) Method and apparatus for spatial noise adaptive filtering for digital image and video capture systems
US7710470B2 (en) Image processing apparatus that reduces noise, image processing method that reduces noise, electronic camera that reduces noise, and scanner that reduces noise
JPWO2005013622A1 (ja) 色成分の混在配列された画像を処理する画像処理装置、画像処理プログラム、電子カメラ、および画像処理方法
US8559711B2 (en) Method for correcting chromatic aberration
CN1893618B (zh) 用于处理拜耳模式数字彩色视频信号的方法和装置
JP2014010776A (ja) 画像処理装置、画像処理方法、及び、プログラム
JP5153842B2 (ja) 画像処理装置、画像処理プログラム
JP3730063B2 (ja) 色成分生成装置および色成分生成方法並びにこれを用いた多色画像撮像装置
JP2003158744A (ja) 画素キズ検出・補正装置およびそれを用いた撮像装置

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): AE AG AL AM AT AU AZ BA BB BG BR BW BY BZ CA CH CN CO CR CU CZ DE DK DM DZ EC EE EG ES FI GB GD GE GH GM HR HU ID IL IN IS KE KG KP KR KZ LC LK LR LS LT LU LV MA MD MG MK MN MW MX MZ NA NI NO NZ OM PG PH PL PT RO RU SC SD SE SG SK SL SY TJ TM TN TR TT TZ UA UG US UZ VC VN YU ZA ZM ZW

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): GM KE LS MW MZ NA SD SL SZ TZ UG ZM ZW AM AZ BY KG KZ MD RU TJ TM AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HU IE IT LU MC NL PL PT RO SE SI SK TR BF BJ CF CG CI CM GA GN GQ GW ML MR NE SN TD TG

121 Ep: the epo has been informed by wipo that ep was designated in this application
122 Ep: pct application non-entry in european phase