WO2022196324A1 - 画像処理装置、画像処理方法、及びプログラム - Google Patents

画像処理装置、画像処理方法、及びプログラム Download PDF

Info

Publication number
WO2022196324A1
WO2022196324A1 PCT/JP2022/008271 JP2022008271W WO2022196324A1 WO 2022196324 A1 WO2022196324 A1 WO 2022196324A1 JP 2022008271 W JP2022008271 W JP 2022008271W WO 2022196324 A1 WO2022196324 A1 WO 2022196324A1
Authority
WO
WIPO (PCT)
Prior art keywords
gain
white balance
infrared light
control value
balance control
Prior art date
Application number
PCT/JP2022/008271
Other languages
English (en)
French (fr)
Inventor
太介 西尾
俊介 千野
Original Assignee
キヤノン株式会社
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 キヤノン株式会社 filed Critical キヤノン株式会社
Priority to EP22771078.7A priority Critical patent/EP4311231A1/en
Priority to CN202280020014.2A priority patent/CN116965051A/zh
Publication of WO2022196324A1 publication Critical patent/WO2022196324A1/ja
Priority to US18/466,704 priority patent/US20240080425A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/73Colour balance circuits, e.g. white balance circuits or colour temperature control
    • 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/88Camera processing pipelines; Components thereof for processing colour signals for colour balance, e.g. white-balance circuits or colour temperature control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/46Colour picture communication systems
    • H04N1/56Processing of colour picture signals
    • H04N1/60Colour correction or control
    • H04N1/6077Colour balance, e.g. colour cast correction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/10Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths
    • H04N23/11Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths for generating image signals from visible and infrared light wavelengths

Definitions

  • the present invention relates to technology for processing images captured by an imaging device.
  • WB white balance
  • the color of a color image is usually in a state in which only visible light is taken in, that is, an infrared light cut filter (Infra-Red Cut-Off Filter, hereinafter referred to as IRCF) is inserted on the optical axis so as not to take in infrared light.
  • IRCF infrared light cut filter
  • the color of the imaging device is designed in such a way that infrared light is not taken in, the color of the color image is lost when the infrared light is taken in. Specifically, compared to a state in which infrared light is not taken in, the color of the captured image becomes reddish. That is, the color reproducibility of the imaging device is degraded.
  • Patent Document 1 discloses a technique for switching the white balance control method according to the position of the IRCF. According to Patent Document 1, depending on the position of the IRCF, white balance control is performed so that the ratio of the integrated values of the RGB (red, green, and blue) components of the entire screen becomes a prestored ratio, or 1:1. Switches whether to perform white balance control so that the ratio is 1:1. This improves the color reproducibility of the imaging device.
  • RGB red, green, and blue
  • an object of the present invention is to enable control to an appropriate white balance even when the IRCF is removed.
  • the image processing apparatus of the present invention includes detection means for detecting the influence of infrared light on the color of an input image, calculation means for calculating a first white balance control value based on the input image, and the first white balance control value. determining means for determining whether or not the control value is valid; and setting means for setting a predetermined white balance control value based on the determination result of the determining means, wherein the determining means detects the detection by the detecting means. Based on the result, determination conditions for determining whether or not the first white balance control value is effective are determined.
  • FIG. 1 is a diagram showing a configuration example of an image processing apparatus according to a first embodiment
  • FIG. 4 is a flow chart showing the flow of main parts of image processing according to the present embodiment.
  • FIG. 4 is a diagram showing a first example of WB gain control in the first embodiment
  • FIG. 9 is a diagram showing a second example of WB gain control in the first embodiment
  • FIG. FIG. 11 is a diagram showing a third WB gain control example in the first embodiment
  • FIG. 11 is a diagram showing a fourth WB gain control example in the first embodiment
  • FIG. 10 is a diagram used for explaining the operation of a gain determination unit in the second embodiment
  • FIG. 11 is a diagram illustrating a configuration example of an image processing apparatus according to a third embodiment
  • FIG. 11 is a diagram showing an example of WB gain control in the third embodiment
  • FIG. FIG. 13 is a diagram illustrating a configuration example of an image processing apparatus according to a fourth embodiment; FIG. It is a figure used for explanation of operation of a gain deciding part in a 4th embodiment.
  • FIG. 14 is a diagram showing an example of an input image in the fifth embodiment
  • FIG. 13 is a diagram showing an example of WB gain in the fifth embodiment
  • FIG. 12 is a diagram showing an example of WB gain control in the sixth embodiment
  • FIG. 1 is a block diagram showing a configuration example of an image processing apparatus according to the first embodiment.
  • the image processing apparatus according to the first embodiment will be described below with reference to FIG. Assume that the image processing apparatus of the present embodiment is an apparatus built in or connected to an imaging apparatus such as a digital camera or a surveillance camera.
  • the input image is an image captured by an imaging unit consisting of a lens and an imaging sensor (not shown).
  • the input image is image data (or image signal) composed of a plurality of pixels and includes information of a plurality of colors.
  • the plurality of colors are, for example, red (R), green (G), and blue (Blue). This data corresponds to the amount of light that has passed through the filter and has been converted into an electrical signal by the imaging sensor.
  • Color filters transmit not only visible light corresponding to red, green, and blue, but also some infrared light (invisible light).
  • an infrared light cut filter (Infra-Red Cut-Off Filter: IRCF) is provided to remove the infrared light component so that an image close to human vision can be obtained.
  • the imaging sensor is composed of an imaging element such as a CMOS (Complementary Metal Oxide Semiconductor) or a CCD (Charge-Coupled Device).
  • the output image is an image in which the white balance is appropriately corrected by multiplying the pixel values of the input image by the white balance gain, which is the final white balance control value obtained as described later.
  • white balance will be appropriately referred to as WB.
  • the image processing apparatus of the present embodiment performs white balance control (WB control) according to whether the input image is affected by infrared light captured by the imaging sensor. An output image with appropriately corrected white balance is obtained.
  • the feature amount acquisition unit 101 acquires a feature amount related to the color of the input image, and outputs the feature amount to the gain calculation unit 102 . More specifically, the feature amount acquisition unit 101 acquires color information for each rectangular area determined by image data included in each rectangular area when the input image is divided into a plurality of rectangular areas.
  • the color information is, for example, a representative value of color difference signals for each rectangular area, and the representative value is, for example, an average value or a mode value.
  • the gain calculation unit 102 calculates the first white balance control value according to the feature amount of the input image. For example, the gain calculation unit 102 acquires color information for each region from the feature amount acquisition unit 101 and calculates a representative value of the color information of the input image. Then, the gain calculation unit 102 calculates, as a first white balance control value, a white balance gain (hereinafter referred to as WB gain) that makes the representative value of the color information of the output image a predetermined target value.
  • WB gains used for white balance control include, for example, a red gain for adjusting the redness of an image (hereinafter referred to as Red gain) and a blue gain for adjusting the blueness of an image (hereinafter referred to as Blue gain). do).
  • Information on the WB gain calculated by gain calculation section 102 is sent to gain determination section 104 and gain determination section 105 .
  • the infrared light detection unit 103 detects the influence of infrared light on the color of the input image. That is, the infrared light detection unit 103 detects whether or not the color of the input image is affected by the infrared light captured by the imaging sensor, and outputs the detection result to the gain determination unit 104 . For example, the infrared light detection unit 103 detects that the color of the input image is not affected by infrared light when an IRCF (not shown) is inserted on the optical axis of the lens of the imaging unit.
  • an IRCF not shown
  • the infrared light detection unit 103 detects that the color of the input image is affected by the infrared light when the IRCF is not inserted on the optical axis of the lens of the imaging unit (removed from the optical axis). detect that
  • a gain determination unit 104 determines whether or not the WB gain (first white balance control value) obtained from the gain calculation unit 102 is effective based on the detection result obtained from the infrared light detection unit 103. Determine conditions. Gain determination section 104 then determines whether or not the WB gain (first white balance control value) acquired from gain calculation section 102 is effective using the determination condition, and sends the determination result to a gain determination section. output to 105. That is, the gain determination unit 104 determines the WB gain (first white balance control value) is valid. Although details will be described later, in the present embodiment, the gain determination unit 104 uses a predetermined area A1 and a predetermined area A2 for the WB gain as determination conditions.
  • the gain determination unit 104 determines that the WB gain is effective when the WB gain acquired from the gain calculation unit 102 is within the predetermined area A1. Determine that there is. Further, when the color of the input image is affected by infrared light, the gain determination unit 104 determines that the WB gain obtained from the gain calculation unit 102 is within a predetermined area A2 different from the predetermined area A1. It is determined that the WB gain is valid.
  • the predetermined area A1 represents the effective range of the WB gain when the color of the input image is not affected by the infrared light
  • the area A2 represents the effective range of the WB gain.
  • This area represents the effective range of the WB gain when the color of the input image is affected by infrared light
  • the predetermined area A1 is an area representing the effective range of the WB gain assuming a state in which only visible light is captured by the imaging sensor, that is, a state in which the IRCF is inserted on the optical axis so as not to capture infrared light.
  • the position of the predetermined area A2 is designed according to whether the color of the input image is affected by infrared light and the sensitivity of the imaging sensor. That is, the ratio of infrared light to visible light captured by the imaging sensor when the IRCF is removed is the ratio of infrared light to visible light in the imaging environment, or the ratio of the sensitivity to infrared light and the sensitivity to visible light of the imaging sensor. determined by Therefore, in this embodiment, the position of the predetermined area A2 is designed to include a position farther from the position of the predetermined area A1 as the imaging sensor has higher sensitivity.
  • the predetermined area A2 is the WB gain when the colors of the input image are not affected by infrared light. It is designed to allow a large difference from the WB gain when
  • a gain determination unit 105 determines a final white balance control value (final WB gain) by which an input image is multiplied by a gain multiplication unit 106, which will be described later. Although the details will be described later, the gain determination section 105 determines the final WB gain based on the determination result or determination conditions of the gain determination section 104 .
  • the final WB gain multiplied by the input image in the gain multiplication unit 106 is the WB gain (first white balance control value) obtained from the gain calculation unit 102 or a predetermined white balance control value is the second white balance control value as .
  • the gain determination unit 105 acquires the WB gain (first white balance control value) from the gain calculation unit 102, acquires the determination result as to whether or not the WB gain is effective from the gain determination unit 104, and obtains the final WB gain is determined and output to gain multiplying section 106 . More specifically, when the determination result obtained from the gain determination unit 104 indicates validity, the gain determination unit 105 sets the first white balance control value calculated by the gain calculation unit 102 to the final white balance control value. WB gain is output to gain multiplying section 106 as a typical WB gain.
  • the gain determination unit 105 sets the predetermined white balance control value (second white balance control value) to the final WB gain is output to gain multiplying section 106 .
  • the second white balance control value is, for example, a WB gain stored in a storage device (not shown).
  • the WB gains stored in the storage device are, for example, WB gains used as final WB gains in the past, and predetermined WB gains included within a predetermined area A1 or A2.
  • the gain multiplication unit 106 acquires the final WB gain from the gain determination unit 105, and multiplies the input image by the final WB gain to generate and output a white balance-controlled output image.
  • FIG. 2 is a flow chart showing an example of the flow of main parts of image processing executed by the image processing apparatus of this embodiment. An example of image processing according to the present embodiment will be described below with reference to the flowchart of FIG. In addition, in the description of the flow charts below, the processing step is indicated by using the symbol "S".
  • the feature amount acquisition unit 101 acquires a feature amount related to the color of the input image.
  • the gain calculation unit 102 calculates the WB gain P, which is the first white balance control value, based on the feature amount acquired in S1.
  • the infrared light detection unit 103 detects whether or not the colors of the input image are affected by the infrared light captured by the imaging sensor. Then, when the infrared light detection unit 103 detects that the color of the input image is not affected by the infrared light, the process proceeds to S4. On the other hand, when the infrared light detection unit 103 detects that the color of the input image is affected by infrared light, the process proceeds to S5.
  • the gain determination unit 104 determines whether or not the WB gain P is included in the area A1. Then, when the WB gain P is included in the area A1, the gain determination section 104 determines that the WB gain P is effective, and advances the process to S6. On the other hand, when the WB gain P is not included in the area A1, the gain determination unit 104 determines that the WB gain P is not effective, and advances the process to S7.
  • the gain determination unit 104 determines whether or not the WB gain P is included in the area A2. Gain determining section 104 then determines that WB gain P is effective when WB gain P is included in area A2, and then the process proceeds to S6. On the other hand, when the WB gain P is not included in the predetermined area A2, the gain determination section 104 determines that the WB gain P is not effective, and then the process proceeds to S8.
  • the gain determining section 105 After proceeding to S6, the gain determining section 105 outputs the WB gain P (first white balance control value) to the gain multiplying section 106 as the final WB gain.
  • the gain determination unit 105 sets the WB gain Q as the predetermined white balance control value (second white balance control value) as the final WB gain and outputs it to the gain multiplication unit 106.
  • WB gain Q will be described later.
  • gain determining section 105 sets WB gain R as a predetermined white balance control value (second white balance control value) as a final WB gain and outputs it to gain multiplying section .
  • WB gain R will be described later.
  • FIG. 3 is a diagram showing a first WB control example, which is an example of white balance gain control in this embodiment.
  • a predetermined area A1 represents the effective range of the WB gain when the color of the input image is not affected by infrared light, and is hereinafter referred to as the effective area A1.
  • a predetermined area A2 represents the effective range of the WB gain when the color of the input image is affected by infrared light, and is hereinafter referred to as the effective area A2.
  • the effective range is designed so that the WB gain within the effective range is applied to the input image so that the white balance is appropriately controlled and the user does not feel uncomfortable.
  • the WB gain belonging to the effective area A1 is applied to the input image, thereby preventing the deterioration of the image quality due to the collapse of the white balance. can.
  • applying the WB gain belonging to the effective area A2 to the input image prevents the deterioration of the image quality due to the collapse of the white balance. can be prevented.
  • WB gains P1, P2, P3, Q, and R each represent a WB gain.
  • WB gain P1 represents the WB gain calculated when the colors of the input image are not affected by infrared light
  • WB gains P2 and P3 are calculated when the colors of the input image are affected by infrared light.
  • WB gain calculated when there is The illustrated three WB gains included in the WB gain P2 indicate that one of the three WB gains that is most suitable for the lighting conditions of the shooting environment is applied.
  • the WB gain P3 is a WB gain outside the range of the effective area A2 when the color of the input image is affected by infrared light, and is a WB gain that is not applied to the input image. .
  • the WB gain Q is set for the input image when the color of the input image is not affected by infrared light and the WB gain calculated from the feature amount of the input image is outside the range of the effective area A1. is the WB gain within the effective area A1 applied at On the other hand, when the color of the input image is affected by infrared light and the WB gain calculated from the feature amount of the input image is outside the range of the effective area A2, the WB gain R is is the WB gain within the effective area A2 applied to .
  • control is performed to gradually change the WB gain over time.
  • the effective range of WB gain is fixed regardless of whether the color of the input image is affected by infrared light. Therefore, when the color of the input image is affected by infrared light, it is not possible to apply the optimum WB gain for the lighting conditions of the shooting environment shown in WB gain P2 in FIG. WB gain shown in is applied. Therefore, if the difference between the actually applied WB gain and the optimum WB gain is large, there is a risk that the white balance will be lost and the image quality will be degraded.
  • the effective range of WB gain is variable depending on whether the color of the input image is affected by infrared light. Therefore, in this embodiment, when the color of the input image is affected by infrared light, a WB gain that is optimal for the lighting conditions of the shooting environment, such as the WB gain P2 in FIG. 3, is applied. can be done. On the other hand, when the color of the input image is affected by infrared light, even if the WB gain P3 outside the effective range is calculated, the WB gain R within the effective range is applied. It is possible to prevent deterioration of image quality due to collapse of white balance.
  • the effective area A2 of the WB gain is designed according to the sensitivity of the imaging sensor when the color of the input image is affected by infrared light. That is, in the present embodiment, the higher the sensitivity of the imaging sensor, the more the position of the effective area A2 of the WB gain, and the position of the effective area A1 of the WB gain when the color of the input image is not affected by the infrared light. It is designed to include positions away from
  • the lower the illuminance the greater the ratio of the infrared light component to the visible light component in the shooting environment, so the captured image becomes more reddish.
  • the higher the sensitivity of the imaging sensor the higher the SN even in a low-illuminance environment, and the captured image that retains the original color of the subject can be obtained. From the above, the higher the sensitivity of the imaging sensor, the more aggressively the white balance can be controlled in a low-illumination environment, even if the color of the input image is affected by infrared light.
  • the higher the sensitivity of the imaging sensor the more aggressively the white balance is controlled even when the color of the input image is affected by the infrared light. . That is, in the white balance control of the present embodiment, the higher the sensitivity of the imaging sensor, the more widely different WB gain is applied compared to the WB gain when the color of the input image is not affected by infrared light. make it As a result, it is possible to improve the color reproducibility of the captured image at low illuminance while preventing significant deterioration of the white balance.
  • the IRCF insertion/removal state is detected by the infrared light detection unit 103, but the present invention is not limited to this.
  • the infrared light detection unit 103 it is detected whether or not the colors of the input image are affected by the infrared light according to the ON/OFF state of the infrared illumination. good too. That is, when the infrared lighting unit is emitting infrared light, it is detected that the color of the input image is affected by the infrared light, and when the infrared lighting unit is not emitting infrared light. It may also be detected that the color of the input image is not affected by infrared light.
  • the user may set whether or not the color of the input image is affected by infrared light. That is, a WB control mode in which the colors of the input image are affected by infrared light and a WB control mode in which the colors of the input image are not affected by infrared light are provided. Either WB control mode may be selected.
  • the gain determining section 105 may output the WB gain Q or the WB gain R to the gain multiplying section 106 only at the timing when the detection result of the infrared light detection section 103 changes. For example, assume that the WB gain calculated by the gain calculation unit 102 is outside the range of the effective area A2 when the color of the input image is affected by infrared light. In this case, the gain determination unit 105 outputs the current WB gain instead of the WB gain R when the currently applied WB gain is within the range of the effective area A2 based on the WB gain calculated in the past. On the other hand, at the timing when the IRCF is removed, the currently applied WB gain was calculated when the IRCF was inserted, and is within the effective area A1.
  • WB gain R is output. That is, when the color of the input image is affected by the infrared light, the gain determination unit 105 determines the gain within the range of the effective area A2 only when the currently applied WB gain is outside the range of the effective area A2. WB gain R is output.
  • FIG. 4 is a diagram showing a second WB control example in this embodiment.
  • the gain determining section 105 sets the WB gain Q and the WB gain R to the center of the effective area A1 and the effective area A2, respectively. By doing so, an average WB gain within the effective area can be applied. As a result, even if the true (optimal) WB gain is any gain within the effective area, the difference between the applied WB gain and the true (optimal) WB gain can be suppressed to a small amount, and white It is possible to prevent the balance from greatly collapsing. In addition, since the difference between the applied WB gain and the true (optimal) WB gain can be kept small, when the WB gain is gently controlled in terms of time, the WB gain can be set to the true value (optimal value). ) can be minimized.
  • FIG. 5 is a diagram showing a third WB control example in this embodiment.
  • the gain determination unit 105 sets the WB gain R to the WB gain closest to the WB gain P3 in the area A2 instead of setting the WB gain R to the predetermined WB gain in the area A2. and Also, the gain determination unit 104 makes the effective area A2 when the color of the input image is affected by infrared light larger than the effective area A1 when the color of the input image is not affected by infrared light. You can make it smaller. If the color of the input image is affected by infrared light, the color of the subject may deviate greatly depending on the material of the subject. There is a risk that it will be lost. As shown in FIG.
  • FIG. 6 is a diagram showing a fourth WB control example in this embodiment.
  • the gain determination unit 105 sets the WB gain P2 calculated when the color of the input image is affected by infrared light to The WB gain Ra is set to be within the WB gain effective area A2 under the influence. Further, the gain determination unit 105 sets the WB gain P3 calculated when the color of the input image is affected by infrared light to the WB gain P3 when the color of the input image is affected by infrared light. may be output as a WB gain R within the effective area A2 of .
  • the WB gain P2 is within the WB gain effective area A2 when the color of the input image is affected by infrared light
  • the WB gain P3 is within the range of the WB gain effective area A2 when the color of the input image is affected by infrared light. It is outside the range of the effective area A2 of the WB gain in the case.
  • the WB gain Ra is within the range of the effective area A2 and is a WB gain predetermined for appropriately controlling the white balance.
  • the white balance even when the color of the input image is affected by infrared light, it is necessary to set a wide effective area A2.
  • the effective area A2 is set wide, the range of WB gains that can be obtained increases, so there is a risk that an unexpected WB gain will be applied and the white balance will be lost. Therefore, in the fourth WB control example, even if the calculated WB gain (for example, the WB gain P2) is within the range of the effective area A2, the WB gain (for example, the WB gain Ra ) apply. As a result, it is possible to prevent the white balance from being greatly disturbed due to the application of unexpected WB gains. It is possible to improve the color reproducibility of the captured image.
  • appropriate image data can be generated according to insertion/removal of the IRCF.
  • the gain determination unit 105 acquires the WB gain from the gain calculation unit 102 and acquires the determination result as to whether or not the WB gain is valid from the gain determination unit 104 . Further, gain determining section 105 determines the final WB gain based on the acquired information and the current WB gain stored in gain determining section 105 . In the case of the second embodiment, gain determining section 105 outputs to gain multiplying section 106 a WB gain that gradually changes from the current WB gain to the final WB gain. Note that the current WB gain is the WB gain calculated in the past and set in the gain multiplication unit 106, and in the case of moving images, for example, the WB gain applied to the input image one frame before. .
  • FIG. 7 is a diagram used for explaining the operation of the gain determining unit 105 of the second embodiment.
  • the WB gain P1 in FIG. 7 is the current WB gain
  • the WB gain P2 is the WB gain calculated by the gain calculation unit 102 when the color of the input image is affected by infrared light.
  • the WB gain P2 is the WB gain within the effective area A2, so the gain determination unit 105 sets this WB gain P2 as the final WB gain. .
  • gain determining section 105 sequentially calculates a plurality of WB gains positioned between WB gains P1 and P2 so that WB gains gradually change from WB gain P1 to WB gain P2. Output. That is, the gain determination unit 105 sets the target WB gain when the WB gain is gradually changed, and sets the WB gain so that the WB gain (current WB gain) applied to the input image gradually approaches the target WB gain. is sequentially calculated and output.
  • the gain determining section 105 determines the target WB gain depending on whether the current WB gain belongs only to the effective area A1, only to the effective area A2, or to the common area of the effective areas A1 and A2. to control. For example, when the current WB gain belongs to the effective area A1 excluding the common area of the effective areas A1 and A2 (for example, the position of P1 in FIG. 7), the gain determining section 105 sets the target WB gain to the area between the effective areas A1 and A2. A WB gain belonging to the common area (for example, the position of R in FIG. 7) is set. Then, gain determining section 105 sets the WB gain such that the current WB gain gradually approaches WB gain R.
  • the gain determination unit 105 sets the target WB gain to the originally calculated WB gain P2 after the current WB gain reaches the WB gain R belonging to the common area of the effective areas A1 and A2. That is, when the current WB gain belongs to the common area of the effective areas A1 and A2, the gain determining section 105 sets the target WB gain to the WB gain belonging to the effective area A2 excluding the common area of the effective areas A1 and A2 (for example, position P2). Then, gain determination section 105 sets and outputs the WB gain so that the current WB gain changes slowly over time from WB gain R to the final target WB gain P2.
  • the target WB gain is set to the first target WB gain belonging to the common area of the two effective areas until the current WB gain reaches the common area of the two effective areas from one effective area. do. Then, after reaching the common area of the two effective areas, the first target WB gain is set to the second target WB gain (final WB gain) belonging to the other effective area.
  • the gain determination unit 105 sets the target WB gain between two effective areas immediately after switching whether or not the color of the input image is affected by infrared light, that is, immediately after the effective area of the WB gain is switched.
  • a WB gain belonging to a common area of areas may be set.
  • the gain determining unit 105 may output the WB gain belonging to the common area of the two effective areas at the timing immediately after switching whether or not the color of the input image is affected by infrared light. Since the color of the input image changes significantly at the timing when the color of the input image changes whether or not it is affected by infrared light, it is considered that even if the white balance changes significantly, the image quality is not likely to deteriorate.
  • the gain determination unit 105 changes the WB gain to be applied to the input image, for example, from the WB gain P1 in FIG. Change to WB gain R. Thereafter, gain determination section 105 gently changes the WB gain from WB gain R to WB gain P2 in FIG. By implementing in this way, the time required to reach the original final target WB gain is shortened while preventing the WB gain from converging before reaching the original final target WB gain. be able to.
  • the third embodiment detects the magnitude of the influence of infrared light on the color of the input image, and controls the white balance according to the magnitude of the influence of infrared light. Therefore, in the third embodiment, even if the color of the input image is always affected by the infrared light captured by the imaging sensor, appropriate white balance control can be performed according to the relative magnitude of the influence. It can be performed.
  • FIG. 8 is a configuration diagram showing an example of the functional configuration of an image processing apparatus according to the third embodiment. Note that the same reference numerals are given to the same functional units as in the first embodiment, and the description thereof will be omitted.
  • the infrared light detection unit 303 acquires the feature amount related to the color of the input image from the feature amount acquisition unit 101 . Then, the infrared light detection unit 303 detects how much the color of the input image is affected by the infrared light captured by the imaging sensor, based on the feature amount related to the color of the input image, and outputs the detection result. Output to the gain determination unit 304 . More specifically, the infrared light detection unit 303 calculates the average color value of the input image, and detects that the larger the red component of the calculated average color value, the greater the influence of the infrared light. It is detected that the smaller the red component of the calculated color average value, the smaller the influence of the infrared light.
  • the gain determination unit 304 determines whether or not the WB gain obtained from the gain calculation unit 102 is valid according to the detection result obtained from the infrared light detection unit 303, and outputs the determination result to the gain determination unit 105. . More specifically, the gain determination unit 304 determines whether or not the WB gain is effective based on different determination conditions according to the degree of influence of infrared light on the color of the input image. For example, if the WB gain is within a predetermined area (effective area A20 in FIG. 9 described later) when the influence of infrared light on the color of the input image is small, the gain determination unit 304 is valid.
  • the gain determination unit 304 determines that the WB gain is within a predetermined area (effective area A21 in FIG. 9 to be described later). is valid. Further, the gain determination unit 304 determines that the WB gain is effective when the WB gain is within the predetermined area (A22) when the influence of the infrared light on the color of the input image is large. Further, the gain determination unit 304 sets the positions of the regions such that the predetermined regions are farther apart, for example, as the difference in the magnitude of the influence of the infrared light on the color of the input image increases.
  • determination as to whether the magnitude of the influence of the infrared light on the color of the input image is small, large, or medium may be made, for example, based on whether it is within the corresponding effective range. , and comparison with corresponding thresholds.
  • FIG. 9 is a diagram used for explaining the operations of the gain determination section 304 and the gain determination section 105 in the third embodiment.
  • An area A20 in FIG. 9 represents an effective range (effective area A20) when the influence of infrared light on the color of the input image is small.
  • An area A21 in FIG. 9 represents an effective range (effective area A21) when the influence of infrared light on the color of the input image is medium, and an area A22 in FIG. It represents an effective range (assumed to be an effective area A22) when the influence of outside light is large.
  • the WB gains in the valid range are the WB gains that, when applied to the input image, produce a properly white-balanced output image.
  • the WB gain P22 in FIG. 9 represents the effective WB gain belonging to the effective area A22, which is calculated when the influence of the infrared light on the color of the input image is small and the effective area A20 is set.
  • the WB gain P22 in FIG. 9 represents the effective WB gain belonging to the effective area A22, which is calculated when the influence of the infrared light on the color of the input image is large and the effective area A22 is set.
  • the WB gain P31 in FIG. 9 is calculated when the influence of infrared light on the color of the input image is moderate and the effective area A21 is set. WB gain that is not
  • the WB gain R1 in FIG. 9 has a moderate degree of influence of infrared light on the color of the input image, and when the effective area A21 is set, the calculated WB gain is WB gain to be applied to the input image if there is.
  • the WB gain P20 is set when the influence of the infrared light on the color of the input image is small, the WB gain R1 is set when the influence is medium, and the WB gain P22 is set when the influence is large. , each WB gain is applied.
  • the effective range of the optimum WB gain can be set according to the degree of influence of infrared light on the color of the input image. It is possible to improve color reproducibility and prevent large collapse of white balance.
  • the infrared light detection unit 303 calculates the average color value of the input image, and detects that the larger the red component of the calculated color average value, the greater the influence of the infrared light.
  • the method is not limited to this.
  • the infrared light detection unit 303 may acquire illuminance information of the shooting environment and detect that the lower the illuminance, the greater the influence of the infrared light.
  • the illuminance information may be calculated based on the brightness of the input image, calculated based on the exposure conditions, or calculated based on the read value of an illuminance sensor (not shown).
  • the infrared light detection unit 303 may detect that the influence of infrared light is greater as the bias in the distribution of color information is greater, based on the distribution of color information for each region of the input image. This is because the greater the influence of infrared light, the less the color component of the subject, so the color of the captured image is dominated by reddishness due to infrared light rather than the color of the subject, and the distribution of color information is biased around red. .
  • the gain determination unit 304 may perform control so that the size of the effective range of the WB gain becomes smaller as the influence of the infrared light on the color of the input image increases, as shown in FIG.
  • the influence of infrared light on the color of the input image increases, the original color components of the subject decrease, and it is conceivable that the amount of noise increases due to insufficient sensitivity of the imaging sensor.
  • an unexpected WB gain is calculated, and there is a risk that the white balance will be greatly disturbed. Therefore, by reducing the size of the effective range of WB gains as the influence of infrared light on the color of the input image increases, it is possible to prevent the application of unexpected WB gains and achieve an appropriate white balance. can be controlled.
  • FIG. 10 is a configuration diagram showing an example of the functional configuration of an image processing apparatus according to the fourth embodiment. Note that the same reference numerals are given to the same functional units as in the first embodiment, and the description thereof will be omitted.
  • Gain determination section 405 acquires the WB gain from gain calculation section 102 , acquires the determination result as to whether or not the WB gain is effective from gain determination section 104 , determines the final WB gain, and gain multiplication section 106 . output to Also, the gain determination unit 405 determines whether the output image should be chromatic or achromatic based on the WB gain calculated by the gain calculation unit 102, and outputs the result to the color switching unit 407. . Furthermore, when the gain determination unit 405 determines to make the output image achromatic, the gain determination unit 405 outputs a predetermined WB gain to the gain multiplication unit 106 as the final WB gain.
  • the color switching unit 407 acquires the result of determination as to whether the output image is to be chromatic or achromatic from the gain determining unit 405, and if it is to be achromatic, color-converts the input image into an achromatic color and outputs the image. to output
  • FIG. 11 is a diagram used for explaining WB gain control in the fourth embodiment.
  • area A1 represents the effective range (effective area A1) of the WB gain when the color of the input image is not affected by infrared light
  • area A2 is the area where the color of the input image is affected by infrared light.
  • the effective range (effective area A2) of the WB gain when receiving is shown. WB gains within the valid range are applied to the input image to produce the output image.
  • the effective range is designed so that the WB gain within the effective range is applied to the input image so that the white balance is appropriately controlled and the user does not feel uncomfortable.
  • the WB gain P1 is a WB gain calculated when the color of the input image is not affected by infrared light.
  • WB gains P2a, P2b, and P2c are WB gains calculated when the color of the input image is affected by infrared light.
  • the WB gain when the color of the input image is affected by the infrared light has a large difference compared to the WB gain when the color of the input image is not affected by the infrared light. That is, the WB gain P2a is the WB gain when the influence of the infrared light is relatively small, the WB gain P2b is the WB gain when the influence of the infrared light is medium, and the WB gain P2c is the WB gain when the influence of the infrared light is relatively This is the WB gain when the influence of infrared light is large.
  • the gain determination unit 405 determines that the output image is a chromatic color CC in a range in which the WB gain (red gain) is greater than a predetermined range, for example, the WB gain P2b. set the obtained WB gain to the final WB gain. Thereby, the white balance is dynamically controlled according to the calculated WB gain.
  • the WB gain (red gain) is within a predetermined range, for example, a range smaller than the WB gain P2b
  • the gain determination unit 405 determines that the output image is an achromatic NC, Apply WB gain.
  • the WB gain control By performing such WB gain control, if the sensitivity of the imaging sensor is sufficient, the color reproducibility of the captured image can be improved by controlling the white balance according to the influence of infrared light on the color of the input image. An improvement effect can be obtained.
  • the WB gain is set to a fixed value and the output image is rendered achromatic, thereby preventing the display of an image in which the white balance is significantly degraded. can do.
  • the gain determination unit 405 determines whether to use an achromatic color or a chromatic color according to the Red gain, the present invention is not limited to this. It may be determined whether to use an achromatic color or a chromatic color according to the Blue gain. Further, the gain determination unit 405 may acquire the illuminance information of the imaging environment, and determine to use an achromatic color when the illuminance is low and a chromatic color when the illuminance is high.
  • the functional configuration diagram of the image processing apparatus according to the present embodiment is the same as that of the first embodiment, so it is omitted. Also, the description of the functional units that are the same as those of the first embodiment will be omitted, and only the functional units that have different functions from those of the first embodiment will be described below.
  • a gain multiplication unit 106 acquires the WB gain determined by the gain determination unit 105, and multiplies the input image by the WB gain to generate and output an output image.
  • the gain multiplication unit 106 calculates the brightness value of each pixel based on the acquired input image, and sets the final WB gain for each pixel based on the brightness value. It also has the function to That is, the gain multiplier 106 of the fifth embodiment applies the WB gain set for each pixel to the input image as the final WB gain based on the luminance value of each pixel.
  • the gain multiplication unit 106 calculates the brightness of each pixel included in the input image. Then, the gain multiplying unit 106 applies the WB gain determined by the gain determining unit 105 as the final WB gain to pixels whose brightness is less than the predetermined value. On the other hand, the gain multiplication unit 106 sets a third white balance control value as a predetermined white balance control value for pixels whose brightness is equal to or higher than a predetermined value, and applies it as the final WB gain. In this embodiment, the third white balance control value is a predetermined WB gain.
  • FIG. 12 shows a subject 1200 existing in a low illumination environment.
  • the subject 1200 also has a light source 1201, such as an LED indicator.
  • subject 1200 may be a device installed in an unmanned facility and equipped with an LED indicator that indicates the operational status of the device. It is assumed that the device of this subject 1200 emits light from an LED indicator for the purpose of issuing an alert when some kind of abnormality occurs in the device.
  • the environment in which the object 1200 exists has a low illuminance, so the influence of infrared light on the color of the input image is large.
  • the infrared light has less effect on the color of the input image when the LED indicator emits visible light.
  • the area of the region 1203 where the influence of the infrared light on the color of the input image is greater. Therefore, if uniform white balance control is performed on the entire image, a WB gain suitable for the image of the area 1203 that is greatly affected by infrared light will be applied to the entire image.
  • the WB gain suitable for the image of the area 1203, which is greatly influenced by infrared light is applied to the area 1202, which is less influenced by infrared light, around the LED indicator.
  • the white balance of the area 1202 around the LED indicator where the influence of infrared light is small may not be appropriately controlled, and it is possible that the correct color of the LED indicator cannot be identified. In other words, the alert issued by the device may be overlooked.
  • the gain multiplication unit 106 of the present embodiment determines a high-luminance region in the input image as a region dominated by visible light, and determines a low-luminance region in the input image as a region dominated by infrared light. judge. Then, the gain multiplying unit 106 sets the third white balance control value as a WB gain suitable for visible light for a region where visible light is dominant, that is, a region with high brightness.
  • the third white balance control value suitable for visible light is a WB gain suitable for a light source with a predetermined color temperature, for example, a white light source of 5600K (Kelvin).
  • the gain multiplying unit 106 applies the WB gain when the color of the input image is affected by the infrared light to the area where the infrared light is dominant, that is, the area of low brightness. That is, the gain multiplying unit 106 applies the WB gain acquired from the gain determining unit 105 to the pixels in the low luminance area.
  • FIG. 13 shows an example of a WB gain correction method performed by the gain multiplication unit 106 for each pixel, and shows a blue gain 1300 and a red gain 1301 .
  • the gain multiplication unit 106 determines that the area is dominated by visible light, and applies a WB gain suitable for visible light.
  • the gain multiplication unit 106 determines that the area is dominated by infrared light, and obtains a WB gain suitable for an image containing infrared light. apply. More specifically, when the luminance value of the pixel of the input image is equal to or greater than the first luminance threshold value (Y1 or more), the gain multiplication unit 106 determines that the area is dominated by visible light, and Apply appropriate WB gain.
  • the gain multiplication unit 106 determines that the area is dominated by infrared light, and determines that the image contains infrared light.
  • WB gain suitable for the WB gain suitable for visible light is the WB gain suitable for a white light source of 5600K (Kelvin), for example, as described above.
  • the WB gain suitable for an image containing infrared light is the WB gain obtained from the gain determination unit 105 .
  • the first luminance threshold and the second luminance threshold may be the same predetermined value, they are different values in this embodiment, and the first luminance threshold is greater than the second luminance threshold.
  • the gain multiplying unit 106 determines that the WB gain calculated by the gain calculating unit 102 is not valid when the luminance value of the pixel of the input image is equal to or greater than the first luminance threshold value Y1.
  • the gain multiplication unit 106 sets a predetermined WB gain, for example, a WB gain suitable for a white light source of 5600K, as the third white balance control value for pixels having a brightness equal to or greater than the first luminance threshold value Y1. Apply.
  • the gain multiplying unit 106 determines that the WB gain calculated by the gain calculating unit 102 is valid. Then, gain multiplying section 106 applies the WB gain determined by gain determining section 105 .
  • the gain multiplication unit 106 sets a WB gain suitable for visible light and a A WB gain that is intermediate between a WB gain suitable for an image containing infrared light is calculated.
  • the gain multiplier 106 in this case applies this intermediate WB gain to the pixels of the input image.
  • the intermediate WB gain is a WB gain that is obtained by slowly changing over time between the first luminance threshold and the second luminance threshold.
  • the functional configuration diagram of the image processing apparatus according to the present embodiment is substantially the same as that of the first embodiment, so the illustration is omitted. Also, the description of the functional units that are the same as those of the first embodiment will be omitted, and only the functional units that have different functions from those of the first embodiment will be described below.
  • the gain calculation unit 102 outputs a white balance control value (WB gain) calculated by a method different from the above-described embodiments, based on the detection result of the infrared light detection unit 103. More specifically, the gain calculator 102 of the sixth embodiment calculates the WB gain by a method different from that for other periods at the timing when the detection result acquired from the infrared light detector 103 changes.
  • the different WB gain calculation methods are, for example, estimating that the input image is an achromatic object, and calculating the WB gain so that the integral value or average value of the colors of the input image becomes a numerical value representing an achromatic color. It is a method that calculates Such a WB gain calculation method will be referred to as "white setting" in the following description.
  • the infrared light detection unit 103 detects the influence of infrared light on the color of the input image.
  • the detection result of the infrared light detection unit 103 is sent not only to the gain determination unit 104 but also to the gain calculation unit 102 .
  • the gain determination unit 104 determines whether the WB gain obtained from the gain calculation unit 102 is valid based on the detection result obtained from the infrared light detection unit 103, and outputs the determination result to the gain determination unit 105. do. In the case of the sixth embodiment, the gain determination unit 104 determines whether or not the WB gain is effective based on different determination conditions based on the detection result of the infrared light detection unit 103 . That is, the gain determination unit 104 of the sixth embodiment determines that the WB gain acquired from the gain calculation unit 102 is valid at the timing when the detection result acquired from the infrared light detection unit 103 changes.
  • Gain determination section 105 acquires the WB gain from gain calculation section 102 , acquires the determination result as to whether or not the WB gain is effective from gain determination section 104 , determines the final WB gain, and gain multiplication section 106 . output to The gain determination unit 105 according to the sixth embodiment determines that the WB gain from the gain calculation unit 102 is calculated in the white setting process and is effective at the timing when the infrared light detection result changes. is the determined WB gain, the WB gain is fixed. More specifically, the gain determination unit 105 of the sixth embodiment is reinserted after the IRCF is removed, and until the detection result of the infrared light detection unit 103 changes, that is, until the IRCF is removed. It continues to output a constant WB gain while it is on.
  • FIG. 14 is a diagram used for explaining the operation of the gain determining unit 105 of the sixth embodiment.
  • area A1 represents the effective range of WB gain (effective area A1) when the color of the input image is not affected by infrared light
  • area A2 is the area where the color of the input image is affected by infrared light.
  • the effective range (effective area A2) of the WB gain when receiving is shown.
  • the WB gain P1 within the effective area A1 is applied to the input image to generate the output image.
  • the WB gain P2 in FIG. 14 represents the WB gain calculated at the timing when the influence of the infrared light on the color of the input image changes.
  • the WB gain P2 is calculated by, for example, the white setting process described above.
  • the white setting process is performed at the timing when the influence of the infrared light on the color of the input image changes.
  • the WB gain P2 calculated at the timing when the presence or absence of the influence of infrared light on the color of the input image is changed is determined to be valid and applied to the input image. That is, in the case of the sixth embodiment, white setting processing is performed at the timing when the IRCF is inserted and removed, and the WB gain calculated thereby is applied. This makes it possible to control the white balance according to the influence of infrared light on the color of the input image, and improve the color reproducibility of the output image.
  • the effectiveness of the WB gain calculated at the timing when the presence or absence of the influence of infrared light on the color of the input image is changed is determined unconditionally or based on a condition that is relaxed more than usual. It applies. Therefore, the method of calculating the WB gain is not limited to the method of the white setting process described above. Also, in general white setting processing, the WB gain after setting is fixed, but it may or may not be fixed. In this embodiment, after setting the WB gain P2 in FIG. 14, the effective area of the WB gain remains the area A1. A WG gain is calculated. That is, an invalid WB gain is calculated, and in that case, the currently set white balance is maintained, so that the WB gain is naturally fixed to P2.
  • the image processing apparatus may be realized by an information processing apparatus (computer) such as a personal computer or a smartphone connected to the imaging apparatus. good.
  • the image capturing apparatus includes raw data captured by the image capturing unit, shooting parameters indicating exposure time, frame rate, exposure value, etc., and information indicating whether IRCF is used, that is, infrared light for the color of the input image. It also outputs to the computer information indicating the presence or absence of the influence of The information indicating the presence or absence of the influence of infrared light may be input by the user. Then, the computer performs image processing similar to that described in the above embodiment.
  • the computer in this example executes software program code that implements the image processing of this embodiment.
  • a computer that realizes the image processing apparatus of this embodiment includes a CPU, a ROM, a RAM (random access memory), an auxiliary storage device, a display unit, an operation unit, a communication I/F, and It is configured with a bus and the like.
  • the CPU uses the computer programs and data stored in the ROM and RAM to control the entire computer and to perform the aforementioned white balance control and the like.
  • the image processing apparatus of the present embodiment may have one or a plurality of dedicated hardware different from the CPU, and may be configured such that at least part of the processing by the CPU is executed by the dedicated hardware.
  • Examples of dedicated hardware include ASICs (Application Specific Integrated Circuits), FPGAs (Field Programmable Gate Arrays), and DSPs (Digital Signal Processors).
  • the ROM stores programs and the like that do not require modification.
  • the RAM temporarily stores programs and data supplied from the auxiliary storage device, data supplied from the outside via the communication I/F, and the like.
  • the auxiliary storage device is composed of an HDD or the like, and stores various data such as image data, shooting parameters, and information indicating the presence or absence of the influence of infrared light.
  • the display unit is composed of, for example, a liquid crystal display, an LED display, or the like, and displays a GUI or the like for the user to operate the image processing apparatus.
  • the operating unit includes, for example, a keyboard, mouse, joystick, touch panel, etc., and inputs various instructions to the CPU in response to user's operations.
  • the CPU also operates as a display control section that controls the display section and as an operation control section that controls the operation section.
  • a communication I/F is used for communication with an external device of the image processing apparatus. For example, when the image processing device is further connected to an external device by wire, a communication cable is connected to the communication I/F. If the image processing device has a function of wirelessly communicating with an external device, the communication I/F has an antenna.
  • the bus connects each part of the image processing apparatus to transmit information.
  • the external device connected to the image processing device is the above-described imaging device, other information processing device, or the like.
  • the display section and the operation section are assumed to exist inside the image processing apparatus, at least one of the display section and the operation section may exist as a separate device outside the image processing apparatus.
  • the image processing apparatus does not necessarily have to include a display section and an operation section.
  • the present invention supplies a program that implements one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in the computer of the system or apparatus reads and executes the program. It can also be realized by processing to It can also be implemented by a circuit (for example, ASIC) that implements one or more functions.
  • a circuit for example, ASIC

Abstract

画像処理装置は、入力画像の色に対する赤外光の影響を検知する検知手段と、入力画像に基づいて第1のホワイトバランス制御値を算出する算出手段と、第1のホワイトバランス制御値が有効か否かを判定する判定手段と、判定手段の判定結果に基づいて、所定のホワイトバランス制御値を設定する設定手段と、を備える。判定手段は、検知手段の検知結果に基づいて、第1のホワイトバランス制御値が有効か否かを判定するための判定条件を決定する。

Description

画像処理装置、画像処理方法、及びプログラム
 本発明は、撮像装置によって撮像された画像の処理技術に関する。
 従来、撮像センサが赤外光を取り込んだ状態でホワイトバランス(White Balance、以下適宜、WBとする)制御を行い、カラー画像を出力する撮像装置が知られている。
 カラー画像の色は通常、可視光のみ取り込んだ状態、即ち、赤外光を取り込まないように赤外光カットフィルタ(Infra-Red Cut-оff Filter、以下、IRCFとする)を光軸上に挿入した状態を想定して設計されている。一方で、低照度環境での撮影時などに、IRCFを光軸上から抜去して赤外光を取り込むことで撮像センサの感度を向上させるモードを備えた撮像装置がある。ただし、前述した通り、撮像装置の色は赤外光を取り込まない状態で設計されているため、赤外光を取り込むことでカラー画像の色は崩れてしまう。具体的には、赤外光を取り込まない状態と比べて、撮像画像の色が赤みを帯びたりしてしまう。即ち、撮像装置の色再現性が低下してしまう。
 それに対して、特許文献1では、IRCFの位置に応じて、ホワイトバランス制御の方式を切り替える技術が開示されている。特許文献1によれば、IRCFの位置に応じて、画面全体のRGB(赤緑青)成分の各々の積分値の比が、予め記憶された比になるようにホワイトバランス制御を行うか、1:1:1になるようにホワイトバランス制御を行うかを切り替える。これにより、撮像装置の色再現性を向上させている。
 また、近年の撮像素子の高感度化に伴い、IRCF抜去時に赤外光を取り込んだ分だけ露出を下げても可視光成分を取り込めるようになり、IRCF抜去時に被写体の色情報が失われにくくなっている。換言すると、撮像素子の高感度化によって可視光成分と赤外光成分とが混合された撮像画像を得やすくなっている。
特開2005-130317号公報
 しかしながら、上述の特許文献に開示された従来技術では、赤外光カットフィルタ(IRCF)抜去時において、撮像範囲内の被写体の色に偏りがある場合に、ホワイトバランスが崩れてしまう虞がある。
 また、前述の通り、撮像素子の高感度化に伴い、IRCF抜去時に可視光成分と赤外光成分とが混合された撮像画像を得られるようになっているが、前述した従来技術では適切なホワイトバランス制御ができない。
 そこで本発明は、IRCF抜去時においても適切なホワイトバランスに制御可能にすることを目的とする。
 本発明の画像処理装置は、入力画像の色に対する赤外光の影響を検知する検知手段と、入力画像に基づいて第1のホワイトバランス制御値を算出する算出手段と、前記第1のホワイトバランス制御値が有効か否かを判定する判定手段と、前記判定手段の判定結果に基づいて、所定のホワイトバランス制御値を設定する設定手段と、を備え、前記判定手段は、前記検知手段の検知結果に基づいて、前記第1のホワイトバランス制御値が有効か否かを判定するための判定条件を決定することを特徴とする。
 本発明によれば、IRCF抜去時においても適切なホワイトバランスに制御可能になる。
第1の実施形態の画像処理装置の構成例を示した図である。 本実施形態の画像処理の主要部の流れを示すフローチャートである。 第1の実施形態における第1のWBゲイン制御例を表す図である。 第1の実施形態における第2のWBゲイン制御例を表す図である。 第1の実施形態における第3のWBゲイン制御例を表す図である。 第1の実施形態における第4のWBゲイン制御例を表す図である。 第2の実施形態におけるゲイン決定部の動作説明に用いる図である。 第3の実施形態の画像処理装置の構成例を示す図である。 第3の実施形態におけるWBゲイン制御の一例を表す図である。 第4の実施形態の画像処理装置の構成例を示す図である。 第4の実施形態におけるゲイン決定部の動作説明に用いる図である。 第5の実施形態における入力画像の一例を示す図である。 第5の実施形態におけるWBゲインの一例を表す図である。 第6の実施形態におけるWBゲイン制御例を表す図である。
 以下、本発明の実施形態について、図面を参照して説明する。
 以下の実施形態は本発明を限定するものではなく、また、本実施形態で説明されている特徴の組み合わせの全てが本発明の解決手段に必須のものとは限らない。実施形態の構成は、本発明が適用される装置の仕様や各種条件(使用条件、使用環境等)によって適宜修正又は変更され得る。また、後述する各実施形態の一部を適宜組み合わせて構成してもよい。以下の各実施形態において、同一の構成については同じ符号を付して説明する。
 <第1の実施形態>
 図1は第1の実施形態の画像処理装置の構成例を示したブロック図である。
 以下、図1を参照して、第1の実施形態による画像処理装置について説明する。本実施形態の画像処理装置は、デジタルカメラや監視カメラ等の撮像装置に内蔵もしくは接続される装置であるとする。
 入力画像は不図示のレンズおよび撮像センサからなる撮像ユニットで撮像された画像である。入力画像は、複数の画素からなる画像データ(または画像信号)であり、複数の色の情報を含む。複数の色は、例えば赤(Red:R)、緑(Green:G)、青(Blue:B)の各色であり、画像データは、不図示の撮像センサ上に設けられた各色に対応するカラーフィルタを透過して、撮像センサで電気信号に変換された光量に相当するデータである。カラーフィルタは、赤色、緑色、青色に相当する可視光だけでなく、一部の赤外光(非可視光)も透過する。そのため、一般的な撮像装置では、赤外光カットフィルタ(Infra-Red Cut-оff Filter:IRCF)を設けて、赤外光成分を除去することにより、人間の視覚に近い画像が得られるようにしている。撮像センサは、CMOS(Complementary Metal Oxide Semiconductor)やCCD(Charge-Coupled Device)などの撮像素子からなる。
 出力画像は、入力画像の画素値に対し、後述するようにして求められる最終的なホワイトバランス制御値であるホワイトバランスゲインを乗じることによって、ホワイトバランスが適切に補正された画像である。以降の説明では、ホワイトバランス(White Balance)を適宜、WBと記す。詳細は後述するが、本実施形態の画像処理装置は、入力画像が、撮像センサで取り込んだ赤外光の影響を受けているか否かに応じたホワイトバランス制御(WB制御)を行うことによって、ホワイトバランスが適切に補正された出力画像を得るものである。
 特徴量取得部101は、入力画像の色に関する特徴量を取得し、その特徴量をゲイン算出部102に出力する。より具体的には、特徴量取得部101は、入力画像を複数の矩形領域に分割した場合の各矩形領域内に含まれる画像データによって決定される矩形領域毎の色情報を取得する。色情報は例えば矩形領域毎の色差信号の代表値であり、代表値は例えば平均値や最頻値などである。
 ゲイン算出部102は、入力画像の特徴量に応じて第1のホワイトバランス制御値を算出する。例えば、ゲイン算出部102は、特徴量取得部101から領域毎の色情報を取得して、入力画像の色情報の代表値を算出する。そしてゲイン算出部102は、第1のホワイトバランス制御値として、出力画像の色情報の代表値が所定の目標値となるようなホワイトバランスゲイン(以下、WBゲインとする)を算出する。本実施形態において、ホワイトバランス制御に使用されるWBゲインは、例えば、画像の赤みを調整する赤ゲイン(以下、Redゲインとする)、および画像の青みを調整する青ゲイン(以下、Blueゲインとする)であるとする。ゲイン算出部102にて算出されたWBゲインの情報は、ゲイン判定部104およびゲイン決定部105に送られる。
 赤外光検知部103は、入力画像の色に対する赤外光の影響を検知する。即ち、赤外光検知部103は、入力画像の色が、撮像センサで取り込んだ赤外光の影響を受けているか否かを検知し、その検知結果をゲイン判定部104に出力する。例えば、赤外光検知部103は、不図示のIRCFが撮像ユニットのレンズの光軸上に挿入されている場合に、入力画像の色は赤外光の影響を受けていないことを検知する。一方、赤外光検知部103は、IRCFが撮像ユニットのレンズの光軸上に挿入されていない(光軸上から抜去されている)場合に、入力画像の色は赤外光の影響を受けていることを検知する。
 ゲイン判定部104は、赤外光検知部103から取得した検知結果に基づいて、ゲイン算出部102から取得したWBゲイン(第1のホワイトバランス制御値)が有効か否かを判定するための判定条件を決定する。そして、ゲイン判定部104は、その判定条件を用いて、ゲイン算出部102から取得したWBゲイン(第1のホワイトバランス制御値)が有効か否かを判定して、その判定結果をゲイン決定部105に出力する。即ち、ゲイン判定部104は、入力画像の色が、赤外光の影響を受けていない場合と赤外光の影響を受けている場合とで、異なる判定条件に基づいてWBゲイン(第1のホワイトバランス制御値)が有効か否かを判定する。詳細は後述するが、本実施形態において、ゲイン判定部104は、判定条件として、WBゲインに対する所定の領域A1と所定の領域A2とを用いる。そして、ゲイン判定部104は、例えば入力画像の色が赤外光の影響を受けていない場合において、ゲイン算出部102から取得したWBゲインが所定の領域A1内であるときには当該WBゲインが有効であると判定する。また、ゲイン判定部104は、入力画像の色が赤外光の影響を受けている場合において、ゲイン算出部102から取得したWBゲインが所定の領域A1とは異なる所定の領域A2内であるときには当該WBゲインが有効であると判定する。
 詳細は後に図3から図6を用いて説明するが、所定の領域A1は入力画像の色が赤外光の影響を受けていない場合のWBゲインの有効範囲を表す領域であり、領域A2は入力画像の色が赤外光の影響を受けている場合のWBゲインの有効範囲を表す領域である。ここで、所定の領域A1は、撮像センサに可視光のみ取り込んだ状態、即ち赤外光を取り込まないようにIRCFを光軸上に挿入した状態を想定したWBゲインの有効範囲を表す領域である。一方、所定の領域A2の位置は、入力画像の色が赤外光の影響を受けているか否かと、撮像センサの感度と、に応じて設計されている。即ち、IRCF抜去時に撮像センサが取り込む赤外光と可視光との比率は、撮影環境における赤外光と可視光との比率や、撮像センサの赤外光に対する感度と可視光に対する感度との比率によって決まる。したがって本実施形態において、所定の領域A2の位置は、撮像センサが高感度であるほど、所定の領域A1の位置から離れた位置を含むように設計されている。換言すると、所定の領域A2は、撮像センサが高感度であるほど、入力画像の色が赤外光の影響を受けていない場合のWBゲインと、入力画像の色が赤外光の影響を受けている場合のWBゲインとの差が大きくなることを許容するように設計される。
 ゲイン決定部105は、後述するゲイン乗算部106で入力画像に乗算される最終的なホワイトバランス制御値(最終的なWBゲイン)を決定する。詳細は後述するが、ゲイン決定部105は、ゲイン判定部104による判定結果または判定条件に基づいて、最終的なWBゲインを決定する。本実施形態において、ゲイン乗算部106で入力画像に乗算される最終的なWBゲインは、ゲイン算出部102から取得したWBゲイン(第1のホワイトバランス制御値)、または、所定のホワイトバランス制御値としての第2のホワイトバランス制御値である。ゲイン決定部105は、ゲイン算出部102からWBゲイン(第1のホワイトバランス制御値)を取得し、またゲイン判定部104からWBゲインが有効か否かの判定結果を取得して、最終的なWBゲインを決定してゲイン乗算部106に出力する。より具体的には、ゲイン決定部105は、ゲイン判定部104から取得した判定結果が有効を表す判定結果である場合には、ゲイン算出部102で算出した第1のホワイトバランス制御値を、最終的なWBゲインとしてゲイン乗算部106に出力する。一方、ゲイン決定部105は、ゲイン判定部104から取得した判定結果が有効でないことを表す判定結果である場合には、所定のホワイトバランス制御値(第2のホワイトバランス制御値)を、最終的なWBゲインとしてゲイン乗算部106に出力する。なお、第2のホワイトバランス制御値は、例えば不図示の記憶装置に記憶されたWBゲインである。また、記憶装置に記憶されたWBゲインとは、例えば過去に最終的なWBゲインとして用いられたWBゲインや、所定の領域A1またはA2内に含まれる予め定められたWBゲインである。
 ゲイン乗算部106は、ゲイン決定部105から最終的なWBゲインを取得し、その最終的なWBゲインを入力画像に乗じることでホワイトバランス制御がなされた出力画像を生成して、出力する。
 図2は、本実施形態の画像処理装置で実行される画像処理の主要部の流れの一例を示すフローチャートである。以下、図2のフローチャートを参照しながら、本実施形態に係る画像処理の一例について説明する。なお、以降のフローチャートの説明では、処理ステップを、符号の「S」を用いて表している。
 まずS1では、特徴量取得部101が、入力画像の色に関する特徴量を取得する。
 次にS2では、ゲイン算出部102が、S1で取得した特徴量に基づいて第1のホワイトバランス制御値であるWBゲインPを算出する。
 次にS3において、赤外光検知部103は、入力画像の色が、撮像センサで取り込んだ赤外光の影響を受けているか否かを検知する。そして、入力画像の色が赤外光の影響を受けていないことを赤外光検知部103が検知した場合、処理はS4に進む。一方、入力画像の色が赤外光の影響を受けていることを赤外光検知部103が検知した場合、処理はS5に進む。
 S4に進むと、ゲイン判定部104は、WBゲインPが領域A1に含まれているか否かを判定する。そして、ゲイン判定部104は、WBゲインPが領域A1に含まれている場合には、WBゲインPが有効であると判定し、処理をS6に進める。一方、ゲイン判定部104は、WBゲインPが領域A1に含まれていない場合には、WBゲインPが有効でないと判定し、処理をS7に進める。
 S5に進むと、ゲイン判定部104は、WBゲインPが領域A2に含まれているか否かを判定する。そして、ゲイン判定部104は、WBゲインPが領域A2に含まれている場合にはWBゲインPが有効であると判定し、その後、処理はS6に進む。一方、ゲイン判定部104は、WBゲインPが所定の領域A2に含まれていない場合にはWBゲインPが有効でないと判定し、その後、処理はS8に進む。
 S6に進むと、ゲイン決定部105は、WBゲインP(第1のホワイトバランス制御値)を、最終的なWBゲインとしてゲイン乗算部106に出力する。
 またS7に進んだ場合、ゲイン決定部105は、所定のホワイトバランス制御値(第2のホワイトバランス制御値)としてWBゲインQを、最終的なWBゲインとし、ゲイン乗算部106に出力する。WBゲインQについては後述する。
 またS8に進んだ場合、ゲイン決定部105は、所定のホワイトバランス制御値(第2のホワイトバランス制御値)としてWBゲインRを、最終的なWBゲインとし、ゲイン乗算部106に出力する。WBゲインRについては後述する。
 以下、本実施形態におけるホワイトバランスゲイン制御とその効果について説明する。
 図3は、本実施形態におけるホワイトバランスゲイン制御の一例である第1のWB制御例を表した図である。
 図3において、所定の領域A1は、入力画像の色が赤外光の影響を受けていない場合のWBゲインの有効範囲を表しており、以下、有効領域A1とする。所定の領域A2は、入力画像の色が赤外光の影響を受けている場合のWBゲインの有効範囲を表し、以下、有効領域A2とする。本実施形態において、有効範囲は、その有効範囲内のWBゲインが入力画像に適用されることで、適切なホワイトバランスに制御され、ユーザに大きな違和感を与えないような範囲に設計されている。即ち、入力画像の色が赤外光の影響を受けていない場合には、入力画像に対して有効領域A1に属するWBゲインを適用することで、ホワイトバランスが崩れて画質が劣化することを防止できる。同様に、入力画像の色が赤外光の影響を受けている場合には、入力画像に対して有効領域A2に属するWBゲインを適用することで、ホワイトバランスが崩れて画質が劣化することを防止できる。
 また、図3において、WBゲインP1、P2、P3、Q、およびRは、それぞれがWBゲインを表している。WBゲインP1は、入力画像の色が赤外光の影響を受けていない場合に算出されたWBゲインを表しており、WBゲインP2およびP3は入力画像の色が赤外光の影響を受けている場合に算出されたWBゲインを表している。WBゲインP2に含まれる例示された3つのWBゲインは、それら3つのWBゲインのうち、撮影環境の照明条件に最適ないずれかのWBゲインが適用されることを表している。一方、WBゲインP3は、入力画像の色が赤外光の影響を受けている場合における有効領域A2の範囲外のWBゲインであり、入力画像に対して適用されることは無いWBゲインである。WBゲインQは、入力画像の色が赤外光の影響を受けていない場合において、入力画像の特徴量から算出されたWBゲインが有効領域A1の範囲外であるときに、当該入力画像に対して適用される、有効領域A1の範囲内のWBゲインである。一方、WBゲインRは、入力画像の色が赤外光の影響を受けている場合において、入力画像の特徴量から算出されたWBゲインが有効領域A2の範囲外であるときに、当該入力画像に対して適用される、有効領域A2の範囲内のWBゲインである。この例では、WBゲインQとWBゲインRは、有効領域A1とA2の共通領域に属するWBゲインとし、Q=Rとする。また、実際には、WBゲインを時間的に急峻に変化させてしまうとユーザに違和感を与える虞があるため、WBゲインP1、P2、Q、Rを目標値として、現在のWBゲインから目標値へ、時間的に緩やかにWBゲインを変化させる制御が行われる。
 ここで、既存のホワイトバランス制御においては、入力画像の色が赤外光の影響を受けているか否かに関係なく、WBゲインの有効範囲は固定となされている。そのため、入力画像の色が赤外光の影響を受けている場合に、図3のWBゲインP2に示した撮影環境の照明条件に最適なWBゲインを適用することができなかったり、WBゲインP3に示すWBゲインが適用されてしまったりする。このため、実際に適用されるWBゲインと最適なWBゲインとの差が大きい場合、ホワイトバランスが崩れてしまい画質が劣化する虞がある。
 これに対し、本実施形態におけるホワイトバランス制御では、入力画像の色が赤外光の影響を受けているか否かに応じて、WBゲインの有効範囲を可変としている。そのため、本実施形態では、入力画像の色が赤外光の影響を受けている場合には、図3のWBゲインP2に示したような撮影環境の照明条件に最適なWBゲインを適用することができる。一方、入力画像の色が赤外光の影響を受けている場合には、有効範囲外のWBゲインP3が算出されたとしても、有効範囲内のWBゲインRを適用するようになされるため、ホワイトバランスが崩れて画質が劣化することを防止できる。
 また、本実施形態のホワイトバランス制御では、撮像センサの感度に応じて、入力画像の色が赤外光の影響を受けている場合のWBゲインの有効領域A2を設計している。即ち、本実施形態では、撮像センサが高感度であるほど、WBゲインの有効領域A2の位置を、入力画像の色が赤外光の影響を受けていない場合のWBゲインの有効領域A1の位置から離れた位置を含むように設計している。
 ここで、低照度であるほど撮影環境における赤外光成分の可視光成分に対する比率が大きくなるため、撮像画像の赤みは強くなる。そして、撮像画像に含まれる強い赤みを補正するためには、入力画像の色が赤外光の影響を受けていない場合のWBゲインと比較して大きく異なるWBゲインを適用する必要がある。また、撮像センサが高感度であるほど、低照度環境であってもSNが高く、被写体本来の色を残した撮像画像が得られる。以上のことから、撮像センサが高感度であるほど、入力画像の色が赤外光の影響を受けている場合であっても、低照度環境においてより積極的にホワイトバランスを制御することで、色再現性向上効果を得ることができる。一方で、撮像センサの感度が不足している場合に、積極的にホワイトバランスを制御してしまうと、ノイズの影響によりホワイトバランスが大きく崩れてしまう虞がある。即ち、撮像センサの感度が不足している場合には、入力画像の色が赤外光の影響を受けている場合であっても、赤外光の影響を受けていない場合のWBゲインと比較して差が小さいWBゲインを適用することで、ホワイトバランスが大きく崩れることを防止できる。
 これらのことから、本実施形態のホワイトバランス制御では、撮像センサが高感度であるほど、入力画像の色が赤外光の影響を受けている場合であっても積極的にホワイトバランスを制御する。即ち、本実施形態のホワイトバランス制御では、撮像センサが高感度であるほど、入力画像の色が赤外光の影響を受けていない場合のWBゲインと比較して大きく異なるWBゲインが適用されるようにする。これにより、ホワイトバランスの大きな崩れを防止しつつ、低照度時の撮像画像の色再現性を向上することができる。
 本実施形態では、赤外光検知部103においてIRCFの挿抜状態を検知するとしたが、これに限らない。例えば、不図示の赤外照明ユニットを具備した撮像装置の場合には、赤外照明のON/OFF状態に応じて入力画像の色が赤外光の影響を受けているか否かを検知してもよい。即ち、赤外照明ユニットが赤外光を照射している場合に入力画像の色が赤外光の影響を受けていることを検知し、赤外照明ユニットが赤外光を照射していない場合に入力画像の色が赤外光の影響を受けていないことを検知してもよい。あるいは、入力画像の色が赤外光の影響を受けているか否かをユーザが設定できるようにしてもよい。即ち、入力画像の色が赤外光の影響を受けているときのWB制御モードと、入力画像の色が赤外光の影響を受けていないときのWB制御モードとを設けて、ユーザがいずれかのWB制御モードを選択できるようにしてもよい。
 なお、ゲイン決定部105は、赤外光検知部103の検知結果が変化したタイミングでのみ、WBゲインQ、またはWBゲインRを、ゲイン乗算部106に出力してもよい。例えば、入力画像の色が赤外光の影響を受けている場合において、ゲイン算出部102で算出されたWBゲインが有効領域A2の範囲外であったとする。この場合、ゲイン決定部105は、過去に算出されたWBゲインによって現在適用されているWBゲインが有効領域A2の範囲内にある場合には、WBゲインRではなく現在のWBゲインを出力する。一方、IRCFが抜去されたタイミングにおいては、現在適用されているWBゲインは、IRCF挿入時に算出されており、有効領域A1の範囲内にあるので、ゲイン決定部105は、有効領域A2の範囲内のWBゲインRを出力する。即ち、ゲイン決定部105は、入力画像の色が赤外光の影響を受けている場合、現在適用されているWBゲインが有効領域A2の範囲外である場合のみ、有効領域A2の範囲内のWBゲインRを出力する。
 図4は、本実施形態における第2のWB制御例を表した図である。
 図4に示す第2のWB制御例において、ゲイン決定部105は、WBゲインQ、WBゲインRを、それぞれ、有効領域A1、有効領域A2の中心にする。このようにすることで、有効領域内の平均的なWBゲインを適用することができる。これにより、真の(最適な)WBゲインが有効領域内のいずれのゲインであったとしても、適用されるWBゲインと真の(最適な)WBゲインとのずれを小さく抑えることができ、ホワイトバランスが大きく崩れることを防止できる。また、適用されるWBゲインと真の(最適な)WBゲインとのずれを小さく抑えることができるため、WBゲインを時間的に緩やかに制御する場合において、WBゲインが真の値(最適な値)に収束するまでに要する時間を最小にすることができる。
 図5は、本実施形態における第3のWB制御例を表した図である。
 図5に示す第3のWB制御例において、ゲイン決定部105は、WBゲインRを領域A2内の予め定められたWBゲインとするのではなく、領域A2内でWBゲインP3と最も近いWBゲインとする。また、ゲイン判定部104は、入力画像の色が赤外光の影響を受けている場合の有効領域A2を、入力画像の色が赤外光の影響を受けていない場合の有効領域A1よりも小さくしてもよい。入力画像の色が赤外光の影響を受けている場合、被写体の素材によっては被写体の色が大きくずれてしまう虞があり、その色でホワイトバランスを制御することで、ホワイトバランスも大きく崩れてしまう虞がある。図5に示すように、入力画像の色が赤外光の影響を受けている場合に、WBゲインの有効領域A2を小さくすることで、想定外のWBゲインが適用されてホワイトバランスが大きく崩れることを防止できる。なお、有効領域A2を小さくすると、算出されるWBゲインが有効領域A2の外側になることが多くなる。この場合に、WBゲインRを固定値にしていると照明条件の変化によって最適なホワイトバランスに動的に制御することができなくなってしまう。そのため、WBゲインRを、有効領域A2の外側に算出されたWBゲインP3から最も近く、かつ、有効領域A2内であるWBゲインとすることにより、照明条件の変化に応じて最適なホワイトバランスに動的に制御することができる。
 図6は、本実施形態における第4のWB制御例を表した図である。
 図6の第4のWB制御例において、ゲイン決定部105は、入力画像の色が赤外光の影響を受けている場合に算出されたWBゲインP2を、入力画像の色が赤外光の影響を受けている場合のWBゲインの有効領域A2内にあるWBゲインRaにする。また、ゲイン決定部105は、入力画像の色が赤外光の影響を受けている場合に算出されたWBゲインP3を、入力画像の色が赤外光の影響を受けている場合のWBゲインの有効領域A2内にあるWBゲインRとして出力してもよい。WBゲインP2は入力画像の色が赤外光の影響を受けている場合のWBゲインの有効領域A2の範囲内であり、WBゲインP3は入力画像の色が赤外光の影響を受けている場合のWBゲインの有効領域A2の範囲外である。そして、WBゲインRaは、有効領域A2の範囲内にあり、ホワイトバランスを適切に制御するために予め定められたWBゲインである。
 ここで、入力画像の色が赤外光の影響を受けている場合であってもホワイトバランスを動的に制御するためには、有効領域A2を広く設定する必要がある。しかしながら、有効領域A2を広く設定すると、取り得るWBゲインの幅が大きくなるため、想定外のWBゲインが適用されて、ホワイトバランスが崩れてしまう虞がある。そこで、第4のWB制御例では、算出されたWBゲイン(例えば、WBゲインP2)が有効領域A2の範囲内であっても、より限定された範囲に存在するWBゲイン(例えば、WBゲインRa)を適用する。これにより、想定外のWBゲインが適用されてホワイトバランスが大きく崩れることを防止でき、入力画像の色が赤外光の影響を受けている場合であっても、ホワイトバランスを適切に制御して撮像画像の色再現性を高めることができる。
 以上説明したように、本実施形態の画像処理装置によれば、IRCFの挿抜に応じて、適切な画像データを生成することができる。
 <第2の実施形態>
 次に、図7を参照して、第2の実施形態の画像処理装置について説明する。第2の実施形態のホワイトバランス制御では、WBゲインの急峻な変動に伴う画質劣化を防止するため、WBゲインを時間的に緩やかに変化させる。
 なお、本実施形態に係る画像処理装置の機能構成は第1の実施形態と同じであるためその図示は省略する。また、第1の実施形態と同じ機能部については説明を省略し、第1の実施形態とは異なる機能を有する機能部についてのみ以下に説明する。
 ゲイン決定部105は、ゲイン算出部102からWBゲインを取得し、ゲイン判定部104からWBゲインが有効か否かの判定結果を取得する。さらに、ゲイン決定部105は、取得した情報と、ゲイン決定部105が記憶している現在のWBゲインとに基づいて、最終的なWBゲインを決定する。そして第2の実施形態の場合、ゲイン決定部105は、現在のWBゲインから最終的なWBゲインまで緩やかに変化するようなWBゲインを、ゲイン乗算部106に出力する。なお、現在のWBゲインとは、過去に算出され、ゲイン乗算部106に設定されているWBゲインであり、動画像においては、例えば1フレーム前の入力画像に対して適用されたWBゲインである。
 図7は、第2の実施形態のゲイン決定部105における動作の説明に用いる図である。
 図7のWBゲインP1は現在のWBゲインであり、WBゲインP2は入力画像の色が赤外光の影響を受けている場合にゲイン算出部102で算出されたWBゲインである。入力画像の色が赤外光の影響を受けている場合、WBゲインP2は有効領域A2内のWBゲインであるため、ゲイン決定部105は、このWBゲインP2を最終的なWBゲインとして設定する。
 ここで、WBゲインを急峻に変えてしまうと、急に色が変わったり、場合によっては短い期間に何度も色の変化を繰り返してホワイトバランスが振動してしまったりすることで画質が劣化する虞がある。それを防止するため、ゲイン決定部105は、WBゲインP1からWBゲインP2までWBゲインが緩やかに変化するように、WBゲインP1とP2との間に位置する複数のWBゲインを逐次算出して出力する。即ち、ゲイン決定部105は、WBゲインを緩やかに変化させる際の目標WBゲインを設定し、入力画像に適用されるWBゲイン(現在のWBゲイン)が徐々に目標WBゲインに近づくようなWBゲインを逐次算出して出力する。
 より具体的に説明すると、ゲイン決定部105は、現在のWBゲインが有効領域A1にのみ属するか、有効領域A2にのみ属するか、あるいは有効領域A1とA2の共通領域に属するかによって目標WBゲインを制御する。例えば、ゲイン決定部105は、現在のWBゲインが、有効領域A1とA2の共通領域を除く有効領域A1に属する場合(例えば図7のP1の位置)、目標WBゲインを有効領域A1とA2の共通領域に属するWBゲイン(例えば図7のRの位置)に設定する。そして、ゲイン決定部105は、現在のWBゲインがWBゲインRに徐々に近づくようにWBゲインを設定する。
 次に、ゲイン決定部105は、現在のWBゲインが有効領域A1とA2の共通領域に属するWBゲインRに達した後で、目標WBゲインを本来の算出されたWBゲインP2に設定する。つまりゲイン決定部105は、現在のWBゲインが有効領域A1とA2の共通領域に属する場合、目標WBゲインを、有効領域A1とA2の共通領域を除く有効領域A2に属するWBゲイン(例えば図7のP2の位置)に設定する。そして、ゲイン決定部105は、現在のWBゲインが、WBゲインRから最終的な目標であるWBゲインP2へ時間的に緩やかに変化するようにWBゲインを設定して出力する。
 第2の実施形態のように、WBゲインを時間的に緩やかに変化させる場合、例えばWBゲインを図7のWBゲインP1からP2まで変化させる際には、WBゲインP1とP2とを結ぶ直線上を徐々に変化させるのが一般的である。しかしながら、異なる有効領域A1とA2を跨いでWBゲインを変化させる場合、領域の形状によっては、図7に示したようにWBゲインP1とP2とを結ぶ直線が有効領域A1にもA2にも含まれない領域外に出てしまう場合がある。この場合、WBゲインが図7のゲインSの位置で止まって(収束して)しまい、WBゲインP2まで変化させることができなくなる虞がある。つまり、適切なホワイトバランスに制御することができなくなることが考えられる。
 そこで、本実施形態では、現在のWBゲインが一方の有効領域から二つの有効領域の共通領域に達するまでは、目標WBゲインを二つの有効領域の共通領域に属する第1の目標WBゲインに設定する。そして、2つの有効領域の共通領域に達した後、第1の目標WBゲインを他方の有効領域に属する第2の目標WBゲイン(最終的なWBゲイン)に設定する。このように実施することで、本来の最終的なWBゲインに達する前にWBゲインが収束してしまうことを防止し、適切なホワイトバランスに制御することができる。
 なお、ゲイン決定部105は、入力画像の色が赤外光の影響を受けているか否かが切り替わった直後、即ちWBゲインの有効領域が切り替わった直後のタイミングにおいて、目標WBゲインを二つの有効領域の共通領域に属するWBゲインに設定してもよい。または、ゲイン決定部105は、入力画像の色が赤外光の影響を受けているか否かが切り替わった直後のタイミングにおいて二つ有効領域の共通領域に属するWBゲインを出力してもよい。入力画像の色が赤外光の影響を受けているか否かが切り替わるタイミングにおいては、入力画像の色が大きく変化するため、ホワイトバランスが大きく変化しても画質劣化を感じにくいと考えられる。従って、ゲイン決定部105は、入力画像の色が赤外光の影響を受けているか否かが切り替わった直後のタイミングで、入力画像に適用されるWBゲインを、例えば図7のWBゲインP1からWBゲインRに変更する。その後、ゲイン決定部105は、図7のWBゲインRからWBゲインP2まで、緩やかにWBゲインを変更する。このように実施することで、本来の最終的な目標WBゲインに達する前にWBゲインが収束してしまうことを防止しつつ、本来の最終的な目標WBゲインに達するのに要する時間を短縮することができる。
 <第3の実施形態>
 以下、第3の実施形態の画像処理装置について説明する。すでに説明した実施形態では、IRCFの挿抜や、赤外照明の点灯/消灯、ユーザによるモード切り替えなど、入力画像の色が撮像センサで取り込んだ赤外光の影響を受けているか否かに応じてホワイトバランスを制御する。
 それに対して第3の実施形態は、入力画像の色に対する赤外光の影響の大きさを検知し、赤外光の影響の大きさに応じてホワイトバランスを制御する。従って、第3の実施形態においては、入力画像の色が撮像センサで取り込んだ赤外光の影響を常に受ける場合であっても、その影響の相対的な大きさに応じて適切なホワイトバランス制御を行うことができる。
 図8は、第3の実施形態に係る画像処理装置の機能構成の一例を示す構成図である。なお、第1の実施形態と同じ機能部には同じ符号を付し、それらの説明は省略する。
 赤外光検知部303は、特徴量取得部101から入力画像の色に関する特徴量を取得する。そして、赤外光検知部303は、入力画像の色に関する特徴量に基づいて、入力画像の色が撮像センサで取り込んだ赤外光の影響をどの程度受けているかを検知し、その検知結果をゲイン判定部304に出力する。より具体的には、赤外光検知部303は、入力画像の色の平均値を算出し、その算出した色平均値の赤色成分が大きいほど赤外光の影響が大きいと検知し、一方、算出した色平均値の赤色成分が小さいほど赤外光の影響が小さいと検知する。
 ゲイン判定部304は、赤外光検知部303から取得した検知結果に応じて、ゲイン算出部102から取得したWBゲインが有効か否かを判定し、その判定結果をゲイン決定部105に出力する。より具体的には、ゲイン判定部304は、入力画像の色に対する赤外光の影響の大きさに応じて、異なる判定条件に基づいてWBゲインが有効か否かを判定する。例えば、ゲイン判定部304は、入力画像の色に対する赤外光の影響の大きさが小さい場合において、WBゲインが所定の領域(後述する図9の有効領域A20)内であるときはそのWBゲインが有効であると判定する。またゲイン判定部304は、入力画像の色に対する赤外光の影響の大きさが中程度の場合において、WBゲインが所定の領域(後述する図9の有効領域A21)内であるときにはそのWBゲインが有効であると判定する。またゲイン判定部304は、入力画像の色に対する赤外光の影響の大きさが大きい場合において、WBゲインが所定の領域(A22)内であるときにはそのWBゲインが有効であると判定する。さらにゲイン判定部304は、例えば、入力画像の色に対する赤外光の影響の大きさの差が大きいほど、所定の領域が離れるように領域の位置を設定する。なお、入力画像の色に対する赤外光の影響の大きさが小さいか、または大きいか、あるいは中程度か等の判定は、例えば、それぞれに対応した有効範囲内か否かにより行ってもよいし、それぞれに対応した閾値との比較を用いて行ってもよい。
 図9は、第3の実施形態におけるゲイン判定部304およびゲイン決定部105の動作の説明に用いる図である。
 図9の領域A20は、入力画像の色に対する赤外光の影響の大きさが小さい場合の有効範囲(有効領域A20とする)を表している。また図9の領域A21は入力画像の色に対する赤外光の影響の大きさが中程度の場合の有効範囲(有効領域A21とする)を表し、図9の領域A22は入力画像の色に対する赤外光の影響の大きさが大きい場合の有効範囲(有効領域A22とする)を表している。有効範囲に含まれるWBゲインは、入力画像に適用されたときに、適切なホワイトバランスの出力画像が出力されるWBゲインである。図9のWBゲインP20は、入力画像の色に対する赤外光の影響の大きさが小さく、有効領域A20が設定されている場合に算出された、当該有効領域A20に属する有効なWBゲインを表している。図9のWBゲインP22は、入力画像の色に対する赤外光の影響の大きさが大きく、有効領域A22が設定されている場合に算出された、当該有効領域A22に属する有効なWBゲインを表している。図9のWBゲインP31は、入力画像の色に対する赤外光の影響の大きさが中程度であり、有効領域A21が設定されている場合に算出された、当該有効領域A21に属さない、有効でないWBゲインを表している。図9のWBゲインR1は、入力画像の色に対する赤外光の影響の大きさが中程度であり、有効領域A21が設定されている際に、算出されたWBゲインが有効領域A21の外側であった場合に入力画像に適用されるWBゲインを表している。
 本実施形態におけるホワイトバランス制御では、入力画像の色に対する赤外光の影響が小さい場合にはWBゲインP20、影響が中程度の場合にはWBゲインR1、影響が大きい場合にはWBゲインP22の、各WBゲインが適用される。本実施形態では、入力画像の色に対する赤外光の影響の大きさに応じて最適なWBゲインの有効範囲を設定できるため、撮像センサが赤外光を取り込む場合であっても、撮像画像の色再現性を向上できると共にホワイトバランスが大きく崩れることを防止できる。
 赤外光検知部303は、入力画像の色の平均値を算出し、算出した色平均値の赤色成分が大きいほど赤外光の影響が大きいと検知したが、赤外光の影響度を検知する方法はこれに限らない。例えば、赤外光検知部303は、撮影環境の照度情報を取得して、照度が低いほど赤外光の影響が大きいと検知してもよい。照度情報は、入力画像の明るさに基づいて算出したり、露出条件に基づいて算出したり、あるいは、不図示の照度センサを設けてその読み取り値に基づいて算出したりすればよい。また、赤外光検知部303は、入力画像の領域毎の色情報の分布に基づいて、色情報の分布の偏りが大きいほど赤外光の影響が大きいと検知してもよい。赤外光の影響が大きいほど被写体の色成分が少なくなるため、撮像画像の色は被写体の色ではなく赤外光による赤みが支配的になり、色情報の分布は赤色周辺に偏るためである。
 なお、ゲイン判定部304は、図9に示したように、入力画像の色に対する赤外光の影響が大きくなるほど、WBゲインの有効範囲の大きさを小さくするように制御してもよい。入力画像の色に対する赤外光の影響が大きくなる状況であるほど、被写体本来の色成分が少なくなり、撮像センサの感度不足によりノイズ量が増加することが考えられる。そのため、想定外のWBゲインが算出され、ホワイトバランスが大きく崩れてしまう虞がある。そこで、入力画像の色に対する赤外光の影響が大きくなるほど、WBゲインの有効範囲の大きさを小さくすることで、想定外のWBゲインが適用されてしまうことを防止し、適切なホワイトバランスに制御することができる。
 <第4の実施形態>
 以下、第4の実施形態の画像処理装置について説明する。すでに説明した実施形態では入力画像の色が、撮像センサで取り込んだ赤外光の影響を受けている場合であっても、ホワイトバランスを適切に制御して、有彩色の出力画像を出力するものである。それに対して第4の実施形態では、入力画像の色が撮像センサで取り込んだ赤外光の影響を受けている場合に、赤外光の影響の大きさに応じて出力画像を有彩色とするか、または無彩色とするかを切り替える。
 図10は、第4の実施形態に係る画像処理装置の機能構成の一例を示す構成図である。なお、第1の実施形態と同じ機能部には同じ符号を付し、それらの説明は省略する。
 ゲイン決定部405は、ゲイン算出部102からWBゲインを取得し、ゲイン判定部104からWBゲインが有効か否かの判定結果を取得して、最終的なWBゲインを決定し、ゲイン乗算部106に出力する。また、ゲイン決定部405は、ゲイン算出部102にて算出されたWBゲインに基づいて、出力画像を有彩色とするか無彩色とするかを決定し、その結果を色切り替え部407に出力する。さらに、ゲイン決定部405は、出力画像を無彩色とすることを決定した場合、予め定められたWBゲインを、最終的なWBゲインとしてゲイン乗算部106に出力する。
 色切り替え部407は、ゲイン決定部405から出力画像を有彩色とするか無彩色とするかの判断結果を取得し、無彩色とする場合には入力画像を無彩色に色変換して出力画像を出力する。
 図11は、第4の実施形態におけるWBゲイン制御の説明に用いる図である。
 図11において、領域A1は入力画像の色が赤外光の影響を受けていない場合のWBゲインの有効範囲(有効領域A1)を表し、領域A2は入力画像の色が赤外光の影響を受けている場合のWBゲインの有効範囲(有効領域A2)を表している。有効範囲内のWBゲインは入力画像に適用されて出力画像が生成される。有効範囲は、その有効範囲内のWBゲインが入力画像に適用されることで、適切なホワイトバランスに制御され、ユーザに大きな違和感を与えないような範囲に設計されている。
 また、図11に示したWBゲインP1、P2a、P2b、P2cにおいて、WBゲインP1は入力画像の色が赤外光の影響を受けていない場合に算出されたWBゲインである。一方、WBゲインP2a、P2b、およびP2cは、入力画像の色が赤外光の影響を受けている場合に算出されたWBゲインである。
 ここで、撮影環境が低照度になり、入力画像の色に対する赤外光の影響が大きくなるほど入力画像の赤みが強くなる。そのため、入力画像の色が赤外光の影響を受けている場合のWBゲインは、入力画像の色が赤外光の影響を受けていない場合のWBゲインと比較して差が大きくなる。即ち、WBゲインP2aは相対的に赤外光の影響が小さい場合のWBゲインであり、WBゲインP2bは赤外光の影響が中程度の場合のWBゲインであり、WBゲインP2cは相対的に赤外光の影響が大きい場合のWBゲインである。入力画像の色に対する赤外光の影響が大きい場合、被写体の本来の色成分が少なくなるため、ホワイトバランスを適切に制御したとしても、撮像センサの感度によっては十分な色再現性向上効果を得られない。一方で、ノイズ量が増えてしまうために適切なホワイトバランスに制御できない虞がある。
 そこで、ゲイン決定部405は、WBゲイン(Redゲイン)が所定の範囲、例えばWBゲインP2bより大きくなる範囲では、出力画像を有彩色CCとするように決定し、また、ゲイン算出部102で算出されたWBゲインを最終的なWBゲインに設定する。これにより、算出されたWBゲインに応じて動的にホワイトバランスが制御されることになる。一方、WBゲイン(Redゲイン)が所定の範囲、例えばWBゲインP2bより小さくなる範囲では、ゲイン決定部405は、出力画像を無彩色NCとするように決定し、また、予め定められた固定のWBゲインを適用する。このようなWBゲイン制御が行われることで、撮像センサの感度が足りている場合には、入力画像の色に対する赤外光の影響に応じてホワイトバランスを制御することで撮像画像の色再現性向上効果を得ることができる。一方、撮像センサの感度が不足している場合には、WBゲインが固定値になされるとともに出力画像が無彩色になされることで、ホワイトバランスが大きく崩れた画像が表示されてしまうことを防止することができる。
 なお、ゲイン決定部405は、Redゲインに応じて無彩色とするか有彩色とするかを決定したが、これに限らない。Blueゲインに応じて無彩色とするか有彩色とするかを決定してもよい。また、ゲイン決定部405は、撮影環境の照度情報を取得して、照度が低い場合に無彩色とし、照度が高い場合に有彩色とするように決定してもよい。
 <第5の実施形態>
 以下、第5の実施形態の画像処理装置について説明する。すでに説明した実施形態は、画像全体に対して一様に適用するWBゲインを制御するものである。それに対して、第5の実施形態は、入力画像の色に対する赤外光の影響の大きさを画素毎に判定して、その画素毎の判定結果に基づいて、画素毎にWBゲインを設定する。
 なお、本実施形態に係る画像処理装置の機能構成図は第1の実施形態と同じであるため省略する。また、第1の実施形態と同じ機能部については説明を省略し、第1の実施形態とが異なる機能を有する機能部についてのみ以下に説明する。
 ゲイン乗算部106は、ゲイン決定部105で決定されたWBゲインを取得し、入力画像にWBゲインを乗じることで出力画像を生成して、出力する。ここで、第5の実施形態の場合、ゲイン乗算部106は、取得した入力画像に基づいて画素毎の輝度値を算出し、その輝度値に基づいて、画素毎に最終的なWBゲインを設定する機能をも有する。即ち、第5の実施形態のゲイン乗算部106は、画素毎の輝度値に基づいて、画素毎に設定したWBゲインを最終的なWBゲインとして入力画像に適用する。
 第5の実施形態の場合、ゲイン乗算部106は、入力画像に含まれる画素毎の明るさを算出する。そして、ゲイン乗算部106は、当該明るさが所定値未満の画素に対してはゲイン決定部105で決定されたWBゲインを最終的なWBゲインとして適用する。一方、ゲイン乗算部106は、明るさが所定値以上の画素に対しては、所定のホワイトバランス制御値として第3のホワイトバランス制御値を設定し、それを最終的なWBゲインとして適用する。本実施形態において、第3のホワイトバランス制御値は、予め決めたWBゲインとなされている。
 本実施形態で想定しているユースケースについて、図12を用いて説明する。
 図12は、低照度環境に存在する被写体1200を表している。また被写体1200は、LEDのインジケータのような光源1201を具備している。例えば、被写体1200は、無人の施設に設置された装置であって、装置の動作状態を表すLEDインジケータを備えているとする。そしてこの被写体1200の装置は、当該装置に何らかの異常が生じた場合にアラートを発する目的で、LEDインジケータを発光させるものであるとする。
 このような場合においては、被写体1200が存在する環境が低照度なので、入力画像の色に対する赤外光の影響は大きい。しかしながら、LEDインジケータの周辺部分の画像の領域1202については、LEDインジケータが可視光を発した場合、入力画像の色に対する赤外光の影響は小さくなる。このような場合、画像内の面積比率でいえば、入力画像の色に対する赤外光の影響が大きい領域1203の面積の方が大きい。このため、画像全体に対して一様なホワイトバランス制御を行ってしまうと、赤外光の影響が大きい領域1203の画像に適したWBゲインが画像全体に適用されることになる。即ち、LEDインジケータの周辺の赤外光の影響が小さい領域1202に対しても、赤外光の影響が大きい領域1203の画像に適したWBゲインが適用されてしまう。その結果、LEDインジケータの周辺の赤外光の影響が小さい領域1202のホワイトバランスが適切に制御できない虞があり、LEDインジケータの正しい色を識別できなくなることが考えられる。つまり、装置が発しているアラートが、見落とされてしまう虞がある。
 上述したような、可視光が支配的な領域1202と赤外光が支配的な領域1203とがある場合、可視光が支配的な領域1202、とりわけ光源が存在する部分は高輝度の画素値が得られる。そのため、本実施形態のゲイン乗算部106は、入力画像において高輝度の領域を可視光が支配的な領域と判定し、一方、入力画像において低輝度の領域を赤外光が支配的な領域と判定する。そしてゲイン乗算部106は、可視光が支配的な領域、即ち高輝度の領域に対しては可視光に適したWBゲインとして第3のホワイトバランス制御値を設定する。本実施形態において、可視光に適した第3のホワイトバランス制御値は、所定の色温度の光源、例えば5600K(ケルビン)の白色光源に適したWBゲインであるとする。一方、ゲイン乗算部106は、赤外光が支配的な領域、即ち低輝度の領域に対しては入力画像の色が赤外光の影響を受けている場合のWBゲインを適用する。つまり、ゲイン乗算部106は、低輝度領域の画素に対しては、ゲイン決定部105から取得したWBゲインを適用する。
 本実施形態のゲイン乗算部106が行うWBゲイン補正処理について、図13を用いて説明する。
 図13は、ゲイン乗算部106が画素毎に行うWBゲインの補正方法の一例を表し、Blueゲイン1300とRedゲイン1301を示した図である。
 ゲイン乗算部106は、入力画像の画素の明るさが所定値以上である場合には、可視光が支配的な領域であると判定し、可視光に適したWBゲインを適用する。一方、ゲイン乗算部106は、入力画像の画素の明るさが所定値未満である場合には、赤外光が支配的な領域であると判定し、赤外光を含む画像に適したWBゲインを適用する。より具体的には、ゲイン乗算部106は、入力画像の画素の輝度値が第1の輝度閾値以上(Y1以上)である場合には、可視光が支配的な領域と判定し、可視光に適したWBゲインを適用する。一方、ゲイン乗算部106は、入力画像の画素の輝度値が第2の輝度閾値以下(Y2以下)である場合には、赤外光が支配的な領域と判定し、赤外光を含む画像に適したWBゲインを適用する。ここで、可視光に適したWBゲインは、前述のように例えば5600K(ケルビン)の白色光源に適したWBゲインである。また、赤外光を含む画像に適したWBゲインは、ゲイン決定部105から取得したWBゲインである。なお、第1の輝度閾値と第2の輝度閾値は同じ所定値でもよいが、本実施形態では異なる値とし、第1の輝度閾値は第2の輝度閾値より大きい値であるとする。
 即ち、ゲイン乗算部106は、入力画像の画素の輝度値が第1の輝度閾値Y1以上の場合、ゲイン算出部102が算出したWBゲインは有効ではないと判定する。そして、この場合、ゲイン乗算部106は、第1の輝度閾値Y1以上の画素に対しては、第3のホワイトバランス制御値として、所定のWBゲイン、例えば5600Kの白色光源に適したWBゲインを適用する。一方、ゲイン乗算部106は、入力画像の画素の輝度値が第2の輝度閾値Y2以下である場合、ゲイン算出部102が算出したWBゲインは有効である判定する。そして、ゲイン乗算部106は、ゲイン決定部105で決定されたWBゲインを適用する。
 ただし、例えば空間的に急峻にWBゲインを変えてしまうと画質上の違和感を生じる虞がある。このためゲイン乗算部106は、入力画像の画素の輝度値が第1の輝度閾値未満でかつ第2の輝度閾値より高い領域(Y1とY2との間)では、可視光に適したWBゲインと赤外光を含む画像に適したWBゲインとの中間となるWBゲインを算出する。この場合のゲイン乗算部106は、入力画像の画素に対し、この中間のWBゲインを適用する。本実施形態の場合、中間のWBゲインとは、第1の輝度閾値と第2の輝度閾値との間で時間的に緩やかに変化させて得られたWBゲインとする。
 以上のように実施することにより、入力画像において可視光が支配的な領域と赤外光が支配的な領域がある場合であっても、画素毎にWBゲインを補正することで、適切なホワイトバランスに制御された出力画像を得ることができる。従って、上述したようなユースケースにおいて、LEDインジケータの色を正しく再現することができるので、装置が発したアラートを見落とすことを防止できる。
 <第6の実施形態>
 以下、第6の実施形態の画像処理装置について説明する。すでに説明した実施形態は、赤外光の影響の有無に応じて、WBゲインが有効か否かを判定する際の判定条件を変更している。それに対して、第6の実施形態では、赤外光の影響の有無が切り替わったタイミングで算出されたホワイトバランス制御値を、判定条件に関わらず有効である、と判定するものである。
 なお、本実施形態に係る画像処理装置の機能構成図は第1の実施形態と概ね同じであるため図示を省略する。また、第1の実施形態と同じ機能部については説明を省略し、第1の実施形態とが異なる機能を有する機能部についてのみ以下に説明する。
 第6の実施形態において、ゲイン算出部102は、赤外光検知部103による検知結果に基づいて、前述の実施形態とは異なる方法で算出したホワイトバランス制御値(WBゲイン)を出力する。より具体的には、第6の実施形態のゲイン算出部102は、赤外光検知部103から取得した検知結果が変化したタイミングにおいて、それ以外の期間とは異なる方法でWBゲインを算出する。WBゲイン算出の異なる方法とは、例えば、入力画像が無彩色の被写体であると推定して、入力画像の色の積分値、または、平均値が無彩色を表す数値になるようにWBゲインを算出するような方法である。このようなWBゲイン算出方法を、以下の説明では「白設定」と称するものとする。
 赤外光検知部103は、入力画像の色に対する赤外光の影響を検知する。第6の実施形態の場合、赤外光検知部103の検知結果は、ゲイン判定部104だけでなく、ゲイン算出部102にも送られる。
 ゲイン判定部104は、赤外光検知部103から取得した検知結果に基づいて、ゲイン算出部102から取得したWBゲインが有効か否かを判定して、その判定結果をゲイン決定部105に出力する。第6の実施形態の場合、ゲイン判定部104は、赤外光検知部103の検知結果に基づいて、異なる判定条件に基づいてWBゲインが有効か否かを判定する。即ち、第6の実施形態のゲイン判定部104は、赤外光検知部103から取得した検知結果が変化したタイミングにおいては、ゲイン算出部102から取得したWBゲインが有効であると判定する。
 ゲイン決定部105は、ゲイン算出部102からWBゲインを取得し、ゲイン判定部104からWBゲインが有効か否かの判定結果を取得して、最終的なWBゲインを決定し、ゲイン乗算部106に出力する。第6の実施形態のゲイン決定部105は、ゲイン算出部102からのWBゲインが、白設定処理にて算出され、また、赤外光検知結果が変化したタイミングにおいて有効であるとゲイン判定部104が判定したWBゲインである場合、当該WBゲインに固定する。より具体的には、第6の実施形態のゲイン決定部105は、IRCFが抜去された後に再度挿入されて、赤外光検知部103の検知結果が変化するまでの間、つまりIRCFが抜去されている間は一定のWBゲインを出力し続ける。
 図14は、第6の実施形態のゲイン決定部105における動作の説明に用いる図である。
 図14において、領域A1は入力画像の色が赤外光の影響を受けていない場合のWBゲインの有効範囲(有効領域A1)を表し、領域A2は入力画像の色が赤外光の影響を受けている場合のWBゲインの有効範囲(有効領域A2)を表している。入力画像の色が赤外光の影響を受けていない場合には、例えば、有効領域A1内のWBゲインP1が入力画像に適用されて出力画像が生成される。一方、第6の実施形態において、図14のWBゲインP2は、入力画像の色に対する赤外光の影響の有無が変化したタイミングで算出されたWBゲインを表している。WBゲインP2は、例えば、前述した白設定処理によって算出される。つまり第6の実施形態では、入力画像の色に対する赤外光の影響の有無が変化したタイミングで白設定処理が行われる。また、第6の実施形態では、入力画像の色に対する赤外光の影響の有無が変化したタイミングで算出されたWBゲインP2は有効であると判定され、入力画像に適用される。即ち、第6の実施形態の場合、IRCFの挿抜が行われたタイミングで白設定処理が行われ、それによって算出されたWBゲインが適用される。これにより、入力画像の色に対する赤外光の影響に応じてホワイトバランスを制御可能となり、出力画像の色再現性を向上することができる。
 なお、本実施形態では、入力画像の色に対する赤外光の影響の有無が変化したタイミングで算出されたWBゲインを無条件、あるいは、通常より緩和された条件に基づいて有効性を判定し、適用するものである。従って、WBゲインの算出方法は、前述の白設定処理の方法によるものに限らない。また、一般的な白設定処理では、設定後のWBゲインを固定するが、固定してもよいし、しなくてもよい。本実施形態では、図14のWBゲインP2を設定後、WBゲインの有効領域は領域A1のままであるが、入力画像の色に対する赤外光の影響が有る場合には領域A1に含まれないWGゲインが算出される。即ち、有効でないWBゲインが算出され、その場合、現在設定されているホワイトバランスが維持されるため、自ずとWBゲインP2に固定される。
 前述した実施形態の画像処理装置は、撮像装置に適用される例を挙げたが、撮像装置に接続等されたパーソナルコンピュータやスマートフォン等の情報処理装置(コンピュータ)によって画像処理装置が実現されてもよい。この場合、撮像装置は撮像ユニットにて撮像された生データと、露光時間やフレームレートや露出値等を示す撮影パラメータとともに、IRCFの使用の有無を示す情報、即ち入力画像の色に対する赤外光の影響の有無を示す情報をもコンピュータへ出力する。なお、赤外光の影響の有無を示す情報は、ユーザにより入力されてもよい。そして、コンピュータにおいて前述の実施形態で説明したのと同様の画像処理が行われる。この例におけるコンピュータは、本実施形態の画像処理を実現するソフトウェアのプログラムコードを実行する。ハードウェア構成の図示は省略するが、本実施形態の画像処理装置を実現するコンピュータは、CPU、ROM、RAM(ランダムアクセスメモリ)、補助記憶装置、表示部、操作部、通信I/F、及びバス等を有して構成される。CPUは、ROMやRAMに格納されているコンピュータプログラムやデータを用いて、当該コンピュータの全体を制御するとともに、前述したホワイトバランス制御等を実行する。また本実施形態の画像処理装置は、CPUとは異なる1又は複数の専用のハードウェアを有していて、CPUによる処理の少なくとも一部を専用のハードウェアが実行する構成であっても良い。専用のハードウェアの例としては、ASIC(特定用途向け集積回路)、FPGA(フィールドプログラマブルゲートアレイ)、およびDSP(デジタルシグナルプロセッサ)などがある。ROMは、変更を必要としないプログラムなどを格納する。RAMは、補助記憶装置から供給されるプログラムやデータ、及び通信I/Fを介して外部から供給されるデータなどを一時記憶する。補助記憶装置は、HDD等で構成され、画像データ、撮影パラメータ、赤外光の影響の有無を示す情報などの種々のデータを記憶する。表示部は、例えば液晶ディスプレイやLEDディスプレイ等で構成され、ユーザが画像処理装置を操作するためのGUIなどを表示する。操作部は、例えばキーボードやマウス、ジョイスティック、タッチパネル等で構成され、ユーザによる操作を受けて各種の指示をCPUに入力する。またCPUは、表示部を制御する表示制御部、及び操作部を制御する操作制御部としても動作する。通信I/Fは、画像処理装置の外部の装置との通信に用いられる。例えば、画像処理装置がさらに外部の装置と有線で接続される場合には、通信用のケーブルが通信I/Fに接続される。画像処理装置が外部の装置と無線通信する機能を有する場合には、通信I/Fはアンテナを備える。バスは、画像処理装置の各部をつないで情報を伝達する。なお本実施形態の場合、画像処理装置と接続される外部の装置は、前述した撮像装置や他の情報処理装置等である。また表示部と操作部が画像処理装置の内部に存在するものとしたが、表示部と操作部との少なくとも一方が画像処理装置の外部に別の装置として存在していても良い。また、画像処理装置は、表示部や操作部を必ずしも備えていなくても良い。
 以上、本発明の好ましい実施形態について説明したが、本発明はこれらの実施形態に限定されず、その要旨の範囲内で種々の変形及び変更が可能である。
 本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける一つ以上のプロセッサがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えばASIC)によっても実現可能である。
 上述の実施形態は、何れも本発明を実施するにあたっての具体化の例を示したものに過ぎず、これらによって本発明の技術的範囲が限定的に解釈されてはならないものである。即ち、本発明は、その技術思想、又はその主要な特徴から逸脱することなく、様々な形で実施することができる。
 本発明は上記実施の形態に制限されるものではなく、本発明の精神及び範囲から離脱することなく、様々な変更及び変形が可能である。従って、本発明の範囲を公にするために以下の請求項を添付する。
 本願は、2021年3月15日提出の日本国特許出願特願2021-041214を基礎として優先権を主張するものであり、その記載内容の全てをここに援用する。

Claims (25)

  1.  入力画像の色に対する赤外光の影響を検知する検知手段と、
     入力画像に基づいて第1のホワイトバランス制御値を算出する算出手段と、
     前記第1のホワイトバランス制御値が有効か否かを判定する判定手段と、
     前記判定手段の判定結果に基づいて、所定のホワイトバランス制御値を設定する設定手段と、を備え、
     前記判定手段は、前記検知手段の検知結果に基づいて、前記第1のホワイトバランス制御値が有効か否かを判定するための判定条件を決定することを特徴とする画像処理装置。
  2.  前記設定手段は、前記判定手段において前記第1のホワイトバランス制御値が有効であると判定された場合には、当該第1のホワイトバランス制御値を設定することを特徴とする請求項1に記載の画像処理装置。
  3.  前記設定手段は、前記判定条件に基づいて、前記所定のホワイトバランス制御値を設定することを特徴とする請求項1に記載の画像処理装置。
  4.  前記検知手段は、前記入力画像が、赤外光カットフィルタを透過した光から得られた画像であるか否かに応じて前記赤外光の影響を検知することを特徴とする請求項1乃至請求項3のいずれか1項に記載の画像処理装置。
  5.  前記検知手段は、前記入力画像が撮影された環境の照度に応じて前記赤外光の影響を検知することを特徴とする請求項1乃至請求項3のいずれか1項に記載の画像処理装置。
  6.  前記検知手段は、前記入力画像の色に対する赤外光の影響の大きさを検知し、
     前記判定手段は、前記赤外光の影響の大きさに応じて前記判定条件を決定することを特徴とする請求項1乃至請求項5のいずれか1項に記載の画像処理装置。
  7.  前記判定手段は、前記赤外光の影響が大きいほど、前記赤外光の影響が小さい場合の前記判定条件との差が大きくなるように、前記判定条件を決定することを特徴とする請求項6に記載の画像処理装置。
  8.  前記判定手段は、前記入力画像を撮像した撮像センサの感度が高いほど、前記赤外光の影響が小さい場合の前記判定条件との差が大きくなるように、前記判定条件を決定することを特徴とする請求項6または請求項7に記載の画像処理装置。
  9.  前記判定手段は、前記第1のホワイトバランス制御値が所定の有効範囲に含まれる場合には当該第1のホワイトバランス制御値が有効であると判定し、または、前記第1のホワイトバランス制御値が前記所定の有効範囲に含まれない場合には当該第1のホワイトバランス制御値が有効でないと判定することを特徴とする請求項1乃至請求項8のいずれか1項に記載の画像処理装置。
  10.  前記判定手段は、前記赤外光の影響が大きいほど、前記赤外光の影響が小さい場合と比較して、前記所定の有効範囲が小さくなるように、前記判定条件を決定することを特徴とする請求項9に記載の画像処理装置。
  11.  前記設定手段は、前記判定手段において前記第1のホワイトバランス制御値が有効であると判定された場合には、当該第1のホワイトバランス制御値とは異なり、かつ前記所定の有効範囲に含まれるホワイトバランス制御値を設定することを特徴とする請求項9に記載の画像処理装置。
  12.  前記設定手段は、前記判定手段において前記第1のホワイトバランス制御値が有効でないと判定された場合には、前記所定の有効範囲に含まれるホワイトバランス制御値を設定することを特徴とする請求項9に記載の画像処理装置。
  13.  前記設定手段は、前記所定の有効範囲を第1の領域から第2の領域に変更するタイミングにおいて、前記第1の領域と前記第2の領域との共通領域に含まれるホワイトバランス制御値を設定することを特徴とする請求項9乃至請求項12のいずれか1項に記載の画像処理装置。
  14.  前記判定手段は、前記検知手段の検知結果が変化したタイミングにおいて、前記所定の有効範囲に含まれない前記第1のホワイトバランス制御値を有効であると判定することを特徴とする請求項9乃至請求項13のいずれか1項に記載の画像処理装置。
  15.  前記設定手段は、前記検知手段の検知結果が変化したタイミングにおいて、前記所定の有効範囲に含まれない前記第1のホワイトバランス制御値が有効であると判定されてから、再度、前記検知手段の検知結果が変化するまでの間では、前記検知手段の検知結果が変化したタイミングにおいて算出された、前記所定の有効範囲に含まれない前記第1のホワイトバランス制御値を設定することを特徴とする請求項14に記載の画像処理装置。
  16.  前記算出手段は、前記検知手段の検知結果が変化したタイミングにおいて、前記検知手段の検知結果が変化しない期間とは異なる方法で、第1のホワイトバランス制御値を算出することを特徴とする請求項14または請求項15に記載の画像処理装置。
  17.  前記算出手段は、前記検知手段の検知結果が変化したタイミングにおいて、前記入力画像に含まれる被写体が無彩色である場合に算出されるホワイトバランス制御値を、前記第1のホワイトバランス制御値として算出することを特徴とする請求項16に記載の画像処理装置。
  18.  前記設定手段は、ホワイトバランス制御値を変更する場合には、ホワイトバランス制御値を時間的に緩やか変化させるようにすることを特徴とする請求項1乃至請求項17のいずれか1項に記載の画像処理装置。
  19.  前記設定手段は、前記入力画像に対して前記ホワイトバランス制御値を適用して、前記入力画像のホワイトバランスを制御した出力画像を生成する適用手段をさらに備えることを特徴とする請求項1乃至請求項18のいずれか1項に記載の画像処理装置。
  20.  有彩色の画像を無彩色の画像に変換する色変換手段をさらに備え、
     前記設定手段は、前記入力画像の色に対する赤外光の影響の大きさに基づいて、前記出力画像を有彩色とするか無彩色とするかを決定することを特徴とする請求項19に記載の画像処理装置。
  21.  前記設定手段は、前記入力画像に含まれる画素毎の明るさを算出し、前記明るさが所定値以上の画素に対しては前記所定のホワイトバランス制御値を適用することを特徴とする請求項19に記載の画像処理装置。
  22.  前記明るさが所定値以上の画素に対して適用される前記所定のホワイトバランス制御値は、所定の色温度に対応したホワイトバランス制御値であることを特徴とする請求項21に記載の画像処理装置。
  23.  前記算出手段は、前記赤外光の影響を受けている入力画像に基づいて、前記第1のホワイトバランス制御値を算出することを特徴とする請求項1乃至請求項22のいずれか1項に記載の画像処理装置。
  24.  画像処理装置が実行する画像処理方法であって、
     入力画像の色に対する赤外光の影響を検知する検知ステップと、
     入力画像に基づいて第1のホワイトバランス制御値を算出する算出ステップと、
     前記第1のホワイトバランス制御値が有効か否かを判定する判定ステップと、
     前記判定ステップでの判定結果に基づいて、所定のホワイトバランス制御値を設定する設定工程と、を含み、
     前記判定ステップでは、前記検知ステップでの検知結果に基づいて、前記第1のホワイトバランス制御値が有効か否かを判定するための判定条件を決定することを特徴とする画像処理方法。
  25.  コンピュータを、請求項1から請求項23のいずれか1項に記載の画像処理装置の各手段として機能させるためのプログラム。
PCT/JP2022/008271 2021-03-15 2022-02-28 画像処理装置、画像処理方法、及びプログラム WO2022196324A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
EP22771078.7A EP4311231A1 (en) 2021-03-15 2022-02-28 Image processing device, image processing method, and program
CN202280020014.2A CN116965051A (zh) 2021-03-15 2022-02-28 图像处理装置、图像处理方法和程序
US18/466,704 US20240080425A1 (en) 2021-03-15 2023-09-13 Image processing apparatus, image processing method, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2021041214A JP2022141076A (ja) 2021-03-15 2021-03-15 画像処理装置、画像処理方法、及びプログラム
JP2021-041214 2021-03-15

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/466,704 Continuation US20240080425A1 (en) 2021-03-15 2023-09-13 Image processing apparatus, image processing method, and storage medium

Publications (1)

Publication Number Publication Date
WO2022196324A1 true WO2022196324A1 (ja) 2022-09-22

Family

ID=83321429

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2022/008271 WO2022196324A1 (ja) 2021-03-15 2022-02-28 画像処理装置、画像処理方法、及びプログラム

Country Status (5)

Country Link
US (1) US20240080425A1 (ja)
EP (1) EP4311231A1 (ja)
JP (1) JP2022141076A (ja)
CN (1) CN116965051A (ja)
WO (1) WO2022196324A1 (ja)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005130317A (ja) 2003-10-27 2005-05-19 Sony Corp 撮像装置および方法
JP2012023606A (ja) * 2010-07-15 2012-02-02 Canon Inc 撮像装置、その制御方法及びプログラム
JP2014007692A (ja) * 2012-06-27 2014-01-16 Canon Inc 撮像装置およびその制御方法
JP2014216897A (ja) * 2013-04-26 2014-11-17 Necカシオモバイルコミュニケーションズ株式会社 撮像装置、撮像装置の制御方法及びプログラム
JP2017017593A (ja) * 2015-07-02 2017-01-19 キヤノン株式会社 撮像装置
JP2021041214A (ja) 2020-11-27 2021-03-18 サミー株式会社 ぱちんこ遊技機

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005130317A (ja) 2003-10-27 2005-05-19 Sony Corp 撮像装置および方法
JP2012023606A (ja) * 2010-07-15 2012-02-02 Canon Inc 撮像装置、その制御方法及びプログラム
JP2014007692A (ja) * 2012-06-27 2014-01-16 Canon Inc 撮像装置およびその制御方法
JP2014216897A (ja) * 2013-04-26 2014-11-17 Necカシオモバイルコミュニケーションズ株式会社 撮像装置、撮像装置の制御方法及びプログラム
JP2017017593A (ja) * 2015-07-02 2017-01-19 キヤノン株式会社 撮像装置
JP2021041214A (ja) 2020-11-27 2021-03-18 サミー株式会社 ぱちんこ遊技機

Also Published As

Publication number Publication date
CN116965051A (zh) 2023-10-27
US20240080425A1 (en) 2024-03-07
JP2022141076A (ja) 2022-09-29
EP4311231A1 (en) 2024-01-24

Similar Documents

Publication Publication Date Title
CN108600725B (zh) 一种基于rgb-ir图像数据的白平衡校正装置及方法
US8743208B2 (en) Method and apparatus for image noise reduction using noise models
JP3892648B2 (ja) 画像入力装置、ホワイトバランス調整方法、およびその方法を実行するためのプログラムを格納したコンピュータが読取可能な記録媒体
EP3343911A1 (en) Image signal processing method and system
US8169500B2 (en) Dynamic range compression apparatus, dynamic range compression method, computer-readable recording medium, integrated circuit, and imaging apparatus
KR100925629B1 (ko) YCbCr 색공간에서의 오토 화이트 밸런스 방법
CN104221364A (zh) 成像装置和图像处理方法
JP5091550B2 (ja) ホワイトバランス調整装置およびホワイトバランス調整方法
WO2022196324A1 (ja) 画像処理装置、画像処理方法、及びプログラム
JP4793001B2 (ja) 画像信号処理回路および撮像システム
JP2012095223A (ja) 撮像装置、撮像方法及びプログラム
JP2017533505A (ja) ヒストグラム拡散を伴う自動車両カメラ装置
JP2023161376A (ja) 画像処理装置、画像処理方法、及びプログラム
CN110876042B (zh) 用以控制图像捕获设备的电路及相关的控制方法
WO2023037901A1 (ja) 画像処理装置、画像処理方法、及びプログラム
JP4440562B2 (ja) 映像信号処理装置
JP5520863B2 (ja) 画像信号処理装置
JP5535443B2 (ja) 画像処理装置
JP7263018B2 (ja) 画像処理装置、画像処理方法およびプログラム
JP7383393B2 (ja) 画像処理装置、画像処理方法、プログラム、及び記憶媒体
US20230215131A1 (en) Video signal processing apparatus, video signal processing method, and imaging apparatus
JP6649176B2 (ja) 画像処理装置及び画像処理方法
US20200045280A1 (en) Imaging apparatus and endoscope apparatus
JP2021027490A (ja) 画像処理装置、撮像装置、撮像システム、画像処理装置の制御方法、及び、プログラム
JP2011248413A (ja) 画像処理装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22771078

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 202280020014.2

Country of ref document: CN

WWE Wipo information: entry into national phase

Ref document number: 2022771078

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2022771078

Country of ref document: EP

Effective date: 20231016