JP2010200270A - Image processing device, camera, and program - Google Patents

Image processing device, camera, and program Download PDF

Info

Publication number
JP2010200270A
JP2010200270A JP2009045946A JP2009045946A JP2010200270A JP 2010200270 A JP2010200270 A JP 2010200270A JP 2009045946 A JP2009045946 A JP 2009045946A JP 2009045946 A JP2009045946 A JP 2009045946A JP 2010200270 A JP2010200270 A JP 2010200270A
Authority
JP
Japan
Prior art keywords
image
color component
area
frequency distribution
region
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
JP2009045946A
Other languages
Japanese (ja)
Other versions
JP5509621B2 (en
Inventor
Tsukasa Murata
司 村田
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 JP2009045946A priority Critical patent/JP5509621B2/en
Publication of JP2010200270A publication Critical patent/JP2010200270A/en
Application granted granted Critical
Publication of JP5509621B2 publication Critical patent/JP5509621B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Color Television Image Signal Generators (AREA)
  • Studio Devices (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a means to extract a major object to be imaged by color information, with a various photographic image whose kind and color of the major object to be imaged is not predetermined previously as a subject. <P>SOLUTION: An image processing device includes a noticed area setting portion, a frequency distribution forming portion, a color component analyzing portion, and an area division portion. The noticed area setting portion obtains a photographed image being taken by a photographic device and a photographic information of the photographed image and sets a noticed area at a part of the photographed image using the photographic information. The frequency distribution forming portion obtains a frequency distribution of color component contained in the image of the noticed area. The color component analyzing portion sets at least one range of a major color component in the noticed area on the basis of the frequency distribution. The area division portion classifies a color component at each position of the photographed image correspondent to the range of major color component and performs the area division of the photographed image on the basis of the result of the classification. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

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

従来から、色情報に基づいて撮影画像から主要被写体を抽出する技術が知られている。一例として、特許文献1には、主要被写体が人物であることを前提として、色情報に基づいて撮影画像から肌の領域を抽出する技術が開示されている。   Conventionally, a technique for extracting a main subject from a captured image based on color information is known. As an example, Patent Document 1 discloses a technique for extracting a skin region from a captured image based on color information on the premise that a main subject is a person.

ところで、撮像装置による撮影ではあらゆる物体が被写体となりうる。しかし、従来の技術では、主要被写体の種類や色が予め特定されていない多様な撮影画像を対象として、色情報によって撮影画像から主要被写体の抽出を行うことは困難であった。   By the way, any object can be a subject in photographing by the imaging apparatus. However, with the conventional technology, it has been difficult to extract a main subject from a captured image using color information for a variety of captured images in which the type and color of the main subject are not specified in advance.

そこで、本発明は、主要被写体の種類や色が予め特定されていない多様な撮影画像を対象として、色情報により主要被写体の抽出を行うための手段を提供することを目的とする。   Accordingly, an object of the present invention is to provide means for extracting a main subject from color information for various captured images in which the type and color of the main subject are not specified in advance.

一の態様の画像処理装置は、注目領域設定部と、度数分布生成部と、色成分解析部と、領域分割部とを備える。注目領域設定部は、撮像装置で撮影された撮影画像と該撮影画像の撮影情報とを取得するとともに、撮影情報を用いて撮影画像の一部に注目領域を設定する。度数分布生成部は、注目領域の画像に含まれる色成分の度数分布を求める。色成分解析部は、度数分布に基づいて、注目領域における主要色成分の範囲を少なくとも1以上設定する。領域分割部は、撮影画像の各位置の色成分を主要色成分の範囲に応じて分類し、該分類結果に基づいて撮影画像の領域分割を行う。   An image processing apparatus according to an aspect includes an attention area setting unit, a frequency distribution generation unit, a color component analysis unit, and an area division unit. The attention area setting unit acquires a captured image captured by the imaging apparatus and shooting information of the captured image, and sets the attention area in a part of the captured image using the shooting information. The frequency distribution generation unit obtains a frequency distribution of color components included in the image of the attention area. The color component analysis unit sets at least one or more main color component ranges in the region of interest based on the frequency distribution. The region dividing unit classifies the color components at each position of the captured image according to the range of the main color components, and performs region division of the captured image based on the classification result.

上記の一の態様において、注目領域設定部は、撮影画像を撮影したときの焦点検出エリアの位置情報を用いて、注目領域を設定してもよい。   In the one aspect described above, the attention area setting unit may set the attention area using position information of the focus detection area when the captured image is captured.

上記の一の態様において、色成分として色相の情報を用いてもよい。   In the one aspect described above, hue information may be used as the color component.

上記の一の態様において、領域分割部は、度数分布での色成分の頻度が最も高い値を示す主要色成分の範囲に基づいて、撮影画像から主要被写体の領域を抽出してもよい。   In the one aspect described above, the region dividing unit may extract the region of the main subject from the photographed image based on the range of the main color component showing the highest frequency of the color component in the frequency distribution.

なお、上記の一の態様の画像処理装置を備えたカメラや、コンピュータを上記の一の態様の画像処理装置として機能させるプログラムや、このプログラムを記憶した記憶媒体や、上記の一の態様における画像処理装置の動作を方法のカテゴリで表現したものも、本発明の具体的態様として有効である。   Note that a camera including the image processing apparatus according to the above aspect, a program that causes a computer to function as the image processing apparatus according to the above aspect, a storage medium that stores the program, and an image according to the above aspect. A representation of the operation of the processing apparatus in the method category is also effective as a specific aspect of the present invention.

本発明では、注目領域の色成分の度数分布から主要色成分の範囲を設定し、この主要色成分の範囲に基づく領域分割によって、色情報を用いて撮影画像から主要被写体を抽出できる。   In the present invention, the main subject can be extracted from the photographed image using the color information by setting the range of the main color component from the frequency distribution of the color components of the region of interest and dividing the region based on the range of the main color component.

一の実施形態に係る画像処理装置の構成例を示すブロック図1 is a block diagram illustrating a configuration example of an image processing apparatus according to an embodiment. 一の実施形態における領域分割処理の動作例を説明する流れ図FIG. 5 is a flowchart for explaining an example of the operation of area division processing in the embodiment. 撮影画像における注目領域の設定例を示す図The figure which shows the example of a setting of the attention area in a picked-up image 図3の撮影画像に対応する色相成分のヒストグラムHistogram of hue component corresponding to the photographed image of FIG. 注目領域の主要色成分の範囲に基づいて、図3の撮影画像を領域分割した例を示す図The figure which shows the example which divided | segmented the picked-up image of FIG. 3 into the area | region based on the range of the main color component of an attention area 撮影画像全体の色相から決定した主要色成分の範囲によって、図3の撮影画像を領域分割した比較例を示す図The figure which shows the comparative example which divided the picked-up image of FIG. 3 into the area | region by the range of the main color component determined from the hue of the whole picked-up image 他の実施形態における電子カメラの構成例を示すブロック図The block diagram which shows the structural example of the electronic camera in other embodiment. 他の実施形態の電子カメラにおける撮影モードでの動作例を示す流れ図The flowchart which shows the operation example in imaging | photography mode in the electronic camera of other embodiment

<一の実施形態の説明>
図1は、一の実施形態に係る画像処理装置の構成例を示すブロック図である。一の実施形態の画像処理装置は、画像処理プログラムがインストールされたパーソナルコンピュータである。この画像処理装置を構成するコンピュータは、画像処理プログラムの実行によって、電子カメラなどの撮像装置で生成された画像ファイルを読み込むとともに、この画像ファイルの撮影画像に対して領域分割処理を施す。
<Description of One Embodiment>
FIG. 1 is a block diagram illustrating a configuration example of an image processing apparatus according to an embodiment. The image processing apparatus according to one embodiment is a personal computer in which an image processing program is installed. A computer constituting the image processing apparatus reads an image file generated by an imaging apparatus such as an electronic camera by executing an image processing program, and performs region division processing on the captured image of the image file.

ここで、一の実施形態で処理対象となる画像ファイルは、例えばExif(Exchangeable image file format for digital still cameras)規格に準拠したファイル形式で生成される。そして、一の実施形態で処理対象となる画像ファイルには、撮像装置で撮影(撮像)されたカラーの撮影画像(本画像)と、この撮影画像に関する撮影情報(オートフォーカス(AF)による焦点検出エリアの位置情報など)とが対応付けされて記憶されている。   Here, the image file to be processed in one embodiment is generated in a file format conforming to, for example, the Exif (Exchangeable image file format for digital still cameras) standard. In the image file to be processed in one embodiment, a color photographed image (main image) photographed (captured) by the imaging device and photographing information (auto focus (AF) focus detection) about the photographed image are included. Are stored in association with each other.

図1に示すコンピュータ11は、データ読込部12、記憶装置13、CPU14、メモリ15および入出力I/F16、バス17を有している。データ読込部12、記憶装置13、CPU14、メモリ15および入出力I/F16は、バス17を介して相互に接続されている。さらに、コンピュータ11には、入出力I/F16を介して、入力デバイス18(キーボード、ポインティングデバイスなど)とモニタ19とがそれぞれ接続されている。なお、入出力I/F16は、入力デバイス18からの各種入力を受け付けるとともに、モニタ19に対して表示用のデータを出力する。   A computer 11 illustrated in FIG. 1 includes a data reading unit 12, a storage device 13, a CPU 14, a memory 15, an input / output I / F 16, and a bus 17. The data reading unit 12, the storage device 13, the CPU 14, the memory 15, and the input / output I / F 16 are connected to each other via a bus 17. Further, an input device 18 (keyboard, pointing device, etc.) and a monitor 19 are connected to the computer 11 via an input / output I / F 16. The input / output I / F 16 receives various inputs from the input device 18 and outputs display data to the monitor 19.

データ読込部12は、上記の画像ファイルや、画像処理プログラムを外部から読み込むときに用いられる。例えば、データ読込部12は、着脱可能な記憶媒体からデータを取得する読込デバイス(光ディスク、磁気ディスク、光磁気ディスクの読込装置など)や、公知の通信規格に準拠して外部の装置と通信を行う通信デバイス(USBインターフェース、LANモジュール、無線LANモジュールなど)で構成される。   The data reading unit 12 is used when reading the image file or the image processing program from the outside. For example, the data reading unit 12 communicates with a reading device (such as an optical disk, a magnetic disk, or a magneto-optical disk reading device) that acquires data from a removable storage medium, or an external device in accordance with a known communication standard. It consists of communication devices (USB interface, LAN module, wireless LAN module, etc.) to be performed.

記憶装置13は、例えば、ハードディスクや、不揮発性の半導体メモリなどの記憶媒体で構成される。この記憶装置13には、上記の画像処理プログラムと、プログラムの実行に必要となる各種のデータとが記録されている。なお、記憶装置13には、データ読込部12から読み込んだ画像ファイルを記憶しておくこともできる。   The storage device 13 is configured by a storage medium such as a hard disk or a nonvolatile semiconductor memory. The storage device 13 stores the image processing program and various data necessary for executing the program. The storage device 13 can also store the image file read from the data reading unit 12.

CPU14は、コンピュータ11の各部を統括的に制御するプロセッサである。このCPU14は、画像処理プログラムの実行によって、注目領域設定部21と、度数分布生成部22と、色成分解析部23と、領域分割部24として機能する(なお、CPU14に含まれる各部の動作については後述する)。   The CPU 14 is a processor that comprehensively controls each unit of the computer 11. The CPU 14 functions as an attention area setting section 21, a frequency distribution generation section 22, a color component analysis section 23, and an area division section 24 by executing the image processing program (Note that the operation of each section included in the CPU 14) Will be described later).

メモリ15は、画像処理プログラムの演算結果などを一時的に記憶する。このメモリ15は、例えば揮発性のSDRAMなどで構成される。   The memory 15 temporarily stores the calculation result of the image processing program. The memory 15 is composed of, for example, a volatile SDRAM.

次に、図2の流れ図を参照しつつ、一の実施形態における領域分割処理の動作例を説明する。なお、図2の処理は、ユーザによるプログラム実行指示に応じて、CPU14が画像処理プログラムを実行することで開始される。   Next, an example of the operation of the area division processing in one embodiment will be described with reference to the flowchart of FIG. 2 is started when the CPU 14 executes the image processing program in accordance with a program execution instruction from the user.

ステップS101:CPU14は、データ読込部12を介して処理対象の画像ファイルを外部から取得する。S101で取得された画像ファイルは、CPU14の制御によって、記憶装置13またはメモリ15に記録される。なお、処理対象の画像ファイルが予め記憶装置13に記憶されている場合には、CPU14はS101の処理を省略してもよい。   Step S101: The CPU 14 acquires an image file to be processed from the outside via the data reading unit 12. The image file acquired in S101 is recorded in the storage device 13 or the memory 15 under the control of the CPU 14. Note that when the image file to be processed is stored in the storage device 13 in advance, the CPU 14 may omit the process of S101.

ステップS102:CPU14は、処理対象の画像ファイルに含まれる撮影画像(本画像)の色空間をHSV色空間またはHLS色空間に変換する。一の実施形態でのCPU14は、RGB色空間(またはYUV色空間)のカラー撮影画像のデータを、HSV色空間に対応した8bitの画像のデータに変換するものとする。なお、撮影画像が予めHSV色空間に対応する形式である場合には、CPU14はS102の処理を省略してもよい。   Step S102: The CPU 14 converts the color space of the captured image (main image) included in the image file to be processed into an HSV color space or an HLS color space. In one embodiment, the CPU 14 converts data of a color photographed image in the RGB color space (or YUV color space) into 8-bit image data corresponding to the HSV color space. If the captured image has a format corresponding to the HSV color space in advance, the CPU 14 may omit the process of S102.

ステップS103:注目領域設定部21は、処理対象の画像ファイルから撮影情報を読み出して、撮影画像の撮像前に予め行われたAFによる焦点検出エリアの位置情報(画像内での焦点検出エリアのXY位置とその大きさ)を取得する。   Step S103: The attention area setting unit 21 reads out the shooting information from the image file to be processed, and the position information of the focus detection area by the AF performed in advance before shooting of the shot image (XY of the focus detection area in the image) Position and its size).

そして、注目領域設定部21は、上記の焦点検出エリアの位置を基準として、撮影画像の一部に注目領域を設定する。一の実施形態での注目領域設定部21は、焦点検出エリアを中心とする撮影画像内の矩形の部分領域を注目領域とする。このとき、注目領域設定部21は、撮影画像において焦点検出エリアに対応する範囲をそのまま注目領域としてもよい。なお、図3は、撮影画像における注目領域の設定例を示している。図3では、焦点検出エリアの情報を矩形の枠で示しており、この焦点検出エリアがそのまま注目領域として設定されるものとする。なお、図3での注目領域は、撮影画像上の岩の部分と重なっている。   Then, the attention area setting unit 21 sets the attention area in a part of the captured image with reference to the position of the focus detection area. In one embodiment, the attention area setting unit 21 sets a rectangular partial area in the captured image centered on the focus detection area as the attention area. At this time, the attention area setting unit 21 may directly use the range corresponding to the focus detection area in the captured image as the attention area. FIG. 3 shows an example of setting the attention area in the captured image. In FIG. 3, the information on the focus detection area is indicated by a rectangular frame, and this focus detection area is set as a region of interest as it is. Note that the region of interest in FIG. 3 overlaps the rock portion on the captured image.

ステップS104:度数分布生成部22は、撮影画像の注目領域に含まれる各画素の色相成分(H)に注目し、注目領域内での色相成分と画素数との対応関係を示す度数分布を求める。   Step S104: The frequency distribution generation unit 22 pays attention to the hue component (H) of each pixel included in the attention area of the photographed image, and obtains a frequency distribution indicating the correspondence between the hue component and the number of pixels in the attention area. .

ここで、図4は、図3の撮影画像に対応する色相成分のヒストグラムを示す。図4の横軸は、8bitの色相値(0−255)を示し、図4の縦軸は各々の色相値に対応する画素数(頻度)を示している。この図4の例では、縦軸の画素数を8bit(0−255)の範囲に正規化した状態で示している。また、図4において、注目領域内での色相成分と画素数との対応関係を示すヒストグラムは実線で示している。なお、図4では、上記の比較例として、撮影画像全体での色相成分と画素数との対応関係を示すヒストグラムを破線で示している。   Here, FIG. 4 shows a histogram of hue components corresponding to the photographed image of FIG. The horizontal axis in FIG. 4 indicates an 8-bit hue value (0-255), and the vertical axis in FIG. 4 indicates the number of pixels (frequency) corresponding to each hue value. In the example of FIG. 4, the number of pixels on the vertical axis is normalized in the range of 8 bits (0-255). In FIG. 4, the histogram indicating the correspondence between the hue component and the number of pixels in the region of interest is indicated by a solid line. In FIG. 4, as a comparative example, a histogram indicating the correspondence between the hue component and the number of pixels in the entire captured image is indicated by a broken line.

図3の撮影画像は、画像全体において木や芝生による緑色の部分の比率が高く、注目領域に対応する岩の部分は相対的に比率が小さい。そのため、図4の破線で示す画像全体のヒストグラムでは、緑の色相の範囲(色相値50の周辺)における頻度が非常に高く、岩の色相の範囲(色相値100−180の周辺)における頻度は相対的に低くなってしまう。   In the captured image of FIG. 3, the ratio of the green part due to trees or lawn is high in the entire image, and the ratio of the rock part corresponding to the region of interest is relatively small. Therefore, in the histogram of the entire image shown by the broken line in FIG. 4, the frequency in the green hue range (around the hue value 50) is very high, and the frequency in the rock hue range (around the hue value 100-180) is It will be relatively low.

一方、図3の撮影画像の注目領域では、岩の部分の比率が非常に高く、緑色の部分はほとんど含まれていない。そのため、図4の実線で示す注目領域のヒストグラムでは、岩の色相の範囲における頻度が非常に高く、緑の色相の範囲における頻度はゼロに近くなる。よって、注目領域での色相成分の度数分布には、焦点検出エリアの位置にある被写体(岩)の色相の特徴がよく反映されていることが分かる。   On the other hand, in the attention area of the captured image of FIG. 3, the ratio of the rock portion is very high, and the green portion is hardly included. Therefore, in the histogram of the attention area indicated by the solid line in FIG. 4, the frequency in the rock hue range is very high, and the frequency in the green hue range is close to zero. Therefore, it can be seen that the hue characteristics of the subject (rock) at the position of the focus detection area are well reflected in the frequency distribution of the hue component in the region of interest.

ステップS105:CPU14は、注目領域での色相成分の度数分布(S104で求めたもの)につき、隣接する色相間で頻度の変化を平滑化する。具体的には、CPU14は、度数分布の各色相成分に対して、色相値が1ずつ異なる2つの色相成分との間で頻度の平滑化を行う平滑化フィルタ(1/4[1,2,1]の平滑化フィルタ)をそれぞれ適用する。このS105の処理は、図4に示す実線のヒストグラムの横軸方向に平滑化フィルタをかけて、ヒストグラムの曲線を滑らかにすることに相当する。なお、CPU14は、上記の処理において周期境界条件を適用し、色相値の上限(色相値255)および下限(色相値0)を連続するものとして扱う。これにより、色相値の上限および下限でも頻度の平滑化が可能となる。   Step S105: The CPU 14 smoothes the change in frequency between adjacent hues for the frequency distribution of the hue components in the region of interest (calculated in S104). Specifically, the CPU 14 performs smoothing filters (1/4 [1, 2, 4) for smoothing the frequency between two hue components having different hue values by one for each hue component of the frequency distribution. 1) smoothing filter) is applied. The process of S105 corresponds to smoothing the histogram curve by applying a smoothing filter in the horizontal axis direction of the solid histogram shown in FIG. Note that the CPU 14 applies the periodic boundary condition in the above processing and treats the upper limit (hue value 255) and lower limit (hue value 0) of the hue value as being continuous. As a result, the frequency can be smoothed even at the upper and lower limits of the hue value.

また、S105の処理において、度数分布の頻度の平滑化をある程度まで行うと、後述の主要色成分の範囲を設定し易くなる。その一方で、度数分布の頻度の平滑化を過度に行うと、色相成分に基づいて領域分割を行う位置があいまいとなる傾向がある。よって、S105の処理で平滑化を行う回数は、上記の事情を考慮してCPU14が適宜設定する。なお、一の実施形態の例では、CPU14が3回程度まで平滑化の処理を行うものとする。   Further, if the frequency distribution frequency is smoothed to a certain extent in the process of S105, it becomes easy to set a range of a main color component described later. On the other hand, if the frequency distribution frequency is excessively smoothed, the position where the region is divided based on the hue component tends to be ambiguous. Therefore, the number of times smoothing is performed in the process of S105 is appropriately set by the CPU 14 in consideration of the above circumstances. In the example of the embodiment, the CPU 14 performs the smoothing process up to about three times.

ステップS106:色成分解析部23は、注目領域での色相成分の度数分布(S105で平滑化されたもの)に基づいて、注目領域における主要色成分の範囲を少なくとも1以上設定する。一例として、色成分解析部23は、以下の(イ)から(ハ)の処理により、主要色成分の範囲の設定を行う。   Step S106: The color component analysis unit 23 sets at least one or more main color component ranges in the attention area based on the frequency distribution of the hue components in the attention area (smoothed in S105). As an example, the color component analysis unit 23 sets the range of the main color component by the following processes (A) to (C).

(イ)色成分解析部23は、平滑化後の度数分布において色相値と頻度との対応関係を示す分布関数(図4の実線のヒストグラムを平滑化したものに相当する)を参照し、上記の分布関数で頻度がピークとなる位置(色相値)を主要色成分の候補とする。勿論、上記の主要色成分の候補は複数であってもよい。   (A) The color component analysis unit 23 refers to a distribution function (corresponding to the smoothed histogram of the solid line in FIG. 4) indicating the correspondence between the hue value and the frequency in the frequency distribution after smoothing. The position (hue value) at which the frequency becomes a peak in the distribution function is used as a candidate for the main color component. Of course, there may be a plurality of candidates for the main color component.

具体的には、まず、色成分解析部23は、上記の分布関数の横軸方向(色相値の変化する方向)において、頻度分布が極大値となる位置(あるいは分布関数の横軸方向で頻度の差分の符号が正から負へ変化する位置)を求める。そして、色成分解析部23は、分布関数から求めた上記の位置(色相値)のうち、頻度の値が閾値未満となるものを除外して主要色成分の候補とする。なお、一の実施形態では、主要色成分の候補を絞り込む閾値を8bitの階調(0−255)で70に設定した。   Specifically, first, the color component analysis unit 23 has a position where the frequency distribution becomes a maximum value (or frequency in the horizontal axis direction of the distribution function) in the horizontal axis direction (the direction in which the hue value changes) of the above distribution function. The position at which the sign of the difference of (1) changes from positive to negative) is obtained. Then, the color component analysis unit 23 excludes the position (hue value) obtained from the distribution function from which the frequency value is less than the threshold value, and sets it as a candidate for the main color component. In one embodiment, the threshold for narrowing down the main color component candidates is set to 70 with 8-bit gradation (0-255).

(ロ)色成分解析部23は、上記の主要色成分の候補のうちから、頻度の値の高さに注目して主要色成分の色相値を決定する。具体的には、色成分解析部23は、上記の主要色成分の候補のうちから、頻度の値が高い順に主要色成分の色相値を所定数まで選択する。なお、一の実施形態での色成分解析部23は、主要色成分の色相値を2つまで選択するものとする。   (B) The color component analysis unit 23 determines the hue value of the main color component by paying attention to the frequency value among the candidates for the main color component. Specifically, the color component analysis unit 23 selects up to a predetermined number of hue values of the main color components in descending order of frequency values from among the candidates for the main color components. Note that the color component analysis unit 23 in one embodiment selects up to two hue values of main color components.

(ハ)色成分解析部23は、上記の分布関数を参照し、注目する主要色成分の色相値に基づいて主要色成分の範囲を設定する。なお、色成分解析部23は、上記(ロ)で選択された各々の主要色成分の色相値について、主要色成分の範囲をそれぞれ設定する。   (C) The color component analysis unit 23 refers to the above distribution function, and sets the range of the main color component based on the hue value of the main color component of interest. Note that the color component analysis unit 23 sets the range of the main color component for the hue value of each main color component selected in (b) above.

具体的には、色成分解析部23は、上記の分布関数の横軸方向において、注目する主要色成分の色相値の周囲に生じる谷の位置を探索する。このとき、色成分解析部23は、頻度分布が極小値となる位置(あるいは分布関数の横軸方向で頻度の差分の符号が負から正に変化する位置)を求めればよい。また、色成分解析部23は、上記の谷を探索するときも、頻度の値が閾値(例えば8bitの階調で70)以上となる位置を除外するものとする。そして、色成分解析部23は、注目する各主要色成分の色相値を中心として、それぞれ左右に隣接する2つの谷までの色相値の範囲を各主要色成分の範囲とする。   Specifically, the color component analysis unit 23 searches for the positions of valleys that occur around the hue value of the main color component of interest in the horizontal axis direction of the distribution function. At this time, the color component analysis unit 23 may obtain a position where the frequency distribution becomes a minimum value (or a position where the sign of the frequency difference changes from negative to positive in the horizontal axis direction of the distribution function). Also, the color component analysis unit 23 excludes positions where the frequency value is equal to or higher than a threshold value (for example, 70 for an 8-bit gradation) when searching for the valley. Then, the color component analysis unit 23 sets the range of the hue value up to two valleys adjacent to the left and right respectively as the range of each main color component with the hue value of each main color component of interest as the center.

なお、一の実施形態では、複数の主要色成分の範囲のうち、主要色成分での色相値の頻度が1番高くなったものを第1の主要色成分の範囲と称する。また、主要色成分での色相値の頻度が2番目高いものを第2の主要色成分の範囲と称する。   In one embodiment, a range in which the frequency of the hue value of the main color component is the highest among the plurality of main color component ranges is referred to as a first main color component range. In addition, the second highest color component range in which the hue value frequency of the main color component is the second highest is referred to.

ステップS107:領域分割部24は、撮影画像の各画素の色相値に基づいて、撮影画像の領域分割を行う。具体的には、領域分割部24は、撮影画像の各画素の色相値がいずれの主要色成分の範囲(S106)に属するかによって分類する。次に、領域分割部24は、上記の分類結果に基づいて、撮影画像で同一の主要色成分の範囲に属する画素をそれぞれグループ化して領域分割を行う。   Step S107: The region dividing unit 24 performs region division of the captured image based on the hue value of each pixel of the captured image. Specifically, the region dividing unit 24 classifies the hue value of each pixel of the captured image according to which main color component range (S106). Next, the region dividing unit 24 performs region division by grouping pixels belonging to the same main color component range in the captured image based on the above classification result.

また、S107での領域分割部24は、以下のいずれかの方法(あるいはその組み合わせ)により、撮影画像から主要被写体の領域を抽出してもよい。   Further, the area dividing unit 24 in S107 may extract the area of the main subject from the captured image by any one of the following methods (or a combination thereof).

例えば、領域分割部24は、撮影画像において、第1の主要色成分の範囲に属する領域を主要被写体の領域としてもよい。また、領域分割部24は、主要色成分の範囲に属する領域のうち、注目領域と重なる度合いの高い領域(あるいは注目領域により近い領域)を主要被写体の領域としてもよい。さらに、領域分割部24は、撮影情報に含まれる撮像装置のシーンモードの設定情報を考慮して、主要被写体の領域を決定してもよい。   For example, the region dividing unit 24 may set a region belonging to the range of the first main color component as a main subject region in the captured image. In addition, the region dividing unit 24 may select a region having a high degree of overlapping with the attention region (or a region closer to the attention region) among the regions belonging to the main color component range as the main subject region. Further, the region dividing unit 24 may determine the region of the main subject in consideration of the setting information of the scene mode of the imaging device included in the shooting information.

一例として、シーンモードが「ポートレート撮影」である場合、領域分割部24は、画像内でのまとまりが大きな領域を優先的に主要被写体の領域としてもよい。また、領域分割部24は、シーンモードが「風景撮影」である場合、画像内に大きく広がっている領域を優先的に主要被写体の領域としてもよい。   As an example, when the scene mode is “portrait shooting”, the area dividing unit 24 may preferentially set an area having a large group in the image as a main subject area. In addition, when the scene mode is “landscape shooting”, the region dividing unit 24 may preferentially set a region that is greatly expanded in the image as the region of the main subject.

なお、画像内での領域のまとまりや広がりを判断するときには、領域分割部24は、各領域で画像の2次モーメントを求めればよい。このとき、重心周りのモーメントが小さければ領域が広がっている傾向にあると判断でき、重心周りのモーメントが大きければ領域がまとまっている傾向にあると判断できる。   It should be noted that, when determining the grouping or spread of regions in the image, the region dividing unit 24 may obtain the second moment of the image in each region. At this time, if the moment around the center of gravity is small, it can be determined that the region tends to expand, and if the moment around the center of gravity is large, it can be determined that the region tends to be gathered.

ここで、図5は、注目領域の主要色成分の範囲に基づいて、図3の撮影画像を領域分割した例を示す図である。図5の赤色の箇所は、第1の主要色成分の範囲に対応する。また、図5の緑色の箇所は、第2の主要色成分の範囲に対応する。また、図5の黒色の箇所は、色相値がいずれの主要色成分の範囲にも属さない部分を示している。   Here, FIG. 5 is a diagram illustrating an example in which the captured image of FIG. 3 is divided into regions based on the range of the main color components of the region of interest. The red part in FIG. 5 corresponds to the range of the first main color component. Further, the green portion in FIG. 5 corresponds to the range of the second main color component. Further, a black portion in FIG. 5 indicates a portion where the hue value does not belong to any of the main color component ranges.

一般的に、電子カメラなどの撮像装置で撮影画像を取得する場合、主要被写体にピントを合わせた状態で撮影が行なわれる。そのため、焦点検出エリアに対応する被写体は、主要被写体である可能性が非常に高い。図5の例によれば、第1の主要色成分の範囲(赤色)は、焦点検出エリアの位置にある被写体(岩)の部分によく一致し、岩の周囲にある芝生や木の部分は黒色となっている。そのため、一の実施形態による領域分割処理では、撮影画像から主要被写体を精度よく抽出できていることが分かる。   In general, when a captured image is acquired by an imaging device such as an electronic camera, shooting is performed with the main subject in focus. Therefore, the subject corresponding to the focus detection area is very likely to be the main subject. According to the example of FIG. 5, the range of the first main color component (red) matches the portion of the subject (rock) at the position of the focus detection area, and the lawn and tree portions around the rock are It is black. Therefore, it can be seen that the main subject can be accurately extracted from the captured image in the area division processing according to the embodiment.

また、図5の比較例として、撮影画像全体の色相の度数分布情報から決定した主要色成分によって、図3の撮影画像を領域分割した例を図6に示す。この図6の例では、主要色成分の範囲を赤色で示し、主要色成分の範囲に属さない部分は黒色で示している。この図6の比較例では、焦点検出エリアの位置にある被写体が黒色で示されており、主要色成分によって主要被写体を抽出できていないことが分かる。   Further, as a comparative example of FIG. 5, FIG. 6 shows an example in which the captured image of FIG. 3 is divided into regions by main color components determined from the hue frequency distribution information of the entire captured image. In the example of FIG. 6, the range of the main color component is shown in red, and the portion not belonging to the range of the main color component is shown in black. In the comparative example of FIG. 6, the subject at the position of the focus detection area is shown in black, and it can be seen that the main subject cannot be extracted by the main color component.

ステップS108:CPU14は、S107の処理による領域分割結果を出力する。一例として、CPU14は、領域分割した撮影画像(図5)をモニタ19に表示させる。また、CPU14は、上記の領域分割結果を、処理対象の画像ファイルと対応付けて記憶装置13などに記録してもよい。なお、CPU14は、領域分割の結果を用いて、画像ファイルに含まれる撮影画像に対して各種の画像処理(例えば、主要被写体を除いた背景領域に対するぼかし処理など)を施すこともできる。以上で、図2の流れ図の説明を終了する。   Step S108: The CPU 14 outputs the result of area division by the process of S107. As an example, the CPU 14 causes the monitor 19 to display a captured image (FIG. 5) divided into regions. Further, the CPU 14 may record the region division result in the storage device 13 or the like in association with the processing target image file. Note that the CPU 14 can also perform various types of image processing (for example, blurring processing on the background area excluding the main subject) on the captured image included in the image file using the result of area division. Above, description of the flowchart of FIG. 2 is complete | finished.

上記の一の実施形態の画像処理装置は、焦点検出エリアの位置に基づいて、撮影画像の一部に注目領域を設定し(S103)、この注目領域内での色相成分と画素数との対応関係を示す度数分布から主要色成分の範囲を設定する(S104、S106)。そして、画像処理装置は、各画素の色相値が主要色成分の範囲に属するかによって、撮影画像の領域分割を行う(S107)。これにより、一の実施形態では、主要被写体の種類や色が予め特定されていない撮影画像を対象として、色相の情報による領域分割で主要被写体の抽出を行うことができる。   The image processing apparatus according to the one embodiment sets a region of interest in a part of the captured image based on the position of the focus detection area (S103), and correspondence between the hue component and the number of pixels in the region of interest. A range of main color components is set from the frequency distribution indicating the relationship (S104, S106). Then, the image processing apparatus divides the captured image into regions depending on whether the hue value of each pixel belongs to the main color component range (S107). Thereby, in one embodiment, the main subject can be extracted by segmentation based on hue information for a captured image in which the type and color of the main subject are not specified in advance.

<他の実施形態の説明>
図7は、他の実施形態における電子カメラの構成例を示すブロック図である。電子カメラ31は、フォーカシングレンズ32と、レンズ駆動部33と、撮像素子34と、制御部35と、ROM36と、メインメモリ37と、モニタ38と、記録I/F39と、レリーズ釦40とを有している。ここで、レンズ駆動部33、撮像素子34、ROM36、メインメモリ37、モニタ38、記録I/F39およびレリーズ釦40は、それぞれ制御部35に接続されている。
<Description of other embodiments>
FIG. 7 is a block diagram illustrating a configuration example of an electronic camera according to another embodiment. The electronic camera 31 includes a focusing lens 32, a lens driving unit 33, an image sensor 34, a control unit 35, a ROM 36, a main memory 37, a monitor 38, a recording I / F 39, and a release button 40. is doing. Here, the lens driving unit 33, the image sensor 34, the ROM 36, the main memory 37, the monitor 38, the recording I / F 39, and the release button 40 are respectively connected to the control unit 35.

フォーカシングレンズ32は、焦点調節を行うためのレンズである。このフォーカシングレンズ32のレンズ位置は、レンズ駆動部33によって光軸方向に調整される。   The focusing lens 32 is a lens for performing focus adjustment. The lens position of the focusing lens 32 is adjusted by the lens driving unit 33 in the optical axis direction.

撮像素子34は、フォーカシングレンズ32を含む撮像光学系によって結像される被写体の像を撮像し、カラーの撮影画像の画像信号を生成する。なお、撮像素子34から出力された画像信号は、A/D変換回路(不図示)を介して制御部35に入力される。   The image sensor 34 captures an image of a subject formed by an imaging optical system including the focusing lens 32 and generates an image signal of a color captured image. The image signal output from the image sensor 34 is input to the control unit 35 via an A / D conversion circuit (not shown).

ここで、電子カメラ31の撮影モードにおいて、撮像素子34はレリーズ釦40の全押し操作に応答して記録用の静止画像(本画像)を撮像する。また、撮影モードでの撮像素子34は、撮影待機時にも所定間隔毎に観測用の画像(スルー画像)を連続的に撮像する。ここで、時系列に取得されたスルー画像のデータは、モニタ38での動画像表示や制御部35による各種の演算処理に使用される。   Here, in the photographing mode of the electronic camera 31, the image sensor 34 captures a still image for recording (main image) in response to a full press operation of the release button 40. Further, the imaging device 34 in the shooting mode continuously takes images for observation (through images) at predetermined intervals even during standby for shooting. Here, the data of the through image acquired in time series is used for moving image display on the monitor 38 and various arithmetic processes by the control unit 35.

制御部35は、電子カメラ31の動作を統括的に制御するプロセッサである。例えば、制御部35は、スルー画像のデータを用いて、それぞれ公知のオートフォーカス(AF)制御や自動露出(AE)演算を実行する。また、制御部35は、ROM36に格納されたプログラムの実行により、画像処理部41、注目領域設定部42、度数分布生成部43、色成分解析部44、領域分割部45として機能する。   The control unit 35 is a processor that comprehensively controls the operation of the electronic camera 31. For example, the control unit 35 executes well-known autofocus (AF) control and automatic exposure (AE) calculation, respectively, using the through image data. In addition, the control unit 35 functions as an image processing unit 41, an attention area setting unit 42, a frequency distribution generation unit 43, a color component analysis unit 44, and an area division unit 45 by executing a program stored in the ROM 36.

画像処理部41は、撮影画像のデータに対して各種の画像処理(色補間処理、階調変換処理、輪郭強調処理、ホワイトバランス調整、色変換処理など)を施す。なお、注目領域設定部42、度数分布生成部43、色成分解析部44、領域分割部45の機能は、上記の一の実施形態とほぼ同様である。   The image processing unit 41 performs various types of image processing (color interpolation processing, gradation conversion processing, contour enhancement processing, white balance adjustment, color conversion processing, etc.) on the captured image data. Note that the functions of the attention area setting section 42, the frequency distribution generation section 43, the color component analysis section 44, and the area division section 45 are substantially the same as in the above-described one embodiment.

ROM36には、制御部35によって実行されるプログラムが記憶されている。なお、このプログラムによる撮影モードでの動作例については後述する。また、メインメモリ37は、画像処理部41による画像処理の前工程や後工程で画像のデータを一時的に記憶する。また、モニタ38は、制御部35の指示に応じて各種画像を表示する。   The ROM 36 stores a program executed by the control unit 35. An example of the operation in the shooting mode by this program will be described later. The main memory 37 temporarily stores image data in a pre-process or post-process of image processing by the image processing unit 41. The monitor 38 displays various images according to instructions from the control unit 35.

記録I/F39は、不揮発性の記憶媒体39aを接続するためのコネクタを有している。そして、記録I/F39は、コネクタに接続された記憶媒体39aに対してデータの書き込み/読み込みを実行する。上記の記憶媒体39aは、ハードディスクや、半導体メモリを内蔵したメモリカードなどで構成される。なお、図7では記憶媒体39aの一例としてメモリカードを図示する。   The recording I / F 39 has a connector for connecting a nonvolatile storage medium 39a. The recording I / F 39 executes data writing / reading with respect to the storage medium 39a connected to the connector. The storage medium 39a is composed of a hard disk, a memory card incorporating a semiconductor memory, or the like. In FIG. 7, a memory card is illustrated as an example of the storage medium 39a.

レリーズ釦40は、半押し操作による撮影前のAF動作開始の指示入力と、全押し操作による撮像動作開始の指示入力とをユーザから受け付ける。   The release button 40 receives from the user an instruction input for starting an AF operation before photographing by a half-press operation and an instruction input for starting an imaging operation by a full-press operation.

次に、図8の流れ図を参照しつつ、他の実施形態の電子カメラ31における撮影モードでの動作例を説明する。   Next, referring to the flowchart of FIG. 8, an operation example in the shooting mode in the electronic camera 31 of another embodiment will be described.

この撮影モードでの電子カメラ31は、注目領域から求めた主要色成分の範囲に基づいてスルー画像の領域分割を行うとともに、この領域分割の結果に基づいてAEのアルゴリズムを切り替える。なお、図8の流れ図の処理は、制御部35の制御によって、ユーザの撮影モードの起動操作に応じて開始される。   The electronic camera 31 in this shooting mode divides the through image region based on the main color component range obtained from the region of interest, and switches the AE algorithm based on the result of the region division. Note that the processing in the flowchart of FIG. 8 is started in response to a user's shooting mode activation operation under the control of the control unit 35.

ステップS201:制御部35は、撮像素子34を駆動させてスルー画像の撮像を開始する。その後、スルー画像は所定間隔ごとに逐次生成されることとなる。なお、撮像素子34から出力されたスルー画像のデータは、制御部35に入力される。   Step S201: The control unit 35 drives the imaging device 34 to start capturing a through image. Thereafter, the through images are sequentially generated at predetermined intervals. The through image data output from the image sensor 34 is input to the control unit 35.

また、撮影モードでの制御部35は、スルー画像から生成された表示用の画像(ビュー画像)をモニタ38に動画表示させる。したがって、ユーザは、モニタ38のビュー画像を参照して、撮影構図を決定するためのフレーミングを行うことができる。   Further, the control unit 35 in the shooting mode causes the monitor 38 to display a moving image of the display image (view image) generated from the through image. Therefore, the user can perform framing for determining the shooting composition with reference to the view image on the monitor 38.

ステップS202:制御部35は、レリーズ釦40の半押し操作を受け付けたか否かを判定する。上記要件を満たす場合(YES側)にはS203に処理が移行する。一方、上記要件を満たさない場合(NO側)には、制御部35はレリーズ釦40の半押し操作を待機する。   Step S202: The control unit 35 determines whether or not a half-press operation of the release button 40 has been accepted. If the above requirement is satisfied (YES side), the process proceeds to S203. On the other hand, when the above requirement is not satisfied (NO side), the control unit 35 waits for a half-press operation of the release button 40.

ステップS203:制御部35は、スルー画像を用いて、公知のコントラスト検出方式によるAFを行う。上記のAFにおいて、制御部35は、至近優先や中央優先などのアルゴリズム(またはユーザのマニュアルでの指定)に基づいて撮影画面(スルー画像の撮影範囲)内に焦点検出エリアを設定し、この焦点検出エリアの被写体にピントが合うようにフォーカシングレンズ32の位置を調整する。そして、制御部35は、AF後に処理対象のスルー画像を取得するものとする。   Step S203: The control unit 35 performs AF by a known contrast detection method using the through image. In the AF described above, the control unit 35 sets a focus detection area in the shooting screen (shooting range of the through image) based on an algorithm such as closest priority or center priority (or designation in the user's manual), and this focus. The position of the focusing lens 32 is adjusted so that the subject in the detection area is in focus. The control unit 35 acquires a through image to be processed after AF.

ステップS204:画像処理部41は、処理対象のスルー画像(S203)の色空間をHSV色空間(またはHLS色空間)に変換する。なお、S204の処理は、図2のS102の処理に対応するので重複説明を省略する。   Step S204: The image processing unit 41 converts the color space of the through image (S203) to be processed into the HSV color space (or HLS color space). Note that the processing in S204 corresponds to the processing in S102 in FIG.

ステップS205:注目領域設定部42は、S203の焦点検出エリアの位置(撮影画面内での焦点検出エリアのXY位置)を基準として、処理対象のスルー画像の一部に注目領域を設定する。S205での注目領域設定部42は、撮影画面内で焦点検出エリアに対応する範囲をそのまま注目領域とする。   Step S205: The attention area setting unit 42 sets the attention area in a part of the through image to be processed with reference to the position of the focus detection area in S203 (the XY position of the focus detection area in the photographing screen). The attention area setting unit 42 in S205 sets the area corresponding to the focus detection area in the photographing screen as the attention area as it is.

ステップS206:度数分布生成部43は、処理対象のスルー画像の注目領域に含まれる各画素の色相成分(H)に注目し、注目領域内での色相成分と画素数との対応関係を示す度数分布を求める。なお、S206の処理は、図2のS104の処理に対応するので重複説明を省略する。   Step S206: The frequency distribution generation unit 43 pays attention to the hue component (H) of each pixel included in the attention area of the through image to be processed, and indicates the correspondence between the hue component and the number of pixels in the attention area. Find the distribution. The process of S206 corresponds to the process of S104 in FIG.

ステップS207:制御部35は、注目領域での色相成分の度数分布(S206で求めたもの)につき、隣接する色相間で頻度の変化を平滑化する。なお、S207の処理は、図2のS105の処理に対応するので重複説明を省略する。   Step S207: The control unit 35 smoothes the change in frequency between adjacent hues with respect to the frequency distribution of the hue components in the attention area (obtained in S206). Note that the processing of S207 corresponds to the processing of S105 in FIG.

ステップS208:色成分解析部44は、注目領域での色相成分の度数分布(S207で平滑化されたもの)に基づいて、注目領域における主要色成分の範囲を少なくとも1以上設定する。なお、S208の処理は、図2のS106の処理に対応するので重複説明を省略する。   Step S208: The color component analysis unit 44 sets at least one or more main color component ranges in the attention area based on the frequency distribution of the hue components in the attention area (smoothed in S207). Note that the processing in S208 corresponds to the processing in S106 in FIG.

ステップS209:領域分割部45は、処理対象のスルー画像における各画素の色相値に基づいて、スルー画像の領域分割を行う。そして、領域分割部45は、領域分割後のスルー画像から主要被写体の領域を抽出する。なお、S209の処理は、図2のS107の処理に対応するので重複説明を省略する。   Step S209: The area dividing unit 45 performs area division of the through image based on the hue value of each pixel in the through image to be processed. Then, the area dividing unit 45 extracts the area of the main subject from the through image after the area division. Note that the processing of S209 corresponds to the processing of S107 in FIG.

ステップS210:制御部35は、主要被写体の領域(S209で求めたもの)の情報を用いて撮影条件を調整する。   Step S210: The control unit 35 adjusts the shooting conditions using information on the area of the main subject (obtained in S209).

一例として、S210での制御部35は、撮影画面に対する主要被写体の領域の広がり具合に応じてAEのアルゴリズムを変更する。具体的には、主要被写体の領域がまとまっている場合には、制御部35はスポット測光でAE演算を行う。一方、主要被写体の領域が広がっている場合には、制御部35は分割測光でAE演算を行う。   As an example, the control unit 35 in S210 changes the AE algorithm according to the extent of the area of the main subject on the shooting screen. Specifically, when the area of the main subject is collected, the control unit 35 performs AE calculation by spot photometry. On the other hand, when the area of the main subject is widened, the control unit 35 performs AE calculation by split photometry.

他の例として、S210での制御部35は、主要被写体の領域の広がりと色相成分とに基づいて、シーンモードの設定を切り替えてもよい。具体的には、主要被写体の領域がまとまっており、かつ、主要被写体の領域の色相が肌色に近い場合には、制御部35は、シーンモードを「ポートレート撮影」に設定する。また、主要被写体の領域が広がっており、かつ、主要被写体の領域の色相が緑色に近い場合には、制御部35は、シーンモードを「風景撮影」に設定する。   As another example, the control unit 35 in S210 may switch the setting of the scene mode based on the extent of the main subject area and the hue component. Specifically, when the area of the main subject is grouped and the hue of the area of the main subject is close to skin color, the control unit 35 sets the scene mode to “portrait shooting”. When the main subject area is wide and the hue of the main subject area is close to green, the control unit 35 sets the scene mode to “landscape photography”.

ステップS211:制御部35は、レリーズ釦40の全押し操作を受け付けたか否かを判定する。上記要件を満たす場合(YES側)にはS213に処理が移行する。一方、上記要件を満たさない場合(NO側)にはS212に処理が移行する。   Step S211: The control unit 35 determines whether or not a full pressing operation of the release button 40 has been accepted. If the above requirement is satisfied (YES side), the process proceeds to S213. On the other hand, if the above requirement is not satisfied (NO side), the process proceeds to S212.

ステップS212:制御部35は、レリーズ釦40の半押し操作が解除されたか否かを判定する。上記要件を満たす場合(YES側)には、制御部35はS202に戻って上記動作を繰り返す。一方、上記要件を満たさない場合(NO側)には、制御部35はS211に戻ってレリーズ釦40の全押し操作を待機する。   Step S212: The control unit 35 determines whether or not the half-press operation of the release button 40 has been released. If the above requirement is satisfied (YES side), the control unit 35 returns to S202 and repeats the above operation. On the other hand, when the above requirement is not satisfied (NO side), the control unit 35 returns to S211 and waits for a full pressing operation of the release button 40.

ステップS213:制御部35は、レリーズ釦40の全押しに応じて、撮像素子34を駆動させて本画像の撮像処理を実行する。本画像のデータは、画像処理部41で所定の処理が施された後に記録I/F39を介して記憶媒体39aに記録される。以上で、図8の流れ図の説明を終了する。   Step S213: The control unit 35 drives the imaging device 34 in response to the full press of the release button 40, and executes the imaging process of the main image. The data of the main image is recorded in the storage medium 39a via the recording I / F 39 after being subjected to predetermined processing by the image processing unit 41. Above, description of the flowchart of FIG. 8 is complete | finished.

他の実施形態の電子カメラ31は、一の実施形態とほぼ同様のアルゴリズムによって、スルー画像の領域分割を行うとともに、主要被写体の領域を抽出する。そして、電子カメラ31は、主要被写体の領域の情報を用いて、AE演算やシーンモードの設定などを行う。したがって、他の実施形態の電子カメラ31は、スルー画像の情報から多様な主要被写体の抽出を精度よく行うことができ、かつ主要被写体に合わせた撮影条件で良好な撮影画像を取得できる。   The electronic camera 31 of the other embodiment performs the region division of the through image and extracts the region of the main subject by the algorithm almost the same as that of the one embodiment. Then, the electronic camera 31 performs AE calculation, scene mode setting, and the like using information on the area of the main subject. Therefore, the electronic camera 31 according to another embodiment can accurately extract various main subjects from the information of the through image, and can acquire a good shot image under shooting conditions according to the main subject.

<実施形態の補足事項>
(1)上記の各実施形態では、注目領域設定部、度数分布生成部、色成分解析部、領域分割部の機能をプログラムによってソフトウエア的に実現する例を説明したが、ASICを用いて上記の各部をハードウエア的に実現しても勿論かまわない。
<Supplementary items of the embodiment>
(1) In each of the above embodiments, an example has been described in which the functions of the attention region setting unit, the frequency distribution generation unit, the color component analysis unit, and the region division unit are realized by software. Of course, each part may be realized by hardware.

(2)上記の他の実施形態では、コンパクト型の電子カメラでの構成例を説明した。しかし、本発明の撮像装置は、レンズ交換可能な一眼レフレックス型の電子カメラにも適用することが勿論可能である。なお、本発明を一眼レフレックス型の電子カメラに適用する場合には、本画像を撮像する撮像素子によってスルー画像を撮像してもよく、また、本画像を撮像する撮像素子とは別にスルー画像を撮像するための撮像素子を設けてもよい。   (2) In the other embodiments described above, the configuration example of the compact electronic camera has been described. However, the imaging apparatus of the present invention can of course be applied to a single-lens reflex type electronic camera in which lenses can be exchanged. Note that when the present invention is applied to a single-lens reflex electronic camera, a through image may be captured by an image sensor that captures the main image, and the through image is separate from the image sensor that captures the main image. An image sensor for imaging the image may be provided.

また、本発明の撮像装置は、例えば、携帯電話などの電子機器に内蔵されるカメラモジュールに適用することも可能である。   The imaging device of the present invention can also be applied to a camera module built in an electronic device such as a mobile phone.

(3)上記の一の実施形態において、撮影情報から焦点検出エリアの位置を取得できない場合、注目領域設定部21は、例えば撮影画像の中心位置で縦横がそれぞれ1/4のサイズの注目領域を設定してもよい。   (3) In the above-described one embodiment, when the position of the focus detection area cannot be acquired from the shooting information, the attention area setting unit 21 selects, for example, an attention area having a vertical and horizontal size of 1/4 at the center position of the captured image. It may be set.

(4)上記の一の実施形態において、画像処理装置は、画像ファイルの撮影画像よりも画像サイズが小さい縮小画像(例えば、撮影画像を間引いた画像など)を処理対象として、上記の領域分割処理を行ってもよい。   (4) In the above-described embodiment, the image processing apparatus uses the reduced image having a smaller image size than the captured image of the image file (for example, an image obtained by thinning the captured image) as a processing target. May be performed.

(5)上記の各実施形態では、処理対象の画像をHSV色空間またはHLS色空間に変換する例を説明したが、他の色空間に変換するものでもよい。一例として、L色空間の場合、度数分布生成部は注目領域の各画素をa平面上にマッピングし、a平面の色座標(0,0)を中心とする回転方向での度数分布を求めればよい。 (5) In each of the above-described embodiments, the example in which the image to be processed is converted into the HSV color space or the HLS color space has been described, but the image to be processed may be converted into another color space. Center as an example, the case of L * a * b * color space, frequency distribution generating unit maps each pixel of the region of interest on the a * b * plane, a * b * plane of the color coordinates (0, 0) The frequency distribution in the rotation direction is obtained.

(6)上記の一の実施形態において、S106での色成分解析部23は、分布関数上のピークおよび谷の位置を予め探索した後に、頻度の値の高さに応じて主要色成分の範囲を順次決定してもよい。   (6) In the one embodiment described above, the color component analysis unit 23 in S106 searches the peak and valley positions on the distribution function in advance, and then determines the range of the main color component according to the frequency value height. May be sequentially determined.

以上の詳細な説明により、実施形態の特徴点および利点は明らかになるであろう。これは、特許請求の範囲が、その精神および権利範囲を逸脱しない範囲で前述のような実施形態の特徴点および利点にまで及ぶことを意図するものである。また、当該技術分野において通常の知識を有する者であれば、あらゆる改良および変更に容易に想到できるはずであり、発明性を有する実施形態の範囲を前述したものに限定する意図はなく、実施形態に開示された範囲に含まれる適当な改良物および均等物によることも可能である。   From the above detailed description, features and advantages of the embodiments will become apparent. It is intended that the scope of the claims extend to the features and advantages of the embodiments as described above without departing from the spirit and scope of the right. Further, any person having ordinary knowledge in the technical field should be able to easily come up with any improvements and modifications, and there is no intention to limit the scope of the embodiments having the invention to those described above. It is also possible to use appropriate improvements and equivalents within the scope disclosed in.

11…コンピュータ、14…CPU、21,42…注目領域設定部、22,43…度数分布生成部、23,44…色成分解析部、24,45…領域分割部、31…電子カメラ、35…制御部 DESCRIPTION OF SYMBOLS 11 ... Computer, 14 ... CPU, 21, 42 ... Attention area setting part, 22, 43 ... Frequency distribution generation part, 23, 44 ... Color component analysis part, 24, 45 ... Area division part, 31 ... Electronic camera, 35 ... Control unit

特開2001−14457JP2001-14457

Claims (6)

撮像装置で撮影された撮影画像と該撮影画像の撮影情報とを取得するとともに、前記撮影情報を用いて前記撮影画像の一部に注目領域を設定する注目領域設定部と、
前記注目領域の画像に含まれる色成分の度数分布を求める度数分布生成部と、
前記度数分布に基づいて、前記注目領域における主要色成分の範囲を少なくとも1以上設定する色成分解析部と、
前記撮影画像の各位置の色成分を前記主要色成分の範囲に応じて分類し、該分類結果に基づいて前記撮影画像の領域分割を行う領域分割部と、
を備えることを特徴とする画像処理装置。
An attention area setting unit that obtains a captured image captured by the imaging apparatus and shooting information of the captured image, and sets an attention area in a part of the captured image using the shooting information;
A frequency distribution generation unit for determining a frequency distribution of color components included in the image of the region of interest;
A color component analyzer that sets at least one or more main color component ranges in the region of interest based on the frequency distribution;
Classifying the color components at each position of the captured image according to the range of the main color components, and an area dividing unit for dividing the area of the captured image based on the classification result;
An image processing apparatus comprising:
請求項1に記載の画像処理装置において、
前記注目領域設定部は、前記撮影画像を撮影したときの焦点検出エリアの位置情報を用いて、前記注目領域を設定することを特徴とする画像処理装置。
The image processing apparatus according to claim 1.
The image processing apparatus, wherein the region of interest setting unit sets the region of interest using position information of a focus detection area when the captured image is captured.
請求項1または請求項2に記載の画像処理装置において、
前記色成分として色相の情報を用いることを特徴とする画像処理装置。
The image processing apparatus according to claim 1 or 2,
An image processing apparatus using hue information as the color component.
請求項1から請求項3のいずれか1項に記載の画像処理装置において、
前記領域分割部は、前記度数分布での色成分の頻度が最も高い値を示す前記主要色成分の範囲に基づいて、前記撮影画像から主要被写体の領域を抽出することを特徴とする画像処理装置。
The image processing apparatus according to any one of claims 1 to 3,
The area dividing unit extracts an area of a main subject from the photographed image based on a range of the main color component showing a value with the highest frequency of color components in the frequency distribution. .
請求項1から請求項4のいずれか1項に記載の画像処理装置を備えることを特徴とするカメラ。   A camera comprising the image processing apparatus according to any one of claims 1 to 4. 撮像装置で撮影された撮影画像と該撮影画像の撮影情報とを取得するとともに、前記撮影情報を用いて前記撮影画像の一部に注目領域を設定する注目領域処理と、
前記注目領域の画像に含まれる色成分の度数分布を求める度数分布生成処理と、
前記度数分布に基づいて、前記注目領域における主要色成分の範囲を少なくとも1以上設定する色成分解析処理と、
前記撮影画像の各位置の色成分を前記主要色成分の範囲に応じて分類し、該分類結果に基づいて前記撮影画像の領域分割を行う領域分割処理と、
をコンピュータに実行させることを特徴とするプログラム。
Attention area processing for acquiring a photographed image photographed by the imaging device and photographing information of the photographed image, and setting a attention area in a part of the photographed image using the photographing information;
A frequency distribution generation process for obtaining a frequency distribution of color components included in the image of the region of interest;
A color component analysis process for setting at least one or more main color component ranges in the region of interest based on the frequency distribution;
Classifying the color components at each position of the photographed image according to the range of the main color components, and area division processing for performing area division of the photographed image based on the classification result;
A program that causes a computer to execute.
JP2009045946A 2009-02-27 2009-02-27 Image processing apparatus, camera, and program Active JP5509621B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009045946A JP5509621B2 (en) 2009-02-27 2009-02-27 Image processing apparatus, camera, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009045946A JP5509621B2 (en) 2009-02-27 2009-02-27 Image processing apparatus, camera, and program

Publications (2)

Publication Number Publication Date
JP2010200270A true JP2010200270A (en) 2010-09-09
JP5509621B2 JP5509621B2 (en) 2014-06-04

Family

ID=42824470

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009045946A Active JP5509621B2 (en) 2009-02-27 2009-02-27 Image processing apparatus, camera, and program

Country Status (1)

Country Link
JP (1) JP5509621B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013157934A (en) * 2012-01-31 2013-08-15 Nikon Corp Image processing device, imaging device, and image processing program
WO2014115421A1 (en) * 2013-01-25 2014-07-31 富士フイルム株式会社 Image capture device and operation control method thereof
JP2015119326A (en) * 2013-12-18 2015-06-25 キヤノン株式会社 Image processing device, method and program
JP2016136402A (en) * 2016-02-29 2016-07-28 株式会社ニコン Region extraction device, imaging device and region extraction program

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001249265A (en) * 2000-03-02 2001-09-14 Olympus Optical Co Ltd Range finder
JP2007110638A (en) * 2005-10-17 2007-04-26 Nikon Corp Object analyzing apparatus, imaging apparatus, and image processing program
JP2008046354A (en) * 2006-08-16 2008-02-28 Nikon Corp Object tracking device and camera
JP2009033738A (en) * 2007-07-04 2009-02-12 Sanyo Electric Co Ltd Imaging apparatus, data structure of image file

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001249265A (en) * 2000-03-02 2001-09-14 Olympus Optical Co Ltd Range finder
JP2007110638A (en) * 2005-10-17 2007-04-26 Nikon Corp Object analyzing apparatus, imaging apparatus, and image processing program
JP2008046354A (en) * 2006-08-16 2008-02-28 Nikon Corp Object tracking device and camera
JP2009033738A (en) * 2007-07-04 2009-02-12 Sanyo Electric Co Ltd Imaging apparatus, data structure of image file

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013157934A (en) * 2012-01-31 2013-08-15 Nikon Corp Image processing device, imaging device, and image processing program
WO2014115421A1 (en) * 2013-01-25 2014-07-31 富士フイルム株式会社 Image capture device and operation control method thereof
CN104871532A (en) * 2013-01-25 2015-08-26 富士胶片株式会社 Image capture device and operation control method thereof
JP5832673B2 (en) * 2013-01-25 2015-12-16 富士フイルム株式会社 Imaging apparatus and operation control method thereof
JPWO2014115421A1 (en) * 2013-01-25 2017-01-26 富士フイルム株式会社 Imaging apparatus and operation control method thereof
CN104871532B (en) * 2013-01-25 2017-03-15 富士胶片株式会社 Filming apparatus and its method of controlling operation
US9948828B2 (en) 2013-01-25 2018-04-17 Fujifilm Corporation Image sensing apparatus and method of controlling operation of same
JP2015119326A (en) * 2013-12-18 2015-06-25 キヤノン株式会社 Image processing device, method and program
US9936158B2 (en) 2013-12-18 2018-04-03 Canon Kabushiki Kaisha Image processing apparatus, method and program
JP2016136402A (en) * 2016-02-29 2016-07-28 株式会社ニコン Region extraction device, imaging device and region extraction program

Also Published As

Publication number Publication date
JP5509621B2 (en) 2014-06-04

Similar Documents

Publication Publication Date Title
US20090109304A1 (en) Image processing device, image processing method, and computer program product
US8254630B2 (en) Subject extracting method and device by eliminating a background region using binary masks
JP4974812B2 (en) Electronic camera
JP6472183B2 (en) Image processing apparatus, control method thereof, and program
JP2011035636A (en) Image processor and method
JP2003061105A (en) Image processing method, image processing program, image processing apparatus, and digital still camera using the image processing apparatus
JP2009111716A (en) Imaging apparatus, program and template generating method
JP5509621B2 (en) Image processing apparatus, camera, and program
JP5471130B2 (en) Image processing apparatus and method
JP2012175361A (en) Subject specification apparatus and subject tracking device
JP5515492B2 (en) Image processing apparatus and method
JP5463688B2 (en) Focus evaluation device, camera and program
JP5146223B2 (en) Program, camera, image processing apparatus, and image contour extraction method
JP6776532B2 (en) Image processing equipment, imaging equipment, electronic devices and image processing programs
JP5631181B2 (en) Image processing apparatus, control method therefor, and program
JP2018152095A (en) Image processing apparatus, imaging apparatus, and image processing program
JP6326841B2 (en) Image processing apparatus, imaging apparatus, and image processing program
JP6248662B2 (en) Image processing apparatus, imaging apparatus, and image processing program
JP5629562B2 (en) Image processing apparatus, control method therefor, and program
JP2005057623A (en) Image data processor
JP2009130840A (en) Imaging apparatus, control method thereof ,and program
JP5487126B2 (en) Image processing apparatus, imaging apparatus, and image processing program
JP2011147076A (en) Image processing apparatus, image capturing apparatus and program
JP2010028370A (en) Imaging device
JP2007201679A (en) Imaging apparatus, image processing method, 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: 20120223

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20121211

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130502

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130514

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130711

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20131029

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20131226

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140310

R150 Certificate of patent or registration of utility model

Ref document number: 5509621

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

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250