JP6089476B2 - Image processing apparatus, imaging apparatus, and image processing program - Google Patents
Image processing apparatus, imaging apparatus, and image processing program Download PDFInfo
- Publication number
- JP6089476B2 JP6089476B2 JP2012161920A JP2012161920A JP6089476B2 JP 6089476 B2 JP6089476 B2 JP 6089476B2 JP 2012161920 A JP2012161920 A JP 2012161920A JP 2012161920 A JP2012161920 A JP 2012161920A JP 6089476 B2 JP6089476 B2 JP 6089476B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- evaluation value
- region
- subject
- feature amount
- 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
Links
- 238000012545 processing Methods 0.000 title claims description 120
- 238000003384 imaging method Methods 0.000 title claims description 50
- 238000011156 evaluation Methods 0.000 claims description 163
- 238000001514 detection method Methods 0.000 claims description 96
- 238000000034 method Methods 0.000 claims description 51
- 238000004364 calculation method Methods 0.000 claims description 46
- 238000000605 extraction Methods 0.000 description 57
- 238000006243 chemical reaction Methods 0.000 description 11
- 238000004891 communication Methods 0.000 description 9
- 230000003287 optical effect Effects 0.000 description 7
- 230000000694 effects Effects 0.000 description 5
- 239000000284 extract Substances 0.000 description 5
- 238000002372 labelling Methods 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 4
- 239000003086 colorant Substances 0.000 description 4
- 239000000203 mixture Substances 0.000 description 4
- 238000012790 confirmation Methods 0.000 description 3
- 238000012937 correction Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 230000000295 complement effect Effects 0.000 description 2
- 230000035945 sensitivity Effects 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 229910044991 metal oxide Inorganic materials 0.000 description 1
- 150000004706 metal oxides Chemical class 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 230000011514 reflex Effects 0.000 description 1
- 238000010187 selection method Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Images
Landscapes
- Color Television Image Signal Generators (AREA)
- Processing Of Color Television Signals (AREA)
- Studio Devices (AREA)
- Exposure Control For Cameras (AREA)
- Television Signal Processing For Recording (AREA)
Description
本発明は、画像処理装置、撮像装置、および画像処理プログラムに関する。 The present invention relates to an image processing device, an imaging device, and an image processing program.
従来、被写体抽出および被写体抽出結果を利用する様々な技術が考えられている。例えば、特許文献1の発明では、被写体抽出により抽出した被写体形状の変化量に応じてAF測距枠を変形することにより、被写体がカメラ方向に移動する場合でも、被写体に対して最適に自動焦点調節する撮像装置が開示されている。 Conventionally, various techniques using subject extraction and subject extraction results have been considered. For example, in the invention of Japanese Patent Laid-Open No. 2004-228688, the autofocus is optimally focused on the subject even when the subject moves in the camera direction by deforming the AF distance measurement frame according to the amount of change in the subject shape extracted by subject extraction. An imaging device for adjustment is disclosed.
ところで、被写体抽出は一般的に色情報に基づいて行われる場合が多い。しかし、実際の被写体は様々な色相を有するものである。例えば、色味の少ない無彩色の被写体や、特定の色相に偏った被写体を撮像して生成した画像においては、被写体抽出が困難になるという問題がある。 By the way, subject extraction is generally performed based on color information in many cases. However, actual subjects have various hues. For example, there is a problem that subject extraction is difficult for an achromatic subject with little hue or an image generated by imaging a subject biased to a specific hue.
本発明は、前記の点に鑑みてなされたものであり、被写体の色情報の分布に応じて好適な被写体領域の抽出を行うことを目的とする。 The present invention has been made in view of the above points, and an object of the present invention is to perform extraction of a suitable subject area in accordance with the distribution of subject color information.
本発明の画像処理装置は、画像の特徴量を算出し、前記特徴量に基づいて定まる被写体領域を検出する領域検出部と、前記画像の色情報の分布を示す評価値を算出する評価値算出部と、前記評価値算出部により算出した前記評価値に基づいて、前記領域検出部による前記被写体領域の検出方法を決定する制御部と、を備え、前記領域検出部は、前記特徴量として複数の特徴量を算出し、前記複数の特徴量に基づいて前記被写体領域を検出し、前記制御部は、前記評価値に基づいて、前記複数の特徴量における優先度を決定し、決定した前記優先度に基づいて前記領域検出部による前記被写体領域の検出を行うものである。 The image processing apparatus of the present invention calculates the feature amount of the image, calculates a region detecting section that detects a subject region that is determined based on the feature quantity, the evaluation value indicating the distribution of color information before outs image evaluation A value calculation unit; and a control unit that determines a detection method of the subject region by the region detection unit based on the evaluation value calculated by the evaluation value calculation unit , wherein the region detection unit includes the feature amount And calculating the plurality of feature amounts, detecting the subject region based on the plurality of feature amounts, and determining the priority of the plurality of feature amounts based on the evaluation value Based on the priority, the area detection unit detects the subject area.
また、前記領域検出部は、前記特徴量として、少なくとも輝度に関する特徴量を算出し、前記評価値算出部は、前記評価値として、前記画像における無彩色度合を示す評価値を算出し、前記制御部は、前記評価値と所定の閾値とを比較することにより、前記画像が無彩色の画像であるか否かを判定し、前記画像が無彩色の画像である場合には、前記輝度に関する特徴量の前記優先度を、前記画像が無彩色の画像でない場合より高く設定して、前記領域検出部による前記被写体領域の検出を行っても良い。 In addition, the area detection unit calculates at least a luminance-related feature amount as the feature amount, and the evaluation value calculation unit calculates an evaluation value indicating an achromatic degree in the image as the evaluation value, and the control The unit determines whether or not the image is an achromatic image by comparing the evaluation value with a predetermined threshold value, and if the image is an achromatic image, the feature relating to the luminance The object region may be detected by the region detection unit by setting the priority of the amount higher than when the image is not an achromatic image.
また、前記領域検出部は、前記特徴量として、少なくとも色に関する特徴量を算出し、前記評価値算出部は、前記評価値として、前記画像における無彩色度合を示す評価値を算出し、前記制御部は、前記評価値と所定の閾値とを比較することにより、前記画像が無彩色の画像であるか否かを判定し、前記画像が無彩色の画像である場合には、前記色に関する特徴量の前記優先度を、前記画像が無彩色の画像でない場合より低く設定して、前記領域検出部による前記被写体領域の検出を行っても良い。 In addition, the area detection unit calculates at least a color-related feature amount as the feature amount, and the evaluation value calculation unit calculates an evaluation value indicating an achromatic degree in the image as the evaluation value, and the control The unit determines whether or not the image is an achromatic image by comparing the evaluation value with a predetermined threshold, and if the image is an achromatic image, the color feature The object region may be detected by the region detection unit by setting the priority of the amount lower than when the image is not an achromatic image.
また、前記領域検出部は、前記特徴量として、少なくとも色に関する特徴量を算出し、前記評価値算出部は、前記評価値として、前記画像における任意の色相への偏り具合を示す評価値を算出し、前記制御部は、前記評価値と所定の閾値とを比較することにより、前記画像が前記任意の色相に偏った画像であるか否かを判定し、前記画像が前記任意の色相に偏った画像である場合には、前記色に関する特徴量のうち、前記任意の色相に関連する特徴量の前記優先度を、前記画像が前記任意の色相に偏った画像でない場合より高く設定して、前記領域検出部による前記被写体領域の検出を行っても良い。 The area detection unit calculates at least a color-related feature amount as the feature amount, and the evaluation value calculation unit calculates an evaluation value indicating a degree of bias to an arbitrary hue in the image as the evaluation value. Then, the control unit determines whether or not the image is biased to the arbitrary hue by comparing the evaluation value with a predetermined threshold, and the image is biased to the arbitrary hue. If the image is an image, the priority of the feature amount related to the arbitrary hue among the feature amounts related to the color is set higher than when the image is not an image biased to the arbitrary hue, The subject region may be detected by the region detection unit.
また、前記領域検出部は、前記特徴量として複数の特徴量を算出するとともに、前記複数の特徴量のうち、第1の特徴量に基づいて定まる第1の領域と、前記第1の特徴量とは異なる第2の特徴量に基づいて定まる第2の領域とが重なる重複領域を前記被写体領域として検出し、前記制御部は、前記評価値に基づいて、前記第1の領域および前記第2の領域の少なくとも一方の検出方法を決定しても良い。 In addition, the region detection unit calculates a plurality of feature amounts as the feature amount, and among the plurality of feature amounts, a first region determined based on a first feature amount and the first feature amount An overlapping area that overlaps with a second area determined based on a second feature amount different from the first characteristic area is detected as the subject area, and the control unit detects the first area and the second area based on the evaluation value. The detection method of at least one of the regions may be determined.
また、前記領域検出部は、前記第1の特徴量として、輝度に関する特徴量を算出し、前記評価値算出部は、前記評価値として、前記画像における無彩色度合を示す評価値を算出し、前記制御部は、前記評価値と所定の閾値とを比較することにより、前記画像が無彩色の画像であるか否かを判定し、前記画像が無彩色の画像である場合には、前記第1の領域のみに基づいて前記重複領域を検出しても良い。 In addition, the area detection unit calculates a feature value related to luminance as the first feature value, and the evaluation value calculation unit calculates an evaluation value indicating an achromatic degree in the image as the evaluation value, The control unit determines whether or not the image is an achromatic image by comparing the evaluation value with a predetermined threshold, and when the image is an achromatic image, The overlapping area may be detected based on only one area.
また、前記領域検出部は、前記第2の特徴量として、色に関する特徴量を算出し、前記評価値算出部は、前記評価値として、前記画像における無彩色度合を示す評価値を算出し、前記制御部は、前記評価値と所定の閾値とを比較することにより、前記画像が無彩色の画像であるか否かを判定し、前記画像が無彩色の画像である場合には、前記第2の領域の検出方法を変更しても良い。 In addition, the area detection unit calculates a color-related feature amount as the second feature amount, and the evaluation value calculation unit calculates an evaluation value indicating an achromatic degree in the image as the evaluation value, the control unit, by comparing the evaluation value with a predetermined threshold value, the image is determined whether the image of the achromatic, when the image is an image of an achromatic, the first The method of detecting the area 2 may be changed.
また、前記領域検出部は、前記第2の特徴量として、色に関する特徴量を算出し、前記評価値算出部は、前記評価値として、前記画像における任意の色相への偏り具合を示す評価値を算出し、前記制御部は、前記評価値と所定の閾値とを比較することにより、前記画像が前記任意の色相に偏った画像であるか否かを判定し、前記画像が前記任意の色相に偏った画像である場合には、前記第2の特徴量のうち、前記任意の色相に関連する特徴量に基づく前記第2の領域の前記重みを、前記画像が前記任意の色相に偏った画像でない場合より高く設定して、前記領域検出部による前記被写体領域の検出を行っても良い。 In addition, the area detection unit calculates a color-related feature amount as the second feature amount, and the evaluation value calculation unit uses the evaluation value as an evaluation value indicating a degree of bias to an arbitrary hue in the image. The control unit determines whether or not the image is an image biased to the arbitrary hue by comparing the evaluation value with a predetermined threshold, and the image is the arbitrary hue. In the case where the image is biased to the image, the weight of the second region based on the feature amount related to the arbitrary hue among the second feature amounts is set to the image, and the image is biased to the arbitrary hue. The area of the subject may be detected by the area detection unit by setting it higher than when the image is not an image.
本発明の撮像装置は、被写体を撮像する撮像部と、前記撮像部により得られた画像の特徴量を算出し、前記特徴量に基づいて定まる被写体領域を検出する領域検出部と、前記画像の色情報の分布を示す評価値を算出する評価値算出部と、前記評価値算出部により算出した前記評価値に基づいて、前記領域検出部による前記被写体領域の検出方法を決定する制御部と、を備え、前記領域検出部は、前記特徴量として複数の特徴量を算出し、前記複数の特徴量に基づいて前記被写体領域を検出し、前記制御部は、前記評価値に基づいて、前記複数の特徴量における優先度を決定し、決定した前記優先度に基づいて前記領域検出部による前記被写体領域の検出を行うものである。 Imaging apparatus of the present invention includes an imaging unit for imaging a subject, calculates the feature amount of the image obtained by the imaging unit, and a region detecting section that detects a subject region that is determined based on the feature quantity, pre-outs An evaluation value calculation unit that calculates an evaluation value indicating a distribution of color information of an image, and a control unit that determines a detection method of the subject region by the region detection unit based on the evaluation value calculated by the evaluation value calculation unit And the region detection unit calculates a plurality of feature amounts as the feature amount, detects the subject region based on the plurality of feature amounts, and the control unit, based on the evaluation value, Priorities of the plurality of feature amounts are determined, and the subject region is detected by the region detection unit based on the determined priorities.
本発明の画像処理プログラムは、コンピュータに、画像の特徴量を算出し、前記特徴量に基づいて定まる被写体領域を検出する領域検出手順と、前記画像の色情報の分布を示す評価値を算出する評価値算出手順と、前記評価値算出手順において算出した前記評価値に基づいて、前記領域検出手順による前記被写体領域の検出方法を決定する制御手順と、を実行させるとともに、前記領域検出手順は、前記特徴量として複数の特徴量を算出し、前記複数の特徴量に基づいて前記被写体領域を検出する手順を含み、前記制御手順は、前記評価値に基づいて、前記複数の特徴量における優先度を決定し、決定した前記優先度に基づいて前記領域検出手順による前記被写体領域の検出を行う手順を含むものである。
また、本発明の画像処理装置は、色情報により画像の評価値を算出する評価値算出部と、前記画像に含まれる被写体領域を検出する領域検出部と、を備え、前記領域検出部は、前記評価値算出部により算出された評価値により、色情報よりも輝度情報に基づいて前記画像に含まれる被写体領域を検出する第1検出モードと輝度情報よりも色情報に基づいて前記画像に含まれる被写体領域を検出する第2検出モードとのうち、いずれかを選択するものである。
この場合、前記領域検出部は、前記評価値算出部で算出された評価値と、所定の閾値と、を比較することにより、前記第1検出モードと前記第2検出モードとのうち、いずれかを選択する。
また、前記評価値算出部は、前記画像が無彩色になるほど小さい値となる前記評価値を算出し、前記領域検出部は、前記評価値算出部で算出された評価値が所定の閾値よりも小さい場合、前記第1検出モードを選択する。
また、本発明の撮像装置は、レンズを介して被写体を撮像する撮像部と、色情報により前記撮像部で撮像された被写体の画像の評価値を算出する評価値算出部と、前記画像に含まれる被写体領域を検出する領域検出部と、前記領域検出部で検出された被写体領域により前記レンズを駆動させる駆動部と、を備え、前記領域検出部は、前記評価値算出部により算出された評価値により、色情報よりも輝度情報に基づいて前記画像に含まれる被写体領域を検出する第1検出モードと輝度情報よりも色情報に基づいて前記画像に含まれる被写体領域を検出する第2検出モードとのうち、いずれかを選択するものである。
この場合、前記領域検出部は、前記評価値算出部で算出された評価値と、所定の閾値と、を比較することにより、前記第1検出モードと前記第2検出モードとのうち、いずれかを選択する。
また、前記評価値算出部は、前記画像が無彩色になるほど小さい値となる前記評価値を算出し、前記領域検出部は、前記評価値算出部で算出された評価値が所定の閾値よりも小さい場合、前記第1検出モードを選択する。
The image processing program of the present invention, the computer calculates the feature amount of the image, a region detecting step of detecting a subject region that is determined based on the feature quantity, the evaluation value indicating the distribution of color information before outs image An evaluation value calculation procedure to be calculated; and a control procedure for determining a method for detecting the subject region by the region detection procedure based on the evaluation value calculated in the evaluation value calculation procedure; and the region detection procedure Includes a procedure of calculating a plurality of feature amounts as the feature amount, and detecting the subject region based on the plurality of feature amounts, wherein the control procedure is based on the evaluation value in the plurality of feature amounts. It includes a procedure for determining priority and detecting the subject region by the region detection procedure based on the determined priority.
The image processing apparatus of the present invention includes an evaluation value calculation unit that calculates an evaluation value of an image based on color information, and an area detection unit that detects a subject area included in the image, and the region detection unit includes: A first detection mode for detecting a subject region included in the image based on luminance information rather than color information based on the evaluation value calculated by the evaluation value calculation unit and included in the image based on color information rather than luminance information One of the second detection modes for detecting the subject area to be detected is selected.
In this case, the region detection unit compares the evaluation value calculated by the evaluation value calculation unit with a predetermined threshold value, and thereby selects one of the first detection mode and the second detection mode. Select.
Further, the evaluation value calculation unit calculates the evaluation value that becomes a smaller value as the image becomes achromatic, and the region detection unit determines that the evaluation value calculated by the evaluation value calculation unit is lower than a predetermined threshold value. If it is smaller, the first detection mode is selected.
Further, the imaging apparatus of the present invention includes an imaging unit that images a subject via a lens, an evaluation value calculation unit that calculates an evaluation value of an image of the subject captured by the imaging unit based on color information, and the image A region detection unit that detects a subject region to be detected, and a drive unit that drives the lens by the subject region detected by the region detection unit, wherein the region detection unit is evaluated by the evaluation value calculation unit A first detection mode that detects a subject area included in the image based on luminance information rather than color information, and a second detection mode that detects a subject area included in the image based on color information rather than luminance information. And one of them is selected.
In this case, the region detection unit compares the evaluation value calculated by the evaluation value calculation unit with a predetermined threshold value, and thereby selects one of the first detection mode and the second detection mode. Select.
Further, the evaluation value calculation unit calculates the evaluation value that becomes a smaller value as the image becomes achromatic, and the region detection unit determines that the evaluation value calculated by the evaluation value calculation unit is lower than a predetermined threshold value. If it is smaller, the first detection mode is selected.
本発明によれば、被写体の色情報の分布に応じて好適な被写体領域の抽出を行うことができる。 According to the present invention, a suitable subject region can be extracted according to the distribution of subject color information.
以下、実施形態について図面を参照して詳細に説明する。 Hereinafter, embodiments will be described in detail with reference to the drawings.
本実施形態では、図1に示すようなレンズ鏡筒10と、撮像装置20と、記録媒体40とからなる装置を例に挙げて説明する。
In the present embodiment, a description will be given by taking as an example an apparatus including a
撮像装置20は、レンズ鏡筒10から入射される光学像を撮像する。得られた画像は静止画又は動画の画像として、記憶媒体40に記憶される。
The
レンズ鏡筒10は、焦点調整レンズ(以下、「AF(Auto Focus)レンズ」と称する)11と、レンズ駆動部12と、AFエンコーダ13と、鏡筒制御部14とを備える。なお、レンズ鏡筒10は、撮像装置20に着脱可能に接続されてもよいし、撮像装置20と一体であってもよい。
The
撮像装置20は、撮像部21と、画像処理装置22と、表示部23と、バッファメモリ部24と、記憶部25と、CPU26と、操作部27と、通信部28とを備える。撮像部21は、撮像素子29と、A/D(Analog/Digital)変換部30とを備える。撮像部21は、設定された撮像条件(例えば絞り値、露出値等)に従って、CPU26により制御される。
The
レンズ鏡筒10において、AFレンズ11は、レンズ駆動部12により駆動され、撮像装置20の撮像素子29の受光面(光電変換面)に、光学像を導く。AFエンコーダ13は、AFレンズ11の移動を検出し、AFレンズ11の移動量に応じた信号を、鏡筒制御部14に出力する。ここで、AFレンズ11の移動量に応じた信号とは、例えば、AFレンズ11の移動量に応じて位相が変化するサイン(sin)波信号であってもよい。
In the
鏡筒制御部14は、撮像装置20のCPU26から入力される駆動制御信号に応じて、レンズ駆動部12を制御する。ここで、駆動制御信号とは、AFレンズ11を光軸方向に駆動させる制御信号である。鏡筒制御部14は、駆動制御信号に応じて、例えば、レンズ駆動部12に出力するパルス電圧のステップ数を変更する。また、鏡筒制御部14は、AFレンズ11の移動量に応じた信号に基づいて、レンズ鏡筒10におけるAFレンズ11の位置(フォーカスポジション)を、撮像装置20のCPU26に出力する。ここで、鏡筒制御部14は、例えば、AFレンズ11の移動量に応じた信号を、AFレンズ11の移動方向に応じて積算することで、レンズ鏡筒10におけるAFレンズ11の移動量(位置)を算出してもよい。レンズ駆動部12は、鏡筒制御部14の制御に応じてAFレンズ11を駆動し、AFレンズ11をレンズ鏡筒10内で光軸方向に移動させる。
The lens
撮像装置20において、撮像素子29は、光電変換面を備え、レンズ鏡筒10(光学系)により光電変換面に結像された光学像を電気信号に変換して、A/D変換部30に出力する。撮像素子29は、例えば、CMOS(Complementary Metal Oxide Semiconductor)などの光電変換素子で構成される。また、撮像素子29は、光電変換面の一部の領域について、光学像を電気信号に変換するようにしてもよい(画像切り出し)。また、撮像素子29は、操作部27を介してユーザからの撮影指示を受け付けた際に得られる画像を、A/D変換部30および通信部28を介して記憶媒体40に出力する。一方、撮像素子29は、操作部27を介してユーザからの撮影指示を受け付ける前の状態において、連続的に得られる画像をスルー画像として、バッファメモリ部24及び表示部23に、A/D変換部30を介して出力する。
In the
A/D変換部30は、撮像素子29によって変換された電気信号をデジタル化して、デジタル信号である画像をバッファメモリ部24等に出力する。
The A /
画像処理装置22は、記憶部25に記憶されている画像処理条件に基づいて、バッファメモリ部24に一時的に記憶されている画像に対する画像処理を行う。そして、画像処理後の画像は、通信部28を介して記憶媒体40に記憶される。また、画像処理装置22は、バッファメモリ部24に一時的に記憶されている画像に対して、マスク抽出処理を行う(詳細は後述する)。そして、抽出したマスクに関する情報は、CPU26に出力されるとともに、記憶部25や記憶媒体40等に記憶される。
The image processing device 22 performs image processing on the image temporarily stored in the
表示部23は、例えば液晶ディスプレイであって、撮像部21によって生成された画像、及び操作画面等を表示する。バッファメモリ部24は、撮像部21によって生成された画像を一時的に記憶する。記憶部25は、撮像条件や、各種判定の際にCPU26によって参照される判定条件などを記憶する。
The
CPU26は、画像処理部22や記憶部25などから適宜必要な情報を取得し、取得した情報に基づいて、撮像装置20内の各部を統括的に制御する。CPU26による制御には、焦点調整(AF)の設定、露出調整(AE)の設定、ホワイトバランス調整(AWB)の設定、閃光の発光量の変更の設定、被写体追尾の設定、各種撮影モードの設定、各種画像処理の設定、各種表示の設定、ズーム倍率に連動した明るさの最適化の設定などが含まれる。また、CPU26は、操作部27の操作状態を監視するとともに、表示部23への画像データの出力を行う。
The
操作部27は、例えば、電源スイッチ、シャッタボタン、マルチセレクタ(十字キー)、又はその他の操作キーを備え、ユーザによって操作されることでユーザの操作入力を受け付け、操作入力に応じた信号をCPU26に出力する。
The
通信部28は、カードメモリ等の取り外しが可能な記憶媒体40と接続され、この記憶媒体40への情報(画像データ、領域の情報など)の書込み、読み出し、あるいは消去を行う。
The
記憶媒体40は、撮像装置20に対して着脱可能に接続される記憶部であって、情報(画像データ、領域の情報など)を記憶する。なお、記憶媒体40は、撮像装置20と一体であってもよい。
The
撮像装置20は、撮影時に、焦点調節情報に基づいて主要被写体領域を検出する通常モードの他に、自動で主要被写体領域を検出する自動検出モードを備える。自動検出モードは、構図確認用のスルー画像等に基づいて、主要被写体領域を自動で継続的に検出するモードである。この自動検出モードは操作部27を介したユーザ操作により設定可能であっても良いし、CPU26により自動で設定可能であっても良い。
The
以下、自動検出モード実行時のCPU26の動作について、図2のフローチャートを参照して説明する。
Hereinafter, the operation of the
ステップS101において、CPU26は、撮像部21を制御して、スルー画像の取得を開始する。取得されたスルー画像の画像情報はバッファメモリ部24に一時的に記憶される。このスルー画像は、所定の時間間隔で連続して生成される。そして、CPU26によるスルー画像の取得は、時間的に連続して順次行われる。
In step S <b> 101, the
ステップS102において、CPU26は、画像処理装置22を制御して通常の画像処理を行う。通常の画像処理とは、ホワイトバランス調整、補間処理、色調補正処理、階調変換処理などである。各処理の具体的な方法は公知技術と同様であるため説明を省略する。画像処理装置22は、バッファメモリ部24から対象となる画像の画像データを取得し、画像処理を施した後に、再びバッファメモリ部24に出力する。
In step S102, the
ステップS103において、CPU26は、画像処理装置22を制御して、画像における無彩色度合を示す評価値Daを算出する。評価値Daは、画像における色情報の分布を示す一評価値であり、対象の画像が無彩色に近いほど小さい値となり、無彩色から遠く、カラフルであるほど大きい値となる。評価値Daは公知技術と同様にどのような方法で求められても良い。
In step S103, the
例えば、画像処理装置22は、ステップS102で通常の画像処理を施した画像をバッファメモリ部24から読み出し、適宜リサイズ処理および色空間変換処理を行い、YUV(例えば、YCbCr)画像を生成する。そして、色差を示すCb画像およびCr画像の偏差に基づいて、上述した評価値Daを算出する。画像処理装置22は、Cb画像の中央の所定領域における偏差Cbσ、およびCr画像の中央の所定領域における偏差Crσを算出し、評価値Daとする。なお、偏差Cbσおよび偏差Crσが小さいということは、すなわち、色のバリエーションが少ないということであり、言い換えれば、無彩色に近いということである。また、上述した所定領域は予め定められた領域である。この領域は、必ずしも中央である必要はなく、また、大きさも、画像全体を含めてどのようなものであっても良い。さらに、上述した所定領域の大きさや位置などをAFレンズ11におけるズーム倍率に応じて可変としても良い。
For example, the image processing apparatus 22 reads out the image that has been subjected to the normal image processing in step S102 from the
ステップS104において、CPU26は、ステップS103で算出した評価値Da<T1であるか否かを判定する。CPU26は、評価値Da<T1であると判定すると後述するステップS110に進む。一方、評価値Da≧T1であると判定すると、CPU26は、ステップS105に進む。上述したT1は、予め定められた閾値である。T1は、偏差Cbσに対する閾値と偏差Crσに対する閾値とを含む。なお、2つの閾値は同じ値であっても良いし、異なる値であっても良い。CPU26は、偏差Cbσおよび偏差Crσの両方について閾値未満である場合に評価値Da<T1であると判定する。評価値Da<T1である場合とは、対象の画像に基づく偏差Cbσおよび偏差Crσが十分に小さく、対象の画像が非常に無彩色に近い、あるいは無彩色である場合である。具体的には、白黒画像に近い、あるいは白黒画像である場合や、雪景色などの画像が考えられる。
In step S104, the
ステップS105において、CPU26は、ステップS103で算出した評価値Da<T2であるか否かを判定する。CPU26は、評価値Da<T2であると判定すると後述するステップS109に進む。一方、評価値Da≧T2であると判定すると、CPU26は、ステップS106に進む。上述したT2は、予め定められた閾値であり、T1<T2である。T2は、上述したT1と同様に、偏差Cbσに対する閾値と偏差Crσに対する閾値とを含む。なお、2つの閾値は同じ値であっても良いし、異なる値であっても良い。CPU26は、偏差Cbσおよび偏差Crσの両方について閾値未満である場合に評価値Da<T2であると判定する。評価値Da<T2である場合とは、T1≦評価値Da<T2である場合であり、対象の画像に基づく偏差Cbσおよび偏差Crσが比較的小さく、対象の画像が無彩色に近い場合である。具体的には、冬枯れの風景などの画像が考えられる。
In step S105, the
ステップS106において、CPU26は、ステップS103で算出した評価値Da<T3であるか否かを判定する。CPU26は、評価値Da<T3であると判定すると後述するステップS108に進む。一方、評価値Da≧T3であると判定すると、CPU26は、ステップS107に進む。上述したT3は、予め定められた閾値であり、T1、T2<T3である。T3は、上述したT1およびT2と同様に、偏差Cbσに対する閾値と偏差Crσに対する閾値とを含む。なお、2つの閾値は同じ値であっても良いし、異なる値であっても良い。CPU26は、偏差Cbσおよび偏差Crσの両方について閾値未満である場合に評価値Da<T3であると判定する。
In step S106, the
評価値Da<T3である場合とは、T1、T2≦評価値Da<T3である場合であり、対象の画像に基づく偏差Cbσおよび偏差Crσがやや小さい場合である。具体的には、一般的な風景などの画像が考えられる。一方、評価値Da≧T3である場合とは、対象の画像に基づく偏差Cbσおよび偏差Crσが平均的な値である場合である。 The case where the evaluation value Da <T3 is a case where T1, T2 ≦ the evaluation value Da <T3, and the case where the deviation Cbσ and the deviation Crσ based on the target image are slightly small. Specifically, an image such as a general landscape can be considered. On the other hand, the case where the evaluation value Da ≧ T3 is a case where the deviation Cbσ and the deviation Crσ based on the target image are average values.
なお、ステップS104からステップS106で説明した各閾値(T1〜T3)をAFレンズ11におけるズーム倍率に応じて可変としても良い。例えば、ズーム倍率が高い場合、対象となる画像は拡大された画像である。この場合、色味がある部分も拡大されるため、各閾値(T1〜T3)の値も大きくする必要がある。また、ステップS104からステップS106における各判定では、偏差Cbσおよび偏差Crσの両方について閾値未満であるか否かを判定する例を示したが、何れか一方のみについて閾値未満であるか否かを判定する構成としても良い。 The threshold values (T1 to T3) described in steps S104 to S106 may be variable according to the zoom magnification of the AF lens 11. For example, when the zoom magnification is high, the target image is an enlarged image. In this case, since the part with a color is also expanded, it is necessary to also increase the value of each threshold value (T1-T3). Moreover, in each determination in step S104 to step S106, although the example which determines whether it is less than a threshold value about both deviation Cb (sigma) and deviation Cr (sigma) was shown, it is determined whether only one of them is less than a threshold value It is good also as composition to do.
ステップS107において、CPU26は、画像処理装置22を制御してマスク抽出処理(I)を行う。マスク抽出処理とは、画像における特徴量を算出し、特徴量に基づいて被写体領域を検出するための一手法である。例えば、画像における特徴量を求め、同様の特徴量を有する連続領域を求めることによりマスク抽出を行う。
In step S107, the
マスク抽出処理(I)について図3〜図7の模式図を参照して説明する。画像処理装置22は、上述したYUV画像のY画像、Cb画像およびCr画像のそれぞれに基づいて、マスク画像を作成する。 The mask extraction process (I) will be described with reference to the schematic diagrams of FIGS. The image processing device 22 creates a mask image based on each of the Y image, Cb image, and Cr image of the YUV image described above.
画像処理装置22は、図3に示すように、Y画像、Cb画像およびCr画像のそれぞれからYマスクM[Y]、CbマスクM[Cb]およびCrマスクM[Cr]を作成する。画像処理装置22は、Y画像から、例えば、Y画像の中心の4画素における平均画素値Yaveに対して、所定の範囲(例えば、Yave+K・σ)の2値化画像を生成する。そして、生成したY2値化画像に対してラベリング処理を行い、不要なマスクを排除することによりYマスクM[Y]を作成する。なお、上述したKは所定の係数(例えば、K=0.6)であり、σはYaveからの偏差である。また、2値化処理およびラベリング処理は公知技術と同様であるため説明を省略する。画像処理装置22は、同様の処理を行ってCb画像からCbマスクM[Cb]を作成し、Cr画像からCrマスクM[Cr]を作成する。 As shown in FIG. 3, the image processing device 22 creates a Y mask M [Y], a Cb mask M [Cb], and a Cr mask M [Cr] from each of the Y image, the Cb image, and the Cr image. For example, the image processing device 22 generates a binarized image in a predetermined range (for example, Yave + K · σ) with respect to the average pixel value Yave at the four pixels at the center of the Y image, for example. Then, a labeling process is performed on the generated Y-binarized image, and unnecessary masks are eliminated to create a Y mask M [Y]. Note that K described above is a predetermined coefficient (for example, K = 0.6), and σ is a deviation from Yave. Since the binarization process and the labeling process are the same as those in the known technique, the description thereof is omitted. The image processing apparatus 22 performs the same processing to create a Cb mask M [Cb] from the Cb image, and creates a Cr mask M [Cr] from the Cr image.
また、画像処理装置22は、図3に示すように、作成したYマスクM[Y]、CbマスクM[Cb]およびCrマスクM[Cr]から中心マスクM[a]を作成する。中心マスクM[a]は、YマスクM[Y]、CbマスクM[Cb]およびCrマスクM[Cr]が重なる重複領域からなるマスクである。なお、中心マスクM[a]を作成する際には、領域を例えば中央領域に限定して重複領域を求めても良い。あるいは、中央を含むマスクに限定しても良い。以降の処理では、最終的に作成した中心マスクM[a]のみを使用する。 Further, as shown in FIG. 3, the image processing apparatus 22 creates a center mask M [a] from the created Y mask M [Y], Cb mask M [Cb], and Cr mask M [Cr]. The center mask M [a] is a mask formed of an overlapping region where the Y mask M [Y], the Cb mask M [Cb], and the Cr mask M [Cr] overlap. Note that when the center mask M [a] is created, the overlapping region may be obtained by limiting the region to the central region, for example. Or you may limit to the mask containing a center. In the subsequent processing, only the finally created center mask M [a] is used.
また、画像処理装置22は、図4に示すように、Y画像から3種類の輝度マスクを作成する(ただし、Y画像から4種類以上のマスクを作成しても良い。)。画像処理装置22は、Y画像の各画素値を入力値とし、補正(例えばガンマ補正)後の各画素値を出力値とする。そして、出力値に応じて3つの区分の2値化画像を生成する。図4に示すように、Y画像のハイライト部分からはYハイライト2値化画像が生成され、Y画像の中間以上の部分からはY中間以上2値化画像が生成され、Y画像のシャドー部分からはYシャドー2値化画像が生成される。そして、画像処理装置22は、生成した3種類の2値化画像のそれぞれに対してラベリング処理を行い、不要なマスクを排除することにより、YハイライトマスクM[Y1]、Y中間以上マスクM[Y2]およびYシャドーマスクM[Y3]の各輝度マスクを作成する。 Further, as shown in FIG. 4, the image processing device 22 creates three types of luminance masks from the Y image (however, four or more types of masks may be created from the Y image). The image processing device 22 uses each pixel value of the Y image as an input value and each pixel value after correction (for example, gamma correction) as an output value. Then, binarized images of three sections are generated according to the output value. As shown in FIG. 4, a Y highlight binarized image is generated from the highlight portion of the Y image, and a Y intermediate or higher binarized image is generated from the middle portion or more of the Y image. A Y shadow binary image is generated from the portion. Then, the image processing apparatus 22 performs a labeling process on each of the generated three types of binarized images, and eliminates unnecessary masks, whereby a Y highlight mask M [Y1], a Y intermediate or higher mask M Each brightness mask of [Y2] and Y shadow mask M [Y3] is created.
また、画像処理装置22は、図5に示すように、Cb画像およびCr画像のそれぞれから、3種類ずつの色マスクを作成する。画像処理装置22は、Cb画像に対して、上述した図4の例と同様に、出力値に応じて3つの所定区分の2値化画像を生成する。図5に示すように、Cb画像からは、青側を中心としたCb青側2値化画像、中間成分を中心としたCb中間2値化画像、黄側を中心としたCb黄側2値化画像が生成される。同様に、Cr画像からは、赤側を中心としたCr赤側2値化画像、中間成分を中心としたCr中間2値化画像、緑側を中心としたCr緑側2値化画像が生成される。そして、画像処理装置22は、生成した6種類の2値化画像のそれぞれに対してラベリング処理を行い、不要なマスクを排除することにより、Cb青側マスクM[Cb1]、Cb中間マスクM[Cb2]、Cb黄側マスクM[Cb3]、Cr赤側マスクM[Cr1]、Cr中間マスクM[Cr2]、Cr緑側マスクM[Cr3]の6種類の色マスクを作成する。 Further, as shown in FIG. 5, the image processing device 22 creates three types of color masks from each of the Cb image and the Cr image. The image processing device 22 generates a binarized image of three predetermined sections according to the output value, similarly to the example of FIG. 4 described above, for the Cb image. As shown in FIG. 5, from the Cb image, the Cb blue side binarized image centered on the blue side, the Cb intermediate binarized image centered on the intermediate component, and the Cb yellow side binary centered on the yellow side. A digitized image is generated. Similarly, from the Cr image, a Cr red side binarized image centered on the red side, a Cr intermediate binarized image centered on the intermediate component, and a Cr green side binarized image centered on the green side are generated. Is done. Then, the image processing device 22 performs a labeling process on each of the generated six types of binarized images, and eliminates unnecessary masks, whereby the Cb blue mask M [Cb1] and the Cb intermediate mask M [ Six color masks are created: Cb2], Cb yellow side mask M [Cb3], Cr red side mask M [Cr1], Cr intermediate mask M [Cr2], and Cr green side mask M [Cr3].
また、画像処理装置22は、図6に示すように、Cb画像およびCr画像から純色マスクを作成する。純色マスクとは、任意の一定の領域を有する「絶対的に純度の高い被写体」を抽出したマスクである。純色マスクの作成は、公知技術と同様に行われるため説明を省略する。画像処理装置22は、図6に示すように、Cb画像およびCr画像から、例えば、純色赤マスクM[R]を作成する。なお、純色赤マスクM[R]以外の純色マスクをさらに作成しても良い。 Further, as shown in FIG. 6, the image processing apparatus 22 creates a pure color mask from the Cb image and the Cr image. The pure color mask is a mask obtained by extracting an “absolutely pure subject” having an arbitrary fixed area. Since the creation of the pure color mask is performed in the same manner as in the known technique, description thereof is omitted. As illustrated in FIG. 6, the image processing device 22 creates, for example, a pure red mask M [R] from the Cb image and the Cr image. Note that a pure color mask other than the pure color red mask M [R] may be further created.
なお、上述した各マスクの作成時には、適宜2値化画像を生成する例を示したが、2値化画像を生成することなく、多値画像に対するラベリングマスクを直接作成する構成としても良い。 In addition, although the example which produces | generates a binarized image suitably was shown at the time of creation of each mask mentioned above, it is good also as a structure which produces directly the labeling mask with respect to a multi-value image, without producing | generating a binarized image.
以上説明した処理により、画像処理装置22は、図3に示した1種類のマスク(中心マスクM[a])と、図4に示した3種類の輝度マスクと、図5に示した6種類の色マスクと、図6に示した1種類の純色マスクの合計11種類のマスクを作成する。 Through the processing described above, the image processing apparatus 22 has one type of mask (center mask M [a]) shown in FIG. 3, three types of luminance masks shown in FIG. 4, and six types shown in FIG. A total of 11 types of masks are prepared, one color mask shown in FIG. 6 and one type pure color mask shown in FIG.
次に、画像処理装置22は、作成した11種類のマスクに対して、不要なマスクを排除し、残ったマスクについて優先度を決定する。優先度とは、11種類のマスクから、実際に被写体領域の抽出に用いるマスクを決定する際の優先度合を示す。 Next, the image processing apparatus 22 eliminates unnecessary masks from the created eleven types of masks and determines priorities for the remaining masks. The priority indicates a priority when determining a mask that is actually used to extract a subject area from eleven types of masks.
一般的な画像を対象とした通常のマスク抽出処理であるマスク抽出処理(I)においては、例えば、図7に示すように、3段階の優先度が予め定められる。優先度1位は、純色マスクである純色赤マスクM[R]であり、優先度2位は、色マスクのうちCb青側マスクM[Cb1]およびCb黄側マスクM[Cb3]であり、優先度3位はその他のマスクである。なお、図7に示す優先度は一例であり、複数段階であれば何段階であっても良い。 In the mask extraction process (I) that is a normal mask extraction process for a general image, for example, as shown in FIG. 7, three levels of priority are determined in advance. The first priority is the pure red mask M [R], which is a pure color mask, and the second priority is the Cb blue side mask M [Cb1] and the Cb yellow side mask M [Cb3] of the color masks, Other masks have the third highest priority. Note that the priority shown in FIG. 7 is an example, and any number of stages may be used as long as there are a plurality of stages.
また、図7における各マスクの各優先度への振り分けは一例である。図7に示すように、優先度は、色情報に関するマスクの優先度が相対的に高く決定されている。そして、画像処理装置22は、これらの優先度に応じて、優先度の高い各マスクを優先しつつ、一定評価値以上のマスクを求め、被写体領域を抽出するためのマスクとする。なお、被写体領域を抽出するためのマスクを選択する方法は、公知技術などどのような方法であっても良い。最後に、画像処理装置22は、選択したマスクに基づいて被写体領域を抽出し、後述するステップS111に進む。 Further, the assignment of each mask to each priority in FIG. 7 is an example. As shown in FIG. 7, the priority is determined so that the priority of the mask related to the color information is relatively high. Then, the image processing apparatus 22 obtains a mask having a certain evaluation value or higher while giving priority to each mask having a high priority in accordance with these priorities, and uses the mask as a mask for extracting a subject area. Note that a method for selecting a mask for extracting a subject area may be any method such as a known technique. Finally, the image processing apparatus 22 extracts a subject area based on the selected mask, and proceeds to step S111 described later.
ステップS108において、CPU26は、画像処理装置22を制御してマスク抽出処理(II)を行う。マスク抽出処理(II)とは、一般的な風景などの画像(対象の画像に基づく偏差Cbσおよび偏差Crσがやや小さい画像)を対象としたマスク抽出処理である。以下では、ステップS107で説明したマスク抽出処理(I)との相違点についてのみ説明する。
In step S108, the
画像処理装置22は、ステップS107で説明した11種類のマスクを作成する。そして、画像処理装置22は、作成した11種類のマスクに対して、不要なマスクを排除し、残ったマスクについて優先度を決定する。ここで、画像処理装置22は、ステップS107とは異なり、輝度マスクのうちYハイライトマスクM[Y1] の優先度を相対的に高く決定し、各種色マスクの優先度を相対的に低く設定する。例えば、図8に示すように、YハイライトマスクM[Y1]の優先度を優先度1位とし、その他のマスクの優先度を優先度2位とする。このように優先度を決定するのは、対象画像が一般的な風景などの画像(対象の画像に基づく偏差Cbσおよび偏差Crσがやや小さい画像)であることを鑑みたことによるものであり、マスク抽出処理(I)と比較して、マスク抽出において、色に関する特徴量への依存度をさらに下げるためである。そして、画像処理装置22は、ステップS107と同様に、優先度の高い各マスクを優先しつつ、一定評価値以上のマスクを求め、被写体領域を抽出するためのマスクとして選択する。最後に、画像処理装置22は、選択したマスクに基づいて被写体領域を抽出し、後述するステップS111に進む。 The image processing apparatus 22 creates the 11 types of masks described in step S107. Then, the image processing device 22 eliminates unnecessary masks from the created eleven types of masks and determines the priority of the remaining masks. Here, unlike step S107, the image processing apparatus 22 determines the priority of the Y highlight mask M [Y1] among the luminance masks to be relatively high, and sets the priority of the various color masks to be relatively low. To do. For example, as shown in FIG. 8, the priority of the Y highlight mask M [Y1] is set to the first priority, and the other masks are set to the second priority. The priority is determined in this way because the target image is an image of a general landscape or the like (an image with a slightly small deviation Cbσ and deviation Crσ based on the target image). This is because, in comparison with the extraction process (I), in the mask extraction, the degree of dependence on the color-related feature amount is further reduced. Then, as in step S107, the image processing apparatus 22 obtains a mask having a certain evaluation value or higher while giving priority to each mask having a high priority, and selects it as a mask for extracting a subject area. Finally, the image processing apparatus 22 extracts a subject area based on the selected mask, and proceeds to step S111 described later.
ステップS109において、CPU26は、画像処理装置22を制御してマスク抽出処理(III)を行う。マスク抽出処理(III)とは、対象の画像が無彩色に近い冬枯れの風景などの画像(対象の画像に基づく偏差Cbσおよび偏差Crσが比較的小さい画像)を対象としたマスク抽出処理である。以下では、ステップS107およびS108で説明した各処理との相違点についてのみ説明する。
In step S109, the
画像処理装置22は、ステップS107で説明した11種類のマスクのうち、1種類の純色マスクを除く10種類のマスクを作成する。ただし、CbマスクM[Cb]およびCrマスクM[Cr]を作成する際には、マスク抽出処理(I)およびマスク抽出処理(II)とは条件を変える。 The image processing apparatus 22 creates 10 types of masks excluding one type of pure color mask among the 11 types of masks described in step S107. However, when creating the Cb mask M [Cb] and the Cr mask M [Cr], the conditions are different from those of the mask extraction process (I) and the mask extraction process (II).
図9は、マスク抽出処理(III)におけるCbマスクM[Cb]およびCrマスクM[Cr]の作成について説明する図である。図9Aは、マスク抽出処理(III)の対象である無彩色に近い冬枯れの風景などの画像(対象の画像に基づく偏差Cbσおよび偏差Crσが比較的小さい画像)を対象として、マスク抽出処理(I)およびマスク抽出処理(II)と同様の処理を行った場合の例を示す。対象の画像に基づく偏差Cbσおよび偏差Crσが比較的小さい画像である場合、色に関する情報が少ないため、マスク抽出処理(I)およびマスク抽出処理(II)と同様の処理を行うと、2値化の段階でノイズを拾ってしまう可能性が高くなる。すなわち、もともと狭い色幅をさらに2値化することにより、1つの被写体領域が分離された2値化画像が生成されてしまうことがある。そこで、マスク抽出処理(III)においては、図9Bに示すように、Cb画像における2値化の範囲をCbave(Cb画像の中心4画素における平均画素値)±K1・σ(ただし、K1>K)とすることにより、より広い適切な被写体領域を抜き出すとともに、ノイズを低減する。Cr画像についても、同様に、Cr画像における2値化の範囲をCrave(Cr画像の中心4画素における平均画素値)±K1・σ(ただし、K1>K)とする。 FIG. 9 is a diagram illustrating the creation of the Cb mask M [Cb] and the Cr mask M [Cr] in the mask extraction process (III). FIG. 9A illustrates a mask extraction process (I) for an image (an image having a relatively small deviation Cbσ and deviation Crσ based on the target image) such as an achromatic landscape close to an achromatic color that is the target of the mask extraction process (III). ) And mask extraction processing (II) will be described. If the deviation Cbσ and the deviation Crσ based on the target image are relatively small, there is little information about the color, and therefore binarization is performed when processing similar to the mask extraction processing (I) and mask extraction processing (II) is performed. The possibility of picking up noise at the stage becomes high. That is, by binarizing an originally narrow color width, a binarized image in which one subject area is separated may be generated. Therefore, in the mask extraction process (III), as shown in FIG. 9B, the binarization range in the Cb image is defined as Cbave (average pixel value in the central four pixels of the Cb image) ± K1 · σ (where K1> K ) To extract a wider appropriate subject area and reduce noise. Similarly, regarding the Cr image, the binarization range in the Cr image is set to Cave (average pixel value in the central four pixels of the Cr image) ± K1 · σ (where K1> K).
さらに、中心マスクM[a]については、YマスクM[Y]、CbマスクM[Cb]およびCrマスクM[Cr]が重なる重複領域を求める代わりに、YマスクM[Y]のみを用いて中心マスクM[a]を作成する。すなわち、CbマスクM[Cb]およびCrマスクM[Cr]を用いずに(作成せずに)、YマスクM[Y]そのものを中心マスクM[a]とする。このとき、中心マスクM[a]は、輝度に関する特徴量のみに基づいて作成されるので、色空間ではなく輝度空間に限定された中心マスクM[a]が作成されることになる。これは、対象画像が無彩色に近い冬枯れの風景などの画像(対象の画像に基づく偏差Cbσおよび偏差Crσが比較的小さい画像)であることを鑑みたことによるものであり、マスク抽出処理(I)およびマスク抽出処理(II)と比較して、マスク抽出において、色に関する特徴量への依存度をさらに下げるためである。 Further, for the center mask M [a], instead of obtaining an overlapping region where the Y mask M [Y], Cb mask M [Cb] and Cr mask M [Cr] overlap, only the Y mask M [Y] is used. A center mask M [a] is created. That is, the Y mask M [Y] itself is set as the center mask M [a] without using (creating) the Cb mask M [Cb] and the Cr mask M [Cr]. At this time, since the center mask M [a] is created based only on the feature quantity related to luminance, the center mask M [a] limited to the luminance space instead of the color space is created. This is due to the fact that the target image is an image such as a wintering scenery close to an achromatic color (an image with a relatively small deviation Cbσ and deviation Crσ based on the target image), and mask extraction processing (I ) And mask extraction processing (II), in order to further reduce the dependency on the color-related feature amount in mask extraction.
そして、画像処理装置22は、作成した10種類のマスクに対して、不要なマスクを排除し、残ったマスクについて優先度を決定する。例えば、図10に示すように、輝度マスクのうちYハイライトマスクM[Y1]、色マスクのうちCb青側マスクM[Cb1]、Cb黄側マスクM[Cb3]、Cr赤側マスクM[Cr1]の優先度を優先度1位とし、その他のマスクの優先度を優先度2位とする。そして、画像処理装置22は、ステップS107と同様に、優先度の高い各マスクを優先しつつ、一定評価値以上のマスクを求め、被写体領域を抽出するためのマスクとして選択する。最後に、画像処理装置22は、選択したマスクに基づいて被写体領域を抽出し、後述するステップS111に進む。 Then, the image processing apparatus 22 excludes unnecessary masks from the created 10 types of masks, and determines the priority of the remaining masks. For example, as shown in FIG. 10, the Y highlight mask M [Y1] of the luminance mask, the Cb blue side mask M [Cb1], the Cb yellow side mask M [Cb3], and the Cr red side mask M [[ The priority of Cr1] is the first priority, and the priority of the other masks is the second priority. Then, as in step S107, the image processing apparatus 22 obtains a mask having a certain evaluation value or higher while giving priority to each mask having a high priority, and selects it as a mask for extracting a subject area. Finally, the image processing apparatus 22 extracts a subject area based on the selected mask, and proceeds to step S111 described later.
ステップS110において、CPU26は、画像処理装置22を制御してマスク抽出処理(IV)を行う。マスク抽出処理(IV)とは、対象の画像が非常に無彩色に近い、あるいは無彩色である白黒画像、白黒画像に近い画像、雪景色などの画像(対象の画像に基づく偏差Cbσおよび偏差Crσが十分に小さい画像)を対象としたマスク抽出処理である。以下では、ステップS107からS109で説明した各処理との相違点についてのみ説明する。
In step S110, the
画像処理装置22は、ステップS107で説明した11種類のマスクのうち、6種類の色マスクと、1種類の純色マスクとを除く4種類のマスクを作成する。すなわち、中心マスクM[a]と、3種類の輝度マスクとを作成する。 The image processing apparatus 22 creates four types of masks excluding six types of color masks and one type of pure color mask among the 11 types of masks described in step S107. That is, a center mask M [a] and three types of luminance masks are created.
中心マスクM[a]については、YマスクM[Y]、CbマスクM[Cb]およびCrマスクM[Cr]が重なる重複領域を求める代わりに、YマスクM[Y]のみを用いて中心マスクM[a]を作成する。すなわち、CbマスクM[Cb]およびCrマスクM[Cr]を用いずに(作成せずに)、YマスクM[Y]そのものを中心マスクM[a]とする。このとき、中心マスクM[a]は、輝度に関する特徴量のみに基づいて作成されるので、色空間ではなく輝度空間に限定された中心マスクM[a]が作成されることになる。このように中心マスクM[a]を作成するのは、対象画像が非常に無彩色に近い、あるいは無彩色である画像(対象の画像に基づく偏差Cbσおよび偏差Crσが十分に小さい画像)であることを鑑みたことによるものであり、色に関する特徴量に基づくマスクを用いずに被写体領域の抽出を行うためである。 For the center mask M [a], instead of obtaining an overlapping area where the Y mask M [Y], Cb mask M [Cb] and Cr mask M [Cr] overlap, the center mask M [Y] is used only by using the Y mask M [Y]. M [a] is created. That is, the Y mask M [Y] itself is set as the center mask M [a] without using (creating) the Cb mask M [Cb] and the Cr mask M [Cr]. At this time, since the center mask M [a] is created based only on the feature quantity related to luminance, the center mask M [a] limited to the luminance space instead of the color space is created. The center mask M [a] is created in this way for an image whose target image is very achromatic or achromatic (an image with a sufficiently small deviation Cbσ and deviation Crσ based on the target image). This is because the subject area is extracted without using a mask based on the color-related feature amount.
そして、画像処理装置22は、作成した4種類のマスクに対して、不要なマスクを排除し、残ったマスクについて優先度を決定する。例えば、図11に示すように、輝度マスクのうちYハイライトマスクM[Y1]の優先度を優先度1位とし、その他のマスクの優先度を優先度2位とする。そして、画像処理装置22は、ステップS107と同様に、優先度の高い各マスクを優先しつつ、一定評価値以上のマスクを求め、被写体領域を抽出するためのマスクとして選択する。最後に、画像処理装置22は、選択したマスクに基づいて被写体領域を抽出し、ステップS111に進む。 Then, the image processing device 22 excludes unnecessary masks from the created four types of masks and determines priorities for the remaining masks. For example, as shown in FIG. 11, the priority of the Y highlight mask M [Y1] in the luminance mask is set to the first priority, and the priority of the other masks is set to the second priority. Then, as in step S107, the image processing apparatus 22 obtains a mask having a certain evaluation value or higher while giving priority to each mask having a high priority, and selects it as a mask for extracting a subject area. Finally, the image processing device 22 extracts a subject area based on the selected mask, and proceeds to step S111.
なお、ステップS107からステップS110で説明した各マスク抽出処理において、画像処理装置22は、1つの被写体領域のみ抽出しても良いし、複数の被写体領域を抽出しても良い。また、ステップS107からステップS110で説明した各マスク抽出処理における、使用しないマスクの選択方法、中心マスクM[a]の作成方法、優先度の変更方法は一例である。いずれにせよ、対象画像の無彩色度合を示す評価値Daに応じて、色に関する特徴量への依存度を調整すれば良い。 In each mask extraction process described in steps S107 to S110, the image processing apparatus 22 may extract only one subject area or a plurality of subject areas. In addition, in each mask extraction process described in steps S107 to S110, a mask selection method that is not used, a center mask M [a] creation method, and a priority change method are examples. In any case, the degree of dependence on the feature amount relating to the color may be adjusted according to the evaluation value Da indicating the achromatic degree of the target image.
ステップS111において、CPU26は、ステップS107からS110の何れかのマスク抽出処理の結果を、被写体情報としてバッファメモリ部24や記憶部25等に記録する。被写体情報には、マスク抽出処理の抽出条件(色区分やマスク区分など)、マスクの位置、マスクの大きさや形状、抽出した被写体領域の位置、被写体領域の大きさや形状などの情報が含まれる。
In step S111, the
ステップS112において、CPU26は、撮影指示が行われたか否かを判定する。CPU26は、撮影指示が行われたと判定するとステップS113に進む。一方、撮影指示が行われないと判定すると、CPU26は、ステップS102に戻り、次のフレームの画像に対してステップS102以降の処理を行う。撮影指示は、操作部27のシャッタボタンを介したユーザ操作により行われる。
In step S112, the
ステップS113において、CPU26は、各部を制御して撮影を実行する。このとき、CPU26は、ステップS113で記録した被写体情報に基づいて撮影を行う。CPU26は、ステップS113で記録した被写体情報に基づいて、焦点調整(AF)の設定処理、露出調整(AE)の設定処理、ホワイトバランス調整処理(AWB)の3A処理を行うとともに、画像処理装置22における各種画像処理の条件等を決定する。
In step S113, the
なお、焦点調整(AF)の設定処理において、CPU26は、抽出した被写体領域を整形し、コントラストスキャンを実行する。そして、CPU26は、コントラストスキャンの結果に基づいて、AFレンズ11により合焦させる(合焦駆動)。
In the focus adjustment (AF) setting process, the
また、マスク抽出処理および被写体情報の記録が完了していない状態で撮影指示が行われてしまった場合には、CPU26は、通常の3A処理を行い、この3A処理の結果に基づいて撮影を実行すればよい。または、マスク抽出処理および被写体情報の記録が完了するまで、撮影指示に関するユーザ操作の受付を禁止しても良い。
In addition, when a shooting instruction has been issued in a state where mask extraction processing and subject information recording have not been completed, the
ステップS114において、CPU26は、撮像により生成した画像を、通信部28を介して記憶媒体40に記録して一連の処理を終了する。
In step S <b> 114, the
以上説明したように、本実施形態によれば、処理対象の画像データを取得し、画像データにより示される特徴量を算出し、特徴量に基づいて定まる被写体領域を検出する。さらに、画像データにより示される画像の色情報の分布を示す評価値(無彩色度合を示す評価値)を算出し、算出した評価値に基づいて、被写体領域の検出方法を決定する。したがって、対象画像の色情報の分布(色の濃さ等)に応じて好適な被写体領域の抽出を行うことができる。 As described above, according to the present embodiment, the image data to be processed is acquired, the feature amount indicated by the image data is calculated, and the subject region determined based on the feature amount is detected. Furthermore, an evaluation value indicating the distribution of color information of the image indicated by the image data (an evaluation value indicating the degree of achromatic color) is calculated, and a subject area detection method is determined based on the calculated evaluation value. Therefore, a suitable subject area can be extracted according to the distribution of color information (color density, etc.) of the target image.
特に、本実施形態によれば、対象画像の色情報の分布(色の濃さ等)に応じて各マスクの算出方法や各マスクの優先度を変更することにより、被写体に応じたマスクを抽出することができるので、被写体領域抽出の精度を向上させることができる。 In particular, according to the present embodiment, the mask corresponding to the subject is extracted by changing the calculation method of each mask and the priority of each mask according to the color information distribution (color density, etc.) of the target image. Therefore, the accuracy of subject area extraction can be improved.
また、本実施形態によれば、対象の画像が無彩色の画像である場合には、輝度に関する特徴量の優先度を、画像が無彩色の画像でない場合より高く設定して、被写体領域の検出を行う。したがって、被写体領域の検出における色情報への依存を抑え、好適な被写体領域の抽出を行うことができる。また、対象の画像が無彩色の画像である場合には、輝度に関する特徴量に基づいて定まる第1の領域と、輝度に関する特徴量とは異なる第2の特徴量に基づいて定まる第2の領域とが重なる重複領域を検出する際に、第1の領域のみに基づいて重複領域を検出することにより、同様の効果を得ることができる。また、対象の画像が無彩色の画像である場合には、色に関する特徴量の優先度を、画像が無彩色の画像でない場合より低く設定して、被写体領域の検出を行うことにより、同様の効果を得ることができる。また、対象の画像が無彩色の画像である場合には、第1の特徴量に基づいて定まる第1の領域と、第1の特徴量とは異なる色に関する特徴量に基づいて定まる第2の領域とが重なる重複領域を検出する際に、第2の領域の検出方法を変更することにより、同様の効果を得ることができる。 In addition, according to the present embodiment, when the target image is an achromatic image, the priority of the feature amount related to the luminance is set higher than that in the case where the image is not an achromatic image to detect the subject area. I do. Accordingly, it is possible to suppress the dependence on the color information in the detection of the subject area, and to extract a suitable subject area. In addition, when the target image is an achromatic image, the first region determined based on the feature amount related to luminance and the second region determined based on the second feature amount different from the feature amount related to luminance The same effect can be obtained by detecting the overlapping area based only on the first area when detecting the overlapping area where and overlap. In addition, when the target image is an achromatic image, the same priority is set by lowering the priority of the feature amount related to the color than when the image is not an achromatic image, and the object region is detected. An effect can be obtained. In addition, when the target image is an achromatic image, the first region determined based on the first feature amount and the second region determined based on the feature amount relating to a color different from the first feature amount. The same effect can be obtained by changing the detection method of the second region when detecting the overlapping region overlapping with the region.
以上、この発明の実施形態について図面を参照して詳述してきたが、具体的な構成はこの実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の設計等も含まれる。 The embodiment of the present invention has been described in detail with reference to the drawings. However, the specific configuration is not limited to this embodiment, and includes designs and the like that do not depart from the gist of the present invention.
上記実施形態では、各マスク抽出処理(図2ステップS107からS110)において、使用するマスクのみを作成する例を示したが、常に全てのマスクを作成し、使用するマスクを適宜変更する構成としても良い。 In the above embodiment, an example in which only the masks to be used are created in each mask extraction process (steps S107 to S110 in FIG. 2) has been described. good.
上記実施形態では、対象の画像における色情報の分布を示す評価値として、対象の画像における無彩色度合を示す評価値Daを用いる例を示したが、本発明はこの例に限定されない。例えば、対象の画像における任意の色相への偏り(いわゆる色かぶり、任意の色相の色が画面を占めること)具合を示す評価値を用いても良い。この場合、評価値は、例えば、分布の幅(例えば、偏差)に相当する。この評価値が、対象の画像が任意の色相へ偏るほど小さい値となり、色相の広がりが大きいほど大きい値となるものである場合、例えば、森林が被写体である場合など、緑系の色相への偏り具合が著しい画像については、評価値は小さくなる。また、夕日が被写体である場合など、赤から橙系の色相への偏り具合が著しい画像についても同様である。一方、様々な色の被写体が含まれるカラフルな画像など、任意の色相への偏り具合が低い画像については、評価値は高くなる。そして、この評価値に応じて各マスクの算出方法や各マスクの優先度を変更することにより、上述した実施形態と同様の効果を得ることができる。例えば、緑系の色相への偏り具合が著しい画像については、色マスク(図5参照)や純色マスク(図6参照)を作成する際に閾値を変更することにより区分を変更し、緑系の相対的な分解能を変更すると良い。例えば、緑系のマスクに関する分解能を低くしても良いし、逆に、緑系以外のマスクに関する分解能を高くしても良い。つまり、任意の色相への偏り具合が著しい画像については、ドミナント色への感度を落とす(つまり、分解能を下げる)か、非ドミナント色への感度を上げる(つまり、分解能を上げる)ことにより、相対的な分解能を変更すると良い。 In the above embodiment, the evaluation value Da indicating the achromatic degree in the target image is used as the evaluation value indicating the distribution of color information in the target image. However, the present invention is not limited to this example. For example, an evaluation value indicating the degree of bias to an arbitrary hue in the target image (so-called color cast, the color of an arbitrary hue occupying the screen) may be used. In this case, the evaluation value corresponds to, for example, a distribution width (for example, deviation). When this evaluation value is a value that becomes smaller as the target image is biased to an arbitrary hue and becomes a larger value as the spread of the hue becomes larger, for example, when the forest is a subject, The evaluation value is small for an image with a significant degree of bias. The same applies to an image in which the degree of deviation from red to orange hue is significant, such as when the sunset is the subject. On the other hand, an evaluation value is high for an image having a low degree of bias to an arbitrary hue, such as a colorful image including subjects of various colors. And the effect similar to embodiment mentioned above can be acquired by changing the calculation method of each mask and the priority of each mask according to this evaluation value. For example, for an image with a significant bias toward a green hue, the classification is changed by changing the threshold when creating a color mask (see FIG. 5) or a pure color mask (see FIG. 6). It is better to change the relative resolution. For example, the resolution related to the green-based mask may be lowered, and conversely, the resolution related to the mask other than the green-based mask may be increased. In other words, for images that are significantly biased to any hue, you can either reduce the sensitivity to dominant colors (that is, reduce the resolution) or increase the sensitivity to non-dominant colors (that is, increase the resolution). It is better to change the resolution.
また、色マスク(図5参照)や純色マスク(図6参照)のうち、緑系のマスクの優先度を高くしても良い。逆に、様々な色の被写体が含まれるカラフルな画像については、上述した実施形態のマスク抽出処理(I)と同様の処理を行うと良い。 Further, among the color mask (see FIG. 5) and the pure color mask (see FIG. 6), the priority of the green mask may be increased. Conversely, for a colorful image including subjects of various colors, the same process as the mask extraction process (I) of the above-described embodiment may be performed.
また、上記実施形態では、YUV(例えば、YCbCr)画像に基づいて、対象の画像における色情報の分布を示す評価値を算出する例を示したが、本発明はこの例に限定されない。例えば、Lab画像に基づいて、対象の画像における色情報の分布を示す評価値を算出しても良い。Lab画像に基づいて評価値を算出する際には、Y成分の代わりに明度を意味する次元Lを用い、Cb成分およびCr成分の代わりに補色次元のaおよびbを用いて、本実施形態に倣った処理を行うことにより、本実施形態と同様の効果を得ることができる。 Moreover, although the example which calculates the evaluation value which shows distribution of the color information in a target image based on a YUV (for example, YCbCr) image was shown in the said embodiment, this invention is not limited to this example. For example, an evaluation value indicating the distribution of color information in the target image may be calculated based on the Lab image. When calculating the evaluation value based on the Lab image, the dimension L meaning brightness is used instead of the Y component, and the complementary color dimensions a and b are used instead of the Cb component and Cr component. By performing the copied process, the same effect as in the present embodiment can be obtained.
また、上記の実施形態においては、構図確認用のスルー画像に基づいて、一連の処理を行う例を示したが、本発明はこの例に限定されない。例えば、一眼レフカメラなどにおいて生成される構図確認用のライブビュー画像を対象とする場合にも、本発明を同様に適用することができる。また、記録媒体40等に記録された動画像を対象とする場合にも、本発明を同様に適用することができる。
In the above-described embodiment, an example in which a series of processing is performed based on a through image for composition confirmation has been described, but the present invention is not limited to this example. For example, the present invention can be similarly applied to a case where a live view image for composition confirmation generated in a single-lens reflex camera or the like is targeted. Further, the present invention can be similarly applied to a case where a moving image recorded on the
また、上記の実施形態においては、すべてのフレームを対象として一連の処理を行う例を示したが、本発明はこの例に限定されない。例えば、時間的に離散して生成された複数の画像を対象としても良い。具体的には、適宜フレーム間引きを行った複数の画像を対象としても良い。このような処理を行うことにより、処理負荷を軽減することができる。 In the above embodiment, an example in which a series of processing is performed for all frames has been described, but the present invention is not limited to this example. For example, a plurality of images generated discretely in time may be targeted. Specifically, a plurality of images subjected to frame thinning as appropriate may be targeted. By performing such processing, the processing load can be reduced.
また、コンピュータと画像処理プログラムとからなる「コンピュータシステム」により、上述した実施形態で説明した画像処理をソフトウェア的に実現しても良い。この場合、実施形態で説明したフローチャートの処理の一部または全部をコンピュータシステムで実行する構成とすれば良い。例えば、図2のステップS101からステップS111の処理の一部または全部をコンピュータで実行しても良い。このような構成とすることにより、上述した実施形態と同様の処理を実施することが可能になる。 Further, the image processing described in the above-described embodiment may be realized by software by a “computer system” including a computer and an image processing program. In this case, a part or all of the processing of the flowchart described in the embodiment may be configured to be executed by the computer system. For example, part or all of the processing from step S101 to step S111 in FIG. 2 may be executed by a computer. By adopting such a configuration, it is possible to perform the same processing as in the above-described embodiment.
また、「コンピュータシステム」は、wwwシステムを利用している場合であれば、ホームページ提供環境(あるいは表示環境)も含むものとする。また、コンピュータ読み取り可能な記録媒体とは、フレキシブルディスク、光磁気ディスク、ROM、フラッシュメモリ等の書き込み可能な不揮発性メモリ、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。 Further, the “computer system” includes a homepage providing environment (or display environment) if a www system is used. The computer-readable recording medium is a writable nonvolatile memory such as a flexible disk, a magneto-optical disk, a ROM, or a flash memory, a portable medium such as a CD-ROM, and a storage such as a hard disk built in the computer system. Refers to the device.
さらにコンピュータ読み取り可能な記録媒体とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムが送信された場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリ(例えばDRAM(Dynamic Random Access Memory))のように、一定時間プログラムを保持しているものも含むものとする。 Further, the computer-readable recording medium is a volatile memory (for example, DRAM (Dynamic Random Access) in a computer system serving as a server or a client when a program is transmitted via a network such as the Internet or a communication line such as a telephone line. Memory)) that holds a program for a certain period of time is also included.
また、上記プログラムは、このプログラムを記憶装置等に格納したコンピュータシステムから、伝送媒体を介して、あるいは、伝送媒体中の伝送波により他のコンピュータシステムに伝送されてもよい。ここで、プログラムを伝送する「伝送媒体」は、インターネット等のネットワーク(通信網)や電話回線等の通信回線(通信線)のように情報を伝送する機能を有する媒体のことをいう。 The program may be transmitted from a computer system storing the program in a storage device or the like to another computer system via a transmission medium or by a transmission wave in the transmission medium. Here, the “transmission medium” for transmitting the program refers to a medium having a function of transmitting information, such as a network (communication network) such as the Internet or a communication line (communication line) such as a telephone line.
また、上記プログラムは、前述した機能の一部を実現するためのものであっても良い。
さらに、前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるもの、いわゆる差分ファイル(差分プログラム)であっても良い。
The program may be for realizing a part of the functions described above.
Furthermore, what can implement | achieve the function mentioned above in combination with the program already recorded on the computer system, and what is called a difference file (difference program) may be sufficient.
20…撮像装置、21…撮像部、22…画像処理装置、23‥表示部、26…CPU
DESCRIPTION OF
Claims (16)
前記画像の色情報の分布を示す評価値を算出する評価値算出部と、
前記評価値算出部により算出した前記評価値に基づいて、前記領域検出部による前記被写体領域の検出方法を決定する制御部と、を備え、
前記領域検出部は、前記特徴量として複数の特徴量を算出し、前記複数の特徴量に基づいて前記被写体領域を検出し、
前記制御部は、前記評価値に基づいて、前記複数の特徴量における優先度を決定し、決定した前記優先度に基づいて前記領域検出部による前記被写体領域の検出を行う画像処理装置。 An area detection unit that calculates a feature amount of an image and detects a subject area determined based on the feature amount;
An evaluation value calculation unit for calculating an evaluation value showing the distribution of color information before outs image,
A control unit that determines a detection method of the subject region by the region detection unit based on the evaluation value calculated by the evaluation value calculation unit ;
The region detection unit calculates a plurality of feature amounts as the feature amount, detects the subject region based on the plurality of feature amounts,
The image processing apparatus , wherein the control unit determines priorities of the plurality of feature amounts based on the evaluation values, and detects the subject region by the region detection unit based on the determined priorities .
前記領域検出部は、前記特徴量として、少なくとも輝度に関する特徴量を算出し、
前記評価値算出部は、前記評価値として、前記画像における無彩色度合を示す評価値を算出し、
前記制御部は、前記評価値と所定の閾値とを比較することにより、前記画像が無彩色の画像であるか否かを判定し、前記画像が無彩色の画像である場合には、前記輝度に関する特徴量の前記優先度を、前記画像が無彩色の画像でない場合より高く設定して、前記領域検出部による前記被写体領域の検出を行う画像処理装置。 The image processing apparatus according to claim 1.
The region detection unit calculates a feature amount related to at least luminance as the feature amount,
The evaluation value calculation unit calculates an evaluation value indicating an achromatic degree in the image as the evaluation value,
The control unit determines whether or not the image is an achromatic image by comparing the evaluation value with a predetermined threshold, and when the image is an achromatic image, the brightness An image processing apparatus in which the priority of the feature amount related to the image is set higher than that in the case where the image is not an achromatic image, and the subject region is detected by the region detection unit .
前記領域検出部は、前記特徴量として、少なくとも色に関する特徴量を算出し、
前記評価値算出部は、前記評価値として、前記画像における無彩色度合を示す評価値を算出し、
前記制御部は、前記評価値と所定の閾値とを比較することにより、前記画像が無彩色の画像であるか否かを判定し、前記画像が無彩色の画像である場合には、前記色に関する特徴量の前記優先度を、前記画像が無彩色の画像でない場合より低く設定して、前記領域検出部による前記被写体領域の検出を行う画像処理装置。 The image processing apparatus according to claim 1 .
The region detection unit calculates at least a feature amount related to a color as the feature amount,
The evaluation value calculation unit calculates an evaluation value indicating an achromatic degree in the image as the evaluation value,
The control unit determines whether or not the image is an achromatic image by comparing the evaluation value with a predetermined threshold, and when the image is an achromatic image, the color An image processing apparatus in which the priority of the feature amount related to the image is set lower than that in the case where the image is not an achromatic image, and the subject region is detected by the region detection unit .
前記領域検出部は、前記特徴量として、少なくとも色に関する特徴量を算出し、
前記評価値算出部は、前記評価値として、前記画像における任意の色相への偏り具合を示す評価値を算出し、
前記制御部は、前記評価値と所定の閾値とを比較することにより、前記画像が前記任意の色相に偏った画像であるか否かを判定し、前記画像が前記任意の色相に偏った画像である場合には、前記色に関する特徴量のうち、前記任意の色相に関連する特徴量の前記優先度を、前記画像が前記任意の色相に偏った画像でない場合より高く設定して、前記領域検出部による前記被写体領域の検出を行う画像処理装置。 The image processing apparatus according to claim 1 .
The region detection unit calculates at least a feature amount related to a color as the feature amount,
The evaluation value calculation unit calculates an evaluation value indicating a degree of bias to an arbitrary hue in the image as the evaluation value,
The control unit determines whether or not the image is biased to the arbitrary hue by comparing the evaluation value with a predetermined threshold, and the image is biased to the arbitrary hue. The priority of the feature quantity related to the arbitrary hue among the feature quantities related to the color is set higher than when the image is not an image biased to the arbitrary hue, An image processing apparatus for detecting the subject area by a detection unit.
前記領域検出部は、前記特徴量として複数の特徴量を算出するとともに、前記複数の特徴量のうち、第1の特徴量に基づいて定まる第1の領域と、前記第1の特徴量とは異なる第2の特徴量に基づいて定まる第2の領域とが重なる重複領域を前記被写体領域として検出し、
前記制御部は、前記評価値に基づいて、前記第1の領域および前記第2の領域の少なくとも一方の検出方法を決定する画像処理装置。 The image processing apparatus according to claim 1 .
The region detection unit calculates a plurality of feature amounts as the feature amount, and among the plurality of feature amounts, a first region determined based on a first feature amount and the first feature amount are: An overlapping area overlapping with a second area determined based on a different second feature amount is detected as the subject area;
The control unit is an image processing apparatus that determines a detection method of at least one of the first region and the second region based on the evaluation value .
前記領域検出部は、前記第1の特徴量として、輝度に関する特徴量を算出し、
前記評価値算出部は、前記評価値として、前記画像における無彩色度合を示す評価値を算出し、
前記制御部は、前記評価値と所定の閾値とを比較することにより、前記画像が無彩色の画像であるか否かを判定し、前記画像が無彩色の画像である場合には、前記第1の領域のみに基づいて前記重複領域を検出する画像処理装置。 The image processing apparatus according to claim 5 .
The area detection unit calculates a feature quantity related to luminance as the first feature quantity,
The evaluation value calculation unit calculates an evaluation value indicating an achromatic degree in the image as the evaluation value,
The control unit determines whether or not the image is an achromatic image by comparing the evaluation value with a predetermined threshold, and when the image is an achromatic image, An image processing apparatus that detects the overlapping area based on only one area .
前記領域検出部は、前記第2の特徴量として、色に関する特徴量を算出し、
前記評価値算出部は、前記評価値として、前記画像における無彩色度合を示す評価値を算出し、
前記制御部は、前記評価値と所定の閾値とを比較することにより、前記画像が無彩色の画像であるか否かを判定し、前記画像が無彩色の画像である場合には、前記第2の領域の検出方法を変更する画像処理装置。 The image processing apparatus according to claim 5 .
The region detection unit calculates a feature amount related to a color as the second feature amount,
The evaluation value calculation unit calculates an evaluation value indicating an achromatic degree in the image as the evaluation value,
The control unit determines whether or not the image is an achromatic image by comparing the evaluation value with a predetermined threshold, and when the image is an achromatic image, An image processing apparatus that changes the detection method of the area of 2 .
前記領域検出部は、前記第2の特徴量として、色に関する特徴量を算出し、
前記評価値算出部は、前記評価値として、前記画像における任意の色相への偏り具合を示す評価値を算出し、
前記制御部は、前記評価値と所定の閾値とを比較することにより、前記画像が前記任意の色相に偏った画像であるか否かを判定し、前記画像が前記任意の色相に偏った画像である場合には、前記第2の特徴量のうち、前記任意の色相に関連する特徴量に基づく前記第2の領域の前記重みを、前記画像が前記任意の色相に偏った画像でない場合より高く設定して、前記領域検出部による前記被写体領域の検出を行う画像処理装置。 The image processing apparatus according to claim 5 .
The region detection unit calculates a feature amount related to a color as the second feature amount,
The evaluation value calculation unit calculates an evaluation value indicating a degree of bias to an arbitrary hue in the image as the evaluation value,
The control unit determines whether or not the image is biased to the arbitrary hue by comparing the evaluation value with a predetermined threshold, and the image is biased to the arbitrary hue. If the image is not an image biased to the arbitrary hue, the weight of the second region based on the characteristic amount related to the arbitrary hue among the second characteristic amounts is set. An image processing apparatus configured to detect the subject region by setting the region detection unit to be high .
前記撮像部により得られた画像の特徴量を算出し、前記特徴量に基づいて定まる被写体領域を検出する領域検出部と、 A region detection unit that calculates a feature amount of an image obtained by the imaging unit and detects a subject region determined based on the feature amount;
前記画像の色情報の分布を示す評価値を算出する評価値算出部と、 An evaluation value calculation unit for calculating an evaluation value indicating a distribution of color information of the image;
前記評価値算出部により算出した前記評価値に基づいて、前記領域検出部による前記被写体領域の検出方法を決定する制御部と、を備え、 A control unit that determines a detection method of the subject region by the region detection unit based on the evaluation value calculated by the evaluation value calculation unit;
前記領域検出部は、前記特徴量として複数の特徴量を算出し、前記複数の特徴量に基づいて前記被写体領域を検出し、 The region detection unit calculates a plurality of feature amounts as the feature amount, detects the subject region based on the plurality of feature amounts,
前記制御部は、前記評価値に基づいて、前記複数の特徴量における優先度を決定し、決定した前記優先度に基づいて前記領域検出部による前記被写体領域の検出を行う撮像装置。 The image pickup apparatus, wherein the control unit determines priorities of the plurality of feature amounts based on the evaluation values, and detects the subject region by the region detection unit based on the determined priorities.
画像の特徴量を算出し、前記特徴量に基づいて定まる被写体領域を検出する領域検出手順と、 A region detection procedure for calculating a feature amount of an image and detecting a subject region determined based on the feature amount;
前記画像の色情報の分布を示す評価値を算出する評価値算出手順と、 An evaluation value calculation procedure for calculating an evaluation value indicating a distribution of color information of the image;
前記評価値算出手順において算出した前記評価値に基づいて、前記領域検出手順による前記被写体領域の検出方法を決定する制御手順と、 A control procedure for determining a method of detecting the subject region by the region detection procedure based on the evaluation value calculated in the evaluation value calculation procedure;
を実行させるとともに、 As well as
前記領域検出手順は、前記特徴量として複数の特徴量を算出し、前記複数の特徴量に基づいて前記被写体領域を検出する手順を含み、 The region detection procedure includes a procedure of calculating a plurality of feature amounts as the feature amount, and detecting the subject region based on the plurality of feature amounts,
前記制御手順は、前記評価値に基づいて、前記複数の特徴量における優先度を決定し、決定した前記優先度に基づいて前記領域検出手順による前記被写体領域の検出を行う手順を含む画像処理プログラム。 The control procedure includes an image processing program including a procedure for determining a priority in the plurality of feature amounts based on the evaluation value, and detecting the subject region by the region detection procedure based on the determined priority. .
前記画像に含まれる被写体領域を検出する領域検出部と、を備え、 An area detection unit for detecting a subject area included in the image,
前記領域検出部は、前記評価値算出部により算出された評価値により、色情報よりも輝度情報に基づいて前記画像に含まれる被写体領域を検出する第1検出モードと輝度情報よりも色情報に基づいて前記画像に含まれる被写体領域を検出する第2検出モードとのうち、いずれかを選択する画像処理装置。 The region detection unit uses the evaluation value calculated by the evaluation value calculation unit to detect a subject region included in the image based on luminance information rather than color information, and to use color information rather than luminance information. An image processing apparatus that selects one of a second detection mode for detecting a subject area included in the image based on the second detection mode.
前記領域検出部は、前記評価値算出部で算出された評価値と、所定の閾値と、を比較することにより、前記第1検出モードと前記第2検出モードとのうち、いずれかを選択する画像処理装置。 The region detection unit selects one of the first detection mode and the second detection mode by comparing the evaluation value calculated by the evaluation value calculation unit with a predetermined threshold value. Image processing device.
前記評価値算出部は、前記画像が無彩色になるほど小さい値となる前記評価値を算出し、 The evaluation value calculation unit calculates the evaluation value that becomes a smaller value as the image becomes achromatic,
前記領域検出部は、前記評価値算出部で算出された評価値が所定の閾値よりも小さい場合、前記第1検出モードを選択する画像処理装置。 The area detection unit is an image processing apparatus that selects the first detection mode when the evaluation value calculated by the evaluation value calculation unit is smaller than a predetermined threshold.
色情報により前記撮像部で撮像された被写体の画像の評価値を算出する評価値算出部と、 An evaluation value calculation unit that calculates an evaluation value of an image of a subject imaged by the imaging unit based on color information;
前記画像に含まれる被写体領域を検出する領域検出部と、 An area detection unit for detecting a subject area included in the image;
前記領域検出部で検出された被写体領域により前記レンズを駆動させる駆動部と、を備え、 A drive unit that drives the lens by the subject area detected by the area detection unit,
前記領域検出部は、前記評価値算出部により算出された評価値により、色情報よりも輝度情報に基づいて前記画像に含まれる被写体領域を検出する第1検出モードと輝度情報よりも色情報に基づいて前記画像に含まれる被写体領域を検出する第2検出モードとのうち、いずれかを選択する撮像装置。 The region detection unit uses the evaluation value calculated by the evaluation value calculation unit to detect a subject region included in the image based on luminance information rather than color information, and to use color information rather than luminance information. An imaging apparatus that selects one of a second detection mode for detecting a subject area included in the image based on the second detection mode.
前記領域検出部は、前記評価値算出部で算出された評価値と、所定の閾値と、を比較することにより、前記第1検出モードと前記第2検出モードとのうち、いずれかを選択する画像処理装置。 The region detection unit selects one of the first detection mode and the second detection mode by comparing the evaluation value calculated by the evaluation value calculation unit with a predetermined threshold value. Image processing device.
前記評価値算出部は、前記画像が無彩色になるほど小さい値となる前記評価値を算出し、 The evaluation value calculation unit calculates the evaluation value that becomes a smaller value as the image becomes achromatic,
前記領域検出部は、前記評価値算出部で算出された評価値が所定の閾値よりも小さい場合、前記第1検出モードを選択する撮像装置。 The area detection unit is an imaging apparatus that selects the first detection mode when the evaluation value calculated by the evaluation value calculation unit is smaller than a predetermined threshold.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012161920A JP6089476B2 (en) | 2012-07-20 | 2012-07-20 | Image processing apparatus, imaging apparatus, and image processing program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012161920A JP6089476B2 (en) | 2012-07-20 | 2012-07-20 | Image processing apparatus, imaging apparatus, and image processing program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2014023057A JP2014023057A (en) | 2014-02-03 |
JP6089476B2 true JP6089476B2 (en) | 2017-03-08 |
Family
ID=50197465
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012161920A Active JP6089476B2 (en) | 2012-07-20 | 2012-07-20 | Image processing apparatus, imaging apparatus, and image processing program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6089476B2 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6491581B2 (en) * | 2015-10-06 | 2019-03-27 | キヤノン株式会社 | Image processing apparatus, control method therefor, and program |
RU2744447C1 (en) * | 2017-12-20 | 2021-03-09 | Ниссан Мотор Ко., Лтд. | Parking control method and parking control equipment |
JP7207957B2 (en) | 2018-11-07 | 2023-01-18 | キヤノン株式会社 | Image processing device, image processing method, and program |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4449619B2 (en) * | 2004-07-22 | 2010-04-14 | コニカミノルタオプト株式会社 | Image processing method, image processing apparatus, and image processing program |
JP4645413B2 (en) * | 2005-11-01 | 2011-03-09 | 株式会社ニコン | Imaging device |
-
2012
- 2012-07-20 JP JP2012161920A patent/JP6089476B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2014023057A (en) | 2014-02-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10567722B2 (en) | Image processing apparatus, image processing method, imaging apparatus, and recording medium | |
US7656437B2 (en) | Image processing apparatus, image processing method, and computer program | |
KR101263888B1 (en) | Image processing apparatus and image processing method as well as computer program | |
US8446488B2 (en) | Method and system for focal length-specific color enhancement | |
JP2004088149A (en) | Imaging system and image processing program | |
US8848098B2 (en) | Imaging apparatus, imaging method, and program | |
JP2009044367A (en) | Imaging method and imaging apparatus | |
JP2009027619A (en) | Video processing device and video processing program | |
US9756307B2 (en) | Image processing apparatus, image pickup apparatus and image processing program for correcting color blur | |
JP4523629B2 (en) | Imaging device | |
JP4959237B2 (en) | Imaging system and imaging program | |
JP5859061B2 (en) | Imaging apparatus, image processing apparatus, and control method thereof | |
JP5100615B2 (en) | Imaging device | |
US10270991B2 (en) | Image processing apparatus, image processing method, and computer-readable recording medium | |
JP5529424B2 (en) | Image processing apparatus, image processing method, and computer program | |
JP6089476B2 (en) | Image processing apparatus, imaging apparatus, and image processing program | |
JP5956844B2 (en) | Image processing apparatus and control method thereof | |
JP2007311962A (en) | Electronic camera and image display program | |
JP4764169B2 (en) | Lens position control device | |
JP2012095223A (en) | Imaging device, imaging method, and program | |
JP2011109411A (en) | Method and device for determining white balance correction coefficient, method and device for correcting white balance, and imaging apparatus | |
JP6011146B2 (en) | Image processing apparatus, imaging apparatus, and image processing program | |
JP6467824B2 (en) | Imaging device | |
JP2014130442A (en) | Image processing device, imaging device, and image processing program | |
JP7518624B2 (en) | Imaging device, control method thereof, program, and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20150609 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20160530 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20160628 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20160829 |
|
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: 20170110 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20170123 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6089476 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |