JP2018207283A - Image processing device - Google Patents

Image processing device Download PDF

Info

Publication number
JP2018207283A
JP2018207283A JP2017110221A JP2017110221A JP2018207283A JP 2018207283 A JP2018207283 A JP 2018207283A JP 2017110221 A JP2017110221 A JP 2017110221A JP 2017110221 A JP2017110221 A JP 2017110221A JP 2018207283 A JP2018207283 A JP 2018207283A
Authority
JP
Japan
Prior art keywords
white balance
image
component
color
circuit
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.)
Granted
Application number
JP2017110221A
Other languages
Japanese (ja)
Other versions
JP6870817B2 (en
Inventor
光章 黒川
Mitsuaki Kurokawa
光章 黒川
昭 岡阪
Akira Okasaka
昭 岡阪
浩二 武本
Koji Takemoto
浩二 武本
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.)
Xacti Corp
Original Assignee
Xacti Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xacti Corp filed Critical Xacti Corp
Priority to JP2017110221A priority Critical patent/JP6870817B2/en
Publication of JP2018207283A publication Critical patent/JP2018207283A/en
Application granted granted Critical
Publication of JP6870817B2 publication Critical patent/JP6870817B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

To provide an image processing circuit which faithfully reproduces an actual hue underwater.SOLUTION: A CPU in an image processing device serves as a determination part which determines a water depth and the state of water quality at a position where a subject is imaged on the basis of color distribution information of an image of the subject taken underwater by an imaging part. Further, the CPU serves also as a white balance correction coefficient adjustment part which determines a white balance correction coefficient for correcting the white balance of the image, in accordance with the determined water depth and the determined state of water quality. A white balance adjustment circuit 22b executes white balance control on the image by using the white balance correction coefficient.SELECTED DRAWING: Figure 2

Description

本発明は、画像にホワイトバランス調整を行う画像処理装置に関する。   The present invention relates to an image processing apparatus that performs white balance adjustment on an image.

デジタルカメラ等の画像処理装置は、撮像した画像に対しホワイトバランス調整処理を行う。ホワイトバランス調整処理とは、様々な色温度の光源の下でも白色が正確に白く映し出されるように、画像のカラーバランスを調整する処理である。具体的には、画像におけるR成分、G成分、B成分の各信号のレベルが所定の関係を有するようにR成分及びB成分それぞれにゲインを乗じることによって、画像のホワイトバランスが調整される。   An image processing apparatus such as a digital camera performs white balance adjustment processing on a captured image. The white balance adjustment processing is processing for adjusting the color balance of an image so that white is accurately projected white even under light sources having various color temperatures. Specifically, the white balance of the image is adjusted by multiplying the R component and the B component by a gain so that the levels of the R component, G component, and B component signals in the image have a predetermined relationship.

また、水中で被写体を撮像した場合、画像は、水深に応じて青みを帯びたものとなる。これは、G成分及びB成分に比べて長波長であるR成分の光を、水分子が吸収するからである。これに対し、水中で撮像した画像におけるホワイトバランス調整の技術として、特許文献1が開示されている。特許文献1では、撮像した被写体の位置における水深に応じて、黒体放射軸とは異なる軸で画像に対しホワイトバランス調整が行われる。   Further, when a subject is imaged underwater, the image is bluish according to the water depth. This is because water molecules absorb R component light that has a longer wavelength than the G and B components. On the other hand, Patent Document 1 is disclosed as a technique for white balance adjustment in an image captured underwater. In Patent Document 1, white balance adjustment is performed on an image on an axis different from the black body radiation axis in accordance with the water depth at the position of the imaged subject.

特許第5677113号公報Japanese Patent No. 5679113

しかしながら、水中には植物プランクトンが存在する。植物プランクトンは、B成分の光を吸収する性質を有するため、植物プランクトンの量が多い程、画像は緑色が強まったものとなる。   However, phytoplankton exists in the water. Since phytoplankton has the property of absorbing the light of the B component, the image becomes more green as the amount of phytoplankton increases.

すると、上記特許文献1では、水深に応じたホワイトバランス調整により画像の青みが改善されたとしても、当該画像の色味は、依然として水中の植物プランクトンの影響を受けたものとなる。従って、上記特許文献1では、色味を忠実に再現できるとは言い難い。   Then, in the said patent document 1, even if the bluishness of an image is improved by the white balance adjustment according to the water depth, the color of the said image will still be influenced by the underwater phytoplankton. Therefore, it is difficult to say that the color can be faithfully reproduced in Patent Document 1.

本発明は、上記に鑑みてなされたものであり、その目的は、水中で撮像された画像に対し、色味を忠実に再現することができるホワイトバランス調整を行うことである。   The present invention has been made in view of the above, and an object thereof is to perform white balance adjustment capable of faithfully reproducing the color of an image captured in water.

第1の発明は、水中にて被写体を撮像する撮像部と、前記撮像部が撮像した前記被写体の画像の色分布情報に基づいて、該被写体が撮像された位置における水深と、該位置における水質の状態と、を判定する判定部と、前記判定部が判定した前記水深及び前記水質の状態に応じて、前記画像のホワイトバランスを補正するためのホワイトバランス補正係数を決定するホワイトバランス補正係数調整部と、前記ホワイトバランス補正係数を用いて、前記画像に対してホワイトバランス制御を行うホワイトバランス制御部とを備えることを特徴とする画像処理装置である。   According to a first aspect of the present invention, there is provided an imaging unit that images a subject in water, a water depth at a position where the subject is captured based on color distribution information of an image of the subject captured by the imaging unit, and a water quality at the position. A white balance correction coefficient adjustment for determining a white balance correction coefficient for correcting the white balance of the image according to the water depth and the water quality state determined by the determination unit. And a white balance control unit that performs white balance control on the image using the white balance correction coefficient.

水質の状態としては、水中における植物プランクトンの含有量が挙げられる。ここでは、水中で撮像された画像には、被写体が撮像された位置における水深と、当該位置における水質の状態とに応じて、ホワイトバランス制御が行われる。これにより、水深のみならず水質の状態による影響が軽減された、実際の色味ができる限り忠実に再現された画像を得ることができる。   Examples of the water quality include phytoplankton content in water. Here, white balance control is performed on an image captured underwater in accordance with the water depth at the position where the subject is captured and the state of water quality at the position. As a result, it is possible to obtain an image in which the actual color is reproduced as faithfully as possible, in which the influence of the water quality as well as the water depth is reduced.

第2の発明は、第1の発明において、前記水深と前記水質の状態との組み合わせパターンに対応して前記ホワイトバランス補正係数が予め設定されているホワイトバランス補正係数情報、を記憶する第1記憶部、を更に備え、前記ホワイトバランス制御部は、前記ホワイトバランス補正係数情報を用いて、前記画像のホワイトバランスを補正することを特徴とする画像処理装置である。   According to a second invention, in the first invention, a first memory for storing white balance correction coefficient information in which the white balance correction coefficient is set in advance corresponding to a combination pattern of the water depth and the water quality state. The white balance control unit corrects the white balance of the image using the white balance correction coefficient information.

これにより、実際の水深と実際の水質の状態とに応じて、ホワイトバランス補正係数は迅速に決定されるため、ホワイトバランス制御の処理は比較的迅速に行われる。また、実際の水深と実際の水質の状態とに応じて、ホワイトバランス補正係数をきめ細かく調整することも可能となる。   Thereby, since the white balance correction coefficient is quickly determined according to the actual water depth and the actual water quality state, the white balance control process is performed relatively quickly. In addition, it is possible to finely adjust the white balance correction coefficient according to the actual water depth and the actual water quality.

第3の発明は、第1の発明または第2の発明において、前記判定部が判定した前記水深及び前記水質の状態に応じて、前記画像の明度、彩度及び色相の少なくとも1つを補正する色属性調整部とを更に備えることを特徴とする画像処理装置である。   According to a third invention, in the first invention or the second invention, at least one of lightness, saturation, and hue of the image is corrected according to the water depth and the water quality determined by the determination unit. An image processing apparatus further comprising a color attribute adjustment unit.

これにより、実際の水深及び実際の水質の状態に応じて、画像の明度、彩度及び色相の少なくとも1つが適正となるようにチューニングされる。従って、水中の実際の色味をより忠実に再現された画像を得ることができる。   Thus, tuning is performed so that at least one of the brightness, saturation, and hue of the image is appropriate according to the actual water depth and the actual water quality. Accordingly, it is possible to obtain an image in which the actual color in water is reproduced more faithfully.

第4の発明は、第3の発明において、前記水深と前記水質の状態との組み合わせパターンに対応して前記画像の明度、彩度及び色相の少なくとも1つを補正するための色属性係数が予め設定されている色属性係数情報、を記憶する第2記憶部、を更に備え、前記色属性調整部は、前記色属性係数情報を用いて、前記色属性係数を調整することを特徴とする画像処理装置である。   In a fourth aspect based on the third aspect, a color attribute coefficient for correcting at least one of lightness, saturation, and hue of the image corresponding to a combination pattern of the water depth and the water quality state is provided in advance. A second storage unit that stores set color attribute coefficient information; and the color attribute adjustment unit adjusts the color attribute coefficient using the color attribute coefficient information. It is a processing device.

これにより、実際の水深と実際の水質の状態とに応じて、色属性係数は迅速に決定されるため、画像の彩度、明度及び彩度の少なくとも1つの調整処理は比較的迅速に行われる。また、実際の水深と実際の水質の状態とに応じて、色属性係数をきめ細かく調整することも可能となる。   As a result, the color attribute coefficient is quickly determined according to the actual water depth and the actual water quality state, so that at least one of the saturation, lightness, and saturation adjustment processing of the image is performed relatively quickly. . In addition, the color attribute coefficient can be finely adjusted according to the actual water depth and the actual water quality.

本発明によれば、水深のみならず水質の状態による影響が軽減された、実際の色味ができる限り忠実に再現された画像を得ることができる。   According to the present invention, it is possible to obtain an image in which the actual color is reproduced as faithfully as possible, in which the influence of not only the water depth but also the water quality is reduced.

図1は、画像処理装置の構成を模式的に示すブロック図である。FIG. 1 is a block diagram schematically showing the configuration of the image processing apparatus. 図2は、信号処理回路の構成を模試的に示すブロック図である。FIG. 2 is a block diagram schematically showing the configuration of the signal processing circuit. 図3は、重み付けテーブルに設定された重み付け係数の概念図である。FIG. 3 is a conceptual diagram of the weighting coefficients set in the weighting table. 図4は、色の分布状態を示す図である。FIG. 4 is a diagram illustrating a color distribution state. 図5は、(a)被写体の外観図と、(b)撮像された被写体が表示される際の画面の一例を示す図である。FIG. 5 is a diagram illustrating an example of an external view of a subject and (b) an example of a screen when a captured subject is displayed. 図6は、ホワイトバランス調整時の動作の概念を説明するための図である。FIG. 6 is a diagram for explaining the concept of operation during white balance adjustment. 図7は、基準値テーブルの概念図である。FIG. 7 is a conceptual diagram of the reference value table. 図8は、目標値テーブルの概念図である。FIG. 8 is a conceptual diagram of the target value table. 図9は、基準値及び目標値の分布状態を示す図である。FIG. 9 is a diagram illustrating a distribution state of the reference value and the target value. 図10は、基準値及び目標値の一部を示す図である。FIG. 10 is a diagram illustrating a part of the reference value and the target value. 図11は、領域判別回路の動作の流れを示す図である。FIG. 11 is a diagram showing a flow of operation of the region discriminating circuit. 図12は、色相を調整する動作の一部を説明するための図である。FIG. 12 is a diagram for explaining a part of the operation for adjusting the hue. 図13は、彩度を調整する動作の一部を説明するための図である。FIG. 13 is a diagram for explaining a part of the operation for adjusting the saturation. 図14は、明度を調整する動作の一部を説明するための図である。FIG. 14 is a diagram for explaining a part of the operation for adjusting the brightness. 図15は、CPUのメインフローを示す図である。FIG. 15 is a diagram showing a main flow of the CPU. 図16は、図15における色調補正処理の流れを示す図である。FIG. 16 is a diagram showing the flow of the color tone correction process in FIG. 図17は、図16が実行された際の、ホワイトバランス調整と色相調整との概念を表した図である。FIG. 17 is a diagram showing the concept of white balance adjustment and hue adjustment when FIG. 16 is executed. 図18は、水中におけるR成分、G成分、B成分の色度図である。FIG. 18 is a chromaticity diagram of the R component, G component, and B component in water. 図19は、水中撮像モードにおけるホワイトバランス調整時の動作の概念を説明するための図である。FIG. 19 is a diagram for explaining the concept of the operation at the time of white balance adjustment in the underwater imaging mode. 図20は、水中撮像モードにおける色調整の動作の流れを示す図である。FIG. 20 is a diagram illustrating a flow of color adjustment operation in the underwater imaging mode. 図21は、水深−水質テーブルの概念図である。FIG. 21 is a conceptual diagram of a water depth-water quality table. 図22は、パラメータテーブルの概念図である。FIG. 22 is a conceptual diagram of a parameter table.

以下、本発明の実施形態を図面に基づいて詳細に説明する。なお、以下の実施形態は、本質的に好ましい例示であって、本発明、その適用物、あるいはその用途の範囲を制限することを意図するものではない。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. The following embodiments are essentially preferable examples, and are not intended to limit the scope of the present invention, its application, or its use.

≪実施形態≫
<概要>
本実施形態に係る画像処理装置(10)は、地上のみならず水中においても画像を撮像できるタイプのデジタルカメラである。即ち、画像処理装置(10)では、地上で撮像するモードと、水中で撮像するモードとが選択可能となっている。いずれのモードが選択された場合も、画像処理装置(10)は、撮像した画像についてホワイトバランス調整を含む色調整を行い、調整後の画像を、後述するモニタ(30)等に出力する。
<Embodiment>
<Overview>
The image processing apparatus (10) according to the present embodiment is a digital camera that can capture an image not only on the ground but also underwater. That is, in the image processing apparatus (10), a mode for imaging on the ground and a mode for imaging underwater can be selected. Regardless of which mode is selected, the image processing apparatus (10) performs color adjustment including white balance adjustment on the captured image, and outputs the adjusted image to a monitor (30), which will be described later.

ところで、水中で撮像した画像に対し、一般的な画像処理装置がホワイトバランス調整を行った場合、ホワイトバランス調整後の画像の色味と実際の被写体の色味とが乖離していることがある。この要因として、水面から被写体までの距離(即ち水深)、及び、被写体が存在した付近の水質の状態が挙げられる。水深及び水質の程度は、R成分、G成分及びB成分それぞれの光の吸収率を異ならせるからである。   By the way, when a general image processing apparatus performs white balance adjustment on an image captured underwater, the color of the image after white balance adjustment and the color of the actual subject may deviate. . The factors include the distance from the water surface to the subject (that is, the water depth) and the water quality near the subject. This is because the depth of water and the degree of water quality vary the light absorption rates of the R component, the G component, and the B component.

なお、水質の状態には、水中における植物プランクトンの含有量等が含まれる。   The water quality includes the phytoplankton content in water.

これに対し、本実施形態に係る画像処理装置(10)は、水中で被写体を撮像した場合、撮像された被写体の位置における水深と水質の状態(植物プランクトンの含有量)とを推定し、推定した結果を用いてホワイトバランス調整を含む色調整を行うことで、実際の被写体の色味を再現することができるものである。特に、本実施形態に係る画像処理装置(10)は、ストロボを焚かずに撮像が行われた場合に、当該効果を大いに発揮するものである。   In contrast, when the subject is imaged underwater, the image processing apparatus (10) according to the present embodiment estimates the water depth and the water quality state (phytoplankton content) at the position of the imaged subject. By performing color adjustment including white balance adjustment using the result obtained, the actual color of the subject can be reproduced. In particular, the image processing apparatus (10) according to the present embodiment greatly exerts the effect when imaging is performed without using a strobe.

以下では、このような画像処理装置(10)の構成及び基本的な色調整処理について先に述べた上で、本実施形態に係る水中撮像モードでの色調整処理を<水中撮像モードにおける色調整処理>にて詳述する。   In the following, after describing the configuration of the image processing apparatus (10) and the basic color adjustment processing in advance, the color adjustment processing in the underwater imaging mode according to the present embodiment is described as <color adjustment in the underwater imaging mode. Processing> will be described in detail.

<構成>
図1に示すように、画像処理装置(10)は、撮像部(11)、信号処理回路(22)、メモリ制御回路(24)、SDRAM(26)、ビデオエンコーダ(28)、モニタ(30)、I/F回路(34)、メモリカード(36)及びCPU(38)を備える。撮像部(11)は、フォーカスレンズ(12)、イメージセンサ(14)、TG(タイミングジェネレータ)(16)、CDS/AGC回路(18)、及びA/D変換器(20)を含む。フォーカスレンズ(12)及びイメージセンサ(14)それぞれは、ドライバ(図示せず)によって駆動される。
<Configuration>
As shown in FIG. 1, the image processing apparatus (10) includes an imaging unit (11), a signal processing circuit (22), a memory control circuit (24), an SDRAM (26), a video encoder (28), and a monitor (30). , An I / F circuit (34), a memory card (36), and a CPU (38). The imaging unit (11) includes a focus lens (12), an image sensor (14), a TG (timing generator) (16), a CDS / AGC circuit (18), and an A / D converter (20). Each of the focus lens (12) and the image sensor (14) is driven by a driver (not shown).

被写体の光学像は、フォーカスレンズ(12)を介してイメージセンサ(14)の受光面に入射される。受光面では、入射された光学像に対し光電変換が施され、これにより当該光学像に対応するカメラ信号(生画像信号)が生成される。受光面は、原色ベイヤ配列の色フィルタ(図示せず)によって覆われ、カメラ信号を形成する各々の画素信号は、R(Red),G(Green),B(Blue)のいずれか1つの色情報成分のみを有する。   The optical image of the subject is incident on the light receiving surface of the image sensor (14) via the focus lens (12). On the light receiving surface, photoelectric conversion is performed on the incident optical image, thereby generating a camera signal (raw image signal) corresponding to the optical image. The light-receiving surface is covered with a primary color Bayer array color filter (not shown), and each pixel signal forming the camera signal is one of R (Red), G (Green), and B (Blue). It has only information component.

電源が投入されると、TG(16)、信号処理回路(22)およびビデオエンコーダ(28)それぞれには、CPU(38)から処理命令が与えられる。これにより、スルー画像処理が開始される。   When the power is turned on, a processing command is given from the CPU (38) to each of the TG (16), the signal processing circuit (22), and the video encoder (28). Thereby, the through image processing is started.

TG(16)は、イメージセンサ(14)の露光及びカメラ信号の読み出しを繰り返し行う。イメージセンサ(14)から読み出された各フレームのカメラ信号は、CDS/AGC回路(18)においてノイズ除去及びレベル調整が施され、その後A/D変換器(20)においてディジタル信号に変換される。   The TG (16) repeatedly performs exposure of the image sensor (14) and reading of the camera signal. The camera signal of each frame read from the image sensor (14) is subjected to noise removal and level adjustment in the CDS / AGC circuit (18), and then converted into a digital signal in the A / D converter (20). .

信号処理回路(22)は、A/D変換器(20)から出力された各フレームのカメラデータに対し、色分離処理、色調整処理、YUV変換処理等を施して画像データを生成する。この画像データは、輝度成分を表すYデータ、色差成分を表すUデータ及びVデータから成る。信号処理回路(22)によって生成された画像データは、メモリ制御回路(24)に出力され、メモリ制御回路(24)によってSDRAM(26)に格納される。   The signal processing circuit (22) performs color separation processing, color adjustment processing, YUV conversion processing, and the like on the camera data of each frame output from the A / D converter (20) to generate image data. This image data includes Y data representing a luminance component, U data representing a color difference component, and V data. The image data generated by the signal processing circuit (22) is output to the memory control circuit (24) and stored in the SDRAM (26) by the memory control circuit (24).

上記色調整処理では、各フレームのカメラデータに対してホワイトバランスが調整され、次いで、明度、彩度及び色相が補正される。以下では、ホワイトバランス調整にて用いられる調整係数を“ゲインx1,y1”と呼称し、明度、彩度及び色差の補正にて用いられる補正係数を、順に“目標L成分値、目標C成分値、目標H成分値”と呼称する。これらの調整係数及び補正係数は、CPU(38)によって決定される。   In the color adjustment process, the white balance is adjusted for the camera data of each frame, and then the brightness, saturation, and hue are corrected. Hereinafter, an adjustment coefficient used in white balance adjustment is referred to as “gain x1, y1”, and correction coefficients used in lightness, saturation, and color difference correction are sequentially set to “target L component value, target C component value”. , Referred to as “target H component value”. These adjustment coefficients and correction coefficients are determined by the CPU (38).

ビデオエンコーダ(28)は、SDRAM(26)に格納された各フレームの画像データをメモリ制御回路(24)に読み出させると、この画像データをNTSCフォーマットのコンポジット画像信号にエンコードする。ビデオエンコーダ(28)は、コンポジット画像信号をモニタ(30)に出力する。これにより、モニタ(30)には、被写体のリアルタイム動画像(スルー画像)が表示される。   When the video encoder (28) causes the memory control circuit (24) to read the image data of each frame stored in the SDRAM (26), the video encoder (28) encodes the image data into a composite image signal in the NTSC format. The video encoder (28) outputs the composite image signal to the monitor (30). As a result, a real-time moving image (through image) of the subject is displayed on the monitor (30).

撮像者がシャッタボタン(40)を全押しすると、画像処理装置(10)では、撮像及び記録処理が実行される。先ず、CPU(38)は、JPEGコーデック(32)に圧縮命令を出力する。JPEGコーデック(32)は、SDRAM(26)に格納された画像データをメモリ制御回路(24)を介して読み出すと、当該画像データをJPEG方式で圧縮する。圧縮れた画像データは、SDRAM(26)に再び格納される。   When the photographer fully presses the shutter button (40), the image processing device (10) executes imaging and recording processing. First, the CPU (38) outputs a compression command to the JPEG codec (32). When the JPEG codec (32) reads out the image data stored in the SDRAM (26) via the memory control circuit (24), the JPEG codec (32) compresses the image data by the JPEG method. The compressed image data is stored again in the SDRAM (26).

I/F回路(34)は、SDRAM(26)に格納された画像データをメモリ制御回路(24)を介して読み出し、読み出した画像データをメモリカード(36)内に記録する。これにより、メモリカード(36)内に画像ファイルが作成される。   The I / F circuit (34) reads the image data stored in the SDRAM (26) via the memory control circuit (24), and records the read image data in the memory card (36). As a result, an image file is created in the memory card (36).

なお、メモリカード(36)は、画像処理装置(10)の筐体(図示せず)に対し着脱自在な不揮発性の記録媒体で構成されることができる。   The memory card (36) can be formed of a non-volatile recording medium that is detachable from the housing (not shown) of the image processing apparatus (10).

<信号処理回路の構成>
ここでは、信号処理回路(22)の構成について詳述する。
<Configuration of signal processing circuit>
Here, the configuration of the signal processing circuit (22) will be described in detail.

信号処理回路(22)は、図2に示すように、色分離回路(22a)、ホワイトバランス制御部に相当するホワイトバランス調整回路(22b)、積算回路(22c)、LCH変換回路(22d)、L補正回路(22e)、C補正回路(22f)、H補正回路(22g)、YUV変換回路(22h)、領域判別回路(22i)、及び、複数のテーブル(22m,22n,…)を格納するメモリ(22j)(第1記憶部及び第2記憶部に相当)を有する。   As shown in FIG. 2, the signal processing circuit (22) includes a color separation circuit (22a), a white balance adjustment circuit (22b) corresponding to a white balance control unit, an integration circuit (22c), an LCH conversion circuit (22d), An L correction circuit (22e), a C correction circuit (22f), an H correction circuit (22g), a YUV conversion circuit (22h), an area discrimination circuit (22i), and a plurality of tables (22m, 22n,...) Are stored. A memory (22j) (corresponding to a first storage unit and a second storage unit) is included.

−色分離回路−
色分離回路(22a)は、A/D変換器(20)から出力されたカメラデータに、色分離処理を施す。カメラデータを構成する各々の画素データは、R成分、G成分及びB成分のいずれか1つのみを有するため、色分離回路(22a)は、各画素が有さない他の2つの色成分を補完する。これにより、各画素がR、G及びBの全ての色情報を有するRGB形式の画像データが生成される。
-Color separation circuit-
The color separation circuit (22a) performs color separation processing on the camera data output from the A / D converter (20). Since each pixel data constituting the camera data has only one of the R component, the G component, and the B component, the color separation circuit (22a) includes the other two color components that each pixel does not have. Complement. Thereby, RGB format image data in which each pixel has all the color information of R, G, and B is generated.

−ホワイトバランス調整回路−
ホワイトバランス調整回路(22b)は、2つのアンプ(221b,222b)を有する。アンプ(221b)にはゲインx1が付与され、アンプ(222b)にはゲインy1が付与されている。生成された上記画像データのうち、R成分はアンプ(221b)に入力され、アンプ(221b)にてゲインx1により増幅される。生成された上記画像データのうち、B成分はアンプ(222b)に入力され、アンプ(222b)にてゲインy1により増幅される。
-White balance adjustment circuit-
The white balance adjustment circuit (22b) has two amplifiers (221b, 222b). The amplifier (221b) is given a gain x1, and the amplifier (222b) is given a gain y1. Of the generated image data, the R component is input to the amplifier (221b), and is amplified by the gain x1 by the amplifier (221b). Of the generated image data, the B component is input to the amplifier (222b) and amplified by the gain y1 by the amplifier (222b).

ホワイトバランス調整回路(22b)にて増幅されたR成分及びB成分と、増幅されていない画像データのG成分とは、積算回路(22c)及びLCH変換回路(22d)に入力される。   The R component and B component amplified by the white balance adjustment circuit (22b) and the G component of the unamplified image data are input to the integrating circuit (22c) and the LCH conversion circuit (22d).

画面は、水平方向及び垂直方向に例えば16分割され、この場合には256個の分割エリアが画面上に形成される。積算回路(22c)は、R成分、G成分及びB成分を分割エリア毎に且つ同じ色成分毎に積算する。このため、256個の積算値Ir(i)、256個の積算値Ig(i)及び256個の積算値Ib(i)が、1フレーム期間毎に得られる。ここで、“i”は、1から256までの整数である。即ち、256個の分割エリアに個別に対応する256個の色評価値が、1フレーム期間毎に求められる。   The screen is divided into, for example, 16 in the horizontal direction and the vertical direction. In this case, 256 divided areas are formed on the screen. The integrating circuit (22c) integrates the R component, G component, and B component for each divided area and for each same color component. For this reason, 256 integrated values Ir (i), 256 integrated values Ig (i), and 256 integrated values Ib (i) are obtained for each frame period. Here, “i” is an integer from 1 to 256. That is, 256 color evaluation values individually corresponding to 256 divided areas are obtained for each frame period.

CPU(38)は、上記色評価値に基づいて、ホワイトバランス調整に用いるゲインx1,y1を調整して、最適なゲインxs,ysを算出する。   Based on the color evaluation value, the CPU (38) adjusts the gains x1 and y1 used for white balance adjustment to calculate optimum gains xs and ys.

具体的には、CPU(38)は、上記積算値Ir(i)を積算値Iry(i)に変換し、積算値Ib(i)を積算値Iby(i)に変換する。積算値Iry(i)及び積算Iby(i)は、色差成分R−Y,B−Yを分割エリア毎に積算した値に等しく、各分割エリアの色評価値と言える。   Specifically, the CPU (38) converts the integrated value Ir (i) into an integrated value Iry (i), and converts the integrated value Ib (i) into an integrated value Iby (i). The integrated value Iry (i) and the integrated Iby (i) are equal to the values obtained by integrating the color difference components RY and BY for each divided area, and can be said to be the color evaluation values of each divided area.

続いて、CPU(38)は、図3に係る数値分布を有する重み付けテーブル(38a)及び各分割エリアの積算値Iry(i),Iby(i)に基づいて、各分割エリアの重み付け係数k(i)を求める。重み付けテーブル(38a)は、図示しないメモリに格納されているものであって、図3では、各々の重み付け係数k(i)が“0”または“1”にて格納されている。図3の重み付け係数k(i)は、図4で示す色の分布状態に対応している。   Subsequently, the CPU (38), based on the weighting table (38a) having the numerical distribution according to FIG. 3 and the integrated values Iry (i) and Iby (i) of each divided area, the weighting coefficient k ( i). The weighting table (38a) is stored in a memory (not shown). In FIG. 3, each weighting coefficient k (i) is stored as “0” or “1”. The weighting coefficient k (i) in FIG. 3 corresponds to the color distribution state shown in FIG.

図3の重み付けテーブル(38a)では、横軸であるB−Y軸及び縦軸であるR−Y軸それぞれが17等分され、且つ、B−Y軸及びR−Y軸によって区切られた各々の象限が64分割された例を示している。これにより、図3では290個のエリアが形成されており、重み付け係数K(i)は、エリア毎に“0”または“1”が割り当てられている。図3に係る290個のエリアのうち、重み付け係数k(i)=1が割り当てられた範囲(図3にて実線で囲われた範囲)が、引き込み範囲である。   In the weighting table (38a) in FIG. 3, each of the BY axis as the horizontal axis and the RY axis as the vertical axis is divided into 17 equal parts and separated by the BY axis and the RY axis. An example in which the quadrant is divided into 64 parts is shown. As a result, 290 areas are formed in FIG. 3, and “0” or “1” is assigned to the weighting coefficient K (i) for each area. Of the 290 areas shown in FIG. 3, the range to which the weighting coefficient k (i) = 1 is assigned (the range surrounded by the solid line in FIG. 3) is the pull-in range.

分割エリア毎の重み付け係数k(i)を求めた後、CPU(38)は、下式(1)及び下式(2)それぞれに当該重み付け係数k(i)を用いて、最適ゲインxs,ysを算出する。   After obtaining the weighting coefficient k (i) for each divided area, the CPU (38) uses the weighting coefficient k (i) for each of the following expressions (1) and (2) to obtain the optimum gains xs, ys. Is calculated.

Figure 2018207283
Figure 2018207283

Figure 2018207283
Figure 2018207283

上述の通り、重み付け係数k(i)は“0”または“1”であるため、上式(1)及び上式(2)により、色評価値が引き込み範囲内にある分割エリアのみが有効となる。そのため、上式(1)及び上式(2)により、有効な分割エリアの積算値Ir(i),Ig(i),Ib(i)それぞれの総和が得られる。上式(1)からは、積算値Ir(i),Ig(i)それぞれの総和に基づいた最適ゲインxsが得られ、上式(2)からは、積算値Ig(i),Ib(i)それぞれの総和に基づいた最適ゲインysが得られる。このようにして得られた最適ゲインxs,ysは、引き込み範囲に含まれる色評価値の平均値がR−Y軸及びB−Y軸の交点に収束するような値となる。   As described above, since the weighting coefficient k (i) is “0” or “1”, only the divided area where the color evaluation value is within the pull-in range is valid according to the above equation (1) and the above equation (2). Become. Therefore, the sum total of the integrated values Ir (i), Ig (i), and Ib (i) of the effective divided area is obtained by the above formulas (1) and (2). From the above equation (1), the optimum gain xs based on the sum of the integrated values Ir (i) and Ig (i) is obtained. From the above equation (2), the integrated values Ig (i) and Ib (i ) An optimum gain ys based on each sum is obtained. The optimum gains xs and ys obtained in this way are values such that the average value of the color evaluation values included in the pull-in range converges at the intersection of the RY axis and the BY axis.

図5(a)に示すように、用紙(42)の上に載置された円筒形状の棒(44)を真上から撮像した場合、モニタ(30)には、図5(b)に示すような状態の被写体像が表示される。なお、図5(b)で示す縦線及び横線は、画面を256個の分割エリアに区分するための線であって、実際には表示されない。仮に用紙(42)が薄いオレンジ色で棒(44)が濃い黄色である場合、用紙(42)の色のみを積算した積算値Iry(i),Iby(i)は引き込み範囲に含まれるが、棒(44)の色のみを積算した積算値Iry(i),Iby(i)は引き込み範囲から外れる。この結果、最適ゲインxs,ysは、用紙(42)の色に関する積算値Ir(i),Ig(i),Ib(i)に基づいて決定される。   As shown in FIG. 5 (a), when the cylindrical rod (44) placed on the paper (42) is imaged from directly above, the monitor (30) is shown in FIG. 5 (b). A subject image in such a state is displayed. Note that the vertical and horizontal lines shown in FIG. 5B are lines for dividing the screen into 256 divided areas and are not actually displayed. If the paper (42) is light orange and the stick (44) is dark yellow, the integrated values Iry (i) and Iby (i) obtained by integrating only the color of the paper (42) are included in the pull-in range. The integrated values Iry (i) and Iby (i) obtained by integrating only the color of the bar (44) are out of the pull-in range. As a result, the optimum gains xs and ys are determined based on the integrated values Ir (i), Ig (i), and Ib (i) related to the color of the paper (42).

最適ゲインxs,ysが算出される前の用紙(42)の色に関する積算値Iry(i),Iby(i)が図6に示すエリア1に分布する場合、最適ゲインxs,ysが算出され且つアンプ(221b,222b)に設定された後の用紙(42)の色に関する積算値Iry(i),Iby(i)は、図6に示すエリア2に移動する。つまり、用紙(42)の色に関する積算値Iry(i),Iby(i)は、R−Y軸及びB−Y軸の交点に向かって移動量W1のみ移動する。   When the integrated values Iry (i) and Iby (i) relating to the color of the paper (42) before the optimum gains xs and ys are calculated are distributed in the area 1 shown in FIG. 6, the optimum gains xs and ys are calculated and The integrated values Iry (i) and Iby (i) relating to the color of the paper (42) after being set in the amplifiers (221b, 222b) move to the area 2 shown in FIG. That is, the integrated values Iry (i) and Iby (i) relating to the color of the paper (42) move only by the movement amount W1 toward the intersection of the RY axis and the BY axis.

−LCH変換回路−
LCH変換回路(22d)は、ホワイトバランス調整回路(22b)にて増幅された各画素のR成分及びB成分と、色分離回路(22a)から出力された各画素のG成分とを、明度成分であるL成分、彩度成分であるC成分、色相成分であるH成分に変換する。LCH変換回路(22d)は、変換後のLCHデータ(各画素のL成分、C成分及びH成分を有するデータ)を出力する。LCHデータにおけるL成分のデータはL補正回路(22e)に入力され、C成分のデータはC補正回路(22f)に入力される。H成分のデータは、H補正回路(22g)及び領域判別回路(22i)に入力される。
-LCH conversion circuit-
The LCH conversion circuit (22d) converts the R component and B component of each pixel amplified by the white balance adjustment circuit (22b) and the G component of each pixel output from the color separation circuit (22a) into lightness components. To an L component, a C component as a saturation component, and an H component as a hue component. The LCH conversion circuit (22d) outputs the converted LCH data (data having an L component, a C component, and an H component of each pixel). The L component data in the LCH data is input to the L correction circuit (22e), and the C component data is input to the C correction circuit (22f). The H component data is input to the H correction circuit (22g) and the region discrimination circuit (22i).

−各補正回路、YUV変換回路、及び領域判別回路−
L補正回路(22e)は、入力されたLCHデータのL成分に基づいて、補正L成分を求める。C補正回路(22f)は、入力されたLCHデータのC成分に基づいて、補正C成分を求める。H補正回路(22g)は、入力されたLCHデータのH成分に基づいて、補正H成分を求める。補正L成分、補正C成分及び補正H成分は、YUV変換回路(22h)に入力される。
-Each correction circuit, YUV conversion circuit, and area discrimination circuit-
The L correction circuit (22e) obtains a correction L component based on the L component of the input LCH data. The C correction circuit (22f) obtains a correction C component based on the C component of the input LCH data. The H correction circuit (22g) obtains a correction H component based on the H component of the input LCH data. The correction L component, the correction C component, and the correction H component are input to the YUV conversion circuit (22h).

YUV変換回路(22h)は、入力された補正L成分、補正C成分及び補正H成分に基づき、LCH形式の画像データをYUV形式の画像データに変換する。これにより、YUV変換回路(22h)からは、輝度データであるY成分、色差成分であるU成分及びV成分を有する画像データが出力される。   The YUV conversion circuit (22h) converts the LCH format image data into YUV format image data based on the input corrected L component, corrected C component, and corrected H component. As a result, the YUV conversion circuit (22h) outputs image data having a Y component that is luminance data, a U component that is a color difference component, and a V component.

領域判別回路(22i)は、メモリ(22j)に格納された基準値テーブル(22m)を参照して、H成分が属する領域を1画素毎に判別する。領域判別回路(22i)は、更に、判別結果に対応する基準値を基準値テーブル(22m)から読み出すとともに、判別結果に対応する目標値を、目標値テーブル(22n)から読み出す。   The area determination circuit (22i) refers to the reference value table (22m) stored in the memory (22j) and determines the area to which the H component belongs for each pixel. The area discrimination circuit (22i) further reads a reference value corresponding to the discrimination result from the reference value table (22m), and reads a target value corresponding to the discrimination result from the target value table (22n).

図7は、上記基準値テーブル(22m)の概念図である。図7に示すように、基準値テーブル(22m)には、色相を示す基準H成分値、彩度を示す基準C成分値、及び明度を示す基準L成分値の1の組合せを1レコードとし、合計して6つのパターンが表されている。図7中の“N”はレコード番号を表しており、同じレコード番号にて表された基準H成分値、基準C成分値及び基準L成分値は、1つの基準値を定義している。図7に示された6パターンの基準値は、Mg(マジェンダ)、R(レッド)、Ye(イエロー)、G(グリーン)、Cy(シアン)及びB(ブルー)の6つの代表色それぞれに対応し、図9及び図10に示すように、YUV空間に分布する。なお、図10には、Cyのみに対応する基準値を示す。   FIG. 7 is a conceptual diagram of the reference value table (22m). As shown in FIG. 7, in the reference value table (22m), one record includes a combination of a reference H component value indicating hue, a reference C component value indicating saturation, and a reference L component value indicating lightness. A total of six patterns are represented. “N” in FIG. 7 represents a record number, and the reference H component value, the reference C component value, and the reference L component value represented by the same record number define one reference value. The reference values of the six patterns shown in FIG. 7 correspond to each of the six representative colors of Mg (magenta), R (red), Ye (yellow), G (green), Cy (cyan), and B (blue). Then, as shown in FIGS. 9 and 10, it is distributed in the YUV space. FIG. 10 shows reference values corresponding to only Cy.

図8は、上記目標値テーブル(22n)の概念図である。図8に示すように、目標値テーブル(22n)には、色相を示す目標H成分値、彩度を示す目標C成分値、及び明度を示す目標L成分値の1の組合せを1レコードとし、合計して6つのパターンが表されている。図8中の“N”はレコード番号を表しており、同じレコード番号にて表された目標H成分値、目標C成分値及び目標L成分値は、1つの目標値を定義している。図8に示された6パターンの目標値は、Mg(マジェンダ)、R(レッド)、Ye(イエロー)、G(グリーン)、Cy(シアン)及びB(ブルー)の6つの代表色それぞれに対応し、図9及び図10に示すように、YUV空間に分布する。なお、図10には、Cyのみに対応する目標値を示している。   FIG. 8 is a conceptual diagram of the target value table (22n). As shown in FIG. 8, in the target value table (22n), one record is a combination of a target H component value indicating hue, a target C component value indicating saturation, and a target L component value indicating brightness. A total of six patterns are represented. “N” in FIG. 8 represents a record number, and the target H component value, the target C component value, and the target L component value represented by the same record number define one target value. The target values of the six patterns shown in FIG. 8 correspond to each of the six representative colors of Mg (magenta), R (red), Ye (yellow), G (green), Cy (cyan), and B (blue). Then, as shown in FIGS. 9 and 10, it is distributed in the YUV space. FIG. 10 shows target values corresponding to only Cy.

なお、基準値テーブル(22m)に設定された基準H成分値、基準C成分値、基準L成分値は、画像処理装置(10)の製造段階で予め設定された値であり、変更できない固定化された値である。目標値テーブル(22n)に設定された目標H成分値、目標C成分値、目標L成分値は、画像処理装置(10)の製造段階ではデフォルト値が設定されているが、その後、CPU(38)によって適宜変更される値である。   The reference H component value, the reference C component value, and the reference L component value set in the reference value table (22m) are values set in advance at the manufacturing stage of the image processing apparatus (10) and cannot be changed. Value. The target H component value, the target C component value, and the target L component value set in the target value table (22n) are set to default values at the manufacturing stage of the image processing apparatus (10). ) Is a value that is appropriately changed.

領域判別回路(22i)は、LCH変換回路(22d)から出力されたH補正成分値と、上記2つのテーブル(22m,22n)とを用いて、図11に従って処理を実行する。   The region discriminating circuit (22i) executes processing according to FIG. 11 using the H correction component value output from the LCH conversion circuit (22d) and the two tables (22m, 22n).

先ず、領域判別回路(22i)は、変数であるレコード番号Nを“1”に設定し(ステップSt1)、レコード番号N“1”に対応する基準H成分値を基準値テーブル(22m)から読み出す(ステップSt2)。領域判別回路(22i)は、読み出した基準H成分値を、注目画素のH成分値(以下、現画素H成分値)と比較する(ステップSt3)。   First, the area discriminating circuit (22i) sets the variable record number N to “1” (step St1), and reads the reference H component value corresponding to the record number N “1” from the reference value table (22m). (Step St2). The region discriminating circuit (22i) compares the read reference H component value with the H component value of the target pixel (hereinafter, the current pixel H component value) (step St3).

基準H成分値が現画素H成分値よりも大きい場合(ステップSt3のYES)、領域判別回路(22i)は、レコード番号Nが“1”か否かを判別する(ステップSt6)。レコード番号Nが“1”でない場合(ステップSt6のNO)、ステップSt7〜St10の処理が行われる。基準H成分値が現画素H成分値と等しいか、または小さい場合(ステップSt3のNO)、領域判別回路(22i)は、レコード番号Nをインクリメントし(ステップSt4)、インクリメント後のレコード番号Nが“6”よりも大きいか否かを判別する(ステップSt5)。インクリメント後のレコード番号Nが“6”と同等または小さい場合(ステップSt5のNO)、ステップSt2移行の処理が繰り返される。インクリメント後のレコード番号Nが“6”よりも大きい場合(ステップSt5のYES)、または、ステップSt6においてレコード番号Nが“1”である場合(ステップSt6のYES)、ステップSt11〜ステップSt14の処理が行われる。   When the reference H component value is larger than the current pixel H component value (YES in step St3), the area determination circuit (22i) determines whether or not the record number N is “1” (step St6). If the record number N is not “1” (NO in step St6), the processes in steps St7 to St10 are performed. When the reference H component value is equal to or smaller than the current pixel H component value (NO in step St3), the area determination circuit (22i) increments the record number N (step St4), and the incremented record number N is It is determined whether or not it is larger than “6” (step St5). When the incremented record number N is equal to or smaller than “6” (NO in Step St5), the process of Step St2 is repeated. When the incremented record number N is larger than “6” (YES in step St5), or when the record number N is “1” in step St6 (YES in step St6), the processing in steps St11 to St14 Is done.

ステップSt7では、領域判別回路(22i)は、現時点のレコード番号Nに対応する基準H成分値、基準C成分値及び基準L成分値を、“Hrα”“Crα”“Lrα”として基準値テーブル(22m)から選択する。ステップSt8では、領域判別回路(22i)は、現時点のレコード番号Nに対応する目標H成分値、目標C成分値及び目標L成分値を、“Htα”“Ctα”“Ltα”として目標値テーブル(22n)から選択する。   In step St7, the region discriminating circuit (22i) sets the reference H component value, the reference C component value and the reference L component value corresponding to the current record number N as “Hrα”, “Crα” and “Lrα” as a reference value table ( Select from 22m). In step St8, the area discriminating circuit (22i) sets the target H component value, target C component value and target L component value corresponding to the current record number N as “Htα”, “Ctα” and “Ltα” as target value tables ( Select from 22n).

ステップSt9では、領域判別回路(22i)は、現時点のレコード番号Nの前の番号(即ち“N−1”)に対応する基準H成分値、基準C成分値及び基準L成分値を、“Hrβ”“Crβ”“Lrβ”として基準値テーブル(22m)から選択する。ステップSt10では、領域判別回路(22i)は、現時点のレコード番号Nの前の番号(即ち“N−1”)に対応する目標H成分値、目標C成分値及び目標L成分値を、“Htβ”“Ctβ”“Ltβ”として目標値テーブル(22n)から選択する。   In step St9, the area discriminating circuit (22i) calculates the reference H component value, reference C component value and reference L component value corresponding to the number before the current record number N (ie, “N−1”) as “Hrβ. “Crβ” and “Lrβ” are selected from the reference value table (22m). In step St10, the area discriminating circuit (22i) obtains the target H component value, target C component value and target L component value corresponding to the number before the current record number N (ie, “N−1”) as “Htβ. “Ctβ” and “Ltβ” are selected from the target value table (22n).

一方、ステップSt11では、領域判別回路(22i)は、レコード番号Nが“1”に対応する基準H成分値“Hr1”、基準C成分値“Cr1”及び基準L成分値“Lr1”を、“Hrα”“Crα”“Lrα”として基準値テーブル(22m)から選択する。ステップSt12では、領域判別回路(22i)は、レコード番号Nが“1”に対応する目標H成分値“Ht1”、目標C成分値“Ct1”及び目標L成分値“Lt1”を、“Htα”“Ctα”“Ltα”として目標値テーブル(22n)から選択する。   On the other hand, in step St11, the region discriminating circuit (22i) sets the reference H component value “Hr1”, the reference C component value “Cr1” and the reference L component value “Lr1” corresponding to the record number N to “1” to “ Hrα ”“ Crα ”“ Lrα ”is selected from the reference value table (22 m). In step St12, the region discriminating circuit (22i) sets the target H component value “Ht1”, the target C component value “Ct1” and the target L component value “Lt1” corresponding to the record number N to “1” to “Htα”. “Ctα” and “Ltα” are selected from the target value table (22n).

ステップSt13では、領域判別回路(22i)は、レコード番号Nが“6”に対応する基準H成分値“Hr6”、基準C成分値“Cr6”及び基準L成分値“Lr6”を、“Hrβ”“Crβ”“Lrβ”として基準値テーブル(22m)から選択する。ステップSt14では、領域判別回路(22i)は、レコード番号Nが“6”に対応する目標H成分値“Ht6”、目標C成分値“Ct6”及び目標L成分値“Lt6”を、“Htβ”“Ctβ”“Ltβ”として目標値テーブル(22n)から選択する。   In step St13, the region discriminating circuit (22i) sets the reference H component value “Hr6”, the reference C component value “Cr6” and the reference L component value “Lr6” corresponding to the record number N to “6” to “Hrβ”. “Crβ” and “Lrβ” are selected from the reference value table (22 m). In step St14, the region discriminating circuit (22i) sets the target H component value “Ht6”, the target C component value “Ct6” and the target L component value “Lt6” corresponding to the record number N to “6” to “Htβ”. “Ctβ” and “Ltβ” are selected from the target value table (22n).

このようにして、注目画素のH成分値を挟む2つの基準H成分値をそれぞれ有する2つの基準値と、この2つの基準値に対応する2つの目標値とが検出される。   In this way, two reference values each having two reference H component values sandwiching the H component value of the target pixel and two target values corresponding to the two reference values are detected.

基準H成分値Hrα,Hrβ及び目標H成分値Htα,Htβは、H補正回路(22g)に入力される。基準C成分値Crα,Crβ及び目標C成分値Ctα,Ctβは、C補正回路(22f)に入力される。基準L成分値Lrα,Lrβ及び目標L成分値Ltα,Ltβは、L補正回路(22e)に入力される。   The reference H component values Hrα and Hrβ and the target H component values Htα and Htβ are input to the H correction circuit (22g). The reference C component values Crα and Crβ and the target C component values Ctα and Ctβ are input to the C correction circuit (22f). The reference L component values Lrα and Lrβ and the target L component values Ltα and Ltβ are input to the L correction circuit (22e).

H補正回路(22g)は、LCH変換回路(22d)から入力された現画素H成分値Hinと、上記基準H成分値Hrα,Hrβ及び目標H成分値Htα,Htβとを、下式(3)〜(5)に代入することにより、現画素H成分値Hinを補正H成分値Houtに変換する。補正H成分値Houtは、図12に破線で示す大きさを有する。   The H correction circuit (22g) calculates the current pixel H component value Hin input from the LCH conversion circuit (22d), the reference H component values Hrα, Hrβ, and the target H component values Htα, Htβ by the following equation (3): By substituting in (5), the current pixel H component value Hin is converted into a corrected H component value Hout. The corrected H component value Hout has a magnitude indicated by a broken line in FIG.

Figure 2018207283
Figure 2018207283

Figure 2018207283
Figure 2018207283

Figure 2018207283
Figure 2018207283

H補正回路(22g)はまた、角度データθ1,θ2を、C補正回路(22f)及びL補正回路(22e)に出力するとともに、角度データθ3(=|Htβ−Hout|)及び角度データθ4(=|Htα−Hout|)をL補正回路(22e)に出力する。   The H correction circuit (22g) also outputs the angle data θ1 and θ2 to the C correction circuit (22f) and the L correction circuit (22e), and the angle data θ3 (= | Htβ−Hout |) and angle data θ4 ( = | Htα−Hout |) is output to the L correction circuit (22e).

C補正回路(22f)は、LCH変換回路(22d)から入力された現画素C成分値Cinと、上記基準C成分値Crα,Crβ及び目標C成分値Ctα,Ctβとを、下式(6)に代入することにより、現画素C成分値Cinを補正C成分値Coutに変換する。補正C成分値Houtは、図13に破線で示す大きさを有する。   The C correction circuit (22f) calculates the current pixel C component value Cin input from the LCH conversion circuit (22d), the reference C component values Crα and Crβ, and the target C component values Ctα and Ctβ by the following equation (6). By substituting into, the current pixel C component value Cin is converted into a corrected C component value Cout. The corrected C component value Hout has a magnitude indicated by a broken line in FIG.

Figure 2018207283
Figure 2018207283

C補正回路(22f)は、更に、下式(7)(8)に基づいて、CH系の座標(0,0),(Cin,Hin)を結ぶ直線と座標(Crα,Hrα),(Crβ,Hrβ)を結ぶ直線との交点座標におけるC成分値Crγ、ならびCH系の座標(0,0),(Cout,Hout)を結ぶ直線と座標(Ctα,Htα),(Ctβ,Htβ)を結ぶ直線との交点座標におけるC成分値Ctγを算出する。C補正回路(22f)は、算出したC成分値Crγ,Ctγを、上述した現画素C成分値Cin及び補正C成分値Coutとともに、L補正回路(22e)に出力する。   The C correction circuit (22f) further, based on the following equations (7) and (8), connects the straight line connecting the coordinates (0, 0) and (Cin, Hin) of the CH system to the coordinates (Crα, Hrα), (Crβ , Hrβ) and the C component value Crγ at the intersection coordinates with the straight line connecting the straight lines connecting the coordinates (0, 0) and (Cout, Hout) of the CH system and the coordinates (Ctα, Htα), (Ctβ, Htβ). The C component value Ctγ at the intersection coordinates with the straight line is calculated. The C correction circuit (22f) outputs the calculated C component values Crγ and Ctγ to the L correction circuit (22e) together with the current pixel C component value Cin and the correction C component value Cout described above.

Figure 2018207283
Figure 2018207283

Figure 2018207283
Figure 2018207283

L補正回路(22e)は、LCH変換回路(22d)から入力された現画素L成分値Linを下式(9)〜(15)に従って補正L成分値Loutに変換する。補正L成分値Loutは、図14に示される。   The L correction circuit (22e) converts the current pixel L component value Lin input from the LCH conversion circuit (22d) into a correction L component value Lout according to the following equations (9) to (15). The corrected L component value Lout is shown in FIG.

Figure 2018207283
Figure 2018207283

Figure 2018207283
Figure 2018207283

Figure 2018207283
Figure 2018207283

Figure 2018207283
Figure 2018207283

Figure 2018207283
Figure 2018207283

Figure 2018207283
Figure 2018207283

Figure 2018207283
Figure 2018207283

図14に示すLmax,Lminそれぞれは、再現できるL(明度)の最大値及び最小値である。現画素(入力画素値)は、LCH系の座標(Lmax,0,0),(Lmin,0,0),(Lrγ,Crγ,Hin)によって形成される面(YUV空間を色相Hinで切り出した面)上に存在する。一方、補正画素値は、LCH系の座標(Lmax,0,0),(Lmin,0,0),(Ltγ,Ctγ,Hout)によって形成される面(YUV空間を色相Houtで切り出した面)上に存在する。   Each of Lmax and Lmin shown in FIG. 14 is a maximum value and a minimum value of L (brightness) that can be reproduced. The current pixel (input pixel value) is a surface formed by LCH coordinates (Lmax, 0, 0), (Lmin, 0, 0), (Lrγ, Crγ, Hin) (YUV space cut out by hue Hin) Surface). On the other hand, the correction pixel value is a surface formed by LCH coordinates (Lmax, 0, 0), (Lmin, 0, 0), (Ltγ, Ctγ, Hout) (a surface obtained by cutting out the YUV space with the hue Hout). Exists on.

上述したようにして求められた補正H成分値Hout、補正C成分値Cout、補正L成分値Loutによって、補正画素値が規定される。なお、現画素値は、LCH変換回路(22d)から出力された現画素H成分値Hin、現画素C成分値Cin及び現画素L成分値Linによって規定される。   The corrected pixel value is defined by the corrected H component value Hout, the corrected C component value Cout, and the corrected L component value Lout obtained as described above. The current pixel value is defined by the current pixel H component value Hin, the current pixel C component value Cin, and the current pixel L component value Lin output from the LCH conversion circuit (22d).

<CPUによる色調補正処理>
次に、基本的な色調補正処理について、図15及び図16を用いて説明する。
<Tone correction processing by CPU>
Next, basic color tone correction processing will be described with reference to FIGS. 15 and 16.

図15に示すように、先ず、CPU(38)は、基準ゲインxγ,yγを、ゲインx1,y1とする(ステップSt31)。このとき、ホワイトバランス調整回路(22b)の各アンプ(221b,222b)には、ゲインx1,x1、即ち基準ゲインxγ,yγが設定される。なお、基準ゲインxγ,yγとは、約5100Kの色温度(基準温度)を有する被写体を撮像した際にホワイトバランスが適切に調整されるゲインであって、製造段階で決定される、いわばデフォルト値である。   As shown in FIG. 15, first, the CPU (38) sets the reference gains xγ and yγ as gains x1 and y1 (step St31). At this time, gains x1 and x1, that is, reference gains xγ and yγ are set in the amplifiers (221b and 222b) of the white balance adjustment circuit (22b). Note that the reference gains xγ and yγ are gains that allow white balance to be adjusted appropriately when a subject having a color temperature (reference temperature) of about 5100K is imaged. The so-called default values are determined at the manufacturing stage. It is.

次いで、CPU(38)は、スルー画像処理を開始するために、TG(16)、信号処理回路(22)及びビデオエンコーダ(28)にスルー画像処理命令を出力する(ステップSt32)。そして、CPU(38)は、画像処理装置(10)のシャッタボタン(40)が押下されるまでの間(ステップSt34のNO)、色調補正を行い(ステップSt33)、シャッタボタン(40)が押下された場合(ステップSt34のYES)、撮像/記録処理を行う(ステップSt35)。これによって、シャッタボタン(40)の操作に応答して撮像された被写体像の圧縮画像データが、ファイル形式でメモリカード(36)に記録される。   Next, the CPU (38) outputs a through image processing command to the TG (16), the signal processing circuit (22) and the video encoder (28) in order to start through image processing (step St32). Then, the CPU (38) performs color correction (step St33) until the shutter button (40) of the image processing apparatus (10) is pressed (NO in step St34), and the shutter button (40) is pressed. If so (YES in step St34), the imaging / recording process is performed (step St35). Thereby, the compressed image data of the subject image picked up in response to the operation of the shutter button (40) is recorded in the memory card (36) in the file format.

上記色調補正は、図16に従って実行される。先ず、CPU(38)は、垂直同期信号の発生の有無を判別する(ステップSt41)。垂直同期信号が発生している場合(ステップSt41のYES)、CPU(38)は、積算回路(22c)が算出したR成分、G成分、B成分の積算値Ir(i),Ig(i),Ib(i)を取り込む(ステップSt42)。次いで、CPU(38)は、上記積算値Ir(i),Ig(i),Ib(i)を用いて最適ゲインxs,ysを算出し(ステップSt43)、算出した最適ゲインxs,ysをゲインx2,y2として保持する(ステップSt44)。CPU(38)は、ゲインx2とゲインx1との差Δxと、ゲインy2とゲインy1との差Δyとを算出する(ステップSt45)。   The color tone correction is executed according to FIG. First, the CPU (38) determines whether or not a vertical synchronizing signal has been generated (step St41). When the vertical synchronization signal is generated (YES in step St41), the CPU (38) determines the integrated values Ir (i) and Ig (i) of the R component, G component, and B component calculated by the integration circuit (22c). , Ib (i) is fetched (step St42). Next, the CPU (38) calculates optimal gains xs and ys using the integrated values Ir (i), Ig (i) and Ib (i) (step St43), and calculates the calculated optimal gains xs and ys as gains. These are held as x2 and y2 (step St44). The CPU (38) calculates a difference Δx between the gain x2 and the gain x1 and a difference Δy between the gain y2 and the gain y1 (step St45).

算出されたゲイン差Δx,Δyは、被写体像のホワイトバランスの変化量であり、図6及び図17において白抜きの丸で示す、エリア1からエリア2までの移動量W1に相当する。CPU(38)は、このようなゲイン差Δx,Δyに基づいて、目標値テーブル(22n)における目標H成分値、目標C成分値及び目標L成分値を、H成分(色相)、C成分(彩度)、L成分(明度)の順に変更する(ステップSt46)。変更された目標H成分値、目標C成分値及び目標L成分値は、図17において白抜きの四角で示す位置に移動量T1だけ移動する。   The calculated gain difference Δx, Δy is a change amount of the white balance of the subject image, and corresponds to a movement amount W1 from the area 1 to the area 2 indicated by a white circle in FIGS. Based on the gain differences Δx, Δy, the CPU (38) converts the target H component value, target C component value, and target L component value in the target value table (22n) into the H component (hue), C component ( Saturation) and L component (lightness) are changed in this order (step St46). The changed target H component value, target C component value, and target L component value move by a movement amount T1 to the position indicated by the white square in FIG.

即ち、図17に示すように、ホワイトバランスにおけるエリア1からエリア2への移動方向と、各目標成分値の移動方向とは、逆となっている。そして、各目標成分値の移動量T1は、ホワイトバランスにおける移動量W1を相殺する量である(|W1|=|T1|)。   That is, as shown in FIG. 17, the moving direction from area 1 to area 2 in white balance and the moving direction of each target component value are opposite. The movement amount T1 of each target component value is an amount that cancels out the movement amount W1 in white balance (| W1 | = | T1 |).

ステップSt46の処理完了後、CPU(38)は、ステップSt44で算出した最適ゲインx2,y2をゲインx1,x1として保持し(ステップSt47)、図15のステップSt34以降の処理を行う。   After completing the process in step St46, the CPU (38) holds the optimum gains x2 and y2 calculated in step St44 as gains x1 and x1 (step St47), and performs the processes after step St34 in FIG.

<水中撮像モードにおける色調整処理>
本実施形態に係る画像処理装置(10)は、上述の通り、水中撮像モードの設定が可能となっている。水中撮像モードが設定された状態でストロボを焚かずに撮像部(11)が水中で被写体を撮像した場合、当該画像には、以下に説明するような実際の被写体の色味をより忠実に再現する処理が施される。
<Color adjustment processing in underwater imaging mode>
As described above, the image processing apparatus (10) according to the present embodiment can set the underwater imaging mode. When the imaging unit (11) captures a subject underwater without setting a strobe while the underwater imaging mode is set, the color of the actual subject as described below is more faithfully reproduced in the image. To be processed.

以下では、説明の便宜上、L補正回路(22e)、C補正回路(22f)、H補正回路(22g)及び領域判別回路(22i)を、まとめて色属性調整回路(22p)と呼称する。   Hereinafter, for convenience of explanation, the L correction circuit (22e), the C correction circuit (22f), the H correction circuit (22g), and the region determination circuit (22i) are collectively referred to as a color attribute adjustment circuit (22p).

図18は、水中で撮像した画像のR成分、B成分及びG成分がどのようにずれるかを説明するための色度図である。図18では、基準となるR成分、B成分及びG成分の各色の分布を実線で表している。   FIG. 18 is a chromaticity diagram for explaining how the R component, B component, and G component of an image captured in water are shifted. In FIG. 18, the distribution of each color of the reference R component, B component, and G component is represented by a solid line.

図18に示すように、水中で撮像した画像の色の分布は、水中での撮像場所(被写体の位置)における水深と、水質(具体的には、水中における植物プランクトンの含有量)との影響を受けて変化する。   As shown in FIG. 18, the color distribution of an image captured in water is affected by the water depth at the imaging location (subject position) in water and the water quality (specifically, the phytoplankton content in water). To change.

具体的には、水深を一定とした場合、色の分布は、植物プランクトンの量が多い程、図18の縦軸の上方向に全体的に遷移し、逆に植物プランクトンの量が少ない程、縦軸の下方向に全体的に遷移する。植物プランクトンの量を一定とした場合、色の分布は、水深が浅い程、図18の横軸の右方向に全体的に遷移し、逆に水深が深い程、横軸の左方向に全体的に遷移する。すると、植物プランクトンの量が比較的多い場合は水深が深い程、緑色が強まり(図18の一点鎖線)、プランクトンの量が比較的少ない場合は水深が深い程、青みが強まる(図18の破線)。これは、地上から水中に入射した光のうち、R成分は水に吸収され易く、B成分は植物プランクトンに吸収され易いからである。   Specifically, when the water depth is constant, the color distribution transitions generally upward in the vertical axis of FIG. 18 as the amount of phytoplankton increases, and conversely, as the amount of phytoplankton decreases, Transitions downward in the vertical axis. When the amount of phytoplankton is constant, the color distribution changes as a whole in the right direction of the horizontal axis in FIG. 18 as the water depth is shallower. Conversely, as the water depth increases, the color distribution increases in the overall left direction of the horizontal axis. Transition to. Then, when the amount of phytoplankton is relatively large, the deeper the water depth, the stronger the green color (dotted line in FIG. 18), and when the amount of plankton is relatively small, the deeper the water depth, the stronger the blueness (dashed line in FIG. 18). ). This is because the R component is easily absorbed by water and the B component is easily absorbed by phytoplankton in the light incident on the water from the ground.

そこで、本実施形態に係る画像処理装置(10)のCPU(38)は、水中撮像モードが選択された状態で撮像が行われた場合、先ずは判定部として機能して、被写体の位置における水深と、その位置における水質の状態とを判定する。次いで、CPU(38)は、ホワイトバランス補正係数調整部として機能して、判定した水深及び水質の状態に応じて、画像のホワイトバランス調整に利用する上記ゲインx1,y1を補正するためのホワイトバランス補正係数を決定する。これと並行して、CPU(38)は、判定した水深及び水質の状態に応じて、H成分(色相)、C成分(彩度)、L成分(明度)の各補正に利用する色属性係数(具体的には、上述した目標H成分値、目標C成分値及び目標L成分値それぞれを個々に補正するための補正パラメータ)を決定する。   Therefore, when imaging is performed with the underwater imaging mode selected, the CPU (38) of the image processing apparatus (10) according to the present embodiment first functions as a determination unit, and the water depth at the position of the subject. And the state of water quality at that position. Next, the CPU (38) functions as a white balance correction coefficient adjustment unit, and corrects the gains x1 and y1 used for white balance adjustment of the image according to the determined water depth and water quality state. Determine the correction factor. In parallel with this, the CPU (38) uses the color attribute coefficient used for correcting each of the H component (hue), C component (saturation), and L component (lightness) according to the determined water depth and water quality. (Specifically, correction parameters for individually correcting the target H component value, the target C component value, and the target L component value described above) are determined.

図19には、水中で撮像した際に、ホワイトバランス調整をどのように行うかの概念を説明する図を表している。水中で撮像された画像は、水深及び水質の状態の影響によってG成分やB成分が強まるため、図6及び図17のエリア1ではなく、U軸及びV軸で定義された座標平面上の第3象限に位置するエリア3や、第4象限のエリア4等に、ホワイトバランス調整前の画像が位置する場合がある。一例として、画像は、植物プランクトンの量が多い場合はエリア3に位置し、植物プランクトンの量が少ない場合はエリア4に位置する。更に、一例として、エリア3やエリア4のいずれにおいても、画像の位置は、水深が浅ければV軸とU軸との交点に近づくが、水深が深ければ当該交点から遠のく。   FIG. 19 is a diagram illustrating the concept of how white balance adjustment is performed when an image is taken underwater. Since the G component and the B component of the image captured underwater are strengthened by the influence of the water depth and the state of the water quality, the first image on the coordinate plane defined by the U axis and the V axis is used instead of the area 1 in FIGS. An image before white balance adjustment may be located in area 3 located in the third quadrant, area 4 in the fourth quadrant, or the like. As an example, the image is located in area 3 when the amount of phytoplankton is large, and is located in area 4 when the amount of phytoplankton is small. Furthermore, as an example, in either area 3 or area 4, the position of the image approaches the intersection of the V axis and the U axis when the water depth is shallow, but is far from the intersection when the water depth is deep.

ホワイトバランス調整前の画像がどのエリアに存在するとしても、本実施形態のCPU(38)は、ホワイトバランス補正係数を決定することによってゲインx1,y1をよりきめ細かく調整し、信号処理回路(22)は、当該ゲインx1,y1を用いてホワイトバランス調整を行うことで、画像をU軸とV軸との交点であるエリア2に移動させる。更に、本実施形態のCPU(38)は、ホワイトバランス補正係数の決定に伴い色属性係数も適宜決定し、色属性調整回路(22p)は、決定された色属性係数を用いて、例えば画像の赤みを若干強める等の、更なる色調のきめ細やかな調整処理を行う。   Regardless of the area where the image before white balance adjustment exists, the CPU (38) of this embodiment adjusts the gains x1 and y1 more finely by determining the white balance correction coefficient, and the signal processing circuit (22). Performs white balance adjustment using the gains x1 and y1, thereby moving the image to the area 2 that is the intersection of the U axis and the V axis. Further, the CPU (38) of the present embodiment appropriately determines the color attribute coefficient in accordance with the determination of the white balance correction coefficient, and the color attribute adjustment circuit (22p) uses the determined color attribute coefficient to Perform finer adjustment processing of the color tone, such as slightly enhancing redness.

これらの処理により、図19に示すように、ホワイトバランス調整によって画像がエリア3またはエリア4からエリア2へと移動することに伴い、Mg(マジェンダ)、R(レッド)、Ye(イエロー)、G(グリーン)、Cy(シアン)及びB(ブルー)の各色の目標成分値は、ホワイトバランス調整の移動方向とは逆方向に移動する。具体的に、ホワイトバランス調整による移動がエリア3からエリア2に移動する際、各色の目標成分値の移動方向は、エリア2からエリア3へと向かう方向であって、その移動量は、ホワイトバランスにおける移動量W1’を相殺する量T1’となっている。ホワイトバランス調整による移動がエリア4からエリア2に移動する際、各色の目標成分値の移動方向は、エリア2からエリア4へと向かう方向であって、その移動量は、ホワイトバランスにおける移動量W1”を相殺する量T1”となっている。   With these processes, as shown in FIG. 19, as the image moves from area 3 or area 4 to area 2 by white balance adjustment, Mg (magenta), R (red), Ye (yellow), G The target component value of each color of (green), Cy (cyan), and B (blue) moves in the direction opposite to the moving direction of white balance adjustment. Specifically, when the movement by white balance adjustment moves from area 3 to area 2, the movement direction of the target component value of each color is the direction from area 2 to area 3, and the movement amount is the white balance. Is the amount T1 ′ that offsets the movement amount W1 ′. When the movement by white balance adjustment moves from area 4 to area 2, the movement direction of the target component value of each color is the direction from area 2 to area 4, and the movement amount is the movement amount W1 in white balance. The amount is “T1 that cancels out”.

上記処理により、本実施形態では、水中でストロボを焚かずに撮像した画像に対し、ストロボを焚いて撮像した際のような、実際の色味を再現することができる。   According to the above processing, in the present embodiment, an actual color tone can be reproduced as in the case of shooting an image captured with a strobe with respect to an image captured without striking the strobe in water.

以下、図20〜図22を用いて、上記制御の動作の流れについて詳述する。   Hereinafter, the flow of the control operation will be described in detail with reference to FIGS.

先ず、水中撮像モードが設定され(St61のYES)、且つ、ストロボを焚かずに撮像されたとする(St62のYES)。CPU(38)は、上述した積算回路(22c)から入力されるR成分の積算値Ir(i),G成分のIg(i),B成分の積算値Ib(i)を用いて、比率係数“R/G”“B/G”を求める(ステップSt63)。CPU(38)は、求めた比率係数“R/G”“B/G”を、図21に係る水深−水質テーブル(22q)に当てはめて、水中における被写体の位置での水深と水質の状態(水中における植物プランクトンの含有量)とを、当該テーブル(22q)内の値から算出する(ステップSt64)。即ち、CPU(38)は、撮像部(11)が撮像した被写体の画像の色分布情報に基づいて、該被写体が撮像された位置における水深と、該位置における水質の状態とを判定する。   First, it is assumed that the underwater imaging mode is set (YES in St61) and the image is taken without striking the strobe (YES in St62). The CPU (38) uses the R component integrated value Ir (i), the G component Ig (i), and the B component integrated value Ib (i) input from the above-described integration circuit (22c) to calculate the ratio coefficient. “R / G” and “B / G” are obtained (step St63). The CPU (38) applies the obtained ratio coefficients “R / G” and “B / G” to the water depth-water quality table (22q) according to FIG. 21 to determine the water depth and water quality at the position of the subject in the water ( The phytoplankton content in water) is calculated from the values in the table (22q) (step St64). That is, the CPU (38) determines the water depth at the position where the subject is imaged and the water quality state at the position based on the color distribution information of the image of the subject imaged by the imaging unit (11).

ここで、図21は、メモリ(22j)が記憶する水深−水質テーブル(22q)の概念図である。水深−水質テーブル(22q)は、縦に水深を採り、横に水質の状態として水中における植物プランクトンの含有量を採り、水深と水質の状態との組み合わせパターンそれぞれに対応する比率係数“R/G”“B/G”が、マトリクス状に表されている。“R/G”は、画像のR成分とG成分との比率を表し、“B/G”は、B成分とG成分との比率を表す。比率係数“R/G”“B/G”は、水深と水質の状態との各組み合わせパターンを条件として、理論及び実験等によって予め定義されたものである。CPU(38)は、求めた比率係数“R/G”“B/G”を図21の水深−水質テーブル(22q)に当てはめることにより、容易に水深と水質の状態とを表すデータを算出することができる。   Here, FIG. 21 is a conceptual diagram of the water depth-water quality table (22q) stored in the memory (22j). The water depth-water quality table (22q) takes water depth vertically and takes the phytoplankton content in water as the water quality state horizontally, and the ratio coefficient “R / G corresponding to each combination pattern of water depth and water quality state” “B / G” is shown in a matrix. “R / G” represents the ratio of the R component to the G component of the image, and “B / G” represents the ratio of the B component to the G component. The ratio coefficients “R / G” and “B / G” are defined in advance by theory, experiment, and the like on the condition of each combination pattern of water depth and water quality. The CPU (38) easily calculates data representing the water depth and the state of water quality by applying the obtained ratio coefficients “R / G” and “B / G” to the water depth-water quality table (22q) of FIG. be able to.

次いで、CPU(38)は、算出した水深と水質の状態とを表すデータを、図22のパラメータテーブル(22r)に当てはめて、ホワイトバランス調整回路(22b)及び色属性調整回路(22q)を構成する各種回路(22e,22f,22g,22i)に設定するべき各種パラメータを選出する(ステップSt65)。   Next, the CPU (38) applies the data representing the calculated water depth and the state of the water quality to the parameter table (22r) of FIG. 22 to configure the white balance adjustment circuit (22b) and the color attribute adjustment circuit (22q). Various parameters to be set in the various circuits (22e, 22f, 22g, 22i) to be selected are selected (step St65).

ここで、図22は、メモリ(22j)が記憶するパラメータテーブル(22r)の概念図である。パラメータテーブル(22r)には、水深と水質の状態(水中における植物プランクトンの含有量)との組み合わせパターン毎に、各ゲインx1,y1を補正するためのホワイトバランス補正係数、目標H成分値の補正パラメータ、目標C成分値の補正パラメータ、目標L成分値の補正パラメータが、予め設定されている。つまり、このパラメータテーブル(22r)は、水中で撮像された画像に水深及び水質による色の影響がどの程度及ぼされていても、忠実な色見を再現するためのきめ細かいホワイトバランス係数及び色属性係数を、事前準備したものと言える。例えば、パラメータテーブル(22r)内の各種パラメータは、水深が深い程、補正値が大きくなるように設定されていたり、植物プランクトンの量が多い程補正値が大きくなるように設定されていたりすることができる。   Here, FIG. 22 is a conceptual diagram of the parameter table (22r) stored in the memory (22j). The parameter table (22r) includes a white balance correction coefficient for correcting the gains x1 and y1 and a target H component value correction for each combination pattern of the water depth and the state of water quality (the content of phytoplankton in water). A parameter, a correction parameter for the target C component value, and a correction parameter for the target L component value are set in advance. In other words, this parameter table (22r) is a fine white balance coefficient and color attribute coefficient for reproducing faithful color appearance, no matter how much the color is affected by water depth and water quality. Can be said to have been prepared in advance. For example, various parameters in the parameter table (22r) may be set such that the correction value increases as the water depth increases, or the correction value increases as the amount of phytoplankton increases. Can do.

なお、上記2つのテーブル(22q,22r)は共に、ホワイトバランス補正係数情報、及び、色属性係数情報に該当する。   The two tables (22q, 22r) both correspond to white balance correction coefficient information and color attribute coefficient information.

次いで、CPU(38)は、ステップSt65で選出した各種パラメータを、色属性調整回路(22q)及びホワイトバランス調整回路(22b)に設定する(ステップSt66)。具体的には、ゲインx1,y1を補正するためのホワイトバランス補正係数は、ホワイトバランス調整回路(22b)に設定される。色属性係数は、色属性調整回路(22p)に設定される。   Next, the CPU (38) sets the various parameters selected in step St65 in the color attribute adjustment circuit (22q) and the white balance adjustment circuit (22b) (step St66). Specifically, the white balance correction coefficient for correcting the gains x1 and y1 is set in the white balance adjustment circuit (22b). The color attribute coefficient is set in the color attribute adjustment circuit (22p).

ステップSt66にて各種パラメータが設定された色属性調整回路(22q)及びホワイトバランス調整回路(22b)は、当該パラメータに基づき、対象の画像に対して色調整を行う(ステップSt67)。具体的には、ホワイトバランス調整回路(22b)は、2つのテーブル(22q、22r)から得られたホワイトバランス補正係数とゲインx1,y1とを用いて、画像に対してホワイトバランス調整を行う。色属性調整回路(22p)は、2つのテーブル(22q、22r)から得られた色属性係数、目標H成分値、目標C成分値及び目標L成分値を用いて、画像の明度、彩度及び色相を補正する。   The color attribute adjustment circuit (22q) and the white balance adjustment circuit (22b) for which various parameters are set in step St66 perform color adjustment on the target image based on the parameters (step St67). Specifically, the white balance adjustment circuit (22b) performs white balance adjustment on the image using the white balance correction coefficient and the gains x1 and y1 obtained from the two tables (22q and 22r). The color attribute adjustment circuit (22p) uses the color attribute coefficient, the target H component value, the target C component value, and the target L component value obtained from the two tables (22q, 22r) to obtain the brightness, saturation, and Correct the hue.

<効果>
本実施形態では、水中で撮像された画像の色分布情報から、被写体が撮像された位置における水深と水質の状態とが判定されると、判定結果を用いて画像のホワイトバランスを補正するためのホワイトバランス補正係数が決定され、当該係数を用いて画像に対してホワイトバランス調整が行われる。これにより、水深のみならず水質の状態による影響が軽減された、実際の色味ができる限り忠実に再現された画像を得ることができる。
<Effect>
In this embodiment, when the water depth and water quality state at the position where the subject is imaged are determined from the color distribution information of the image captured underwater, the determination result is used to correct the white balance of the image. A white balance correction coefficient is determined, and white balance adjustment is performed on the image using the coefficient. As a result, it is possible to obtain an image in which the actual color is reproduced as faithfully as possible, in which the influence of the water quality as well as the water depth is reduced.

また、本実施形態では、水深と水質の状態との組み合わせパターンに対応してホワイトバランス補正係数が予め設定されている。そのため、実際の水深と実際の水質の状態とに応じて、ホワイトバランス補正係数は迅速に決定され、ホワイトバランス制御の処理は比較的迅速に行われる。また、実際の水深と実際の水質の状態とに応じて、ホワイトバランス補正係数をきめ細かく調整することも可能となる。   In this embodiment, the white balance correction coefficient is set in advance corresponding to the combination pattern of the water depth and the water quality state. Therefore, the white balance correction coefficient is quickly determined according to the actual water depth and the actual water quality, and the process of white balance control is performed relatively quickly. In addition, it is possible to finely adjust the white balance correction coefficient according to the actual water depth and the actual water quality.

また、本実施形態では、判定された水深及び水質の状態に応じて、画像の明度、彩度及び色相が適正となるようにチューニングされる。従って、水中の実際の色味をより忠実に再現された画像を得ることができる。   In the present embodiment, the brightness, saturation, and hue of the image are tuned to be appropriate according to the determined water depth and water quality. Accordingly, it is possible to obtain an image in which the actual color in water is reproduced more faithfully.

また、本実施形態では、水深と水質の状態との組み合わせパターンに対応して画像の明度、彩度及び色相を補正するための色属性係数が予め設定されている。そのため、実際の水深と実際の水質の状態とに応じて、色属性係数は迅速に決定され、画像の彩度、明度及び彩度の調整処理は比較的迅速に行われる。また、実際の水深と実際の水質の状態とに応じて、色属性係数をきめ細かく調整することも可能となる。   In the present embodiment, color attribute coefficients for correcting the brightness, saturation, and hue of an image are set in advance corresponding to the combination pattern of the water depth and the water quality state. Therefore, the color attribute coefficient is quickly determined according to the actual water depth and the actual water quality state, and the saturation, brightness, and saturation adjustment processing of the image is performed relatively quickly. In addition, the color attribute coefficient can be finely adjusted according to the actual water depth and the actual water quality.

≪その他の実施形態≫
上記実施形態では、ゲインx1,y1を補正するためのホワイトバランス補正係数が、水深及び水質の状態に応じて決定されると説明したが、水深及び水質の状態に応じてゲインx1,y1自体がホワイトバランス補正係数として決定されてもよい。
<< Other Embodiments >>
In the above embodiment, it has been described that the white balance correction coefficient for correcting the gains x1 and y1 is determined according to the water depth and the water quality state. However, the gains x1 and y1 themselves are determined according to the water depth and the water quality state. It may be determined as a white balance correction coefficient.

上記実施形態では、水深及び水質の状態に応じて、目標H成分値の補正パラメータ、目標C成分値の補正パラメータ、目標L成分値の補正パラメータが、色属性係数として決定されると説明したが、水深及び水質の状態に応じて目標H成分値自体、目標C成分値自体、目標L成分値自体が色属性係数として決定されてもよい。   In the above embodiment, the target H component value correction parameter, the target C component value correction parameter, and the target L component value correction parameter are determined as the color attribute coefficients according to the water depth and the water quality state. The target H component value itself, the target C component value itself, and the target L component value itself may be determined as color attribute coefficients in accordance with the water depth and the water quality state.

上記実施形態では、ホワイトバランス補正係数情報及び色属性係数情報が、図21及び図22に係るテーブル(22q,22r)で表される場合を例示したが、図21及び図22のテーブルで表されるものに限定されない。例えば、ホワイトバランス補正係数情報及び色属性係数情報は、式を用いてその都度演算により求められてもよい。   In the above embodiment, the case where the white balance correction coefficient information and the color attribute coefficient information are represented by the tables (22q, 22r) according to FIGS. 21 and 22 is illustrated, but is represented by the tables of FIGS. It is not limited to a thing. For example, the white balance correction coefficient information and the color attribute coefficient information may be obtained by calculation each time using an expression.

上記実施形態では、水深及び水質の状態に応じて、画像の明度、彩度及び色相全てが補正される場合を例示したが、画像の明度、彩度及び色相の少なくとも1つが補正されてもよい。   In the above embodiment, the case where all the brightness, saturation, and hue of the image are corrected according to the state of water depth and water quality is exemplified. However, at least one of the brightness, saturation, and hue of the image may be corrected. .

上記実施形態の図20では、水中においてストロボを焚かずに撮像する場合を例示した。しかし、ストロボを焚かずに撮像する場合に限定されない。水中にてストロボを焚いて撮像した場合にも、図20のステップSt63〜St67は適用可能である。   In FIG. 20 of the above-described embodiment, the case where imaging is performed without strobing the strobe in water is illustrated. However, the present invention is not limited to the case where the image is taken without strobing. Steps St63 to St67 in FIG. 20 are also applicable when shooting with a strobe in water.

上記実施形態の図20において、水中撮像モードの設定は手動でされてもよいし、水中か否かを判定するためのセンサを用いて自動で設定されてもよい。センサによる自動設定の場合、当該センサは画像処理装置(10)に搭載され、CPU(38)は、当該センサの検出結果が水中であるとの結果であれば自動で水中撮像モードに設定する(図20のステップSt61)。   In FIG. 20 of the above-described embodiment, the underwater imaging mode may be set manually or automatically using a sensor for determining whether or not it is underwater. In the case of automatic setting by the sensor, the sensor is mounted on the image processing device (10), and the CPU (38) automatically sets the underwater imaging mode if the detection result of the sensor is underwater ( Step St61 in FIG. 20).

本発明は、水中で撮像した画像の色見を忠実に再現する画像処理装置として有用である。   The present invention is useful as an image processing apparatus that faithfully reproduces the color of an image captured in water.

10 画像処理装置
11 撮像部
38 CPU(判定部、ホワイトバランス補正係数調整部)
22b ホワイトバランス調整回路(ホワイトバランス制御部)
22j メモリ(第1記憶部、第2記憶部)
22p 色属性調整回路(色属性調整部)
10 Image processing device
11 Imaging unit
38 CPU (determination unit, white balance correction coefficient adjustment unit)
22b White balance adjustment circuit (white balance control unit)
22j memory (first storage unit, second storage unit)
22p Color attribute adjustment circuit (color attribute adjustment unit)

Claims (4)

水中にて被写体を撮像する撮像部と、
前記撮像部が撮像した前記被写体の画像の色分布情報に基づいて、該被写体が撮像された位置における水深と、該位置における水質の状態と、を判定する判定部と、
前記判定部が判定した前記水深及び前記水質の状態に応じて、前記画像のホワイトバランスを補正するためのホワイトバランス補正係数を決定するホワイトバランス補正係数調整部と、
前記ホワイトバランス補正係数を用いて、前記画像に対してホワイトバランス調整を行うホワイトバランス調整部と
を備えることを特徴とする画像処理装置。
An imaging unit for imaging a subject underwater;
A determination unit that determines, based on color distribution information of an image of the subject imaged by the imaging unit, a water depth at a position where the subject is imaged and a water quality state at the position;
A white balance correction coefficient adjusting unit for determining a white balance correction coefficient for correcting the white balance of the image according to the water depth and the water quality determined by the determination unit;
An image processing apparatus comprising: a white balance adjustment unit that performs white balance adjustment on the image using the white balance correction coefficient.
請求項1において、
前記水深と前記水質の状態との組み合わせパターンに対応して前記ホワイトバランス補正係数が予め設定されているホワイトバランス補正係数情報、を記憶する第1記憶部、
を更に備え、
前記ホワイトバランス調整部は、前記ホワイトバランス補正係数情報を用いて、前記画像のホワイトバランスを補正する
ことを特徴とする画像処理装置。
In claim 1,
A first storage unit that stores white balance correction coefficient information in which the white balance correction coefficient is set in advance corresponding to a combination pattern of the water depth and the water quality state;
Further comprising
The image processing apparatus, wherein the white balance adjustment unit corrects the white balance of the image using the white balance correction coefficient information.
請求項1または請求項2において、
前記判定部が判定した前記水深及び前記水質の状態に応じて、前記画像の明度、彩度及び色相の少なくとも1つを補正する色属性調整部と
を更に備えることを特徴とする画像処理装置。
In claim 1 or claim 2,
An image processing apparatus, further comprising: a color attribute adjustment unit that corrects at least one of brightness, saturation, and hue of the image according to the water depth and the water quality determined by the determination unit.
請求項3において、
前記水深と前記水質の状態との組み合わせパターンに対応して前記画像の明度、彩度及び色相の少なくとも1つを補正するための色属性係数が予め設定されている色属性係数情報、を記憶する第2記憶部、
を更に備え、
前記色属性調整部は、前記色属性係数情報を用いて、前記色属性係数を調整する
ことを特徴とする画像処理装置。
In claim 3,
Stores color attribute coefficient information in which a color attribute coefficient for correcting at least one of brightness, saturation, and hue of the image corresponding to a combination pattern of the water depth and the water quality state is preset. A second storage unit,
Further comprising
The image processing apparatus, wherein the color attribute adjustment unit adjusts the color attribute coefficient using the color attribute coefficient information.
JP2017110221A 2017-06-02 2017-06-02 Image processing device Active JP6870817B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017110221A JP6870817B2 (en) 2017-06-02 2017-06-02 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017110221A JP6870817B2 (en) 2017-06-02 2017-06-02 Image processing device

Publications (2)

Publication Number Publication Date
JP2018207283A true JP2018207283A (en) 2018-12-27
JP6870817B2 JP6870817B2 (en) 2021-05-12

Family

ID=64958377

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017110221A Active JP6870817B2 (en) 2017-06-02 2017-06-02 Image processing device

Country Status (1)

Country Link
JP (1) JP6870817B2 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070236564A1 (en) * 2006-04-06 2007-10-11 Nikon Corporation Color compensation system for images captured underwater
JP2008017198A (en) * 2006-07-06 2008-01-24 Fujifilm Corp Device and method for calculating light source color, and photographing device
JP2009200589A (en) * 2008-02-19 2009-09-03 Sanyo Electric Co Ltd Image processing apparatus and color corrected photography method thereof
JP2012124877A (en) * 2010-02-04 2012-06-28 Canon Inc Image processing device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070236564A1 (en) * 2006-04-06 2007-10-11 Nikon Corporation Color compensation system for images captured underwater
JP2008017198A (en) * 2006-07-06 2008-01-24 Fujifilm Corp Device and method for calculating light source color, and photographing device
JP2009200589A (en) * 2008-02-19 2009-09-03 Sanyo Electric Co Ltd Image processing apparatus and color corrected photography method thereof
JP2012124877A (en) * 2010-02-04 2012-06-28 Canon Inc Image processing device

Also Published As

Publication number Publication date
JP6870817B2 (en) 2021-05-12

Similar Documents

Publication Publication Date Title
JP5396231B2 (en) Imaging device
US8199203B2 (en) Imaging apparatus and imaging method with face detection based on scene recognition results
US7796831B2 (en) Digital camera with face detection function for facilitating exposure compensation
JP5622513B2 (en) Image processing apparatus, image processing method, and imaging apparatus
US8373769B2 (en) Imaging apparatus, imaging processing method and recording medium
JP5553230B2 (en) Imaging apparatus and imaging processing method
CN103813097A (en) Imaging apparatus and imaging method
JP2007158544A (en) Camera system
WO2007049418A1 (en) Image processing system and image processing program
US7173654B2 (en) Digital camera having color adjustment capability
US7876366B2 (en) Electronic camera
JP5315125B2 (en) Image processing apparatus, imaging apparatus, and composite image generation method
JP2008017198A (en) Device and method for calculating light source color, and photographing device
JP4581633B2 (en) Color signal correction method, apparatus and program
JP6870817B2 (en) Image processing device
CN105191284B (en) Photographic device and its control method
US20190246043A1 (en) Image processing apparatus configured to generate auxiliary image showing luminance value distribution, method for controlling the image processing apparatus, and storage medium
JP4718113B2 (en) White balance adjustment method and image processing apparatus
JP3754364B2 (en) Digital camera
JP4964992B2 (en) Image capturing apparatus and image recording method thereof
US8041206B2 (en) Imaging apparatus and method for controlling flash emission
JP3992476B2 (en) Image processing device
JP2009022044A (en) Image processing apparatus and image processing program
JP2010041231A (en) Infrared ray radiation type imaging device and control program for the same
JP4804327B2 (en) Electronic camera

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200424

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20201005

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20201110

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20201225

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210202

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210217

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: 20210316

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210406

R150 Certificate of patent or registration of utility model

Ref document number: 6870817

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150