JP6014343B2 - Image processing apparatus and image processing method - Google Patents

Image processing apparatus and image processing method Download PDF

Info

Publication number
JP6014343B2
JP6014343B2 JP2012067240A JP2012067240A JP6014343B2 JP 6014343 B2 JP6014343 B2 JP 6014343B2 JP 2012067240 A JP2012067240 A JP 2012067240A JP 2012067240 A JP2012067240 A JP 2012067240A JP 6014343 B2 JP6014343 B2 JP 6014343B2
Authority
JP
Japan
Prior art keywords
image
parallax
mixing ratio
mixing
correction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2012067240A
Other languages
Japanese (ja)
Other versions
JP2013201500A (en
Inventor
毅 都築
毅 都築
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hanwha Vision Co Ltd
Original Assignee
Hanwha Techwin Co Ltd
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 Hanwha Techwin Co Ltd filed Critical Hanwha Techwin Co Ltd
Priority to JP2012067240A priority Critical patent/JP6014343B2/en
Publication of JP2013201500A publication Critical patent/JP2013201500A/en
Application granted granted Critical
Publication of JP6014343B2 publication Critical patent/JP6014343B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)
  • Studio Devices (AREA)
  • Image Analysis (AREA)

Description

本発明は、画像処理装置および画像処理方法に関する。   The present invention relates to an image processing apparatus and an image processing method.

従来、撮像シーンの明るさを考慮した撮像画像の補正技術としては様々な技術が開示されている。例えば、露出アンダーで撮影しておき、撮影により得られた画像に対してガンマ処理を施すことで暗部を持ち上げる技術が開示されている(例えば、特許文献1参照)。かかる技術によれば、簡易に暗部補正ができる。   Conventionally, various techniques have been disclosed as techniques for correcting a captured image in consideration of the brightness of the captured scene. For example, a technique is disclosed in which a dark portion is picked up by photographing underexposed and performing gamma processing on an image obtained by photographing (see, for example, Patent Document 1). According to this technique, dark part correction can be easily performed.

また、例えば、露出を変えて複数枚撮影し(いわゆるブラケット撮影を行い)、撮影により得られた複数枚の画像を合成する技術が開示されている(例えば、特許文献2参照)。かかる技術によれば、高い暗部補正効果を享受することが可能である。また、1枚の画像から照明光を推定し、推定した照明光に基づいて暗部を補正する技術も開示されている(例えば、同公報参照)。   In addition, for example, a technique is disclosed in which a plurality of images are shot with different exposures (so-called bracket shooting is performed), and a plurality of images obtained by shooting are combined (see, for example, Patent Document 2). According to this technique, it is possible to enjoy a high dark part correction effect. Also disclosed is a technique for estimating illumination light from one image and correcting a dark part based on the estimated illumination light (see, for example, the same publication).

また、例えば、ステレオ画像から視差を検出し、視差の大きい近景を暗くするとともに視差の小さい遠景を明るくする技術が開示されている(例えば、特許文献3参照)。かかる技術によれば、フラッシュ撮影時に手前の被写体が明るくなってしまう現象と背景が暗くなってしまう現象を補正することが可能である。   In addition, for example, a technique is disclosed in which parallax is detected from a stereo image to darken a near scene with a large parallax and brighten a distant scene with a small parallax (see, for example, Patent Document 3). According to such a technique, it is possible to correct a phenomenon in which the subject in the foreground becomes bright and a phenomenon in which the background becomes dark during flash photography.

特開2008−160190号公報JP 2008-160190 A 特開2008−104010号公報JP 2008-104010 A 特開2010−26018号公報JP 2010-26018 A

しかしながら、特許文献1に開示された技術では、暗部(例えば、前景部)以外にも影響が及んでしまうことで適正露出領域(例えば、背景部)の階調が失われ、白飛びしてしまうという現象も生じ得る点が短所である。   However, in the technique disclosed in Patent Document 1, the gradation of the appropriate exposure region (for example, the background portion) is lost due to the influence other than the dark portion (for example, the foreground portion), and the image is overexposed. The disadvantage is that this phenomenon can also occur.

また、特許文献2に開示された技術では、動きの速い物体が撮影された場合には、物体の位置のずれが大きくなるため合成後の画像が不自然な画像となってしまうという欠点がある。さらに、撮影時にモード設定してから複数枚撮影を行う必要があるという点も煩雑である。また、暗部と黒い物体との区別や明部と白い物体との区別がつかないため、合成後の画像が照明光の誤推定により不自然な画像になることがある点も短所である。   In addition, the technique disclosed in Patent Document 2 has a drawback in that when a fast-moving object is photographed, the position of the object becomes large, and the combined image becomes an unnatural image. . Furthermore, it is also complicated that it is necessary to shoot a plurality of images after setting the mode at the time of shooting. In addition, since it is impossible to distinguish between a dark part and a black object and between a bright part and a white object, a composite image may be unnatural due to erroneous estimation of illumination light.

また、特許文献3に開示された技術では、フラッシュ撮影された画像にのみ処理を適用するものである。したがって、フラッシュを焚かずともスポットライト等が当たった被写体を撮影する等、フラッシュ撮影された画像に似た画像が撮影された場合でも、画像内容を判定して同じ処理を適用することはできない。また、逆光補正にはこの処理は適用できない。   In the technique disclosed in Patent Document 3, processing is applied only to an image captured with flash. Therefore, even when an image similar to a flash-captured image is shot, such as when shooting a subject that has received a spotlight or the like without using a flash, the same processing cannot be applied by determining the image content. Further, this process cannot be applied to backlight correction.

そこで、本発明は、不自然な画像が合成されることを避けつつ、適正露出領域の階調を損なわずに暗部に対する補正を行うことが可能な技術を提供しようとするものである。   Therefore, the present invention intends to provide a technique capable of correcting a dark part without losing the gradation of a proper exposure region while avoiding synthesis of an unnatural image.

本発明のある実施形態によれば、ステレオカメラにより撮像された左画像と右画像との間における左画像基準の視差と右画像基準の視差とをブロック毎に検出する視差検出部と、前記左画像および前記右画像の各々の輝度を補正することにより左補正画像および右補正画像を生成する輝度補正部と、前記左画像基準の視差に基づいて左画像混合用の混合比率を算出するとともに、前記右画像基準の視差に基づいて右画像混合用の混合比率を算出する混合比率算出部と、前記左画像混合用の混合比率に基づいて前記左画像および前記左補正画像を混合するとともに、前記右画像混合用の混合比率に基づいて前記右画像および前記右補正画像を混合する混合部と、を備えることを特徴とする、画像処理装置が提供される。   According to an embodiment of the present invention, a parallax detection unit that detects a parallax based on a left image and a parallax based on a right image between a left image and a right image captured by a stereo camera, and the left A luminance correction unit that generates a left correction image and a right correction image by correcting the luminance of each of the image and the right image, and calculates a mixing ratio for mixing the left image based on the parallax of the left image reference, A mixing ratio calculation unit that calculates a mixing ratio for right image mixing based on the parallax based on the right image, and the left image and the left correction image are mixed based on the mixing ratio for left image mixing, and An image processing apparatus comprising: a mixing unit that mixes the right image and the right correction image based on a mixing ratio for right image mixing.

かかる構成によれば、ステレオ画像から検出した視差に基づいて画像の輝度を補正するため、適正露出領域には影響を与えずに暗部補正を行うことができる。また、かかる構成によれば、補正後の画像と補正前の元画像とにおいて輝度のみが異なるため、動きのある物体が撮影された場合であっても、合成後の画像が不自然になるといった現象が生じることを防ぐことができる。さらに、かかる構成によれば、ステレオ画像から検出した距離情報を基に補正を行えばよいため、暗部補正を行うためのモード設定を撮影時に行う必要はなく、撮影後から必要に応じて補正処理を行えば暗部補正が可能である。   According to this configuration, since the brightness of the image is corrected based on the parallax detected from the stereo image, it is possible to perform dark part correction without affecting the appropriate exposure region. Further, according to such a configuration, since only the luminance differs between the corrected image and the original image before correction, the synthesized image becomes unnatural even when a moving object is photographed. The phenomenon can be prevented from occurring. Furthermore, according to such a configuration, it is only necessary to perform correction based on distance information detected from the stereo image, so it is not necessary to perform mode setting for performing dark portion correction at the time of shooting, and correction processing is performed as necessary after shooting. If darkening is performed, dark part correction is possible.

さらに、本実施形態に係る技術は、逆光時のみならず、スポットライトやフラッシュが当たって被写体の背景が暗く沈んでしまう状況にも対応可能である。すなわち、暗部に影響を与えない正確な暗部補正を行うことが可能であるという点である。例えば、逆光時には手前に位置する被写体のみを明るく補正することで、適正露出となっている背景領域には影響を与えずに暗部を補正することができる。また、手前に明るい被写体がある場合には、背景のみを明るく補正することで適正露出となっている被写体には影響を与えずに暗部を補正することができる。本実施形態に係る技術によれば、手前を補正する手法を採用するか、奥を補正する手法を採用するかという判定を行って処理を切り換えるため、両方のパターンに対応することができる。   Furthermore, the technology according to the present embodiment can cope with not only the backlight but also the situation where the background of the subject sunk darkly due to the spotlight or flash. That is, it is possible to perform accurate dark part correction that does not affect the dark part. For example, by correcting brightly only the subject positioned at the front during backlighting, it is possible to correct the dark part without affecting the background area that is appropriately exposed. If there is a bright subject in front, the dark portion can be corrected without affecting the subject that is properly exposed by correcting only the background brightly. According to the technique according to the present embodiment, since it is determined whether to adopt a method for correcting the front side or a method for correcting the back side, the processing is switched, so that both patterns can be handled.

前記混合比率算出部は、ブロック毎に検出された前記左画像基準の視差に基づいて左画像混合用の混合比率をブロック毎に算出するとともに、ブロック毎に検出された前記右画像基準の視差に基づいて右画像混合用の混合比率をブロック毎に算出してもよい。かかる構成によれば、ブロック毎に検出された視差に基づいて混合比率もブロック毎に算出することが可能である。   The mixing ratio calculation unit calculates a mixing ratio for left image mixing for each block based on the left image reference parallax detected for each block, and calculates the right image reference parallax detected for each block. Based on this, the mixing ratio for right image mixing may be calculated for each block. According to such a configuration, the mixing ratio can also be calculated for each block based on the parallax detected for each block.

前記視差検出部は、ブロック毎に検出された前記左画像基準の視差に対するブロック間の線形補間により前記左画像基準の視差を画素毎に算出するとともに、ブロック毎に検出された前記右画像基準の視差に対するブロック間の線形補間により前記右画像基準の視差を画素毎に算出し、前記混合比率算出部は、画素毎に算出された前記左画像基準の視差に基づいて左画像混合用の混合比率を画素毎に算出するとともに、画素毎に算出された前記右画像基準の視差に基づいて右画像混合用の混合比率を画素毎に算出してもよい。かかる構成によれば、ブロック間の線形補間により画素毎の視差に基づいて混合比率を画素毎に算出することが可能である。   The parallax detector calculates the parallax based on the left image for each pixel by linear interpolation between blocks with respect to the parallax based on the left image detected for each block, and the right image standard based on the right image detected for each block. The right image reference parallax is calculated for each pixel by linear interpolation between blocks with respect to the parallax, and the mixing ratio calculation unit calculates a mixing ratio for left image mixing based on the left image reference parallax calculated for each pixel. May be calculated for each pixel, and a mixing ratio for right image mixing may be calculated for each pixel based on the parallax based on the right image calculated for each pixel. According to such a configuration, it is possible to calculate the mixing ratio for each pixel based on the parallax for each pixel by linear interpolation between blocks.

前記輝度補正部は、前記左画像および前記右画像の各々の輝度を高めることにより前記左補正画像および前記右補正画像を生成してもよい。かかる構成によれば、画像に対して暗部を持ち上げる補正を行うことができる。   The brightness correction unit may generate the left correction image and the right correction image by increasing the brightness of each of the left image and the right image. According to such a configuration, it is possible to perform correction for lifting a dark portion on an image.

前記混合比率算出部は、前記視差が所定の範囲内に収まる場合、前記視差が大きいほど前記左補正画像および前記右補正画像に乗じられる混合比率を大きく算出してもよい。かかる構成によれば、例えば、輝度を高める補正がなされることにより補正画像が生成されている場合には、手前にある被写体領域に対して輝度を高める補正がなされるため、適切に逆光補正を行うことが可能である。   When the parallax falls within a predetermined range, the mixing ratio calculation unit may calculate a larger mixing ratio by which the left correction image and the right correction image are multiplied as the parallax is larger. According to such a configuration, for example, when a correction image is generated by performing correction to increase the luminance, correction for increasing the luminance is performed on the subject area in front, so that the backlight correction is appropriately performed. Is possible.

前記画像処理装置は、前記左画像および前記右画像の少なくともいずれか一方の画像の輝度と当該画像基準の視差との組み合わせの分布に基づいて混合比率算出手法を判定する判定部をさらに備え、前記混合比率算出部は、前記混合比率算出手法を用いて、前記左画像混合用の混合比率および前記右画像混合用の混合比率を算出してもよい。かかる構成によれば、例えば、逆光時には手前に位置する被写体のみを明るく補正することで適正露出となっている背景領域には影響を与えずに暗部を補正することができる。また、手前に明るい被写体がある場合には、背景のみを明るく補正することで適正露出となっている被写体には影響を与えずに暗部を補正することができる。   The image processing apparatus further includes a determination unit that determines a mixture ratio calculation method based on a distribution of combinations of luminance of at least one of the left image and the right image and parallax of the image reference, The mixing ratio calculation unit may calculate the mixing ratio for the left image mixing and the mixing ratio for the right image mixing using the mixing ratio calculation method. According to this configuration, for example, it is possible to correct a dark part without affecting a background area that is appropriately exposed by correcting brightly only a subject positioned in front in backlighting. If there is a bright subject in front, the dark portion can be corrected without affecting the subject that is properly exposed by correcting only the background brightly.

前記判定部は、第1の混合比率算出手法および第2の混合比率算出手法のいずれかを判定し、前記混合比率算出部は、前記第1の混合比率算出手法を用いる場合には、前記視差が所定の第1範囲内に収まる場合、前記視差が大きいほど前記左補正画像および前記右補正画像に乗じられる混合比率を大きく算出し、前記第2の混合比率算出手法を用いる場合には、前記視差が所定の第2範囲内に収まる場合、前記視差が大きいほど前記左補正画像および前記右補正画像に乗じられる混合比率を小さく算出してもよい。かかる構成によれば、例えば、輝度を高める補正がなされることにより補正画像が生成されている場合には、逆光時には手前にある被写体領域に対して輝度を高める補正がなされ、手前に明るい被写体がある場合には、背景に対して輝度を高める補正がなされる。   The determination unit determines either the first mixing ratio calculation method or the second mixing ratio calculation method, and the mixing ratio calculation unit uses the first disparity calculation method when the first mixing ratio calculation method is used. Is within the predetermined first range, the larger the parallax is, the larger the mixture ratio multiplied by the left correction image and the right correction image is calculated, and when the second mixture ratio calculation method is used, When the parallax falls within a predetermined second range, the mixing ratio multiplied by the left correction image and the right correction image may be calculated as the parallax increases. According to such a configuration, for example, when a corrected image is generated by performing correction to increase the brightness, correction is performed to increase the brightness for the subject area in the foreground during backlighting, and a bright subject is in front. In some cases, a correction is made to increase the brightness relative to the background.

また、本発明の別の実施形態によれば、ステレオカメラにより撮像された左画像と右画像との間における左画像基準の視差と右画像基準の視差とをブロック毎に検出するステップと、前記左画像および前記右画像の各々の輝度を補正することにより左補正画像および右補正画像を生成するステップと、前記左画像基準の視差に基づいて左画像混合用の混合比率を算出するとともに、前記右画像基準の視差に基づいて右画像混合用の混合比率を算出するステップと、前記左画像混合用の混合比率に基づいて前記左画像および前記左補正画像を混合するとともに、前記右画像混合用の混合比率に基づいて前記右画像および前記右補正画像を混合するステップと、を含むことを特徴とする、画像処理方法が提供される。   According to another embodiment of the present invention, the step of detecting, for each block, a left image-based parallax and a right image-based parallax between a left image and a right image captured by a stereo camera; Generating a left corrected image and a right corrected image by correcting the luminance of each of the left image and the right image; calculating a mixing ratio for mixing the left image based on the parallax of the left image reference; and Calculating a mixing ratio for right image mixing based on a parallax based on the right image; mixing the left image and the left correction image based on the mixing ratio for left image mixing; and Mixing the right image and the right-corrected image based on the mixing ratio of the image processing method.

かかる方法によれば、ステレオ画像から検出した視差に基づいて画像の輝度を補正するため、適正露出領域には影響を与えずに暗部補正を行うことができる。また、かかる構成によれば、補正後の画像と補正前の元画像とにおいて輝度のみが異なるため、動きのある物体が撮影された場合であっても、合成後の画像が不自然になるといった現象が生じることを防ぐことができる。さらに、かかる構成によれば、ステレオ画像から検出した距離情報を基に補正を行えばよいため、暗部補正を行うためのモード設定を撮影時に行う必要はなく、撮影後から必要に応じて補正処理を行えば暗部補正が可能である。   According to this method, since the brightness of the image is corrected based on the parallax detected from the stereo image, it is possible to perform dark part correction without affecting the appropriate exposure region. Further, according to such a configuration, since only the luminance differs between the corrected image and the original image before correction, the synthesized image becomes unnatural even when a moving object is photographed. The phenomenon can be prevented from occurring. Furthermore, according to such a configuration, it is only necessary to perform correction based on distance information detected from the stereo image, so it is not necessary to perform mode setting for performing dark portion correction at the time of shooting, and correction processing is performed as necessary after shooting. If darkening is performed, dark part correction is possible.

以上説明したように、本発明によれば、不自然な画像が合成されることを避けつつ、適正露出領域の階調を損なわずに暗部に対する補正を行うことが可能である。   As described above, according to the present invention, it is possible to correct a dark portion without impairing the gradation of the appropriate exposure region while avoiding the synthesis of an unnatural image.

本発明の実施形態に係る画像処理装置の構成例を示す図である。It is a figure which shows the structural example of the image processing apparatus which concerns on embodiment of this invention. 画像処理装置の算出部の構成例を示す図である。It is a figure which shows the structural example of the calculation part of an image processing apparatus. ステレオカメラにより撮像された左画像および右画像の例を示す図である。It is a figure which shows the example of the left image and right image which were imaged with the stereo camera. 輝度補正部の機能を説明するための図である。It is a figure for demonstrating the function of a brightness correction part. 視差検出部の機能を説明するための図である。It is a figure for demonstrating the function of a parallax detection part. 輝度と視差との組み合わせに対する分類例を示す図である。It is a figure which shows the example of a classification | category with respect to the combination of a brightness | luminance and parallax. 組み合わせの分布に応じて画像の性質を推定する例を示す図である。It is a figure which shows the example which estimates the property of an image according to distribution of a combination. 画像の性質に応じた混合比率算出手法の例を示す図である。It is a figure which shows the example of the mixing ratio calculation method according to the property of an image. 画像処理装置の動作の流れを示すフローチャートである。It is a flowchart which shows the flow of operation | movement of an image processing apparatus.

以下に添付図面を参照しながら、本発明の好適な実施の形態について詳細に説明する。なお、本明細書および図面において、実質的に同一の機能構成を有する構成要素については、同一の符号を付すことにより重複説明を省略する。   Exemplary embodiments of the present invention will be described below in detail with reference to the accompanying drawings. In the present specification and drawings, components having substantially the same functional configuration are denoted by the same reference numerals, and redundant description is omitted.

また、本明細書および図面において、実質的に同一の機能構成を有する複数の構成要素を、同一の符号の後に異なるアルファベットを付して区別する場合もある。ただし、実質的に同一の機能構成を有する複数の構成要素の各々を特に区別する必要がない場合、同一符号のみを付する。   In the present specification and drawings, a plurality of constituent elements having substantially the same functional configuration may be distinguished by attaching different alphabets after the same reference numeral. However, when it is not necessary to particularly distinguish each of a plurality of constituent elements having substantially the same functional configuration, only the same reference numerals are given.

図1は、本発明の実施形態に係る画像処理装置10の構成例を示す図である。図1に示すように、画像処理装置10は、カメラ20A、カメラ20B、現像処理部110A、現像処理部110B、輝度補正部120A、輝度補正部120B、視差検出部130、輝度取得部140、算出部150、混合部160Aおよび混合部160Bを含んでいる。また、図2は、画像処理装置10の算出部150の構成例を示す図である。図2に示すように、算出部150は、判定部151および混合比率算出部152を含んでいる。以下、画像処理装置10が備える各機能ブロックの機能について順次詳細に説明する。   FIG. 1 is a diagram illustrating a configuration example of an image processing apparatus 10 according to an embodiment of the present invention. As shown in FIG. 1, the image processing apparatus 10 includes a camera 20A, a camera 20B, a development processing unit 110A, a development processing unit 110B, a luminance correction unit 120A, a luminance correction unit 120B, a parallax detection unit 130, a luminance acquisition unit 140, and a calculation. Part 150, mixing part 160A and mixing part 160B. FIG. 2 is a diagram illustrating a configuration example of the calculation unit 150 of the image processing apparatus 10. As illustrated in FIG. 2, the calculation unit 150 includes a determination unit 151 and a mixture ratio calculation unit 152. Hereinafter, the function of each functional block provided in the image processing apparatus 10 will be described in detail sequentially.

カメラ20Aおよびカメラ20Bは、ステレオカメラを構成している。すなわち、カメラ20Aおよびカメラ20Bの各々は、撮像を行うことにより撮像画像を取得する。以下では、カメラ20Aによる撮像画像を左画像とし、カメラ20Bによる撮像画像を右画像と称する。図3は、ステレオカメラにより撮像された左画像および右画像の例を示す図である。なお、本発明の実施形態においては、画像処理装置10がステレオカメラを有することとしているが、ステレオカメラは画像処理装置10の外部に備えられていてもよい。   The camera 20A and the camera 20B constitute a stereo camera. That is, each of the camera 20A and the camera 20B acquires a captured image by performing imaging. Hereinafter, an image captured by the camera 20A is referred to as a left image, and an image captured by the camera 20B is referred to as a right image. FIG. 3 is a diagram illustrating an example of a left image and a right image captured by a stereo camera. In the embodiment of the present invention, the image processing apparatus 10 includes a stereo camera. However, the stereo camera may be provided outside the image processing apparatus 10.

現像処理部110Aは、左画像に対して必要に応じて現像処理を施し、現像処理部110Bは、右画像に対して必要に応じて現像処理を施す。現像処理は、例えば、撮像素子がBayerセンサの場合には、撮像画像に対してデモザイク処理を行いRGB信号に変換する処理、カラーマトリックス演算処理、YUV変換処理、ノイズリダクション処理などを含むものである。   The development processing unit 110A performs development processing on the left image as necessary, and the development processing unit 110B performs development processing on the right image as necessary. For example, when the image sensor is a Bayer sensor, the development process includes a process of demosaicing the captured image to convert it into an RGB signal, a color matrix calculation process, a YUV conversion process, a noise reduction process, and the like.

輝度補正部120Aは、左画像の輝度を補正することにより左補正画像を生成する機能を有し、輝度補正部120Bは、右画像の輝度を補正することにより右補正画像を生成する。ここで、左画像および右画像それぞれの輝度補正の手法は特に限定されない。例えば、輝度補正部120Aは、左画像の輝度を高めることにより左補正画像を生成し、輝度補正部120Bは、右画像の輝度を高めることにより右補正画像を生成する。   The luminance correction unit 120A has a function of generating a left correction image by correcting the luminance of the left image, and the luminance correction unit 120B generates a right correction image by correcting the luminance of the right image. Here, the method of correcting the luminance of each of the left image and the right image is not particularly limited. For example, the luminance correction unit 120A generates a left correction image by increasing the luminance of the left image, and the luminance correction unit 120B generates a right correction image by increasing the luminance of the right image.

図4は、輝度補正部120の機能を説明するための図である。図4に示すように、例えば、輝度補正部120Aは、左画像のY信号(輝度信号)に対してガンマ処理を施すことによって左画像の輝度を高めることができる。同様に、例えば、輝度補正部120Bは、左画像のY(輝度)信号に対してガンマ処理を施すことによって右画像の輝度を高めることができる。このような輝度を高める補正により撮像画像内の暗部を持ち上げる処理が実現される。   FIG. 4 is a diagram for explaining the function of the luminance correction unit 120. As illustrated in FIG. 4, for example, the luminance correction unit 120 </ b> A can increase the luminance of the left image by performing gamma processing on the Y signal (luminance signal) of the left image. Similarly, for example, the luminance correction unit 120B can increase the luminance of the right image by performing gamma processing on the Y (luminance) signal of the left image. Processing for lifting a dark portion in the captured image is realized by such correction for increasing the luminance.

なお、ここでは、具体例として、Y(輝度)信号に対してガンマ処理を施すことにより輝度の補正がなされることとしたが、RGB信号に対してガンマ処理を施すことにより輝度の補正がなされても構わないし、RGB信号に対してゲインを乗ずることによって輝度の補正がなされてもよい。   Here, as a specific example, luminance correction is performed by performing gamma processing on a Y (luminance) signal. However, luminance correction is performed by performing gamma processing on an RGB signal. Alternatively, the luminance may be corrected by multiplying the RGB signal by a gain.

図5は、視差検出部130の機能を説明するための図である。図5に示すように、例えば、視差検出部130は、ステレオカメラにより撮像された左画像と右画像との間における左画像を基準とした視差(以下、「左画像基準の視差」と言う)と右画像を基準とした視差(以下、「右画像基準の視差」と言う)とをブロック毎に検出する。各ブロックのサイズや形状は特に限定されない。視差の検出は、例えば、矩形マクロブロック単位のブロックマッチング法により行ってもよいし、オプティカルフローなどを用いて行ってもよい。   FIG. 5 is a diagram for explaining the function of the parallax detection unit 130. As illustrated in FIG. 5, for example, the parallax detection unit 130 uses a left image as a reference between the left image and the right image captured by the stereo camera (hereinafter, referred to as “left image reference parallax”). And the parallax based on the right image (hereinafter referred to as “right image-based parallax”) are detected for each block. The size and shape of each block are not particularly limited. The detection of parallax may be performed by, for example, a block matching method in units of rectangular macroblocks, or may be performed using an optical flow or the like.

また、視差検出部130は、ブロック単位の視差をさらにブロック間の線形補間により内挿して1画素単位に視差を与えてもよい。すなわち、視差検出部130は、ブロック毎に検出された左画像基準の視差に対するブロック間の線形補間により左画像基準の視差を画素毎に算出してもよい。また、視差検出部130は、ブロック毎に検出された右画像基準の視差に対するブロック間の線形補間により右画像基準の視差を画素毎に算出してもよい。   Further, the parallax detection unit 130 may further provide the parallax in units of pixels by interpolating the parallax in units of blocks by linear interpolation between blocks. That is, the parallax detection unit 130 may calculate the parallax based on the left image for each pixel by linear interpolation between blocks with respect to the parallax based on the left image detected for each block. Further, the parallax detection unit 130 may calculate the parallax based on the right image for each pixel by linear interpolation between blocks with respect to the parallax based on the right image detected for each block.

輝度取得部140は、左画像および右画像の少なくともいずれか一方の画像の輝度を取得する。輝度取得部140により取得される輝度は、画素毎の輝度であってもよいし、ブロック毎の輝度であってもよい。例えば、輝度取得部140により取得される輝度がブロック毎の輝度である場合には、各ブロックを構成する複数の画素の平均輝度をブロック毎の輝度としてもよい。ここでのブロックは、視差検出時に使用されるブロックと同じである。左画像と右画像とのいずれから輝度を取得するかはあらかじめ決められてもよいし、ユーザやアプリケーションによって決められてもよい。   The luminance acquisition unit 140 acquires the luminance of at least one of the left image and the right image. The luminance acquired by the luminance acquisition unit 140 may be the luminance for each pixel or the luminance for each block. For example, when the luminance acquired by the luminance acquisition unit 140 is the luminance for each block, the average luminance of a plurality of pixels constituting each block may be used as the luminance for each block. The block here is the same as the block used at the time of parallax detection. Whether the luminance is acquired from the left image or the right image may be determined in advance, or may be determined by a user or an application.

判定部151は、輝度取得部140によって取得された輝度と当該画像基準の視差との組み合わせの分布に基づいて混合比率算出手法を判定する。例えば、判定部151は、各ブロックについての輝度と視差との組み合わせを分類し、その分類結果に基づいて混合比率算出手法を判定してもよい。   The determination unit 151 determines a mixing ratio calculation method based on the distribution of combinations of the luminance acquired by the luminance acquisition unit 140 and the image-based parallax. For example, the determination unit 151 may classify combinations of luminance and parallax for each block and determine a mixing ratio calculation method based on the classification result.

図6は、輝度と視差との組み合わせに対する分類例を示す図である。図6に示すように、例えば、視差に関して閾値THD1および閾値THD2が設けられている場合、判定部151は、閾値THD1よりも小さい視差(以下、「小視差」とも言う)、閾値THD1よりも大きくて閾値THD2よりも小さい視差(以下、「中視差」とも言う)および閾値THD2よりも大きい視差(以下、「大視差」とも言う)のいずれかに各ブロックを分類する。   FIG. 6 is a diagram illustrating a classification example for a combination of luminance and parallax. As illustrated in FIG. 6, for example, when the threshold value THD1 and the threshold value THD2 are provided for the parallax, the determination unit 151 has a parallax smaller than the threshold THD1 (hereinafter, also referred to as “small parallax”) and larger than the threshold THD1. Thus, each block is classified into either a parallax smaller than the threshold THD2 (hereinafter also referred to as “medium parallax”) or a parallax larger than the threshold THD2 (hereinafter also referred to as “large parallax”).

小視差は、被写体までの距離が遠い場合に検出される視差であり、中視差は、被写体までの距離が中程度の場合に検出される視差であり、大視差は、被写体までの距離が近い場合に検出される視差である。視差が閾値THD1と等しい場合には、小視差および中視差のいずれに分類されてもよく、視差が閾値THD2と等しい場合には、中視差および大視差のいずれに分類されてもよい。   Small parallax is a parallax detected when the distance to the subject is long, medium parallax is a parallax detected when the distance to the subject is medium, and large parallax is a short distance to the subject The parallax detected in this case. When the parallax is equal to the threshold value THD1, it may be classified as either a small parallax or a medium parallax. When the parallax is equal to the threshold value THD2, it may be classified as either a medium parallax or a large parallax.

さらに、輝度に関して閾値THL1および閾値THL2が設けられている場合、判定部151は、閾値THL1よりも小さい輝度(以下、「低輝度」とも言う)、閾値THL1よりも大きくて閾値THL2よりも小さい輝度(以下、「中輝度」とも言う)および閾値THL2よりも大きい輝度(以下、「高輝度」とも言う)のいずれかに各ブロックを分類する。   Further, when the threshold THL1 and the threshold THL2 are provided for the luminance, the determination unit 151 has a luminance smaller than the threshold THL1 (hereinafter also referred to as “low luminance”), a luminance larger than the threshold THL1 and smaller than the threshold THL2. Each block is classified into either one (hereinafter also referred to as “medium luminance”) and luminance greater than the threshold THL2 (hereinafter also referred to as “high luminance”).

輝度が閾値THL1と等しい場合には、低輝度および中輝度のいずれに分類されてもよく、輝度が閾値THL2と等しい場合には、中輝度および高輝度のいずれに分類されてもよい。このような分類がなされた場合、各ブロックは、例えば、図6に示した区分C1〜C9のいずれかに分類される。判定部151は、各区分に分類されるブロックの頻度を頻度分布として生成する。この頻度分布により画像の性質が推定される。   When the luminance is equal to the threshold value THL1, it may be classified as either low luminance or medium luminance, and when the luminance is equal to the threshold value THL2, it may be classified as either medium luminance or high luminance. When such classification is performed, each block is classified into one of the sections C1 to C9 shown in FIG. 6, for example. The determination unit 151 generates the frequency of blocks classified into each category as a frequency distribution. The nature of the image is estimated from this frequency distribution.

図7は、組み合わせの分布に応じて画像の性質を推定する例を示す図である。例えば、被写体に対して光を手前から照射するような場合(例えば、スポットライト使用時あるいはフラッシュ使用時などが該当する。以下、この場合を単に「スポットライト時」と言う場合もある。)、被写体が明るく映り、背景が暗く映る傾向にある。このような場合には、被写体は、大視差・高輝度となるため、図6に示した区分C1に属し、背景は、小視差・低輝度となるため、区分C9に属する。その結果、例えば、図7に示した「スポットライト時」に示すような頻度分布を取る。   FIG. 7 is a diagram illustrating an example of estimating image properties according to the distribution of combinations. For example, when the subject is irradiated with light from the front (for example, when using a spotlight or when using a flash, this case may be simply referred to as “spotlight” hereinafter). The subject tends to appear bright and the background appears dark. In such a case, the subject has large parallax and high luminance, and therefore belongs to the section C1 shown in FIG. 6, and the background belongs to section C9 because of small parallax and low luminance. As a result, for example, a frequency distribution as shown in “at the time of spotlight” shown in FIG. 7 is taken.

一方、例えば、被写体に対して光を奥から照射するような場合(例えば、逆光の場合)、被写体が暗く映る傾向にある。このような場合には、被写体は、大視差・低輝度なので図6に示した区分C7に属し、背景は、小視差・中輝度〜高輝度となるため、区分C3や区分C6に属する。その結果、例えば、図7に示した「逆光時」に示すような輝度分布を取る。このように、視差と輝度の相関関係を見ることで、画像の性質を推定することができる。   On the other hand, for example, when the subject is irradiated with light from the back (for example, in the case of backlight), the subject tends to appear dark. In such a case, the subject belongs to the section C7 shown in FIG. 6 because it has a large parallax and low luminance, and the background belongs to the section C3 and the section C6 because it has a small parallax, medium luminance to high luminance. As a result, for example, a luminance distribution as shown in “backlit” shown in FIG. 7 is obtained. As described above, the property of the image can be estimated by looking at the correlation between the parallax and the luminance.

より詳細には、例えば、判定部151は、区分C3および区分C7に属するブロックの頻度を第1の頻度とし、区分C1および区分C9に属するブロックを第2の頻度とした場合、第1の頻度の方が第2の頻度よりも多い場合には、その画像は「逆光時」に撮影されたと推定してもよい。また、判定部151は、第2の頻度の方が第1の頻度よりも多い場合には、その画像は「スポットライト時」に撮影されたと推定してもよい。判定部151は、例えば、「逆光時」に撮影されたと推定した場合には、第1の混合比率算出手法を判定する。また、判定部151は、例えば、「スポットライト時」に撮影されたと推定した場合には、第2の混合比率算出手法を判定する。   More specifically, for example, when the determination unit 151 sets the frequency of blocks belonging to the sections C3 and C7 as the first frequency and sets the blocks belonging to the sections C1 and C9 as the second frequency, the first frequency If there is more than the second frequency, it may be estimated that the image was taken “backlit”. In addition, when the second frequency is higher than the first frequency, the determination unit 151 may estimate that the image was taken “during spotlight”. For example, if the determination unit 151 estimates that the image was captured during “backlighting”, the determination unit 151 determines the first mixing ratio calculation method. In addition, for example, if the determination unit 151 estimates that the image was captured during “spotlight”, the determination unit 151 determines the second mixing ratio calculation method.

混合比率算出部152は、左画像基準の視差に基づいて左画像混合用の混合比率を算出するとともに、右画像基準の視差に基づいて右画像混合用の混合比率を算出する。例えば、混合比率算出部152は、ブロック毎に検出された左画像基準の視差に基づいて左画像混合用の混合比率をブロック毎に算出するとともに、ブロック毎に検出された前記右画像基準の視差に基づいて右画像混合用の混合比率をブロック毎に算出する。   The mixing ratio calculation unit 152 calculates a mixing ratio for mixing the left image based on the parallax based on the left image, and calculates a mixing ratio for mixing the right image based on the parallax based on the right image. For example, the mixing ratio calculation unit 152 calculates the mixing ratio for left image mixing for each block based on the left image based parallax detected for each block, and the right image based parallax detected for each block. Based on the above, the mixing ratio for right image mixing is calculated for each block.

また、混合比率算出部152は、画素毎に算出された視差に基づいて混合比率を算出してもよい。すなわち、混合比率算出部152は、画素毎に算出された左画像基準の視差に基づいて左画像混合用の混合比率を画素毎に算出するとともに、画素毎に算出された前記右画像基準の視差に基づいて右画像混合用の混合比率を画素毎に算出してもよい。したがって、ブロック毎になされる混合比率の算出は、画素毎になされる混合比率の算出であってもよい。   Further, the mixture ratio calculation unit 152 may calculate the mixture ratio based on the parallax calculated for each pixel. In other words, the mixture ratio calculation unit 152 calculates the left image-based mixture ratio for each pixel based on the left-image-based parallax calculated for each pixel, and the right-image-based parallax calculated for each pixel. Based on the above, the mixing ratio for right image mixing may be calculated for each pixel. Therefore, the calculation of the mixing ratio performed for each block may be the calculation of the mixing ratio performed for each pixel.

混合比率算出部152は、判定部151により判定された混合比率算出手法を用いて、左画像混合用の混合比率および右画像混合用の混合比率を算出してもよい。例えば、判定部151によって画像が「逆光時」に撮影されたと推定された場合には、第1の混合比率算出手法が判定されるため、当該手法を用いて混合比率を算出すればよい。また、例えば、判定部151によって画像が「スポットライト時」に撮影されたと推定された場合には、第2の混合比率算出手法が判定されるため、当該手法を用いて混合比率を算出すればよい。   The mixing ratio calculation unit 152 may calculate the mixing ratio for left image mixing and the mixing ratio for right image mixing using the mixing ratio calculation method determined by the determination unit 151. For example, when the determination unit 151 estimates that the image was taken “during backlighting”, the first mixing ratio calculation method is determined. Therefore, the mixing ratio may be calculated using the method. In addition, for example, when the determination unit 151 estimates that the image was shot “during spotlight”, the second mixing ratio calculation method is determined. Therefore, if the mixing ratio is calculated using this method, Good.

図8は、画像の性質に応じた混合比率算出手法の例を示す図である。図8に示すように、例えば、「逆光時」に撮影されたと推定された場合には、混合比率算出部152は、視差が閾値TH3から閾値TH4の間に収まる場合、視差が大きいほど左補正画像および右補正画像に乗じられる混合比率を大きく算出してもよい。これは、「逆光時」には、視差が小さいほど暗く映ってしまうことが想定されるため、輝度を高める補正がなされた補正画像の混合比率を大きくするのが好ましいからである。閾値TH3および閾値TH4は適宜変更されてもよい。   FIG. 8 is a diagram illustrating an example of a mixing ratio calculation method according to the properties of an image. As shown in FIG. 8, for example, when it is estimated that the image was captured during “backlighting”, the mixture ratio calculation unit 152 performs left correction as the parallax increases as the parallax falls between the threshold TH3 and the threshold TH4. The mixing ratio multiplied by the image and the right correction image may be calculated to be large. This is because, during “backlight”, it is assumed that the smaller the parallax is, the darker the image is. Therefore, it is preferable to increase the mixing ratio of the corrected images that have been corrected to increase the luminance. The threshold value TH3 and the threshold value TH4 may be changed as appropriate.

なお、混合比率算出部152は、閾値TH3より視差が小さい場合には、左補正画像および右補正画像に乗じられる混合比率を「0」とし、閾値TH4より視差が大きい場合には、左補正画像および右補正画像に乗じられる混合比率を「1」としてもよい。また、図8に示すように、視差が閾値TH3より大きく閾値TH4より小さい区間では、混合比率が線形的に変化してもよい。   When the parallax is smaller than the threshold TH3, the mixing ratio calculation unit 152 sets the mixing ratio to be multiplied by the left correction image and the right correction image to “0”, and when the parallax is larger than the threshold TH4, the left correction image The mixing ratio multiplied by the right correction image may be “1”. Further, as shown in FIG. 8, the mixing ratio may change linearly in a section where the parallax is larger than the threshold value TH3 and smaller than the threshold value TH4.

また、混合比率算出部152は、例えば、「スポットライト時」に撮影されたと推定された場合には、視差が閾値TH1から閾値TH2の間に収まる場合、視差が大きいほど左補正画像および右補正画像に乗じられる混合比率を小さく算出してもよい。これは、「スポットライト時」には、視差が大きいほど明るく映ることが想定されるため、輝度を高める補正がなされた補正画像の混合比率を小さくするのが好ましいからである。閾値TH1および閾値TH2は適宜変更されてもよい。   Further, for example, when it is estimated that the image is shot during “spotlight”, the mixing ratio calculation unit 152 increases the left correction image and the right correction as the parallax increases as the parallax falls between the threshold TH1 and the threshold TH2. You may calculate small the mixture ratio multiplied by an image. This is because it is presumed that, when “in spotlight”, the larger the parallax is, the brighter the image is projected, so it is preferable to reduce the mixing ratio of the corrected image that has been corrected to increase the luminance. The threshold value TH1 and the threshold value TH2 may be changed as appropriate.

なお、判定部151が設けられていない形態も想定される。その場合、「逆光時」に撮影されたか「スポットライト時」に撮影されたかを推定する機能がないため、どちらの場合に撮影されるのかがあらかじめ決められてもよいし、ユーザやアプリケーションによって決められてもよい。   A form in which the determination unit 151 is not provided is also assumed. In that case, since there is no function to estimate whether the image was shot “in backlight” or “in spotlight”, it may be determined in advance in which case, or determined by the user or application. May be.

混合部160Aは、左画像混合用の混合比率に基づいて左画像および左補正画像を混合する。また、混合部160Bは、右画像混合用の混合比率に基づいて右画像および右補正画像を混合する。より詳細には、例えば、補正画像の画素値をP(補正画像)とし、補正前の撮像画像をP(元画像)とし、補正画像に乗じられる混合比率をKとした場合、以下の(式1)に基づいて混合される。   The mixing unit 160A mixes the left image and the left corrected image based on the mixing ratio for mixing the left image. Further, the mixing unit 160B mixes the right image and the right correction image based on the mixing ratio for right image mixing. More specifically, for example, when the pixel value of the corrected image is P (corrected image), the captured image before correction is P (original image), and the mixing ratio multiplied by the corrected image is K, the following (formula Mixed based on 1).

P(補正画像)xK+P(元画像)x(1−K)・・・(式1)   P (corrected image) xK + P (original image) x (1-K) (Equation 1)

なお、(式1)に基づく混合の手法は、混合部160Aおよび混合部160Bによる混合の手法の一例に過ぎないため、混合部160Aおよび混合部160Bによる混合の手法は、かかる例に限定されない。   Note that the mixing method based on (Equation 1) is merely an example of the mixing method by the mixing unit 160A and the mixing unit 160B, and the mixing method by the mixing unit 160A and the mixing unit 160B is not limited to this example.

以上、画像処理装置10が有する機能について説明した。以下では、画像処理装置10の動作の流れについて説明する。図9は、画像処理装置10の動作の流れを示すフローチャートである。なお、図9に示した動作の流れでは、説明の簡便さのため、左画像および右画像の各々を区別していない。すなわち、実際には、左画像および右画像の双方に対する画像処理がなされるが、図9には、左画像および右画像の一方に対する画像処理の流れが示されている。   In the above, the function which the image processing apparatus 10 has was demonstrated. Below, the flow of operation of the image processing apparatus 10 will be described. FIG. 9 is a flowchart showing an operation flow of the image processing apparatus 10. In the operation flow shown in FIG. 9, the left image and the right image are not distinguished from each other for ease of explanation. That is, in practice, image processing is performed on both the left image and the right image, but FIG. 9 shows the flow of image processing on one of the left image and the right image.

まず、カメラ20により撮像画像(左画像および右画像)が取得され(ステップS1)、現像処理部110により必要に応じて撮像画像(左画像および右画像)に対して現像処理が施された後、輝度補正部120は、撮像画像(左画像および右画像)の輝度を補正することにより補正画像(左補正画像および右補正画像)を生成する(ステップS2)。続いて、視差検出部130は、撮像画像(左画像および右画像)に基づいて視差(左画像基準の視差および右画像基準の視差)を検出する(ステップS3)。続いて、判定部151は、左画像および右画像の少なくともいずれか一方の画像の輝度と当該画像基準の視差との組み合わせの分布に基づいて、撮像画像(左画像および右画像)の性質を判定する(ステップ4)。撮像画像(左画像および右画像)の性質の判定では、例えば、判定部151により、撮像画像(左画像および右画像)が「逆光時」に撮影されたのか、「スポットライト時」に撮影されたのかが推定される。   First, a captured image (left image and right image) is acquired by the camera 20 (step S1), and development processing is performed on the captured image (left image and right image) as necessary by the development processing unit 110. The brightness correction unit 120 generates a corrected image (left corrected image and right corrected image) by correcting the brightness of the captured image (left image and right image) (step S2). Subsequently, the parallax detection unit 130 detects parallax (left image-based parallax and right-image-based parallax) based on the captured images (left image and right image) (step S3). Subsequently, the determination unit 151 determines the property of the captured image (the left image and the right image) based on the distribution of the combination of the luminance of at least one of the left image and the right image and the image-based parallax. (Step 4). In determining the nature of the captured image (left image and right image), for example, the determination unit 151 captures the captured image (left image and right image) during “backlight” or “when spotlighted”. It is estimated whether it was.

判定部151は、撮像画像(左画像および右画像)が「逆光時」に撮影されたと推定した場合には、第1の混合比率算出手法を用いて、混合比率を算出する(ステップS6)。一方、判定部151は、撮像画像(左画像および右画像)が「スポットライト時」に撮影されたと推定した場合には、第2の混合比率算出手法を用いて、混合比率を算出する(ステップS7)。第1の混合比率算出手法および第2の混合比率算出手法の各々については、既に述べた通りである。   If the determination unit 151 estimates that the captured image (left image and right image) was captured “backlit”, the determination unit 151 calculates the mixture ratio using the first mixture ratio calculation method (step S6). On the other hand, when it is estimated that the captured image (left image and right image) was captured “at the time of spotlight”, the determination unit 151 calculates the mixing ratio using the second mixing ratio calculation method (step S1). S7). Each of the first mixing ratio calculation method and the second mixing ratio calculation method is as described above.

続いて、混合部160は、混合比率算出部152により算出された混合比率に基づいて、補正画像(左補正画像および右補正画像)と撮像画像(左画像および右画像)とを混合する(ステップS8)。以上に示したような動作によって、混合された後の画像が提供される。   Subsequently, the mixing unit 160 mixes the corrected image (left corrected image and right corrected image) and the captured image (left image and right image) based on the mixing ratio calculated by the mixing ratio calculating unit 152 (Step S1). S8). The mixed image is provided by the operation as described above.

以上、画像処理装置10の動作の流れについて説明した。なお、本実施形態に係る技術は、既に開示されている先行技術文献に記載された技術とは異なっている。特開平11−32236号公報に開示された技術は、例えば、撮影により得られた画像に対してガンマ処理を施すことで暗部を持ち上げる技術である。かかる技術によれば、簡易に逆光補正を行うことができる。しかし、当該公報に開示された技術によれば、基本的に単一のガンマカーブを全画面に適用するため、暗部(例えば、前景部)以外にも影響が及んでしまうため適正露出領域(例えば、背景部)の階調が失われ、白飛びしてしまうという現象も生じ得る。また、画像の内容を見てガンマカーブを画像内の位置に応じて適応的に変化させる等の関連技術も存在するが、誤判定により画像が不自然になることが避けられない。   The operation flow of the image processing apparatus 10 has been described above. The technique according to the present embodiment is different from the technique described in the prior art documents that have already been disclosed. The technique disclosed in Japanese Patent Application Laid-Open No. 11-32236 is a technique for raising a dark part by performing gamma processing on an image obtained by photographing, for example. According to this technique, it is possible to easily perform backlight correction. However, according to the technique disclosed in the publication, since a single gamma curve is basically applied to the entire screen, it affects other than the dark part (for example, the foreground part), so the appropriate exposure region (for example, ), The gradation of the background portion is lost, and the phenomenon of whiteout may occur. Further, there are related techniques such as adaptively changing the gamma curve according to the position in the image by looking at the contents of the image, but it is inevitable that the image becomes unnatural due to erroneous determination.

特開2000−92378号公報に開示された技術では、露出を変えて撮影した2枚の画像を合成する技術であり、高い逆光補正効果を享受することができる。しかし、動きの速い物体が撮影された場合には、物体の位置のずれが大きくなるため合成後の画像が不自然な画像となってしまう。また、撮影時にモード設定してから2枚撮影を行う必要がある点が煩雑である。   The technique disclosed in Japanese Patent Laid-Open No. 2000-92378 is a technique for combining two images taken with different exposures, and can enjoy a high backlight correction effect. However, when a fast-moving object is photographed, the displacement of the object becomes large, and the combined image becomes an unnatural image. In addition, it is complicated that it is necessary to take two images after setting the mode at the time of photographing.

本実施形態に係る技術によれば、ステレオカメラで撮影された画像を対象とした逆光補正処理を行うことができ、処理対象のみを正確に補正する(非補正領域には影響を与えずに補正する)ことによって自然な処理結果を得ることが可能となる。また、本実施形態に係る技術によれば、撮影時にモード設定などを行う必要がなく、撮影後でも後処理によって逆光補正効果を享受することが可能である。   According to the technology according to the present embodiment, it is possible to perform backlight correction processing on an image captured by a stereo camera, and correct only the processing target accurately (correction without affecting the non-correction area). It is possible to obtain a natural processing result. Further, according to the technique according to the present embodiment, it is not necessary to perform mode setting or the like at the time of shooting, and it is possible to enjoy the backlight correction effect by post-processing even after shooting.

さらに、本実施形態に係る技術によれば、逆光時の暗部補正だけではなく画像の性質に応じた暗部補正を行うことも可能である。例えば、逆光時に被写体が暗くなってしまう状況やスポットライトやフラッシュが当たって被写体の背景が暗く沈んでしまう状況のいずれにも対応する幅広い暗部補正を行うことが可能である。   Furthermore, according to the technique according to the present embodiment, it is possible to perform not only the dark part correction at the time of backlighting but also the dark part correction according to the property of the image. For example, it is possible to perform a wide range of dark part correction corresponding to both a situation in which the subject becomes dark during backlighting and a situation in which the background of the subject becomes dark due to being hit with a spotlight or flash.

本実施形態に係る技術が奏する効果は、例えば、以下に示す通りである。まず、第1の効果としては、背景に影響を与えない逆光補正を行うことが可能であるという点が挙げられる。逆光時というのは、奥に光源のような明物体があり、その手前に被写体があることで、被写体が暗く沈んでしまうという状況である。本実施形態に係る技術では、ステレオ画像から取得した距離情報を基に、手前に位置する被写体のみを明るく補正することで、適正露出となっている背景領域には影響を与えずに逆光補正を行うことができる。   The effects produced by the technology according to the present embodiment are as follows, for example. First, as a first effect, it is possible to perform backlight correction without affecting the background. The backlight is a situation where there is a bright object such as a light source in the back and the subject is in front of it, causing the subject to sink darkly. In the technology according to the present embodiment, backlight correction is performed without affecting the background area that is appropriately exposed by brightly correcting only the subject located in front based on the distance information acquired from the stereo image. It can be carried out.

さらに、本実施形態に係る技術は、逆光時のみならず、スポットライトやフラッシュが当たって被写体の背景が暗く沈んでしまう状況にも対応可能である。すなわち、暗部に影響を与えない正確な暗部補正を行うことが可能であるという点である。例えば、逆光時には手前に位置する被写体のみを明るく補正することで適正露出となっている背景領域には影響を与えずに暗部を補正することができる。また、手前に明るい被写体がある場合には、背景のみを明るく補正することで適正露出となっている被写体には影響を与えずに暗部を補正することができる。本実施形態に係る技術によれば、手前を補正する手法を採用するか、奥を補正する手法を採用するかという判定を行って処理を切り換えるため、両方のパターンに対応することができる。   Furthermore, the technology according to the present embodiment can cope with not only the backlight but also the situation where the background of the subject sunk darkly due to the spotlight or flash. That is, it is possible to perform accurate dark part correction that does not affect the dark part. For example, it is possible to correct a dark part without affecting a background area that is appropriately exposed by correcting brightly only a subject located in front during backlighting. If there is a bright subject in front, the dark portion can be corrected without affecting the subject that is properly exposed by correcting only the background brightly. According to the technique according to the present embodiment, since it is determined whether to adopt a method for correcting the front side or a method for correcting the back side, the processing is switched, so that both patterns can be handled.

また、第2の効果としては、動きのある物体が撮影された場合でも自然な暗部補正を行うことが可能であるという点が挙げられる。2枚の画像を合成するという点においては、特開2000−92378号公報に開示された技術と変わりない。しかし、本発明の実施形態に係る技術では、補正後の画像と補正前の元画像とにおいて輝度のみが異なるため、動きのある物体が撮影された場合であっても、合成後の画像が不自然になるといった現象が生じることを防ぐことができる。すなわち、本発明の実施形態に係る技術は、撮影される物体の動きの有無に無関係に適用することができる。   A second effect is that natural dark part correction can be performed even when a moving object is photographed. In terms of synthesizing two images, it is the same as the technique disclosed in Japanese Patent Laid-Open No. 2000-92378. However, in the technology according to the embodiment of the present invention, since only the luminance is different between the corrected image and the original image before correction, the combined image is not correct even when a moving object is photographed. It can prevent the phenomenon of becoming natural. That is, the technology according to the embodiment of the present invention can be applied regardless of the presence or absence of movement of an object to be photographed.

また、第3の効果としては、撮影時のモード設定が不要であり、撮影後からでも補正を可能である点が挙げられる。本実施形態に係る技術においては、ステレオ画像から検出した距離情報を基に補正を行うので、暗部補正を行うか否かに関わらず、撮影時のモードは通常通りの設定のままでよい。そして、撮影後から必要に応じて補正処理を行えば暗部補正が可能である。   Further, as a third effect, there is no need to set a mode at the time of shooting, and correction can be made even after shooting. In the technique according to the present embodiment, correction is performed based on distance information detected from a stereo image, so the mode at the time of shooting may be set as usual regardless of whether or not dark portion correction is performed. And dark part correction | amendment is possible if a correction process is performed as needed after imaging | photography.

以上、添付図面を参照しながら本発明の好適な実施形態について詳細に説明したが、本発明はかかる例に限定されない。本発明の属する技術の分野における通常の知識を有する者であれば、特許請求の範囲に記載された技術的思想の範疇内において、各種の変更例または修正例に想到し得ることは明らかであり、これらについても、当然に本発明の技術的範囲に属するものと了解される。   The preferred embodiments of the present invention have been described in detail above with reference to the accompanying drawings, but the present invention is not limited to such examples. It is obvious that a person having ordinary knowledge in the technical field to which the present invention pertains can come up with various changes or modifications within the scope of the technical idea described in the claims. Of course, it is understood that these also belong to the technical scope of the present invention.

10 画像処理装置
20(20A,20B) カメラ
110(110A,110B) 現像処理部
120(120A,120B) 輝度補正部
130 視差検出部
140 輝度取得部
150 算出部
151 判定部
152 混合比率算出部
160(160A,160B) 混合部
DESCRIPTION OF SYMBOLS 10 Image processing apparatus 20 (20A, 20B) Camera 110 (110A, 110B) Development processing part 120 (120A, 120B) Luminance correction part 130 Parallax detection part 140 Luminance acquisition part 150 Calculation part 151 Determination part 152 Mixing ratio calculation part 160 ( 160A, 160B) Mixing section

Claims (6)

ステレオカメラにより撮像された左画像と右画像との間における左画像基準の視差と右画像基準の視差とをブロック毎に検出する視差検出部と、
前記左画像および前記右画像の各々の輝度を補正することにより左補正画像および右補正画像を生成する輝度補正部と、
前記左画像基準の視差に基づいて左画像混合用の混合比率を算出するとともに、前記右画像基準の視差に基づいて右画像混合用の混合比率を算出する混合比率算出部と、
前記左画像混合用の混合比率に基づいて前記左画像および前記左補正画像を混合するとともに、前記右画像混合用の混合比率に基づいて前記右画像および前記右補正画像を混合する混合部と、
を備え
前記混合比率算出部は、ブロック毎に検出された前記左画像基準の視差に基づいて左画像混合用の混合比率をブロック毎に算出するとともに、ブロック毎に検出された前記右画像基準の視差に基づいて右画像混合用の混合比率をブロック毎に算出し、
前記輝度補正部は、前記左画像および前記右画像の各々の輝度を高めることにより前記左補正画像および前記右補正画像を生成する、ことを特徴とする、画像処理装置。
A parallax detection unit that detects, for each block, a left image-based parallax and a right image-based parallax between a left image and a right image captured by a stereo camera;
A luminance correction unit that generates a left correction image and a right correction image by correcting the luminance of each of the left image and the right image;
A mixing ratio calculation unit that calculates a mixing ratio for mixing the left image based on the parallax based on the left image, and calculates a mixing ratio for mixing the right image based on the parallax based on the right image;
Mixing the left image and the left correction image based on the mixing ratio for the left image mixing, and mixing the right image and the right correction image based on the mixing ratio for the right image mixing;
Equipped with a,
The mixing ratio calculation unit calculates a mixing ratio for left image mixing for each block based on the left image reference parallax detected for each block, and calculates the right image reference parallax detected for each block. Based on this, the mixing ratio for right image mixing is calculated for each block,
The image processing apparatus, wherein the brightness correction unit generates the left correction image and the right correction image by increasing the brightness of each of the left image and the right image .
前記視差検出部は、ブロック毎に検出された前記左画像基準の視差に対するブロック間の線形補間により前記左画像基準の視差を画素毎に算出するとともに、ブロック毎に検出された前記右画像基準の視差に対するブロック間の線形補間により前記右画像基準の視差を画素毎に算出し、
前記混合比率算出部は、画素毎に算出された前記左画像基準の視差に基づいて左画像混合用の混合比率を画素毎に算出するとともに、画素毎に算出された前記右画像基準の視差に基づいて右画像混合用の混合比率を画素毎に算出する、
ことを特徴とする、請求項1に記載の画像処理装置。
The parallax detector calculates the parallax based on the left image for each pixel by linear interpolation between blocks with respect to the parallax based on the left image detected for each block, and the right image standard based on the right image detected for each block. Calculate the parallax based on the right image for each pixel by linear interpolation between blocks with respect to the parallax,
The mixing ratio calculation unit calculates a mixing ratio for left image mixing for each pixel based on the parallax based on the left image calculated for each pixel, and calculates the parallax based on the right image calculated for each pixel. Calculate the mixing ratio for the right image based on each pixel,
The image processing apparatus according to claim 1, wherein:
前記混合比率算出部は、前記視差が所定の範囲内に収まる場合、前記視差が大きいほど前記左補正画像および前記右補正画像に乗じられる混合比率を大きく算出する、
ことを特徴とする、請求項1に記載の画像処理装置。
When the parallax falls within a predetermined range, the mixing ratio calculation unit calculates a larger mixing ratio to be multiplied by the left correction image and the right correction image as the parallax increases.
The image processing apparatus according to claim 1, wherein:
前記画像処理装置は、
前記左画像および前記右画像の少なくともいずれか一方の画像の輝度と当該画像基準の視差との組み合わせの分布に基づいて混合比率算出手法を判定する判定部をさらに備え、
前記混合比率算出部は、前記混合比率算出手法を用いて、前記左画像混合用の混合比率および前記右画像混合用の混合比率を算出する、
ことを特徴とする、請求項1に記載の画像処理装置。
The image processing apparatus includes:
A determination unit that determines a mixture ratio calculation method based on a distribution of combinations of luminance of at least one of the left image and the right image and parallax of the image reference;
The mixing ratio calculation unit calculates the mixing ratio for the left image mixing and the mixing ratio for the right image mixing using the mixing ratio calculation method.
The image processing apparatus according to claim 1, wherein:
前記判定部は、第1の混合比率算出手法および第2の混合比率算出手法のいずれかを判定し、
前記混合比率算出部は、前記第1の混合比率算出手法を用いる場合には、前記視差が所定の第1範囲内に収まる場合、前記視差が大きいほど前記左補正画像および前記右補正画像に乗じられる混合比率を大きく算出し、前記第2の混合比率算出手法を用いる場合には、前記視差が所定の第2範囲内に収まる場合、前記視差が大きいほど前記左補正画像および前記右補正画像に乗じられる混合比率を小さく算出する、
ことを特徴とする、請求項に記載の画像処理装置。
The determination unit determines either the first mixing ratio calculation method or the second mixing ratio calculation method,
When the first mixing ratio calculation method is used, the mixing ratio calculation unit multiplies the left correction image and the right correction image as the parallax increases when the parallax falls within a predetermined first range. When the second mixing ratio calculation method is used and the parallax is within a predetermined second range, the larger the parallax is, the larger the parallax is, and the left correction image and the right correction image are calculated. Calculate the mixing ratio to be multiplied
The image processing apparatus according to claim 4 , wherein:
ステレオカメラにより撮像された左画像と右画像との間における左画像基準の視差と右画像基準の視差とをブロック毎に検出するステップと、
前記左画像および前記右画像の各々の輝度を補正することにより左補正画像および右補正画像を生成するステップと、
前記左画像基準の視差に基づいて左画像混合用の混合比率を算出するとともに、前記右画像基準の視差に基づいて右画像混合用の混合比率を算出するステップと、
前記左画像混合用の混合比率に基づいて前記左画像および前記左補正画像を混合するとともに、前記右画像混合用の混合比率に基づいて前記右画像および前記右補正画像を混合するステップと、
を含み、
ブロック毎に検出された前記左画像基準の視差に基づいて左画像混合用の混合比率をブロック毎に算出するとともに、ブロック毎に検出された前記右画像基準の視差に基づいて右画像混合用の混合比率をブロック毎に算出するステップと、
前記左画像および前記右画像の各々の輝度を高めることにより前記左補正画像および前記右補正画像を生成するステップと、を含むことを特徴とする、画像処理方法。
Detecting a left image-based parallax and a right image-based parallax between a left image and a right image captured by a stereo camera for each block;
Generating a left corrected image and a right corrected image by correcting the luminance of each of the left image and the right image;
Calculating a left image mixing ratio based on the left image reference parallax, and calculating a right image mixing ratio based on the right image reference parallax;
Mixing the left image and the left correction image based on the left image mixing ratio, and mixing the right image and the right correction image based on the right image mixing ratio;
Only including,
A mixing ratio for left image mixing is calculated for each block based on the parallax based on the left image detected for each block, and for right image mixing based on the parallax based on the right image detected for each block Calculating a mixing ratio for each block;
Generating the left corrected image and the right corrected image by increasing the luminance of each of the left image and the right image .
JP2012067240A 2012-03-23 2012-03-23 Image processing apparatus and image processing method Active JP6014343B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012067240A JP6014343B2 (en) 2012-03-23 2012-03-23 Image processing apparatus and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012067240A JP6014343B2 (en) 2012-03-23 2012-03-23 Image processing apparatus and image processing method

Publications (2)

Publication Number Publication Date
JP2013201500A JP2013201500A (en) 2013-10-03
JP6014343B2 true JP6014343B2 (en) 2016-10-25

Family

ID=49521407

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012067240A Active JP6014343B2 (en) 2012-03-23 2012-03-23 Image processing apparatus and image processing method

Country Status (1)

Country Link
JP (1) JP6014343B2 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4275344B2 (en) * 2002-01-22 2009-06-10 富士フイルム株式会社 Imaging apparatus, imaging method, and program
JP2006279546A (en) * 2005-03-29 2006-10-12 Nikon Corp Electronic camera, image processing program, and image processing method
JP5540942B2 (en) * 2010-06-29 2014-07-02 富士通セミコンダクター株式会社 Processing equipment
JP5585266B2 (en) * 2010-07-22 2014-09-10 セイコーエプソン株式会社 Image display device, image supply device, and image processing method
JP5909704B2 (en) * 2011-01-13 2016-04-27 パナソニックIpマネジメント株式会社 Stereoscopic image processing apparatus, stereoscopic image processing method, and program

Also Published As

Publication number Publication date
JP2013201500A (en) 2013-10-03

Similar Documents

Publication Publication Date Title
JP6046966B2 (en) Image processing apparatus, image processing method, program, and storage medium
US9936141B2 (en) Image processing apparatus for performing correction processing for effecting virtual light source and method executed by image processing apparatus
JP6020199B2 (en) Image processing apparatus, method, program, and imaging apparatus
JP5787648B2 (en) Image processing apparatus and image processing apparatus control method
CN106570838B (en) A kind of brightness of image optimization method and device
US8059187B2 (en) Image capturing apparatus
TW201212644A (en) Image processing apparatus, image taking apparatus, image processing method and image processing program
KR101932542B1 (en) Apparatus and method of calculating flicker-evaluation value
JP2016086246A (en) Image processing apparatus and method, and imaging device
JP2015144475A (en) Imaging apparatus, control method of the same, program and storage medium
JP6412386B2 (en) Image processing apparatus, control method therefor, program, and recording medium
JP2015204488A (en) Motion detection apparatus and motion detection method
KR101964228B1 (en) Image processing apparatus and image processing method
JP6227935B2 (en) Image processing apparatus and image processing method
JP6543787B2 (en) Image processing apparatus and image processing method
US9460492B2 (en) Apparatus and method for image processing
KR102247597B1 (en) Image processing apparatus and image processing method
JP6014343B2 (en) Image processing apparatus and image processing method
JP2009284025A (en) Image synthesis apparatus, image pickup apparatus, image synthesis method, and program
KR102282464B1 (en) Image processing apparatus and image processing method
KR101932541B1 (en) Apparatus and method for processing image
JP2014220759A (en) Image processing apparatus and image processing method
US20210366084A1 (en) Deblurring process for digital image processing
JP6543786B2 (en) Image processing apparatus and image processing method
JP2012160852A (en) Image composition device, imaging device, image composition method, and image composition program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150107

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20151225

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160112

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160331

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20160830

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160926

R150 Certificate of patent or registration of utility model

Ref document number: 6014343

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R371 Transfer withdrawn

Free format text: JAPANESE INTERMEDIATE CODE: R371

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250