JP2016072924A - Image processing system and image processing method - Google Patents

Image processing system and image processing method Download PDF

Info

Publication number
JP2016072924A
JP2016072924A JP2014203330A JP2014203330A JP2016072924A JP 2016072924 A JP2016072924 A JP 2016072924A JP 2014203330 A JP2014203330 A JP 2014203330A JP 2014203330 A JP2014203330 A JP 2014203330A JP 2016072924 A JP2016072924 A JP 2016072924A
Authority
JP
Japan
Prior art keywords
alignment
detected
image
specular reflection
area
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.)
Pending
Application number
JP2014203330A
Other languages
Japanese (ja)
Inventor
正人 内原
Masato Uchihara
正人 内原
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2014203330A priority Critical patent/JP2016072924A/en
Publication of JP2016072924A publication Critical patent/JP2016072924A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To speedily and precisely identify a light source color from plural photographic images.SOLUTION: First of all, a criteria image and a reference image are divided into plural blocks and a deviation amount between the images is obtained. Then, alignment is performed by affine transformation on the basis of the obtained deviation amount. Next, at a pixel position of a high-luminance pixel in at least one of the pieces of line data of the aligned images, the difference absolute value of a luminance value is calculated and threshold determination is performed to identify a mirror surface reflection area, and a difference between signal values is calculated to identify the light source color.SELECTED DRAWING: Figure 1

Description

本発明は、特に、光源色を推定するために用いて好適な画像処理装置及び画像処理方法に関する。   The present invention particularly relates to an image processing apparatus and an image processing method suitable for use in estimating a light source color.

従来、デジタルカメラやデジタルビデオカメラ等で撮影した画像から物体の鏡面反射領域を検出し、検出された鏡面反射領域より光源色を推定して撮影画像のホワイトバランスの精度を向上させる技術が知られている。ここで、物質からの反射光は、図5に示すように、鏡面反射光成分と乱反射光成分との2つに大きく分けることができる。   Conventionally, a technique for detecting the specular reflection area of an object from an image taken with a digital camera, a digital video camera, etc., estimating the light source color from the detected specular reflection area, and improving the white balance accuracy of the shot image is known. ing. Here, the reflected light from the substance can be broadly divided into two parts, a specular reflection light component and an irregular reflection light component, as shown in FIG.

鏡面反射光成分は光源色に等しい成分を含み、物質表面での入射角θiと反射角θrとが等しくなるときに強度が最大となる。一方、乱反射光成分は物質内で入射光が乱反射した後に出力される反射光成分であって物質色を含み、入射角及び反射角に対する強度の依存性はなく一様である。同一の物質表面の2点A、Bにおける反射光をそれぞれIa、Ibとすると、以下の(1)式および(2)式によって反射光成分が算出される。
Ia=fa×S+Da ・・・(1)
Ib=fb×S+Db ・・・(2)
The specular reflection light component includes a component equal to the light source color, and the intensity is maximum when the incident angle θ i and the reflection angle θ r on the material surface are equal. On the other hand, the irregularly reflected light component is a reflected light component that is output after incident light is irregularly reflected in the substance, includes the substance color, and is uniform with no dependency on the incident angle and the reflection angle. Assuming that the reflected light at two points A and B on the same material surface is Ia and Ib, the reflected light component is calculated by the following equations (1) and (2).
Ia = fa × S + Da (1)
Ib = fb × S + Db (2)

ここで、fa、fbは物体表面の2点A、Bにおける鏡面反射光の反射率を表し、前述の通り、入反射角に依存する。Sは鏡面反射光が物体表面で100%反射された場合の反射光強度を表す。また、Da、Dbは2点A、Bにおける乱反射光成分を表している。2点A、Bがそれぞれ同一物体表面の近傍に位置する場合、乱反射光成分Da、Dbはほぼ等しいとみなせるため、以下の(3)式が成り立つ。
(Ia−Ib)=(fa−fb)×S ・・・(3)
Here, fa and fb represent the reflectance of the specular reflection light at two points A and B on the object surface, and depend on the incident reflection angle as described above. S represents the intensity of the reflected light when the specular reflection light is reflected 100% on the object surface. Da and Db represent diffusely reflected light components at two points A and B, respectively. When the two points A and B are located in the vicinity of the same object surface, the irregularly reflected light components Da and Db can be regarded as being substantially equal, and therefore the following expression (3) is established.
(Ia−Ib) = (fa−fb) × S (3)

上記(3)式は2点A、Bでの反射光成分の差分(Ia−Ib)が鏡面反射光成分に比例することを示している。つまり鏡面反射領域の輝度差を検出すれば鏡面反射光成分(光源色)を推定することができる。   The above equation (3) indicates that the difference (Ia-Ib) of the reflected light components at the two points A and B is proportional to the specular reflected light component. That is, the specular reflection component (light source color) can be estimated by detecting the luminance difference in the specular reflection region.

この反射光の性質を利用して光源色を推定する方法は、例えば特許文献1及び2に開示されている。特許文献1には、ブロック毎に画素値を輝度に応じて分類し、最も明るい輝度領域の平均値と2番目に明るい輝度領域の平均値との少なくとも一部の差分に基づいて光源色を特定する技術が開示されている。また、特許文献2には、直線上を移動しながら撮影した複数の視差画像から視点の移動量に対して視差画像上の位置の変化量が比例しない特定領域を検出することにより鏡面反射領域を検出する技術が開示されている。   For example, Patent Documents 1 and 2 disclose a method of estimating a light source color by using the property of reflected light. In Patent Document 1, pixel values are classified according to luminance for each block, and the light source color is specified based on at least a partial difference between the average value of the brightest luminance region and the average value of the second brightest luminance region. Techniques to do this are disclosed. Further, Patent Document 2 discloses a specular reflection region by detecting a specific region in which a change amount of a position on a parallax image is not proportional to a movement amount of a viewpoint from a plurality of parallax images captured while moving on a straight line. Techniques for detection are disclosed.

特許第4447520号公報Japanese Patent No. 4447520 特許第3943288号公報Japanese Patent No. 3943288

しかしながら、特許文献1に示される従来技術では、差分をとる画像領域が一様な表面でない場合に、物体表面の色や模様が異なることによって乱反射光成分に違いが生じるため、検出される鏡面反射光成分の信頼度が低下してしまうという課題があった。また、特許文献2に示される従来技術では、曲線成分を抽出するために、撮像素子を直線上に移動させて複数枚撮影する必要があるため、デジタルビデオカメラ等の高速性が求められる機器については適用が困難である。   However, in the prior art disclosed in Patent Document 1, when the image area for which the difference is taken is not a uniform surface, a difference occurs in the diffuse reflection light component due to a difference in the color or pattern of the object surface. There has been a problem that the reliability of the light component is lowered. In the prior art disclosed in Patent Document 2, in order to extract a curve component, it is necessary to move the image pickup device on a straight line and photograph a plurality of images. Therefore, a device that requires high speed such as a digital video camera is required. Is difficult to apply.

本発明は前述の問題点に鑑み、複数の撮影画像から高速かつ高精度に光源色を特定できるようにすることを目的としている。   An object of the present invention is to make it possible to specify a light source color from a plurality of captured images at high speed and with high accuracy.

本発明に係る画像処理装置は、視差を有する複数の撮影画像を取得する取得手段と、前記複数の撮影画像の間で位置合わせを行う位置合わせ手段と、前記位置合わせ手段によって位置合わせされたそれぞれの撮影画像から輝度値が所定値以上の領域を検出し、前記検出された領域における前記複数の撮影画像の間の輝度値の差分から鏡面反射領域を検出する検出手段と、前記検出手段によって検出された鏡面反射領域の信号値の差分を算出して光源色を特定する特定手段と、を備えることを特徴とする。   An image processing apparatus according to the present invention includes an acquisition unit that acquires a plurality of captured images having parallax, an alignment unit that performs alignment between the plurality of captured images, and an alignment unit that is aligned by the alignment unit. Detecting a region having a luminance value equal to or greater than a predetermined value from the photographed image, and detecting a specular reflection region from a difference in luminance value between the plurality of photographed images in the detected region; and detecting by the detection unit And a specifying means for calculating a difference between signal values of the specular reflection area and specifying a light source color.

本発明によれば、複数の撮影画像から高速かつ高精度に光源色を特定することができる。   According to the present invention, a light source color can be specified from a plurality of captured images at high speed and with high accuracy.

実施形態に係るデジタルビデオカメラの構成例を示すブロック図である。It is a block diagram which shows the structural example of the digital video camera which concerns on embodiment. 実施形態における基本的な処理手順の一例を示すフローチャートである。It is a flowchart which shows an example of the basic process sequence in embodiment. 画像変換部による位置合わせ処理の詳細な手順の一例を示すフローチャートである。It is a flowchart which shows an example of the detailed procedure of the alignment process by an image conversion part. 鏡面反射領域の検出処理及び光源色の推定処理の詳細な手順の一例を示すフローチャートである。It is a flowchart which shows an example of the detailed procedure of the detection process of a specular reflection area | region, and the estimation process of a light source color. 鏡面反射光成分および乱反射光成分を説明するための図である。It is a figure for demonstrating a specular reflection light component and an irregular reflection light component. 複数のブロックに分割された視差画像を説明するための図である。It is a figure for demonstrating the parallax image divided | segmented into the some block. ズレ量を算出する手順を説明するための図である。It is a figure for demonstrating the procedure which calculates the deviation | shift amount. アフィン変換に使用するズレ量を選択する方法を説明するための図である。It is a figure for demonstrating the method to select the deviation | shift amount used for an affine transformation. 位置合わせ後の視差画像においてブロック分割する方法を説明するための図である。It is a figure for demonstrating the method to divide | segment a block in the parallax image after alignment. カラーフィルターの一例を示す図である。It is a figure which shows an example of a color filter. R、G、Bプレーンを作成するためのフィルターを示す図である。It is a figure which shows the filter for producing R, G, B plane. ラインデータの方向を示す図である。It is a figure which shows the direction of line data. ラインデータを切り出す位置及び輝度値を示す図である。It is a figure which shows the position and luminance value which cut out line data. 鏡面反射領域を特定する方法を説明するための図である。It is a figure for demonstrating the method of specifying a specular reflection area | region. 視差のある2枚の画像にオクルージョン領域が発生する場合の例を示す図である。It is a figure which shows the example in case an occlusion area | region generate | occur | produces in two images with parallax. 低輝度領域を含むライン上の輝度分布の一例を示す図である。It is a figure which shows an example of the luminance distribution on the line containing a low-intensity area | region.

以下に、本発明の好ましい実施形態を、添付の図面に基づいて詳細に説明する。
図1は、本実施形態に係るデジタルビデオカメラ100の構成例を示すブロック図である。
図1において、操作入力部101は、ユーザーからの撮影指示を制御部102に伝えるための入力ボタンであり、制御部102は、操作入力部101からの指示を受けてデジタルビデオカメラ100全体の制御を行う。
Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.
FIG. 1 is a block diagram illustrating a configuration example of a digital video camera 100 according to the present embodiment.
In FIG. 1, an operation input unit 101 is an input button for transmitting a shooting instruction from a user to the control unit 102, and the control unit 102 controls the entire digital video camera 100 in response to an instruction from the operation input unit 101. I do.

撮像部103は、光学レンズとCCDやCMOS素子のセンサーとを備え、センサーの前段には入射光をRGBの各色成分に分離するカラーフィルターを備える。カラーフィルターは、一般的には図10(a)に示すようなベイヤー配列のカラーフィルターが用いられる。AD変換部104は、撮像部103からの入力信号を画像データに変換し、記憶部105に保存する。記憶部105は、画像データを一時的に保持するための内部メモリであり、DRAM等の揮発性メモリで構成される。   The imaging unit 103 includes an optical lens and a sensor such as a CCD or CMOS element, and includes a color filter that separates incident light into RGB color components in front of the sensor. As a color filter, a Bayer color filter as shown in FIG. 10A is generally used. The AD conversion unit 104 converts an input signal from the imaging unit 103 into image data and stores the image data in the storage unit 105. The storage unit 105 is an internal memory for temporarily storing image data, and includes a volatile memory such as a DRAM.

カメラ位置検出部106は、撮影時のカメラ位置を検出するための位置検出器である。具体的には、画像毎にデジタルビデオカメラ100の上下、左右および前後の位置変動を検知するための加速度センサーと、デジタルビデオカメラ100の水平角及び垂直角の位置変動を検知するためのジャイロセンサーとからなる。画像変換部107は、視差量のある2枚の画像データの各領域における動きベクトルを基に画像変換を行うことにより、連続して撮影された2枚の画像データの位置合わせを行う。   The camera position detection unit 106 is a position detector for detecting the camera position at the time of shooting. Specifically, an acceleration sensor for detecting vertical, horizontal, and front-back position fluctuations of the digital video camera 100 for each image, and a gyro sensor for detecting horizontal and vertical position fluctuations of the digital video camera 100. It consists of. The image conversion unit 107 performs alignment of two pieces of image data captured successively by performing image conversion based on the motion vector in each region of the two pieces of image data having a parallax amount.

鏡面反射領域検出部108は、画像中の高輝度領域を検出し、検出した高輝度領域における輝度値の差分を算出し、算出された値をあらかじめ設定された閾値と比較することにより鏡面反射領域を特定する。光源色検出部109は、検出された鏡面反射領域におけるR、G、Bの各信号値の差分から光源色成分を算出する。   The specular reflection area detection unit 108 detects a high luminance area in the image, calculates a difference in luminance value in the detected high luminance area, and compares the calculated value with a preset threshold value to thereby determine the specular reflection area. Is identified. The light source color detection unit 109 calculates a light source color component from the difference between the R, G, and B signal values in the detected specular reflection region.

画像処理部110は、算出された光源色成分をもとに画像データに対してホワイトバランス処理を施すとともに、NR、エッジ強調などの各種現像処理を施す。画像圧縮部111は、現像後の画像データを圧縮してJPEG等のデータ形式に変換する。外部記憶装置113は、圧縮された画像データを保存するためのSDカード等の外部記憶メモリである。外部記憶制御部112は、外部記憶装置113との間で画像データの読み出し及び書き込みを制御する。   The image processing unit 110 performs white balance processing on the image data based on the calculated light source color component, and performs various development processing such as NR and edge enhancement. The image compression unit 111 compresses the developed image data and converts it into a data format such as JPEG. The external storage device 113 is an external storage memory such as an SD card for storing compressed image data. The external storage control unit 112 controls reading and writing of image data with the external storage device 113.

図2は、本実施形態における基本的な処理手順の一例を示すフローチャートである。
まず、ユーザーの操作により操作入力部101から撮影指示を受けると処理を開始し、S201において、撮像部103およびAD変換部104により、複数枚の画像を連続して撮影し、記憶部105に複数の撮影画像を保存する。また、カメラ位置検出部106は、画像毎に撮影時のカメラ位置情報を検出する。そして、制御部102は、検出されたカメラ位置情報をもとに、連続して撮影された撮影画像の中から所望の位置変動を持った画像(以降、視差画像)を検出する。
FIG. 2 is a flowchart showing an example of a basic processing procedure in the present embodiment.
First, when a shooting instruction is received from the operation input unit 101 by a user operation, processing is started. In S201, a plurality of images are continuously shot by the imaging unit 103 and the AD conversion unit 104, and a plurality of images are stored in the storage unit 105. Save the captured images. Moreover, the camera position detection part 106 detects the camera position information at the time of imaging | photography for every image. Based on the detected camera position information, the control unit 102 detects an image (hereinafter referred to as a parallax image) having a desired position variation from continuously captured images.

続いてS202において、画像変換部107は、検出された2枚の視差画像のズレ量ベクトル(動きベクトル)を基に画像変換を行い、2枚の画像の位置合わせを行う。なお、この処理の詳細については後述するが、本実施形態では画像変換としてアフィン変換を用いる。このため、S201で検出する視差画像は、アフィン変換で位置合わせできる上下・左右の平行移動分の位置変動がある画像のみを対象とする。   Subsequently, in S202, the image conversion unit 107 performs image conversion based on the detected displacement vector (motion vector) of the two parallax images, and aligns the two images. Although details of this processing will be described later, in this embodiment, affine transformation is used as image transformation. For this reason, the parallax image detected in S201 is only an image having a positional variation corresponding to vertical and horizontal translation that can be aligned by affine transformation.

また、S201では、アフィン変換で位置合わせできない水平角、垂直角の位置変動のある画像は視差画像として検出しないようにする。さらに画像の拡大・縮小に影響する前後移動についても位置合わせの精度が低下する恐れがあるため視差画像として用いないものとする。代わりに、カメラ位置の水平角、垂直角の位置変動については、射影変換による画像変換を用いることによって位置合わせを行うことができる。ただしその場合、ズレ量ベクトルの算出および位置合わせにかかる計算量はアフィン変換に比べ増大するため、アフィン変換を用いて位置合わせを行う方がより好ましい。   Also, in S201, an image with horizontal and vertical angle variations that cannot be aligned by affine transformation is not detected as a parallax image. Further, the forward / backward movement that affects the enlargement / reduction of the image may not be used as a parallax image because there is a possibility that the alignment accuracy may be lowered. Instead, the position variation of the horizontal angle and the vertical angle of the camera position can be aligned by using image conversion by projective conversion. However, in this case, the calculation amount for calculating and aligning the deviation amount vector increases as compared with the affine transformation, and therefore it is more preferable to perform the alignment using the affine transformation.

続いてS203において、鏡面反射領域検出部108は、位置合わせされた2枚の視差画像間の輝度の差分絶対値を算出することにより鏡面反射領域を特定する。そして、光源色検出部109は、特定した鏡面反射領域におけるR,G,B各信号値の差分から光源色を推定する。   Subsequently, in S203, the specular reflection area detection unit 108 specifies the specular reflection area by calculating the absolute value of the luminance difference between the two aligned parallax images. Then, the light source color detection unit 109 estimates the light source color from the difference between the R, G, and B signal values in the specified specular reflection region.

次のS204においては、画像処理部110は、推定された光源色を基にWB処理を実施する。そして、S205において、画像処理部110は、WB処理が施された画像に対してノイズリダクションやエッジ強調等の各種画像処理を施し、YUV形式のデータに変換する。続いてS206において、画像圧縮部111は、YUV形式のデータをJPEG形式の画像データに圧縮する。そして、S207において、外部記憶制御部112は、圧縮された画像データを外部記憶装置113に保存し、処理を終了する。   In the next S204, the image processing unit 110 performs WB processing based on the estimated light source color. In step S <b> 205, the image processing unit 110 performs various image processing such as noise reduction and edge enhancement on the image that has been subjected to the WB processing, and converts the image into YUV format data. In step S <b> 206, the image compression unit 111 compresses YUV format data into JPEG format image data. In step S207, the external storage control unit 112 stores the compressed image data in the external storage device 113, and ends the process.

図3は、図2のS202における画像変換部107による位置合わせ処理の詳細な手順の一例を示すフローチャートである。
まず、S301において、検出された2枚の視差画像のうち、最初に撮影された方を基準画像、後に撮影された方を第1の参照画像とする。そして、それぞれの視差画像を、制御部102及び画像処理部110により、図10(a)に示すベイヤー配列からYUV形式のデータに簡易現像した後、図6に示すように、基準画像601及び第1の参照画像602を複数のブロックに分割する。
FIG. 3 is a flowchart illustrating an example of a detailed procedure of the alignment processing by the image conversion unit 107 in S202 of FIG.
First, in S301, of the two detected parallax images, the first captured image is defined as a reference image, and the later captured parallax image is defined as a first reference image. Then, the parallax images are simply developed from the Bayer array shown in FIG. 10A to YUV format data by the control unit 102 and the image processing unit 110, and then, as shown in FIG. One reference image 602 is divided into a plurality of blocks.

続いてS302において、それぞれのブロックについて、基準画像601と第1の参照画像602との間のズレ量を求める。ズレ量の算出方法としては、図7(a)に示す位置から、基準ブロック603内で参照ブロック604を移動させながら相関値を求める。そして、図7(b)に示すように相関値が最も小さい位置までの動きベクトルをその領域のズレ量とする。相関値としては、例えば差分絶対値和(SAD)などがある。差分絶対値和による相関値を算出する方法については、例えば特許第4781233号公報に記載されている方法を用いる。   Subsequently, in S302, a shift amount between the base image 601 and the first reference image 602 is obtained for each block. As a method of calculating the deviation amount, the correlation value is obtained while moving the reference block 604 within the standard block 603 from the position shown in FIG. Then, as shown in FIG. 7B, the motion vector up to the position where the correlation value is the smallest is taken as the shift amount of the area. Examples of the correlation value include a sum of absolute differences (SAD). As a method for calculating the correlation value based on the sum of absolute differences, for example, a method described in Japanese Patent No. 4781233 is used.

続いてS303において、検出された各ブロックのズレ量を基に、被写体の位置ずれ量を示すパラメータを算出する。本実施形態では、位置合わせにアフィン変換を使用するため、アフィン変換のパラメータを算出する。パラメータの算出手順は、まず、図8に示すように、S302で検出された各ブロックのズレ量から、アフィン変換に使用するズレ量を選択する。ズレ量の選択は、図8に示すように、全体のズレ量ベクトル801の傾向と合致しているズレ量を選択する。これは移動体の影響で、誤検出したズレ量ベクトルの影響を取り除くためである。   Subsequently, in S303, a parameter indicating the amount of displacement of the subject is calculated based on the detected amount of displacement of each block. In this embodiment, since affine transformation is used for alignment, affine transformation parameters are calculated. In the parameter calculation procedure, first, as shown in FIG. 8, a shift amount used for affine transformation is selected from the shift amount of each block detected in S302. As shown in FIG. 8, the shift amount is selected by selecting a shift amount that matches the tendency of the overall shift amount vector 801. This is to remove the influence of the misdetected deviation vector due to the influence of the moving body.

続いて、前記選択したズレ量からアフィンパラメータを推定する。アフィン変換は、並行移動、回転移動、および拡大・縮小のみと仮定すると、次の(4)式のように表わされる。   Subsequently, an affine parameter is estimated from the selected shift amount. Assuming that the affine transformation is only parallel movement, rotational movement, and enlargement / reduction, it is expressed as the following equation (4).

ここで、A、B、C、Dはアフィンパラメータを表し、座標(x,y)は入力画像の座標を表し、座標(x',y')は出力画像の座標を表す。ズレ量は入力座標と出力座標との組み合わせと考えることができるため、前述したように、最低2つのズレ量を選択すれば、4つの未知数に対して式が4つできるため、アフィンパラメータを決定することができる。   Here, A, B, C, and D represent affine parameters, coordinates (x, y) represent the coordinates of the input image, and coordinates (x ′, y ′) represent the coordinates of the output image. Since the amount of deviation can be considered as a combination of input coordinates and output coordinates, as described above, if at least two deviation amounts are selected, four equations can be made for the four unknowns, so the affine parameters are determined. can do.

続いてS304において、S303で算出したアフィンパラメータに基づいて第1の参照画像にアフィン変換を施す。アフィン変換によって第1の参照画像は、基準画像と重なるような形に変形(位置合わせ)される。位置合わせされた第1の参照画像は第2の参照画像として記憶部105に保存される。   Subsequently, in S304, affine transformation is performed on the first reference image based on the affine parameters calculated in S303. By the affine transformation, the first reference image is deformed (aligned) so as to overlap the base image. The aligned first reference image is stored in the storage unit 105 as a second reference image.

図4は、図2のS203における鏡面反射領域の検出処理及び光源色の推定処理の詳細な手順の一例を示すフローチャートである。
まず、S401において、鏡面反射領域検出部108は、図9に示すように、基準画像601のうち、第2の参照画像901の含まれる画像領域を有効領域902として複数のブロックに分割する。以降、基準画像601と第2の参照画像901とのそれぞれから切り出したブロックを基準ブロック、参照ブロックとする。次に、S402において、鏡面反射領域検出部108は、1つの基準ブロック及び参照ブロックを選択する。
FIG. 4 is a flowchart illustrating an example of a detailed procedure of the specular reflection region detection process and the light source color estimation process in S203 of FIG.
First, in S401, the specular reflection area detection unit 108 divides an image area including the second reference image 901 in the standard image 601 into a plurality of blocks as an effective area 902, as shown in FIG. Hereinafter, a block cut out from each of the standard image 601 and the second reference image 901 will be referred to as a standard block and a reference block. Next, in S402, the specular reflection area detection unit 108 selects one reference block and reference block.

続いてS403において、鏡面反射領域検出部108は、選択した基準ブロック及び参照ブロックの各画素位置での輝度データを算出する。輝度データを算出する際には、まず、ベイヤー配列の画像データから、図10(b)〜図10(d)に示すように、R、G、Bそれぞれの信号のみを抽出した後、図11に示すようなフィルターを施し、R、G、Bプレーンを作成する。そして、各プレーンの同じ画素位置から以下の(5)式を用いてそれぞれの画素位置による簡易輝度値Yを求めることにより輝度データを算出する。
Y=0.3×R+0.6×G+0.1×B ・・・(5)
Subsequently, in S403, the specular reflection area detection unit 108 calculates luminance data at each pixel position of the selected standard block and reference block. When calculating the luminance data, first, only the R, G, and B signals are extracted from the image data of the Bayer array as shown in FIGS. The R, G, and B planes are created by applying the filter shown in FIG. Then, luminance data is calculated by obtaining a simple luminance value Y at each pixel position from the same pixel position on each plane using the following equation (5).
Y = 0.3 × R + 0.6 × G + 0.1 × B (5)

続いてS404において、鏡面反射領域検出部108は、算出された輝度データを用いて、ブロック中に輝度値が所定値以上の高輝度画像領域が存在するか否かを判定する。鏡面反射が生じている画像領域は乱反射光成分と鏡面反射光成分との両方の成分が含まれるため、輝度値が高くなる。この特性を利用して、鏡面反射領域を特定する際には、高輝度画像領域が含まれるブロックのみを対象に移行の処理を実施する。ただし、輝度が飽和している画像領域に関しては鏡面反射光成分の検出精度が低下してしまうため使用しないようにする。この判定の結果、高輝度画像領域が存在しない場合はS402に戻り、次のブロックを選択する。   Subsequently, in S404, the specular reflection area detection unit 108 determines whether or not a high-luminance image area having a luminance value equal to or greater than a predetermined value exists in the block, using the calculated luminance data. Since the image area where the specular reflection occurs includes both the irregular reflection light component and the specular reflection light component, the luminance value becomes high. When the specular reflection area is specified using this characteristic, the migration process is performed only on the block including the high-luminance image area. However, the image area where the brightness is saturated is not used because the detection accuracy of the specular reflection light component is lowered. If the result of this determination is that there is no high brightness image area, processing returns to S402 and the next block is selected.

一方、S404の判定の結果、高輝度画像領域が存在する場合は、S405に進む。そして、S405において、鏡面反射領域検出部108は、基準ブロック及び参照ブロックそれぞれの輝度データから、図13(a)及び図13(b)に示すように1ライン分の輝度データ(以降、ラインデータ)を切り出す。このとき、切り出すラインデータの方向は、図12(a)〜図12(d)に示すような縦、横、斜め4方向のうち、図3のS303で検出したズレ量方向に最も近い方向とする。以降、基準ブロックから抽出されたラインデータを基準ラインデータと呼び、参照ブロックから抽出されたラインデータを参照ラインデータと呼ぶ。   On the other hand, if the result of determination in S404 is that there is a high-luminance image area, the process proceeds to S405. In step S405, the specular reflection area detection unit 108 determines luminance data for one line (hereinafter, line data) from the luminance data of the base block and the reference block, as shown in FIGS. 13 (a) and 13 (b). ). At this time, the direction of the line data to be cut out is the direction closest to the shift amount direction detected in S303 of FIG. 3 among the four vertical, horizontal, and diagonal directions as shown in FIGS. 12 (a) to 12 (d). To do. Hereinafter, line data extracted from the reference block is referred to as reference line data, and line data extracted from the reference block is referred to as reference line data.

続いてS406において、鏡面反射領域検出部108は、図14に示すように、基準ラインデータと参照ラインデータとの少なくともどちらか一方に高輝度の画素が存在する画素位置において、輝度値の差分絶対値を算出し、閾値判定を行う。前述のように、鏡面反射が生じている領域では、視差による物体表面での入反射角の変化により反射光成分の強度に差異が生じる。この違いを検出することにより、光源色を推定することが可能な鏡面反射領域が特定される。   Subsequently, in S406, as shown in FIG. 14, the specular reflection area detection unit 108 calculates the absolute difference in luminance value at a pixel position where a high luminance pixel exists in at least one of the standard line data and the reference line data. A value is calculated and a threshold value is determined. As described above, in the region where the specular reflection occurs, a difference occurs in the intensity of the reflected light component due to the change in the incident / reflection angle on the object surface due to the parallax. By detecting this difference, a specular reflection region in which the light source color can be estimated is specified.

ただし、物体表面の形状によっては、図15に示すように、視差のある2枚の画像に死角(オクルージョン領域)が発生する場合がある。オクルージョンによる輝度の差分値が鏡面反射領域として検出されてしまうと、光源色を推定する精度を低下させてしまう。オクルージョンは高コントラストのエッジ部で発生し易いため、高コントラストのエッジ部を検出して光源色を推定する範囲から取り除く必要がある。そこで、例えば図16に示すように、隣り合う高輝度領域A、B間の距離Lを算出する。距離Lが図3のS303で検出された位置ズレ量dよりも小さく、かつ隣り合う高輝度領域A、Bの間に所定の閾値Yth2よりも輝度値の低い低輝度領域が存在する場合は、高コントラストのエッジ部とみなす。したがって、この条件を満たす場合は光源色を推定する範囲から取り除く。   However, depending on the shape of the object surface, a blind spot (occlusion area) may occur in two images with parallax, as shown in FIG. If the luminance difference value due to occlusion is detected as the specular reflection region, the accuracy of estimating the light source color is lowered. Since occlusion is likely to occur at a high-contrast edge, it is necessary to detect the high-contrast edge and remove it from the range in which the light source color is estimated. Therefore, for example, as shown in FIG. 16, a distance L between the adjacent high luminance areas A and B is calculated. When the distance L is smaller than the positional shift amount d detected in S303 of FIG. 3 and there is a low luminance area having a luminance value lower than the predetermined threshold Yth2 between the adjacent high luminance areas A and B, Considered as a high contrast edge. Therefore, when this condition is satisfied, the light source color is removed from the estimated range.

続いてS407において、鏡面反射領域検出部108は、取得したラインデータがブロック内の最終ラインか否かを判定する。この判定の結果、最終ラインでない場合はS405に戻り、同様の処理を繰り返す。一方、最終ラインである場合は、次のS408に進む。   Subsequently, in S407, the specular reflection area detection unit 108 determines whether or not the acquired line data is the last line in the block. If the result of this determination is not the final line, the process returns to S405 and the same processing is repeated. On the other hand, if it is the last line, the process proceeds to the next S408.

続いてS408において、光源色検出部109は、検出された鏡面反射領域に対応する基準ブロックおよび参照ブロックの各R、G、Bプレーンから信号値の差分を算出して鏡面反射光成分を抽出する。   Subsequently, in S408, the light source color detection unit 109 calculates a difference in signal value from each of the R, G, and B planes of the reference block and reference block corresponding to the detected specular reflection area, and extracts the specular reflection light component. .

ここで、抽出される鏡面反射光成分は、ブロック内で検出された各鏡面反射領域の輝度差に依存して異なる。例えば、領域X、Yにおける信号値をX(R,G,B)、Y(R,G,B)とし、X(100,200,400)、Y(10,20,40)である場合は、光の強さは10倍異なる。ところが、光源色が等しい場合は同じホワイトバランスゲインが得られる。例えば、領域X、Yから算出されるR、Bに対するホワイトバランスゲインをそれぞれGainR(X)、GainR(Y)、GainB(X)とGainB(Y)とする。この場合、算出されるR、Bそれぞれのホワイトバランスゲインは、以下の(6)式〜(9)式に示すように同じ値となる。
GainR(X)=200/100=2.0 ・・・(6)
GainB(X)=200/400=0.5 ・・・(7)
GainR(Y)=20/10=2.0 ・・・(8)
GainB(Y)=20/40=0.5 ・・・(9)
Here, the specular reflection light component to be extracted differs depending on the luminance difference of each specular reflection area detected in the block. For example, when the signal values in the regions X and Y are X (R, G, B) and Y (R, G, B), and X (100, 200, 400), Y (10, 20, 40) The light intensity is 10 times different. However, when the light source colors are equal, the same white balance gain can be obtained. For example, the white balance gains for R and B calculated from the regions X and Y are GainR (X), GainR (Y), GainB (X), and GainB (Y), respectively. In this case, the calculated R and B white balance gains have the same value as shown in the following equations (6) to (9).
GainR (X) = 200/100 = 2.0 (6)
GainB (X) = 200/400 = 0.5 (7)
GainR (Y) = 20/10 = 2.0 (8)
GainB (Y) = 20/40 = 0.5 (9)

後述するS410では、ブロック全体で検出された鏡面反射領域におけるホワイトバランスゲインの平均値を算出することにより、光源色を推定する精度が向上することが見込まれる。   In S410, which will be described later, it is expected that the accuracy of estimating the light source color is improved by calculating the average value of the white balance gain in the specular reflection area detected in the entire block.

続いてS409において、光源色検出部109は、選択されたブロックが、画像内の最終ブロックか否かを判定する。この判定の結果、最終ブロックでない場合はS402に戻り、同様の処理を繰り返す。一方、S409の判定の結果、選択されたブロックが最終ブロックである場合は、S410に進む。   In step S409, the light source color detection unit 109 determines whether the selected block is the last block in the image. If the result of this determination is that it is not the last block, the process returns to S402 and the same processing is repeated. On the other hand, if the result of determination in S409 is that the selected block is the last block, the process proceeds to S410.

S410においては、光源色検出部109は、各ブロックで算出されたホワイトバランスゲインの平均値をそれぞれ算出し、光源色を推定する。このように、画像全体から検出された光源色(ホワイトバランスゲイン)の平均値を算出することにより、精度良く光源色を推定することが可能となる。   In S410, the light source color detection unit 109 calculates the average value of the white balance gain calculated in each block, and estimates the light source color. Thus, by calculating the average value of the light source colors (white balance gain) detected from the entire image, the light source color can be estimated with high accuracy.

以上のように本実施形態によれば、まず、基準画像と参照画像とで位置合わせを行うことにより、鏡面反射成分を検出する際に乱反射光成分の影響を低減させる。そして、位置合わせされた2枚の画像の輝度差から鏡面反射光成分を検出するようにしたので、高速かつ精度良く光源色を推定することができる。以上、本発明の好ましい実施形態について説明したが、本発明はこれらの実施形態に限定されず、その要旨の範囲内で種々の変形及び変更が可能である。   As described above, according to the present embodiment, first, the base image and the reference image are aligned, thereby reducing the influence of the irregularly reflected light component when detecting the specular reflection component. Since the specular reflection light component is detected from the luminance difference between the two aligned images, the light source color can be estimated at high speed and with high accuracy. As mentioned above, although preferable embodiment of this invention was described, this invention is not limited to these embodiment, A various deformation | transformation and change are possible within the range of the summary.

(その他の実施形態)
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other embodiments)
The present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

102 制御部
103 撮像部
106 カメラ位置検出部
107 画像変換部
108 鏡面反射領域検出部
109 光源色検出部
DESCRIPTION OF SYMBOLS 102 Control part 103 Image pick-up part 106 Camera position detection part 107 Image conversion part 108 Specular reflection area detection part 109 Light source color detection part

Claims (6)

視差を有する複数の撮影画像を取得する取得手段と、
前記複数の撮影画像の間で位置合わせを行う位置合わせ手段と、
前記位置合わせ手段によって位置合わせされたそれぞれの撮影画像から輝度値が所定値以上の領域を検出し、前記検出された領域における前記複数の撮影画像の間の輝度値の差分から鏡面反射領域を検出する検出手段と、
前記検出手段によって検出された鏡面反射領域の信号値の差分を算出して光源色を特定する特定手段と、
を備えることを特徴とする画像処理装置。
Acquisition means for acquiring a plurality of captured images having parallax;
Alignment means for performing alignment between the plurality of captured images;
An area having a luminance value greater than or equal to a predetermined value is detected from each captured image aligned by the alignment means, and a specular reflection area is detected from the difference in luminance value between the plurality of captured images in the detected area. Detecting means for
A specifying means for calculating a difference between the signal values of the specular reflection area detected by the detecting means and specifying a light source color;
An image processing apparatus comprising:
前記検出手段は、前記輝度値が所定値以上の隣り合う領域の間の距離が前記位置合わせを行ったズレ量よりも小さく、かつ前記隣り合う領域の間に輝度値が所定の閾値よりも低い領域が存在する場合は、当該領域を鏡面反射領域として検出しないようにすることを特徴とする請求項1に記載の画像処理装置。   The detecting means is configured such that the distance between adjacent areas having the luminance value equal to or greater than a predetermined value is smaller than the amount of deviation in which the alignment is performed, and the luminance value is lower than a predetermined threshold value between the adjacent areas. The image processing apparatus according to claim 1, wherein when an area exists, the area is not detected as a specular reflection area. 前記位置合わせ手段は、上下または左右の位置変動のある撮影画像の間で位置合わせを行うことを特徴とする請求項1又は2に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the alignment unit performs alignment between captured images having positional fluctuations in the vertical and horizontal directions. 前記位置合わせ手段は、アフィン変換または射影変換を用いて位置合わせを行うことを特徴とする請求項1〜3の何れか1項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the alignment unit performs alignment using affine transformation or projective transformation. 前記検出手段は、前記位置合わせ手段によって位置合わせされた方向に基づくラインごとに鏡面反射領域を検出することを特徴とする請求項1〜4の何れか1項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the detection unit detects a specular reflection region for each line based on the direction aligned by the alignment unit. 視差を有する複数の撮影画像を取得する取得工程と、
前記複数の撮影画像の間で位置合わせを行う位置合わせ工程と、
前記位置合わせ工程において位置合わせされたそれぞれの撮影画像から輝度値が所定値以上の領域を検出し、前記検出された領域における前記複数の撮影画像の間の輝度値の差分から鏡面反射領域を検出する検出工程と、
前記検出工程において検出された鏡面反射領域の信号値の差分を算出して光源色を特定する特定工程と、
を備えることを特徴とする画像処理方法。
An acquisition step of acquiring a plurality of captured images having parallax;
An alignment step of performing alignment between the plurality of captured images;
An area having a luminance value greater than or equal to a predetermined value is detected from each of the captured images aligned in the alignment step, and a specular reflection area is detected from a difference in luminance values between the plurality of captured images in the detected area. A detection step to
A specific step of calculating a difference between the signal values of the specular reflection area detected in the detection step and specifying a light source color;
An image processing method comprising:
JP2014203330A 2014-10-01 2014-10-01 Image processing system and image processing method Pending JP2016072924A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014203330A JP2016072924A (en) 2014-10-01 2014-10-01 Image processing system and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014203330A JP2016072924A (en) 2014-10-01 2014-10-01 Image processing system and image processing method

Publications (1)

Publication Number Publication Date
JP2016072924A true JP2016072924A (en) 2016-05-09

Family

ID=55865148

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014203330A Pending JP2016072924A (en) 2014-10-01 2014-10-01 Image processing system and image processing method

Country Status (1)

Country Link
JP (1) JP2016072924A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019223617A1 (en) * 2018-05-22 2019-11-28 京东方科技集团股份有限公司 Dual-camera module, electronic device, and image acquisition method
WO2021112009A1 (en) * 2019-12-06 2021-06-10 ソニーグループ株式会社 Information processing system and learning method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019223617A1 (en) * 2018-05-22 2019-11-28 京东方科技集团股份有限公司 Dual-camera module, electronic device, and image acquisition method
US11245825B2 (en) 2018-05-22 2022-02-08 Beijing Boe Optoelectronics Technology Co., Ltd. Dual-camera module, electronic device, and image acquisition method
WO2021112009A1 (en) * 2019-12-06 2021-06-10 ソニーグループ株式会社 Information processing system and learning method

Similar Documents

Publication Publication Date Title
CA2969482C (en) Method and apparatus for multiple technology depth map acquisition and fusion
US7868922B2 (en) Foreground/background segmentation in digital images
JP6833415B2 (en) Image processing equipment, image processing methods, and programs
US9508153B2 (en) Distance measurement apparatus, imaging apparatus, distance measurement method, and program
US20150278996A1 (en) Image processing apparatus, method, and medium for generating color image data
JP6577703B2 (en) Image processing apparatus, image processing method, program, and storage medium
TWI496105B (en) Image synthesis device and computer program for image synthesis
US20210084231A1 (en) Electronic device including plurality of cameras, and operation method therefor
US10839529B2 (en) Image processing apparatus and image processing method, and storage medium
JP6172935B2 (en) Image processing apparatus, image processing method, and image processing program
JP6656035B2 (en) Image processing apparatus, imaging apparatus, and control method for image processing apparatus
WO2019105260A1 (en) Depth of field obtaining method, apparatus and device
US20160314591A1 (en) Image processing apparatus, distance measuring apparatus, imaging apparatus, and image processing method
JP6694234B2 (en) Distance measuring device
JP5968379B2 (en) Image processing apparatus and control method thereof
US11250581B2 (en) Information processing apparatus, information processing method, and storage medium
JP7059076B2 (en) Image processing device, its control method, program, recording medium
JP2016072924A (en) Image processing system and image processing method
JP5369729B2 (en) Image processing apparatus, imaging apparatus, and program
JP7321772B2 (en) Image processing device, image processing method, and program
KR20230107255A (en) Foldable electronic device for multi-view image capture
JP6602412B2 (en) Information processing apparatus and method, information processing system, and program.
CN109565544B (en) Position designating device and position designating method
JP2017138927A (en) Image processing device, imaging apparatus, control method and program thereof
JP5146223B2 (en) Program, camera, image processing apparatus, and image contour extraction method