JP2014039100A - Image processing apparatus, imaging device, and image processing program - Google Patents

Image processing apparatus, imaging device, and image processing program Download PDF

Info

Publication number
JP2014039100A
JP2014039100A JP2012179352A JP2012179352A JP2014039100A JP 2014039100 A JP2014039100 A JP 2014039100A JP 2012179352 A JP2012179352 A JP 2012179352A JP 2012179352 A JP2012179352 A JP 2012179352A JP 2014039100 A JP2014039100 A JP 2014039100A
Authority
JP
Japan
Prior art keywords
image
subject
shadow
evaluation value
image processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2012179352A
Other languages
Japanese (ja)
Other versions
JP6011146B2 (en
Inventor
Itsuhito Hokoi
逸人 鉾井
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.)
Nikon Corp
Original Assignee
Nikon 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 Nikon Corp filed Critical Nikon Corp
Priority to JP2012179352A priority Critical patent/JP6011146B2/en
Publication of JP2014039100A publication Critical patent/JP2014039100A/en
Application granted granted Critical
Publication of JP6011146B2 publication Critical patent/JP6011146B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To perform proper extraction of a subject area even when an image of a processing object is influenced by a shadow.SOLUTION: An image processing apparatus includes: an acquisition unit that acquires image data of a processing object; an area detection unit that calculates a feature amount of an image indicated by the image data, and detects a subject area determined on the basis of the feature amount; an evaluation value calculation unit that calculates an evaluation value indicating an influence of a shadow in the image; and a control unit that determines a detection method of a subject area by the area detection unit on the basis of the evaluation value calculated by the evaluation value calculation unit.

Description

本発明は、画像処理装置、撮像装置、および画像処理プログラムに関する。   The present invention relates to an image processing device, an imaging device, and an image processing program.

従来、被写体抽出に関する様々な技術が考えられている。例えば、特許文献1の発明では、被写体形状の変化量に応じてAF測距枠を変形することにより、被写体がカメラ方向に移動する場合でも、被写体に対して最適に自動焦点調節する撮像装置が開示されている。   Conventionally, various techniques relating to subject extraction have been considered. For example, in the invention of Patent Document 1, an imaging device that automatically adjusts an automatic focus on a subject even when the subject moves in the camera direction by deforming an AF distance measurement frame according to the amount of change in the subject shape. It is disclosed.

特開2009−069748号公報JP 2009-069748 A

ところで、被写体抽出に際しては、処理対象の画像の撮影時の環境に起因して、被写体抽出に誤検出が起こる場合がある。例えば、晴天時の屋外等の状況において撮影された処理対象の画像に関して、影の部分が被写体領域として抽出されてしまう場合がある。本来、影は物体に付随するものであり、影自体が被写体領域として抽出されるのは好ましくない。   By the way, in subject extraction, erroneous detection may occur in subject extraction due to the environment at the time of capturing an image to be processed. For example, a shadow portion may be extracted as a subject area with respect to an image to be processed taken in a situation such as outdoors in fine weather. Originally, the shadow is attached to the object, and it is not preferable that the shadow itself is extracted as the subject area.

本発明は、前記の点に鑑みてなされたものであり、処理対象の画像に影の影響がある場合であっても、被写体領域の抽出を的確に行うことを目的とする。   The present invention has been made in view of the above points, and an object of the present invention is to accurately extract a subject area even when an image to be processed is affected by a shadow.

本発明の画像処理装置は、処理対象の画像データを取得する取得部と、前記画像データにより示される画像の特徴量を算出し、前記特徴量に基づいて定まる被写体領域を検出する領域検出部と、前記画像における影の影響を示す評価値を算出する評価値算出部と、前記評価値算出部により算出した前記評価値に基づいて、前記領域検出部による前記被写体領域の検出方法を決定する制御部とを備える。   An image processing apparatus according to the present invention includes an acquisition unit that acquires image data to be processed, an area detection unit that calculates a feature amount of an image indicated by the image data, and detects a subject region determined based on the feature amount; , An evaluation value calculation unit that calculates an evaluation value indicating the influence of a shadow in the image, and a control 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 A part.

なお、前記評価値算出部は、前記画像の明るさに関する情報と、コントラストに関する情報との少なくとも一方に基づいて、前記評価値を算出しても良い。   The evaluation value calculation unit may calculate the evaluation value based on at least one of information related to brightness of the image and information related to contrast.

また、前記領域検出部は、前記特徴量として、少なくとも輝度に関する特徴量を算出するとともに、前記輝度に関する特徴量に基づいて、少なくとも低輝度領域に基づく被写体領域を検出し、前記制御部は、前記評価値と所定の閾値とを比較することにより、前記影の影響が大きいか否かを判定し、前記影の影響が大きい場合には、前記低輝度領域に基づく被写体領域の検出方法を変更しても良い。   In addition, the area detection unit calculates at least a luminance-related feature amount as the feature amount, and detects a subject region based on at least a low-luminance region based on the luminance-related feature amount. By comparing the evaluation value with a predetermined threshold value, it is determined whether or not the influence of the shadow is large. If the influence of the shadow is large, the detection method of the subject area based on the low luminance area is changed. May be.

また、前記領域検出部は、前記輝度に関する特徴量と所定の閾値とを比較した結果が真となる画素の空間的連続領域に基づく被写体領域を検出し、前記制御部は、前記影の影響が大きい場合には、前記閾値を、前記影の影響が大きくない場合より小さく設定して、前記領域検出部による前記空間的連続領域に基づく被写体領域を検出し、前記制御部は、前記影の影響が大きい場合には、前記閾値を、前記影の影響が大きくない場合より小さく設定して、前記領域検出部による前記低輝度領域に基づく被写体領域の検出を行っても良い。   Further, the area detection unit detects a subject area based on a spatial continuous area of pixels in which the result of comparing the feature value related to the brightness with a predetermined threshold is true, and the control unit detects the influence of the shadow. If it is larger, the threshold is set smaller than the case where the influence of the shadow is not large, and the subject area based on the spatial continuous area is detected by the area detection unit, and the control unit detects the influence of the shadow When is large, the threshold value may be set smaller than when the influence of the shadow is not large, and the region detection unit may detect the subject region based on the low luminance region.

また、前記領域検出部は、前記特徴量として複数の特徴量を算出し、前記複数の特徴量に基づいて複数の被写体領域を検出し、前記制御部は、前記評価値に基づいて、前記複数の被写体領域に関する優先度を決定し、決定した前記優先度に基づいて主要被写体領域を決定しても良い。   Further, the area detection unit calculates a plurality of feature amounts as the feature amount, detects a plurality of subject regions based on the plurality of feature amounts, and the control unit determines the plurality of feature amounts based on the evaluation value. The priority for the subject area may be determined, and the main subject area may be determined based on the determined priority.

また、前記領域検出部は、前記特徴量として、少なくとも輝度に関する特徴量を算出するとともに、前記輝度に関する特徴量に基づいて、少なくとも低輝度領域に基づく被写体領域を検出し、前記制御部は、前記評価値と所定の閾値とを比較することにより、前記影の影響が大きいか否かを判定し、前記影の影響が大きい場合には、前記低輝度領域に基づく被写体領域に関する前記優先度を、前記影の影響が大きくない場合より低く設定して、前記主要被写体領域を決定しても良い。   In addition, the area detection unit calculates at least a luminance-related feature amount as the feature amount, and detects a subject region based on at least a low-luminance region based on the luminance-related feature amount. By comparing the evaluation value and a predetermined threshold, it is determined whether the influence of the shadow is large, and when the influence of the shadow is large, the priority regarding the subject area based on the low-luminance area is The main subject area may be determined by setting a lower value than when the influence of the shadow is not large.

また、前記領域検出部は、前記特徴量として、少なくとも輝度に関する特徴量を算出するとともに、前記輝度に関する特徴量に基づいて、少なくとも低輝度領域に基づく被写体領域を検出し、前記制御部は、前記評価値と所定の閾値とを比較することにより、前記影の影響が大きいか否かを判定し、前記影の影響が大きい場合には、前記低輝度領域に基づく被写体領域がその他の被写体領域と近接しているか否かをさらに判定し、前記前記低輝度領域に基づく被写体領域がその他の被写体領域と近接している場合には、前記低輝度領域に基づく被写体領域に関する前記優先度を、前記影の影響が大きくない場合より低く設定して、前記主要被写体領域を決定しても良い。   In addition, the area detection unit calculates at least a luminance-related feature amount as the feature amount, and detects a subject region based on at least a low-luminance region based on the luminance-related feature amount. By comparing the evaluation value with a predetermined threshold value, it is determined whether or not the influence of the shadow is large. When the influence of the shadow is large, the subject area based on the low-luminance area is different from other subject areas. It is further determined whether or not the subject area based on the low brightness area is close to other subject areas, and the priority regarding the subject area based on the low brightness area is set as the shadow. The main subject area may be determined by setting it lower than the case where the influence of is not large.

また、前記領域検出部は、前記特徴量として、少なくとも輝度に関する特徴量を算出するとともに、前記輝度に関する特徴量に基づいて、少なくとも低輝度領域に基づく被写体領域を含む複数の被写体領域を検出し、前記制御部は、前記評価値と所定の閾値とを比較することにより、前記影の影響が大きいか否かを判定し、前記影の影響が大きい場合には、前記低輝度領域に基づく被写体領域がその他の被写体領域と近接しているか否かをさらに判定し、前記前記低輝度領域に基づく被写体領域がその他の被写体領域と近接している場合には、前記領域検出部により検出した前記複数の被写体領域のうち、前記低輝度領域に基づく被写体領域を除く被写体領域の中から主要被写体領域を決定しても良い。   Further, the area detection unit calculates at least a luminance-related feature quantity as the feature quantity, and detects a plurality of subject areas including at least a subject area based on the low-luminance area based on the feature quantity related to the brightness, The control unit determines whether or not the influence of the shadow is large by comparing the evaluation value with a predetermined threshold, and when the influence of the shadow is large, the subject area based on the low luminance area Is further close to other subject areas, and when the subject area based on the low brightness area is close to other subject areas, the plurality of areas detected by the area detection unit Of the subject areas, the main subject area may be determined from the subject areas excluding the subject area based on the low luminance area.

また、前記制御部は、前記明るさが所定の基準より明るい場合か、前記明るさが所定の基準より明るく、かつ、前記コントラストが所定の基準より高い場合に、前記影の影響が大きいと判定しても良い。   The controller determines that the influence of the shadow is large when the brightness is brighter than a predetermined reference or when the brightness is brighter than a predetermined reference and the contrast is higher than a predetermined reference. You may do it.

本発明の撮像装置は、光学系による像を撮像して画像データを生成する撮像部と、前記画像データにより示される画像の特徴量を算出し、前記特徴量に基づいて定まる被写体領域を検出する領域検出部と、前記画像における影の影響を示す評価値を算出する評価値算出部と、前記評価値算出部により算出した前記評価値に基づいて、前記領域検出部による前記被写体領域の検出方法を決定する制御部とを備える。   An image pickup apparatus according to the present invention detects an object region determined based on an image pickup unit that picks up an image by an optical system and generates image data, calculates a feature amount of an image indicated by the image data, and An area detection unit; an evaluation value calculation unit that calculates an evaluation value indicating an influence of a shadow in the image; and a method of detecting the subject area by the region detection unit based on the evaluation value calculated by the evaluation value calculation unit And a control unit for determining.

なお、前記評価値算出部は、前記撮像部により生成した前記画像の明るさに関する情報と、前記画像のコントラストに関する情報と、前記撮像部における露光条件に関する情報と、測光情報との少なくとも一つに基づいて、前記評価値を算出しても良い。   The evaluation value calculation unit is at least one of information relating to the brightness of the image generated by the imaging unit, information relating to the contrast of the image, information relating to exposure conditions in the imaging unit, and photometric information. Based on this, the evaluation value may be calculated.

本発明の画像処理プログラムは、コンピュータに、処理対象の画像データを取得する取得手順と、前記画像データにより示される画像の特徴量を算出し、前記特徴量に基づいて定まる被写体領域を検出する領域検出手順と、前記画像における影の影響を示す評価値を算出する評価値算出手順と、前記評価値算出手順において算出した前記評価値に基づいて、前記領域検出手順における前記被写体領域の検出方法を決定する制御手順とを実行させる。   An image processing program according to the present invention is an area for detecting an object region determined based on an acquisition procedure for acquiring image data to be processed, a feature amount of an image indicated by the image data, and a computer. Based on a detection procedure, an evaluation value calculation procedure for calculating an evaluation value indicating the influence of a shadow in the image, and the evaluation value calculated in the evaluation value calculation procedure, a method for detecting the subject region in the region detection procedure is provided. The control procedure to be determined is executed.

本発明によれば、処理対象の画像に影の影響がある場合であっても、被写体領域の抽出を的確に行うことができる。   According to the present invention, it is possible to accurately extract a subject area even when an image to be processed is affected by a shadow.

レンズ鏡筒10と、撮像装置20と、記憶媒体40との構成を示すブロック図である。2 is a block diagram illustrating configurations of a lens barrel 10, an imaging device 20, and a storage medium 40. FIG. 自動検出モード実行時のCPU26の動作を示すフローチャートである。It is a flowchart which shows operation | movement of CPU26 at the time of automatic detection mode execution. 自動検出モード実行時のCPU26の動作を示す別のフローチャートである。It is another flowchart which shows operation | movement of CPU26 at the time of automatic detection mode execution. マスク抽出処理(I)について説明する図である。It is a figure explaining mask extraction processing (I). マスク抽出処理(I)について説明する別の図である。It is another figure explaining a mask extraction process (I). マスク抽出処理(I)について説明する別の図である。It is another figure explaining a mask extraction process (I). マスク抽出処理(I)について説明する別の図である。It is another figure explaining a mask extraction process (I). マスク抽出処理(II)について説明する図である。It is a figure explaining mask extraction processing (II). マスク抽出処理(II)について説明する別の図である。It is another figure explaining mask extraction processing (II).

以下、実施形態について図面を参照して詳細に説明する。   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 lens barrel 10, an imaging device 20, and a recording medium 40 as shown in FIG.

撮像装置20は、レンズ鏡筒10から入射される光学像を撮像する。得られた画像は静止画又は動画の画像として、記憶媒体40に記憶される。   The imaging device 20 captures an optical image incident from the lens barrel 10. The obtained image is stored in the storage medium 40 as a still image or a moving image.

レンズ鏡筒10は、焦点調整レンズ(以下、「AF(Auto Focus)レンズ」と称する)11と、レンズ駆動部12と、AFエンコーダ13と、鏡筒制御部14とを備える。なお、レンズ鏡筒10は、撮像装置20に着脱可能に接続されてもよいし、撮像装置20と一体であってもよい。   The lens barrel 10 includes a focus adjustment lens (hereinafter referred to as an “AF (Auto Focus) lens”) 11, a lens driving unit 12, an AF encoder 13, and a lens barrel control unit 14. The lens barrel 10 may be detachably connected to the imaging device 20 or may be integrated with the imaging device 20.

撮像装置20は、撮像部21と、画像処理装置22と、表示部23と、バッファメモリ部24と、記憶部25と、CPU26と、操作部27と、通信部28とを備える。撮像部21は、撮像素子29と、A/D(Analog/Digital)変換部30とを備える。撮像部21は、設定された撮像条件(例えば絞り値、露出値等)に従って、CPU26により制御される。   The imaging device 20 includes an imaging unit 21, an image processing device 22, a display unit 23, a buffer memory unit 24, a storage unit 25, a CPU 26, an operation unit 27, and a communication unit 28. The imaging unit 21 includes an imaging element 29 and an A / D (Analog / Digital) conversion unit 30. The imaging unit 21 is controlled by the CPU 26 in accordance with the set imaging conditions (for example, aperture value, exposure value, etc.).

レンズ鏡筒10において、AFレンズ11は、レンズ駆動部12により駆動され、撮像装置20の撮像素子29の受光面(光電変換面)に、光学像を導く。AFエンコーダ13は、AFレンズ11の移動を検出し、AFレンズ11の移動量に応じた信号を、鏡筒制御部14に出力する。ここで、AFレンズ11の移動量に応じた信号とは、例えば、AFレンズ11の移動量に応じて位相が変化するサイン(sin)波信号であってもよい。   In the lens barrel 10, the AF lens 11 is driven by the lens driving unit 12 and guides an optical image to the light receiving surface (photoelectric conversion surface) of the imaging element 29 of the imaging device 20. The AF encoder 13 detects the movement of the AF lens 11 and outputs a signal corresponding to the movement amount of the AF lens 11 to the lens barrel control unit 14. Here, the signal corresponding to the movement amount of the AF lens 11 may be, for example, a sine wave signal whose phase changes according to the movement amount of the AF lens 11.

鏡筒制御部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 barrel control unit 14 controls the lens driving unit 12 in accordance with a drive control signal input from the CPU 26 of the imaging device 20. Here, the drive control signal is a control signal for driving the AF lens 11 in the optical axis direction. The lens barrel control unit 14 changes, for example, the number of steps of the pulse voltage output to the lens driving unit 12 according to the drive control signal. Further, the lens barrel control unit 14 outputs the position (focus position) of the AF lens 11 in the lens barrel 10 to the CPU 26 of the imaging device 20 based on a signal corresponding to the movement amount of the AF lens 11. Here, the lens barrel control unit 14 integrates, for example, signals according to the movement amount of the AF lens 11 according to the movement direction of the AF lens 11, thereby moving the AF lens 11 in the lens barrel 10 ( Position) may be calculated. The lens driving unit 12 drives the AF lens 11 according to the control of the lens barrel control unit 14 and moves the AF lens 11 in the optical axis direction within the lens barrel 10.

撮像装置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 imaging device 20, the imaging element 29 includes a photoelectric conversion surface, converts an optical image formed on the photoelectric conversion surface by the lens barrel 10 (optical system) into an electric signal, and supplies the electric signal to the A / D conversion unit 30. Output. The imaging element 29 is configured by a photoelectric conversion element such as a CMOS (Complementary Metal Oxide Semiconductor), for example. Further, the image sensor 29 may convert an optical image into an electric signal for a partial region of the photoelectric conversion surface (image cutout). Further, the image sensor 29 outputs an image obtained when a photographing instruction from the user is received via the operation unit 27 to the storage medium 40 via the A / D conversion unit 30 and the communication unit 28. On the other hand, the image pickup device 29 converts the continuously obtained image into a through image and converts it into a buffer memory unit 24 and the display unit 23 in the state before accepting a shooting instruction from the user via the operation unit 27. The data is output via the unit 30.

A/D変換部30は、撮像素子29によって変換された電気信号をデジタル化して、デジタル信号である画像をバッファメモリ部24等に出力する。   The A / D conversion unit 30 digitizes the electrical signal converted by the image sensor 29 and outputs an image, which is a digital signal, to the buffer memory unit 24 and the like.

画像処理装置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 buffer memory unit 24 based on the image processing conditions stored in the storage unit 25. The image after image processing is stored in the storage medium 40 via the communication unit 28. Further, the image processing device 22 performs mask extraction processing on the image temporarily stored in the buffer memory unit 24 (details will be described later). The extracted mask information is output to the CPU 26 and stored in the storage unit 25, the storage medium 40, and the like.

表示部23は、例えば液晶ディスプレイであって、撮像部21によって生成された画像、及び操作画面等を表示する。バッファメモリ部24は、撮像部21によって生成された画像を一時的に記憶する。記憶部25は、撮像条件や、各種判定の際にCPU26によって参照される判定条件などを記憶する。   The display unit 23 is, for example, a liquid crystal display, and displays an image generated by the imaging unit 21, an operation screen, and the like. The buffer memory unit 24 temporarily stores the image generated by the imaging unit 21. The storage unit 25 stores imaging conditions, determination conditions referred to by the CPU 26 in various determinations, and the like.

CPU26は、画像処理部22や記憶部25などから適宜必要な情報を取得し、取得した情報に基づいて、撮像装置20内の各部を統括的に制御する。CPU26による制御には、焦点調整(AF)の設定、露出調整(AE)の設定、ホワイトバランス調整(AWB)の設定、閃光の発光量の変更の設定、被写体追尾の設定、各種撮影モードの設定、各種画像処理の設定、各種表示の設定、ズーム倍率に連動した明るさの最適化の設定などが含まれる。また、CPU26は、操作部27の操作状態を監視するとともに、表示部23への画像データの出力を行う。   The CPU 26 appropriately acquires necessary information from the image processing unit 22, the storage unit 25, and the like, and comprehensively controls each unit in the imaging device 20 based on the acquired information. Control by the CPU 26 includes focus adjustment (AF) setting, exposure adjustment (AE) setting, white balance adjustment (AWB) setting, flash emission amount change setting, subject tracking setting, and various shooting mode settings. , Various image processing settings, various display settings, brightness optimization settings linked to zoom magnification, and the like. In addition, the CPU 26 monitors the operation state of the operation unit 27 and outputs image data to the display unit 23.

操作部27は、例えば、電源スイッチ、シャッタボタン、マルチセレクタ(十字キー)、又はその他の操作キーを備え、ユーザによって操作されることでユーザの操作入力を受け付け、操作入力に応じた信号をCPU26に出力する。   The operation unit 27 includes, for example, a power switch, a shutter button, a multi-selector (cross key), or other operation keys. The operation unit 27 receives a user operation input when operated by the user, and outputs a signal corresponding to the operation input to the CPU 26. Output to.

通信部28は、カードメモリ等の取り外しが可能な記憶媒体40と接続され、この記憶媒体40への情報(画像データ、領域の情報など)の書込み、読み出し、あるいは消去を行う。   The communication unit 28 is connected to a removable storage medium 40 such as a card memory, and writes, reads, or deletes information (image data, area information, etc.) to the storage medium 40.

記憶媒体40は、撮像装置20に対して着脱可能に接続される記憶部であって、情報(画像データ、領域の情報など)を記憶する。なお、記憶媒体40は、撮像装置20と一体であってもよい。   The storage medium 40 is a storage unit that is detachably connected to the imaging device 20 and stores information (image data, area information, and the like). Note that the storage medium 40 may be integrated with the imaging device 20.

撮像装置20は、撮影時に、焦点調節情報に基づいて主要被写体領域を検出する通常モードの他に、自動で主要被写体領域を検出する自動検出モードを備える。自動検出モードは、構図確認用のスルー画像等に基づいて、主要被写体領域を自動で継続的に検出するモードである。この自動検出モードは操作部27を介したユーザ操作により設定可能であっても良いし、CPU26により自動で設定可能であっても良い。   The imaging device 20 includes an automatic detection mode for automatically detecting the main subject area in addition to the normal mode for detecting the main subject area based on the focus adjustment information at the time of shooting. The automatic detection mode is a mode for automatically and continuously detecting a main subject area based on a through image for composition confirmation. This automatic detection mode may be set by a user operation via the operation unit 27, or may be automatically set by the CPU.

以下、自動検出モード実行時のCPU26の動作について、図2のフローチャートを参照して説明する。   Hereinafter, the operation of the CPU 26 when the automatic detection mode is executed will be described with reference to the flowchart of FIG.

ステップS101において、CPU26は、被写界の測光を開始する。被写界の測光は公知技術と同様に行われる。例えば、CPU26は、撮像部21により生成されるスルー画像に基づいて測光を行っても良いし、不図示の測光センサの出力に基づいて測光を行っても良い。CPU26は、所定の時間間隔で測光を行い、取得される輝度値であるBV値を記憶部25に随時記録する。   In step S101, the CPU 26 starts photometry of the object scene. Metering of the object scene is performed in the same manner as in the known art. For example, the CPU 26 may perform photometry based on a through image generated by the imaging unit 21 or may perform photometry based on an output of a photometric sensor (not shown). The CPU 26 performs photometry at a predetermined time interval and records the acquired BV value, which is a luminance value, in the storage unit 25 as needed.

ステップS102において、CPU26は、コントラストの測定を開始する。コントラストの測定は公知技術と同様に行われる。例えば、CPU26は、撮像部21により生成されるスルー画像に基づいてコントラストの測定を行っても良いし、その他のセンサなどの出力に基づいてコントラストの測定を行っても良い。CPU26は、所定の時間間隔でコントラストを測定し、取得されるコントラスト値を記憶部25に随時記録する。   In step S102, the CPU 26 starts measuring the contrast. The contrast is measured in the same manner as in the known technique. For example, the CPU 26 may perform contrast measurement based on a through image generated by the imaging unit 21 or may perform contrast measurement based on an output from another sensor or the like. The CPU 26 measures the contrast at a predetermined time interval and records the acquired contrast value in the storage unit 25 as needed.

ステップS103において、CPU26は、撮像部21を制御して、スルー画像の取得を開始する。取得されたスルー画像の画像情報はバッファメモリ部24に一時的に記憶される。このスルー画像は、所定の時間間隔で連続して生成される。そして、CPU26によるスルー画像の取得は、時間的に連続して順次行われる。   In step S103, the CPU 26 controls the imaging unit 21 to start acquiring a through image. The acquired image information of the through image is temporarily stored in the buffer memory unit 24. This through image is continuously generated at a predetermined time interval. The acquisition of the through image by the CPU 26 is sequentially performed sequentially in time.

ステップS104において、CPU26は、画像処理装置22を制御して通常の画像処理を行う。通常の画像処理とは、ホワイトバランス調整、補間処理、色調補正処理、階調変換処理などである。各処理の具体的な方法は公知技術と同様であるため説明を省略する。画像処理装置22は、バッファメモリ部24から対象となる画像の画像データを取得し、画像処理を施した後に、再びバッファメモリ部24に出力する。   In step S104, the CPU 26 controls the image processing device 22 to perform normal image processing. Normal image processing includes white balance adjustment, interpolation processing, color tone correction processing, gradation conversion processing, and the like. Since the specific method of each process is the same as that of a well-known technique, description is abbreviate | omitted. The image processing device 22 acquires the image data of the target image from the buffer memory unit 24, performs image processing, and then outputs the image data to the buffer memory unit 24 again.

ステップS105において、CPU26は、影の影響があるか否かを判定する。CPU26は、影の影響があると判定すると後述するステップS107に進む。一方、影の影響がないと判定すると、CPU26は、ステップS106に進む。   In step S105, the CPU 26 determines whether there is an influence of a shadow. If the CPU 26 determines that there is an influence of a shadow, it proceeds to step S107 described later. On the other hand, when determining that there is no influence of the shadow, the CPU 26 proceeds to step S106.

影の影響があるか否かの判定は、ステップS101で開始した測光の結果と、ステップS102で開始したコントラストの測定の結果との少なくとも一方に基づいて行われる。   The determination as to whether there is an influence of a shadow is made based on at least one of the result of photometry started in step S101 and the result of contrast measurement started in step S102.

影の影響がある場合とは、晴天時の屋外等の状況において撮影が行われる場合や、屋内のスタジオなどにおいて、特殊な照明が被写体に照射される場合などである。このような場合には、処理対象の画像に関して、影の部分が被写体領域として抽出されてしまう可能性がある。CPU26は、ステップS101で開始した測光の結果と、ステップS102で開始したコントラストの測定の結果との少なくとも一方に基づいて、被写界の明るさや、被写界のシーンなどを解析することにより、影の影響があるか否かの判定を行う。   The case where there is an influence of a shadow is a case where shooting is performed in a situation such as outdoors in a fine weather, or a case where a subject is irradiated with special illumination in an indoor studio or the like. In such a case, there is a possibility that a shadow portion is extracted as a subject area in the image to be processed. The CPU 26 analyzes the brightness of the object scene, the scene of the object scene, and the like based on at least one of the photometry result started in step S101 and the contrast measurement result started in step S102. It is determined whether or not there is an influence of a shadow.

具体的には、例えば、BV値が所定の閾値よりも大きい(つまり、明るい)場合に影の影響があると判定しても良いし、BV値が所定の閾値よりも大きく、かつ、コントラスト値が所定の閾値よりも大きい(つまり、コントラストが高い)場合に影の影響があると判定しても良い。また、ステップS101で開始した測光の結果と、ステップS102で開始したコントラストの測定の結果との少なくとも一方に基づいて、影の影響を示す評価値を算出し、その評価値と所定の閾値とを比較することにより、影の影響があるか否かの判定を行っても良い。   Specifically, for example, it may be determined that there is an influence of a shadow when the BV value is larger than a predetermined threshold (that is, bright), the BV value is larger than the predetermined threshold, and the contrast value May be determined to have an influence of a shadow when the value is larger than a predetermined threshold (that is, the contrast is high). Further, an evaluation value indicating the influence of the shadow is calculated based on at least one of the photometry result started in step S101 and the contrast measurement result started in step S102, and the evaluation value and a predetermined threshold value are calculated. By comparing, it may be determined whether there is an influence of a shadow.

ステップS106において、CPU26は、画像処理装置22を制御してマスク抽出処理(I)を行う。マスク抽出処理とは、画像における特徴量を算出し、特徴量に基づいて被写体領域を検出するための一手法である。例えば、画像における特徴量を求め、同様の特徴量を有する連続領域を求めることによりマスク抽出を行う。また、マスク抽出処理(I)とは、影の影響がない、一般的な画像を対象とした通常のマスク抽出処理である。   In step S106, the CPU 26 controls the image processing device 22 to perform mask extraction processing (I). The mask extraction process is a technique for calculating a feature amount in an image and detecting a subject area based on the feature amount. For example, the feature extraction in the image is obtained, and the mask extraction is performed by obtaining a continuous region having the same feature quantity. The mask extraction process (I) is a normal mask extraction process for a general image that is not affected by a shadow.

マスク抽出処理(I)について図3〜図7の模式図を参照して説明する。   The mask extraction process (I) will be described with reference to the schematic diagrams of FIGS.

画像処理装置22は、ステップS104で通常の画像処理を施した画像をバッファメモリ部24から読み出し、適宜リサイズ処理および色空間変換処理を行い、YUV(例えば、YCbCr)画像を生成する。次に、画像処理装置22は、生成したYUV画像のY画像、Cb画像およびCr画像のそれぞれに基づいて、マスク画像を作成する。   The image processing device 22 reads out the image that has been subjected to the normal image processing in step S104 from the buffer memory unit 24, appropriately performs resizing processing and color space conversion processing, and generates a YUV (for example, YCbCr) image. Next, the image processing device 22 creates a mask image based on each of the Y image, Cb image, and Cr image of the generated YUV image.

画像処理装置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画像から3種類の純色マスクを作成する。純色マスクとは、任意の一定の領域を有する「絶対的に純度の高い被写体」を抽出したマスクである。純色マスクの作成は、公知技術と同様に行われるため説明を省略する。画像処理装置22は、図6に示すように、Cb画像およびCr画像から、純色赤マスクM[R]、純色黄マスクM[Ye]、純色紫マスクM[P]の各純色マスクを作成する。   Further, as shown in FIG. 6, the image processing apparatus 22 creates three types of pure color masks 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, the description thereof is omitted. As shown in FIG. 6, the image processing apparatus 22 creates pure color masks of a pure color red mask M [R], a pure color yellow mask M [Ye], and a pure color purple mask M [P] from the Cb image and the Cr image. .

以上説明した処理により、画像処理装置22は、図3に示した1種類のマスク(中心マスクM[a])と、図4に示した3種類の輝度マスクと、図5に示した6種類の色マスクと、図6に示した3種類の純色マスクの合計13種類のマスクを作成する。   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 13 types of masks are prepared, including the color masks shown in FIG. 6 and three types of pure color masks shown in FIG.

次に、画像処理装置22は、作成した13種類のマスクに対して、不要なマスクを排除し、残ったマスクについて、優先度を決定する。優先度とは、13種類のマスクから、実際に被写体領域の抽出に用いるマスクを決定する際の優先度合を示す。   Next, the image processing apparatus 22 excludes unnecessary masks from the created 13 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 13 types of masks.

一般的な画像を対象とした通常のマスク抽出処理であるマスク抽出処理(I)においては、例えば、図7に示すように、3段階の優先度が予め定められる。優先度1位は、3種類の純色マスクであり、優先度2位は、色マスクのうちCb青側マスクM[Cb1] およびCb黄側マスクM[Cb3]であり、優先度3位はその他のマスクである。なお、図7に示す優先度は一例であり、複数段階であれば何段階であっても良い。また、図7における各マスクの各優先度への振り分けは一例である。図7に示すように、優先度は、色情報に関するマスクの優先度が相対的に高く決定されている。そして、画像処理装置22は、これらの優先度に応じて、優先度の高い各マスクを優先しつつ、一定評価値以上のマスクを求め、被写体領域を抽出するためのマスクとする。なお、被写体領域を抽出するためのマスクを選択する方法は、公知技術などどのような方法であっても良い。最後に、画像処理装置22は、選択したマスクに基づいて被写体領域を抽出し、後述するステップS108に進む。   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 three kinds of pure color masks, the second priority is the Cb blue side mask M [Cb1] and the Cb yellow side mask M [Cb3] of the color masks, and the third priority is others. It is a mask. 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. 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 S108 described later.

ステップS107において、CPU26は、画像処理装置22を制御してマスク抽出処理(II)を行う。マスク抽出処理(II)とは、影の影響がある画像を対象としたマスク抽出処理である。CPU26は、画像処理装置22を制御して、マスク抽出処理(II)において、以下の(a)〜(c)の少なくとも1つの処理を行う。以下では、ステップS106で説明したマスク抽出処理(I)との相違点についてのみ説明する。   In step S107, the CPU 26 controls the image processing device 22 to perform mask extraction processing (II). The mask extraction process (II) is a mask extraction process for an image affected by a shadow. The CPU 26 controls the image processing device 22 to perform at least one of the following (a) to (c) in the mask extraction process (II). Only differences from the mask extraction process (I) described in step S106 will be described below.

(a)YシャドーマスクM[Y3]の作成方法の変更。   (A) Change in the method of creating the Y shadow mask M [Y3].

画像処理装置22は、ステップS106で説明した13種類のマスクを作成する。ただし、画像処理装置22は、図3で説明したYシャドーマスクM[Y3]を作成する際に、マスク抽出処理(I)とは条件を変える。マスク抽出処理(II)は、上述したように、影の影響がある画像を対象としたマスク抽出処理である。YシャドーマスクM[Y3]は、低輝度領域(所定の閾値と比較した結果が真となる画素の空間的連続領域)に基づく被写体領域を検出するマスクであり、影の部分を被写体領域として検出してしまう可能性が高いマスクである。したがって、YシャドーマスクM[Y3]が影を検出するのを防ぎ、色としての黒側を抽出するようにYシャドーマスクM[Y3]の作成方法を変更する。   The image processing apparatus 22 creates the 13 types of masks described in step S106. However, the image processing apparatus 22 changes the conditions from the mask extraction process (I) when creating the Y shadow mask M [Y3] described in FIG. As described above, the mask extraction process (II) is a mask extraction process for an image affected by a shadow. The Y shadow mask M [Y3] is a mask for detecting a subject area based on a low-brightness area (a spatial continuous area of pixels for which a result compared with a predetermined threshold is true), and detects a shadow portion as a subject area. It is a mask that has a high possibility of being done. Therefore, the method of creating the Y shadow mask M [Y3] is changed so as to prevent the Y shadow mask M [Y3] from detecting a shadow and to extract the black side as the color.

マスク抽出処理(II)においては、図4に示したYシャドー2値化画像を生成する際の閾値をマスク抽出処理(I)の場合よりも小さく設定する。すなわち、マスク抽出処理(I)の場合と比較して、閾値をシャドー側にシフトすることにより、薄い影の部分を拾い難くし、黒い物体のみを拾うことができるようにする。なお、閾値の設定を、影の影響の度合に応じて変更しても良い。すなわち、影の影響が大きくなるほど、上述した閾値が小さくなるように、段階的な設定を行っても良い。また、上述した閾値を小さく設定する代わりに、上述した閾値を、より小さい値である所定の第2の閾値に変更する構成としても良い。   In the mask extraction process (II), a threshold for generating the Y shadow binary image shown in FIG. 4 is set smaller than that in the mask extraction process (I). That is, as compared with the case of the mask extraction process (I), by shifting the threshold value to the shadow side, it becomes difficult to pick up a thin shadow part and only a black object can be picked up. Note that the threshold setting may be changed according to the degree of influence of the shadow. That is, the stepwise setting may be performed so that the above-described threshold value decreases as the influence of the shadow increases. Moreover, it is good also as a structure which changes the threshold value mentioned above to the predetermined | prescribed 2nd threshold value which is a smaller value instead of setting the threshold value mentioned above small.

(b)YシャドーマスクM[Y3]の優先度の変更。   (B) Changing the priority of the Y shadow mask M [Y3].

画像処理装置22は、ステップS106で説明した13種類のマスクを作成する。ただし、画像処理装置22は、ステップS106とは異なり、YシャドーマスクM[Y3]の優先度を、マスク抽出処理(I)の場合よりも低くする(下げる)。例えば、図7で説明した優先度3位よりも下の優先度4位とする。このように優先度を決定するのは、対象画像が影の影響がある画像であることを鑑みたことによるものであり、YシャドーマスクM[Y3]により、影の部分を被写体領域として検出してしまう可能性を抑えるためである。そして、画像処理装置22は、ステップS106と同様に、優先度の高い各マスクを優先しつつ、一定評価値以上のマスクを求め、被写体領域を抽出するためのマスクとして選択する。   The image processing apparatus 22 creates the 13 types of masks described in step S106. However, unlike step S106, the image processing device 22 makes the priority of the Y shadow mask M [Y3] lower (lower) than in the mask extraction process (I). For example, the priority is 4th lower than the 3rd priority described with reference to FIG. The priority is determined in consideration of the fact that the target image is an image having an influence of a shadow, and a shadow portion is detected as a subject area by the Y shadow mask M [Y3]. This is to suppress the possibility of being lost. Then, as in step S106, 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.

(c)YシャドーマスクM[Y3]とその他のマスクとの相対位置に基づく変更。   (C) Change based on the relative position of the Y shadow mask M [Y3] and other masks.

画像処理装置22は、ステップS106で説明した13種類のマスクを作成する。その後、画像処理装置22は、YシャドーマスクM[Y3]とその他のマスクとの相対位置を確認する。   The image processing apparatus 22 creates the 13 types of masks described in step S106. Thereafter, the image processing apparatus 22 confirms the relative positions of the Y shadow mask M [Y3] and other masks.

対象画像が図8に示す画像である場合を例に挙げて説明する。図8の例では、主要被写体である猫T1と、猫の影T2とが含まれる。この画像に対して作成した13種類のマスクの例を図9に示す。図9に示すように、YシャドーマスクM[Y3]においては、影T2の部分が抽出されている。そこで、まず、画像処理装置22は、YシャドーマスクM[Y3]とその他のマスクとの相対位置を確認する。図9の各マスク中の点線は、YシャドーマスクM[Y3]により抽出された領域に対応する領域を示す。図9の例では、Cb黄側マスクM[Cb3]、Cr赤側マスクM[Cr1]、Cr中間マスクM[Cr2]の3種類のマスクが、YシャドーマスクM[Y3]と近接している。なお、YシャドーマスクM[Y3]とその他のマスクとが近接しているか否かは、双方のマスクのエッジ間の最近接距離が所定の画素数内であるか(例えば、2画素以内であるか)否かによって判定される。このような場合に、画像処理装置22は、YシャドーマスクM[Y3]を以降の処理から除外する。すなわち、ステップS106で説明した13種類のマスクのうち、YシャドーマスクM[Y3]を除く12種類のマスクから、上述した被写体領域を抽出するためのマスクを選択する。   The case where the target image is the image shown in FIG. 8 will be described as an example. In the example of FIG. 8, a cat T1 that is a main subject and a cat shadow T2 are included. Examples of 13 types of masks created for this image are shown in FIG. As shown in FIG. 9, the shadow T2 is extracted from the Y shadow mask M [Y3]. Therefore, first, the image processing apparatus 22 confirms the relative positions of the Y shadow mask M [Y3] and other masks. A dotted line in each mask in FIG. 9 indicates a region corresponding to the region extracted by the Y shadow mask M [Y3]. In the example of FIG. 9, three types of masks, that is, a Cb yellow side mask M [Cb3], a Cr red side mask M [Cr1], and a Cr intermediate mask M [Cr2] are close to the Y shadow mask M [Y3]. . Whether or not the Y shadow mask M [Y3] and the other masks are close to each other is based on whether the closest distance between the edges of both masks is within a predetermined number of pixels (for example, within two pixels). It is determined by whether or not. In such a case, the image processing apparatus 22 excludes the Y shadow mask M [Y3] from the subsequent processing. That is, a mask for extracting the above-described subject region is selected from 12 types of masks excluding the Y shadow mask M [Y3] among the 13 types of masks described in step S106.

なお、YシャドーマスクM[Y3]とその他のマスクとの相対位置に基づいて、さらにマスクを除外しても良い。図9の例において、例えば、YシャドーマスクM[Y3]に内包されるか、あるいは、YシャドーマスクM[Y3]とほぼ重複しているマスクであるCb青側マスクM[Cb1]、Cb中間マスクM[Cb2]、Cr緑側マスクM[Cr3]、中心マスクM[a]の5種類のマスクを、上述したYシャドーマスクM[Y3]と同様に、以降の処理から除外しても良い。   The mask may be further excluded based on the relative position between the Y shadow mask M [Y3] and the other masks. In the example of FIG. 9, for example, a Cb blue mask M [Cb1], a Cb intermediate that is included in the Y shadow mask M [Y3] or substantially overlaps with the Y shadow mask M [Y3]. The five types of masks M [Cb2], Cr green side mask M [Cr3], and center mask M [a] may be excluded from the subsequent processes in the same manner as the Y shadow mask M [Y3] described above. .

このように一部のマスクを除外するのは、対象画像が影の影響がある画像であることを鑑みたことによるものであり、影の影響が大きく出ると考えられるマスクを除外することにより、影の部分を被写体領域として検出してしまうことを防ぐためである。そして、画像処理装置22は、ステップS106と同様に、優先度の高い各マスクを優先しつつ、一定評価値以上のマスクを求め、被写体領域を抽出するためのマスクとして選択する。   The reason why some masks are excluded in this way is that the target image is an image having an influence of a shadow, and by excluding a mask that is considered to have a large influence of a shadow, This is to prevent the shadow portion from being detected as the subject area. Then, as in step S106, 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.

さらに、YシャドーマスクM[Y3]とその他のマスクとの相対位置に基づいて、優先度を変更しても良い。例えば、YシャドーマスクM[Y3]とその他のマスクとが近接している場合には、上述した(2)のケースと同様に、YシャドーマスクM[Y3]の優先度を、マスク抽出処理(I)の場合よりも低くしても良い。また、YシャドーマスクM[Y3]とほぼ重複しているマスクであるCb青側マスクM[Cb1]、Cb中間マスクM[Cb2]、Cr緑側マスクM[Cr3]、中心マスクM[a]の5種類のマスクについても、優先度を、マスク抽出処理(I)の場合よりも相対的に低くしても良い。   Furthermore, the priority may be changed based on the relative position between the Y shadow mask M [Y3] and the other masks. For example, when the Y shadow mask M [Y3] and other masks are close to each other, the priority of the Y shadow mask M [Y3] is set to the mask extraction process (as in the case (2) described above). It may be lower than in the case of I). In addition, the Cb blue mask M [Cb1], the Cb intermediate mask M [Cb2], the Cr green mask M [Cr3], and the center mask M [a] which are substantially overlapping with the Y shadow mask M [Y3]. Also for these five types of masks, the priority may be relatively lower than in the mask extraction process (I).

なお、ステップS106およびステップS107で説明した各マスク抽出処理において、画像処理装置22は、1つの被写体領域のみ抽出しても良いし、複数の被写体領域を抽出しても良い。また、ステップS107で説明したマスク抽出処理(II)における変更点は一例である。いずれにせよ、対象画像が影の影響がある画像であるか否かに応じて、マスクの作成方法や、被写体領域を抽出するためのマスクの選択方法を変更すれば良い。さらに、例えば、上述した影の影響の度合に応じて、より細かく上記の点を変更しても良い。   In each mask extraction process described in step S106 and step S107, the image processing apparatus 22 may extract only one subject area or a plurality of subject areas. The change in the mask extraction process (II) described in step S107 is an example. In any case, the mask creation method and the mask selection method for extracting the subject region may be changed depending on whether the target image is an image having an influence of a shadow. Further, for example, the above points may be changed more finely according to the degree of the influence of the shadow described above.

ステップS108において、CPU26は、ステップSS106またはステップS107のマスク抽出処理の結果を、被写体情報としてバッファメモリ部24や記憶部25等に記録する。被写体情報には、マスク抽出処理の抽出条件(色区分やマスク区分など)、マスクの位置、マスクの大きさや形状、抽出した被写体領域の位置、被写体領域の大きさや形状などの情報が含まれる。   In step S108, the CPU 26 records the result of the mask extraction process in step SS106 or step S107 as subject information in the buffer memory unit 24, the storage unit 25, or the like. The subject information includes information such as the extraction conditions (color classification, mask classification, etc.) of the mask extraction process, the position of the mask, the size and shape of the mask, the position of the extracted subject area, and the size and shape of the subject area.

ステップS109において、CPU26は、撮影指示が行われたか否かを判定する。CPU26は、撮影指示が行われたと判定するとステップS110に進む。一方、撮影指示が行われないと判定すると、CPU26は、ステップS104に戻り、次のフレームの画像に対してステップS104以降の処理を行う。撮影指示は、操作部27のシャッタボタンを介したユーザ操作により行われる。   In step S109, the CPU 26 determines whether or not a shooting instruction has been issued. If the CPU 26 determines that a shooting instruction has been given, the process proceeds to step S110. On the other hand, if it is determined that the shooting instruction is not performed, the CPU 26 returns to step S104 and performs the processing from step S104 on the image of the next frame. The shooting instruction is given by a user operation via the shutter button of the operation unit 27.

ステップS110において、CPU26は、各部を制御して撮影を実行する。このとき、CPU26は、ステップS108で記録した被写体情報に基づいて撮影を行う。CPU26は、ステップS108で記録した被写体情報に基づいて、焦点調整(AF)の設定処理、露出調整(AE)の設定処理、ホワイトバランス調整処理(AWB)の3A処理を行うとともに、画像処理装置22における各種画像処理の条件等を決定する。   In step S110, the CPU 26 controls each unit to perform shooting. At this time, the CPU 26 performs shooting based on the subject information recorded in step S108. The CPU 26 performs 3A processing of focus adjustment (AF) setting processing, exposure adjustment (AE) setting processing, and white balance adjustment processing (AWB) based on the subject information recorded in step S108, and the image processing device 22. The conditions of various image processing in are determined.

なお、焦点調整(AF)の設定処理において、CPU26は、抽出した被写体領域を整形し、コントラストスキャンを実行する。そして、CPU26は、コントラストスキャンの結果に基づいて、AFレンズ11により合焦させる(合焦駆動)。   In the focus adjustment (AF) setting process, the CPU 26 shapes the extracted subject area and executes a contrast scan. Then, the CPU 26 causes the AF lens 11 to focus based on the result of the contrast scan (focus drive).

また、マスク抽出処理および被写体情報の記録が完了していない状態で撮影指示が行われてしまった場合には、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 CPU 26 performs normal 3A processing and performs shooting based on the result of this 3A processing. do it. Alternatively, reception of user operations relating to shooting instructions may be prohibited until mask extraction processing and recording of subject information are completed.

ステップS111において、CPU26は、撮像により生成した画像を、通信部28を介して記憶媒体40に記録して一連の処理を終了する。   In step S <b> 111, the CPU 26 records an image generated by imaging on the storage medium 40 via the communication unit 28 and ends a series of processes.

以上説明したように、本実施形態によれば、処理対象の画像データを取得し、画像データにより示される画像の特徴量を算出し、特徴量に基づいて定まる被写体領域を検出する。さらに、取得した画像における影の影響を示す評価値を算出し、算出した評価値に基づいて、被写体領域の検出方法を決定する。したがって、処理対象の画像に影の影響がある場合であっても、影の領域を誤認識することなく、被写体領域の抽出を的確に行うことができる。   As described above, according to the present embodiment, the image data to be processed is acquired, the feature amount of the image indicated by the image data is calculated, and the subject region determined based on the feature amount is detected. Further, an evaluation value indicating the influence of the shadow in the acquired image is calculated, and a subject area detection method is determined based on the calculated evaluation value. Therefore, even if the image to be processed is affected by a shadow, the subject area can be accurately extracted without erroneously recognizing the shadow area.

特に、構図確認用のスルー画像については、一般に表示時間が長くなるため、このような工夫が大きな効果を発揮することとなる。   In particular, for a through image for composition confirmation, since the display time generally increases, such a device has a great effect.

以上、この発明の実施形態について図面を参照して詳述してきたが、具体的な構成はこの実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の設計等も含まれる。   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.

上記実施形態では、処理対象の画像に影の影響があるか否かに応じて、被写体領域の検出方法を決定する例を示したが、本発明はこの例に限定されない。例えば、操作部27を介したユーザ操作に基づいて、影の影響がある場合の処理(マスク抽出処理(II))を実行しても良い。また、風景モードや夜景モードなど、シーンに応じて撮影条件等が予め設定されるいわゆるシーンモードの種類に応じて、影の影響がある場合の処理(マスク抽出処理(II))を実行しても良い。   In the above-described embodiment, an example in which the detection method of the subject area is determined according to whether or not the image to be processed has an influence of a shadow has been described, but the present invention is not limited to this example. For example, a process (mask extraction process (II)) when there is an influence of a shadow may be executed based on a user operation via the operation unit 27. Also, depending on the type of so-called scene mode in which shooting conditions etc. are preset according to the scene, such as landscape mode and night view mode, a process (mask extraction process (II)) when there is an influence of shadow is executed. Also good.

また、上記の実施形態において、図2のステップS101において測光を開始した時に、BV値の変化が大きく、不安定である場合には、ステップS104以降の処理のうち、特にステップS105における判定処理が正しく行えない場合がある。そこで、ステップS101において測光を開始した後にBV値を監視し、BV値がある程度安定したことを確認してからステップS104以降の処理を行う構成としても良い。   In the above embodiment, when the photometry is started in step S101 in FIG. 2, if the change in BV value is large and unstable, the determination process in step S105 among the processes in and after step S104 is performed. It may not be performed correctly. Therefore, the configuration may be such that the BV value is monitored after the photometry is started in step S101, and the processing after step S104 is performed after confirming that the BV value has stabilized to some extent.

また、上記の実施形態においては、構図確認用のスルー画像に基づいて、一連の処理を行う例を示したが、本発明はこの例に限定されない。例えば、一眼レフカメラなどにおいて生成される構図確認用のライブビュー画像を対象とする場合にも、本発明を同様に適用することができる。また、記録媒体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 recording medium 40 or the like is targeted.

また、上記の実施形態においては、すべてのフレームを対象として一連の処理を行う例を示したが、本発明はこの例に限定されない。例えば、時間的に間欠して生成された複数の画像を対象としても良い。具体的には、適宜フレーム間引きを行った複数の画像を対象としても良い。このような処理を行うことにより、処理負荷を軽減することができる。   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 intermittently 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のステップS104からステップS108の処理の一部または全部をコンピュータで実行しても良い。このような構成とすることにより、上述した実施形態と同様の処理を実施することが可能になる。この場合、コンピュータにより、処理対象の画像とともに、実施形態で用いたBV値やコントラスト値などを取得する構成としても良い。   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 S104 to step S108 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. In this case, the computer may acquire the BV value and contrast value used in the embodiment together with the image to be processed.

また、「コンピュータシステム」は、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 SYMBOLS 20 ... Imaging device, 21 ... Imaging part, 22 ... Image processing apparatus, 23 ... Display part, 26 ... CPU

Claims (12)

処理対象の画像データを取得する取得部と、
前記画像データにより示される画像の特徴量を算出し、前記特徴量に基づいて定まる被写体領域を検出する領域検出部と、
前記画像における影の影響を示す評価値を算出する評価値算出部と、
前記評価値算出部により算出した前記評価値に基づいて、前記領域検出部による前記被写体領域の検出方法を決定する制御部と
を備えることを特徴とする画像処理装置。
An acquisition unit for acquiring image data to be processed;
A region detecting unit that calculates a feature amount of an image indicated by the image data and detects a subject region determined based on the feature amount;
An evaluation value calculation unit for calculating an evaluation value indicating an influence of a shadow in the image;
An image processing apparatus comprising: 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.
請求項1に記載の画像処理装置において、
前記評価値算出部は、前記画像の明るさに関する情報と、コントラストに関する情報との少なくとも一方に基づいて、前記評価値を算出する
ことを特徴とする画像処理装置。
The image processing apparatus according to claim 1.
The image processing apparatus, wherein the evaluation value calculation unit calculates the evaluation value based on at least one of information relating to brightness of the image and information relating to contrast.
請求項1または請求項2に記載の画像処理装置において、
前記領域検出部は、前記特徴量として、少なくとも輝度に関する特徴量を算出するとともに、前記輝度に関する特徴量に基づいて、少なくとも低輝度領域に基づく被写体領域を検出し、
前記制御部は、前記評価値と所定の閾値とを比較することにより、前記影の影響が大きいか否かを判定し、前記影の影響が大きい場合には、前記低輝度領域に基づく被写体領域の検出方法を変更する
ことを特徴とする画像処理装置。
The image processing apparatus according to claim 1 or 2,
The region detection unit calculates at least a feature amount related to luminance as the feature amount, and detects a subject region based on at least a low luminance region based on the feature amount related to luminance.
The control unit determines whether or not the influence of the shadow is large by comparing the evaluation value with a predetermined threshold, and when the influence of the shadow is large, the subject area based on the low luminance area An image processing apparatus characterized by changing a detection method.
請求項3に記載の画像処理装置において、
前記領域検出部は、前記輝度に関する特徴量と所定の閾値とを比較した結果が真となる画素の空間的連続領域に基づく被写体領域を検出し、
前記制御部は、前記影の影響が大きい場合には、前記閾値を、前記影の影響が大きくない場合より小さく設定して、前記領域検出部による前記空間的連続領域に基づく被写体領域の検出を行う
ことを特徴とする画像処理装置。
The image processing apparatus according to claim 3.
The region detection unit detects a subject region based on a spatial continuous region of pixels in which the result of comparing the feature value related to the luminance and a predetermined threshold is true,
When the influence of the shadow is large, the control unit sets the threshold value to be smaller than that when the influence of the shadow is not large, and the area detection unit detects the subject area based on the spatial continuous area. An image processing device characterized in that:
請求項1から請求項4の何れか1項に記載の画像処理装置において、
前記領域検出部は、前記特徴量として複数の特徴量を算出し、前記複数の特徴量に基づいて複数の被写体領域を検出し、
前記制御部は、前記評価値に基づいて、前記複数の被写体領域に関する優先度を決定し、決定した前記優先度に基づいて主要被写体領域を決定する
ことを特徴とする画像処理装置。
The image processing apparatus according to any one of claims 1 to 4,
The region detection unit calculates a plurality of feature amounts as the feature amount, detects a plurality of subject regions based on the plurality of feature amounts,
The image processing apparatus, wherein the control unit determines priorities regarding the plurality of subject regions based on the evaluation values, and determines a main subject region based on the determined priorities.
請求項5に記載の画像処理装置において、
前記領域検出部は、前記特徴量として、少なくとも輝度に関する特徴量を算出するとともに、前記輝度に関する特徴量に基づいて、少なくとも低輝度領域に基づく被写体領域を検出し、
前記制御部は、前記評価値と所定の閾値とを比較することにより、前記影の影響が大きいか否かを判定し、前記影の影響が大きい場合には、前記低輝度領域に基づく被写体領域に関する前記優先度を、前記影の影響が大きくない場合より低く設定して、前記主要被写体領域を決定する
ことを特徴とする画像処理装置。
The image processing apparatus according to claim 5.
The region detection unit calculates at least a feature amount related to luminance as the feature amount, and detects a subject region based on at least a low luminance region based on the feature amount related to luminance.
The control unit determines whether or not the influence of the shadow is large by comparing the evaluation value with a predetermined threshold, and when the influence of the shadow is large, the subject area based on the low luminance area The image processing apparatus is characterized in that the main subject area is determined by setting the priority of the image to be lower than when the influence of the shadow is not large.
請求項5に記載の画像処理装置において、
前記領域検出部は、前記特徴量として、少なくとも輝度に関する特徴量を算出するとともに、前記輝度に関する特徴量に基づいて、少なくとも低輝度領域に基づく被写体領域を検出し、
前記制御部は、前記評価値と所定の閾値とを比較することにより、前記影の影響が大きいか否かを判定し、前記影の影響が大きい場合には、前記低輝度領域に基づく被写体領域がその他の被写体領域と近接しているか否かをさらに判定し、前記前記低輝度領域に基づく被写体領域がその他の被写体領域と近接している場合には、前記低輝度領域に基づく被写体領域に関する前記優先度を、前記影の影響が大きくない場合より低く設定して、前記主要被写体領域を決定する
ことを特徴とする画像処理装置。
The image processing apparatus according to claim 5.
The region detection unit calculates at least a feature amount related to luminance as the feature amount, and detects a subject region based on at least a low luminance region based on the feature amount related to luminance.
The control unit determines whether or not the influence of the shadow is large by comparing the evaluation value with a predetermined threshold, and when the influence of the shadow is large, the subject area based on the low luminance area Is further close to other subject areas, and when the subject area based on the low brightness area is close to other subject areas, the subject area based on the low brightness area An image processing apparatus, wherein a priority is set lower than when the influence of the shadow is not large, and the main subject area is determined.
請求項1から請求項4の何れか1項に記載の画像処理装置において、
前記領域検出部は、前記特徴量として、少なくとも輝度に関する特徴量を算出するとともに、前記輝度に関する特徴量に基づいて、少なくとも低輝度領域に基づく被写体領域を含む複数の被写体領域を検出し、
前記制御部は、前記評価値と所定の閾値とを比較することにより、前記影の影響が大きいか否かを判定し、前記影の影響が大きい場合には、前記低輝度領域に基づく被写体領域がその他の被写体領域と近接しているか否かをさらに判定し、前記前記低輝度領域に基づく被写体領域がその他の被写体領域と近接している場合には、前記領域検出部により検出した前記複数の被写体領域のうち、前記低輝度領域に基づく被写体領域を除く被写体領域の中から主要被写体領域を決定する
ことを特徴とする画像処理装置。
The image processing apparatus according to any one of claims 1 to 4,
The region detection unit calculates a feature amount related to at least luminance as the feature amount, and detects a plurality of subject regions including a subject region based on at least a low luminance region based on the feature amount related to the brightness,
The control unit determines whether or not the influence of the shadow is large by comparing the evaluation value with a predetermined threshold, and when the influence of the shadow is large, the subject area based on the low luminance area Is further close to other subject areas, and when the subject area based on the low brightness area is close to other subject areas, the plurality of areas detected by the area detection unit An image processing apparatus, wherein a main subject area is determined from subject areas excluding a subject area based on the low luminance area among the subject areas.
請求項3から請求項8の何れか1項に記載の画像処理装置において、
前記制御部は、前記明るさが所定の基準より明るい場合か、前記明るさが所定の基準より明るく、かつ、前記コントラストが所定の基準より高い場合に、前記影の影響が大きいと判定する
ことを特徴とする画像処理装置。
The image processing apparatus according to any one of claims 3 to 8,
The control unit determines that the influence of the shadow is large when the brightness is brighter than a predetermined reference or when the brightness is brighter than a predetermined reference and the contrast is higher than a predetermined reference. An image processing apparatus.
光学系による像を撮像して画像データを生成する撮像部と、
前記画像データにより示される画像の特徴量を算出し、前記特徴量に基づいて定まる被写体領域を検出する領域検出部と、
前記画像における影の影響を示す評価値を算出する評価値算出部と、
前記評価値算出部により算出した前記評価値に基づいて、前記領域検出部による前記被写体領域の検出方法を決定する制御部と
を備えることを特徴とする撮像装置。
An imaging unit that captures an image by an optical system and generates image data;
A region detecting unit that calculates a feature amount of an image indicated by the image data and detects a subject region determined based on the feature amount;
An evaluation value calculation unit for calculating an evaluation value indicating an influence of a shadow in the image;
An image pickup apparatus comprising: 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.
請求項10に記載の撮像装置において、
前記評価値算出部は、前記撮像部により生成した前記画像の明るさに関する情報と、前記画像のコントラストに関する情報と、前記撮像部における露光条件に関する情報と、測光情報との少なくとも一つに基づいて、前記評価値を算出する
ことを特徴とする撮像装置。
The imaging device according to claim 10.
The evaluation value calculation unit is based on at least one of information relating to the brightness of the image generated by the imaging unit, information relating to the contrast of the image, information relating to an exposure condition in the imaging unit, and photometric information. The evaluation value is calculated. An imaging apparatus characterized by:
コンピュータに、
処理対象の画像データを取得する取得手順と、
前記画像データにより示される画像の特徴量を算出し、前記特徴量に基づいて定まる被写体領域を検出する領域検出手順と、
前記画像における影の影響を示す評価値を算出する評価値算出手順と、
前記評価値算出手順において算出した前記評価値に基づいて、前記領域検出手順における前記被写体領域の検出方法を決定する制御手順と
を実行させるための画像処理プログラム。
On the computer,
An acquisition procedure for acquiring image data to be processed;
A region detection procedure for calculating a feature amount of an image indicated by the image data and detecting a subject region determined based on the feature amount;
An evaluation value calculation procedure for calculating an evaluation value indicating an influence of a shadow in the image;
An image processing program for executing a control procedure for determining a detection method of the subject area in the area detection procedure based on the evaluation value calculated in the evaluation value calculation procedure.
JP2012179352A 2012-08-13 2012-08-13 Image processing apparatus, imaging apparatus, and image processing program Active JP6011146B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012179352A JP6011146B2 (en) 2012-08-13 2012-08-13 Image processing apparatus, imaging apparatus, and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012179352A JP6011146B2 (en) 2012-08-13 2012-08-13 Image processing apparatus, imaging apparatus, and image processing program

Publications (2)

Publication Number Publication Date
JP2014039100A true JP2014039100A (en) 2014-02-27
JP6011146B2 JP6011146B2 (en) 2016-10-19

Family

ID=50286921

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012179352A Active JP6011146B2 (en) 2012-08-13 2012-08-13 Image processing apparatus, imaging apparatus, and image processing program

Country Status (1)

Country Link
JP (1) JP6011146B2 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0410079A (en) * 1990-04-27 1992-01-14 Honda Motor Co Ltd Device and method for processing color image
JP2000341677A (en) * 1999-05-31 2000-12-08 Secom Co Ltd Image monitoring device
JP2002092609A (en) * 2000-09-20 2002-03-29 Kawasaki Heavy Ind Ltd Method and device for processing image
JP2007180932A (en) * 2005-12-28 2007-07-12 Secom Co Ltd Image sensor

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0410079A (en) * 1990-04-27 1992-01-14 Honda Motor Co Ltd Device and method for processing color image
JP2000341677A (en) * 1999-05-31 2000-12-08 Secom Co Ltd Image monitoring device
JP2002092609A (en) * 2000-09-20 2002-03-29 Kawasaki Heavy Ind Ltd Method and device for processing image
JP2007180932A (en) * 2005-12-28 2007-07-12 Secom Co Ltd Image sensor

Also Published As

Publication number Publication date
JP6011146B2 (en) 2016-10-19

Similar Documents

Publication Publication Date Title
US10567722B2 (en) Image processing apparatus, image processing method, imaging apparatus, and recording medium
CA2996751C (en) Calibration of defective image sensor elements
US20170019651A1 (en) Image processing apparatus and image processing method thereof
JP2016076805A (en) Image processing apparatus, control method and control program therefor, and imaging device
US10270991B2 (en) Image processing apparatus, image processing method, and computer-readable recording medium
JP2009300831A (en) Imaging system for microscope, exposure adjustment program, and exposure adjustment method
JP2015005927A (en) Image processing apparatus and control method of the same
JP5956844B2 (en) Image processing apparatus and control method thereof
JP6089476B2 (en) Image processing apparatus, imaging apparatus, and image processing program
JP4523629B2 (en) Imaging device
JP6011146B2 (en) Image processing apparatus, imaging apparatus, and image processing program
JP2018107741A (en) Image processing system, image processing method, and program
JP2013051516A (en) Imaging device and determination method, and program
JP6421032B2 (en) Focus detection apparatus, focus detection method, and focus detection program
JP6486051B2 (en) LIGHT EMITTING CONTROL DEVICE, ITS CONTROL METHOD, CONTROL PROGRAM, AND IMAGING DEVICE
JP2014130442A (en) Image processing device, imaging device, and image processing program
JP5794413B2 (en) Image processing apparatus, image processing method, and program
JP6464553B2 (en) Lens drive control device, electronic camera, and lens drive control program
JP6003383B2 (en) Image processing apparatus, imaging apparatus, and image processing program
JP2011253099A (en) Focus detector
JP2018186363A (en) Imaging apparatus
JP6601062B2 (en) Imaging control apparatus, imaging control method, and program
JP2010183298A (en) Imaging device and control method thereof
JP2017182668A (en) Data processor, imaging device, and data processing method
JP6303395B2 (en) Image processing apparatus, imaging apparatus, and image processing program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150629

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160516

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160531

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160801

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160905

R150 Certificate of patent or registration of utility model

Ref document number: 6011146

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