WO2013129225A1 - 画像処理装置及び方法 - Google Patents

画像処理装置及び方法 Download PDF

Info

Publication number
WO2013129225A1
WO2013129225A1 PCT/JP2013/054303 JP2013054303W WO2013129225A1 WO 2013129225 A1 WO2013129225 A1 WO 2013129225A1 JP 2013054303 W JP2013054303 W JP 2013054303W WO 2013129225 A1 WO2013129225 A1 WO 2013129225A1
Authority
WO
WIPO (PCT)
Prior art keywords
luminance
pixel
circuit
value
offset
Prior art date
Application number
PCT/JP2013/054303
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 CN201380010152.3A priority Critical patent/CN104137531B/zh
Priority to US14/380,629 priority patent/US9349168B2/en
Priority to JP2014502161A priority patent/JP5855224B2/ja
Priority to GB1415225.0A priority patent/GB2514066B/en
Publication of WO2013129225A1 publication Critical patent/WO2013129225A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • G06T5/92Dynamic range modification of images or parts thereof based on global image properties
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/12Picture reproducers
    • H04N9/31Projection devices for colour picture display, e.g. using electronic spatial light modulators [ESLM]
    • H04N9/3179Video signal processing therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • G06T5/94Dynamic range modification of images or parts thereof based on local image properties, e.g. for local contrast enhancement
    • 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/40Picture signal circuits
    • H04N1/407Control or modification of tonal gradation or of extreme levels, e.g. background level
    • 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/6027Correction or control of colour gradation or colour contrast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/14Picture signal circuitry for video frequency region
    • H04N5/20Circuitry for controlling amplitude response
    • 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
    • H04N9/00Details of colour television systems
    • H04N9/77Circuits for processing the brightness signal and the chrominance signal relative to each other, e.g. adjusting the phase of the brightness signal relative to the colour signal, correcting differential gain or differential phase
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20004Adaptive image processing
    • G06T2207/20012Locally adaptive
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/741Circuitry for compensating brightness variation in the scene by increasing the dynamic range of the image compared to the dynamic range of the electronic image sensors

Definitions

  • the present invention relates to an image processing apparatus and method for correcting a luminance signal of an input image.
  • tone correction of the luminance signal of an image has been performed to improve the visibility of a subject (people, animals, vehicles, road signs, etc.) for an image with a narrow luminance signal distribution, especially taken in fog, haze, rainy weather, etc.
  • a subject people, animals, vehicles, road signs, etc.
  • the gradation correction for an image with a narrow luminance signal distribution is insufficient. It was. Therefore, the brightness higher than a certain brightness on the high brightness side of the input image data is converted to the highest brightness, and the brightness lower than the certain brightness on the lower brightness side is converted to the lowest brightness, and the brightness between them is linearly changed from the lowest brightness according to the brightness. It is known to expand to the maximum luminance (see, for example, Patent Document 1).
  • the conventional image processing device converts the luminance of the input image data that is higher than a certain luminance on the high luminance side to the highest luminance, and the luminance that is lower than the certain luminance on the low luminance side to the lowest luminance, and the luminance in between is changed according to the luminance. Since it is configured to linearly expand from the lowest luminance to the highest luminance, the image portion below the constant luminance on the low luminance side will be crushed black and on the other hand, the black portion of the image portion below the certain luminance on the low luminance side will disappear In order to prevent the collapse, there is a problem in that the contrast of the image portion having an intermediate luminance is not sufficiently improved.
  • the present invention has been made to solve the above-described problems of the prior art, and is a low-luminance image with respect to an image including both an image area whose luminance signal distribution is narrowed by fog or the like and a low-luminance image area. It is an object of the present invention to provide an image processing apparatus capable of correcting contrast by enlarging the luminance signal distribution of an image region having a narrow luminance signal distribution without causing the region to be blackened.
  • an image processing apparatus provides: An area determination circuit that determines whether each pixel of an image represented by an image signal is within a correction target area in which the appearance frequency of pixels having a predetermined luminance level or less is a predetermined value or less; An offset level generation circuit that generates an offset level based on the luminance of a pixel that is determined to be within the correction target region by the region determination circuit among the images represented by the image signal; An offset subtraction circuit that subtracts the offset level generated by the offset level generation circuit from the image signal to generate an offset image signal; A gain generation circuit for generating a gain for the offset image signal; A gain multiplier for multiplying the offset image signal by the gain and generating a corrected image signal; It is provided with.
  • the contrast of a subject can be improved without blackening a low-brightness image region portion such as a window frame that appears in front of a subject that is covered with fog and has a narrow luminance signal distribution. .
  • FIG. 1 is a block diagram schematically showing a configuration of an image processing apparatus according to Embodiment 1 of the present invention.
  • FIG. 2 is a block diagram illustrating a configuration example of an offset level generation circuit in FIG. 1.
  • FIG. 2 is a block diagram illustrating a configuration example of an average luminance correction gain generation circuit in FIG. 1.
  • FIG. 3 is a schematic diagram illustrating an example of an input image in the first embodiment. It is a figure which shows the signal waveform obtained when the input image of FIG. 4 is imaged.
  • FIG. 6 is a diagram illustrating a distribution of state signals corresponding to an example of an input image in the first embodiment.
  • FIG. 5 is a diagram showing a low-luminance pixel ratio for pixels on the A-A ′ line of FIG. 4.
  • 2 is a graph showing input / output characteristics in an example of a mixing ratio generation circuit in FIG. 1.
  • (A)-(c) is a figure which shows the mixture ratio output by an example of the mixture ratio production
  • generation circuit of FIG. 2 is a graph showing input / output characteristics in an example of a mixing ratio generation circuit in FIG. 1.
  • (A)-(c) is a figure which shows the mixture ratio output by an example of the mixture ratio production
  • generation circuit of FIG. 2 is a graph showing input / output characteristics in an example of a mixing ratio generation circuit in FIG. 1. It is a figure which shows the area
  • (A)-(c) is a figure which shows the change of the luminance signal distribution of the input image, the image after the offset by the offset subtraction circuit, and the image after the white correction by the white correction gain luminance multiplication circuit.
  • FIG. 20 is a diagram showing changes in luminance signal distribution similar to FIG. 19 when the average luminance correction amount calculation circuit of FIG. 1 is not provided. It is a figure which shows the change of the luminance signal distribution of the input image, the image after white correction
  • FIG. FIG. 1 shows the configuration of an image processing apparatus according to Embodiment 1 of the present invention.
  • the illustrated image processing apparatus receives the luminance signal Yi of each pixel constituting the image and the color difference signals Cbi, Cri and corrects the gradation of the luminance signal Yi of the image.
  • the luminance signal Yi and the color difference signals Cbi and Cri of each pixel are also simply called input signals.
  • the image processing apparatus outputs a luminance signal Yo after correcting the pixels as a target pixel in order, and outputs the input color difference signals Cbi and Cri as they are (without correction).
  • the illustrated image processing apparatus includes an offset subtraction circuit 1, a gain multiplication circuit 2, a luminance saturation processing circuit 5, a mixing circuit 6, an offset level generation circuit 10, a gain generation circuit 20, a region determination circuit 60, And a mixing ratio generation circuit 65.
  • the offset subtraction circuit 1 subtracts the offset level Offset generated by the offset level generation circuit 10 from the luminance signal Yi of the input image to calculate the luminance signal Yofst. That is, the offset subtraction circuit 1 subtracts the offset level Offset generated by the offset level generation circuit 10 from the image signal to generate an offset image signal.
  • the image signal is a luminance signal Yi.
  • the offset image signal is the luminance signal Yofst.
  • the offset level generation circuit 10 includes a peripheral area luminance average circuit 11, a luminance minimum value detection circuit 12, a black pixel count circuit 13, an offset coefficient calculation circuit 14, and an offset level calculation circuit 15.
  • the gain multiplication circuit 2 multiplies the luminance signal Yofst output from the offset subtraction circuit 1 by the gain generated by the gain generation circuit 20.
  • the gain generation circuit 20 generates a gain for the offset image signal.
  • the offset image signal is the luminance signal Yofst.
  • the gain multiplication circuit 2 includes a white correction gain luminance multiplication circuit 3 and an average luminance correction gain luminance multiplication circuit 4.
  • the gain generation circuit 20 includes a white correction gain calculation circuit 30 and an average luminance correction gain generation circuit 40.
  • the gain multiplication circuit 2 multiplies the offset image signal (luminance signal Yofst) by a gain to generate a corrected image signal Ywa.
  • the white correction gain luminance multiplication circuit 3 multiplies the luminance signal Yofst output from the offset subtraction circuit 1 by the white correction gain value WGain determined by the white correction gain calculation circuit 30 to calculate a white correction luminance signal Yw. That is, the white correction gain luminance multiplication circuit 3 multiplies the offset image signal by the white correction gain WGain to generate a white correction image signal Yw.
  • the offset image signal is the luminance signal Yofst.
  • the average luminance correction gain luminance multiplication circuit 4 multiplies the luminance signal Yw output from the white correction gain luminance multiplication circuit 3 by the average luminance correction gain APLGain determined by the average luminance correction gain generation circuit 40 to obtain the luminance after average luminance correction.
  • the signal Ywa is calculated. That is, the average luminance correction gain luminance multiplication circuit 4 generates the average luminance correction image signal Ywa by multiplying the white correction image signal by the average luminance correction gain APLGain.
  • the white corrected image signal is the luminance signal Yw.
  • the average luminance correction gain generation circuit 40 includes an average luminance value calculation circuit 41 before correction, an average luminance value calculation circuit 42 after correction, a primary color signal pixel representative value generation circuit 43, and a color saturation pixel count.
  • the color saturation correction level generation circuit 51 includes a color saturation amount average value calculation circuit 45 and an average luminance value correction amount calculation circuit 46.
  • the color saturation correction level generation circuit 51 generates a color saturation correction level SATADJ based on the number of color saturation pixels SATnum and the maximum value M_POST.
  • the average luminance correction gain generation circuit 40 generates an average luminance correction gain APLGain based on the average luminance value APLpre of the image signal, the average luminance value APLpost of the corrected image signal, and the color saturation correction level SATADJ.
  • the luminance saturation processing circuit 5 performs saturation processing on the luminance signal Ywa output from the average luminance correction gain luminance multiplication circuit 4, and outputs a luminance signal Ya after saturation processing.
  • the mixing circuit 6 mixes the luminance signal Yi of the input image and the luminance signal Ya after the saturation processing output from the luminance saturation processing circuit 5 at a ratio according to the mixing ratio KMIX determined by the mixing ratio generation circuit 65.
  • the output luminance signal Yo is output.
  • the mixing circuit 6 mixes the image signal and the corrected image signal based on the mixing ratio KMIX.
  • the image signal is the luminance signal Yi of the input image.
  • the corrected image signal is the luminance signal Ya after saturation processing.
  • the mixing ratio represents a percentage
  • Yo Yi ⁇ KMIX / 100 + Ya ⁇ (100 ⁇ KMIX) / 100 (1)
  • the offset level generation circuit 10 determines the offset level (Offset) based on the average luminance of the peripheral area of each pixel that is determined to be corrected by the area determination circuit 60 among the pixels that constitute the input image. Is generated. That is, the offset level generation circuit 10 generates the offset level Offset based on the luminance of the pixel determined to be within the correction target region by the region determination circuit 60 in the image represented by the image signal.
  • the white correction gain calculation circuit 30 generates a white correction gain WGain for each pixel based on the offset level Offset generated by the offset level generation circuit 10 and a predetermined target upper limit value Wtgt. That is, the white correction gain calculation circuit 30 generates the white correction gain WGain based on the offset level Offset of the image signal and the predetermined target upper limit value Wtgt.
  • the average luminance correction gain generation circuit 40 generates an average luminance correction gain APLGain based on the luminance signal Yi and color difference signals Cbi and Cri of the input image and the average luminance corrected luminance signal Ywa.
  • the mixing ratio generation circuit 65 obtains the mixing ratio KMIX for each pixel based on the ratio (RLY) of the low luminance pixels among the pixels around each pixel. In other words, the mixing ratio generation circuit 65 mixes each pixel of the image represented by the image signal based on a low luminance pixel ratio that is a ratio of pixels around the predetermined luminance level among the surrounding pixels. The ratio is obtained for each pixel.
  • FIG. 4 shows an outline of an image obtained when, for example, a house covered with fog is imaged through a window frame.
  • the portion LPA of the window frame that occupies a part of the image is a region with a low luminance level (low luminance region), and the other portion (the portion that can be seen through the window frame) HPA is a region with a relatively high luminance (non-low luminance region).
  • the contrast of the house included in the non-low brightness area HPA is low, and correction for increasing the contrast is desired.
  • the area determination circuit 60 determines whether or not each pixel of the image represented by the luminance signal Yi is within a correction target area in which the appearance frequency of pixels having a predetermined luminance level or less is a predetermined value or less. . That is, the area determination circuit 60 determines whether each pixel of the image represented by the image signal is within a correction target area in which the appearance frequency of pixels having a predetermined luminance level or lower is equal to or lower than a predetermined value.
  • the image signal is a luminance signal Yi.
  • the area determination circuit 60 includes a luminance level determination circuit 61, a pixel ratio calculation circuit 62, and a correction target pixel designation circuit 63.
  • the luminance level determination circuit 61 compares the luminance signal Yi of each pixel of the input image with a predetermined luminance level THP, and outputs a signal SEP indicating the determination result. That is, the luminance level determination circuit 61 compares the pixel value of each pixel of the image represented by the image signal with the predetermined luminance level THP, and determines a pixel that is equal to or lower than the predetermined luminance level THP.
  • the image signal is a luminance signal Yi.
  • FIG. 5 is a signal waveform diagram of the AA ′ line of the input image of FIG.
  • the signal in the non-low brightness area HPA has a small amplitude because the signal corresponding to the roof of the house is covered with fog, and the signal in the low brightness area LPA also includes a small amplitude portion corresponding to the window frame.
  • the luminance level determination circuit 61 compares each pixel value of the luminance signal Yi as shown in FIG. 5 with a predetermined luminance level (threshold value) THP, and as a determination result, for a pixel (low luminance pixel) that is equal to or lower than the threshold value THP.
  • a binary state signal SEP that is “1” and is “0” is output for a pixel (non-low luminance pixel) that is larger than the threshold value THP.
  • the threshold determination may be performed after the luminance signal Yi is passed through a low-pass filter such as a peripheral pixel averaging process at the input stage of the luminance level determination circuit 61.
  • the discrimination result output (status signal) SEP When the discrimination result output (status signal) SEP is displayed corresponding to the image, it is as shown in FIG.
  • the hatched partial HPA is an area occupied by non-low brightness pixels (non-low brightness area), and the white part (unhatched part) LPA is an area occupied by low brightness pixels. (Low luminance region).
  • the luminance level determination circuit 61 supplies the state signal SEP to the pixel ratio calculation circuit 62.
  • the pixel ratio calculation circuit 62 receives the state signal SEP from the luminance level determination circuit 61, and sequentially sets each pixel of the image as a target pixel, and the low luminance pixel is in a predetermined peripheral pixel range centered on the target pixel. The proportion occupied is calculated and output as a low luminance pixel proportion (data indicating) RLY.
  • the pixel ratio calculation circuit 62 sets each pixel of the image represented by the image signal as a target pixel in order, and the luminance level determination circuit 61 sets a predetermined luminance level in a predetermined peripheral pixel range centered on the target pixel.
  • the ratio of the pixels determined to be pixels below THP is calculated as the low luminance pixel ratio RLY.
  • FIGS. 7A to 7C show, for example, a peripheral pixel block composed of a rectangular region of 33 pixels in the horizontal direction and 33 pixels in the vertical direction centered on the target pixel, and the low luminance region LPA in FIG. The case where it is located in the boundary part of the brightness
  • region HPA is shown.
  • the low luminance area LPA is composed of only low luminance pixels
  • the non-low luminance area HPA is composed of only non-low luminance pixels.
  • the peripheral pixel block shown in FIG. 7A 218 pixels out of 1089 pixels are low luminance pixels, and the low luminance pixel ratio RLY is about 20%.
  • the peripheral pixel block shown in FIG. 7B 545 pixels out of 1089 pixels are low luminance pixels, and the low luminance pixel ratio RLY is about 50%.
  • the peripheral pixel block shown in FIG. 7C among the 1089 pixels, 871 pixels are low luminance pixels, and the low luminance pixel ratio RLY is about 80%. In an actual circuit, not the percentage but the number of counted low luminance pixels may be used as an index representing the low luminance pixel ratio as it is.
  • the pixel ratio calculation circuit 62 supplies the low luminance pixel ratio (data indicating RLY) to the correction target pixel specifying circuit 63 and the mixture ratio generation circuit 65.
  • the correction target pixel designation circuit 63 is output from the pixel ratio calculation circuit 62.
  • a pixel whose low luminance pixel ratio RLY is equal to or less than a predetermined threshold value THRL is determined as a correction target pixel, and a correction target identification signal CMP indicating the determination result is output. That is, when the low-luminance pixel ratio RLY for each pixel is equal to or lower than a predetermined threshold value THRL, the correction target pixel designating circuit 63 determines that the pixel is a pixel in the correction target area, and indicates a determination result. Is output as the correction target identification signal CMP.
  • a correction target area HYA is configured by a set of correction target pixels
  • a non-correction target area LYA is configured by a set of pixels other than the correction target pixels.
  • the threshold value THRL is set to 50%, for example.
  • the correction target area HYA and the non-correction target area LYA coincide with the non-low brightness area HPA and the low brightness area LPA, respectively.
  • the threshold value THRL When the threshold value THRL is set to a value smaller than 50%, the correction target area HYA becomes narrower than the non-low brightness area HPA, as indicated by reference numeral HYA (THRL ⁇ 50) in FIG.
  • the threshold value THRL When the threshold value THRL is set to a value larger than 50%, the correction target area HYA is wider than the non-low brightness area HPA, as indicated by a symbol HYA (THRL> 50) in FIG.
  • the correction target identification signal CMP is supplied to the minimum luminance value detection circuit 12 and the black pixel count circuit 13.
  • the mixture ratio generation circuit 65 converts the low luminance pixel ratio RLY output from the pixel ratio calculation circuit 62 with a predetermined characteristic to obtain a mixture ratio KMIX. That is, the mixture ratio generation circuit 65 converts the low luminance pixel ratio RLY calculated by the pixel ratio calculation circuit 62 with a predetermined characteristic to generate a mixture ratio KMIX. For example, when the low luminance pixel ratio RLY for the pixels on the line AA ′ of the input image shown in FIG. 4 is shown, the peripheral pixel block of each pixel is a non-low luminance area HPA (non-low luminance pixel) as shown in FIG.
  • the mixture ratio generation circuit 65 sets the mixture ratio KMIX to 100% when the low-luminance pixel ratio RLY is equal to or greater than the predetermined upper limit value, and the low-luminance pixel ratio RLY is within the range from 0% to the upper limit value.
  • the mixing ratio KMIX has a conversion characteristic that increases linearly from 0% to 100%. Further, the mixture ratio generation circuit 65 has a mixture ratio KMIX of 0% when the low luminance pixel ratio RLY is equal to or lower than a predetermined lower limit value, and the low luminance pixel ratio RLY is within a range from the lower limit value to 100%. As the ratio RLY increases, the mixing ratio KMIX has a conversion characteristic that increases linearly from 0% to 100%.
  • FIG. 9 shows input / output characteristics (conversion characteristics) of the mixing ratio generation circuit 65 of this example.
  • the mixture ratio KMIX is 100%
  • the low-luminance pixel ratio RLY is between 0% and the upper limit value THU
  • the low luminance increases linearly from 0% to 100%.
  • FIG. 10A shows the low luminance pixel ratio RLY input from the pixel ratio calculation circuit 62, similar to FIG.
  • the mixing ratio generation circuit 65 the low luminance pixel ratio RLY input from the pixel ratio calculation circuit 62 is compared with a predetermined upper limit value THU, and the upper limit value THU is calculated as shown by the dotted line RLYa in FIG. 9 and FIG. 10 (b). Clip over and replace all with 100%. Further, as shown by the solid line KMIX in FIG.
  • the range from 0% to the upper limit value THU is expanded from 0% to 100%. That is, the portion below the upper limit value THU is also enlarged by using (100% / THU) as a coefficient to obtain the corresponding mixing ratio KMIX. Therefore, the conversion from RLY to KMIX is expressed by the following equation.
  • KMIX RLY ⁇ (100% / THU)
  • a portion where the ratio change is not continuous due to the clip may be further converted (adjusted) so that the ratio change becomes continuous by processing such as averaging the surrounding mixing ratio.
  • FIG. 11 shows the input / output characteristics (conversion characteristics) of the mixing ratio generation circuit 65 of this example.
  • the mixing ratio KMIX when the low luminance pixel ratio RLY is equal to or lower than the predetermined lower limit value THL, the mixing ratio KMIX is 0%, and when the low luminance pixel ratio RLY is within the range from the lower limit value THL to 100%, the low luminance As the ratio RLY increases, the mixing ratio KMIX increases linearly from 0% to 100%.
  • FIG. 12A shows the low-luminance pixel ratio RLY input from the pixel ratio calculation circuit 62 as in FIG.
  • the mixing ratio generation circuit 65 the low luminance pixel ratio RLY input from the pixel ratio calculation circuit 62 is compared with a predetermined lower limit value THL, and is less than the lower limit value THL as shown in the dotted line RLYb of FIG. 11 and FIG. Clip the part of and replace all with 0%. Further, as shown by the solid line KMIX in FIG.
  • the lower limit value THL is expanded from 100% to 0% to 100%. That is, the difference from 100% of the portion equal to or higher than the lower limit value THL is expanded by using (100% / (100% ⁇ THL)) as a coefficient, thereby obtaining the corresponding mixing ratio KMIX. Therefore, the conversion from RLY to KMIX is expressed by the following equation.
  • KMIX 0%
  • a portion where the ratio change is not continuous due to the clip may be further converted (adjusted) so that the ratio change becomes continuous by processing such as averaging the surrounding mixing ratio.
  • the mixing ratio KMIX is set to 100%, and when the low luminance pixel ratio RLY is lower than the upper limit value THU, By using a low luminance pixel ratio (100 / THU) as a coefficient and a value obtained by multiplying the low luminance pixel ratio as a mixture ratio KMIX, an image portion where the low luminance ratio is close to 100% (on the right side of the upper limit value THU in FIG. 9). In this range, the input image itself can be used as an output image without mixing the corrected image signal Ya.
  • the mixing ratio KMIX is set to 0%, and when the low luminance pixel ratio RLY is larger than the lower limit value THL.
  • the mixture ratio generation circuit 65 may output the input pixel ratio RLY as it is as the mixture ratio KMIX.
  • the mixing ratio (data indicating) the mixing ratio KMIX obtained by the conversion is supplied to the mixing circuit 6.
  • a ratio of pixels (low luminance pixels) determined to be pixels equal to or lower than the predetermined threshold value THP in a predetermined peripheral pixel range centered on the target pixel is larger than the predetermined threshold value THRL are obtained.
  • a pixel whose ratio RLY is less than or equal to a predetermined threshold value THRL in the peripheral pixel range is set as the correction target, so that only a region where the low luminance pixels are collected is excluded from the correction target. Only the region in which the non-low luminance pixels are collected can be the correction target.
  • the mixture ratio KMIX between the corrected image signal Ya and the input image signal Yi is changed based on the low luminance pixel ratio RLY in consideration of the luminance of surrounding pixels. Even at the boundary portion of the low luminance region, it is possible to avoid a sudden change in the correction amount for the input image, and it is possible to obtain an output image without a sense of incongruity.
  • the peripheral area luminance average circuit 11 of the offset level generation circuit 10 shown in FIG. 2 receives the luminance signal Yi of the input image, and calculates the peripheral area luminance average value Yavg for each pixel by using each pixel as a target pixel in order. That is, the peripheral area luminance average circuit 11 calculates the average value of the luminance signal values of the pixels in the peripheral area NA of the target pixel P0 and outputs the average value as the peripheral area luminance average value Yavg of the target pixel P0. In other words, the peripheral area luminance averaging circuit 11 calculates each pixel of the image signal as a target pixel, and calculates a peripheral pixel average value of the target pixel for each pixel.
  • the image signal is a luminance signal Yi.
  • the peripheral pixel average value is the peripheral area luminance average value Yavg.
  • a rectangular area of 5 pixels in the horizontal direction and 5 pixels in the vertical direction centered on the pixel of interest P0 is the peripheral area NA, and the average luminance signal value of 25 pixels included in the peripheral area NA The value is calculated as the peripheral region luminance average value Yavg of the target pixel P0.
  • the number of pixels in the peripheral region used when the peripheral region luminance average circuit 11 calculates the peripheral region luminance average is not necessarily limited to 5 pixels in the horizontal direction ⁇ 5 pixels in the vertical direction, and the S / N of the luminance signal of the input image is used.
  • the size of the area may be determined according to the level, memory resources such as hardware on which the image processing apparatus is mounted, and the like. By providing a large area, it is possible to reduce the influence of the noise component included in the luminance signal. However, if the area is excessively large, the luminance weight of the target pixel in the calculated peripheral area luminance average value Yavg decreases. , The sharpness of the image is lost.
  • the peripheral area luminance average value Yavg output from the peripheral area luminance average circuit 11 is supplied to the minimum luminance value detection circuit 12 and the black pixel count circuit 13.
  • the minimum luminance value detection circuit 12 outputs the minimum value in the correction target area HYA of the peripheral area luminance average value Yavg for each pixel generated by the peripheral area luminance average circuit 11 as the minimum luminance value Ymin.
  • the minimum luminance value detection circuit 12 is the minimum value in the correction target area HYA composed of pixels determined to be correction targets by the area determination circuit 60 among the peripheral pixel average values obtained for each pixel of the input image. Is detected.
  • the peripheral pixel average value is the peripheral area luminance average value Yavg.
  • the minimum value is the luminance minimum value Ymin.
  • the minimum luminance value Ymin is supplied to the offset level calculation circuit 15.
  • the black pixel count circuit 13 compares the peripheral area luminance average value Yavg for each pixel generated by the peripheral area luminance average circuit 11 with a predetermined threshold value BmAx, and among the correction target pixels, the comparison result threshold value BmAx or less. The number of pixels determined to be is counted, and the count result is calculated as the number of black pixels NumB. Whether each pixel is a correction target pixel is determined based on the correction target identification signal CMP. That is, the black pixel count circuit 13 counts black level pixels whose peripheral pixel average value is equal to or lower than a predetermined level for each screen.
  • the peripheral pixel average value is the peripheral area luminance average value Yavg.
  • the predetermined level is a threshold value BmAx.
  • the result of counting the black level pixels is the number of black pixels NumB.
  • the threshold value BmAx is set to a value equal to or higher than the upper limit of the gradation range displayed as black in the screen.
  • the offset coefficient calculation circuit 14 calculates an offset coefficient KB corresponding to the number of black pixels NumB output from the black pixel count circuit 13 for each screen. That is, the offset coefficient calculation circuit 14 generates the offset coefficient KB based on the number of black level pixels.
  • the number of black level pixels is the number of black pixels NumB.
  • An example of the relationship between the number of black pixels NumB and the offset coefficient KB calculated according to this is shown in FIG. In the example shown in FIG. 15, the offset coefficient KB is 1 so that the number of black pixels NumB is 1 up to a predetermined value NumTP, and is smaller than 1 in a range larger than that, and as the number of black pixels NumB increases, It is determined that KB gradually decreases.
  • the offset coefficient KB is input to the offset level calculation circuit 15.
  • the offset level Offset is reduced as described later by reducing the offset coefficient KB. This is because most of the images having a large fog effect have a luminance signal distribution biased toward the high luminance side, and the black pixel number NumB is rarely increased. However, in an image having a small fog effect, the black pixel number NumB is large. This is because it is not necessary to perform gradation correction for expanding the luminance signal distribution for such an image. With the above configuration, it is possible to obtain an effect of suppressing an excessive gradation correction with an excessively wide luminance signal distribution for an image that does not include fog or the like.
  • the offset level calculation circuit 15 calculates the offset from the minimum luminance value Ymin output for each screen from the minimum luminance value detection circuit 12, the offset coefficient KB output for each screen from the offset coefficient calculation circuit 14, and a predetermined threshold LIMofst.
  • a level Offset is calculated. That is, the offset level calculation circuit 15 calculates the offset level Offset based on the minimum value and the offset coefficient KB.
  • the minimum value is the luminance minimum value Ymin.
  • the target offset level Offset_tgt is obtained, and then, the offset level Offset is obtained based on the target offset level.
  • the target offset level Offset_tgt is calculated for each screen according to the formula (2A) or the formula (2B).
  • the predetermined threshold LIMofst is set in order to suppress the occurrence of a pseudo contour due to widening of the luminance signal distribution when the luminance signal distribution is biased toward the high luminance side, and Offset_tgt is as follows: Limited to LIMofst or less.
  • LIMofst Offset_tgt Ymin ⁇ KB (2A)
  • Ymin ⁇ KB ⁇ LIMofst Offset_tgt LIMofst (2B)
  • the target offset level Offset_tgt is a value calculated in units of screens, and it is assumed that fluctuations in units of screens are intense. In order to reduce the influence of the fluctuation, the exponential smoothing processing expressed by the equation (3) is performed using the exponential smoothing coefficient value Kofst (value of 0 or more and 1 or less).
  • Offset_tgt (t) is a target offset level calculated for a certain screen
  • Offset_tgt (t ⁇ 1) is a target offset level calculated one screen before Offset_tgt (t).
  • Offset Kofst ⁇ Offset_tgt (t) + (1-Kofst) ⁇ Offset_tgt (t ⁇ 1) (3)
  • the calculated offset level Offset is input to the offset subtraction circuit 1.
  • the offset level Offset is multiplied by the minimum luminance value Ymin calculated from the peripheral region average luminance value Yavg for each correction target pixel in the input image and the offset coefficient KB calculated based on the number of black pixels NumB of the input image. Therefore, it is possible to perform gradation correction that broadens the luminance signal distribution without generating blackout pixels.
  • the white correction gain calculation circuit 30 calculates the offset level Offset output for each screen from the offset level generation circuit 10 and the target upper limit value Wtgt that is equal to or less than the maximum value Yfc of the gradation of the luminance signal according to Expression (6) or Expression (7).
  • a white correction gain value WGain is calculated.
  • the white correction gain luminance multiplication circuit 3 multiplies the white correction gain value WGain output from the white correction gain calculation circuit 30 and the luminance signal Yofst output from the offset subtraction circuit 1 as shown in the following equation (8).
  • the luminance signal Yw is calculated.
  • Yw WGain ⁇ Yofst (8)
  • the white correction gain value WGain is generated so that the corrected luminance signal Yw does not exceed the maximum tone value Yfc of the luminance signal Yi of the input image, the luminance signal Yw multiplied by the white correction gain value WGain and In the corrected image composed of the color difference signals Cbi and Cri, there is an effect that the whiteout pixels do not increase.
  • FIGS. Examples of the distribution of the luminance signal Yi of the input image, the distribution of the luminance signal Yofst output from the offset subtraction circuit 1, and the distribution of the luminance signal Yw output from the white correction gain luminance multiplication circuit 3 are shown in FIGS. ).
  • a distribution of the luminance signal Yofst in FIG. 16B is obtained by shifting the distribution of the luminance signal Yi in FIG. 16A to the left by the offset level Offset as it is.
  • the distribution positions of the luminance signal Yi shown in FIG. 16A and the luminance signal Yofst shown in FIG. 16B are different, their distribution shapes are the same.
  • the luminance signal Yw shown in FIG. 16C and the luminance signal Yi shown in FIG. 16A have different distribution positions and distribution shapes.
  • the distribution of the luminance signal Yw shown in FIG. 16C is wider than the distribution of the luminance signal Yi, and the image captured in fog, haze, rainy weather, etc. Contrast is improved.
  • the average value of the distribution of the luminance signal Yw shown in FIG. 16C is lower than the average value of the distribution of the luminance signal Yi shown in FIG. 16A, and is composed of the luminance signal Yw and the color difference signals Cbi and Cri.
  • the image to be displayed is an image darker than the input image.
  • the average luminance correction gain luminance multiplication circuit 4 and the average luminance correction gain generation circuit 40 are provided to improve this point.
  • the average luminance value calculation circuit 41 before correction of the average luminance correction gain generation circuit 40 shown in FIG. 3 calculates the average luminance value APLpre of the entire screen from the luminance signal Yi of the input image. That is, the pre-correction average luminance value calculation circuit 41 generates an average luminance value of the input image signal.
  • the input image signal is the luminance signal Yi of the input image.
  • This average luminance value APLpre is obtained by dividing the sum of the luminances Yi of all the pixels on the screen of the input image by the number of all the pixels.
  • the average luminance value APLpre is input to the target average luminance value calculation circuit 47.
  • the corrected average luminance value calculation circuit 42 calculates the corrected average luminance value APLpost of the entire screen of the luminance signal Ywa output from the average luminance correction gain luminance multiplication circuit 4. That is, the corrected average luminance value calculation circuit 42 generates an average luminance value of the corrected image signal.
  • the corrected image signal is the luminance signal Ywa.
  • This corrected average luminance value APLpost is obtained by dividing the sum of the luminance values Ywa of all the pixels of the corrected image screen by the number of all the pixels.
  • the average luminance value APLpost is input to the average luminance correction gain calculation circuit 48.
  • the primary color signal pixel representative value generation circuit 43 performs a matrix operation on the luminance signal Ywa output from the average luminance correction gain luminance multiplication circuit 4 and the color difference signals Cbi and Cri of the input image to perform primary color signal R, primary color signal G and A primary color signal B is calculated. That is, the primary color signal pixel representative value generation circuit 43 converts the color difference signal between the corrected image signal and the input image into the three primary color signals, and generates a maximum value for each pixel.
  • the corrected image signal is the luminance signal Ywa.
  • the matrix calculation is performed by, for example, the following formula (9) based on the color matrix conversion formula corresponding to the display system of the output image.
  • B is generated.
  • R + 1.00 ⁇ Ywa + 0.00 ⁇ Cbi + 1.40 ⁇
  • Cri G + 1.00 ⁇ Ywa ⁇ 0.34 ⁇ Cbi ⁇ 0.71 ⁇
  • Cri B + 1.00 ⁇ Ywa + 1.77 ⁇ Cbi + 0.00 ⁇ Cri ... (9)
  • the primary color signal pixel representative value generation circuit 43 obtains the maximum value MAX (R, G, B) for each pixel of the primary color signals R, G, and B obtained by the above calculation, and uses the maximum value as the pixel representative value M_POST. Output.
  • the pixel representative value M_POST is input to the color saturation pixel count circuit 44 and the color saturation amount average value calculation circuit 45.
  • the color saturation pixel count circuit 44 compares the pixel representative value M_POST output from the primary color signal pixel representative value generation circuit 43 with a predetermined threshold value SATmin, and the number of pixels whose pixel representative value M_POST is equal to or larger than the predetermined threshold value SATmin. And the count result for each screen is calculated as the number of color saturation pixels SATnum. That is, the color saturation pixel count circuit 44 counts the number of color saturation pixels SATnum where the maximum value M_POST is equal to or higher than a predetermined level for each screen.
  • the predetermined threshold SATmin is set in consideration of a margin so that color saturation does not occur when an image is displayed.
  • the number of color saturation pixels SATnum as the count result is input to the color saturation amount average value calculation circuit 45.
  • the color saturation amount average value calculation circuit 45 is based on the pixel representative value M_POST output from the primary color signal pixel representative value generation circuit 43, the number of color saturation pixels SATnum output from the color saturation pixel count circuit 44, and a predetermined threshold SATmin. Then, the color saturation amount difference absolute value sum SATsub is calculated according to Equation (10), and then the color saturation amount average value SATavg is calculated according to Equation (11).
  • SATsub ⁇ (M_POST ⁇ SATmin) (10)
  • SATavg SATsub / SATnum (11)
  • SATsub in Expression (10) represents the sum of M_POST-SATmin (sum of SATnum M_POST-SATmin) for all M_POSTs that satisfy SATmin ⁇ M_POST.
  • the calculated color saturation amount average value SATavg is input to the average luminance value correction amount calculation circuit 46.
  • the average luminance value correction amount calculation circuit 46 outputs the color saturation pixel number SATnum output from the color saturation pixel count circuit 44, the color saturation amount average value SATavg output from the color saturation amount average value calculation circuit 45, and the screen pixel number NMAX.
  • the color saturation correction level SATADJ is calculated from the intensity coefficient SATstr with respect to the average luminance value correction amount according to the equation (12).
  • the color saturation correction level SATADJ is used as an average luminance value correction amount.
  • SATADJ SATavg ⁇ (SATnum / NMAX) ⁇ SATstr (12) (SATnum / NMAX) on the right side of Expression (11) corresponds to the ratio of the area where color saturation occurs.
  • the color saturation amount average value calculation circuit 45 and the average luminance value correction amount calculation circuit 46 respectively calculate the color saturation amount average value SATavg and the number of color saturation pixels SATnum, and then calculate the color saturation correction level SATADJ.
  • the color saturation correction level SATADJ may be directly calculated from the SATsub calculated from the equation (10) according to the equation (13).
  • SATADJ (SATsub / NMAX) ⁇ SATstr (13)
  • Expression (13) is derived as follows by substituting Expression (11) into SATavg of Expression (12).
  • the color saturation correction level SATADJ By adopting a configuration for obtaining the color saturation correction level SATADJ according to the equation (13), the division by the color saturation pixel number SATnum in the calculation of the color saturation amount average value SATavg and the number of color saturation pixel tails SATnum in the calculation of the color saturation correction level SATADJ. Even if the multiplication by is omitted, the color saturation correction level SATADJ is obtained in the same manner. By reducing the number of dividers and multipliers, the circuit scale can be reduced.
  • the color saturation average value calculation circuit 45 and the average luminance value correction amount calculation circuit 46 constitute a color saturation correction level generation circuit 51 that generates the color saturation correction level SATADJ based on the number of color saturation pixels SATnum and the maximum value M_POST. ing.
  • the target average luminance value calculation circuit 47 corrects the average luminance value APLpre of the input image output from the pre-correction average luminance value calculation circuit 41, the color saturation correction level SATADJ output from the average luminance value correction amount calculation circuit 46, and correction.
  • a target average luminance value APL_TGT is calculated from the adjustment value APLADJ for giving a desired level difference to the average luminance value before and after according to the equation (14A) or (14B). That is, the target average luminance value calculation circuit 47 generates a target image level based on the average luminance value APLpre of the input image signal and the color saturation correction level SATADJ of the corrected image signal.
  • the target image level is the target average luminance value APL_TGT.
  • APL_TGT APLpre + APLADJ ⁇ SATADJ (14A)
  • APL_TGT APLpre-APLADJ-SATADJ (14B)
  • the adjustment value APLADJ is for giving a desired level difference to the average luminance value before and after correction, and is set in advance.
  • the adjustment value APLADJ may be changed from the outside.
  • the target average luminance value APL_TGT is input to the average luminance correction gain calculation circuit 48.
  • the adjustment value APLADJ is added to or subtracted from the calculation formula for the target average luminance value APL_TGT, there is an effect that a desired level difference can be given to the average luminance value before and after correction.
  • the adjustment value APLADJ can be used to speed up the change of the target average luminance value APL_TGT.
  • the average luminance correction gain calculation circuit 48 calculates the average luminance from the target average luminance value APL_TGT output from the target average luminance value calculation circuit 47 and the average luminance value APLpost of the corrected image output from the corrected average luminance value calculation circuit 42.
  • a correction gain APLGain is calculated. That is, the average luminance correction gain calculation circuit 48 generates the average luminance correction gain APLGain so that the average luminance value of the corrected image signal approaches the target image level.
  • the target image level is the target average luminance value APL_TGT.
  • the average luminance value is the average luminance value APLpost.
  • the target average luminance correction gain APLGain_tgt is calculated, and the average luminance correction gain APLGain is calculated based on the target average luminance correction gain APLGain_tgt.
  • the calculation of the target average luminance correction gain APLGain_tgt is performed as follows based on the target average luminance value APL_TGT and the average luminance value APLpost of the output image. First, if APLpost is the same as APLGain, APLGain_tgt (t ⁇ 1) of the previous frame is used as it is as APLGain_tgt (t) of the current frame.
  • APLGain_tgt APL_TGT / APLpost
  • the target average brightness correction gain APLGain_tgt is a value calculated in units of screens, and fluctuations in units of screens are assumed.
  • an exponential smoothing process represented by the equation (16) is performed using an exponential smoothing coefficient value KApl (a value between 0 and 1).
  • KApl a value between 0 and 1.
  • APLGain_tgt (t) is a target average luminance correction gain calculated for a certain screen
  • Offset_tgt (t ⁇ 1) is a target average luminance correction calculated one screen before Offset_tgt (t). It is gain.
  • APLGain KApl ⁇ APLGain_tgt (t) + (1-KApl) ⁇ APLGain_tgt (t ⁇ 1) (16)
  • the calculated average luminance correction gain APLGain is input to the average luminance correction gain luminance multiplication circuit 4.
  • APLGain_tgt In an environment where the target average brightness correction gain APLGain_tgt does not fluctuate significantly, the exponential smoothing process is not used to calculate the average brightness correction gain APLGain, and the target average brightness correction gain is expressed by the following equation (17).
  • APLGain may be directly output as an average luminance correction gain.
  • APLGain APLGain_tgt (17)
  • a gain determination circuit 52 is configured. That is, the average luminance correction gain determination circuit 52 determines the average luminance correction gain APLGain based on the average luminance value APLpre of the corrected image signal and the color saturation correction level SATADJ of the corrected image signal.
  • the average luminance correction gain luminance multiplication circuit 4 multiplies the luminance signal Yw output from the white correction gain luminance multiplication circuit 3 by the average luminance correction gain APLGain output from the average luminance correction gain calculation circuit 48 to obtain a corrected luminance signal.
  • the color saturation correction level SATADJ is often 0, and when the adjustment value APLADJ is 0, the target average luminance correction gain APLGain_tgt Is the ratio between the average luminance value APLpre before correction and the average luminance value APLpost after correction, so that the average luminance after correction approaches the average luminance before correction (thus, the average luminance after correction approaches the target image level APL_TGT, The effect is that the brightness of the image does not fluctuate before and after correction).
  • the luminance saturation processing circuit 5 performs saturation processing on the luminance signal Ywa output from the average luminance correction gain luminance multiplication circuit 4, and calculates a corrected luminance signal Ya. In this saturation processing, when the gradation value of the luminance signal Ywa exceeds the maximum value Yfc, the gradation value is limited to the maximum value Yfc.
  • the mixing circuit 6 represents the luminance signal Yi of the input image and the luminance signal Ya output from the luminance saturation processing circuit 5 by the above formula (1) based on the mixing ratio KMIX output from the mixing ratio generation circuit 65. And the output luminance signal Yo is output.
  • the mixing ratio KMIX is determined according to the low luminance pixel ratio RLY. As the value of the mixing ratio KMIX is larger, the mixing ratio of the luminance signal Yi is increased, and as the mixing ratio KMIX is smaller, the mixing ratio of the luminance signal Ya is increased.
  • FIG. 17 shows an output image example obtained by processing the input image of FIG. The image obtained by capturing the house covered with fog in FIG. 4 through the window frame is displayed as it is in the low brightness area LPA without being crushed as shown in FIG. 17, and the contrast of the house in the non-low brightness area HPA is clear. And contrast is improved.
  • FIG. 18 shows the distribution of the luminance signal Yi of the input image and the distribution of the luminance signal Ywa ′ output from the average luminance correction gain luminance multiplication circuit 4 when the average luminance value correction amount calculation circuit 46 is not provided.
  • the average luminance correction gain calculation circuit 48 calculates the luminance signal Ywa in order to calculate the average luminance correction gain APLGain so that the average luminance value APLpre of the luminance signal Yi of the input image is equal to the average luminance value APLpost of the luminance signal Ywa ′.
  • the number of pixels in which the primary color signals R, G, and B obtained by matrix calculation from the luminance signal Ywa ′ and the color difference signals Cbi and Cri have the maximum gradation value increases, and the number of images whose hue changes increases.
  • the primary color signals R and B are calculated from the luminance signal Ywa ′ and the color difference signals Cbi and Cri by the following equations (19) and (20), so the luminance signal Ywa ′ is the maximum gradation value Yfc. Even if the color difference signals Cbi and Cri are not positive, the primary color signals R and B become maximum gradation values and color saturation occurs and the hue changes.
  • R + 1.00 ⁇ Ywa ′ + 0.00 ⁇ Cbi + 1.40 ⁇ Cri (19)
  • B + 1.00 ⁇ Ywa ′ + 1.77 ⁇ Cbi + 0.00 ⁇ Cri (20)
  • FIG. 19 shows a schematic diagram of the distribution of the luminance signal Yi of the input image and the distribution of the luminance signal Ywa output from the average luminance correction gain luminance multiplication circuit 4 when the average luminance value correction amount calculation circuit 46 is provided.
  • the average luminance correction gain calculation circuit 48 calculates the average luminance correction gain APLGain from the ratio of the value obtained by subtracting the color saturation correction level SATADJ from the average luminance value APLpre of the luminance signal Yi of the input image and the average luminance value APLpost of the luminance signal Ywa.
  • the distribution of the luminance signal Ywa is such that the luminance signal Ywa ′ output from the average luminance correction gain luminance multiplication circuit 4 when the average luminance value correction amount calculation circuit 46 shown in FIG. Therefore, the maximum value Yfc of the gradation of the signal is not biased.
  • an increase in whiteout pixels is suppressed, and an increase in pixels in which the primary color signals R, G, and B obtained by matrix calculation from the luminance signal Ywa and the color difference signals Cbi and Cri become the maximum gradation value Yfc is also achieved. It is possible to suppress an increase in pixels whose hue is changed.
  • the minimum luminance value detection circuit 12 cuts out and outputs a part of the input image instead of setting the minimum value in the entire area of the peripheral region average luminance value Yavg as the minimum luminance value Ymin.
  • the image processing apparatus may be configured to output the minimum value within the range of the image to be cut out and output as the minimum luminance value Ymin, not the entire screen of the input image.
  • the black pixel count circuit 13 the pre-correction average luminance value calculation circuit 41, the post-correction average luminance value calculation circuit 42, the color saturation pixel count circuit 44, and the average luminance value correction amount calculation circuit 46.
  • the offset level generation circuit 10 the white correction gain calculation circuit 30, and the average luminance correction gain generation circuit 40 based on the input image luminance signal Yi and the correction image Ywa for each screen (frame). Since the generation of the offset level Offset, white correction gain WGain, and average luminance correction gain APLGain is generated when the input image luminance signal Yi for the screen is finished, the generated offset level Offset, white The correction gain WGain and the average luminance correction gain APLGain are used for correction of the luminance signal Yi of the next screen (frame). If there is no significant change in the image content between successive screens, such But there is no big problem.
  • the luminance of the input image for each screen (frame), the offset level Offset generated based on the corrected image Ywa, the white correction gain WGain, and the average luminance correction gain APLGain are set to the luminance of the screen (frame) on the same screen.
  • a circuit (storage circuit) for delaying the luminance signal Yi by one screen (frame) period may be inserted before the offset subtraction circuit 1 of FIG.
  • FIG. FIG. 20 shows an image processing apparatus according to Embodiment 2 of the present invention.
  • the image processing apparatus shown in FIG. 20 is generally the same as the image processing apparatus according to the first embodiment shown in FIG. 1, except that the gain multiplication circuit 2 includes a white correction gain color difference multiplication circuit 7 and an average luminance correction gain color difference multiplication.
  • a circuit 8 is further included, and a color difference saturation processing circuit 9 is further added, which is different from the first embodiment in that gradation correction is performed on the color difference signal.
  • the white correction gain color difference multiplication circuit 7 multiplies the white correction gain value WGain output from the white correction gain calculation circuit 30 and the color difference signals Cbi and Cri of the input image to calculate the color difference signals Cbw and Crw.
  • the color difference signals Cbw and Crw are input to the average luminance correction gain color difference multiplication circuit 8.
  • the average luminance correction gain color difference multiplication circuit 8 adds the average luminance correction output from the average luminance correction gain calculation circuit 48 of the average luminance correction gain generation circuit 40 to the color difference signals Cbw and Crw output from the white correction gain color difference multiplication circuit 7.
  • the gain APLGain is multiplied to calculate the color difference signals Cbwa and Crwa.
  • the color difference signals Cbwa and Crwa are input to the primary color signal pixel representative value generation circuit 43 and the color difference saturation processing circuit 9 of the average luminance correction gain generation circuit 40.
  • the color difference saturation processing circuit 9 performs saturation processing on the color difference signals Cbwa and Crwa output from the average luminance correction gain color difference multiplication circuit 8 and calculates corrected color difference signals Cbo and Cro.
  • the average luminance correction gain generation circuit 40 generates an average luminance correction gain based on the color difference signals Cbi and Cri of the input image, whereas the average luminance correction gain generation circuit 40 according to the second embodiment The average luminance correction gain is generated based on the color difference signals Cbo and Cro of the corrected image, but the processing content is the same.
  • a circuit for delaying the luminance signal Yi and the color difference signals Cbi and Cri of the input image by one frame period is used as the offset subtracting circuit 1 and FIG. Inserted before the white correction gain color difference multiplication circuit 7, the offset subtraction circuit 1, the white correction gain luminance multiplication circuit 3, the average luminance correction gain luminance multiplication circuit 4, the white correction gain color difference multiplication circuit 7, and the average luminance correction gain color difference multiplication.
  • the offset level Offset, the white correction gain WGain, and the average luminance correction gain APLGain calculated based on the luminance signal Yi and the color difference signals Cbi and Cbr of the input image before one screen (frame) are the same screen (frame). From the luminance signal Yi and the color difference signals Cbi and Cri, the luminance signal Ywa and the color difference of the corrected image No. Cbwa, it can be configured to generate Crwa.
  • Embodiment 3 As described above, the image processing apparatuses according to the first and second embodiments are described as being configured by hardware. However, some or all of the apparatuses according to the first and second embodiments may be realized by software, that is, by a programmed computer. Is possible. In that case, the image processing apparatus is configured as shown in FIG.
  • the image processing apparatus shown in FIG. 21 includes an input interface 101, a processor 102, a program memory 103, a data memory 104, an output interface 105, and a bus 106 for connecting them.
  • the processor 102 operates on an image input via the input interface 101 in accordance with a program stored in the program memory 103. Various data are stored in the data memory 104 in the course of operation. An image generated as a result of the processing is output via the interface 105.
  • the luminance signal and color difference signal of the entire screen are input for each screen of the input image, rather than the luminance signal and color difference signal for each pixel of the input image. To do.
  • step S1 the luminance signal Yi of the input image and the color difference signals Cbi and Cri are received.
  • step S2 the luminance signal Ywa of the input image of the current screen (frame) and the color difference signals Cbi and Cri, the calculated offset level Offset, the white correction gain WGain, and the average luminance correction gain APLGain, the luminance signal Ywa and the color difference signal.
  • Cbwa and Crwa are calculated.
  • the offset level Offset, the white correction gain WGain, and the average brightness correction gain APLGain are calculated based on the brightness signal Yi of the input image, the brightness signal Ywa of the corrected image, and the color difference signals Cbwa and Crwa before one screen (frame). Used.
  • This processing is the same as the processing by the offset subtraction circuit 1, the white correction gain luminance multiplication circuit 3, and the average luminance correction gain luminance multiplication circuit 4 of FIG.
  • step S3 the peripheral area luminance average value Yavg of each pixel in the current screen is calculated. This process is the same as that of the peripheral area luminance averaging circuit 11 of FIG.
  • step S4 a minimum luminance value Ymin that is the minimum value of the peripheral region average luminance value Yavg of each pixel in the correction target region in the current screen is calculated. This process is the same as the process of the minimum luminance value detection circuit 12 in FIG.
  • step S5 the number of black pixels NumB in which the peripheral area luminance average value Yavg of each pixel in the correction target area in the current screen is equal to or less than a predetermined threshold BmAx is counted.
  • a predetermined threshold BmAx a predetermined threshold
  • step S7 the target offset level Offset_tgt is calculated from the minimum luminance value Ymin calculated in step S4, the offset coefficient KB calculated in step S6, and a predetermined threshold LIMOfst.
  • step S8 the offset level Offset is calculated from the target offset level Offset_tgt by exponential smoothing.
  • the processing in steps S7 and S8 is the same as the processing in the offset level calculation circuit 15 in FIG.
  • step S9 the white correction gain WGain is calculated from the offset level Offset calculated in step S8 and the target upper limit value Wtgt of the luminance signal gradation.
  • This process is the same as the process of the white correction gain calculation circuit 30 in FIG.
  • step S10 an average luminance value APLpre before correction that is an average value of luminance signals Yi of pixels on the entire screen and an average luminance value APLpost after correction that is an average value of luminance signals Ywa of pixels on the entire screen are calculated.
  • This processing is the same as the processing of the pre-correction average luminance value calculation circuit 41 and the corrected average luminance value calculation circuit 42 of FIG.
  • step S11 primary color signals R, G, B are calculated by matrix calculation from the luminance signal Ywa calculated in step S2 and the color difference signals Cbwa, Crwa, and the maximum value MAX (R of the primary color signals R, G, B for each pixel is calculated. , G, B) is calculated as a pixel representative value M_POST.
  • This processing is the same as the processing of the primary color signal pixel representative value generation circuit 43 in FIG.
  • step S12 the number of color saturation pixels SATnum whose pixel representative value M_POST is equal to or greater than a predetermined threshold value SATmin is counted. This process is the same as the process of the color saturation pixel count circuit 44 of FIG.
  • step S13 a sum of values obtained by subtracting a predetermined threshold value SATmin from the pixel representative value M_POST of the color saturation pixels is calculated, and divided by the number of color saturation pixels SATnum to calculate a color saturation amount average value SATavg.
  • This processing is the same as the processing represented by the equations (10) and (11) performed by the color saturation amount average value calculation circuit 45 of FIG.
  • step S14 the color saturation correction level SATADJ is calculated from the color saturation pixel number SATnum calculated in step S12, the color saturation amount average value SATavg calculated in step S13, the screen pixel number NMAX, and the intensity coefficient SATstr for the average luminance value correction amount. Is calculated.
  • This process is the same as the process represented by Expression (12) performed by the average luminance value correction amount calculation circuit 46 of FIG.
  • step S15 the target average is calculated from the pre-correction average luminance value APLpre calculated in step S10, the color saturation correction level SATADJ calculated in step S14, and the adjustment value APLADJ for giving a desired level difference to the average luminance value before and after correction.
  • a luminance value APL_TGT is calculated. This processing is the same as the processing represented by the equations (14A) and (14B) performed by the target average luminance value calculation circuit 47 of FIG.
  • step S17 the target average brightness correction gain APLGain_tgt (t-1) calculated one screen before is held as the target average brightness correction gain APLGain_tgt (t) of the current screen.
  • step S18 the target average luminance correction gain APLGain_tgt of the current screen is calculated from the target average luminance value APL_TGT calculated in step S15 and the corrected average luminance value APLpost calculated in step S10. The calculation for that is the same as that described with reference to the equation (15) in the first embodiment.
  • step S19 the average brightness correction gain APLGain is calculated from the target average brightness correction gain APLGain_tgt by exponential smoothing. The calculation for this is the same as that described with reference to equation (16) in the first embodiment.
  • the processes in steps S16, S17, S18, and S19 described above are the same as the processes of the average luminance correction gain calculation circuit 48 in FIG.
  • step S20 the counter t (representing the screen number) used in steps S7, S8, S17, S18, and S19 is updated, and the process returns to step 1 to start processing the next input image.
  • the difference between the corrected average luminance value APLpost and the pre-corrected average luminance value APLpre is reduced by the processing from step S11 to step S19. I can do it.
  • the number of color saturation pixels SATnum of the corrected image is large or when the color saturation amount average value SATavg is large, an increase in the number of pixels whose hue changes due to the correction is suppressed, and the corrected average luminance value APLpost is corrected. It becomes possible to control so that the difference of the previous average luminance value APLpre becomes small.
  • the step of delaying the luminance signal Yi and the color difference signals Cbi, Cri of the input image by one frame period is inserted before step S2, for example.
  • step S2 the luminance of the same screen (frame) as the offset level Offset, the white correction gain WGain, and the average luminance correction gain APLGain calculated based on the luminance signal Yi and the color difference signals Cbi and Cbr of the input image before one screen (frame).
  • the luminance signal Ywa and the color difference signals Cbwa and Crwa of the corrected image can be generated from the signal Yi and the color difference signals Cbi and Cri.
  • 1 offset subtraction circuit 2 gain multiplication circuit, 3 white correction gain luminance multiplication circuit, 4 average luminance correction gain luminance multiplication circuit, 5 luminance saturation processing circuit, 6 mixing circuit, 7 white correction gain color difference multiplication circuit, 8 average luminance correction gain Color difference multiplication circuit, 9 color difference saturation processing circuit, 10 offset level generation circuit, 11 peripheral area luminance average circuit, 12 luminance minimum value detection circuit, 13 black pixel count circuit, 14 offset coefficient calculation circuit, 15 offset level calculation circuit, 20 gain Generation circuit, 30 white correction gain calculation circuit, 40 average luminance correction gain generation circuit, 41 pre-correction average luminance value calculation circuit, 42 corrected average luminance value calculation circuit, 43 primary color signal pixel representative value generation circuit, 44 color saturation pixel count Circuit, 5 color saturation amount average value calculation circuit, 46 average brightness value correction amount calculation circuit, 47 target average brightness value calculation circuit, 48 average brightness correction gain calculation circuit, 51 color saturation correction level generation circuit, 52 average brightness correction gain determination circuit, 60 area determination circuit, 61 luminance level determination circuit, 62 pixel ratio calculation circuit, 63 correction target pixel specification

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Studio Devices (AREA)

Abstract

 領域判定回路(60)は、画像の各画素が、所定の輝度レベル以下の画素の出現頻度が所定値以下である補正対象領域内のものか否かを判定する。オフセットレベル生成回路(10)は、補正対象領域内のものであると判定された画素の輝度に基づいて、オフセットレベル(Offset)を生成する。オフセット減算回路(1)は、画像信号(Yi)から、オフセットレベル(Offset)を減算しオフセット画像信号(Yofst)を生成する。ゲイン生成回路(20)は、オフセット画像信号(Yofst)に対するゲインを生成する。ゲイン乗算回路(2)は、オフセット画像信号(Yofst)にゲインを乗算し、補正画像信号(Ya)を生成する。

Description

画像処理装置及び方法
 本発明は入力画像の輝度信号を補正する画像処理装置及び方法に関するものである。
 従来から、特に霧、霞、雨天などで撮影した輝度信号分布の狭い画像に対して被写体(人、動物、車両、道路標識など)の視認性を高めるために画像の輝度信号の階調補正が行われている。階調補正を行う場合、輝度信号分布の狭い画像の一部に、輝度の極端に高い部分或いは極端に低い部分が含まれていると、輝度信号分布の狭い画像に対する階調補正が不十分となっていた。そこで、入力画像データの高輝度側の一定輝度以上の輝度を最高輝度に、また低輝度側の一定輝度以下の輝度を最低輝度に変換し、その間の輝度を輝度に応じて線形に最低輝度から最高輝度に拡大することが知られている(例えば、特許文献1参照)。
特開2002-152623号公報(第3頁、段落0007)
 従来の画像処理装置は、入力画像データの高輝度側の一定輝度以上の輝度を最高輝度に、また低輝度側の一定輝度以下の輝度を最低輝度に変換し、その間の輝度を輝度に応じて線形に最低輝度から最高輝度に拡大するように構成されているので、低輝度側の一定輝度以下の画像部分は黒潰れして見えなくなり、一方、低輝度側の一定輝度以下の画像部分の黒潰れを防ごうとすると、中間の輝度の画像部分のコントラストの改善が十分でないという問題があった。
 本発明は、上記従来技術の課題を解決するためになされたものであり、霧などにより輝度信号分布が狭くなった画像領域と低輝度の画像領域を共に含む画像に対して、低輝度の画像領域を黒潰れさせることなく、輝度信号分布が狭い画像領域の輝度信号分布を拡大することでコントラストを補正できる画像処理装置を得ることを目的とする。
 上記の課題を解決するため、本発明の画像処理装置は、
 画像信号で表される画像の各画素が、所定の輝度レベル以下の画素の出現頻度が所定値以下である補正対象領域内のものか否かを判定する領域判定回路と、
 前記画像信号で表される画像のうち、前記領域判定回路で前記補正対象領域内のものであると判定された画素の輝度に基づいて、オフセットレベルを生成するオフセットレベル生成回路と、
 前記画像信号から、前記オフセットレベル生成回路で生成された前記オフセットレベルを減算しオフセット画像信号を生成するオフセット減算回路と、
 前記オフセット画像信号に対するゲインを生成するゲイン生成回路と、
 前記オフセット画像信号に前記ゲインを乗算し、補正画像信号を生成するゲイン乗算回路と、
 を備えたことを特徴とする。
 本発明によれば、例えば、霧に覆われ輝度信号分布が狭くなった被写体の手前に写る窓枠などによる低輝度の画像領域部分を黒潰れさせることなく、被写体のコントラストを改善することができる。
本発明の実施の形態1に係る画像処理装置の構成を概略的に示すブロック図である。 図1のオフセットレベル生成回路の構成例を示すブロック図である。 図1の平均輝度補正ゲイン生成回路の構成例を示すブロック図である。 実施の形態1における、入力画像の例を示す概略図である。 図4の入力画像を撮像したときに得られる信号波形を示す図である。 実施の形態1における、入力画像の例に対応した状態信号の分布を示す図である。 (a)~(c)は、注目画素を中心とする周辺画素ブロック中の低輝度画素と非低輝度画素の配置の異なる例を示す図である。 図4のA-A’ライン上の画素についての低輝度画素割合を示す図である。 図1の混合比生成回路の一例における入出力特性を示すグラフである。 (a)~(c)は、図1の混合比生成回路の一例により出力される混合比を示す図である。 図1の混合比生成回路の一例における入出力特性を示すグラフである。 (a)~(c)は、図1の混合比生成回路の一例により出力される混合比を示す図である。 図1の混合比生成回路の一例における入出力特性を示すグラフである。 図1の周辺領域輝度平均回路において平均を求めるために用いられる画素が占める領域を示す図である。 図1のオフセット係数算出回路に入力としての黒画素数NumBと、出力としてのオフセット係数KBの関係を示す図である。 (a)~(c)は、入力画像、オフセット減算回路によるオフセット後の画像、及び白補正ゲイン輝度乗算回路による白補正後の画像の輝度信号分布の変化を示す図である。 実施の形態1における、出力画像の例を示す概略図である。 図1の平均輝度補正量算出回路を設けない場合の、図19と同様の輝度信号分布の変化を示す図である。 入力画像、白補正ゲイン輝度乗算回路による白補正後の画像、及び平均輝度補正ゲイン輝度乗算回路による平均輝度補正後の画像の輝度信号分布の変化を示す図である。 本発明の実施の形態2に係る画像処理装置の構成を概略的に示すブロック図である。 本発明の実施の形態3に係る画像処理装置の構成を概略的に示すブロック図である。 実施の形態3に係る画像処理装置で実施される画像処理方法を示すフローチャートである。 実施の形態3に係る画像処理装置で実施される画像処理方法を示すフローチャートである。
実施の形態1.
 図1は本発明の実施の形態1に係る画像処理装置の構成を示す。
 図示の画像処理装置は画像を構成する各画素の輝度信号Yiと色差信号Cbi,Criを受けて、画像の輝度信号Yiの階調補正を行うものである。各画素の輝度信号Yiと色差信号Cbi,Criは、単に入力信号とも呼ばれる。画像処理装置は、複数の画素を順に注目画素として、当該画素の補正後の輝度信号Yoを出力するとともに、入力された色差信号Cbi,Criをそのまま(補正を加えることなく)出力する。
 図示の画像処理装置は、オフセット減算回路1と、ゲイン乗算回路2と、輝度飽和処理回路5と、混合回路6と、オフセットレベル生成回路10と、ゲイン生成回路20と、領域判定回路60と、混合比生成回路65とを有する。
 オフセット減算回路1は、入力画像の輝度信号Yiから、オフセットレベル生成回路10により生成されるオフセットレベルOffsetを減算し、輝度信号Yofstを算出する。
 つまり、オフセット減算回路1は、画像信号から、オフセットレベル生成回路10で生成されたオフセットレベルOffsetを減算しオフセット画像信号を生成する。ここで、画像信号は、輝度信号Yiである。また、オフセット画像信号は、輝度信号Yofstのことである。
 オフセットレベル生成回路10は、図2に示すように、周辺領域輝度平均回路11と、輝度最小値検出回路12と、黒画素カウント回路13と、オフセット係数算出回路14と、オフセットレベル算出回路15とを有する。
 ゲイン乗算回路2は、オフセット減算回路1が出力する輝度信号Yofstに、ゲイン生成回路20で生成されるゲインを乗算する。ゲイン生成回路20は、オフセット画像信号に対するゲインを生成する。ここで、オフセット画像信号は、輝度信号Yofstのことである。
 ゲイン乗算回路2は、白補正ゲイン輝度乗算回路3と、平均輝度補正ゲイン輝度乗算回路4とを有する。ゲイン生成回路20は、白補正ゲイン算出回路30と、平均輝度補正ゲイン生成回路40を有する。ゲイン乗算回路2は、オフセット画像信号(輝度信号Yofst)にゲインを乗算し、補正画像信号Ywaを生成する。
 白補正ゲイン輝度乗算回路3は、オフセット減算回路1が出力する輝度信号Yofstに、白補正ゲイン算出回路30により決定される白補正ゲイン値WGainを乗算し、白補正後輝度信号Ywを算出する。つまり、白補正ゲイン輝度乗算回路3は、オフセット画像信号に白補正ゲインWGainを乗算し白補正画像信号Ywを生成する。ここで、オフセット画像信号は、輝度信号Yofstである。
 平均輝度補正ゲイン輝度乗算回路4は、白補正ゲイン輝度乗算回路3が出力する輝度信号Ywに、平均輝度補正ゲイン生成回路40により決定される平均輝度補正ゲインAPLGainを乗算し、平均輝度補正後輝度信号Ywaを算出する。つまり、平均輝度補正ゲイン輝度乗算回路4は、白補正画像信号に平均輝度補正ゲインAPLGainを乗算して平均輝度補正画像信号Ywaを生成する。ここで、白補正画像信号は、輝度信号Ywである。
 平均輝度補正ゲイン生成回路40は、図3に示すように、補正前平均輝度値算出回路41と、補正後平均輝度値算出回路42と、原色信号画素代表値生成回路43と、色飽和画素カウント回路44と、色飽和補正レベル生成回路51と、目標平均輝度値算出回路47と、平均輝度補正ゲイン算出回路48とを有する。
 色飽和補正レベル生成回路51は、色飽和量平均値算出回路45及び平均輝度値補正量算出回路46を有する。色飽和補正レベル生成回路51は、色飽和画素数SATnumと最大値M_POSTに基づいて色飽和補正レベルSATADJを生成する。
 平均輝度補正ゲイン生成回路40は、画像信号の平均輝度値APLpreと、補正画像信号の平均輝度値APLpost及び色飽和補正レベルSATADJに基づいて平均輝度補正ゲインAPLGainを生成する。
 輝度飽和処理回路5は、平均輝度補正ゲイン輝度乗算回路4から出力される輝度信号Ywaに対する飽和処理を行い、飽和処理後の輝度信号Yaを出力する。
 混合回路6は、入力画像の輝度信号Yiと、輝度飽和処理回路5から出力される飽和処理後の輝度信号Yaを、混合比生成回路65で決定される混合比KMIXに応じた割合で混合し、出力輝度信号Yoを出力する。混合回路6は、画像信号と補正画像信号を混合比KMIXに基づいて混合する。ここで、画像信号は入力画像の輝度信号Yiである。また、補正画像信号は、飽和処理後の輝度信号Yaである。
 混合比が百分率を表すものである場合、混合回路6における混合は下記の式で表される。
 Yo=Yi×KMIX/100+Ya×(100-KMIX)/100  …(1)
 オフセットレベル生成回路10は、入力画像を構成する画素のうち、領域判定回路60により補正対象であると判定された画素の各々についての、その周辺領域の平均輝度に基づいて、オフセットレベル(Offset)を生成する。
 つまり、オフセットレベル生成回路10は、画像信号で表される画像のうち、領域判定回路60で補正対象領域内のものであると判定された画素の輝度に基づいて、オフセットレベルOffsetを生成する。
 白補正ゲイン算出回路30は、オフセットレベル生成回路10で生成されたオフセットレベルOffsetと、所定の目標上限値Wtgtに基づいて白補正ゲインWGainを画素毎に生成する。つまり、白補正ゲイン算出回路30は、画像信号のオフセットレベルOffsetと所定の目標上限値Wtgtに基づいて白補正ゲインWGainを生成する。
 平均輝度補正ゲイン生成回路40は、入力画像の輝度信号Yi及び色差信号Cbi、Cri、並びに平均輝度補正後輝度信号Ywaに基づいて平均輝度補正ゲインAPLGainを生成する。
 混合比生成回路65は、各画素の周囲の画素のうち、低輝度画素の割合(RLY)に基づいて混合比KMIXを画素毎に求める。つまり、混合比生成回路65は、画像信号で表される画像の各画素について、その周囲の画素のうち、輝度が所定の輝度レベル以下の画素が占める割合である低輝度画素割合に基づいて混合比を画素毎に求める。
 以下、領域判定回路60、混合比生成回路65、オフセットレベル生成回路10、白補正ゲイン算出回路30、及び平均輝度補正ゲイン生成回路40について順に詳しく説明する。
 以下では、入力画像が図4に示すものである場合を想定して説明する。図4は、例えば霧に覆われた家屋を窓枠越しに撮像した場合に得られる画像の概略を示す。画像の一部を占める窓枠の部分LPAは輝度レベルが低い領域(低輝度領域)であり、それ以外の部分(窓枠越しに見える部分)HPAは比較的輝度が高い領域(非低輝度領域)である。図示の例ではこの非低輝度領域HPAに含まれる家屋のコントラストが低く、コントラストを増大させるための補正が望まれる。
 領域判定回路60は、輝度信号Yiで表される画像の各画素が、所定の輝度レベル以下の画素の出現頻度が所定値以下である補正対象領域内のものか否かを判定するものである。
 つまり、領域判定回路60は、画像信号で表される画像の各画素が、所定の輝度レベル以下の画素の出現頻度が所定値以下である補正対象領域内のものか否かを判定する。ここで、画像信号は、輝度信号Yiである。
 領域判定回路60は、輝度レベル判別回路61と、画素割合算出回路62と、補正対象画素指定回路63とを有する。
 輝度レベル判別回路61は、入力画像の各画素の輝度信号Yiを所定の輝度レベルTHPと比較し、判別結果を示す信号SEPを出力する。つまり、輝度レベル判別回路61は、画像信号で表される画像の各画素の画素値を所定の輝度レベルTHPと比較し所定輝度レベルTHP以下の画素を判別する。ここで、画像信号は輝度信号Yiである。
 図5は、図4の入力画像のA-A’ラインの信号波形図である。
 非低輝度領域HPAの信号は、家屋の屋根に対応した信号が霧に覆われて小振幅となっており、一方、低輝度領域LPAの信号も窓枠に対応した小振幅の部分を含む。
 輝度レベル判別回路61は、図5のような輝度信号Yiの各画素値を所定の輝度レベル(閾値)THPと比較し、判別結果として、閾値THP以下の画素(低輝度画素)に対しては“1”となり、閾値THPよりも大きい画素(非低輝度画素)に対しては“0”となる二値の状態信号SEPを出力する。
 なお、ノイズの影響を防ぐため、輝度レベル判別回路61の入力段で、輝度信号Yiを周辺画素平均処理などの低域通過フィルタを通してから閾値判別しても良い。
 判別結果出力(状態信号)SEPを、画像に対応して表示すると図6のようになる。図6で、ハッチングを施した部分HPAは、非低輝度画素で占められる領域(非低輝度領域)であり、白の部分(ハッチングを施していない部分)LPAは、低輝度画素で占められる領域(低輝度領域)である。
 輝度レベル判別回路61は状態信号SEPを、画素割合算出回路62へ供給する。
 画素割合算出回路62は、輝度レベル判別回路61からの状態信号SEPを入力とし、画像の各画素を順に注目画素として、注目画素を中心とした所定の周辺画素範囲の中に上記低輝度画素が占める割合を求め、低輝度画素割合(を示すデータ)RLYとして出力する。つまり、画素割合算出回路62は、画像信号で表される画像の各画素を順に注目画素として、該注目画素を中心とした所定の周辺画素範囲の中に輝度レベル判別回路61で所定の輝度レベルTHP以下の画素と判別された画素が占める割合を、低輝度画素割合RLYとして算出する。
 画素割合算出回路62の詳細な動作を、図7(a)~(c)を参照して説明する。
 図7(a)~(c)は例えば、注目画素を中心とした水平方向33画素、垂直方向33画素の矩形の領域で構成される周辺画素ブロックが、図6の低輝度領域LPAと非低輝度領域HPAの境界部分に位置するものである場合を示す。ここで、低輝度領域LPAが低輝度の画素のみから成り、非低輝度領域HPAが非低輝度の画素のみから成るものと仮定している。
 図7(a)に示す周辺画素ブロックは、1089画素の内、218画素が低輝度画素であり、低輝度画素割合RLYは約20%である。
 図7(b)に示す周辺画素ブロックは、1089画素の内、545画素が低輝度画素であり、低輝度画素割合RLYは約50%である。
 図7(c)に示す周辺画素ブロックは、1089画素の内、871画素が低輝度画素であり、低輝度画素割合RLYは約80%である。
 実際の回路では百分率ではなく、カウントした低輝度画素の数をそのまま低輝度画素割合を表す指標として用いても良い。
 画素割合算出回路62は、低輝度画素割合(を示すデータ)RLYを補正対象画素指定回路63及び混合比生成回路65へ供給する。
 補正対象画素指定回路63は、画素割合算出回路62から出力される、
上記低輝度画素割合RLYが所定の閾値THRL以下の画素を補正対象画素であると判断し、判断結果を示す補正対象識別信号CMPを出力する。つまり、補正対象画素指定回路63は、各画素についての低輝度画素割合RLYが所定の閾値以下THRLである場合に、当該画素が補正対象領域内の画素であると判断し、判断結果を示す信号を、補正対象識別信号CMPとして出力する。
 補正対象画素の集合により補正対象領域HYAが構成され、補正対象画素以外の画素の集合により非補正対象領域LYAが構成される。
 上記の閾値THRLは例えば50パーセントに定められる。
 閾値THRLを50%に定めた場合、補正対象領域HYA及び非補正対象領域LYAは、それぞれ非低輝度領域HPA及び低輝度領域LPAと一致する。このことを示すため、図6には、符号HYA(THRL=50)を符号HPAに併記し、LYA(THRL=50)を符号LPAに併記している。
 閾値THRLを50%よりも小さい値に定めた場合、補正対象領域HYAは、図6に符号HYA(THRL<50)で示すように、非低輝度領域HPAよりも狭くなる。
 閾値THRLを50%よりも大きな値に定めた場合、補正対象領域HYAは、図6に符号HYA(THRL>50)で示すように、非低輝度領域HPAよりも広くなる。
 補正対象識別信号CMPは、輝度最小値検出回路12、及び黒画素カウント回路13へ供給される。
 混合比生成回路65は、画素割合算出回路62から出力される、低輝度画素割合RLYを所定の特性で変換し、混合比KMIXを求める。つまり、混合比生成回路65は、画素割合算出回路62で算出された低輝度画素割合RLYを所定の特性で変換して、混合比KMIXを生成する。
 例えば図4に示す入力画像のA-A’ライン上の画素についての低輝度画素割合RLYを示すと、図8のように、各画素の周辺画素ブロックが非低輝度領域HPA(非低輝度画素のみから成ると仮定している)内の画素のみから成る場合には0%、各画素の周辺画素ブロックが低輝度領域LPA(低輝度画素のみから成ると仮定している)内の画素のみから成る場合には100%、各画素の周辺画素ブロックが非低輝度領域HPA内の画素と、低輝度領域LPA内の画素から成る場合には、非低輝度領域HPAと低輝度領域LPAの面積割合に応じて0%から100%へ変化する。
 つまり、混合比生成回路65は、低輝度画素割合RLYが所定の上限値以上のときは混合比KMIXが100%となり、低輝度画素割合RLYが0%から上限値までの範囲では、低輝度画素割合RLYの増加にともなって混合比KMIXが0%から100%まで直線的に増加する変換特性を有する。
 また、混合比生成回路65は、低輝度画素割合RLYが所定の下限値以下のときは混合比KMIXが0%となり、低輝度画素割合RLYが下限値から100%までの範囲では、低輝度画素割合RLYの増加にともなって混合比KMIXが0%から100%まで直線的に増加する変換特性を有する。
 混合比生成回路65の一構成例の動作を、図9及び図10(a)~(c)を参照して説明する。
 図9は、この例の混合比生成回路65の入出力特性(変換特性)を示す。図9に示す変換特性では、低輝度画素割合RLYが所定の上限値THU以上のときは混合比KMIXが100%となり、低輝度画素割合RLYが0%から上限値THUまでの範囲では、低輝度割合RLYの増加にともなって混合比KMIXが0%から100%まで直線的に増加する。
 図10(a)~(c)は、混合比生成回路65が図9の入出力特性を有する場合の、図4に示す入力画像のA-A’ライン上の画素に対する低輝度割合RLYから混合比KMIXへの変換の過程を示す。
 図10(a)は、図8と同様の、画素割合算出回路62から入力される低輝度画素割合RLYである。
 混合比生成回路65では、画素割合算出回路62から入力された低輝度画素割合RLYを所定の上限値THUと比較して、図9の点線RLYa及び図10(b)のように上限値THUを超える部分をクリップして、すべて100%に置き換える。さらに、図9の実線KMIX及び図10(c)のように0%から上限値THUまでを、0%から100%となるように拡大する。即ち、上限値THU以下の部分も(100%/THU)を係数として拡大することで、対応する混合比KMIXを得る。
 従って、RLYからKMIXへの変換は以下の式で表される。
 RLY>THUのときは
 KMIX=100%
 RLY≦THUのときは、
 KMIX=RLY×(100%/THU)
 なお、クリップによって割合変化が連続的でなくなる部分は、周辺の混合比を平均するなどの処理によって、割合変化が連続的となるように、さらなる変換(調整)をしても良い。
 混合比生成回路65の他の構成例の動作を、図11及び図12(a)~(c)を参照して説明する。
 図11は、この例の混合比生成回路65の入出力特性(変換特性)を示す。図11に示す変換特性では、低輝度画素割合RLYが所定の下限値THL以下のときは混合比KMIXが0%となり、低輝度画素割合RLYが下限値THLから100%までの範囲では、低輝度割合RLYの増加にともなって混合比KMIXが0%から100%まで直線的に増加する。
 図12(a)~(c)は、混合比生成回路65が図11の入出力特性を有する場合の、図4に示す入力画像のA-A’ライン上の画素に対する低輝度割合RLYから混合比KMIXへの変換の過程を示す。
 図12(a)は、図8と同様の、画素割合算出回路62から入力される低輝度画素割合RLYである。
 混合比生成回路65では、画素割合算出回路62から入力された低輝度画素割合RLYを所定の下限値THLと比較して、図11の点線RLYb及び図12(b)のように下限値THL未満の部分をクリップして、すべて0%に置き換える。さらに、図11の実線KMIX及び図12(c)のように下限値THLから100%までを0%から100%までに拡大する。即ち、下限値THL以上の部分の、100%からの差を、(100%/(100%-THL))を係数として拡大することで、対応する混合比KMIXを得る。
 従って、RLYからKMIXへの変換は以下の式で表される。
 RLY<THLのときは
 KMIX=0%
 RLY≧THLのときは、
 KMIX=100%-(100%-RLY)×(100%/(100%-THL))
     =100%(RLY-THL)/(100%-THL)
 なお、クリップによって割合変化が連続的でなくなる部分は、周辺の混合比を平均するなどの処理によって、割合変化が連続的となるように、さらなる変換(調整)をしても良い。
 図9に示すように、混合比生成回路65において、低輝度画素割合RLYが上限値THU以上のときは、混合比KMIXを100%にし、低輝度画素割合RLYが上限値THU未満のときは、低輝度画素割合(100/THU)を係数として、低輝度画素割合に掛けた値を混合比KMIXとすることで、低輝度割合が100%に近い画像部分(図9で上限値THUよりも右側の範囲)では、補正画像信号Yaを混合することなく、入力画像自体をそのまま出力画像とすることができる。
 図11に示すように、混合比生成回路65において、低輝度画素割合RLYが下限値THL以下のときは、混合比KMIXを0%にし、低輝度画素割合RLYが下限値THLよりも大きいときは、下限値THLよりも大きい低輝度画素割合RLYの値の100%からの差を、(100%/(100%-THL))を係数として拡大したものを混合比KMIXと定めることで、低輝度割合が0%に近い画像部分(図11でTHLよりも左側の範囲)では、入力画像信号Yiを混合することなく、補正画像自体をそのまま出力画像とすることができる。
 上記の図9~図12(c)を参照して説明した構成例において上限値THUを上側クリップ値とする例と、下限値THLを下側クリップ値とする例を説明したが、上限値及び下限値THU、THLの双方を有し、それぞれを上側クリップ値、下側クリップ値とし、クリップ後にデータを0%から100%に拡大するものであっても良い。
 この場合の低輝度割合RLYと混合比KMIXの関係は図13に示す如くとなる。
 なお、混合比生成回路65としては、入力された画素割合RLYをそのまま混合比KMIXとして出力するものであっても良い。
 変換により得られる混合比(を示すデータ)KMIXは、混合回路6に供給される。
 以上のように、注目画素を中心とした所定の周辺画素範囲の中に所定の閾値THP以下の画素と判別された画素(低輝度画素)が占める割合が所定の閾値THRLよりも大きい画素のみを補正対象から除外し、周辺画素範囲内において低輝度画素が占める割合RLYが所定の閾値THRL以下の画素を補正対象とする構成とすることで、低輝度画素がまとまった領域だけを補正対象から除き、非低輝度画素がまとまった領域だけを補正対象とすることができる。従って、非低輝度画素がまとまった領域中の低輝度画素を無視することなく、逆に低輝度画素がまとまった領域中の非低輝度画素の影響を受けることなく、オフセット及びゲインを決定することができ、コントラストの改善を適切に行うことができる。
 また、各画素について、その周辺の画素の輝度を考慮した低輝度画素割合RLYに基づいて、補正画像信号Yaと、入力画像信号Yiとの混合比KMIXを変えるようにしたので、補正対象領域と低輝度領域の境界部においても、入力画像に対する補正量が急激に変わるのを避けることができ、違和感のない出力画像を得ることができる。
 図2に示されるオフセットレベル生成回路10の周辺領域輝度平均回路11は、入力画像の輝度信号Yiを受け、各画素を順に注目画素として、その周辺領域輝度平均値Yavgを画素ごとに算出する。即ち、周辺領域輝度平均回路11は、注目画素P0の周辺領域NA内の画素の輝度信号値の平均値を算出して、注目画素P0の周辺領域輝度平均値Yavgとして出力する。
 つまり、周辺領域輝度平均回路11は、画像信号の各画素を注目画素として、該注目画素の周辺画素平均値を画素毎に算出する。ここで、画像信号は、輝度信号Yiである。また、周辺画素平均値は、周辺領域輝度平均値Yavgである。
 例えば、図14に示すように、注目画素P0を中心とし、水平方向5画素、垂直方向5画素の矩形の領域を周辺領域NAとし、該周辺領域NAに含まれる25画素の輝度信号値の平均値を、注目画素P0の周辺領域輝度平均値Yavgとして算出する。
 周辺領域輝度平均回路11で周辺領域輝度平均を求める際に使用する周辺領域の画素数は必ずしも水平方向5画素×垂直方向5画素に限定されるものではなく、入力画像の輝度信号のS/Nレベルや本画像処理装置を実装するハードウェア等のメモリリソース等に応じて、領域の大きさを定めればよい。領域を大きく設けることにより、輝度信号に含まれるノイズ成分の影響を小さくすることが出来るが、領域を大きくし過ぎると、算出する周辺領域輝度平均値Yavgに占める注目画素の輝度の重みが小さくなり、画像の鮮鋭さが失われる。
 周辺領域輝度平均回路11から出力される周辺領域輝度平均値Yavgは輝度最小値検出回路12及び黒画素カウント回路13に供給される。
 輝度最小値検出回路12は、周辺領域輝度平均回路11により生成される画素ごとの周辺領域輝度平均値Yavgの、補正対象領域HYA内における最小値を、輝度最小値Yminとして出力する。ここで、周辺領域輝度平均値Yavgが補正対象領域HYA内の画素についてのものであるかどうかは、補正対象識別信号CMPに基づいて判断される。
 つまり、輝度最小値検出回路12は、入力画像の画素毎に求められた周辺画素平均値のうち、領域判定回路60で補正対象であると判定された画素から成る補正対象領域HYA内における最小値を検出する。ここで、周辺画素平均値は、周辺領域輝度平均値Yavgである。また、最小値は、輝度最小値Yminである。
 輝度最小値Yminは、オフセットレベル算出回路15へ供給される。
 黒画素カウント回路13は、周辺領域輝度平均回路11により生成される画素ごとの周辺領域輝度平均値Yavgを所定の閾値BmAxと比較し、補正対象画素のうちの、上記の比較の結果閾値BmAx以下であると判定された画素の数をカウントし、カウント結果を黒画素数NumBとして算出する。各画素が補正対象画素であるか否かは、補正対象識別信号CMPに基づいて判断される。
 つまり、黒画素カウント回路13は、画面ごとに周辺画素平均値が所定レベル以下となる黒レベル画素を数える。ここで、周辺画素平均値は、周辺領域輝度平均値Yavgである。また、所定レベルは、閾値BmAxである。黒レベル画素を数えた結果は、黒画素数NumBである。
 閾値BmAxは、画面内で黒として表示される階調範囲の上限以上の値に設定される。
 オフセット係数算出回路14は、黒画素カウント回路13から出力される黒画素数NumBに応じたオフセット係数KBを画面毎に算出する。
 つまり、オフセット係数算出回路14は、黒レベル画素数に基づいてオフセット係数KBを生成する。ここで、黒レベル画素数は、黒画素数NumBである。
 黒画素数NumBと、これに応じて算出されるオフセット係数KBの関係の一例を図15に示す。
 図15に示される例では、オフセット係数KBは、黒画素数NumBが所定値NumTPまでは1、それよりも大きい範囲では、1より小さくなるように、かつ黒画素数NumBの増加に伴いオフセット係数KBが次第に小さくなるように定められている。
 オフセット係数KBは、オフセットレベル算出回路15へ入力される。
 このように、黒画素数NumBが多い画像では、オフセット係数KBを小さくすることで、後述するようにオフセットレベルOffsetを小さくしている。これは霧の影響が大きい画像の多くは、輝度信号分布が高輝度側に偏っており、黒画素数NumBが多くなることは少ないが、霧の影響が小さい画像では、黒画素数NumBが多くなることがあり、そのような画像に対しては、輝度信号分布を広げる階調補正を行う必要がないためである。上記構成とすることにより、霧などを含まない画像に対して、輝度信号分布を広げ過ぎる過度の階調補正を抑制できる効果が得られる。
 オフセットレベル算出回路15は、輝度最小値検出回路12から画面毎に出力される輝度最小値Yminと、オフセット係数算出回路14から画面毎に出力されるオフセット係数KBと、所定の閾値LIMofstから、オフセットレベルOffsetを算出する。
 つまり、オフセットレベル算出回路15は、最小値とオフセット係数KBに基づいてオフセットレベルOffsetを算出する。ここで、最小値は、輝度最小値Yminである。
 このオフセットレベルOffsetの算出においては、最初に目標オフセットレベルOffset_tgtを求め、次にこの目標オフセットレベルに基づいてオフセットレベルOffsetを求める。
 目標オフセットレベルOffset_tgtは、式(2A)もしくは式(2B)に従い、画面ごとに算出される。
 所定の閾値LIMofstは、輝度信号分布が高輝度側に偏っている場合に、輝度信号分布を広げることによる疑似輪郭の発生を抑制するために設定されるものであり、以下のように、Offset_tgtはLIMofst以下に制限される。
 Ymin×KB<LIMofstの場合
 Offset_tgt=Ymin×KB …(2A)
 Ymin×KB≧LIMofstの場合
 Offset_tgt=LIMofst …(2B)
 目標オフセットレベルOffset_tgtは画面単位で算出される値であり、画面単位での変動の激しいことが想定される。その変動による影響を軽減するために指数平滑係数値Kofst(0以上1以下の値)を用いて、式(3)で表される指数平滑処理を行う。式(3)において、Offset_tgt(t)は、ある画面について算出された目標オフセットレベルであり、Offset_tgt(t-1)は、Offset_tgt(t)の1画面前に算出された目標オフセットレベルである。
 Offset
=Kofst×Offset_tgt(t)
 +(1-Kofst)×Offset_tgt(t-1) …(3)
 算出されたオフセットレベルOffsetはオフセット減算回路1へ入力される。
 上記の構成とすることにより、入力画像の目標オフセットレベルが画面単位で激しく変動した場合にも、補正後の画像の輝度信号のレベル変動を抑制することができる効果が得られる。
 なお、目標オフセットレベルOffset_tgtの変動が激しくないような環境においては、オフセットレベルOffsetの算出に指数平滑処理を用いず、下記の式(4)で示すように、目標オフセットレベルOffset_tgtをそのままオフセットレベルOffsetとして出力する構成としても良い。
 Offset=Offset_tgt …(4)
 オフセット減算回路1は、下記の式(5)で示すように、オフセットレベル算出回路15から画面毎に出力されるオフセットレベルOffsetを入力画像の輝度信号Yiから減算し、オフセット後の輝度信号Yofstを算出する。
 Yofst=Yi-Offset …(5)
 オフセット後の輝度信号Yofstは白補正ゲイン輝度乗算回路3へ入力される。
 オフセットレベルOffsetを、入力画像中の、補正対象画素の各々についての周辺領域輝度平均値Yavgから算出される輝度最小値Yminと、入力画像の黒画素数NumBに基づき算出されるオフセット係数KBを乗算することで算出しているので、黒つぶれ画素を発生させることなく、輝度信号分布を広げる階調補正を行うことが可能である。
 白補正ゲイン算出回路30は、オフセットレベル生成回路10から画面毎に出力されるオフセットレベルOffsetと輝度信号の階調の最大値Yfc以下の目標上限値Wtgtから式(6)もしくは式(7)に従い白補正ゲイン値WGainを算出する。目標上限値Wtgtは、画面内で白として表示される階調範囲の最大輝度レベルを設定する。
 Offset<Wtgt-1の場合、
 WGain=Wtgt/(Wtgt-Offset) …(6)
 Offset≧Wtgt-1の場合、
 WGain=Wtgt …(7)
 白補正ゲイン輝度乗算回路3は、白補正ゲイン算出回路30から出力される白補正ゲイン値WGainとオフセット減算回路1から出力される輝度信号Yofstとを下記の式(8)で示すように乗算し、輝度信号Ywを算出する。
 Yw=WGain×Yofst …(8)
 補正後の輝度信号Ywが入力画像の輝度信号Yiの階調の最大値Yfcを超えないように白補正ゲイン値WGainを生成しているので、白補正ゲイン値WGainが乗算された輝度信号Ywと色差信号Cbi,Criから構成される補正画像において、白飛びする画素が増加しない効果がある。
 入力画像の輝度信号Yiの分布と、オフセット減算回路1が出力する輝度信号Yofstの分布と、白補正ゲイン輝度乗算回路3が出力する輝度信号Ywの分布の一例を図16(a)~(c)に示す。
 図16(a)の輝度信号Yiの分布をそのままオフセットレベルOffsetの分、左方向にずらしたものが図16(b)の輝度信号Yofstの分布となる。図16(a)に示す輝度信号Yiと図16(b)に示す輝度信号Yofstの分布位置は異なるが、その分布形状は同じである。
 図16(b)の輝度信号Yofstの分布を、その左端を固定して横方向に拡大したものが図16(c)の輝度信号Ywの分布となる。図16(c)に示す輝度信号Ywと図16(a)に示す輝度信号Yiは分布位置と分布形状がともに異なる。
 オフセット減算回路1と白補正ゲイン輝度乗算回路3の効果により、図16(c)に示す輝度信号Ywの分布は輝度信号Yiの分布よりも広くなり、霧、霞、雨天などで撮影した画像のコントラストは改善される。しかし、図16(c)に示す輝度信号Ywの分布の平均値は、図16(a)に示す輝度信号Yiの分布の平均値よりも低くなり、輝度信号Ywと色差信号Cbi、Criから構成される画像は、入力画像よりも暗い画像となる。
 以下に述べるように、平均輝度補正ゲイン輝度乗算回路4及び平均輝度補正ゲイン生成回路40は、この点を改善するために設けられたものである。
 図3に示される平均輝度補正ゲイン生成回路40の補正前平均輝度値算出回路41は、入力画像の輝度信号Yiから、画面全体の平均輝度値APLpreを算出する。つまり、補正前平均輝度値算出回路41は、入力画像信号の平均輝度値を生成する。ここで、入力画像信号は、入力画像の輝度信号Yiである。この平均輝度値APLpreは、入力画像の画面の全画素の輝度Yiの総和を上記全画素の数で除算することで得られる。平均輝度値APLpreは、目標平均輝度値算出回路47へ入力される。
 補正後平均輝度値算出回路42は、平均輝度補正ゲイン輝度乗算回路4から出力される輝度信号Ywaの画面全体の補正後平均輝度値APLpostを算出する。つまり、補正後平均輝度値算出回路42は、補正画像信号の平均輝度値を生成する。ここで、補正画像信号は、輝度信号Ywaである。この補正後平均輝度値APLpostは、補正後の画像の画面の全画素の輝度値Ywaの総和を上記全画素の数で除算することで得られる。
 平均輝度値APLpostは、平均輝度補正ゲイン算出回路48へ入力される。
 原色信号画素代表値生成回路43は、平均輝度補正ゲイン輝度乗算回路4から出力される輝度信号Ywaと入力画像の色差信号Cbi,Criからマトリクス演算により、画素ごとの原色信号R、原色信号G及び原色信号Bを算出する。つまり、原色信号画素代表値生成回路43は、補正画像信号及び入力画像の色差信号を三原色信号に変換し、その画素毎の最大値を生成する。ここで、補正画像信号は、輝度信号Ywaである。
 マトリクス演算は、出力画像の表示系に対応した色マトリクス変換式に基づいて、例えば下記の式(9)により行われる。Bを生成する。
 R= +1.00×Ywa+0.00×Cbi+1.40×Cri
 G= +1.00×Ywa-0.34×Cbi-0.71×Cri
 B= +1.00×Ywa+1.77×Cbi+0.00×Cri
                          …(9)
 なお、上記の式(9)はNTSC規格の色マトリクス変換式であるが、出力画像の表示系に合わせて、例えばsRGB規格などの色マトリクス変換式を用いてもよい。
 原色信号画素代表値生成回路43は、上記の計算で求められた原色信号R、G及びBの画素毎の最大値MAX(R,G,B)を求め、該最大値を画素代表値M_POSTとして出力する。
 画素代表値M_POSTは、色飽和画素カウント回路44と色飽和量平均値算出回路45へ入力される。
 色飽和画素カウント回路44は、原色信号画素代表値生成回路43から出力される画素代表値M_POSTと所定の閾値SATminとを大小比較し、画素代表値M_POSTが所定の閾値SATmin以上である画素の数をカウントし、画面毎のカウント結果を、色飽和画素数SATnumとして算出する。つまり、色飽和画素カウント回路44は、画面ごとに最大値M_POSTが所定レベル以上となる色飽和画素数SATnumを数える。
 所定の閾値SATminは、画像を表示する際に色飽和が発生しないようマージンも考慮して設定する。
 カウント結果としての色飽和画素数SATnumは、色飽和量平均値算出回路45へ入力される。
 色飽和量平均値算出回路45は、原色信号画素代表値生成回路43から出力される画素代表値M_POSTと、色飽和画素カウント回路44から出力される色飽和画素数SATnumと、所定の閾値SATminから、式(10)に従い、色飽和量差分絶対値和SATsubを算出し、次いで、式(11)に従い、色飽和量平均値SATavgを算出する。
 SATsub = Σ(M_POST-SATmin) …(10)
 SATavg = SATsub/SATnum …(11)
 式(10)のSATsubは、SATmin≦M_POSTを満たすすべてのM_POSTについてのM_POST-SATminの総和(SATnum個のM_POST-SATminの総和)を表す。
 算出された色飽和量平均値SATavgは平均輝度値補正量算出回路46へ入力される。
 平均輝度値補正量算出回路46は、色飽和画素カウント回路44から出力される色飽和画素数SATnumと色飽和量平均値算出回路45から出力される色飽和量平均値SATavgと画面画素数NMAXと、平均輝度値補正量に対する強度係数SATstrから式(12)に従い、色飽和補正レベルSATADJを算出する。色飽和補正レベルSATADJは、平均輝度値補正量として用いられる。
 SATADJ=SATavg×(SATnum/NMAX)×SATstr …(12)
 式(11)の右辺における(SATnum/NMAX)は色飽和が発生している面積の割合に相当する。
 色飽和量平均値算出回路45と平均輝度値補正量算出回路46において、それぞれ、色飽和量平均値SATavgと色飽和画素数SATnumとを算出し、次いで、色飽和補正レベルSATADJを算出する構成としたが、式(10)より算出されるSATsubから式(13)に従い、直接色飽和補正レベルSATADJを算出する構成としても良い。
 SATADJ=(SATsub/NMAX)×SATstr …(13)
 式(13)は、式(12)のSATavgに式(11)を代入することで以下のように導かれる。
 SATADJ
 =SATavg×(SATnum/NMAX)×SATstr
 =(SATsub/SATnum)×(SATnum/NMAX)×SATstr
 =(SATsub/NMAX)×SATstr
 式(13)に従って、色飽和補正レベルSATADJを求める構成とすることにより、色飽和量平均値SATavgの算出における色飽和画素数SATnumによる除算と、色飽和補正レベルSATADJの算出における色飽和画素尾数SATnumによる乗算を省略しても、同様に色飽和補正レベルSATADJが得られる。除算器と乗算器を減らすことにより、回路規模を削減できる効果がある。
 色飽和量平均値算出回路45と平均輝度値補正量算出回路46とで、色飽和画素数SATnumと最大値M_POSTに基づいて色飽和補正レベルSATADJを生成する色飽和補正レベル生成回路51が構成されている。
 目標平均輝度値算出回路47は、補正前平均輝度値算出回路41から出力される入力画像の平均輝度値APLpreと、平均輝度値補正量算出回路46から出力される色飽和補正レベルSATADJと、補正前後で平均輝度値に所望のレベル差を与えるための調整値APLADJから、式(14A)又は(14B)に従い目標平均輝度値APL_TGTを算出する。つまり、目標平均輝度値算出回路47は、入力画像信号の平均輝度値APLpreと、補正画像信号の色飽和補正レベルSATADJに基づいて目標画像レベルを生成する。ここで、目標画像レベルは、目標平均輝度値APL_TGTである。
 APLpre>SATADJのときは、
 APL_TGT=APLpre+APLADJ-SATADJ …(14A)
 APLpre>SATADJのときは、
 APL_TGT=APLpre-APLADJ-SATADJ …(14B)
 調整値APLADJは、補正前後で平均輝度値に所望のレベル差を与えるためのものであり、予め設定される。なお、調整値APLADJを外部から変更可能としても良い。
 目標平均輝度値APL_TGTは、平均輝度補正ゲイン算出回路48へ入力される。
 目標平均輝度値APL_TGTの算出式に、調整値APLADJの項を加算又は減算する構成としたので、補正前後で平均輝度値に所望のレベル差を与えることができる効果がある。入力画像が明る過ぎたり、暗過ぎたりする場合に調整値APLADJを使って目標平均輝度値APL_TGTの変更を速めることができる。
 平均輝度補正ゲイン算出回路48は、目標平均輝度値算出回路47から出力される目標平均輝度値APL_TGTと、補正後平均輝度値算出回路42から出力される補正画像の平均輝度値APLpostから、平均輝度補正ゲインAPLGainを算出する。
 つまり、平均輝度補正ゲイン算出回路48は、目標画像レベルに補正画像信号の平均輝度値が近づくように平均輝度補正ゲインAPLGainを生成する。ここで、目標画像レベルは、目標平均輝度値APL_TGTである。また、平均輝度値は、平均輝度値APLpostである。
 この平均輝度補正ゲインAPLGainの算出においては、まず、目標平均輝度補正ゲインAPLGain_tgtを算出し、目標平均輝度補正ゲインAPLGain_tgtに基づいて平均輝度補正ゲインAPLGainを算出する。
 目標平均輝度補正ゲインAPLGain_tgtの算出は、目標平均輝度値APL_TGTと、出力画像の平均輝度値APLpostとに基づいて、以下のように行われる。まず、APLpostがAPLGainと同じであれば、前フレームのAPLGain_tgt(t-1)をそのまま現フレームのAPLGain_tgt(t)として用いる。APLpostがAPLGainと同じでなければ、下記の式(15)によりAPLGain_tgtを求め、現フレームのAPLGain_tgt(t)として用いる。
 APLGain_tgt=APL_TGT/APLpost …(15)
 目標平均輝度補正ゲインAPLGain_tgtは画面単位で算出される値であり、画面単位での変動が想定される。その変動による影響を軽減するために指数平滑係数値KApl(0以上1以下の値)を用いて、式(16)で表される指数平滑化処理を行う。式(16)において、APLGain_tgt(t)は、ある画面について算出された目標平均輝度補正ゲインであり、Offset_tgt(t-1)は、Offset_tgt(t)の1画面前に算出された目標平均輝度補正ゲインである。
 APLGain
=KApl×APLGain_tgt(t)
 +(1-KApl)×APLGain_tgt(t-1) …(16)
 算出された平均輝度補正ゲインAPLGainは平均輝度補正ゲイン輝度乗算回路4へ入力される。
 上記の構成とすることにより、入力画像の平均輝度値が画面単位で激しく変動した場合にも、補正後の画像の平均輝度値のレベル変動を抑制することができる効果が得られる。
 なお、目標平均輝度補正ゲインAPLGain_tgtの変動が激しくないような環境においては、平均輝度補正ゲインAPLGainの算出に指数平滑処理を用いず、下記の式(17)で示すように、目標平均輝度補正ゲインAPLGainをそのまま平均輝度補正ゲインとして出力する構成としても良い。
 APLGain=APLGain_tgt …(17)
 目標平均輝度値算出回路47と平均輝度補正ゲイン算出回路48とで、補正画像信号の平均輝度値APLpreと補正画像信号の色飽和補正レベルSATADJに基づいて平均輝度補正ゲインAPLGainを決定する平均輝度補正ゲイン決定回路52が構成されている。つまり、平均輝度補正ゲイン決定回路52は、補正画像信号の平均輝度値APLpreと補正画像信号の色飽和補正レベルSATADJに基づいて平均輝度補正ゲインAPLGainを決定する。
 平均輝度補正ゲイン輝度乗算回路4は、平均輝度補正ゲイン算出回路48から出力される平均輝度補正ゲインAPLGainを、白補正ゲイン輝度乗算回路3から出力される輝度信号Ywに乗算し、補正後輝度信号Ywaを算出する。この乗算は下記の式(18)で表される。
 Ywa=APLGain×Yw …(18)
 入力画像の輝度信号分布が高輝度側に偏っていない画像の場合、色飽和補正レベルSATADJは0となることが多く、さらに、調整値APLADJが0である場合には、目標平均輝度補正ゲインAPLGain_tgtは、補正前平均輝度値APLpreと補正後平均輝度値APLpostの比となるために、補正後平均輝度は補正前平均輝度に近づく(従って、補正後平均輝度が目標画像レベルAPL_TGTに近づくこととなり、補正前後での画像の明るさが変動しない効果がある)。
 輝度飽和処理回路5は、平均輝度補正ゲイン輝度乗算回路4が出力する輝度信号Ywaに対する飽和処理を行い、補正後の輝度信号Yaを算出する。この飽和処理においては、輝度信号Ywaの階調値として最大値Yfcを超えるものが算出されたときに、該階調値が最大値Yfcに制限される。
 混合回路6は、入力画像の輝度信号Yiと、輝度飽和処理回路5から出力される輝度信号Yaを、混合比生成回路65から出力される混合比KMIXに基づいて上記の式(1)で表されるように混合し、出力輝度信号Yoを出力する。
 混合比KMIXは、上記のように、低輝度画素割合RLYに応じて定められるものである。混合比KMIXの値が大きいほど、輝度信号Yiの混合割合を多くし、混合比KMIXの値が小さいほど、輝度信号Yaの混合割合を多くする。
 例えば図4の入力画像を処理した出力画像例を図17に示す。図4の霧に覆われた家屋を窓枠越しに撮像した画像は、図17のように低輝度領域LPAは、黒潰れすることなくそのまま表示され、非低輝度領域HPAにおける家屋のコントラストがはっきりしコントラストが改善される。
 低輝度の画像領域を判別して、低輝度の画像領域を除く画像領域に対してコントラスト補正するように構成したので、霧に覆われた被写体の前景に配置された窓枠などの被写体が写る低輝度の画像領域部分を黒潰れさせることなく、霧などによって輝度信号分布が狭くなった画像領域のコントラストを改善する効果がある。
 ここで、平均輝度値補正量算出回路46を設けることによる効果について説明する。
 仮に、平均輝度値補正量算出回路46を設けない場合には以下の問題が生じる。
 平均輝度値補正量算出回路46を設けない場合における、入力画像の輝度信号Yiの分布と、平均輝度補正ゲイン輝度乗算回路4から出力される輝度信号Ywa’の分布を図18に示す。平均輝度補正ゲイン算出回路48は、入力画像の輝度信号Yiの平均輝度値APLpreと、輝度信号Ywa’の平均輝度値APLpostが等しくなるように平均輝度補正ゲインAPLGainを算出するために、輝度信号Ywa’の分布は輝度信号の階調の最大値Yfcに近づくこととなり、白飛びする画素が増加する。
 また、輝度信号Ywa’と色差信号Cbi,Criからマトリクス演算により得られる原色信号R,G,Bが階調の最大値となる画素が増加することとなり、色相が変化する画像が増加することとなる。例えば、NTSC規格では原色信号R,Bは輝度信号Ywa’と色差信号Cbi,Criから下記の式(19)及び式(20)により算出されるため、輝度信号Ywa’が階調の最大値Yfcに達していなくても、色差信号Cbi,Criが正となるような画素では、原色信号R,Bが階調の最大値となって色飽和が発生し、色相が変化する。
 R= +1.00×Ywa’+0.00×Cbi+1.40×Cri …(19)
 B= +1.00×Ywa’+1.77×Cbi+0.00×Cri …(20)
 一方、平均輝度値補正量算出回路46を設ける場合の入力画像の輝度信号Yiの分布と、平均輝度補正ゲイン輝度乗算回路4から出力される輝度信号Ywaの分布の模式図を図19に示す。平均輝度補正ゲイン算出回路48は、入力画像の輝度信号Yiの平均輝度値APLpreから色飽和補正レベルSATADJを減算した値と、輝度信号Ywaの平均輝度値APLpostの比から平均輝度補正ゲインAPLGainを算出するために、輝度信号Ywaの分布は、図18に示した平均輝度値補正量算出回路46が設けられていない場合に平均輝度補正ゲイン輝度乗算回路4から出力される輝度信号Ywa’ほど、輝度信号の階調の最大値Yfcには偏らないこととなる。その結果、白飛びする画素の増加が抑制され、また、輝度信号Ywaと色差信号Cbi,Criからマトリクス演算により得られる原色信号R,G,Bが階調の最大値Yfcとなる画素の増加も抑制され、色相が変化する画素の増加を抑制することが可能となる。
 なお、上記の実施の形態では、輝度最小値検出回路12において、周辺領域輝度平均値Yavgの、画面全体における最小値を輝度最小値Yminとする代わりに、入力画像の一部を切り出して出力する画像処理装置においては、入力画像の画面全体ではなく、切り出して出力する画像の範囲内における最小値を、輝度最小値Yminとして出力する構成としても良い。
 黒画素カウント回路13、補正前平均輝度値算出回路41、補正後平均輝度値算出回路42、色飽和画素カウント回路44、及び平均輝度値補正量算出回路46についても同様である。
 なお、実施の形態1の構成では、各画面(フレーム)についての入力画像の輝度信号Yi及び補正画像Ywaに基づくオフセットレベル生成回路10、白補正ゲイン算出回路30、及び平均輝度補正ゲイン生成回路40によるオフセットレベルOffset、白補正ゲインWGain、及び平均輝度補正ゲインAPLGainの生成が、当該画面についての入力画像の輝度信号Yiの入力が終わった時点で生成されるので、生成されたオフセットレベルOffset、白補正ゲインWGain、及び平均輝度補正ゲインAPLGainは、次の画面(フレーム)の輝度信号Yiに対する補正に用いられることになるが、相前後する画面間で画像の内容に大きな変化がなければ、そのようにしても大きな問題はない。
 各画面(フレーム)についての入力画像の輝度信号Yi、及び補正画像Ywaに基づいて生成されたオフセットレベルOffset、白補正ゲインWGain、及び平均輝度補正ゲインAPLGainを、同じ画面の画面(フレーム)の輝度信号に対する補正に用いるためには、図1のオフセット減算回路1の前段に輝度信号Yiを1画面(フレーム)期間の遅延させるための回路(記憶回路)を挿入すれば良い。
実施の形態2.
 図20は本発明の実施の形態2に係る画像処理装置を示す。
 図20に示される画像処理装置は、図1に示される実施の形態1の画像処理装置と概して同じであるが、ゲイン乗算回路2が、白補正ゲイン色差乗算回路7及び平均輝度補正ゲイン色差乗算回路8をさらに含み、さらに色差飽和処理回路9が付加されており、色差信号に対する階調補正を行う点で実施の形態1と異なる。
 以下、実施の形態1と異なる部分について説明する。
 白補正ゲイン色差乗算回路7は、白補正ゲイン算出回路30から出力される白補正ゲイン値WGainと入力画像の色差信号Cbi,Criを乗算し、色差信号Cbw,Crwを算出する。色差信号Cbw,Crwは、平均輝度補正ゲイン色差乗算回路8へ入力される。
 平均輝度補正ゲイン色差乗算回路8は、白補正ゲイン色差乗算回路7から出力される色差信号Cbw,Crwに、平均輝度補正ゲイン生成回路40の平均輝度補正ゲイン算出回路48から出力される平均輝度補正ゲインAPLGainを乗算し、色差信号Cbwa,Crwaを算出する。色差信号Cbwa,Crwaは平均輝度補正ゲイン生成回路40の原色信号画素代表値生成回路43と色差飽和処理回路9へ入力される。
 色差飽和処理回路9は、平均輝度補正ゲイン色差乗算回路8が出力する色差信号Cbwa,Crwaに対する飽和処理を行い、補正後の色差信号Cbo,Croを算出する。
 このように、色差信号に対する階調補正を行うことで、霧、霞、雨天などにより彩度が低下した画像に対して、輝度信号の階調補正だけでなく、彩度向上が可能となる。また、色飽和量を算出し、その色飽和量により、輝度信号及び色差信号に対するゲイン値を補正するようにしているため、色差信号に対する階調補正を行っても、色相が変化する画素の増加を抑制することが可能である。
 実施の形態1の平均輝度補正ゲイン生成回路40が、入力画像の色差信号Cbi、Criに基づいて平均輝度補正ゲインを生成するのに対して、実施の形態2の平均輝度補正ゲイン生成回路40は、補正後の画像の色差信号Cbo、Croに基づいて平均輝度補正ゲインを生成するが、その処理内容は同じである。
 実施の形態2でも、実施の形態1について述べたのと同様に、入力画像の輝度信号Yi及び色差信号Cbi、Criをそれぞれ1フレーム期間遅延させるための回路を、図20のオフセット減算回路1及び白補正ゲイン色差乗算回路7の前に挿入し、オフセット減算回路1、白補正ゲイン輝度乗算回路3、平均輝度補正ゲイン輝度乗算回路4、白補正ゲイン色差乗算回路7、及び平均輝度補正ゲイン色差乗算回路8では、1画面(フレーム)前の入力画像の輝度信号Yi及び色差信号Cbi及びCbrに基づいて算出したオフセットレベルOffset、白補正ゲインWGain及び平均輝度補正ゲインAPLGainと、同じ画面(フレーム)の輝度信号Yi、及び色差信号Cbi、Criとから、補正画像の輝度信号Ywa、及び色差信号Cbwa、Crwaを生成するように構成することができる。
実施の形態3.
 以上、実施の形態1及び2の画像処理装置をハードウェアで構成するものとして説明したが実施の形態1及び2の装置の一部又は全部をソフトウェアにより、即ちプログラムされたコンピュータにより実現することも可能である。
 その場合には、画像処理装置は例えば図21に示すように構成される。
 図21に示される画像処理装置は、入力インターフェース101、プロセッサ102、プログラムメモリ103、データメモリ104、出力インターフェース105及びこれらを接続するバス106を含む。
 プロセッサ102は、入力インターフェース101を介して入力される画像に対して、プログラムメモリ103に記憶されたプログラムに従って動作する。動作の過程で種々のデータをデータメモリ104に記憶させる。処理の結果生成された画像はインターフェース105を介して出力される。
 以下、図21の構成で、実施の形態2の画像処理装置と同様の処理を行う場合の動作を図22及び図23を参照して説明する。
 説明を簡潔にするために、入力画像の画素ごとに輝度信号と色差信号が入力されるのではなく、入力画像の画面ごとに、画面全体の画素の輝度信号と色差信号が入力されることとする。
 ステップS1では、入力画像の輝度信号Yiと色差信号Cbi,Criを受信する。
 ステップS2では、現画面(フレーム)の入力画像の輝度信号Yi、及び色差信号Cbi、Criと、算出されたオフセットレベルOffset、白補正ゲインWGain、及び平均輝度補正ゲインAPLGainから輝度信号Ywa、色差信号Cbwa,Crwaを算出する。ここで、オフセットレベルOffsetと白補正ゲインWGainと平均輝度補正ゲインAPLGainとしては、1画面(フレーム)前の入力画像の輝度信号Yi及び補正画像の輝度信号Ywa及び色差信号Cbwa及びCrwaに基づいて算出したものが用いられる。この処理は、図1のオフセット減算回路1、白補正ゲイン輝度乗算回路3、及び平均輝度補正ゲイン輝度乗算回路4による処理と同じである。
 ステップS3では、現在の画面内の各画素の周辺領域輝度平均値Yavgを算出する。
この処理は、図2の周辺領域輝度平均回路11の処理と同じである。
 ステップS4では、現在の画面中の補正対象領域内の各画素の周辺領域輝度平均値Yavgの最小値である輝度最小値Yminを算出する。この処理は、図2の輝度最小値検出回路12の処理と同じである。
 ステップS5では、現在の画面中の補正対象領域内の各画素の周辺領域輝度平均値Yavgが所定の閾値BmAx以下となる黒画素数NumBをカウントする。この処理は、図2の黒画素カウント回路13の処理と同じである。
 ステップS6では、黒画素数NumBの値に応じてオフセット係数KBを算出する。この処理は、図2のオフセット係数算出回路14の処理と同じである。
 ステップS7では、ステップS4で算出した輝度最小値YminとステップS6で算出したオフセット係数KBと、所定の閾値LIMOfstから目標オフセットレベルOffset_tgtを算出する。ステップS8では、指数平滑処理により目標オフセットレベルOffset_tgtからオフセットレベルOffsetを算出する。ステップS7及びS8の処理は、図2のオフセットレベル算出回路15の処理と同じである。
 ステップS9では、ステップS8で算出したオフセットレベルOffsetと輝度信号の階調の目標上限値Wtgtから白補正ゲインWGainを算出する。この処理は、図20の白補正ゲイン算出回路30の処理と同じである。
 ステップS10では、画面全体の画素の輝度信号Yiの平均値である補正前平均輝度値APLpreと、画面全体の画素の輝度信号Ywaの平均値である補正後平均輝度値APLpostを算出する。この処理は、図3の補正前平均輝度値算出回路41及び補正後平均輝度値算出回路42の処理と同じである。
 ステップS11では、ステップS2で算出した輝度信号Ywaと色差信号Cbwa,Crwaからマトリクス演算により、原色信号R,G,Bを算出し、各画素について原色信号R,G,Bの最大値MAX(R,G,B)を画素代表値M_POSTとして算出する。この処理は、図3の原色信号画素代表値生成回路43の処理と同じである。
 ステップS12では、画素代表値M_POSTが所定の閾値SATmin以上である色飽和画素数SATnumをカウントする。この処理は、図3の色飽和画素カウント回路44の処理と同じである。
 ステップS13では、色飽和画素の画素代表値M_POSTから所定の閾値SATminを減算した値の画面内での合計を算出し、色飽和画素数SATnumで除算して色飽和量平均値SATavgを算出する。この処理は、図3の色飽和量平均値算出回路45により行なわれる式(10)及び式(11)で表される処理と同じである。
 ステップS14では、ステップS12で算出した色飽和画素数SATnumと、ステップS13で算出した色飽和量平均値SATavgと、画面画素数NMAXと、平均輝度値補正量に対する強度係数SATstrから色飽和補正レベルSATADJを算出する。この処理は、図3の平均輝度値補正量算出回路46により行なわれる、式(12)で表される処理と同じである。
 ステップS15では、ステップS10で算出した補正前平均輝度値APLpreと、ステップS14で算出した色飽和補正レベルSATADJと、補正前後で平均輝度値に所望のレベル差を与えるための調整値APLADJから目標平均輝度値APL_TGTを算出する。この処理は、図3の目標平均輝度値算出回路47により行なわれる、式(14A)、式(14B)で表される処理と同じである。
 ステップS16では、ステップS15で算出した目標平均輝度値APL_TGTとステップS10で算出した補正後平均輝度値APLpostとの比較判定を行う。ここで、APL_TGT=APLpostであると判定された場合には、ステップS17に進む。一方、APL_TGT=APLpostでないと判定された場合には、ステップS18に進む。
 ステップS17では、1画面前に算出した目標平均輝度補正ゲインAPLGain_tgt(t-1)を現画面の目標平均輝度補正ゲインAPLGain_tgt(t)として保持する。
 一方、ステップS18では、ステップS15で算出した目標平均輝度値APL_TGTとステップS10で算出した補正後平均輝度値APLpostから現画面の目標平均輝度補正ゲインAPLGain_tgtを算出する。そのための演算は、実施の形態1で式(15)を参照して説明したのと同様である。
 ステップS19では、指数平滑処理により目標平均輝度補正ゲインAPLGain_tgtから平均輝度補正ゲインAPLGainを算出する。そのための演算は、実施の形態1で式(16)を参照して説明したのと同様である。以上のステップS16、S17、S18及びS19の処理は、図3の平均輝度補正ゲイン算出回路48の処理と同じである。
 最後に、ステップS20では、ステップS7、S8、S17、S18、S19で使用するカウンタt(画面番号を表す)の更新を行い、次の入力画像の処理を開始するためにステップ1に戻る。
 補正画像の色飽和画素数SATnumが少ない場合や色飽和量平均値SATavgが小さい場合には、ステップS11からステップS19の処理により、補正後平均輝度値APLpostと補正前平均輝度値APLpreの差を小さくすることが出来る。
 一方、補正画像の色飽和画素数SATnumが多い場合や色飽和量平均値SATavgが大きい場合には、補正により色相が変化する画素数の増加を抑制した上で、補正後平均輝度値APLpostと補正前平均輝度値APLpreの差が小さくなるように制御することが可能となる。
 実施の形態3でも、実施の形態1及び2について述べたのと同様に、入力画像の輝度信号Yi及び色差信号Cbi、Criを1フレーム期間遅延させるステップを例えばステップS2の前に挿入し、ステップS2では、1画面(フレーム)前の入力画像の輝度信号Yi及び色差信号Cbi及びCbrに基づいて算出したオフセットレベルOffset、白補正ゲインWGain及び平均輝度補正ゲインAPLGainと、同じ画面(フレーム)の輝度信号Yi、及び色差信号Cbi、Criとから、補正画像の輝度信号Ywa、及び色差信号Cbwa、Crwaを生成するよう構成することができる。
 以上本発明を画像処理装置として説明したが、上記の画像処理装置を用いて実施される画像処理方法も本発明の一部を成す。
 1 オフセット減算回路、 2 ゲイン乗算回路、 3 白補正ゲイン輝度乗算回路、 4 平均輝度補正ゲイン輝度乗算回路、 5 輝度飽和処理回路、 6 混合回路、 7 白補正ゲイン色差乗算回路、 8 平均輝度補正ゲイン色差乗算回路、 9 色差飽和処理回路、 10 オフセットレベル生成回路、 11 周辺領域輝度平均回路、 12 輝度最小値検出回路、 13 黒画素カウント回路、 14 オフセット係数算出回路、 15 オフセットレベル算出回路、 20 ゲイン生成回路、 30 白補正ゲイン算出回路、 40 平均輝度補正ゲイン生成回路、 41 補正前平均輝度値算出回路、 42 補正後平均輝度値算出回路、 43 原色信号画素代表値生成回路、 44 色飽和画素カウント回路、 45 色飽和量平均値算出回路、 46 平均輝度値補正量算出回路、 47 目標平均輝度値算出回路、 48 平均輝度補正ゲイン算出回路、 51 色飽和補正レベル生成回路、 52 平均輝度補正ゲイン決定回路、 60 領域判定回路、 61 輝度レベル判別回路、 62 画素割合算出回路、 63 補正対象画素指定回路、 65 混合比生成回路。

Claims (11)

  1.  画像信号で表される画像の各画素が、所定の輝度レベル以下の画素の出現頻度が所定値以下である補正対象領域内のものか否かを判定する領域判定回路と、
     前記画像信号で表される画像のうち、前記領域判定回路で前記補正対象領域内のものであると判定された画素の輝度に基づいて、オフセットレベルを生成するオフセットレベル生成回路と、
     前記画像信号から、前記オフセットレベル生成回路で生成された前記オフセットレベルを減算しオフセット画像信号を生成するオフセット減算回路と、
     前記オフセット画像信号に対するゲインを生成するゲイン生成回路と、
     前記オフセット画像信号に前記ゲインを乗算し、補正画像信号を生成するゲイン乗算回路と、
     を備えたことを特徴とする画像処理装置。
  2.  前記画像信号で表される画像の各画素について、その周囲の画素のうち、輝度が前記所定の輝度レベル以下の画素が占める割合である低輝度画素割合に基づいて混合比を画素毎に求める混合比生成回路と、
     前記画像信号と前記補正画像信号を前記混合比に基づいて混合する混合回路と
     をさらに備えたことを特徴とする請求項1に記載の画像処理装置。
  3.  前記領域判定回路は、
     前記画像信号で表される画像の各画素の画素値を前記所定の輝度レベルと比較し前記所定輝度レベル以下の画素を判別する輝度レベル判別回路と、
     前記画像信号で表される画像の各画素を順に注目画素として、該注目画素を中心とした所定の周辺画素範囲の中に前記輝度レベル判別回路で前記所定の輝度レベル以下の画素と判別された画素が占める割合を、前記低輝度画素割合として算出する画素割合算出回路と、
     各画素についての前記低輝度画素割合が所定の閾値以下である場合に、当該画素が前記補正対象領域内の画素であると判断し、判断結果を示す信号を、補正対象識別信号として出力する補正対象画素指定回路と
     を備えたことを特徴とする請求項2に記載の画像処理装置。
  4.  前記混合比生成回路は、
     前記画素割合算出回路で算出された前記低輝度画素割合を所定の特性で変換して、前記混合比を生成する
     ことを特徴とする請求項2に記載の画像処理装置。
  5.  前記混合比生成回路は、
    前記低輝度画素割合が所定の上限値以上のときは前記混合比が100%となり、
    前記低輝度画素割合が0%から前記上限値までの範囲では、前記低輝度画素割合の増加にともなって前記混合比が0%から100%まで直線的に増加する変換特性を有する
     ことを特徴とする請求項4に記載の画像処理装置。
  6.  前記混合比生成回路は、前記低輝度画素割合が所定の下限値以下のときは前記混合比が0%となり、前記低輝度画素割合が前記下限値から100%までの範囲では、前記低輝度画素割合の増加にともなって前記混合比が0%から100%まで直線的に増加する変換特性を有する
     ことを特徴とする請求項4に記載の画像処理装置。
  7.  前記ゲイン生成回路は、
     前記画像信号のオフセットレベルと所定の目標上限値に基づいて白補正ゲインを生成する白補正ゲイン算出回路と、
     前記画像信号の平均輝度値と、前記補正画像信号の平均輝度値及び色飽和補正レベルに基づいて平均輝度補正ゲインを生成する平均輝度補正ゲイン生成回路とを有し、
     前記ゲイン乗算回路は、
     前記オフセット画像信号に前記白補正ゲインを乗算し白補正画像信号を生成する白補正ゲイン輝度乗算回路と、
     前記白補正画像信号に前記平均輝度補正ゲインを乗算して平均輝度補正画像信号を生成する平均輝度補正ゲイン輝度乗算回路とを有する
     ことを特徴とする請求項1乃至6のいずれかに記載の画像処理回路。
  8.  前記平均輝度補正ゲイン生成回路は、
     前記入力画像信号の平均輝度値を生成する補正前平均輝度値算出回路と、
     前記補正画像信号の平均輝度値を生成する補正後平均輝度値算出回路と、
     前記補正画像信号を三原色信号に変換し、その画素毎の最大値を生成する原色画素代表値生成回路と、
     画面ごとに前記最大値が所定レベル以上となる色飽和画素数を数える色飽和画素カウント回路と、
     前記色飽和画素数と前記最大値に基づいて色飽和補正レベルを生成する色飽和補正レベル生成回路と、
     前記補正画像信号の平均輝度値と前記補正画像信号の色飽和補正レベルに基づいて前記平均輝度補正ゲインを決定する平均輝度補正ゲイン決定回路と
     を有することを特徴とする請求項7に記載の画像処理装置。
  9.  前記平均輝度補正ゲイン決定回路は、
     前記入力画像信号の平均輝度値と、前記補正画像信号の前記色飽和補正レベルに基づいて目標画像レベルを生成する目標平均輝度値算出回路と、
     前記目標画像レベルに前記補正画像信号の前記平均輝度値が近づくように前記平均輝度補正ゲインを生成する平均輝度補正ゲイン算出回路とを備える
     ことを特徴とする請求項8に記載の画像処理装置。
  10.  前記オフセットレベル生成回路は、
     前記画像信号の各画素を注目画素として、該注目画素の周辺画素平均値を画素毎に算出する周辺領域輝度平均回路と、
     前記入力画像の画素毎に求められた前記周辺画素平均値のうち、前記領域判定回路で補正対象であると判定された画素から成る補正対象領域内における最小値を検出する輝度最小値検出回路と、
     画面ごとに前記周辺画素平均値が所定レベル以下となる黒レベル画素を数える黒画素カウント回路と、
     前記黒レベル画素数に基づいてオフセット係数を生成するオフセット係数算出回路と、
     前記最小値と前記オフセット係数に基づいて前記オフセットレベルを算出するオフセットレベル算出回路と
     を備えることを特徴とする請求項7乃至9のいずれかに記載の画像処理装置。
  11.  画像信号で表される画像の各画素が、所定の輝度レベル以下の画素の出現頻度が所定値以下である補正対象領域内のものか否かを判定する領域判定ステップと、
     前記画像信号で表される画像のうち、前記領域判定ステップで前記補正対象領域内のものであると判定された画素の輝度に基づいて、オフセットレベルを生成するオフセットレベル生成ステップと、
     前記画像信号から、前記オフセットレベル生成ステップで生成された前記オフセットレベルを減算しオフセット画像信号を生成するオフセット減算ステップと、
     前記オフセット画像信号に対するゲインを生成するゲイン生成ステップと、
     前記オフセット画像信号に前記ゲインを乗算し、補正画像信号を生成するゲイン乗算ステップと、
     を備えたことを特徴とする画像処理方法。
PCT/JP2013/054303 2012-03-02 2013-02-21 画像処理装置及び方法 WO2013129225A1 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN201380010152.3A CN104137531B (zh) 2012-03-02 2013-02-21 图像处理装置和方法
US14/380,629 US9349168B2 (en) 2012-03-02 2013-02-21 Image processing device and method to correct brightness signal of an input image
JP2014502161A JP5855224B2 (ja) 2012-03-02 2013-02-21 画像処理装置及び方法
GB1415225.0A GB2514066B (en) 2012-03-02 2013-02-21 Image processing device and method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2012-046369 2012-03-02
JP2012046369 2012-03-02

Publications (1)

Publication Number Publication Date
WO2013129225A1 true WO2013129225A1 (ja) 2013-09-06

Family

ID=49082425

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2013/054303 WO2013129225A1 (ja) 2012-03-02 2013-02-21 画像処理装置及び方法

Country Status (5)

Country Link
US (1) US9349168B2 (ja)
JP (1) JP5855224B2 (ja)
CN (1) CN104137531B (ja)
GB (1) GB2514066B (ja)
WO (1) WO2013129225A1 (ja)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015139155A (ja) * 2014-01-23 2015-07-30 キヤノン株式会社 撮像装置及び撮像方法
WO2018003245A1 (ja) * 2016-06-27 2018-01-04 ソニーセミコンダクタソリューションズ株式会社 信号処理装置、撮像装置、及び信号処理方法

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6548517B2 (ja) * 2015-08-26 2019-07-24 キヤノン株式会社 画像処理装置および画像処理方法
JP6739288B2 (ja) * 2015-10-21 2020-08-12 キヤノン株式会社 固体撮像装置、その制御方法、撮像システム及びカメラ
CN106373537B (zh) * 2016-09-12 2019-02-12 上海乐相科技有限公司 一种减弱显示画面拖影的方法及装置
CN110073656B (zh) * 2016-12-14 2021-06-11 富士胶片株式会社 图像处理装置、摄像装置、图像处理方法及存储介质
CN107146569B (zh) * 2017-07-14 2019-02-12 武汉华星光电技术有限公司 适用rgbw显示的分区背光显示方法及装置
CN109243366B (zh) * 2018-10-25 2020-09-11 上海兆芯集成电路有限公司 图像处理方法及装置
CN109274949A (zh) * 2018-10-30 2019-01-25 京东方科技集团股份有限公司 一种视频图像处理方法及其装置、显示设备
KR102644946B1 (ko) 2019-05-02 2024-03-08 삼성전자주식회사 영상 처리 방법 및 장치
CN110910333B (zh) 2019-12-12 2023-03-14 腾讯科技(深圳)有限公司 图像处理方法和图像处理设备
US11798296B2 (en) * 2021-12-21 2023-10-24 Veoneer Us, Llc Method and system for seatbelt detection using adaptive histogram normalization

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005130486A (ja) * 2003-09-30 2005-05-19 Sanyo Electric Co Ltd 映像信号処理装置
JP2008046017A (ja) * 2006-08-17 2008-02-28 Nohmi Bosai Ltd 煙検出装置
JP2011014958A (ja) * 2009-06-30 2011-01-20 Hitachi Ltd 画像信号処理装置

Family Cites Families (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2872005B2 (ja) 1993-07-05 1999-03-17 日本電気株式会社 自動画質調整装置
JP3650023B2 (ja) 2000-11-15 2005-05-18 日本アビオニクス株式会社 自動コントラスト補正回路
JP2002290707A (ja) 2001-03-26 2002-10-04 Olympus Optical Co Ltd 画像処理装置
TWI229545B (en) * 2003-09-24 2005-03-11 Huper Lab Co Ltd Method for video data enhancement
US7847973B2 (en) * 2004-01-30 2010-12-07 Broadcom Corporation Color mapping circuit
JP3949684B2 (ja) 2004-04-30 2007-07-25 三菱電機株式会社 階調補正装置、階調補正用プログラム、携帯端末機器及びパーソナルコンピュータ
JP4414289B2 (ja) 2004-06-25 2010-02-10 株式会社日立情報制御ソリューションズ コントラスト強調撮像装置
JP4093249B2 (ja) * 2005-03-18 2008-06-04 コニカミノルタオプト株式会社 撮像装置
JP2007004675A (ja) 2005-06-27 2007-01-11 Fujifilm Holdings Corp 画像補正方法
TWI314424B (en) * 2006-06-23 2009-09-01 Marketech Int Corp System and method for image signal contrast adjustment and overflow compensation
JP4637812B2 (ja) 2006-11-09 2011-02-23 オリンパス株式会社 画像信号処理装置、画像信号処理プログラム、画像信号処理方法
JP2008234342A (ja) * 2007-03-20 2008-10-02 Fujifilm Corp 画像処理装置及び画像処理方法
KR101321396B1 (ko) * 2007-07-20 2013-10-25 삼성전자주식회사 영상의 색 향상 장치 및 이를 이용한 영상의 색 향상 방법.
JP4550090B2 (ja) 2007-08-10 2010-09-22 三菱電機株式会社 画像処理装置及び画像処理方法
JP5076755B2 (ja) * 2007-09-07 2012-11-21 ソニー株式会社 画像処理装置、および画像処理方法、並びにコンピュータ・プログラム
KR20090055351A (ko) * 2007-11-28 2009-06-02 삼성전자주식회사 영상처리장치 및 영상처리방법
JP5142833B2 (ja) 2008-06-04 2013-02-13 三菱電機株式会社 画像処理装置及び画像処理方法
JP2010098553A (ja) 2008-10-17 2010-04-30 Sony Corp 階調補正装置、階調補正方法、プログラム、撮像装置および画像処理装置
JP2011228807A (ja) * 2010-04-15 2011-11-10 Nikon Corp 画像処理プログラム、画像処理装置、および画像処理方法
JP5550483B2 (ja) 2010-08-02 2014-07-16 三菱電機株式会社 画像処理装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005130486A (ja) * 2003-09-30 2005-05-19 Sanyo Electric Co Ltd 映像信号処理装置
JP2008046017A (ja) * 2006-08-17 2008-02-28 Nohmi Bosai Ltd 煙検出装置
JP2011014958A (ja) * 2009-06-30 2011-01-20 Hitachi Ltd 画像信号処理装置

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015139155A (ja) * 2014-01-23 2015-07-30 キヤノン株式会社 撮像装置及び撮像方法
WO2018003245A1 (ja) * 2016-06-27 2018-01-04 ソニーセミコンダクタソリューションズ株式会社 信号処理装置、撮像装置、及び信号処理方法
US10873712B2 (en) 2016-06-27 2020-12-22 Sony Semiconductor Solutions Corporation Signal processing device, imaging device, and signal processing method

Also Published As

Publication number Publication date
US20150016722A1 (en) 2015-01-15
GB201415225D0 (en) 2014-10-15
GB2514066B (en) 2018-11-14
CN104137531B (zh) 2017-06-06
JPWO2013129225A1 (ja) 2015-07-30
CN104137531A (zh) 2014-11-05
JP5855224B2 (ja) 2016-02-09
GB2514066A (en) 2014-11-12
US9349168B2 (en) 2016-05-24

Similar Documents

Publication Publication Date Title
JP5855224B2 (ja) 画像処理装置及び方法
US7590303B2 (en) Image enhancement method using local illumination correction
US8300051B2 (en) Apparatus and method for enhancing images in consideration of region characteristics
US8559715B2 (en) Method and apparatus for dynamic and adaptive enhancement of colors in digital video images using saturation gain
US8339518B2 (en) Video signal processing method and apparatus using histogram
US8965120B2 (en) Image processing apparatus and method of controlling the same
US9153015B2 (en) Image processing device and method
US20090304274A1 (en) Image Processing Apparatus and Image Display Apparatus
US9639916B2 (en) Image processing device, and image processing method
JP5648849B2 (ja) 画像処理装置、画像処理方法
JP2007249436A (ja) 画像信号処理装置及び画像信号処理方法
JP2002359754A (ja) 階調補正装置及び方法
JP5566270B2 (ja) 画像処理装置
CN114219723A (zh) 一种图像增强方法、图像增强装置和计算机可读存储介质
WO2013175946A1 (ja) 画像処理装置
JP2010288040A (ja) 輪郭補正方法及び輪郭補正装置
JP2006180267A (ja) 画質補正回路
WO2022158010A1 (ja) 画像処理方法
EP3316211A1 (en) Method for enhancing brightness of a multimedia content, corresponding computer program product and device
JP6879636B1 (ja) 画像処理方法
JP6893068B1 (ja) 画像処理方法
JP2003263637A (ja) コントラスト強調装置、およびこの装置を備えた撮像機
KR101073497B1 (ko) 영상 보정 장치 및 그 방법
JP5193976B2 (ja) 映像処理装置及び映像表示装置
JP2011061419A (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: 13754942

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2014502161

Country of ref document: JP

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 14380629

Country of ref document: US

ENP Entry into the national phase

Ref document number: 1415225

Country of ref document: GB

Kind code of ref document: A

Free format text: PCT FILING DATE = 20130221

WWE Wipo information: entry into national phase

Ref document number: 1415225.0

Country of ref document: GB

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13754942

Country of ref document: EP

Kind code of ref document: A1