JP6870817B2 - Image processing device - Google Patents

Image processing device Download PDF

Info

Publication number
JP6870817B2
JP6870817B2 JP2017110221A JP2017110221A JP6870817B2 JP 6870817 B2 JP6870817 B2 JP 6870817B2 JP 2017110221 A JP2017110221 A JP 2017110221A JP 2017110221 A JP2017110221 A JP 2017110221A JP 6870817 B2 JP6870817 B2 JP 6870817B2
Authority
JP
Japan
Prior art keywords
component
image
white balance
value
color
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2017110221A
Other languages
Japanese (ja)
Other versions
JP2018207283A (en
Inventor
光章 黒川
光章 黒川
昭 岡阪
昭 岡阪
浩二 武本
浩二 武本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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

Landscapes

  • Color Television Image Signal Generators (AREA)
  • Processing Of Color Television Signals (AREA)

Description

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

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

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

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

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

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

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

第1の発明は、水中にて被写体を撮像する撮像部と、画像のR成分の値とG成分の値とB成分の値とによって定められる水深及び水質の状態を表す水深−水質テーブルを記憶した記憶部と、前記撮像部が撮像した前記被写体の画像のR成分の値とG成分の値とB成分の値前記テーブルに当てはめて、前記水深と前記水質の状態と判定する判定部と、前記判定部が判定した前記水深及び前記水質の状態に応じて、前記画像のホワイトバランスを補正するためのホワイトバランス補正係数を決定するホワイトバランス補正係数調整部と、前記ホワイトバランス補正係数を用いて、前記画像に対してホワイトバランス調整を行うホワイトバランス調整部とを備えることを特徴とする画像処理装置である。 The first invention stores an image pickup unit that images a subject in water, and a water depth-water quality table that represents the water depth and water quality state determined by the R component value, the G component value, and the B component value of the image. and a storage unit and, by fitting the values of the B component value and the G component of the R component of the image of the object which the imaging unit has captured the table determination unit and a state of the water quality and the water depth A white balance correction coefficient adjusting unit that determines a white balance correction coefficient for correcting the white balance of the image according to the water depth and the water quality condition determined by the determination unit, and the white balance correction coefficient. using an image processing apparatus comprising: a white balance adjustment unit performs white balance adjustment on the image.

水質の状態としては、水中における植物プランクトンの含有量が挙げられる。ここでは、水中で撮像された画像には、被写体が撮像された位置における水深と、当該位置における水質の状態とに応じて、ホワイトバランス制御が行われる。これにより、水深のみならず水質の状態による影響が軽減された、実際の色味ができる限り忠実に再現された画像を得ることができる。 Water quality conditions include the content of phytoplankton in water. Here, in the image captured in water, white balance control is performed according to the water depth at the position where the subject is captured and the state of the 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, with the influence of not only the water depth but also the state of water quality reduced.

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

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

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

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

第4の発明は、第3の発明において、前記記憶部には、前記水深と前記水質の状態との組み合わせパターンに対応して前記画像の明度、彩度及び色相の少なくとも1つを補正するための色属性係数が予め設定されている色属性係数情報がさらに記憶されており、前記色属性調整部は、前記色属性係数情報を用いて、前記色属性係数を調整することを特徴とする画像処理装置である。 A fourth aspect of the present invention is to correct at least one of the brightness, saturation, and hue of the image in the storage unit in accordance with the combination pattern of the water depth and the water quality state in the third invention. The color attribute coefficient information in which the color attribute coefficient of the above is preset is further stored, and the color attribute adjusting unit adjusts the color attribute coefficient by 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 condition, so that at least one adjustment process of the saturation, lightness, and saturation of the image is performed relatively quickly. .. It is also possible to finely adjust the color attribute coefficient according to the actual water depth and the actual water quality condition.

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

図1は、画像処理装置の構成を模式的に示すブロック図である。FIG. 1 is a block diagram schematically showing the configuration of an image processing device. 図2は、信号処理回路の構成を模試的に示すブロック図である。FIG. 2 is a block diagram simulating the configuration of the signal processing circuit. 図3は、重み付けテーブルに設定された重み付け係数の概念図である。FIG. 3 is a conceptual diagram of the weighting coefficient set in the weighting table. 図4は、色の分布状態を示す図である。FIG. 4 is a diagram showing a color distribution state. 図5は、(a)被写体の外観図と、(b)撮像された被写体が表示される際の画面の一例を示す図である。FIG. 5 is a diagram showing (a) an external view of a subject and (b) an example of a screen when an captured subject is displayed. 図6は、ホワイトバランス調整時の動作の概念を説明するための図である。FIG. 6 is a diagram for explaining the concept of operation at the time of white balance adjustment. 図7は、基準値テーブルの概念図である。FIG. 7 is a conceptual diagram of a reference value table. 図8は、目標値テーブルの概念図である。FIG. 8 is a conceptual diagram of the target value table. 図9は、基準値及び目標値の分布状態を示す図である。FIG. 9 is a diagram showing the distribution state of the reference value and the target value. 図10は、基準値及び目標値の一部を示す図である。FIG. 10 is a diagram showing a part of a reference value and a target value. 図11は、領域判別回路の動作の流れを示す図である。FIG. 11 is a diagram showing an operation flow of the area discrimination circuit. 図12は、色相を調整する動作の一部を説明するための図である。FIG. 12 is a diagram for explaining a part of the operation of adjusting the hue. 図13は、彩度を調整する動作の一部を説明するための図である。FIG. 13 is a diagram for explaining a part of the operation of adjusting the saturation. 図14は、明度を調整する動作の一部を説明するための図である。FIG. 14 is a diagram for explaining a part of the operation of 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, the G component, and the B component in water. 図19は、水中撮像モードにおけるホワイトバランス調整時の動作の概念を説明するための図である。FIG. 19 is a diagram for explaining the concept of operation at the time of white balance adjustment in the underwater imaging mode. 図20は、水中撮像モードにおける色調整の動作の流れを示す図である。FIG. 20 is a diagram showing 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 the parameter table.

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

≪実施形態≫
<概要>
本実施形態に係る画像処理装置(10)は、地上のみならず水中においても画像を撮像できるタイプのデジタルカメラである。即ち、画像処理装置(10)では、地上で撮像するモードと、水中で撮像するモードとが選択可能となっている。いずれのモードが選択された場合も、画像処理装置(10)は、撮像した画像についてホワイトバランス調整を含む色調整を行い、調整後の画像を、後述するモニタ(30)等に出力する。
<< Embodiment >>
<Overview>
The image processing device (10) according to the present embodiment is a type of digital camera capable of capturing an image not only on the ground but also in water. That is, in the image processing apparatus (10), it is possible to select a mode for capturing images on the ground and a mode for capturing images underwater. 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) or the like described later.

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

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

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

以下では、このような画像処理装置(10)の構成及び基本的な色調整処理について先に述べた上で、本実施形態に係る水中撮像モードでの色調整処理を<水中撮像モードにおける色調整処理>にて詳述する。 In the following, after describing the configuration and basic color adjustment processing of such an image processing apparatus (10) 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)それぞれは、ドライバ(図示せず)によって駆動される。
<Structure>
As shown in FIG. 1, the image processing apparatus (10) includes an image pickup unit (11), a signal processing circuit (22), a memory control circuit (24), an SDRAM (26), a video encoder (28), and a monitor (30). , I / F circuit (34), memory card (36) and 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, an incident optical image is subjected to photoelectric conversion, whereby a camera signal (raw image signal) corresponding to the optical image is generated. The light receiving surface is covered with a color filter (not shown) in a primary color Bayer array, and each pixel signal forming the camera signal is one of the colors R (Red), G (Green), and B (Blue). It has only information components.

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

TG(16)は、イメージセンサ(14)の露光及びカメラ信号の読み出しを繰り返し行う。イメージセンサ(14)から読み出された各フレームのカメラ信号は、CDS/AGC回路(18)においてノイズ除去及びレベル調整が施され、その後A/D変換器(20)においてディジタル信号に変換される。 The TG (16) repeatedly exposes the image sensor (14) and reads out the camera signal. The camera signal of each frame read from the image sensor (14) is noise-removed and level-adjusted 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. In the following, the adjustment coefficient used for white balance adjustment is referred to as "gain x1, y1", and the correction coefficient used for correction of brightness, saturation and color difference is referred to as "target L component value, target C component value" in order. , 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 an NTSC format composite image signal. The video encoder (28) outputs the composite image signal to the monitor (30). As a result, the monitor (30) displays a real-time moving image (through image) of the subject.

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

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 composed of a non-volatile recording medium that can be attached to and detached from the housing (not shown) of the image processing device (10).

<信号処理回路の構成>
ここでは、信号処理回路(22)の構成について詳述する。
<Structure 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), and an LCH conversion circuit (22d). Stores L correction circuit (22e), C correction circuit (22f), H correction circuit (22g), YUV conversion circuit (22h), area discrimination circuit (22i), and a plurality of tables (22m, 22n, ...). It has a memory (22j) (corresponding to a first storage unit and a second storage unit).

−色分離回路−
色分離回路(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) contains the other two color components that each pixel does not have. Complement. As a result, 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). A gain x1 is given to the amplifier (221b), and a gain y1 is given to the amplifier (222b). Of the generated image data, the R component is input to the amplifier (221b) and amplified by the gain x1 at the amplifier (221b). Of the generated image data, the B component is input to the amplifier (222b) and amplified by the gain y1 at 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 integration 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 and vertical directions, in which case 256 division areas are formed on the screen. The integrating circuit (22c) integrates the R component, the G component, and the B component for each divided area and for each of the same color components. Therefore, 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 corresponding to 256 divided areas are obtained for each frame period.

CPU(38)は、上記色評価値に基づいて、ホワイトバランス調整に用いるゲインx1,y1を調整して、最適なゲインxs,ysを算出する。 The CPU (38) adjusts the gains x1 and y1 used for the white balance adjustment based on the color evaluation value, and calculates the 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 the integrated value Iry (i), and converts the integrated value Ib (i) into the integrated value Iby (i). The integrated values Iry (i) and integrated Iby (i) are equal to the integrated values of 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) uses the weighting coefficient k (3) of each division area 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 division area. i) is sought. The weighting table (38a) is stored in a memory (not shown), and 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) of FIG. 3, the BY axis, which is the horizontal axis, and the RY axis, which is the vertical axis, are each divided into 17 equal parts, and are separated by the BY axis and the RY axis, respectively. An example is shown in which the quadrant of is divided into 64. As a result, 290 areas are formed in FIG. 3, and the weighting coefficient K (i) is assigned “0” or “1” for each area. Of the 290 areas according to 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 division area, the CPU (38) uses the weighting coefficient k (i) for each of the following equations (1) and (2) to obtain the optimum gain xs, ys. Is calculated.

Figure 0006870817
Figure 0006870817

Figure 0006870817
Figure 0006870817

上述の通り、重み付け係数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", according to the above equations (1) and (2), only the divided area whose color evaluation value is within the pull-in range is valid. Become. Therefore, the sum of the integrated values Ir (i), Ig (i), and Ib (i) of the effective division areas can be obtained by the above equations (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) can be obtained, and from the above equation (2), the integrated values Ig (i) and Ib (i) are obtained. ) The optimum gain ys based on the sum of each is obtained. The optimum gains xs and ys thus obtained 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) shows the image in FIG. 5 (b). The subject image in such a state is displayed. The vertical lines 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 colors of the paper (42) are included in the pull-in range. The integrated values Iry (i) and Iby (i) obtained by integrating only the colors of the rods (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) for 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 optimum gains xs and ys are calculated. 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 a brightness component. It is converted into an L component, which is a saturation component, a C component, which is a saturation component, and an H component, which is a hue component. The LCH conversion circuit (22d) outputs the converted LCH data (data having the L component, C component, and 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 area 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 the correction L component based on the L component of the input LCH data. The C correction circuit (22f) obtains the correction C component based on the C component of the input LCH data. The H correction circuit (22 g) obtains the corrected 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 LCH format image data into YUV format image data based on the input correction L component, correction C component, and correction H component. As a result, the YUV conversion circuit (22h) outputs image data having a Y component which is luminance data, a U component which is a color difference component, and a V component.

領域判別回路(22i)は、メモリ(22j)に格納された基準値テーブル(22m)を参照して、H成分が属する領域を1画素毎に判別する。領域判別回路(22i)は、更に、判別結果に対応する基準値を基準値テーブル(22m)から読み出すとともに、判別結果に対応する目標値を、目標値テーブル(22n)から読み出す。 The area determination circuit (22i) determines the area to which the H component belongs for each pixel with reference to the reference value table (22m) stored in the memory (22j). The area discrimination circuit (22i) further reads the reference value corresponding to the discrimination result from the reference value table (22m) and reads the 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 (22 m). As shown in FIG. 7, in the reference value table (22 m), a combination of 1 of the reference H component value indicating hue, the reference C component value indicating saturation, and the reference L component value indicating lightness is set as one record. A total of 6 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 (magenda), 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. Note that FIG. 10 shows a reference value corresponding only to 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), a combination of 1 of a target H component value indicating hue, a target C component value indicating saturation, and a target L component value indicating lightness is set as one record. A total of 6 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 (magenda), 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. Note that FIG. 10 shows a target value corresponding only to 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 (22 m) are values set in advance at the manufacturing stage of the image processing apparatus (10) and cannot be changed. It is the value that was set. 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), but after that, the CPU (38) ) Is a value that is appropriately changed.

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

先ず、領域判別回路(22i)は、変数であるレコード番号Nを“1”に設定し(ステップSt1)、レコード番号N“1”に対応する基準H成分値を基準値テーブル(22m)から読み出す(ステップSt2)。領域判別回路(22i)は、読み出した基準H成分値を、注目画素のH成分値(以下、現画素H成分値)と比較する(ステップSt3)。 First, the area discrimination circuit (22i) sets the variable record number N to “1” (step St1), and reads out the reference H component value corresponding to the record number N “1” from the reference value table (22m). (Step St2). The region discrimination circuit (22i) compares the read reference H component value with the H component value of the pixel of interest (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 of 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 becomes It is determined whether or not it is larger than "6" (step St5). When the record number N after the increment is equal to or smaller than "6" (NO in step St5), the process of shifting to step St2 is repeated. When the record number N after incrementing 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 of 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 discrimination 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α” in the reference value table ( Select from 22m). In step St8, the area discrimination circuit (22i) sets the target H component value, the target C component value, and the target L component value corresponding to the current record number N as “Htα”, “Ctα”, and “Ltα” in the target value table ( 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 region discrimination circuit (22i) sets the reference H component value, the reference C component value, and the reference L component value corresponding to the number before the current record number N (that is, “N-1”) to “Hrβ”. Select from the reference value table (22m) as "Crβ" and "Lrβ". In step St10, the region discrimination circuit (22i) sets the target H component value, the target C component value, and the target L component value corresponding to the number before the current record number N (that is, “N-1”) to “Htβ”. Select from the target value table (22n) as "Ctβ" and "Ltβ".

一方、ステップ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 discrimination 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 “1”. Select from the reference value table (22 m) as Hrα, “Crα”, and “Lrα”. In step St12, the area discrimination 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 “1” to “Htα”. Select from the target value table (22n) as “Ctα” and “Ltα”.

ステップ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 discrimination 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 “6” to “Hrβ”. Select from the reference value table (22m) as "Crβ" and "Lrβ". In step St14, the region discrimination 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 “6” to “Htβ”. Select from the target value table (22n) as “Ctβ” and “Ltβ”.

このようにして、注目画素のH成分値を挟む2つの基準H成分値をそれぞれ有する2つの基準値と、この2つの基準値に対応する2つの目標値とが検出される。 In this way, two reference values having two reference H component values sandwiching the H component value of the pixel of interest and two target values corresponding to these 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 (22 g). 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) uses the following equation (3) to convert 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 substituting into (5), the current pixel H component value Hin is converted into the corrected H component value Hout. The corrected H component value Hout has a magnitude shown by a broken line in FIG.

Figure 0006870817
Figure 0006870817

Figure 0006870817
Figure 0006870817

Figure 0006870817
Figure 0006870817

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 also outputs the angle data θ3 (= | Htβ-Hout |) and the angle data θ4 (= | Htβ-Hout |). = | 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) uses the following equation (6) for 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 substituting into, the current pixel C component value Cin is converted into the corrected C component value Cout. The corrected C component value Hout has a size shown by a broken line in FIG.

Figure 0006870817
Figure 0006870817

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 has a straight line connecting the coordinates (0,0) and (Cin, Hin) of the CH system and the coordinates (Crα, Hrα), (Crβ) based on the following equations (7) and (8). , Hrβ) and the C component value Crγ at the coordinates of the intersection with the straight line, and the straight line 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 coordinates of the intersection 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 0006870817
Figure 0006870817

Figure 0006870817
Figure 0006870817

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 the correction L component value Lout according to the following equations (9) to (15). The corrected L component value Lout is shown in FIG.

Figure 0006870817
Figure 0006870817

Figure 0006870817
Figure 0006870817

Figure 0006870817
Figure 0006870817

Figure 0006870817
Figure 0006870817

Figure 0006870817
Figure 0006870817

Figure 0006870817
Figure 0006870817

Figure 0006870817
Figure 0006870817

図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で切り出した面)上に存在する。 Lmax and Lmin shown in FIG. 14 are the maximum and minimum values of L (brightness) that can be reproduced, respectively. The current pixel (input pixel value) is a surface (YUV space cut out with hue Hin) formed by LCH-based coordinates (Lmax, 0,0), (Lmin, 0,0), (Lrγ, Crγ, Hin). Face) exists on. On the other hand, the correction pixel value is a surface formed by LCH-based coordinates (Lmax, 0,0), (Lmin, 0,0), (Ltγ, Ctγ, Hout) (a surface obtained by cutting out the YUV space with 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を用いて説明する。
<Color tone correction processing by CPU>
Next, the basic color tone correction process 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γ to the gains x1 and y1 (step St31). At this time, gain x1, x1, that is, reference gains xγ and yγ are set in each amplifier (221b, 222b) of the white balance adjustment circuit (22b). The reference gains xγ and yγ are gains for which the white balance is appropriately adjusted when a subject having a color temperature (reference temperature) of about 5100 K is imaged, and are determined at the manufacturing stage, so to speak, default values. 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 the through image processing (step St32). Then, the CPU (38) performs color tone correction (step St33) until the shutter button (40) of the image processing device (10) is pressed (NO in step St34), and the shutter button (40) is pressed. If this is the case (YES in step St34), imaging / recording processing is performed (step St35). As a result, the compressed image data of the subject image captured in response to the operation of the shutter button (40) is recorded in the memory card (36) in a 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 performed according to FIG. First, the CPU (38) determines whether or not a vertical synchronization signal is 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 integrating circuit (22c). , Ib (i) is taken in (step St42). Next, the CPU (38) calculates the optimum gain xs, ys using the integrated values Ir (i), Ig (i), and Ib (i) (step St43), and gains the calculated optimum gain xs, ys. It is held as x2 and y2 (step St44). The CPU (38) calculates the difference Δx between the gain x2 and the gain x1 and the 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 differences Δx and Δy are changes in the white balance of the subject image, and correspond to the movement amount W1 from the area 1 to the area 2 indicated by the white circles in FIGS. 6 and 17. Based on such gain differences Δx and Δy, the CPU (38) sets the target H component value, the target C component value, and the target L component value in the target value table (22n) into the H component (hue) and the C component (). Saturation) and L component (brightness) are changed in this order (step St46). The changed target H component value, target C component value, and target L component value move by the amount of movement T1 to the positions indicated by the white squares in FIG.

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

ステップSt46の処理完了後、CPU(38)は、ステップSt44で算出した最適ゲインx2,y2をゲインx1,x1として保持し(ステップSt47)、図15のステップSt34以降の処理を行う。 After the processing of step St46 is completed, the CPU (38) holds the optimum gain x2 and y2 calculated in step St44 as gains x1 and x1 (step St47), and performs the processing 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 an image of a subject underwater without firing a strobe while the underwater imaging mode is set, the image reproduces the actual color of the subject more faithfully as described below. Is 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 area discrimination 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, the B component, and the G component of the image captured in water are displaced. 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 the image captured in water is affected by the influence of the water depth at the imaging location (position of the subject) in water and the water quality (specifically, the content of phytoplankton in water). It changes in response to.

具体的には、水深を一定とした場合、色の分布は、植物プランクトンの量が多い程、図18の縦軸の上方向に全体的に遷移し、逆に植物プランクトンの量が少ない程、縦軸の下方向に全体的に遷移する。植物プランクトンの量を一定とした場合、色の分布は、水深が浅い程、図18の横軸の右方向に全体的に遷移し、逆に水深が深い程、横軸の左方向に全体的に遷移する。すると、植物プランクトンの量が比較的多い場合は水深が深い程、緑色が強まり(図18の一点鎖線)、プランクトンの量が比較的少ない場合は水深が深い程、青みが強まる(図18の破線)。これは、地上から水中に入射した光のうち、R成分は水に吸収され易く、B成分は植物プランクトンに吸収され易いからである。 Specifically, when the water depth is constant, the larger the amount of phytoplankton, the more the color distribution shifts upward on the vertical axis in FIG. 18, and conversely, the smaller the amount of phytoplankton, the more. The transition is entirely downward on the vertical axis. When the amount of phytoplankton is constant, the color distribution shifts to the right of the horizontal axis in FIG. 18 as the water depth is shallower, and conversely, the color distribution is as a whole to the left of the horizontal axis as the water depth is deeper. 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 bluish color (broken line in FIG. 18). ). This is because, of the light incident on the water from the ground, the R component is easily absorbed by the water and the B component is easily absorbed by the phytoplankton.

そこで、本実施形態に係る画像処理装置(10)のCPU(38)は、水中撮像モードが選択された状態で撮像が行われた場合、先ずは判定部として機能して、被写体の位置における水深と、その位置における水質の状態とを判定する。次いで、CPU(38)は、ホワイトバランス補正係数調整部として機能して、判定した水深及び水質の状態に応じて、画像のホワイトバランス調整に利用する上記ゲインx1,y1を補正するためのホワイトバランス補正係数を決定する。これと並行して、CPU(38)は、判定した水深及び水質の状態に応じて、H成分(色相)、C成分(彩度)、L成分(明度)の各補正に利用する色属性係数(具体的には、上述した目標H成分値、目標C成分値及び目標L成分値それぞれを個々に補正するための補正パラメータ)を決定する。 Therefore, the CPU (38) of the image processing device (10) according to the present embodiment first functions as a determination unit when imaging is performed in a state where the underwater imaging mode is selected, 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 adjusting unit, and white balance for correcting the gain 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 a color attribute coefficient for each correction of the H component (hue), the C component (saturation), and the L component (brightness) according to the determined water depth and water quality state. (Specifically, the 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 shows a diagram for explaining the concept of how to adjust the white balance when an image is taken in water. In the image captured in water, the G component and the B component are strengthened by the influence of the water depth and the water quality, so that the image taken on the coordinate plane defined by the U axis and the V axis is not the area 1 of FIGS. 6 and 17. The image before white balance adjustment may be located in the area 3 located in the third quadrant, the 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 high and in area 4 when the amount of phytoplankton is low. Further, as an example, in both the area 3 and the 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 which area the image before white balance adjustment exists in, the CPU (38) of the present embodiment finely adjusts the gain x1 and y1 by determining the white balance correction coefficient, and the signal processing circuit (22). Moves the image to the area 2 which is the intersection of the U-axis and the V-axis by adjusting the white balance using the gains x1 and y1. Further, the CPU (38) of the present embodiment appropriately determines the color attribute coefficient with the determination of the white balance correction coefficient, and the color attribute adjustment circuit (22p) uses the determined color attribute coefficient, for example, of an image. Further fine-tune adjustment processing of color tone such as slightly strengthening redness is performed.

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

上記処理により、本実施形態では、水中でストロボを焚かずに撮像した画像に対し、ストロボを焚いて撮像した際のような、実際の色味を再現することができる。 By the above processing, in the present embodiment, it is possible to reproduce an actual color tone as if the image was captured by firing the strobe with respect to the image captured in water without firing the strobe.

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

先ず、水中撮像モードが設定され(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 of St61) and the image is taken without firing the strobe (YES of St62). The CPU (38) uses the integrated value Ir (i) of the R component, the Ig (i) of the G component, and the integrated value Ib (i) of the B component input from the integration circuit (22c) described above, and 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. The content of phytoplankton 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 state of the water quality at the position based on the color distribution information of the image of the subject captured 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 a water depth-water quality table (22q) stored in the memory (22j). The water depth-water quality table (22q) takes the water depth vertically and the phytoplankton content in the water as the water quality condition horizontally, and the ratio coefficient "R / G" corresponding to each combination pattern of the water depth and the water quality condition. "" B / G "is represented in a matrix. “R / G” represents the ratio of the R component and the G component of the image, and “B / G” represents the ratio of the B component and the G component. The ratio coefficients "R / G" and "B / G" are defined in advance by theory, experiment, etc., on the condition of each combination pattern of the water depth and the state of water quality. The CPU (38) easily calculates data representing the water depth and the state of the 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 calculated data representing the 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 set 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). In the parameter table (22r), the white balance correction coefficient for correcting each gain x1 and y1 and the correction of the target H component value are shown for each combination pattern of the water depth and the water quality state (the content of phytoplankton in water). The parameters, the correction parameter of the target C component value, and the correction parameter of the target L component value are set in advance. In other words, this parameter table (22r) shows the fine white balance coefficient and color attribute coefficient for reproducing faithful color appearance regardless of the influence of color due to water depth and water quality on the image captured underwater. Can be said to have been prepared in advance. For example, the various parameters in the parameter table (22r) are set so that the deeper the water depth, the larger the correction value, or the larger the amount of phytoplankton, the larger the correction value. Can be done.

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

次いで、CPU(38)は、ステップSt65で選出した各種パラメータを、色属性調整回路(22q)及びホワイトバランス調整回路(22b)に設定する(ステップSt66)。具体的には、ゲインx1,y1を補正するためのホワイトバランス補正係数は、ホワイトバランス調整回路(22b)に設定される。色属性係数は、色属性調整回路(22p)に設定される。 Next, the CPU (38) sets various parameters selected in step St65 in the color attribute adjusting circuit (22q) and the white balance adjusting circuit (22b) (step St66). Specifically, the white balance correction coefficient for correcting the gain 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) in 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) adjusts the white balance of the image using the white balance correction coefficients obtained from the two tables (22q and 22r) and the gains x1 and y1. 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 image brightness. Correct the hue.

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

また、本実施形態では、水深と水質の状態との組み合わせパターンに対応してホワイトバランス補正係数が予め設定されている。そのため、実際の水深と実際の水質の状態とに応じて、ホワイトバランス補正係数は迅速に決定され、ホワイトバランス制御の処理は比較的迅速に行われる。また、実際の水深と実際の水質の状態とに応じて、ホワイトバランス補正係数をきめ細かく調整することも可能となる。 Further, in the present 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 condition, and the white balance control process is performed relatively quickly. In addition, the white balance correction coefficient can be finely adjusted according to the actual water depth and the actual water quality condition.

また、本実施形態では、判定された水深及び水質の状態に応じて、画像の明度、彩度及び色相が適正となるようにチューニングされる。従って、水中の実際の色味をより忠実に再現された画像を得ることができる。 Further, 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. Therefore, it is possible to obtain an image that more faithfully reproduces the actual color in water.

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

≪その他の実施形態≫
上記実施形態では、ゲインx1,y1を補正するためのホワイトバランス補正係数が、水深及び水質の状態に応じて決定されると説明したが、水深及び水質の状態に応じてゲインx1,y1自体がホワイトバランス補正係数として決定されてもよい。
<< Other Embodiments >>
In the above embodiment, it has been explained that the white balance correction coefficient for correcting the gain x1 and y1 is determined according to the water depth and the water quality state, but the gain x1 and y1 itself 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, it has been explained that the correction parameter of the target H component value, the correction parameter of the target C component value, and the correction parameter of the target L component value are determined as the color attribute coefficient according to the water depth and the state of the water quality. , 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 according to the state of water depth and water quality.

上記実施形態では、ホワイトバランス補正係数情報及び色属性係数情報が、図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 they are represented by the tables of FIGS. 21 and 22. Not limited to things. For example, the white balance correction coefficient information and the color attribute coefficient information may be obtained by calculation each time using an equation.

上記実施形態では、水深及び水質の状態に応じて、画像の明度、彩度及び色相全てが補正される場合を例示したが、画像の明度、彩度及び色相の少なくとも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 illustrated, but 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 embodiment, a case where an image is taken in water without firing a strobe is illustrated. However, the present invention is not limited to the case where the strobe is imaged without being fired. Steps St63 to St67 in FIG. 20 are also applicable when the strobe is fired in water for imaging.

上記実施形態の図20において、水中撮像モードの設定は手動でされてもよいし、水中か否かを判定するためのセンサを用いて自動で設定されてもよい。センサによる自動設定の場合、当該センサは画像処理装置(10)に搭載され、CPU(38)は、当該センサの検出結果が水中であるとの結果であれば自動で水中撮像モードに設定する(図20のステップSt61)。 In FIG. 20 of the above embodiment, the underwater imaging mode may be set manually or automatically by 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 device that faithfully reproduces the color appearance of an image captured in water.

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

Claims (4)

水中にて被写体を撮像する撮像部と、
画像のR成分の値とG成分の値とB成分の値とによって定められる水深及び水質の状態を表す水深−水質テーブルを記憶した記憶部と、
前記撮像部が撮像した前記被写体の画像のR成分の値とG成分の値とB成分の値を前記水深−水質テーブルに当てはめて、前記水深と前記水質の状態とを判定する判定部と、
前記判定部が判定した前記水深及び前記水質の状態に応じて、前記画像のホワイトバランスを補正するためのホワイトバランス補正係数を決定するホワイトバランス補正係数調整部と、
前記ホワイトバランス補正係数を用いて、前記画像に対してホワイトバランス調整を行うホワイトバランス調整部と
を備えることを特徴とする画像処理装置。
An imaging unit that captures the subject underwater,
A storage unit that stores a water depth-water quality table that represents the state of water depth and water quality determined by the value of the R component, the value of the G component, and the value of the B component of the image.
A determination unit for determining the water depth and the state of the water quality by applying the R component value, the G component value, and the B component value of the image of the subject imaged by the imaging unit to the water depth-water quality table.
A white balance correction coefficient adjusting unit that determines a white balance correction coefficient for correcting the white balance of the image according to the water depth and the state of the water quality determined by the determination unit.
An image processing apparatus including a white balance adjusting unit that adjusts the white balance of the image by using the white balance correction coefficient.
請求項1において、
前記記憶部には、前記水深と前記水質の状態との組み合わせパターンに対応して前記ホワイトバランス補正係数が予め設定されているホワイトバランス補正係数情報がさらに記憶されており、
前記ホワイトバランス調整部は、前記ホワイトバランス補正係数情報を用いて、前記画像のホワイトバランスを補正する
ことを特徴とする画像処理装置。
In claim 1,
The storage unit further stores white balance correction coefficient information in which the white balance correction coefficient is preset according to the combination pattern of the water depth and the water quality state.
The white balance adjusting unit is an image processing apparatus characterized in that the white balance of the image is corrected by using the white balance correction coefficient information.
請求項1または請求項2において、
前記判定部が判定した前記水深及び前記水質の状態に応じて、前記画像の明度、彩度及び色相の少なくとも1つを補正する色属性調整部と
を更に備えることを特徴とする画像処理装置。
In claim 1 or 2,
An image processing apparatus further comprising a color attribute adjusting unit that corrects at least one of the brightness, saturation, and hue of the image according to the state of the water depth and the water quality determined by the determination unit.
請求項3において、
前記記憶部には、前記水深と前記水質の状態との組み合わせパターンに対応して前記画像の明度、彩度及び色相の少なくとも1つを補正するための色属性係数が予め設定されている色属性係数情報がさらに記憶されており、
前記色属性調整部は、前記色属性係数情報を用いて、前記色属性係数を調整する
ことを特徴とする画像処理装置。
In claim 3,
In the storage unit, a color attribute coefficient for correcting at least one of the brightness, saturation, and hue of the image corresponding to the combination pattern of the water depth and the water quality state is preset. Coefficient information is further stored,
The color attribute adjusting unit is an image processing apparatus characterized in that the color attribute coefficient is adjusted by 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 JP2018207283A (en) 2018-12-27
JP6870817B2 true 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)

Family Cites Families (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
US8913154B2 (en) * 2010-02-04 2014-12-16 Canon Kabushiki Kaisha Image processing apparatus

Also Published As

Publication number Publication date
JP2018207283A (en) 2018-12-27

Similar Documents

Publication Publication Date Title
JP5321163B2 (en) Imaging apparatus and imaging method
JP5396231B2 (en) Imaging device
JP3539394B2 (en) Image processing apparatus, program, and recording medium
CN1992820B (en) Digital camera with face detection function for facilitating exposure compensation
US8625021B2 (en) Image capture with region-based adjustment of imaging properties
JP5647209B2 (en) Imaging apparatus and imaging method
US20100026835A1 (en) Image sensing apparatus and method for controlling the same
JP2017022610A (en) Image processing apparatus and image processing method
JP5458937B2 (en) IMAGING DEVICE, IMAGING METHOD, AND COMPUTER-READABLE RECORDING MEDIUM CONTAINING PROGRAM FOR EXECUTING THE IMAGING METHOD
US20040212696A1 (en) Digital camera with adjustment of color image signal and an imaging control method therefor
JP5211926B2 (en) Digital camera, image processing apparatus, and image processing program
US7327876B2 (en) Image processing device
US7697043B2 (en) Apparatus for compensating for color shading on a picture picked up by a solid-state image sensor over a broad dynamic range
JP5315125B2 (en) Image processing apparatus, imaging apparatus, and composite image generation method
JP6870817B2 (en) Image processing device
JP2008017198A (en) Device and method for calculating light source color, and photographing device
JP4581633B2 (en) Color signal correction method, apparatus and program
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
JP5146015B2 (en) Imaging apparatus and imaging method
JP3754364B2 (en) Digital camera
JP6197062B2 (en) Imaging device, imaging method, display device, and display method
CN105191284A (en) Image capture device and control method thereof
US20110187869A1 (en) Tracking-frame initial-position setting apparatus and method of controlling operation of same
JP3992476B2 (en) Image processing device

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