JP2015108947A - Image processor, control method thereof, and control program - Google Patents

Image processor, control method thereof, and control program Download PDF

Info

Publication number
JP2015108947A
JP2015108947A JP2013251138A JP2013251138A JP2015108947A JP 2015108947 A JP2015108947 A JP 2015108947A JP 2013251138 A JP2013251138 A JP 2013251138A JP 2013251138 A JP2013251138 A JP 2013251138A JP 2015108947 A JP2015108947 A JP 2015108947A
Authority
JP
Japan
Prior art keywords
specific area
pixel value
area
candidate
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
JP2013251138A
Other languages
Japanese (ja)
Other versions
JP6257292B2 (en
Inventor
本田 充輝
Mitsuteru Honda
充輝 本田
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2013251138A priority Critical patent/JP6257292B2/en
Publication of JP2015108947A publication Critical patent/JP2015108947A/en
Application granted granted Critical
Publication of JP6257292B2 publication Critical patent/JP6257292B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Studio Devices (AREA)
  • Image Analysis (AREA)

Abstract

PROBLEM TO BE SOLVED: To extract a specific area by discriminating the specific area, such as an empty area with high accuracy regardless of a composition during photographing.SOLUTION: An image processing part divides an input image into a plurality of areas including a specific area in accordance with a feature amount showing a feature of the input image under control of a control part, determines whether each area other than the specific area is adjacent on condition predetermined as the specific area, and makes an area adjacent on the predetermined condition a specific area candidate. The image processing part performs calculation as a reference pixel value in accordance with a pixel value of the specific area, calculates a representative pixel value in accordance with a pixel value of the specific area candidate, determines whether to integrate the specific area candidate to the specific area in accordance with the reference pixel value and the representative pixel value, and integrates the specific area candidate to the specific area on the basis of the determination result thereof.

Description

本発明は、画像処理装置、その制御方法、および制御プログラムに関し、特に、入力画像から所定の領域を示す特定領域を判別して抽出する画像処理装置に関する。   The present invention relates to an image processing apparatus, a control method thereof, and a control program, and more particularly to an image processing apparatus that discriminates and extracts a specific area indicating a predetermined area from an input image.

一般に、デジタルカメラなどの撮像装置によって、被写体における明暗の差が激しい撮影シーンを撮影する際、例えば、明るい空を背景として人物および背景を逆光で撮影することがある。このような撮影シーンにおいて、人物および背景の明るさが適正レベルになるように露光を行うと空が飽和してしまう。一方、空の明るさを適正に露光すると、人物および背景が露光アンダーで撮影されてしまう。   In general, when shooting a shooting scene with a sharp contrast in a subject with an imaging device such as a digital camera, for example, a person and a background may be shot in backlight against a bright sky. In such a photographic scene, if the exposure is performed so that the brightness of the person and the background is at an appropriate level, the sky is saturated. On the other hand, if the brightness of the sky is properly exposed, the person and the background are photographed underexposed.

このような状態を解決するため、例えば、空および背景の領域を分割して、これら領域の各々に対する最適な露光条件を決定して2枚の画像を撮影し、これら画像を合成するようにした画像処理装置が知られている(特許文献1参照)。さらに、空および背景の領域を分割する手法として、例えば、青色でかつエッジ信号が存在しないという特徴を有する領域を空領域として抽出する手法がある。   In order to solve such a situation, for example, the sky and background regions are divided, the optimum exposure condition for each of these regions is determined, two images are taken, and these images are combined. An image processing apparatus is known (see Patent Document 1). Further, as a method for dividing the sky and background regions, for example, there is a method of extracting a region having a feature of being blue and having no edge signal as a sky region.

特開2004−159211号公報Japanese Patent Application Laid-Open No. 2004-159211

ところが、青色でかつエッジ信号が存在しないという特徴を有する領域を空領域として抽出すると、構図によっては空領域を良好に抽出できないことがある。   However, if an area having the feature of being blue and having no edge signal is extracted as an empty area, the empty area may not be extracted properly depending on the composition.

図11は、従来の画像処理装置における空領域の抽出を説明するための図である。そして、図11(a)は構図の一例を示す図であり、図11(b)は図11(a)に示す構図における空領域の抽出結果を示す図である。   FIG. 11 is a diagram for explaining extraction of an empty area in a conventional image processing apparatus. FIG. 11A is a diagram illustrating an example of the composition, and FIG. 11B is a diagram illustrating the extraction result of the empty area in the composition illustrated in FIG.

いま、図11(a)に示す構図においては、画面上部に空が位置し、画面下部に背景が位置している。そして、画面上部に空が抜けて見える被写体1101が存在する。このような構図において得られた画像について空領域の抽出を行おうとすると、図11(b)に示すように、画像処理装置は符号B1で示す領域を背景領域として判定するものの、符号B2で示す領域にはエッジ領域があるとして背景領域と判定してしまうことになる。そして、画像処理装置は符合A1で示す領域のみを空領域として判定する。   In the composition shown in FIG. 11A, the sky is positioned at the top of the screen and the background is positioned at the bottom of the screen. There is a subject 1101 that can be seen through the sky at the top of the screen. When an empty area is extracted from an image obtained in such a composition, the image processing apparatus determines the area indicated by reference numeral B1 as a background area as shown in FIG. 11B, but is indicated by reference numeral B2. If the area has an edge area, it is determined as a background area. Then, the image processing apparatus determines only the area indicated by reference numeral A1 as an empty area.

この結果、符合B2で示す領域に存在する空領域は飽和してしまうことになる。このような問題を解決するため、エッジ信号を確認することなく、色情報のみで領域の判定を行おうとすると、今度は、符号B1で示す領域に空領域と同一の色の被写体が存在すると、符号B1で示す領域において空領域と同一の色の被写体が露光アンダーになってしまうという。   As a result, the empty area existing in the area indicated by the symbol B2 is saturated. In order to solve such a problem, if an area is determined only by color information without confirming an edge signal, an object having the same color as the empty area is present in the area indicated by reference numeral B1. It is said that a subject having the same color as the sky area is underexposed in the area indicated by reference numeral B1.

従って、本発明の目的は撮影の際の構図に拘わらず、空領域などの特定領域を精度よく判別して抽出することのできる画像処理装置、その制御方法、および制御プログラムを提供することにある。   Accordingly, an object of the present invention is to provide an image processing apparatus, a control method thereof, and a control program capable of accurately identifying and extracting a specific area such as an empty area regardless of the composition at the time of shooting. .

上記の目的を達成するため、本発明による画像処理装置は、入力画像から特定の領域を特定領域として判別して抽出する画像処理装置であって、前記入力画像の特徴を示す特徴量に応じて前記入力画像を、前記特定領域を含む複数の領域に分割する分割手段と、前記特定領域を除く前記領域の各々について、前記特定領域と予め定められた条件で隣接しているか否かを判定して、前記予め定められた条件で隣接する領域を特定領域候補とする判定手段と、前記特定領域における画素値に応じて基準となる画素値を基準画素値として算出し、さらに、前記特定領域候補における画素値に応じて前記特定領域候補を代表する代表画素値を算出する算出手段と、前記基準画素値および前記代表画素値に応じて前記特定領域候補を前記特定領域に統合するか否かを判定して、その判定結果に基づいて前記特定領域候補を前記特定領域に統合する領域統合手段と、を有することを特徴とする。   In order to achieve the above object, an image processing apparatus according to the present invention is an image processing apparatus that discriminates and extracts a specific area as a specific area from an input image according to a feature amount indicating a characteristic of the input image. A dividing unit that divides the input image into a plurality of areas including the specific area, and each of the areas excluding the specific area determines whether or not the specific area is adjacent to the specific area under a predetermined condition. Determining means for setting a region adjacent under the predetermined condition as a specific region candidate, calculating a reference pixel value as a reference pixel value according to a pixel value in the specific region, and further selecting the specific region candidate Calculating means for calculating a representative pixel value representative of the specific area candidate in accordance with the pixel value in, and integrating the specific area candidate in the specific area in accordance with the reference pixel value and the representative pixel value Luke and determines whether to a region integrating means for integrating the specific area of the specific region candidate based on the determination result, characterized in that it has a.

本発明による制御方法は、入力画像から特定の領域を特定領域として判別して抽出する画像処理装置の制御方法であって、前記入力画像の特徴を示す特徴量に応じて前記入力画像を、前記特定領域を含む複数の領域に分割する分割ステップと、前記特定領域を除く前記領域の各々について、前記特定領域と予め定められた条件で隣接しているか否かを判定して、前記予め定められた条件で隣接する領域を特定領域候補とする判定ステップと、前記特定領域における画素値に応じて基準となる画素値を基準画素値として算出し、さらに、前記特定領域候補における画素値に応じて前記特定領域候補を代表する代表画素値を算出する算出ステップと、前記基準画素値および前記代表画素値に応じて前記特定領域候補を前記特定領域に統合するか否かを判定して、その判定結果に基づいて前記特定領域候補を前記特定領域に統合する領域統合ステップと、を有することを特徴とする。   The control method according to the present invention is a control method for an image processing apparatus that discriminates and extracts a specific region from an input image as a specific region, and the input image is selected according to a feature amount indicating a feature of the input image. A division step of dividing into a plurality of areas including a specific area, and each of the areas excluding the specific area is determined whether it is adjacent to the specific area under a predetermined condition, and the predetermined area is determined. A step of determining an area adjacent to the specific area as a specific area candidate, a reference pixel value is calculated as a reference pixel value according to a pixel value in the specific area, and further according to a pixel value in the specific area candidate A calculation step of calculating a representative pixel value representing the specific area candidate, and whether or not to integrate the specific area candidate into the specific area according to the reference pixel value and the representative pixel value To determine the, and having a, a region integrating step of integrating the specific area of the specific region candidate based on the determination result.

本発明による制御プログラムは、入力画像から特定の領域を特定領域として判別して抽出する画像処理装置で用いられる制御プログラムであって、前記画像処理装置が備えるコンピュータに、前記入力画像の特徴を示す特徴量に応じて前記入力画像を、前記特定領域を含む複数の領域に分割する分割ステップと、前記特定領域を除く前記領域の各々について、前記特定領域と予め定められた条件で隣接しているか否かを判定して、前記予め定められた条件で隣接する領域を特定領域候補とする判定ステップと、前記特定領域における画素値に応じて基準となる画素値を基準画素値として算出し、さらに、前記特定領域候補における画素値に応じて前記特定領域候補を代表する代表画素値を算出する算出ステップと、前記基準画素値および前記代表画素値に応じて前記特定領域候補を前記特定領域に統合するか否かを判定して、その判定結果に基づいて前記特定領域候補を前記特定領域に統合する領域統合ステップと、を実行させることを特徴とする。   A control program according to the present invention is a control program used in an image processing apparatus that discriminates and extracts a specific area as a specific area from an input image, and shows the characteristics of the input image on a computer included in the image processing apparatus. A division step of dividing the input image into a plurality of regions including the specific region according to a feature amount, and each of the regions excluding the specific region is adjacent to the specific region under a predetermined condition Determining whether or not to determine an adjacent region under the predetermined condition as a specific region candidate, calculating a reference pixel value as a reference pixel value according to a pixel value in the specific region, and Calculating a representative pixel value representing the specific area candidate according to a pixel value in the specific area candidate; the reference pixel value; and Determining whether to integrate the specific area candidate into the specific area according to a table pixel value, and executing an area integration step of integrating the specific area candidate into the specific area based on the determination result It is characterized by that.

本発明によれば、特定領域における基準画素値と特定領域候補における代表画素値とに応じて特定領域候補を特定領域に統合するか否かを判定するようにしたので、撮影の際の構図に拘わらず特定領域を精度よく判別して抽出することができる。   According to the present invention, it is determined whether or not to integrate the specific area candidate into the specific area according to the reference pixel value in the specific area and the representative pixel value in the specific area candidate. Regardless, the specific area can be accurately identified and extracted.

本発明の第1の実施形態による画像処理装置を備える撮像装置の一例を示すブロック図である。It is a block diagram which shows an example of an imaging device provided with the image processing apparatus by the 1st Embodiment of this invention. 図1に示すカメラで行われる領域判別処理を説明するためのフローチャートである。It is a flowchart for demonstrating the area | region discrimination | determination process performed with the camera shown in FIG. 図1に示すカメラで行われる領域判別を説明するための図であり、(a)は画像の一例を示す図、(b)は領域分割後の画像を示す図、(c)は空領域候補を示す図、(d)は領域判別後の画像を示す図である。It is a figure for demonstrating the area | region discrimination | determination performed with the camera shown in FIG. 1, (a) is a figure which shows an example of an image, (b) is a figure which shows the image after area | region division, (c) is an empty area candidate (D) is a figure which shows the image after area | region discrimination | determination. 空領域がグラデーションを有する際の基準画素値の算出の一例を説明するための図である。It is a figure for demonstrating an example of calculation of the reference | standard pixel value when an empty area | region has gradation. 図4に示す画像においてブロック毎の平均輝度を説明するための図であり、(a)は垂直方向のブロック位置を0とした場合のブロック毎の平均輝度値を示す図、 (b)は水平方向のブロック位置を0とした場合のブロック毎の平均輝度値を示す図、(c)は垂直方向のブロック位置を3とした場合のブロック毎の平均輝度値を示す図である。FIG. 5 is a diagram for explaining the average luminance for each block in the image shown in FIG. 4, in which (a) shows the average luminance value for each block when the vertical block position is 0, and (b) is horizontal. The figure which shows the average luminance value for every block when the block position of a direction is set to 0, (c) is a figure which shows the average luminance value for every block when the block position of a vertical direction is set to 3. FIG. 図2に示す空領域統合処理を説明するためのフローチャートである。It is a flowchart for demonstrating the empty area | region integration process shown in FIG. 本発明の第2の実施形態に係るカメラで行われる空領域統合処理の一例を説明するためのフローチャートである。It is a flowchart for demonstrating an example of the sky area | region integration process performed with the camera which concerns on the 2nd Embodiment of this invention. 空領域候補の画素を空領域の画素とする処理を説明するための図であり、(a)は空領域の画素と空領域候補の画素と示す図、(b)は空領域候補の画素を空領域の画素に変更した状態の一例を示す図、(c)は空領域候補の画素を空領域の画素に変更した状態の一例を示す図である。It is a figure for demonstrating the process which makes the pixel of a sky region candidate a pixel of a sky region, (a) is a figure which shows a pixel of a sky region and a pixel of a sky region candidate, (b) is a pixel of a sky region candidate. The figure which shows an example of the state changed into the pixel of the sky area, (c) is a figure which shows an example of the state which changed the pixel of the sky area candidate into the pixel of the sky area. 本発明の第3の実施形態に係るカメラで行われる領域判別処理の一例を説明廃るためのフローチャートである。It is a flowchart for abolishing description of an example of the area | region discrimination | determination process performed with the camera which concerns on the 3rd Embodiment of this invention. 図9に示す信頼度分布の算出を説明するための図であり、(a)は画素毎の空領域である空確率を示す図、(b)は空確率のヒストグラムを示す図である。FIG. 10 is a diagram for explaining calculation of the reliability distribution shown in FIG. 9, where (a) is a diagram showing a sky probability that is a sky region for each pixel, and (b) is a diagram showing a histogram of sky probability. 従来の画像処理装置における空領域の抽出を説明するための図であり、(a)は構図の一例を示す図であり、(b)は(a)に示す構図における空領域の抽出結果を示す図である。It is a figure for demonstrating extraction of the empty area | region in the conventional image processing apparatus, (a) is a figure which shows an example of a composition, (b) shows the extraction result of the empty area in the composition shown to (a). FIG.

以下、本発明の実施の形態による画像処理装置の一例について図面を参照して説明する。   Hereinafter, an example of an image processing apparatus according to an embodiment of the present invention will be described with reference to the drawings.

[第1の実施形態]
図1は、本発明の第1の実施形態による画像処理装置を備える撮像装置の一例を示すブロック図である。
[First Embodiment]
FIG. 1 is a block diagram illustrating an example of an imaging apparatus including an image processing apparatus according to the first embodiment of the present invention.

図示の撮像装置は、例えば、デジタルカメラ(以下単にカメラと呼ぶ)であり、撮像部101を有している。撮像部101は撮影レンズユニット(以下単に撮影レンズと呼ぶ)、撮像素子、および撮像素子を駆動するための駆動回路を備えている。そして、撮像素子は、例えば、CCD又はCMOSセンサであり、撮影レンズを介して結像した光学像に応じた電気信号(アナログ画像信号)を出力する。   The illustrated imaging apparatus is, for example, a digital camera (hereinafter simply referred to as a camera) and includes an imaging unit 101. The imaging unit 101 includes a photographic lens unit (hereinafter simply referred to as a photographic lens), an imaging element, and a drive circuit for driving the imaging element. The imaging element is, for example, a CCD or CMOS sensor, and outputs an electrical signal (analog image signal) corresponding to the optical image formed through the photographing lens.

撮像部101から出力されたアナログ画像信号は、A/D変換回路102によってデジタル画像信号(画像データ)に変換される。そして、この画像データは画像処理部103に入力される。画像処理部103は画像データに対して、既知のホワイトバランス処理、ノイズ抑圧処理、階調変換処理、およびエッジ強調補正処理などを行って、輝度信号Yおよび色差信号UおよびVを処理済み画像データとして出力する。さらに、画像処理部103は後述する領域判別処理を行う。   The analog image signal output from the imaging unit 101 is converted into a digital image signal (image data) by the A / D conversion circuit 102. The image data is input to the image processing unit 103. The image processing unit 103 performs known white balance processing, noise suppression processing, gradation conversion processing, edge enhancement correction processing, and the like on the image data to process the luminance signal Y and the color difference signals U and V into processed image data. Output as. Further, the image processing unit 103 performs area determination processing described later.

画像処理103から出力された処理済み画像データは、記憶媒体106に記録される。さらに、表示部105には処理済み画像データに応じた画像が表示される。制御部104は、カメラ全体の制御を司る。つまり、制御部10は画像処理部103、表示部105、および記録媒体106などの動作を制御する。画像処理部103、制御部104、表示部105、および記憶媒体106はバス107によって相互に接続され、バス107を介して各種データが送受される。   The processed image data output from the image processing 103 is recorded in the storage medium 106. Further, the display unit 105 displays an image corresponding to the processed image data. The control unit 104 controls the entire camera. That is, the control unit 10 controls operations of the image processing unit 103, the display unit 105, the recording medium 106, and the like. The image processing unit 103, the control unit 104, the display unit 105, and the storage medium 106 are connected to each other via a bus 107, and various data are transmitted / received via the bus 107.

図2は、図1に示すカメラで行われる領域判別処理を説明するためのフローチャートである。なお、図2に示すフローチャートに係る処理は、制御部104の制御下で画像処理部103によって行われる。また、ここでは、画像データが示す画像には空領域および背景領域が含まれており、空領域と背景領域とを領域判別して分割する場合について説明する。   FIG. 2 is a flowchart for explaining an area determination process performed by the camera shown in FIG. 2 is performed by the image processing unit 103 under the control of the control unit 104. Here, a case will be described in which the image indicated by the image data includes a sky region and a background region, and the sky region and the background region are divided and divided.

画像処理部103は画像データ(入力画像)を受けると、当該画像データの特徴量に応じて画像を所定のサイズの複数のブロックに分割する。そして、画像処理部103は、例えば、ブロック毎に空領域および背景領域を判別する領域判別を行う(ステップS201)。   Upon receiving the image data (input image), the image processing unit 103 divides the image into a plurality of blocks having a predetermined size according to the feature amount of the image data. Then, for example, the image processing unit 103 performs area determination for determining an empty area and a background area for each block (step S201).

空領域(つまり、ここでは特定領域)を判別する際には、例えば、画像処理部103はその色が類似する領域を検出する。この際には、画像処理部103は画素の色を示すRGBの色情報をHSV表色系に変換して色相輝度情報を用いて、互いに隣接する領域において同一の色および輝度を有する領域を隣接領域として検出する。画像処理部103はこれら隣接領域を統合して統合領域を得る。そして、画像処理部103は統合領域の面積が所定の面積(つまり、所定の閾値)以上であると、この統合領域を空領域とする。   When determining an empty area (that is, a specific area in this case), for example, the image processing unit 103 detects an area having a similar color. At this time, the image processing unit 103 converts the RGB color information indicating the color of the pixel into the HSV color system and uses the hue luminance information, and adjacent areas having the same color and luminance are adjacent to each other. Detect as a region. The image processing unit 103 integrates these adjacent areas to obtain an integrated area. Then, when the area of the integrated region is equal to or larger than a predetermined area (that is, a predetermined threshold), the image processing unit 103 sets the integrated region as an empty region.

図3は、図1に示すカメラで行われる領域判別を説明するための図である。そして、図3(a)は画像の一例を示す図であり、図3(b)は領域分割後の画像を示す図である。また、図3(c)は空領域候補を示す図であり、図3(d)は領域判別後の画像を示す図である。   FIG. 3 is a diagram for explaining region discrimination performed by the camera shown in FIG. FIG. 3A shows an example of an image, and FIG. 3B shows an image after region division. FIG. 3C is a diagram showing empty region candidates, and FIG. 3D is a diagram showing an image after region discrimination.

図3(a)に示す例では、領域1、領域2、および領域3の全てが空領域として判別される色および輝度情報を有するものとする。ここでは、領域1についてその面積が閾値(面積閾値)以上であるので、画像処理部103は領域1を空領域と判定する。一方、領域2および領域3についてはその面積が閾値未満であるので、画像処理部103は領域2および領域3については空領域と判定せず背景領域に分類する。   In the example shown in FIG. 3A, it is assumed that all of the region 1, the region 2, and the region 3 have color and luminance information that is determined as an empty region. Here, since the area of the region 1 is equal to or larger than the threshold (area threshold), the image processing unit 103 determines that the region 1 is an empty region. On the other hand, since the areas of the regions 2 and 3 are less than the threshold, the image processing unit 103 classifies the regions 2 and 3 as background regions without determining that the regions 2 and 3 are empty regions.

この結果、画像処理部103は図3(a)に示す元画像について、図3(b)に示すように、空領域および背景領域に分割する。   As a result, the image processing unit 103 divides the original image shown in FIG. 3A into a sky area and a background area as shown in FIG.

再び図2を参照して、ステップS201の処理に続いて、画像処理部103は画像に空領域が存在したか否かを判定する(ステップS202)。空領域が存在しないと(ステップS202において、NO)、画像処理部103は領域判別処理を終了する。一方、空領域が存在すると(ステップS202において、YES)、画像処理部103は、ステップS201で背景領域と判別された領域について、空領域候補判定を行って空領域候補(つまり、特定領域候補)である領域が存在するか否かを判定する(ステップS203)。   Referring to FIG. 2 again, following the process of step S201, the image processing unit 103 determines whether or not there is an empty area in the image (step S202). If there is no empty area (NO in step S202), the image processing unit 103 ends the area determination process. On the other hand, if a sky area exists (YES in step S202), the image processing unit 103 performs sky area candidate determination on the area determined as the background area in step S201, and thus a sky area candidate (that is, a specific area candidate). It is determined whether or not there is an area (step S203).

空領域候補判定の際には、例えば、画像処理部103は空領域にその上左右が囲まれた領域を空領域候補と判定する。図3(b)に示す背景領域において、符号Aで示す領域に位置する背景領域はその上左右が空領域と接している(背景領域と空領域との境界が存在する:予め定められた条件)。このため、符号Aで示す領域に位置する背景領域は空領域である可能性が高いので、図3(c)に示すように、符号Aで示す領域に位置する背景領域は空領域候補とされる。   In the determination of the empty area candidate, for example, the image processing unit 103 determines an area surrounded by the empty area on the upper and left sides as an empty area candidate. In the background area shown in FIG. 3B, the background area located in the area indicated by the symbol A is in contact with the sky area on the left and right (the boundary between the background area and the sky area exists: predetermined condition) ). For this reason, there is a high possibility that the background region located in the region indicated by the symbol A is an empty region, and as shown in FIG. 3C, the background region located in the region indicated by the symbol A is determined as an empty region candidate. The

一方、符号Bで示す領域に位置する背景領域については、その左右が空領域と接していない(左右で背景領域と空領域とが接していない)。このため、空領域である可能性が低いので、符号Bで示す領域に位置する背景領域については、図3(c)に示すように、背景領域のままとされる。   On the other hand, the left and right sides of the background region located in the region indicated by the symbol B are not in contact with the sky region (the background region and the sky region are not in contact on the left and right). For this reason, since there is a low possibility that it is an empty area, the background area located in the area indicated by the symbol B is left as the background area as shown in FIG.

続いて、画像処理部103は空領域における基準画素値(Ysky,Usky,Vsky)を求める。ここでは、例えば、ステップS201において空領域と判別した領域における画素値の平均値などを用いて空領域における基準画素値を求める。なお、次のようにして、基準画素値を求めるようにしてもよい。   Subsequently, the image processing unit 103 obtains reference pixel values (Ysky, Usky, Vsky) in the sky area. Here, for example, the reference pixel value in the sky region is obtained using the average value of the pixel values in the region determined as the sky region in step S201. The reference pixel value may be obtained as follows.

図4は、空領域がグラデーションを有する際の基準画素値の算出の一例を説明するための図である。   FIG. 4 is a diagram for explaining an example of calculation of the reference pixel value when the sky region has gradation.

いま、空領域が水平方向のグラデーションを有しているものとすると、画像を複数のブロック1001に分割して、ブロック1001の各々について平均輝度値(Y_AVE(xb,yb))を求める。なお、xbは水平方向のブロック位置、ybは垂直方向のブロック位置を示す。図示の例では、水平方向のブロック数を12、垂直方向のブロック数を9とした。   Assuming that the sky region has a horizontal gradation, the image is divided into a plurality of blocks 1001 and an average luminance value (Y_AVE (xb, yb)) is obtained for each of the blocks 1001. Note that xb represents a horizontal block position, and yb represents a vertical block position. In the illustrated example, the number of blocks in the horizontal direction is 12 and the number of blocks in the vertical direction is 9.

図5は、図4に示す画像においてブロック毎の平均輝度を説明するための図である。そして、図5(a)は垂直方向のブロック位置を0とした場合のブロック毎の平均輝度値を示す図であり、図5(b)は水平方向のブロック位置を0とした場合のブロック毎の平均輝度値を示す図である。また、図5(c)は垂直方向のブロック位置を3とした場合のブロック毎の平均輝度値を示す図である。   FIG. 5 is a diagram for explaining the average luminance for each block in the image shown in FIG. FIG. 5A is a diagram showing the average luminance value for each block when the vertical block position is 0, and FIG. 5B is the block when the horizontal block position is 0. It is a figure which shows the average luminance value. FIG. 5C is a diagram showing an average luminance value for each block when the block position in the vertical direction is 3.

図5(a)において、横軸はブロックの位置、縦軸はブロック毎の平均輝度値を示す。yb=0とした場合の平均輝度値Y_AVE(xb,0)とすると、水平方向におけるブロック間での傾きGRAD_H(xb,0)は、次の式(1)で示される。   In FIG. 5A, the horizontal axis indicates the position of the block, and the vertical axis indicates the average luminance value for each block. Assuming that the average luminance value Y_AVE (xb, 0) when yb = 0 is set, the gradient GRAD_H (xb, 0) between the blocks in the horizontal direction is expressed by the following equation (1).

GRAD_H(xb,0)=Y_AVE(xb+1,0)−Y_AVE(xb,0) (1)
図示の例では、傾きの平均値(xb=0〜10)が所定の値以上となるので、水平方向に空領域はグラデーションを有すると判定される。
GRAD_H (xb, 0) = Y_AVE (xb + 1,0) −Y_AVE (xb, 0) (1)
In the illustrated example, since the average value of inclination (xb = 0 to 10) is equal to or greater than a predetermined value, it is determined that the sky region has a gradation in the horizontal direction.

図5(b)では、xb=0とした場合の平均輝度値Y_AVE(0,yb)とすると、垂直方向におけるブロック間での傾きGRAD_V(0,yb)は次の式(2)で示される。   In FIG. 5B, assuming that the average luminance value Y_AVE (0, yb) when xb = 0 is satisfied, the gradient GRAD_V (0, yb) between the blocks in the vertical direction is expressed by the following equation (2). .

GRAD_V(0,yb)=Y_AVE(0,yb+1)−Y_AVE(0,yb) (2)
図示の例では、傾きの平均値(yb=0〜7)が所定の値未満となるので、垂直方向には空領域はグラデーションを有しないと判定される。
GRAD_V (0, yb) = Y_AVE (0, yb + 1) −Y_AVE (0, yb) (2)
In the illustrated example, the average value of the slope (yb = 0 to 7) is less than a predetermined value, so that it is determined that the sky region does not have gradation in the vertical direction.

空領域は水平方向にグラデーションを有するので、水平方向におけるブロック間の傾きGRAD_H(xb,0)とブロック毎の平均輝度値Y_AVE(xb−1,yb)とに応じて空領域候補であるブロックの基準輝度値が求められる。基準輝度値Y_TARGET(xb,yb)は次の式(3)で示される。   Since the sky region has a gradation in the horizontal direction, the block of the candidate sky region according to the gradient GRAD_H (xb, 0) between the blocks in the horizontal direction and the average luminance value Y_AVE (xb-1, yb) for each block. A reference luminance value is obtained. The reference luminance value Y_TARGET (xb, yb) is expressed by the following equation (3).

Y_TARGET(xb,yb)=Y_AVE(xb−1,yb)+GRAD_H(xb,0) (3)
図5(c)に示すyb=3の場合においては、xb=0,1,および2までが空領域のブロックとなるので、xb=3,4,5,6,および7のブロックについて空領域候補であるブロックの基準輝度値Y_TARGETを求める。
Y_TARGET (xb, yb) = Y_AVE (xb-1, yb) + GRAD_H (xb, 0) (3)
In the case of yb = 3 shown in FIG. 5C, since the blocks up to xb = 0, 1, and 2 are empty regions, the empty regions are obtained for the blocks of xb = 3, 4, 5, 6, and 7. A reference luminance value Y_TARGET of a candidate block is obtained.

同様にして、色情報について基準色相値を求めて、基準輝度値および基準色相値に応じてブロック毎の基準画素値(Y_TARGET(xb,yb)、U_TARGET(xb,yb)、およびV_TARGET(xb,yb))を求める。そして、ブロック毎の基準画素値から、既知の線形補間によって、画素毎に空領域の基準画素値(Ysky(x,y)、Usky(x,y)、Vsky(x,y))を求める。このようにして、画像処理部103は空領域についてその色輝度分布を求めて、目標とする色輝度範囲を定める(ステップS204)。   Similarly, a reference hue value is obtained for color information, and reference pixel values (Y_TARGET (xb, yb), U_TARGET (xb, yb), and V_TARGET (xb, yb)) for each block are determined according to the reference luminance value and the reference hue value. yb)). Then, the reference pixel values (Ysky (x, y), Usky (x, y), Vsky (x, y)) of the sky region are obtained for each pixel from the reference pixel values for each block by known linear interpolation. In this way, the image processing unit 103 obtains the color luminance distribution of the sky area and determines the target color luminance range (step S204).

再び図2を参照して、ステップS204の処理に続いて、画像処理部103は、ステップS203の空領域候補判定で空領域候補と判定された画素について空領域統合処理を行う(ステップS205)。   Referring to FIG. 2 again, following the processing in step S204, the image processing unit 103 performs sky region integration processing on the pixels determined as the sky region candidate in the sky region candidate determination in step S203 (step S205).

図6は、図2に示す空領域統合処理を説明するためのフローチャートである。   FIG. 6 is a flowchart for explaining the empty area integration processing shown in FIG.

空領域統合処理を開始すると、画像処理部103は、まず着目画素が空領域候補の画素であるか否かを判別する(ステップS301)。着目画素が空領域候補の画素であると(ステップS301において、YES)、画像処理部103は基準画素値と着目画素の画素値(ここでは代表画素)との差分を検出する(ステップS302)。例えば、着目画素の画素値が(Y,U、V)である場合には、差分SUBは次の式(4)で求められる。   When the sky region integration processing is started, the image processing unit 103 first determines whether or not the target pixel is a sky region candidate pixel (step S301). If the pixel of interest is a sky region candidate pixel (YES in step S301), the image processing unit 103 detects the difference between the reference pixel value and the pixel value of the pixel of interest (here, the representative pixel) (step S302). For example, when the pixel value of the pixel of interest is (Y, U, V), the difference SUB is obtained by the following equation (4).

なお、空領域候補の画素値を代表する画素値を代表画素値として当該代表画素値と基準画素値とを比較して差分を求めるようにしてもよい。   Note that a pixel value representing a pixel value of a sky region candidate may be used as a representative pixel value, and the representative pixel value may be compared with a reference pixel value to obtain a difference.

SUB=SQRT((Y−Ysky(x,y))^2+(U−Usky(x,y))^2+(V−Vsky(x,y))^2) (4)
続いて、画像処理部103は差分SUBが予め定められた閾値以下であるか否かを判定する(ステップS303)。差分SUBが閾値以下であると(ステップS303において、YES)、画像処理部103は当該着目画素を空領域に統合する(ステップS304)。そして、画像処理部103は次の空領域候補の画素が存在するか否かを判定する(ステップS305)。
SUB = SQRT ((Y-Ysky (x, y)) ^ 2+ (U-Usky (x, y)) ^ 2+ (V-Vsky (x, y)) ^ 2) (4)
Subsequently, the image processing unit 103 determines whether or not the difference SUB is equal to or less than a predetermined threshold (step S303). If the difference SUB is equal to or smaller than the threshold value (YES in step S303), the image processing unit 103 integrates the target pixel into the sky region (step S304). Then, the image processing unit 103 determines whether or not there is a pixel of the next empty area candidate (step S305).

次の空領域候補の画素が存在すると(ステップS305において、NO)、画像処理部103はステップS301の処理に戻る。一方、次の空領域候補の画素が存在しないと(ステップS305において、YES)、画像処理部103は空領域統合処理を終了する。   If there is a next empty region candidate pixel (NO in step S305), the image processing unit 103 returns to the process of step S301. On the other hand, if there is no next empty area candidate pixel (YES in step S305), the image processing unit 103 ends the empty area integration process.

なお、着目画素が空領域候補の画素でないと(ステップS301において、YES)、画像処理部103はステップS305の処理に進む。同様にして、差分SUBが閾値を超えていると(ステップS303において、NO)、画像処理部103ステップS305の処理に進む。   If the target pixel is not an empty area candidate pixel (YES in step S301), the image processing unit 103 proceeds to the process of step S305. Similarly, when the difference SUB exceeds the threshold value (NO in step S303), the process proceeds to step S305 in the image processing unit 103.

上述のようにして、空領域統合処理を行った後、画像処理部103は領域判別処理を終了する。   After performing the sky region integration processing as described above, the image processing unit 103 ends the region determination processing.

このようにして、本発明の第1の実施形態では、空領域候補と判定された画素についてのみ、当該空領域候補の画素が空領域に属するか否かを再度判定する。これによって、例えば、図3(d)に示すように、空が抜けている見える撮影シーンにおいても、空が抜けて見える領域(図3(a)に示す領域2および3)を適切に空領域と判定することができる。   In this way, in the first embodiment of the present invention, it is determined again only for the pixels determined as the sky region candidates whether or not the pixels of the sky region candidates belong to the sky region. Thus, for example, as shown in FIG. 3D, even in a shooting scene where the sky appears to be missing, the areas where the sky appears to be missing (areas 2 and 3 shown in FIG. 3A) are appropriately set as empty areas. Can be determined.

なお、第1の実施形態では、画素値の差分を検出するに当たってYUVを用いて表現したが、画素値を表現できるものであれば、YUVに限るものではない。例えば、Lab又はXYZなどをもとるようにしてもよい。また、ここでは、画素値の差分を検出するようにしたが、着目画素の周辺画素も含めた平均値又はブロック単位で処理を行うようにしてもよい。   In the first embodiment, YUV is used to detect the difference between pixel values. However, the present invention is not limited to YUV as long as the pixel value can be expressed. For example, Lab or XYZ may be used. Here, the difference between the pixel values is detected, but the process may be performed in an average value or a block unit including the peripheral pixels of the target pixel.

さらに、第1の実施形態では、空領域と背景領域とを領域判別する例について説明したが、空領域と背景領域とを領域判別に限るものではなく、例えば、人物領域が加わったシーンにおいても同様に適用することができる。いずれにしても、第1の実施形態では特定の領域(つまり、被写体領域)である空領域を精度よく抽出することができる。   Furthermore, in the first embodiment, the example in which the sky region and the background region are discriminated is described. However, the sky region and the background region are not limited to the region discrimination. For example, in a scene to which a person region is added. The same can be applied. In any case, in the first embodiment, it is possible to accurately extract a sky region that is a specific region (that is, a subject region).

加えて、上述の第1の実施形態では、空領域候補の画素を判定する際、空領域に上左右が囲まれた領域を空領域候補と判定するようにしたが、空領域が所定の面積以上である場合に空領域候補を求めるようにしてもよい。   In addition, in the first embodiment described above, when determining the pixel of the empty region candidate, the region surrounded by the upper and left sides of the empty region is determined as the empty region candidate. However, the empty region has a predetermined area. In the case of the above, an empty area candidate may be obtained.

[第2の実施形態]
続いて、本発明の第2の実施形態による画像処理装置を備えるカメラの一例について説明する。なお、第2の実施形態に係るカメラの構成は図1に示すカメラと同様である。
[Second Embodiment]
Next, an example of a camera provided with an image processing apparatus according to the second embodiment of the present invention will be described. The configuration of the camera according to the second embodiment is the same as that of the camera shown in FIG.

第2の実施形態に係るカメラは、図2で説明したようにして、領域判別処理を行うが、ここでは、空領域統合処理が第1の実施形態と異なっている。   The camera according to the second embodiment performs the area determination process as described with reference to FIG. 2, but here, the sky area integration process is different from that of the first embodiment.

図7は、本発明の第2の実施形態に係るカメラで行われる空領域統合処理の一例を説明するためのフローチャートである。なお、図示のフローチャートにおいて、図6に示すフローチャートと同一のステップについては同一の参照符号を付して説明を省略する。   FIG. 7 is a flowchart for explaining an example of the sky region integration processing performed by the camera according to the second embodiment of the present invention. In the flowchart shown in the figure, the same steps as those in the flowchart shown in FIG.

ステップS303の処理において、差分SEBが閾値(差分閾値)以下と判定すると、画像処理部103は着目画素と空領域との距離が所定の閾値(距離閾値)以下であるか否かを判定する(ステップS404)。距離が距離閾値以下であると(ステップS404において、YES)、画像処理部103はステップS304の処理に進んで着目画素を空領域に統合する。一方、距離が距離閾値を超えると(ステップS404において、NO)、画像処理部103は、前述のステップS305の処理に進む。   If it is determined in step S303 that the difference SEB is equal to or smaller than the threshold (difference threshold), the image processing unit 103 determines whether the distance between the target pixel and the sky region is equal to or smaller than a predetermined threshold (distance threshold) ( Step S404). If the distance is equal to or smaller than the distance threshold (YES in step S404), the image processing unit 103 proceeds to the process of step S304 and integrates the pixel of interest into the sky region. On the other hand, when the distance exceeds the distance threshold (NO in step S404), the image processing unit 103 proceeds to the process of step S305 described above.

図8は空領域候補の画素を空領域の画素とする処理を説明するための図である。そして、図8(a)は空領域の画素と空領域候補の画素と示す図であり、図8(b)は空領域候補の画素を空領域の画素に変更した状態の一例を示す図である。また、図8(c)は空領域候補の画素を空領域の画素に変更した状態の一例を示す図である。   FIG. 8 is a diagram for explaining the process of setting the sky region candidate pixels as the sky region pixels. FIG. 8A is a diagram illustrating a pixel in the sky region and a pixel in the sky region candidate, and FIG. 8B is a diagram illustrating an example of a state in which the pixel in the sky region candidate is changed to a pixel in the sky region. is there. FIG. 8C is a diagram illustrating an example of a state where the pixels of the sky region candidate are changed to the pixels of the sky region.

図8(a)において、空領域に属すると判定された画素をSxx(x:0〜4)で示し、空領域候補の画素をHxx(x:0〜4)で示す。正気の距離閾値を2画素として、さらに画素H23および画素H34と着目画素との差分が差分閾値以下であるとする。   In FIG. 8A, pixels determined to belong to the sky region are denoted by Sxx (x: 0 to 4), and pixels of the sky region candidate are denoted by Hxx (x: 0 to 4). Assume that the sanity distance threshold is 2 pixels, and the difference between the pixel H23 and the pixel H34 and the pixel of interest is equal to or less than the difference threshold.

画素H23との距離が最小となる空領域の画素は画素S03であり、その距離は2画素であるので、画像処理部103は画素H23を空領域と判定する。ここでは、図8(b)に示すように、画像処理部103は空領域候補の画素H23を空領域の画素に変更して、当該画素にS23のラベルを付ける。つまり、画像処理部103は空領域候補の画素H23を空領域に統合する。   Since the pixel in the sky region that has the smallest distance from the pixel H23 is the pixel S03 and the distance is two pixels, the image processing unit 103 determines that the pixel H23 is a sky region. Here, as shown in FIG. 8B, the image processing unit 103 changes the pixel H23 of the sky region candidate to a pixel of the sky region, and labels the pixel with S23. That is, the image processing unit 103 integrates the sky area candidate pixels H23 into the sky area.

画素H34については、その距離が最小となる空領域の画素は画素S23である。そして、画素H34と画素S23との距離は2画素以内であるので、画素処理部103は画素H34を空領域と判定する。画像処理部103は空領域候補の画素H34を空領域の画素に変更して、当該画素にS34のラベルを付ける(図8(c)参照)。つまり、画像処理部103は空領域候補の画素H34を空領域に統合する。   For the pixel H34, the pixel in the sky region with the smallest distance is the pixel S23. Since the distance between the pixel H34 and the pixel S23 is within two pixels, the pixel processing unit 103 determines that the pixel H34 is an empty area. The image processing unit 103 changes the pixel H34 of the sky region candidate to a pixel of the sky region, and labels the pixel as S34 (see FIG. 8C). That is, the image processing unit 103 integrates the sky region candidate pixels H34 into the sky region.

このように、本発明の第2の実施形態では、差分が所定の差分閾値以下である空領域候補の画素について空領域との距離が所定の距離閾値以下であるか否かを判定して、その判定結果に応じて当該空領域候補の画素を空領域に統合する。その結果、空が抜けている見える撮影シーンにおいても、空が抜けて見える領域を精度よく空領域と判定することができる。   As described above, in the second embodiment of the present invention, it is determined whether the distance between the sky region candidate pixel whose difference is equal to or smaller than the predetermined difference threshold is equal to or smaller than the predetermined distance threshold, Depending on the determination result, the pixels of the sky region candidate are integrated into the sky region. As a result, even in a shooting scene where the sky appears to be missing, it is possible to accurately determine the area where the sky appears to be missing as an empty area.

なお、上述の第2の実施形態では、空領域候補の画素についてのみ空領域との統合処理を行うか否かを判定するようにしたが、全ての背景領域の画素について空領域との統合処理を行うか否かの判定を行うようにしてもよい。   In the second embodiment described above, it is determined whether or not the integration process with the sky area is performed only for the pixels of the sky area candidate, but the integration process with the sky area is performed for all the background area pixels. It may be determined whether or not to perform.

[第3の実施形態]
次に、本発明の第3の実施形態による画像処理装置を備えるカメラの一例について説明する。なお、第3の実施形態に係るカメラの構成は図1に示すカメラと同様である。
[Third Embodiment]
Next, an example of a camera including an image processing device according to the third embodiment of the present invention will be described. The configuration of the camera according to the third embodiment is the same as that of the camera shown in FIG.

図9は、本発明の第3の実施形態に係るカメラで行われる領域判別処理の一例を説明廃るためのフローチャートである。なお、図示のフローチャートにおいて、図2に示すフローチャートにおけるステップと同一のステップについては同一の参照符号を付して説明を省略する。   FIG. 9 is a flowchart for explaining an example of the area determination process performed by the camera according to the third embodiment of the present invention. In the illustrated flowchart, the same steps as those in the flowchart shown in FIG. 2 are denoted by the same reference numerals and description thereof is omitted.

ステップS203において、空領域候補の判定を行った後、画像処理部103は空領域候補である領域(画素)が存在するか否かを確認する(ステップS503)。空領域候補である領域が存在しないと(ステップS503において、NO)、画像処理部103は領域判別処理を終了する。   In step S203, after determining the sky area candidate, the image processing unit 103 checks whether or not there is an area (pixel) that is a sky area candidate (step S503). If there is no empty area candidate area (NO in step S503), the image processing unit 103 ends the area determination process.

一方、空領域候補である領域が存在すると(ステップS503において、YES)、画像処理部103は空領域候補の領域について空領域であるか否かの信頼度を示す信頼度分布を算出する(ステップS504)。   On the other hand, when there is an area that is a candidate for the empty area (YES in step S503), the image processing unit 103 calculates a reliability distribution indicating the reliability of whether or not the candidate area is an empty area (step S503). S504).

図10は、図9に示す信頼度分布の算出を説明するための図である。そして、図10(a)は画素毎の空領域である空確率を示す図であり、図10(b)は空確率のヒストグラムを示す図である。   FIG. 10 is a diagram for explaining calculation of the reliability distribution shown in FIG. FIG. 10A is a diagram showing a sky probability that is a sky region for each pixel, and FIG. 10B is a diagram showing a histogram of sky probability.

図10(a)において、横軸は色相を示し、縦軸は空確率を示す。ここでは、画像処理部103は空領域候補の画素毎に空領域である空確率を求めるが、着目画素(つまり、空領域候補の画素)の色相Hueが色相Hue1以下又は色相Hue4以上であると、画像処理部103は空確率を0とする。一方、着目画素の色相Hueが色相Hue2以上で色相Hue3以下の場合には、画像処理部103は空確率を1とする。   In FIG. 10A, the horizontal axis indicates the hue, and the vertical axis indicates the sky probability. Here, the image processing unit 103 obtains a sky probability that is a sky region for each pixel of the sky region candidate, but the hue Hue of the pixel of interest (that is, the sky region candidate pixel) is less than or equal to the hue Hue1 or the hue Hue4. The image processing unit 103 sets the sky probability to 0. On the other hand, when the hue Hue of the target pixel is greater than or equal to the hue Hue2 and less than or equal to the hue Hue3, the image processing unit 103 sets the sky probability to 1.

着目画素の色相Hueが色相Hue1を超え色相Hue2未満の間の場合には、画像処理部103は次の式(5)に応じて空確率を求める。   When the hue Hue of the pixel of interest is between the hue Hue1 and less than the hue Hue2, the image processing unit 103 obtains the sky probability according to the following equation (5).

空確率=(Hue−Hue1)×(Hue2−Hue1) (5)
同様にして、着目画素の色相Hueが色相Hue3を超え色相Hue4未満の間の場合には、画像処理部103は次の式(6)に応じて空確率を求める。
Empty probability = (Hue−Hue1) × (Hue2−Hue1) (5)
Similarly, when the hue Hue of the pixel of interest is between the hue Hue3 and less than the hue Hue4, the image processing unit 103 obtains the sky probability according to the following equation (6).

空確率=(Hue−Hue3)×(Hue4−Hue3)+1 (6)
なお、色相Hueを求める際には、Lab空間に変換した後、Hue=tan−1(b*/a*)などの演算が用いられる。
Empty probability = (Hue-Hue3) × (Hue4-Hue3) +1 (6)
When obtaining the hue Hue, an operation such as Hue = tan-1 (b * / a *) is used after conversion to the Lab space.

空領域候補の画素の各々について空確率を求めた後、画像処理部103は空確率に関するヒストグラムを求める(図10(b)参照)。そして、画像処理部103は当該ヒストグラムの平均値、ピーク値、又は分散値に応じて空領域である信頼度を算出する。例えば、図10(b)に示すように、ヒストグラムの分散が大きい場合には、空のみでなく背景領域の被写体が混じっている可能性が高く、画像処理部103は空領域である信頼度が低いと判定する。この場合には、画像処理部103は信頼度を低くする。   After obtaining the sky probability for each of the pixels of the sky region candidate, the image processing unit 103 obtains a histogram relating to the sky probability (see FIG. 10B). Then, the image processing unit 103 calculates the reliability that is an empty region according to the average value, peak value, or variance value of the histogram. For example, as shown in FIG. 10B, when the variance of the histogram is large, there is a high possibility that subjects in the background area as well as the sky are mixed, and the image processing unit 103 has a reliability of being an empty area. Judge as low. In this case, the image processing unit 103 reduces the reliability.

続いて、画像処理部103は空領域候補についてその信頼度が所定の閾値(信頼度閾値)以上であるか否かを判定する(ステップS505)。信頼度が信頼度閾値以上であると(ステップS505において、YES)、画像処理部103は空領域候補の画素に係る信頼度が高いと判断して、空領域および背景領域に係る領域分割を行わない(ステップS506)。そして、画像処理部103は領域判別処理を終了する。   Subsequently, the image processing unit 103 determines whether or not the reliability of the empty region candidate is equal to or higher than a predetermined threshold (reliability threshold) (step S505). If the reliability is equal to or higher than the reliability threshold (YES in step S505), the image processing unit 103 determines that the reliability related to the pixels of the sky region candidate is high, and performs region division related to the sky region and the background region. No (step S506). Then, the image processing unit 103 ends the area determination process.

一方、信頼度が信頼度閾値未満であると(ステップS505において、NO)、画像処理部103は空領域候補の画素に係る信頼度が低いと判断して、空領域候補の画素を背景領域として領域分割する(ステップS507)。そして、画像処理部103は領域判別処理を終了する。   On the other hand, if the reliability is less than the reliability threshold (NO in step S505), the image processing unit 103 determines that the reliability related to the sky region candidate pixel is low, and uses the sky region candidate pixel as the background region. The area is divided (step S507). Then, the image processing unit 103 ends the area determination process.

このように、本発明の第3の実施形態では、空領域候補について空領域である信頼性を示す信頼度に応じて空領域および背景領域に係る領域分割を行わないようにしたので、空領域および背景領域について誤検出を低減することができる。   As described above, in the third embodiment of the present invention, since the region division related to the sky region and the background region is not performed according to the reliability indicating the reliability of the sky region with respect to the sky region candidate, the sky region In addition, false detection can be reduced for the background region.

上述の説明から明らかなように、図1に示す例においては、制御部104および画像処理部103が分割手段、判定手段、算出手段、および領域統合手段として機能する。また、ここでは、少なくとも画像処理部103および制御部104が画像処理装置を構成する。   As is clear from the above description, in the example shown in FIG. 1, the control unit 104 and the image processing unit 103 function as a dividing unit, a determining unit, a calculating unit, and a region integrating unit. Here, at least the image processing unit 103 and the control unit 104 constitute an image processing apparatus.

以上、本発明について実施の形態に基づいて説明したが、本発明は、これらの実施の形態に限定されるものではなく、この発明の要旨を逸脱しない範囲の様々な形態も本発明に含まれる。   As mentioned above, although this invention was demonstrated based on embodiment, this invention is not limited to these embodiment, Various forms of the range which does not deviate from the summary of this invention are also contained in this invention. .

例えば、上記の実施の形態の機能を制御方法として、この制御方法を画像処理装置に実行させるようにすればよい。また、上述の実施の形態の機能を有するプログラムを制御プログラムとして、当該制御プログラムを画像処理装置が備えるコンピュータに実行させるようにしてもよい。なお、制御プログラムは、例えば、コンピュータに読み取り可能な記録媒体に記録される。   For example, the function of the above embodiment may be used as a control method, and this control method may be executed by the image processing apparatus. In addition, a program having the functions of the above-described embodiments may be used as a control program, and the control program may be executed by a computer included in the image processing apparatus. The control program is recorded on a computer-readable recording medium, for example.

上記の制御方法および制御プログラムの各々は、少なくとも分割ステップ、判定ステップ、算出ステップ、および領域統合ステップを有している。   Each of the control method and the control program has at least a division step, a determination step, a calculation step, and a region integration step.

また、本発明は、以下の処理を実行することによっても実現される。つまり、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種の記録媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPUなど)がプログラムを読み出して実行する処理である。   The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various recording media, and the computer (or CPU, MPU, etc.) of the system or apparatus reads the program. To be executed.

101 撮像部
102 A/D変換部
103 画像処理部
104 制御部
105 表示部
106 記憶媒体
DESCRIPTION OF SYMBOLS 101 Image pick-up part 102 A / D conversion part 103 Image processing part 104 Control part 105 Display part 106 Storage medium

Claims (10)

入力画像から特定の領域を特定領域として判別して抽出する画像処理装置であって、
前記入力画像の特徴を示す特徴量に応じて前記入力画像を、前記特定領域を含む複数の領域に分割する分割手段と、
前記特定領域を除く前記領域の各々について、前記特定領域と予め定められた条件で隣接しているか否かを判定して、前記予め定められた条件で隣接する領域を特定領域候補とする判定手段と、
前記特定領域における画素値に応じて基準となる画素値を基準画素値として算出し、さらに、前記特定領域候補における画素値に応じて前記特定領域候補を代表する代表画素値を算出する算出手段と、
前記基準画素値および前記代表画素値に応じて前記特定領域候補を前記特定領域に統合するか否かを判定して、その判定結果に基づいて前記特定領域候補を前記特定領域に統合する領域統合手段と、
を有することを特徴とする画像処理装置。
An image processing apparatus for determining and extracting a specific area as a specific area from an input image,
A dividing unit that divides the input image into a plurality of regions including the specific region according to a feature amount indicating a feature of the input image;
A determination unit that determines whether each of the areas excluding the specific area is adjacent to the specific area under a predetermined condition, and determines the area adjacent to the predetermined area as a specific area candidate When,
Calculating means for calculating a reference pixel value as a reference pixel value according to a pixel value in the specific area, and further calculating a representative pixel value representing the specific area candidate according to a pixel value in the specific area candidate; ,
Region integration for determining whether or not to integrate the specific region candidate into the specific region according to the reference pixel value and the representative pixel value and integrating the specific region candidate into the specific region based on the determination result Means,
An image processing apparatus comprising:
前記特徴量は色相および輝度を示す色相輝度情報であり、
前記分割手段は、前記複数の領域のうち所定の面積以上の領域を前記特定領域とすることを特徴とする請求項1に記載の画像処理装置。
The feature amount is hue luminance information indicating hue and luminance,
The image processing apparatus according to claim 1, wherein the dividing unit sets a region having a predetermined area or more among the plurality of regions as the specific region.
前記領域統合手段は、前記代表画素値と前記基準画素値との差分が予め定められた閾値以下であると前記特定領域候補を前記特定領域に統合することを特徴とする請求項1又は2に記載の画像処理装置。   The area integration unit integrates the specific area candidates into the specific area when a difference between the representative pixel value and the reference pixel value is equal to or less than a predetermined threshold. The image processing apparatus described. 前記領域統合手段は、前記代表画素値と前記基準画素値との差分が予め定められた差分閾値以下であり、かつ前記特定領域候補と前記特定領域との距離が予め定められた距離閾値以下であると前記特定領域候補を前記特定領域に統合することを特徴とする請求項1又は2に記載の画像処理装置。   The area integration unit is configured such that a difference between the representative pixel value and the reference pixel value is equal to or less than a predetermined difference threshold value, and a distance between the specific area candidate and the specific area is equal to or less than a predetermined distance threshold value. The image processing apparatus according to claim 1, wherein if there is, the specific area candidate is integrated into the specific area. 前記領域統合手段は、前記基準画素値および前記代表画素値に応じて前記特定領域候補が前記特定領域である信頼性を示す信頼度を得て、前記信頼度が予め定められた信頼度閾値以上であると前記特定領域候補を前記特定領域に統合することを特徴とする請求項1に記載の画像処理装置。   The area integration unit obtains a reliability indicating that the specific area candidate is the specific area according to the reference pixel value and the representative pixel value, and the reliability is equal to or higher than a predetermined reliability threshold. The image processing apparatus according to claim 1, wherein the specific area candidate is integrated into the specific area. 前記領域統合手段は、前記代表画素値が示す色相に応じて前記特定領域候補が前記特定領域である確率を前記信頼度として得ることを特徴とする請求項5に記載の画像処理装置。   The image processing apparatus according to claim 5, wherein the region integration unit obtains, as the reliability, a probability that the specific region candidate is the specific region according to a hue indicated by the representative pixel value. 前記基準画素値および前記代表画素値は、それぞれ前記特定領域および前記特定領域候補における画素値の平均値であることを特徴とする請求項1〜6のいずれか1項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the reference pixel value and the representative pixel value are average values of pixel values in the specific region and the specific region candidate, respectively. 前記特定領域は、空を示す空領域であることを特徴とする請求項1〜7のいずれか1項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the specific area is an empty area indicating sky. 入力画像から特定の領域を特定領域として判別して抽出する画像処理装置の制御方法であって、
前記入力画像の特徴を示す特徴量に応じて前記入力画像を、前記特定領域を含む複数の領域に分割する分割ステップと、
前記特定領域を除く前記領域の各々について、前記特定領域と予め定められた条件で隣接しているか否かを判定して、前記予め定められた条件で隣接する領域を特定領域候補とする判定ステップと、
前記特定領域における画素値に応じて基準となる画素値を基準画素値として算出し、さらに、前記特定領域候補における画素値に応じて前記特定領域候補を代表する代表画素値を算出する算出ステップと、
前記基準画素値および前記代表画素値に応じて前記特定領域候補を前記特定領域に統合するか否かを判定して、その判定結果に基づいて前記特定領域候補を前記特定領域に統合する領域統合ステップと、
を有することを特徴とする制御方法。
A control method for an image processing apparatus for determining and extracting a specific area from an input image as a specific area,
A division step of dividing the input image into a plurality of regions including the specific region according to a feature amount indicating a feature of the input image;
A step of determining whether or not each of the areas excluding the specific area is adjacent to the specific area under a predetermined condition, and setting the area adjacent to the predetermined condition as a specific area candidate When,
Calculating a reference pixel value as a reference pixel value according to a pixel value in the specific area, and calculating a representative pixel value representing the specific area candidate according to a pixel value in the specific area candidate; ,
Region integration for determining whether or not to integrate the specific region candidate into the specific region according to the reference pixel value and the representative pixel value and integrating the specific region candidate into the specific region based on the determination result Steps,
A control method characterized by comprising:
入力画像から特定の領域を特定領域として判別して抽出する画像処理装置で用いられる制御プログラムであって、
前記画像処理装置が備えるコンピュータに、
前記入力画像の特徴を示す特徴量に応じて前記入力画像を、前記特定領域を含む複数の領域に分割する分割ステップと、
前記特定領域を除く前記領域の各々について、前記特定領域と予め定められた条件で隣接しているか否かを判定して、前記予め定められた条件で隣接する領域を特定領域候補とする判定ステップと、
前記特定領域における画素値に応じて基準となる画素値を基準画素値として算出し、さらに、前記特定領域候補における画素値に応じて前記特定領域候補を代表する代表画素値を算出する算出ステップと、
前記基準画素値および前記代表画素値に応じて前記特定領域候補を前記特定領域に統合するか否かを判定して、その判定結果に基づいて前記特定領域候補を前記特定領域に統合する領域統合ステップと、
を実行させることを特徴とする制御プログラム。
A control program used in an image processing apparatus that identifies and extracts a specific area as a specific area from an input image,
In the computer provided in the image processing apparatus,
A division step of dividing the input image into a plurality of regions including the specific region according to a feature amount indicating a feature of the input image;
A step of determining whether or not each of the areas excluding the specific area is adjacent to the specific area under a predetermined condition, and setting the area adjacent to the predetermined condition as a specific area candidate When,
Calculating a reference pixel value as a reference pixel value according to a pixel value in the specific area, and calculating a representative pixel value representing the specific area candidate according to a pixel value in the specific area candidate; ,
Region integration for determining whether or not to integrate the specific region candidate into the specific region according to the reference pixel value and the representative pixel value and integrating the specific region candidate into the specific region based on the determination result Steps,
A control program characterized by causing
JP2013251138A 2013-12-04 2013-12-04 Image processing apparatus, control method thereof, and control program Expired - Fee Related JP6257292B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013251138A JP6257292B2 (en) 2013-12-04 2013-12-04 Image processing apparatus, control method thereof, and control program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013251138A JP6257292B2 (en) 2013-12-04 2013-12-04 Image processing apparatus, control method thereof, and control program

Publications (2)

Publication Number Publication Date
JP2015108947A true JP2015108947A (en) 2015-06-11
JP6257292B2 JP6257292B2 (en) 2018-01-10

Family

ID=53439256

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013251138A Expired - Fee Related JP6257292B2 (en) 2013-12-04 2013-12-04 Image processing apparatus, control method thereof, and control program

Country Status (1)

Country Link
JP (1) JP6257292B2 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005228136A (en) * 2004-02-13 2005-08-25 Nissan Motor Co Ltd Road area detecting device
JP2005293554A (en) * 2004-03-08 2005-10-20 Seiko Epson Corp Determination of main object in image
JP2007517315A (en) * 2003-12-29 2007-06-28 イーストマン コダック カンパニー Sky detection in digital color images

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007517315A (en) * 2003-12-29 2007-06-28 イーストマン コダック カンパニー Sky detection in digital color images
JP2005228136A (en) * 2004-02-13 2005-08-25 Nissan Motor Co Ltd Road area detecting device
JP2005293554A (en) * 2004-03-08 2005-10-20 Seiko Epson Corp Determination of main object in image

Also Published As

Publication number Publication date
JP6257292B2 (en) 2018-01-10

Similar Documents

Publication Publication Date Title
US9426437B2 (en) Image processor performing noise reduction processing, imaging apparatus equipped with the same, and image processing method for performing noise reduction processing
JP6833415B2 (en) Image processing equipment, image processing methods, and programs
US9813634B2 (en) Image processing apparatus and method
KR101441786B1 (en) Subject determination apparatus, subject determination method and recording medium storing program thereof
JP7223079B2 (en) IMAGE PROCESSING APPARATUS, CONTROL METHOD THEREOF, AND IMAGING APPARATUS
CN107395991B (en) Image synthesis method, image synthesis device, computer-readable storage medium and computer equipment
JP6172935B2 (en) Image processing apparatus, image processing method, and image processing program
JP5814799B2 (en) Image processing apparatus and image processing method
US11893716B2 (en) Image processing apparatus and image processing method, and image capturing apparatus
CN108174173B (en) Photographing method and apparatus, computer-readable storage medium, and computer device
JP6274876B2 (en) Image processing apparatus, image processing method, and program
US10977777B2 (en) Image processing apparatus, method for controlling the same, and recording medium
EP3407252B1 (en) Image processing apparatus, image processing method, and storage medium
US10565712B2 (en) Image processing apparatus and method for controlling the same
JP5441669B2 (en) Image processing apparatus and control method thereof
JP6257292B2 (en) Image processing apparatus, control method thereof, and control program
JP2010213105A (en) Imaging apparatus
JP2009194786A (en) Object detecting device, and imaging apparatus
JP5178421B2 (en) Image processing apparatus, image processing method, and imaging apparatus
JP5146223B2 (en) Program, camera, image processing apparatus, and image contour extraction method
JP2015142281A (en) Subject searching device, control method and control program of the same, and imaging device
JP2014153866A (en) Image processing system, control method and control program of the same
JP5794413B2 (en) Image processing apparatus, image processing method, and program
JP2014068279A (en) Imaging apparatus
JP6314281B1 (en) Image processing method and foreground region acquisition method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20161128

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20171019

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20171205

R151 Written notification of patent or utility model registration

Ref document number: 6257292

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

LAPS Cancellation because of no payment of annual fees