JP6930099B2 - Image processing device - Google Patents

Image processing device Download PDF

Info

Publication number
JP6930099B2
JP6930099B2 JP2016238464A JP2016238464A JP6930099B2 JP 6930099 B2 JP6930099 B2 JP 6930099B2 JP 2016238464 A JP2016238464 A JP 2016238464A JP 2016238464 A JP2016238464 A JP 2016238464A JP 6930099 B2 JP6930099 B2 JP 6930099B2
Authority
JP
Japan
Prior art keywords
pixel
area
image
pixels
designated area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2016238464A
Other languages
Japanese (ja)
Other versions
JP2018097414A (en
Inventor
佐々木 信
信 佐々木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Fujifilm Business Innovation 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 Fuji Xerox Co Ltd, Fujifilm Business Innovation Corp filed Critical Fuji Xerox Co Ltd
Priority to JP2016238464A priority Critical patent/JP6930099B2/en
Publication of JP2018097414A publication Critical patent/JP2018097414A/en
Application granted granted Critical
Publication of JP6930099B2 publication Critical patent/JP6930099B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)
  • Image Analysis (AREA)

Description

本発明は、画像処理装置、画像処理方法、画像処理システム、プログラムに関する。 The present invention relates to an image processing apparatus, an image processing method, an image processing system, and a program.

画像から特定領域を切り出す処理は、特定領域の特性を解析、または特定領域をデザインするなど、画像編集や加工の分野では欠かせないものの1つである。特定領域を切り出す方法としては、様々なアプローチが考えられるが、例えば、グラフカット(GraphCut)法が公知の代表手法として挙げられる。 The process of cutting out a specific area from an image is one of the indispensable fields of image editing and processing, such as analyzing the characteristics of a specific area or designing a specific area. Various approaches can be considered as a method for cutting out a specific region, and for example, the GraphCut method is a known representative method.

特許文献1には、画像の中からユーザが特定の画像領域として指定した指定領域の代表位置を表す位置情報を取得するユーザ指示受付部と、画像を構成する画素を頂点とみなすとともに、隣り合う画素を結ぶ辺および隣り合う画素同士の色度の近さに応じて決定される重みからなるグラフを設定するグラフ設定部と、設定されたグラフの頂点を予め定められた規則に従い縮約する縮約部と、縮約した頂点に対応する画素の位置を基に指定領域を検出する領域検出部と、を備えることを特徴とする画像処理装置が開示されている。
また特許文献2には、画像中の指定領域に含まれる画素を基準画素として一つ選択すると共に基準画素周辺の特定の範囲を第1の範囲として設定し、選択した一の基準画素のみを対象として第1の範囲に含まれる対象画素の各々について指定領域への属否の判定を行った後、新たに基準画素を一つ選択し、第1の範囲の設定および判定を再度行って、指定領域の検出を行う領域判定装置が開示されている。
In Patent Document 1, a user instruction receiving unit that acquires position information representing a representative position of a designated area designated by the user as a specific image area from the image and pixels constituting the image are regarded as vertices and adjacent to each other. A graph setting unit that sets a graph consisting of weights determined according to the side connecting pixels and the closeness of chromaticity between adjacent pixels, and reduction that reduces the vertices of the set graph according to a predetermined rule. An image processing apparatus including a reduction unit and a region detection unit that detects a designated region based on the position of a pixel corresponding to a contracted vertex is disclosed.
Further, in Patent Document 2, one pixel included in a designated area in an image is selected as a reference pixel, and a specific range around the reference pixel is set as a first range, and only one selected reference pixel is targeted. After determining whether or not each of the target pixels included in the first range belongs to the designated area, a new reference pixel is selected, the first range is set and determined again, and the designation is made. A region determination device that detects a region is disclosed.

特開2016−4309号公報Japanese Unexamined Patent Publication No. 2016-4309 特開2016−6647号公報Japanese Unexamined Patent Publication No. 2016-6647

ユーザが画像処理を行なう際には、ユーザが画像処理を行なう領域として指定する指定領域を切り出す処理が必要となる。この際、指定領域に対し指定領域の代表位置としてシードを入力し、そのシードを基に領域を拡張する領域拡張方法により指定領域を切り出すことがある。
しかしながら領域を拡張する際に、指定領域外の領域であっても類似色を有する領域について指定領域であるとする場合がある。
本発明は、指定領域の切り出しを行なう際に、指定領域をより精度よく切り出すことができる画像処理装置等を提供することを目的とする。
When the user performs image processing, it is necessary to cut out a designated area designated as an area for image processing by the user. At this time, a seed may be input as a representative position of the designated area for the designated area, and the designated area may be cut out by an area expansion method for expanding the area based on the seed.
However, when expanding the area, even if the area is outside the designated area, the area having a similar color may be regarded as the designated area.
An object of the present invention is to provide an image processing apparatus or the like capable of cutting out a designated area with higher accuracy when cutting out a designated area.

請求項1に記載の発明は、画像中の指定領域の代表位置を表す位置情報を取得する位置情報取得部と、位置情報から指定領域を検出する領域検出部と、を備え、前記領域検出部は、前記指定領域に属する画素の周囲のテクスチャと当該指定領域に含まれるか否かを判断する対象である画素の周囲のテクスチャとの類似度を基に当該指定領域を検出し、前記代表位置が設定された前記画像をブロック毎に分割する画像分割部と、当該ブロックを単位としテクスチャを算出するための範囲として、第1の局所領域および第2の局所領域を設定する局所領域設定部と、当該第1の局所領域内のテクスチャと当該第2の局所領域内のテクスチャとの類似度を算出する類似度算出部と、を備えることを特徴とする画像処理装置である。
請求項に記載の発明は、前記類似度により前記第2の局所領域内の画素が前記指定領域に含まれると検出したときに、前記第2の局所領域内の何れの画素が当該指定領域に含まれるかを設定する画素設定部をさらに備えることを特徴とする請求項に記載の画像処理装置である。
請求項に記載の発明は、前記類似度算出部は、前記類似度を基に前記第2の局所領域が前記指定領域に属する強さをさらに算出し、前記強さを使用して前記第2の局所領域中の画素が前記指定領域に属するか否かを判断することにより、前記指定領域を検出することを特徴とする請求項またはに記載の画像処理装置である。
請求項に記載の発明は、前記領域検出部は、前記ブロックを単位とした指定領域を検出した後に、当該ブロックを単位とした指定領域の境界の領域において指定領域の設定を解除し、指定領域の設定を解除されなかった画素の中から選択された基準画素を基に当該指定領域の境界の領域において指定領域を再度検出することを特徴とする請求項に記載の画像処理装置である
The invention according to claim 1 includes a position information acquisition unit that acquires position information representing a representative position of a designated area in an image, and an area detection unit that detects a designated area from the position information. Detects the designated area based on the similarity between the texture around the pixel belonging to the designated area and the texture around the pixel to be determined whether or not it is included in the designated area, and determines the representative position. An image division unit that divides the image in which is set for each block, and a local area setting unit that sets a first local area and a second local area as a range for calculating a texture in the block as a unit. The image processing apparatus includes a similarity calculation unit for calculating the similarity between the texture in the first local region and the texture in the second local region.
According to the second aspect of the present invention, when it is detected that the pixels in the second local region are included in the designated region by the similarity, any pixel in the second local region is included in the designated region. The image processing apparatus according to claim 1 , further comprising a pixel setting unit for setting whether or not the image is included in the above.
In the invention according to claim 3 , the similarity calculation unit further calculates the strength to which the second local region belongs to the designated region based on the similarity, and uses the strength to obtain the first. The image processing apparatus according to claim 1 or 2 , wherein the designated area is detected by determining whether or not the pixels in the local area of 2 belong to the designated area.
In the invention according to claim 4, after the area detection unit detects a designated area having the block as a unit, the area detecting unit cancels the setting of the designated area in the boundary area of the designated area having the block as a unit, and designates the designated area. The image processing apparatus according to claim 1 , wherein the designated area is detected again in the boundary area of the designated area based on the reference pixel selected from the pixels for which the area setting has not been released. ..

請求項1の発明によれば、処理速度がさらに高速になる。
請求項の発明によれば、指定領域を拡張するための画素を設定することができる。
請求項の発明によれば、処理速度がさらに高速になる。
請求項の発明によれば、さらに精度の高い指定領域の切り出しを行なうことができる
According to the invention of claim 1 , the processing speed is further increased.
According to the invention of claim 2 , pixels for expanding the designated area can be set.
According to the invention of claim 3 , the processing speed is further increased.
According to the invention of claim 4 , it is possible to cut out a designated area with higher accuracy .

本実施の形態における画像処理システムの構成例を示す図である。It is a figure which shows the configuration example of the image processing system in this embodiment. 本実施の形態における画像処理装置の機能構成例を表すブロック図である。It is a block diagram which shows the functional structure example of the image processing apparatus in this embodiment. 指定領域を指定する作業をユーザインタラクティブに行う方法の例を示した図である。It is a figure which showed the example of the method of performing the work of specifying a designated area interactively by a user. (a)〜(c)は、図3で示した画像について、領域拡張方法により指定領域が切り出される様子を示している。(A) to (c) show how a designated area is cut out from the image shown in FIG. 3 by the area expansion method. (a)〜(b)は、ユーザが指定領域の選択を行なうときに、表示装置の表示画面に表示される画面の例を示している。(A) to (b) show an example of a screen displayed on the display screen of the display device when the user selects a designated area. 画像処理を行なう際に、表示装置の表示画面に表示される画面の例を示している。An example of a screen displayed on the display screen of the display device when performing image processing is shown. (a)〜(c)は、従来の領域拡張方法について説明した図である。(A) to (c) are views explaining the conventional area expansion method. (a)〜(e)は、従来の領域拡張方法を使用し、2つのシードが与えられた場合に、画像が2つの指定領域に分けられる様子を示した図である。(A) to (e) are diagrams showing how an image is divided into two designated regions when two seeds are given by using a conventional region expansion method. 第1の範囲について説明した図である。It is a figure explaining the 1st range. (a)〜(b)は、影響力を決定する方法について示した図である。(A)-(b) are diagrams showing a method of determining influence. 図8−2で示す第1の範囲内の対象画素について、強さを基にした方法で判断を行なった結果を示した図である。It is a figure which showed the result of having made the judgment by the method based on the strength about the target pixel in the 1st range shown in FIG. 8-2. (a)〜(h)は、図8−3〜図8−4で説明した領域拡張方法で順次ラベル付けがされていく過程の例を示した図である。(A) to (h) are diagrams showing an example of a process of sequentially labeling by the region expansion method described with reference to FIGS. 8-3 to 8-4. 第1の実施形態における領域検出部の機能構成例を表すブロック図である。It is a block diagram which shows the functional structure example of the area detection part in 1st Embodiment. 第1の局所領域および第2の局所領域について説明した図である。It is a figure explaining the 1st local area and the 2nd local area. 第1の局所領域のテクスチャと第2の局所領域のテクスチャとは類似し(類似度が小さく)、周辺画素が、基準画素と同じ指定領域に属すると判断される場合を示した図である。It is a figure which showed the case where the texture of the 1st local area and the texture of a 2nd local area are similar (the degree of similarity is small), and a peripheral pixel is determined to belong to the same designated area as a reference pixel. 第1の局所領域のテクスチャと第2の局所領域のテクスチャとは類似し(類似度が小さく)、周辺画素が、基準画素と同じ指定領域に属すると判断される場合を示した図である。It is a figure which showed the case where the texture of the 1st local area and the texture of a 2nd local area are similar (the degree of similarity is small), and a peripheral pixel is determined to belong to the same designated area as a reference pixel. 第1の実施形態における領域検出部の動作について説明したフローチャートである。It is a flowchart explaining the operation of the area detection part in 1st Embodiment. 第2の実施形態における領域検出部の機能構成例を表すブロック図である。It is a block diagram which shows the functional structure example of the area detection part in 2nd Embodiment. シードが設定された画像を表す。Represents a seeded image. (a)は、シードが設定された画像を分割した例を示している。(b)は、シードが設定された画像は、3画素×3画素からなるブロック毎に分割されていることを示す。(A) shows an example of dividing an image in which a seed is set. (B) indicates that the seeded image is divided into blocks consisting of 3 pixels × 3 pixels. (a)〜(b)は、シード反映部の動作について説明した図である。(A) to (b) are diagrams for explaining the operation of the seed reflecting unit. (a)は、シード反映画像において、第1の局所領域と第2の局所領域とを設定した例を示している。(b)は、第1の局所領域が、3画素×3画素=9画素からなることを示す。(c)は、第2の局所領域が、3画素×3画素=9画素からなることを示す。(A) shows an example in which the first local region and the second local region are set in the seed reflection image. (B) shows that the first local region is composed of 3 pixels × 3 pixels = 9 pixels. (C) shows that the second local region is composed of 3 pixels × 3 pixels = 9 pixels. (a)は、従来手法における、基準画素とその周辺に関する影響力を示した図である。また(b)は、基準ブロックとその周辺のブロックとの影響力の関係を示した図である。(A) is a diagram showing the influence of the reference pixel and its periphery in the conventional method. Further, (b) is a diagram showing the relationship of influence between the reference block and the surrounding blocks. 図18(a)のシード反映画像において、第2の局所領域中の画素が指定領域に含まれるとした例を示している。In the seed reflection image of FIG. 18A, an example is shown in which the pixels in the second local region are included in the designated region. 画素設定部が画像において画素中の中心の一画素が指定領域に含まれるとしたときを示している。The pixel setting unit shows the case where one pixel in the center of the pixels is included in the designated area in the image. 第2の実施形態における領域検出部の動作について説明したフローチャートである。It is a flowchart explaining the operation of the area detection part in 2nd Embodiment. (a)は、領域分離を行なった際に、領域の境界が、粗くなった場合を示した図である。(b)は、境界領域付近のラベルや強さをリセットした未知領域を設定した場合を示した図である。(c)は、領域の境界が滑らかになる領域分離結果を得た場合を示した図である。(A) is a figure which showed the case where the boundary of a region became rough when the region separation was performed. (B) is a figure which showed the case where the label near the boundary area and the unknown area which reset the strength were set. FIG. (C) is a diagram showing a case where a region separation result in which the boundary of the region becomes smooth is obtained. 前景として写る床と、床以外の後景とからなる写真の画像において、シード1およびシード2を設定した場合を示している。It shows the case where the seed 1 and the seed 2 are set in the image of the photograph including the floor reflected as the foreground and the background other than the floor. 過剰な検出や検出不足が伴う切り抜き結果について示した図である。It is a figure which showed the clipping result with excessive detection and underdetection. 指定領域をより精度よく切り出すことができた切り抜き結果について示した図である。It is a figure which showed the clipping result which was able to cut out a designated area more accurately. 画像処理装置のハードウェア構成を示した図である。It is a figure which showed the hardware configuration of an image processing apparatus.

以下、添付図面を参照して、本発明の実施の形態について詳細に説明する。 Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings.

<画像処理システム全体の説明>
図1は、本実施の形態における画像処理システム1の構成例を示す図である。
図示するように本実施の形態の画像処理システム1は、表示装置20に表示される画像の画像情報に対し画像処理を行なう画像処理装置10と、画像処理装置10により作成された画像情報が入力され、この画像情報に基づき画像を表示する表示装置20と、画像処理装置10に対しユーザが種々の情報を入力するための入力装置30とを備える。
<Explanation of the entire image processing system>
FIG. 1 is a diagram showing a configuration example of the image processing system 1 according to the present embodiment.
As shown in the figure, in the image processing system 1 of the present embodiment, the image processing device 10 that performs image processing on the image information of the image displayed on the display device 20 and the image information created by the image processing device 10 are input. A display device 20 that displays an image based on the image information, and an input device 30 for the user to input various information to the image processing device 10 are provided.

画像処理装置10は、例えば、所謂汎用のパーソナルコンピュータ(PC)である。そして、画像処理装置10は、OS(Operating System)による管理下において、各種アプリケーションソフトウェアを動作させることで、画像情報の作成等が行われるようになっている。 The image processing device 10 is, for example, a so-called general-purpose personal computer (PC). Then, the image processing device 10 is designed to create image information and the like by operating various application software under the control of the OS (Operating System).

表示装置20は、表示画面21に画像を表示する。表示装置20は、例えばPC用の液晶ディスプレイ、液晶テレビあるいはプロジェクタなど、加法混色にて画像を表示する機能を備えたもので構成される。したがって、表示装置20における表示方式は、液晶方式に限定されるものではない。なお、図1に示す例では、表示装置20内に表示画面21が設けられているが、表示装置20として例えばプロジェクタを用いる場合、表示画面21は、表示装置20の外部に設けられたスクリーン等となる。 The display device 20 displays an image on the display screen 21. The display device 20 is composed of, for example, a liquid crystal display for a PC, a liquid crystal television, a projector, or the like, which has a function of displaying an image by additive color mixing. Therefore, the display method in the display device 20 is not limited to the liquid crystal system. In the example shown in FIG. 1, the display screen 21 is provided in the display device 20, but when a projector is used as the display device 20, the display screen 21 is a screen or the like provided outside the display device 20. It becomes.

入力装置30は、キーボードやマウス等で構成される。入力装置30は、画像処理を行なうためのアプリケーションソフトウェアの起動、終了や、詳しくは後述するが、画像処理を行なう際に、ユーザが画像処理装置10に対し画像処理を行なうための指示を入力するのに使用する。 The input device 30 is composed of a keyboard, a mouse, and the like. The input device 30 starts and ends the application software for performing image processing, and as will be described in detail later, when performing image processing, the user inputs an instruction for performing image processing to the image processing device 10. Used for.

画像処理装置10および表示装置20は、DVI(Digital Visual Interface)を介して接続されている。なお、DVIに代えて、HDMI(登録商標)(High-Definition Multimedia Interface)やDisplayPort等を介して接続するようにしてもかまわない。
また画像処理装置10と入力装置30とは、例えば、USB(Universal Serial Bus)を介して接続されている。なお、USBに代えて、IEEE1394やRS−232C等を介して接続されていてもよい。
The image processing device 10 and the display device 20 are connected via a DVI (Digital Visual Interface). Instead of DVI, connection may be made via HDMI (registered trademark) (High-Definition Multimedia Interface), DisplayPort, or the like.
Further, the image processing device 10 and the input device 30 are connected via, for example, USB (Universal Serial Bus). Instead of USB, it may be connected via IEEE1394, RS-232C, or the like.

このような画像処理システム1において、表示装置20には、まず最初に画像処理を行なう前の画像である原画像が表示される。そしてユーザが入力装置30を使用して、画像処理装置10に対し画像処理を行なうための指示を入力すると、画像処理装置10により原画像の画像情報に対し画像処理がなされる。この画像処理の結果は、表示装置20に表示される画像に反映され、画像処理後の画像が再描画されて表示装置20に表示されることになる。この場合、ユーザは、表示装置20を見ながらインタラクティブに画像処理を行なうことができ、より直感的に、またより容易に画像処理の作業を行える。 In such an image processing system 1, the display device 20 first displays an original image which is an image before image processing is performed. Then, when the user inputs an instruction for performing image processing to the image processing device 10 using the input device 30, the image processing device 10 performs image processing on the image information of the original image. The result of this image processing is reflected in the image displayed on the display device 20, and the image after the image processing is redrawn and displayed on the display device 20. In this case, the user can interactively perform the image processing while looking at the display device 20, and the image processing work can be performed more intuitively and more easily.

なお本実施の形態における画像処理システム1は、図1の形態に限られるものではない。例えば、画像処理システム1としてタブレット端末を例示することができる。この場合、タブレット端末は、タッチパネルを備え、このタッチパネルにより画像の表示を行なうとともにユーザの指示が入力される。即ち、タッチパネルが、表示装置20および入力装置30として機能する。また同様に表示装置20および入力装置30を統合した装置として、タッチモニタを用いることもできる。これは、上記表示装置20の表示画面21としてタッチパネルを使用したものである。この場合、画像処理装置10により画像情報が作成され、この画像情報に基づきタッチモニタに画像が表示される。そしてユーザは、このタッチモニタをタッチ等することで画像処理を行なうための指示を入力する。 The image processing system 1 in the present embodiment is not limited to the embodiment shown in FIG. For example, a tablet terminal can be exemplified as the image processing system 1. In this case, the tablet terminal is provided with a touch panel, and the touch panel is used to display an image and input a user's instruction. That is, the touch panel functions as the display device 20 and the input device 30. Similarly, a touch monitor can be used as a device that integrates the display device 20 and the input device 30. This uses a touch panel as the display screen 21 of the display device 20. In this case, the image processing device 10 creates image information, and the image is displayed on the touch monitor based on the image information. Then, the user inputs an instruction for performing image processing by touching the touch monitor or the like.

<画像処理装置の説明>
図2は、本実施の形態における画像処理装置10の機能構成例を表すブロック図である。なお図2では、画像処理装置10が有する種々の機能のうち本実施の形態に関係するものを選択して図示している。
図示するように本実施の形態の画像処理装置10は、画像情報取得部11と、ユーザ指示受付部12と、領域検出部13と、領域切替部14と、画像処理部15と、画像情報出力部16とを備える。
<Explanation of image processing device>
FIG. 2 is a block diagram showing a functional configuration example of the image processing device 10 according to the present embodiment. Note that FIG. 2 shows a selection of various functions of the image processing apparatus 10 that are related to the present embodiment.
As shown in the figure, the image processing device 10 of the present embodiment includes an image information acquisition unit 11, a user instruction reception unit 12, an area detection unit 13, an area switching unit 14, an image processing unit 15, and an image information output. A unit 16 is provided.

画像情報取得部11は、画像処理を行なう画像の画像情報を取得する。即ち、画像情報取得部11は、画像処理を行なう前の原画像の画像情報を取得する。この画像情報は、表示装置20で表示を行なうための、例えば、RGB(Red、Green、Blue)のビデオデータ(RGBデータ)である。 The image information acquisition unit 11 acquires the image information of the image to be image-processed. That is, the image information acquisition unit 11 acquires the image information of the original image before the image processing is performed. This image information is, for example, RGB (Red, Green, Blue) video data (RGB data) for display on the display device 20.

ユーザ指示受付部12は、位置情報取得部の一例であり、入力装置30により入力された画像処理に関するユーザによる指示を受け付ける。
具体的には、ユーザ指示受付部12は、表示装置20で表示している画像の中から、ユーザが特定の画像領域として指定した指定領域を指定する指示をユーザ指示情報として受け付ける。この特定の画像領域は、この場合、ユーザが画像処理を行なう画像領域である。実際には、本実施の形態では、ユーザ指示受付部12は、ユーザ指示情報として、ユーザが入力した指定領域の代表位置を表す位置情報を取得する。
また詳しくは後述するが、ユーザ指示受付部12は、ユーザが、この指定領域の中から実際に画像処理を行なうものを選択する指示をユーザ指示情報として受け付ける。さらにユーザ指示受付部12は、選択された指定領域に対し、ユーザが画像処理を行う処理項目や処理量等に関する指示をユーザ指示情報として受け付ける。これらの内容に関するさらに詳しい説明については後述する。
The user instruction receiving unit 12 is an example of a position information acquisition unit, and receives an instruction by a user regarding image processing input by the input device 30.
Specifically, the user instruction receiving unit 12 receives an instruction to specify a designated area designated as a specific image area by the user from the images displayed on the display device 20 as user instruction information. This specific image area is, in this case, an image area in which the user performs image processing. Actually, in the present embodiment, the user instruction receiving unit 12 acquires the position information representing the representative position of the designated area input by the user as the user instruction information.
Further, as will be described in detail later, the user instruction receiving unit 12 receives as user instruction information an instruction for the user to select an image to be actually processed from the designated area. Further, the user instruction receiving unit 12 receives instructions regarding processing items, processing amounts, and the like for which the user performs image processing to the selected designated area as user instruction information. A more detailed explanation of these contents will be described later.

本実施の形態では、指定領域を指定する作業を下記に説明するユーザインタラクティブに行う方法を採用する。
図3は、指定領域を指定する作業をユーザインタラクティブに行う方法の例を示した図である。
図3では、表示装置20の表示画面21で表示している画像が、人物と、人物の背後に写る背景とからなる写真の画像Gである場合を示している。そしてユーザが、前景として人物の顔の部分、および後景として顔以外の部分をそれぞれ指定領域として選択する場合を示している。即ち、この場合指定領域は2つある。以後、顔の部分の指定領域を「第1の指定領域」、顔以外の部分の指定領域を「第2の指定領域」と言うことがある。
In the present embodiment, a method of performing the work of designating the designated area in a user-interactive manner as described below is adopted.
FIG. 3 is a diagram showing an example of a method of performing the work of designating a designated area user-interactively.
FIG. 3 shows a case where the image displayed on the display screen 21 of the display device 20 is an image G of a photograph including a person and a background reflected behind the person. Then, the case where the user selects the face part of the person as the foreground and the part other than the face as the background as the designated area is shown. That is, in this case, there are two designated areas. Hereinafter, the designated area of the face portion may be referred to as a "first designated area", and the designated area of the portion other than the face may be referred to as a "second designated area".

そしてユーザは、指定領域のそれぞれに対し代表となる軌跡をそれぞれ与える。この軌跡は、入力装置30により入力することができる。具体的には、入力装置30がマウスであった場合は、マウスを操作して表示装置20の表示画面21で表示している画像Gをドラッグし軌跡を描く。また入力装置30がタッチパネルであった場合は、ユーザの指やタッチペン等により画像Gをなぞりスワイプすることで同様に軌跡を描く。なお軌跡ではなく、点として与えてもよい。即ち、ユーザは、頭髪の部分などのそれぞれの指定領域に対し代表となる位置を示す情報を与えればよい。これは指定領域の代表位置を表す位置情報をユーザが入力する、と言い換えることもできる。なお以後、この軌跡や点等を「シード」と言うことがある。 Then, the user gives a representative locus to each of the designated areas. This locus can be input by the input device 30. Specifically, when the input device 30 is a mouse, the mouse is operated to drag the image G displayed on the display screen 21 of the display device 20 to draw a locus. When the input device 30 is a touch panel, the trajectory is similarly drawn by tracing and swiping the image G with a user's finger, a touch pen, or the like. It may be given as a point instead of a locus. That is, the user may provide information indicating a representative position for each designated area such as a hair portion. This can be rephrased as the user inputting the position information representing the representative position of the designated area. Hereinafter, this trajectory, point, etc. may be referred to as a "seed".

図3の例では、顔の部分と顔以外の部分にそれぞれシードが描かれている。なお以後、前景である顔の部分に描かれたシードを「シード1」、後景である顔以外の部分に描かれたシードを「シード2」ということがある。 In the example of FIG. 3, seeds are drawn on the face portion and the non-face portion, respectively. Hereinafter, the seed drawn on the face portion in the foreground may be referred to as "seed 1", and the seed drawn on the portion other than the face portion in the background may be referred to as "seed 2".

領域検出部13は、シードの位置情報に基づき、表示装置20で表示されている画像の中から指定領域を検出する。詳しくは後述するが、領域検出部13は、指定領域に属する画素の周囲のテクスチャと指定領域に含まれるか否かを判断する対象である画素の周囲のテクスチャとの類似度を基に指定領域を検出する。 The area detection unit 13 detects a designated area from the image displayed on the display device 20 based on the seed position information. As will be described in detail later, the area detection unit 13 has a designated area based on the similarity between the texture around the pixel belonging to the designated area and the texture around the pixel to be determined whether or not it is included in the designated area. Is detected.

領域検出部13が、シードの位置情報を基にして指定領域を切り出すには、まずシードが描かれた箇所の画素に対しラベルを付加する。図3の例では、顔の部分に描かれたシード1に対応する画素に「ラベル1」を、顔以外の部分に描かれたシード2に対応する画素に「ラベル2」を付加する。本実施の形態では、このようにラベルを付与することを「ラベル付け」と言う。 In order for the area detection unit 13 to cut out a designated area based on the seed position information, first, a label is added to the pixel at the place where the seed is drawn. In the example of FIG. 3, "label 1" is added to the pixel corresponding to the seed 1 drawn on the face portion, and "label 2" is added to the pixel corresponding to the seed 2 drawn on the portion other than the face. In the present embodiment, assigning a label in this way is referred to as "labeling".

図4(a)〜(c)は、図3で示した画像Gについて、領域拡張方法により指定領域が切り出される様子を示している。
このうち図4(a)は、図3と同様の図であり、画像Gにシードとしてシード1およびシード2が描かれた状態を示している。
そして図4(b)で示すように、シードが描かれた箇所から指定領域内に領域が拡張していき、図4(c)で示すように最後に指定領域として2つの指定領域である第1の指定領域S1、第2の指定領域S2が切り出される。
4 (a) to 4 (c) show how a designated area is cut out from the image G shown in FIG. 3 by the area expansion method.
Of these, FIG. 4A is a diagram similar to FIG. 3, showing a state in which seed 1 and seed 2 are drawn as seeds in the image G.
Then, as shown in FIG. 4 (b), the area expands into the designated area from the place where the seed is drawn, and finally, as shown in FIG. 4 (c), there are two designated areas as designated areas. The designated area S1 of 1 and the second designated area S2 are cut out.

以上のような方法を採用することで、指定領域が複雑な形状であっても、ユーザは、より直感的に、またより容易に指定領域が切り出せる。 By adopting the above method, even if the designated area has a complicated shape, the user can cut out the designated area more intuitively and more easily.

領域切替部14は、複数の指定領域を切り替える。即ち、指定領域が複数存在した場合、ユーザが画像調整を行ないたい指定領域の選択を行ない、これに従い、領域切替部14が指定領域を切り替える。 The area switching unit 14 switches a plurality of designated areas. That is, when a plurality of designated areas exist, the user selects the designated area for which image adjustment is desired, and the area switching unit 14 switches the designated area accordingly.

図5(a)〜(b)は、ユーザが指定領域の選択を行なうときに、表示装置20の表示画面21に表示される画面の例を示している。
図5(a)〜(b)に示した例では、表示画面21の左側に指定領域が選択された状態の画像Gが表示され、表示画面21の右側に領域1または領域2の何れかを選択するラジオボタン212a、212bが表示される。この場合、領域1は、第1の指定領域S1に、領域2は、第2の指定領域S2に対応する。そしてユーザが入力装置30を使用して、このラジオボタン212a、212bを選択すると、指定領域が切り替わる。
5 (a) to 5 (b) show an example of a screen displayed on the display screen 21 of the display device 20 when the user selects a designated area.
In the examples shown in FIGS. 5A to 5B, the image G in a state where the designated area is selected is displayed on the left side of the display screen 21, and either the area 1 or the area 2 is displayed on the right side of the display screen 21. The radio buttons 212a and 212b to be selected are displayed. In this case, the area 1 corresponds to the first designated area S1, and the area 2 corresponds to the second designated area S2. Then, when the user selects the radio buttons 212a and 212b using the input device 30, the designated area is switched.

図5(a)は、ラジオボタン212aが選択されている状態であり、指定領域として、顔の部分の画像領域である第1の指定領域S1が選択されている。そしてユーザがラジオボタン212bを選択すると、図5(b)に示すように指定領域として、顔の部分以外の画像領域である第2の指定領域S2に切り替わる。 FIG. 5A shows a state in which the radio button 212a is selected, and the first designated area S1 which is an image area of the face portion is selected as the designated area. Then, when the user selects the radio button 212b, the designated area is switched to the second designated area S2, which is an image area other than the face portion, as shown in FIG. 5 (b).

実際には、図5で説明を行なった操作の結果は、ユーザ指示情報としてユーザ指示受付部12により取得され、さらに領域切替部14により指定領域の切り替えが行なわれる。 Actually, the result of the operation described in FIG. 5 is acquired by the user instruction receiving unit 12 as the user instruction information, and the designated area is switched by the area switching unit 14.

画像処理部15は、選択された指定領域に対し実際に画像処理を行なう。
図6は、画像処理を行なう際に、表示装置20の表示画面21に表示される画面の例を示している。
ここでは、選択された指定領域に対し、色相、彩度、輝度の調整を行なう例を示している。この例では、表示画面21の左上側に指定領域が選択された状態の画像Gが表示され、表示画面21の右上側に領域1および領域2の何れかを選択するラジオボタン212a、212bが表示される。ここでは、ラジオボタンのうち212aが選択されており、指定領域として、顔の部分の画像領域である第1の指定領域S1が選択されている。なおラジオボタン212a、212bを操作することで、指定領域の切り替えが可能であることは、図5の場合と同様である。
The image processing unit 15 actually performs image processing on the selected designated area.
FIG. 6 shows an example of a screen displayed on the display screen 21 of the display device 20 when performing image processing.
Here, an example of adjusting the hue, saturation, and brightness with respect to the selected designated area is shown. In this example, the image G with the designated area selected is displayed on the upper left side of the display screen 21, and the radio buttons 212a and 212b for selecting either the area 1 or the area 2 are displayed on the upper right side of the display screen 21. Will be done. Here, 212a of the radio buttons is selected, and the first designated area S1, which is an image area of the face portion, is selected as the designated area. It should be noted that the designated area can be switched by operating the radio buttons 212a and 212b, as in the case of FIG.

また表示画面21の下側には、色相、彩度、輝度の調整を行なうためのスライドバー213aと、スライダ213bが表示される。スライダ213bは、入力装置30の操作によりスライドバー213a上において図中左右に移動し、スライドが可能である。スライダ213bは、初期状態ではスライドバー213aの中央に位置し、この位置において色相、彩度、輝度の調整前の状態を表す。 Further, on the lower side of the display screen 21, a slide bar 213a for adjusting hue, saturation, and brightness, and a slider 213b are displayed. The slider 213b can be slid by moving left and right in the drawing on the slide bar 213a by operating the input device 30. The slider 213b is initially located at the center of the slide bar 213a, and represents the state before adjustment of hue, saturation, and brightness at this position.

そしてユーザが、入力装置30を使用して、色相、彩度、輝度の何れかのスライダ213bをスライドバー213a上で図中左右にスライドさせると、選択された指定領域に対し画像処理がなされ、表示画面21で表示される画像Gもそれに対応して変化する。この場合、図中右方向にスライダ213bをスライドさせると、対応する色相、彩度、輝度の何れかを増加させる画像処理がなされる。対して図中左方向にスライダ213bをスライドさせると、対応する色相、彩度、輝度の何れかを減少させる画像処理がなされる。 Then, when the user slides the hue, saturation, or brightness slider 213b on the slide bar 213a to the left or right in the figure using the input device 30, image processing is performed on the selected designated area. The image G displayed on the display screen 21 also changes accordingly. In this case, when the slider 213b is slid to the right in the figure, image processing is performed to increase any of the corresponding hue, saturation, and brightness. On the other hand, when the slider 213b is slid to the left in the drawing, image processing is performed to reduce any of the corresponding hue, saturation, and brightness.

図2に戻り、画像情報出力部16は、以上のように画像処理がなされた後の画像情報を出力する。画像処理がなされた後の画像情報は、表示装置20に送られる。そして表示装置20にてこの画像情報に基づき画像が表示される。 Returning to FIG. 2, the image information output unit 16 outputs the image information after the image processing is performed as described above. The image information after the image processing is performed is sent to the display device 20. Then, an image is displayed on the display device 20 based on this image information.

<領域検出部の説明>
次に領域検出部13が領域拡張方法により指定領域を切り出す方法についてさらに詳しく説明を行なう。
<Explanation of area detection unit>
Next, a method in which the area detection unit 13 cuts out a designated area by the area expansion method will be described in more detail.

ここではまず従来の領域拡張方法についての説明を行なう。
図7(a)〜(c)は、従来の領域拡張方法について説明した図である。
このうち図7(a)は、原画像であり、縦3画素、横3画素の3×3=9画素の領域からなる。この原画像は、2つの画像領域から構成される。図7(a)では、それぞれの画素の色の濃さの違いによりこの2つの画像領域を表している。それぞれの画像領域に含まれる画素値は互いに近い値を示すものとする。
Here, first, the conventional area expansion method will be described.
7 (a) to 7 (c) are diagrams illustrating a conventional region expansion method.
Of these, FIG. 7A is an original image, which is composed of a region of 3 × 3 = 9 pixels of 3 vertical pixels and 3 horizontal pixels. This original image is composed of two image areas. In FIG. 7A, these two image regions are represented by the difference in the color density of each pixel. It is assumed that the pixel values included in each image area show values close to each other.

そして図7(b)に示すように、2行1列に位置する画素にシード1を、1行3列に位置する画素にシード2を与える。 Then, as shown in FIG. 7B, the seed 1 is given to the pixels located in the 2 rows and 1 column, and the seed 2 is given to the pixels located in the 1 row and 3 columns.

このとき中央の画素である2行2列に位置する画素が、シード1が含まれる指定領域に属するか、シード2が含まれる指定領域に属するか否かを判定する場合を考える。ここでは、この中央の画素について、中央の画素の画素値と、中央の画素に接する周辺8画素の中に存在するシードの画素値を比較する。そして画素値が近ければ、中央の画素は、そのシードが含まれる指定領域に含まれると判定する。この場合、周辺8画素の中には、シード1とシード2の2つのシードが含まれるが、中央の画素の画素値は、シード1の画素値よりシード2の画素値とより近いため、シード1が含まれる指定領域に属すると判定される。 At this time, consider a case where it is determined whether or not the pixel located in the 2 rows and 2 columns, which is the central pixel, belongs to the designated area including the seed 1 or the designated area including the seed 2. Here, for the central pixel, the pixel value of the central pixel and the pixel value of the seed existing in the peripheral eight pixels in contact with the central pixel are compared. Then, if the pixel values are close, it is determined that the center pixel is included in the designated area including the seed. In this case, the peripheral 8 pixels include two seeds, a seed 1 and a seed 2, but the pixel value of the central pixel is closer to the pixel value of the seed 2 than the pixel value of the seed 1, so that the seed is used. It is determined that it belongs to the designated area including 1.

そして図7(c)に示すように、中央の画素は、シード1の領域に属するようになる。そして中央の画素は、今度は、新たなシードとして扱われる。そしてこの場合、中央の画素は、シード1と同じ、「ラベル1」にラベル付けされる。 Then, as shown in FIG. 7 (c), the central pixel belongs to the region of seed 1. And the center pixel is now treated as a new seed. Then, in this case, the central pixel is labeled with the same "label 1" as the seed 1.

従来の領域拡張方法では、シードの画素に接する画素を指定領域に含まれるか否かの判定の対象となる対象画素として選択し(上述した例では、中央の画素)、この対象画素の画素値と、対象画素の周辺8画素の画素に含まれるシードの画素値とを比較する。そして対象画素は、画素値が近いシードに含まれる領域に属すると考え、ラベル付けをする。さらにこれを繰り返すことで領域を拡張していくのが基本的な考え方となる。 In the conventional area expansion method, a pixel in contact with the seed pixel is selected as a target pixel to be determined whether or not it is included in the specified area (the center pixel in the above example), and the pixel value of this target pixel is selected. And the pixel value of the seed included in the pixels of the eight pixels around the target pixel are compared. Then, the target pixel is labeled because it is considered to belong to the region included in the seed whose pixel value is close. The basic idea is to expand the area by repeating this.

図8−1(a)〜(e)は、従来の領域拡張方法を使用し、2つのシードが与えられた場合に、画像が2つの指定領域に分けられる様子を示した図である。
ここでは図8−1(a)の原画像に対し、図8−1(b)で示すように、シードとしてシード1とシード2の2つを与える。そして各々のシードを基点に領域を拡張していく。この場合、上述したように原画像における周辺画素の画素値との近さ等に応じて領域を拡張していくことができる。このとき図8−1(c)に示すように領域同士のせめぎ合いがある場合は、再判定の対象画素となり、再判定の対象画素の画素値と近傍の画素値との関係でどちらの領域に属するかを決めればよい。このとき、下記文献に記載されている方法を使うことができる。
8-1 (a) to 8-1 (e) are diagrams showing how an image is divided into two designated regions when two seeds are given by using a conventional region expansion method.
Here, as shown in FIG. 8-1 (b), two seeds, seed 1 and seed 2, are given to the original image of FIG. 8-1 (a). Then, the area is expanded based on each seed. In this case, as described above, the area can be expanded according to the proximity to the pixel values of the peripheral pixels in the original image. At this time, if there is a conflict between the regions as shown in FIG. 8-1 (c), the pixel is the target pixel for re-judgment, and which region is the relationship between the pixel value of the target pixel for re-judgment and the nearby pixel value. You just have to decide if it belongs to. At this time, the method described in the following document can be used.

V.Vezhnevets and V.Konouchine: "Grow-Cut" -Interactive Multi-label N-D Image Segmentation", Proc.Graphicon.pp 150-156(2005) V.Vezhnevets and V.Konouchine: "Grow-Cut" -Interactive Multi-label N-D Image Segmentation ", Proc.Graphicon.pp 150-156 (2005)

図8−1(d)の例では、再判定の対象画素は、最終的にはシード2の領域として判定され、図8−1(e)に示すように2つのシードを基に、2つの領域に切り分けられて収束する。なおこの例では、2つの領域に切り分ける場合を示したが、3つ以上のシードを与え、3つ以上の領域に切り分けることもできる。 In the example of FIG. 8-1 (d), the target pixel for re-judgment is finally determined as the region of seed 2, and as shown in FIG. 8-1 (e), two seeds are used as the basis for the two seeds. It is divided into regions and converges. In this example, the case of dividing into two regions is shown, but it is also possible to give three or more seeds and divide into three or more regions.

このように従来の領域拡張方法では、対象画素に着目し、対象画素の画素値に対して周辺8画素にあるシードの画素の画素値を比較して対象画素が属する指定領域を決定する。 As described above, in the conventional area expansion method, the target pixel is focused on, and the pixel value of the seed pixel in the peripheral eight pixels is compared with the pixel value of the target pixel to determine the designated area to which the target pixel belongs.

しかしながら従来の領域拡張方法では、画素を対象画素として1つずつ選択し、ラベル付けを行なっていく必要があり、処理速度が遅くなりやすい問題がある。また領域が入り組んでいる箇所などでは、切り分けの際の精度が低くなりやすい。この問題を解決するため、例えば、以下に説明するような領域拡張方法も存在する。 However, in the conventional area expansion method, it is necessary to select pixels one by one as target pixels and label them, which has a problem that the processing speed tends to be slow. In addition, the accuracy at the time of separation tends to be low in places where the area is complicated. In order to solve this problem, for example, there is also an area expansion method as described below.

この領域拡張方法では、シード1やシード2の画素である基準画素を中心としてそれぞれ予め定められた第1の範囲を設定する。そしてこの第1の範囲内において、基準画素を除く画素を対象画素とし、この対象画素について、画素の「強さ」を利用してシード1が含まれる指定領域やシード2が含まれる指定領域に属するとの判断を行なう。 In this area expansion method, a predetermined first range is set around the reference pixel which is a pixel of the seed 1 and the seed 2. Then, within this first range, the pixels other than the reference pixel are set as the target pixels, and the target pixels are set to the designated area including the seed 1 and the designated area including the seed 2 by using the “strength” of the pixels. Judge that it belongs.

図8−2は、第1の範囲について説明した図である。
図示するように、2つの画像領域のそれぞれに基準画素であるシード1およびシード2が選択されている。そしてさらにこのシード1とシード2を中心に位置するようにして縦5画素×横5画素の範囲を第1の範囲とする。図では、この範囲を太線の枠内の範囲として表示している。
FIG. 8-2 is a diagram illustrating the first range.
As shown in the figure, seed 1 and seed 2 which are reference pixels are selected for each of the two image regions. Further, the seed 1 and the seed 2 are positioned at the center, and the range of 5 pixels in the vertical direction and 5 pixels in the horizontal direction is set as the first range. In the figure, this range is displayed as the range within the thick line frame.

「強さ」は、ラベルに対応する指定領域に属する強さであり、ある画素がラベルに対応する指定領域に属する可能性の大きさを表す。強さが大きいほどその画素がラベルに対応する指定領域に属する可能性が高く、強さが小さいほどその画素がラベルに対応する指定領域に属する可能性が低い。強さは、次のようにして定まる。
まずユーザが最初に指定した代表位置に含まれる画素の強さは、初期値として1となる。つまり領域を拡張する前のシード1やシード2の画素は、強さが1である。またまだラベル付けがされていない画素については、強さは0である。
The "strength" is the strength belonging to the designated area corresponding to the label, and represents the magnitude of the possibility that a certain pixel belongs to the designated area corresponding to the label. The higher the strength, the more likely the pixel belongs to the designated area corresponding to the label, and the lower the strength, the less likely the pixel belongs to the designated area corresponding to the label. The strength is determined as follows.
First, the strength of the pixels included in the representative position first specified by the user is 1 as an initial value. That is, the pixels of the seed 1 and the seed 2 before expanding the area have a strength of 1. For pixels that have not yet been labeled, the strength is 0.

そして強さが与えられた画素が周辺の画素に及ぼす影響力を考える。
図8−3(a)〜(b)は、影響力を決定する方法について示した図である。図8−3(a)〜(b)において、横軸は、ユークリッド距離dを表し、縦軸は、影響力を表す。
このユークリッド距離dは、強さを与えられた画素とその画素の周辺に位置する画素との間で決まる画素値のユークリッド距離dである。画素値がRGB値で表される場合、ユークリッド距離dは、以下の数1式のように表すことができる。数1式では、強さを与えられた画素の画素値を(R、G、B)とし、周辺に位置する画素の画素値を(R、G、B)とした場合のユークリッド距離dを示している。
Then, consider the influence of the pixel given the strength on the surrounding pixels.
8-3 (a)-(b) are diagrams showing a method of determining influence. In FIG. 8-3 (a) ~ (b) , the horizontal axis represents the Euclidean distance d i, and the vertical axis represents the influence.
The Euclidean distance d i is the Euclidean distance d i of the pixel value determined between the pixels located around the pixel and the pixel given strength. If the pixel value is represented by RGB values, the Euclidean distance d i can be expressed as the following equation (1). In equation (1), the pixel value of the pixel given the strength (R O, G O, B O) and then, the pixel values of pixels positioned around case of (R i, G i, B i) and shows the Euclidean distances d i.

Figure 0006930099
Figure 0006930099

そして例えば、図8−3(a)に図示するように非線形の単調減少関数を定め、ユークリッド距離dに対し、この単調減少関数により決まる値を影響力とする。
つまりユークリッド距離dが小さいほど、影響力はより大きくなり、ユークリッド距離dが大きいほど、影響力はより小さくなる。
なお単調減少関数は、図8−3(a)のような形状のものに限られるものではなく、単調減少関数であれば特に限られるものではない。よって図8−3(b)のような線形の単調減少関数であってもよい。またユークリッド距離dの特定の範囲で線形であり、他の範囲で非線形であるような区分線形の単調減少関数であってもよい。
The example defines a monotonically decreasing function of the nonlinear as shown in FIGS. 8-3 (a), with respect to the Euclidean distance d i, a value determined by the monotonically decreasing function and influence.
That enough Euclidean distance d i is small, influence becomes larger, as the Euclidean distance d i is large, the influence becomes smaller.
The monotonous decreasing function is not limited to the one having the shape shown in FIG. 8-3 (a), and is not particularly limited as long as it is a monotonous decreasing function. Therefore, it may be a linear monotonous decrease function as shown in FIG. 8-3 (b). Also a linearly specific range of the Euclidean distance d i, may be a monotonically decreasing function of the piecewise linear such that the non-linear in other ranges.

そして指定領域に属すると判断された画素の強さは、基準画素の強さに影響力を乗じたものとなる。例えば、基準画素の強さが1で、その左側に隣接する対象画素に与える影響力が0.9だった場合、この左側に隣接する対象画素が指定領域に属すると判断されたときに与えられる強さは、1×0.9=0.9となる。また例えば、基準画素の強さが1で、その2つ左側に隣接する対象画素に与える影響力が0.8だった場合、この対象画素が指定領域に属すると判断されたときに与えられる強さは、1×0.8=0.8となる。 The strength of the pixel determined to belong to the designated region is obtained by multiplying the strength of the reference pixel by the influence. For example, if the strength of the reference pixel is 1 and the influence on the target pixel adjacent to the left side is 0.9, it is given when it is determined that the target pixel adjacent to the left side belongs to the specified area. The strength is 1 × 0.9 = 0.9. Further, for example, when the strength of the reference pixel is 1 and the influence on the target pixels adjacent to the left side of the two is 0.8, the strength given when it is determined that the target pixels belong to the designated area. The value is 1 × 0.8 = 0.8.

以上の計算方法を利用し、第1の範囲内の対象画素に与えられている強さにより判断を行なうこともできる。このとき対象画素が、ラベルを有しない場合は、基準画素が属する指定領域に含まれると判断し、対象画素が他の指定領域についてのラベルを既に有する場合は、強さが大きい方の指定領域に含まれると判断する。そして前者の場合は、全て基準画素と同じラベル付けを行なう。また後者の場合は、特性のうち強さが強い方のラベル付けを行う。 Using the above calculation method, it is also possible to make a judgment based on the strength given to the target pixel within the first range. At this time, if the target pixel does not have a label, it is determined that it is included in the designated area to which the reference pixel belongs, and if the target pixel already has a label for another designated area, the designated area having the larger strength is determined. Judged to be included in. In the former case, the same labeling as the reference pixel is performed. In the latter case, the stronger of the characteristics is labeled.

図8−4は、図8−2で示す第1の範囲内の対象画素について、強さを基にした方法で判断を行なった結果を示している。
図8−2に示す第1の範囲は、シード1とシード2とで一部重なる。そして第1の範囲が、重ならない箇所、即ち、シード1とシード2とで競合しない箇所では、この場合、ラベル付けされていないもので、全て基準画素であるシード1またはシード2と同じラベル付けを行なう。一方、第1の範囲が、シード1とシード2とで重なる箇所、即ち、競合する箇所では、強さが強い方のラベル付けをする。その結果、図8−4に示すようにラベル付けがなされる。
FIG. 8-4 shows the result of determining the target pixel in the first range shown in FIG. 8-2 by a method based on the strength.
The first range shown in FIG. 8-2 partially overlaps the seed 1 and the seed 2. And where the first range does not overlap, that is, where the seed 1 and the seed 2 do not conflict, in this case they are unlabeled and are all labeled the same as the reference pixel seed 1 or seed 2. To do. On the other hand, where the first range overlaps the seed 1 and the seed 2, that is, where they compete with each other, the stronger one is labeled. As a result, labeling is performed as shown in FIG. 8-4.

図8−5(a)〜(h)は、図8−3〜図8−4で説明した領域拡張方法で順次ラベル付けがされていく過程の例を示した図である。
図8−5(a)は、このときシードの画素に対し設定される第1の範囲を示している。つまり基準画素であるシード1およびシード2が選択されている。そしてさらにこのシード1とシード2を中心に位置するようにして縦3画素×横3画素の範囲を第1の範囲としている。図では、この第1の範囲を太線の枠内の範囲として表示している。
本実施の形態では、図8−5(b)に示すように2行2列の位置に設定されるシード2を起点とし、まず第1の範囲内の対象画素が何れの指定領域に属するか否かを判断する。そして図8−5(c)〜(d)に示すように基準画素を図中右側に一画素ずつ移動させつつ、第1の範囲内の対象画素が何れの指定領域に属するか否かを判断していく。この判断は、上述した強さによりなされる。
そして図中右端までを対象画素として判断した後は、次に基準画素を第3列に移し、同様に基準画素を図中右側に一画素ずつ移動させつつ、第1の範囲内の対象画素が何れの指定領域に属するか否かを判断していく。そして図中右端までを対象画素として判断した後は、さらに次の列に移る。これは図8−5(e)〜(g)に示すように繰り返され、図中右下端部に基準画素が移動するまで行なわれる。つまり基準画素を一画素毎に走査するように移動させつつ判断を行なう。
8-5 (a) to 8-5 (h) are diagrams showing an example of a process of sequentially labeling by the region expansion method described with reference to FIGS. 8-3 to 8-4.
FIG. 8-5 (a) shows a first range set for the seed pixels at this time. That is, the seed 1 and the seed 2 which are the reference pixels are selected. Further, the seed 1 and the seed 2 are positioned at the center, and the range of 3 vertical pixels × 3 horizontal pixels is set as the first range. In the figure, this first range is displayed as a range within the frame of the thick line.
In the present embodiment, starting from the seed 2 set at the position of 2 rows and 2 columns as shown in FIG. 8-5 (b), first, which designated area the target pixel in the first range belongs to belongs to. Judge whether or not. Then, as shown in FIGS. 8-5 (c) to 8-5, while moving the reference pixel one pixel at a time to the right side in the figure, it is determined which designated area the target pixel in the first range belongs to. I will do it. This judgment is made by the strength described above.
Then, after determining up to the right end in the figure as the target pixel, the reference pixel is then moved to the third column, and similarly, the reference pixel is moved to the right side in the figure one by one, and the target pixel within the first range is moved. It is determined which designated area it belongs to. Then, after determining the right end of the figure as the target pixel, the process moves to the next column. This is repeated as shown in FIGS. 8-5 (e) to 8-5 (g) until the reference pixel moves to the lower right end in the figure. That is, the judgment is made while moving the reference pixel so as to scan each pixel.

さらに右下端部に基準画素が達し、画素の移動がこれ以上できなくなった後は、上述した場合と逆向きに基準画素を移動させ、基準画素が左上端部に移動するまで同様の処理を行なう。これで基準画素が1回往復移動したことになる。さらに以後、収束するまでこの基準画素の往復移動を繰り返す。 After the reference pixel reaches the lower right end and the pixel cannot be moved any more, the reference pixel is moved in the opposite direction to the above case, and the same processing is performed until the reference pixel moves to the upper left end. .. This means that the reference pixel has moved back and forth once. After that, the reciprocating movement of the reference pixel is repeated until it converges.

そして最終的には、図8−5(h)に示すように、第1の指定領域と第2の指定領域に切り分けが行なわれる。 Finally, as shown in FIG. 8-5 (h), the first designated area and the second designated area are separated.

以上の方法で領域拡張を行うことで、速度の向上や切り抜き境界の精度を高めることができる。しかしこの方法でも、画素間の色の距離を基に領域を拡張している。そのため指定領域外の領域であっても類似色を有する領域について誤ったラベル付けがなされ、同じ指定領域であるとする場合がある。 By expanding the area by the above method, it is possible to improve the speed and the accuracy of the clipping boundary. However, this method also expands the area based on the color distance between pixels. Therefore, even if the area is outside the designated area, the areas having similar colors may be incorrectly labeled and may be regarded as the same designated area.

そこで本実施の形態では、領域検出部13を以下の構成とし、類似色を有する画素間であっても、誤ったラベル付けが行われることを抑制し、切り抜き境界の精度の向上を図る。 Therefore, in the present embodiment, the area detection unit 13 has the following configuration, and even between pixels having similar colors, it is possible to suppress erroneous labeling and improve the accuracy of the clipping boundary.

[第1の実施形態]
まず領域検出部13の第1の実施形態について説明を行なう。
図9は、第1の実施形態における領域検出部13の機能構成例を表すブロック図である。
図示するように本実施の形態の領域検出部13は、画素選択部131と、局所領域設定部132と、類似度算出部133と、判断部134と、特性変更部135と、収束判定部136とを備える。
[First Embodiment]
First, the first embodiment of the region detection unit 13 will be described.
FIG. 9 is a block diagram showing a functional configuration example of the area detection unit 13 according to the first embodiment.
As shown in the figure, the area detection unit 13 of the present embodiment includes the pixel selection unit 131, the local area setting unit 132, the similarity calculation unit 133, the determination unit 134, the characteristic change unit 135, and the convergence determination unit 136. And.

第1の実施形態において、画素選択部131は、指定領域に属する画素の中から基準画素を選択する。ここで「指定領域に属する画素」は、例えば、ユーザが指定した代表位置に含まれる画素、即ち、上述したシードの画素である。またこれには、領域拡張により新たにラベル付けされた画素も含まれる。ここでは画素選択部131は、基準画素として指定領域に属する画素の中から1つの画素を選択する。
また画素選択部131は、基準画素に対し設定され、指定領域に含まれるか否かを判断する対象である周辺画素を選択する。ここでは画素選択部131は、周辺画素として基準画素の周辺にある画素の中から1つの画素を選択する。周辺画素は、シードが付与されていない画素から選択する。
In the first embodiment, the pixel selection unit 131 selects a reference pixel from the pixels belonging to the designated area. Here, the "pixel belonging to the designated area" is, for example, a pixel included in a representative position designated by the user, that is, a pixel of the seed described above. It also includes pixels newly labeled by region expansion. Here, the pixel selection unit 131 selects one pixel from the pixels belonging to the designated area as the reference pixel.
Further, the pixel selection unit 131 selects peripheral pixels that are set with respect to the reference pixels and are targets for determining whether or not they are included in the designated area. Here, the pixel selection unit 131 selects one pixel from the pixels around the reference pixel as peripheral pixels. Peripheral pixels are selected from pixels that have not been seeded.

局所領域設定部132は、基準画素の周囲のテクスチャを算出するための範囲として第1の局所領域を設定する。また局所領域設定部132は、周辺画素の周囲のテクスチャを算出するための範囲として第2の局所領域を設定する。 The local area setting unit 132 sets the first local area as a range for calculating the texture around the reference pixel. Further, the local area setting unit 132 sets a second local area as a range for calculating the texture around the peripheral pixels.

図10は、第1の局所領域および第2の局所領域について説明した図である。
図示する例では、基準画素をPとし、周辺画素をPとしている。そして基準画素Pを中心に位置するようにして、縦5画素×横5画素の範囲を第1の局所領域Rとしている。同様に周辺画素Pを中心に位置するようにして、縦5画素×横5画素の範囲を第2の局所領域Rとしている。図では、これらの範囲を太線の枠内の範囲として表示している。
FIG. 10 is a diagram illustrating a first local region and a second local region.
In the illustrated example, the reference pixel is P 1 and the peripheral pixels are P 2 . And so as to be positioned around the reference pixel P 1, and a vertical 5 pixels × 5 horizontal pixel range of the first local region R 1. Similarly, the peripheral pixel P 2 is located at the center, and the range of 5 vertical pixels × 5 horizontal pixels is defined as the second local region R 2 . In the figure, these ranges are displayed as the ranges within the thick line frame.

類似度算出部133は、基準画素Pの周囲である第1の局所領域R内のテクスチャと周辺画素Pの周囲である第2の局所領域R内のテクスチャとの類似度を算出する。ここでテクスチャが類似するとは、それぞれの局所領域全体が作り出す印象が類似することである。例えば、木材からなる床と同様に木材からなる椅子を含む画像があった場合、色彩としては同じ茶色である。しかしこれらの表面の質感は異なり、その結果、人が受ける印象は異なる。本実施の形態では、この印象の類似度をテクスチャの類似度として算出する。さらに具体的には、テクスチャの類似度は、それぞれの局所領域内の全画素の特徴量の類似度として抽出できる。この特徴量は、例えば、局所領域内に含まれる画素の画素値、画素値の平均値、画素値の分散、画像の周波数スペクトル、繰り返しパターンなどである。以上のように、局所領域R内および局所領域R内において、輝度の高低差、輝度の頻度、輝度発生の規則、さらには色度等において同様のパターンが見られるような場合、テクスチャ類似度が大きいとし、ここでは、例えば、以下のようにして類似度を算出する。 The similarity calculation unit 133 calculates the similarity between the texture in the first local region R 1 around the reference pixel P 1 and the texture in the second local region R 2 around the peripheral pixel P 2. do. Here, the similarity of textures means that the impressions produced by the entire local region are similar. For example, if there is an image that includes a chair made of wood as well as a floor made of wood, the color is the same brown. However, the texture of these surfaces is different, and as a result, the impression that a person receives is different. In the present embodiment, the similarity of this impression is calculated as the similarity of the texture. More specifically, the similarity of textures can be extracted as the similarity of the features of all pixels in each local region. This feature amount is, for example, a pixel value of pixels included in a local region, an average value of pixel values, a dispersion of pixel values, an image frequency spectrum, a repeating pattern, and the like. As described above, in the local region R 1 and in the local region R 2, the height difference between the brightness, the frequency of the luminance, rules of the luminance occurs, if more like similar pattern is seen in the chromaticity or the like, the texture similar Assuming that the degree is large, here, for example, the degree of similarity is calculated as follows.

第1の局所領域Rのテクスチャと第2の局所領域Rのテクスチャとの類似度をsとすると、類似度sは、例えば、下記数2式で算出できる。数2式では、第1の局所領域R内や第2の局所領域R内の画素位置の座標を(x、y)で表わしている。そして第1の局所領域R内の画素位置(x、y)における画素値をI(x、y)とし、第2の局所領域R内の画素位置(x、y)における画素値をI(x、y)とした場合の類似度sを求めている。なおここでは画素値として、輝度成分Iのみを使用している。 Assuming that the similarity between the texture of the first local region R 1 and the texture of the second local region R 2 is s, the similarity s can be calculated by, for example, the following equation (2). In Equation 2 , the coordinates of the pixel positions in the first local region R 1 and the second local region R 2 are represented by (x, y). Then, the pixel value at the pixel position (x, y) in the first local region R 1 is set to I 1 (x, y), and the pixel value at the pixel position (x, y) in the second local region R 2 is set. The degree of similarity s when I 2 (x, y) is obtained. Here, only the luminance component I is used as the pixel value.

Figure 0006930099
Figure 0006930099

なお数2式では、画素値の差の2乗を利用して類似度sを算出しているが、下記数3式のように画素値の差の絶対値を利用して類似度sを算出してもよい。また他にもテクスチャの類似度を表すものであれば、いかなる指標でもよい。 In Equation 2, the similarity s is calculated by using the square of the difference in pixel values, but the similarity s is calculated by using the absolute value of the difference in pixel values as in Equation 3 below. You may. In addition, any index may be used as long as it represents the similarity of textures.

Figure 0006930099
Figure 0006930099

つまり局所領域を画素数分の次元(この場合、5×5=25次元)を有する多次元ベクトルを考え、類似度sは、第1の局所領域Rおよび第2の局所領域Rの画素値から求まる2つの多次元ベクトル間の距離に基づく量であると考えることもできる。また数2式および数3式における類似度sは、値が小さいほど第1の局所領域Rのテクスチャと第2の局所領域Rのテクスチャとが類似していることを意味する。また値が大きいほど第1の局所領域Rのテクスチャと第2の局所領域Rのテクスチャとが類似していないことを意味する。 That is, the local region is considered as a multidimensional vector having the same dimension as the number of pixels (in this case, 5 × 5 = 25 dimensions), and the similarity s is the pixels of the first local region R 1 and the second local region R 2. It can also be thought of as a quantity based on the distance between two multidimensional vectors obtained from the values. Similarity s in Equation 2 and Equation 3 Equation also has a first local region R 1 textures and the second local region R 2 texture smaller value means that are similar. Further, the larger the value, the more the texture of the first local region R 1 and the texture of the second local region R 2 are not similar.

ここで各画素の色データがRGBデータである場合は、例えばLデータやYCbCrデータなどの輝度色差空間に変換し、輝度成分のLやYなどをI(x、y)やI(x、y)にしてもよい。また、輝度成分としてHSVデータのVなどでもよい。また輝度成分に限らず、色度や彩度を表す値でもよい。例えば、HSVデータであればSやHを用いてもよい。またLデータでは、下記数4式により算出される値を用いてもよく、YCbCrデータでは、下記数5式により算出される値を用いてもよい。即ち、輝度、色度、彩度の程度を表すものであればどのような基準でもよく、これをI(x、y)やI(x、y)の画素値とすればよい。 Here, when the color data of each pixel is RGB data, it is converted into a luminance color difference space such as L * a * b * data or YCbCr data, and the luminance components L * and Y are converted into I 1 (x, y). ) Or I 2 (x, y). Further, the brightness component may be V of HSV data or the like. Further, the value is not limited to the luminance component, and may be a value representing chromaticity or saturation. For example, if it is HSV data, S or H may be used. Further, in the L * a * b * data, the value calculated by the following equation 4 may be used, and in the YCbCr data, the value calculated by the following equation 5 may be used. That is, any reference may be used as long as it represents the degree of brightness, chromaticity, and saturation, and this may be a pixel value of I 1 (x, y) or I 2 (x, y).

Figure 0006930099
Figure 0006930099

Figure 0006930099
Figure 0006930099

判断部134は、類似度算出部133が算出したテクスチャの類似度により、周辺画素Pが指定領域に含まれるか否かを判断する。
判断部134は、例えば、閾値θを設け、数6式に示すように類似度sが閾値θより小さい場合は、周辺画素Pが、基準画素Pと同じ指定領域に属すると判断する。また類似度sが閾値θ以上である場合は、周辺画素Pが、基準画素Pと同じ指定領域に属さないと判断する。
The determination unit 134 determines whether or not the peripheral pixel P 2 is included in the designated region based on the similarity of the texture calculated by the similarity calculation unit 133.
For example, the determination unit 134 provides a threshold value θ, and when the similarity s is smaller than the threshold value θ as shown in Equation 6, determines that the peripheral pixel P 2 belongs to the same designated area as the reference pixel P 1. When the similarity s is equal to or greater than the threshold value θ, it is determined that the peripheral pixel P 2 does not belong to the same designated area as the reference pixel P 1.

Figure 0006930099
Figure 0006930099

また閾値θは、固定値に限られるものではなく、画像に応じて変化させてもよい。また閾値θは、基準画素Pや周辺画素Pの画像中における位置に応じて変化させてもよい。 Further, the threshold value θ is not limited to a fixed value, and may be changed according to the image. Further, the threshold value θ may be changed according to the positions of the reference pixel P 1 and the peripheral pixels P 2 in the image.

または、判断部134は、上述した強さを基にした方法で判断を行なってもよい。例えば、基準画素Pは、前述のように、シードまたは更新によってラベル付けがされた画素であるので強さを1としておき、第1の局所領域Rのテクスチャと第2の局所領域Rのテクスチャとの類似度sから、図8−3で説明した方法で影響力を算出する(ただしこの場合、横軸はユークリッド距離dではなく、類似度sとなる)。そして基準画素Pの強さと影響力によって、周辺画素Pに強さが伝搬されるようにしてもよい。仮に、基準画素Pが持つ強さをuとし、基準画素Pから周辺画素Pへの影響力をw12とすると、u12が周辺画素Pに伝搬される強さとなる。 Alternatively, the determination unit 134 may make a determination by a method based on the above-mentioned strength. For example, since the reference pixel P 1 is a pixel labeled by seeding or updating as described above, the strength is set to 1, and the texture of the first local region R 1 and the second local region R 2 are set. from the similarity s between texture, calculates the influence in the manner described in Figure 8-3 (However, in this case, the horizontal axis represents not the Euclidean distance d i, a similarity s). Then, the strength may be propagated to the peripheral pixels P 2 depending on the strength and influence of the reference pixel P 1. Assuming that the strength of the reference pixel P 1 is u 1 and the influence of the reference pixel P 1 on the peripheral pixel P 2 is w 12 , the u 1 w 12 is the strength propagated to the peripheral pixel P 2. ..

下記数7式の条件を満たすかどうかで、ラベル付けをするか否かの判断をおこなってもよい。数6式では、類似度が小さいほど指定領域に属すことになるが、数7式の場合は、強さを基に判断しているので、強さu12が、閾値θを超えることが、判断部134が、周辺画素Pが、基準画素Pと同じ指定領域に属する(ラベル付けする)と判断する基準となる。なお強さu12が、閾値θ以下である場合は、判断部134は、周辺画素Pが、基準画素Pと同じ指定領域に属さないと判断し、ラベル付けは行なわない。また閾値θは、前述と同様、固定値に限らず、基準画素Pや周辺画素Pの画像中における位置に応じて変化させてもよい。 Whether or not to label may be determined depending on whether or not the following equation 7 is satisfied. In the formula 6, the smaller the similarity, the more it belongs to the specified region, but in the case of the formula 7, since the judgment is made based on the strength, the strength u 1 w 12 exceeds the threshold value θ w. This serves as a reference for the determination unit 134 to determine that the peripheral pixel P 2 belongs to (labels) the same designated area as the reference pixel P 1. When the strength u 1 w 12 is equal to or less than the threshold value θ w , the determination unit 134 determines that the peripheral pixel P 2 does not belong to the same designated area as the reference pixel P 1, and does not label the peripheral pixel P 2. Further, the threshold value θ w is not limited to a fixed value as described above, and may be changed according to the positions of the reference pixel P 1 and the peripheral pixels P 2 in the image.

Figure 0006930099
Figure 0006930099

なお図10の場合は、閾値θの値にもよるが、第1の局所領域Rのテクスチャと第2の局所領域Rのテクスチャとは類似せず(類似度sが大きく、伝搬される強さは小さい)、周辺画素Pが、基準画素Pと同じ指定領域に属しないと判断される場合である。 In the case of FIG. 10, although it depends on the value of the threshold value θ, the texture of the first local region R 1 and the texture of the second local region R 2 are not similar (the degree of similarity s is large and the texture is propagated). The strength is small), and it is determined that the peripheral pixel P 2 does not belong to the same designated area as the reference pixel P 1.

図11および図12は、第1の局所領域Rのテクスチャと第2の局所領域Rのテクスチャとは類似し(類似度sが小さく)、周辺画素Pが、基準画素Pと同じ指定領域に属すると判断される場合を示した図である。
例えば、図12では、基準画素Pと周辺画素Pの画素値(この場合、輝度値)は大きく異なるが、第1の局所領域Rのテクスチャと第2の局所領域Rのテクスチャとが類似するため、周辺画素Pが、基準画素Pと同じ指定領域に属すると判断される。
11 and 12 are similar to the texture of the first local region R 1 and the texture of the second local region R 2 (similarity s is small), and the peripheral pixels P 2 are the same as the reference pixels P 1. It is a figure which showed the case which is judged to belong to a designated area.
For example, in FIG. 12, the pixel values (in this case, the brightness values) of the reference pixel P 1 and the peripheral pixels P 2 are significantly different, but the texture of the first local region R 1 and the texture of the second local region R 2 Is similar, so it is determined that the peripheral pixel P 2 belongs to the same designated area as the reference pixel P 1.

判断部134を以上のように動作させることで、与えたシードに対して、自動でシードを拡散する効果がある。 By operating the determination unit 134 as described above, there is an effect of automatically diffusing the seed with respect to the given seed.

特性変更部135は、周辺画素Pに対し付与される特性を変更する。
ここで特性とは、その画素に付与されるラベルや強さのことを言い、前述のように、シードとなっている基準画素Pの強さは1で、周辺画素Pの強さは伝搬されたu12となる(ここでは例えば、これをuとする)。
ラベルは、上述したようにその画素が何れの指定領域に属するかを表すものであり、指定領域1に属する画素は、ラベル1、指定領域2に属する画素は、ラベル2が付与される。ここではシード1のラベルはラベル1、シード2のラベルはラベル2となるので、判断部134で指定領域1に属する画素と判断された場合は、周辺画素Pは、ラベル1にラベル付けされる。また判断部134で指定領域2に属する画素と判断された場合は、周辺画素Pは、ラベル2にラベル付けされる。ここで、数7式の場合は、閾値θによってラベルを決定していたが、もし周辺画素Pにラベル付けがされていなければ、そのまま基準画素Pのラベルとし、u12を周辺画素Pの強さuとしてもよい。またこの後で、他から伝搬されてきた強さがuより大きかった場合は、強い方の強さとラベルに変えていき、これを繰り返して収束させてもよい。
The characteristic changing unit 135 changes the characteristic given to the peripheral pixel P 2.
Here, the characteristic refers to the label and strength given to the pixel, and as described above, the strength of the reference pixel P 1 as a seed is 1, and the strength of the peripheral pixel P 2 is. It becomes the propagated u 1 w 12 (here, for example, this is referred to as u 2 ).
As described above, the label indicates which designated area the pixel belongs to. The pixel belonging to the designated area 1 is given the label 1, and the pixel belonging to the designated area 2 is given the label 2. Here, the label of the seed 1 is the label 1, and the label of the seed 2 is the label 2. Therefore, when the determination unit 134 determines that the pixel belongs to the designated area 1, the peripheral pixel P 2 is labeled on the label 1. NS. If the determination unit 134 determines that the pixel belongs to the designated area 2, the peripheral pixel P 2 is labeled on the label 2. Here, in the case of the equation 7 , the label was determined by the threshold value θ w , but if the peripheral pixel P 2 is not labeled, the label is used as it is as the reference pixel P 1 and u 1 w 12 is used as it is. The strength u 2 of the peripheral pixel P 2 may be set. After that, if the strength propagated from others is greater than u 2 , the strength may be changed to the stronger strength and the label, and this may be repeated to converge.

なお周辺画素Pは、画像中における基準画素P以外の全ての画素について順次選択され、選択された周辺画素Pについて基準画素Pと同じ指定領域に属するか否かが判断される。さらに基準画素Pについてもシードが付与される画素について同様に順次選択されていく。この処理は、基準画素Pや周辺画素Pの選択は、画素選択部131が順次行なっていく。 The peripheral pixel P 2 is sequentially selected for all pixels other than the reference pixel P 1 in the image, and it is determined whether or not the selected peripheral pixel P 2 belongs to the same designated area as the reference pixel P 1. Further, the reference pixel P 1 is also sequentially selected for the pixels to which the seed is given. In this process, the pixel selection unit 131 sequentially selects the reference pixel P 1 and the peripheral pixels P 2.

そしてこの一連の処理は収束するまで繰り返し行なわれる。即ち、新たに指定領域1や指定領域2に属すると判断された画素は、新たに基準画素Pとして選択され、さらに周辺画素Pが選択されて周辺画素Pについて、指定領域1や指定領域2に属するかの判断が行なわれることになる。この処理を繰り返し、更新していくことで、ラベル付けの特性変更がされる領域は順次拡張されていき、指定領域1および指定領域2の切り出しが行なえる。なおこの方法によれば、上述したように、いったんあるラベルにラベル付けされた画素についても、他のラベルに変更されることがあり得る。 And this series of processing is repeated until it converges. That is, new the pixels which are determined to belong to the designated region 1 and designated region 2, the newly selected as the reference pixel P 1, the peripheral pixels P 2 is further selected peripheral pixels P 2, the designated region 1 and designated It will be determined whether or not it belongs to the region 2. By repeating and updating this process, the area where the labeling characteristics are changed is sequentially expanded, and the designated area 1 and the designated area 2 can be cut out. According to this method, as described above, a pixel once labeled on a certain label may be changed to another label.

収束判定部136は、上記一連の処理が収束したか否かを判定する。
収束判定部136は、例えば、ラベルが変更される画素がなくなった、または、強さが変わらなくなったときに収束したと判定する。また予め最大更新回数を定めておき、最大更新回数に達したときに収束したものとみなすこともできる。
The convergence test unit 136 determines whether or not the above series of processes have converged.
Convergence determination unit 136 determines that convergence has occurred, for example, when there are no pixels whose labels are changed or when the strength does not change. It is also possible to set the maximum number of updates in advance and consider that the items have converged when the maximum number of updates is reached.

次に第1の実施形態における領域検出部13の動作について説明を行なう。
図13は、第1の実施形態における領域検出部13の動作について説明したフローチャートである。
まず画素選択部131が、指定領域に属する画素の中から基準画素Pを選択する(ステップ101)。さらに画素選択部131は、基準画素Pに対し設定され、指定領域に含まれるか否かを判断する対象である周辺画素Pを選択する(ステップ102)。
Next, the operation of the region detection unit 13 in the first embodiment will be described.
FIG. 13 is a flowchart illustrating the operation of the area detection unit 13 in the first embodiment.
First, the pixel selection unit 131 selects the reference pixel P 1 from the pixels belonging to the designated area (step 101). Further, the pixel selection unit 131 selects the peripheral pixel P 2 which is set with respect to the reference pixel P 1 and is a target for determining whether or not it is included in the designated area (step 102).

次に局所領域設定部132が、基準画素Pの周囲のテクスチャを算出するための範囲として第1の局所領域Rを設定する(ステップ103)。さらに局所領域設定部132は、周辺画素Pの周囲のテクスチャを算出するための範囲として第2の局所領域Rを設定する(ステップ104)。 Next, the local region setting unit 132 sets the first local region R 1 as a range for calculating the texture around the reference pixel P 1 (step 103). Further, the local area setting unit 132 sets the second local area R 2 as a range for calculating the texture around the peripheral pixel P 2 (step 104).

そして類似度算出部133が、基準画素Pの周囲である第1の局所領域R内のテクスチャと周辺画素Pの周囲である第2の局所領域R内のテクスチャとの類似度を算出する(ステップ105)。これは例えば、上述した数1式や数2式により算出することができる。また判断部134が強さを基に判断を行なう場合は、さらに基準画素Pの強さと影響力を基に周辺画素Pに伝搬される強さを算出する。 Then, the similarity calculation unit 133 determines the similarity between the texture in the first local region R 1 around the reference pixel P 1 and the texture in the second local region R 2 around the peripheral pixel P 2. Calculate (step 105). This can be calculated, for example, by the above-mentioned equations 1 and 2. When the determination unit 134 makes a judgment based on the strength, the strength propagated to the peripheral pixel P 2 is further calculated based on the strength and influence of the reference pixel P 1.

次に判断部134は、類似度算出部133が算出したテクスチャの類似度あるいは強さにより、周辺画素Pが指定領域に含まれるか否かを判断する(ステップ106)。
その結果、周辺画素Pが指定領域に含まれると判断された場合(ステップ106でYes)、特性変更部135が、周辺画素Pに対し付与される特性としてラベルを変更する(ステップ107)。また判断部134が強さを基に判断を行なった場合は、特性変更部135は、周辺画素Pに対し付与される特性としてさらに強さを変更する。
Next, the determination unit 134 determines whether or not the peripheral pixel P 2 is included in the designated region based on the similarity or strength of the texture calculated by the similarity calculation unit 133 (step 106).
As a result, when it is determined that the peripheral pixel P 2 is included in the designated area (Yes in step 106), the characteristic changing unit 135 changes the label as the characteristic given to the peripheral pixel P 2 (step 107). .. When the determination unit 134 makes a determination based on the strength, the characteristic change unit 135 further changes the strength as a characteristic given to the peripheral pixel P 2.

ステップ107の後、および周辺画素Pが指定領域に含まれないと判断された場合(ステップ106でNo)、収束判定部136が、上記一連の処理が収束したか否かを判定する(ステップ108)。
その結果、処理が収束した場合(ステップ108でYes)、全ての処理を終了する。
対して処理が収束していない場合(ステップ108でNo)、ステップ101に戻り、新たに基準画素Pや周辺画素Pを選択し、収束するまで周辺画素Pが指定領域に含まれるか否かが判断されていく。
After step 107, and when it is determined that the peripheral pixel P 2 is not included in the designated area (No in step 106), the convergence test unit 136 determines whether or not the above series of processes have converged (step 106). 108).
As a result, when the processing converges (Yes in step 108), all the processing ends.
On the other hand, if the processing has not converged (No in step 108), the process returns to step 101, a new reference pixel P 1 or peripheral pixel P 2 is selected, and whether the peripheral pixel P 2 is included in the designated area until it converges. Whether or not it is judged.

[第2の実施形態]
次に領域検出部13の第2の実施形態について説明を行なう。
図14は、第2の実施形態における領域検出部13の機能構成例を表すブロック図である。
図示するように本実施の形態の領域検出部13は、画像分割部137と、シード反映部138と、局所領域設定部132と、類似度算出部133と、判断部134と、画素設定部139と、特性変更部135と、収束判定部136とを備える。
図14に示した領域検出部13は、図9に示した領域検出部13と比較して、画素選択部131が存在しない。一方、画像分割部137、シード反映部138および画素設定部139が加わっている。
[Second Embodiment]
Next, a second embodiment of the region detection unit 13 will be described.
FIG. 14 is a block diagram showing a functional configuration example of the area detection unit 13 in the second embodiment.
As shown in the figure, the area detection unit 13 of the present embodiment includes an image segmentation unit 137, a seed reflection unit 138, a local area setting unit 132, a similarity calculation unit 133, a determination unit 134, and a pixel setting unit 139. , A characteristic changing unit 135, and a convergence determination unit 136.
The area detection unit 13 shown in FIG. 14 does not have the pixel selection unit 131 as compared with the area detection unit 13 shown in FIG. On the other hand, an image segmentation unit 137, a seed reflection unit 138, and a pixel setting unit 139 are added.

画像分割部137は、シードが設定された画像をブロック毎に分割する。
図15は、シードが設定された画像Gを表す。ここでは、画像Gに、シード1、シード2、シード3が設定されている。
また図16(a)は、シードが設定された画像Gを分割した例を示している。
ここではシードが設定された画像Gは、図16(b)に示す3画素×3画素からなるブロックB毎に分割されている。なおここでは3画素×3画素=9画素からなるブロックBを設定したが、これに限られるものではない。例えば、n画素×n画素、n画素×m画素(n、mは1以上の整数、ただしn、mは少なくとも一方が2以上である)であってもよい。
The image segmentation unit 137 divides the seeded image into blocks.
FIG. 15 represents the seeded image G. Here, seed 1, seed 2, and seed 3 are set in the image G.
Further, FIG. 16A shows an example in which the seeded image G is divided.
Here, the seeded image G is divided into blocks B composed of 3 pixels × 3 pixels shown in FIG. 16 (b). Here, the block B composed of 3 pixels × 3 pixels = 9 pixels is set, but the present invention is not limited to this. For example, it may be n pixels × n pixels, n pixels × m pixels (n and m are integers of 1 or more, but at least one of n and m is 2 or more).

シード反映部138は、代表位置反映部の一例であり、ブロックBを一画素とした画像に対し、シードを反映させる。
図17(a)〜(b)は、シード反映部138の動作について説明した図である。
ここで図17(a)は、図16(a)と同様の図であり、シードが設定された画像GをブロックB毎に分割した例を示している。また図17(b)は、ブロックBを一画素とし、画像Gでシードが設定された画素を含むブロックBには、シードを付与することで、シードを反映させたシード反映画像Gを示している。この場合、画像Gに、シード1、シード2、シード3を反映した場合を示している。その結果、このシード反映画像Gには、図17(a)と同様にシード1、シード2、シード3が設定される。この場合、図17(b)で示したシード反映画像Gは、図17(a)で示した画像Gを縮小したものであると見ることができる。
The seed reflection unit 138 is an example of the representative position reflection unit, and reflects the seed on the image in which the block B is one pixel.
17 (a) to 17 (b) are views explaining the operation of the seed reflecting unit 138.
Here, FIG. 17A is the same as FIG. 16A, and shows an example in which the seeded image G is divided into blocks B. Further, FIG. 17B shows a seed reflection image G s in which the seed is reflected by assigning a seed to the block B including the pixel in which the block B is set as one pixel and the seed is set in the image G. ing. In this case, the case where the seed 1, the seed 2, and the seed 3 are reflected in the image G s is shown. As a result, this seed reflected image G s, FIG. 17 (a) similarly to seed 1, seed 2, seed 3 is set. In this case, the seed reflection image G s shown in FIG. 17 (b) can be seen as a reduced version of the image G shown in FIG. 17 (a).

局所領域設定部132は、ブロックBを単位としテクスチャを算出するための範囲として第1の局所領域Rを設定する。ここではシード反映画像Gのシードが反映された画素の中から一画素を選択し、これを第1の局所領域Rとする。シード反映画像Gの一画素は、画像Gでは、3画素×3画素=9画素の画素からなるブロックBであるため、これを画像Gにおける局所領域とみなすことができる。同様に、局所領域設定部132は、ブロックBを単位としテクスチャを算出するための範囲として第2の局所領域Rを設定する。即ち、シード反映画像Gにおいて第1の局所領域Rとして選択された一画素の周囲の一画素をさらに選択する。これはシード反映画像Gにおいてシードが反映されなかった画素の中から選択される。そしてこれを第2の局所領域Rとする。なおここではブロックBを1つ選択したが、複数選択して第1の局所領域Rや第2の局所領域Rとしてもよい。 Local region setting unit 132 sets the first local region R 1 as a range for calculating the texture in units of block B. This selects one pixel from among pixels seed seed reflected image G s is reflected, this is the first local region R 1. Since one pixel of the seed reflection image G s is a block B composed of 3 pixels × 3 pixels = 9 pixels in the image G, this can be regarded as a local region in the image G. Similarly, the local area setting unit 132 sets the second local area R 2 as a range for calculating the texture with the block B as a unit. That is, further selects one pixel around the first one pixel selected as the local region R 1 of the seed reflected image G s. It is selected from the pixels seed has not been reflected in the seed reflected image G s. Then, this is designated as the second local region R 2 . Although one block B is selected here, a plurality of blocks B may be selected as the first local region R 1 or the second local region R 2 .

図18(a)は、シード反映画像Gにおいて、第1の局所領域Rと第2の局所領域Rとを設定した例を示している。第1の局所領域Rは、シード反映画像Gでは、一画素となるが、第1の局所領域Rは、図18(b)に示すように画像Gでは、3画素×3画素=9画素からなる。同様に第2の局所領域Rは、図18(c)に示すように画像Gでは、3画素×3画素=9画素からなる。 FIG. 18 (a) shows the seed reflected image G s, an example of setting the first and local region R 1 and the second local region R 2. The first local region R 1 has one pixel in the seed reflection image G s , but the first local region R 1 has 3 pixels × 3 pixels in the image G as shown in FIG. 18 (b). It consists of 9 pixels. Similarly, the second local region R 2 is composed of 3 pixels × 3 pixels = 9 pixels in the image G as shown in FIG. 18 (c).

類似度算出部133は、画像Gの画素値を用い、第1の局所領域Rのテクスチャと第2の局所領域Rのテクスチャとの類似度を算出する。 The similarity calculation unit 133 calculates the similarity between the texture of the first local region R 1 and the texture of the second local region R 2 by using the pixel value of the image G.

判断部134は、類似度算出部133が算出したテクスチャの類似度により、第2の局所領域R中の画素が指定領域に含まれるか否かを判断する。そして指定領域に含まれれば、その指定領域に含まれるシードが表す指定領域のラベルが付与される。この判断は、第1の実施形態の場合と同様の考えでよく、類似度sを基に行なうことができる。また類似度sから強さを算出しこの強さにより判断してもよい、または、ラベル付けに関しても、第1の実施形態と同様に行うことができる。 The determination unit 134 determines whether or not the pixels in the second local region R 2 are included in the designated region based on the similarity of the texture calculated by the similarity calculation unit 133. If it is included in the designated area, the label of the designated area represented by the seed included in the designated area is given. This determination may be based on the same idea as in the case of the first embodiment, and can be made based on the similarity s. Further, the strength may be calculated from the similarity s and judged based on this strength, or labeling can be performed in the same manner as in the first embodiment.

第2の実施形態では、画素をブロック化し、ブロックB単位の関係性を利用する、つまりは、基準となるブロックBとその周辺ブロックBとの関係(近さ)を利用することがポイントとなる。 In the second embodiment, the point is to block the pixels and use the relationship in block B units, that is, to use the relationship (closeness) between the reference block B and its peripheral blocks B. ..

図19(a)は、従来手法における、基準画素Pとその周辺画素Pに関する影響力を示したものであり、太い線ほど画素の色が近く影響力が大きいことを表す。この影響力は、前述の図8−3で説明したものである。そして図19(a)と同様にして、本実施の形態では、これをブロックBの場合に拡張することができ、例えば、図19(a)の1画素を3×3の1ブロックに置き換えると、基準のブロックBとその周辺のブロックBとの影響力の関係は、図19(b)に示すようになる。ここでは、太い線ほどブロックBとブロックBとの間の影響力が大きいことを表す。 FIG. 19A shows the influence of the reference pixel P 1 and its peripheral pixels P 2 in the conventional method, and the thicker the line, the closer the pixel color is and the greater the influence. This influence is described in FIG. 8-3 above. Then, in the same manner as in FIG. 19A, in the present embodiment, this can be expanded in the case of block B, for example, if one pixel in FIG. 19A is replaced with one block of 3 × 3. The relationship of influence between the reference block B 1 and the surrounding block B 2 is shown in FIG. 19 (b). Here, the thicker the line, the greater the influence between block B 1 and block B 2.

第1の実施形態では、ブロックB同士のつながりではなくてもよかったが、第2の実施形態は、図19(b)に示すように1つのブロックBを1画素のように捉え、影響力を導入した例である。図19(b)からわかるように、中央の基準のブロックBの輝度発生特徴に対して、周辺のブロックBとの関係をみると、中央の基準のブロックBの右の列に位置する3つのブロックBと、真下の1つのブロックBとは、テクスチャが近いので太線で示されている(影響力が大きいことに相当)。また、それ以外のブロックBは、類似していないので細い線で示されている(影響力が小さいことに相当)。またここでは第1の局所領域Rや第2の局所領域Rを、1つのブロックBで構成した例を説明したが、第1の局所領域Rや第2の局所領域Rを、複数のブロックBで構成する場合は、複数のブロックB同士での関係となる。即ち、第1の局所領域Rと第2の局所領域Rとの関係となる。 In the first embodiment, it is not necessary that the blocks B are connected to each other, but in the second embodiment, as shown in FIG. 19B, one block B is regarded as one pixel, and the influence is measured. This is an example of introduction. As can be seen from FIG. 19B, the relationship between the luminance generation feature of the central reference block B 1 and the peripheral block B 2 is located in the right column of the central reference block B 1. (equivalent to influential) and three blocks B 2, with one block B 2 immediately below, since the texture is close to that shown by the bold line of. In addition, the other blocks B 2 are shown by thin lines because they are not similar (corresponding to a small influence). Further, although an example in which the first local region R 1 and the second local region R 2 are composed of one block B has been described here, the first local region R 1 and the second local region R 2 may be described. When it is composed of a plurality of blocks B, the relationship between the plurality of blocks B is established. That is, there is a relationship between the first local region R 1 and the second local region R 2.

ブロックBにシードの画素が含まれている場合のブロックBの強さを1とすれば、シードの拡散方法や、強さの更新方法は第1の実施形態の場合と同様に行うことができ、また、ブロックBを画素と見立てれば、図8−5と同じ考えでラベル付けや、特定の領域の切り抜きを行うことができる。この場合、1画素が持つ色の近さだけではない影響力を基にした強さを伝搬するので、人が領域を判断するのに近いラベル付けを行うことができる。 Assuming that the strength of the block B when the block B includes the pixels of the seed is 1, the method of spreading the seed and the method of updating the strength can be performed in the same manner as in the case of the first embodiment. Further, if the block B is regarded as a pixel, labeling and clipping of a specific area can be performed with the same idea as in FIG. 8-5. In this case, since the strength is propagated based not only on the color closeness of one pixel but also on the influence, it is possible to perform labeling close to that of a person judging an area.

なお図17で示すようにブロック化した後、図19(b)で示す影響力の計算を最初に全ブロックBで行っておけば、この影響力は変化することがないので、全体の処理を高速に行うこともできる。 If the influence shown in FIG. 19B is calculated first for all blocks B after blocking as shown in FIG. 17, this influence does not change, so that the entire processing is performed. It can also be done at high speed.

図20は、図18(a)のシード反映画像Gにおいて、第2の局所領域R中の画素が指定領域に含まれるとした例を示している。この場合、第2の局所領域Rは、シード2が属する指定領域に含まれるようになったことを示している。 Figure 20 is the seed reflected image G s in FIG. 18 (a), shows an example in which a pixel of the second in local regions R 2 are included in the designated area. In this case, the second local region R 2 indicates that the seed 2 is now included in the designated region to which the seed 2 belongs.

画素設定部139は、類似度により第2の局所領域R内の画素が指定領域に含まれると検出したときに、第2の局所領域R内の何れの画素が指定領域に含まれるかを設定する。
つまり判断部134が、第2の局所領域R中の画素が指定領域に含まれると判断したとき、第2の局所領域R中の画素は、3画素×3画素=9画素ある。そのためこの中の何れの画素が指定領域に含まれるようにするかが問題となる。この場合、9画素中の何れか1画素を選択してもよく、複数の画素を選択してもよい。例えば、9画素中の中心の1画素としてもよく、9画素中の中から1画素以上をランダムに選択してもよい。また9画素全てが指定領域に含まれるとしてもよい。
When the pixel setting unit 139 detects that the pixels in the second local area R 2 are included in the designated area due to the similarity, which pixel in the second local area R 2 is included in the designated area. To set.
That is, when the determination unit 134 determines that the pixels in the second local region R 2 are included in the designated region, the pixels in the second local region R 2 are 3 pixels × 3 pixels = 9 pixels. Therefore, which of these pixels should be included in the designated area becomes a problem. In this case, any one of the nine pixels may be selected, or a plurality of pixels may be selected. For example, it may be one pixel at the center of the nine pixels, or one or more pixels may be randomly selected from the nine pixels. Further, all 9 pixels may be included in the designated area.

図21は、画素設定部139が画像Gにおいて第2の局所領域R中の中心の一画素が指定領域に含まれるとしたときを示している。またこの場合、3つの画素が、シード2に含まれるようになったことを示している。 FIG. 21 shows a case where the pixel setting unit 139 assumes that one pixel in the center of the second local region R 2 is included in the designated region in the image G. Further, in this case, it is shown that three pixels are included in the seed 2.

なお以後の特性変更部135、収束判定部136の動作は、第1の実施形態と同様である。第1の実施形態と同様、シードとして拡散させることもできれば、または、図17(b)のように、1つのブロックBを1画素とした画像と捉えれば、図8−5のように従来の伝搬方法で実施すれば、より精度の高い切り抜きや領域分離を行うことができる。 The subsequent operations of the characteristic changing unit 135 and the convergence determination unit 136 are the same as those in the first embodiment. Similar to the first embodiment, if it can be diffused as a seed, or if it is regarded as an image in which one block B is one pixel as shown in FIG. 17 (b), it is a conventional image as shown in FIG. 8-5. If it is carried out by the propagation method, more accurate clipping and region separation can be performed.

次に第2の実施形態における領域検出部13の動作について説明を行なう。
図22は、第2の実施形態における領域検出部13の動作について説明したフローチャートである。
まず画像分割部137は、シードが設定された画像をブロックB毎に分割する(ステップ201)。
Next, the operation of the area detection unit 13 in the second embodiment will be described.
FIG. 22 is a flowchart illustrating the operation of the area detection unit 13 in the second embodiment.
First, the image segmentation unit 137 divides the seeded image into each block B (step 201).

次にシード反映部138が、ブロックBを一画素とした画像に対し、シードを反映させる(ステップ202)。これは図17で説明した方法により行うことができる。 Next, the seed reflecting unit 138 reflects the seed on the image in which the block B is one pixel (step 202). This can be done by the method described in FIG.

そして局所領域設定部132が、ブロックBを単位としテクスチャを算出するための範囲として第1の局所領域Rを、シード反映画像Gのシードが反映された画素の中から設定する(ステップ203)。さらに局所領域設定部132は、ブロックBを単位としテクスチャを算出するための範囲として第2の局所領域Rをシード反映画像Gのシードが反映されなかった画素の中から設定する(ステップ204)。 The local region setting unit 132, a local region R 1 range as the first to calculate the texture in units of block B, and set among the pixels seed seed reflected image G s is reflected (step 203 ). Furthermore the local region setting unit 132 sets among the pixels of the second local region R 2 seed seed reflected image G s as a range for calculating the texture in units of block B was not reflected (step 204 ).

次に類似度算出部133が、画像Gの画素値を用い、第1の局所領域Rのテクスチャと第2の局所領域Rのテクスチャとの類似度を算出する(ステップ205)。また判断部134が強さを基に判断を行なう場合は、さらに基準のブロックBの強さと影響力を基に周辺のブロックBに伝搬される強さを算出する。 Next, the similarity calculation unit 133 calculates the similarity between the texture of the first local region R 1 and the texture of the second local region R 2 using the pixel values of the image G (step 205). When the judgment unit 134 makes a judgment based on the strength, the strength propagated to the surrounding block B 2 is further calculated based on the strength and influence of the reference block B 1.

また判断部134は、類似度算出部133が算出したテクスチャの類似度あるいは強さにより、第2の局所領域R中の画素が指定領域に含まれるか否かを判断する(ステップ206)。 Further, the determination unit 134 determines whether or not the pixels in the second local region R 2 are included in the designated region based on the similarity or strength of the texture calculated by the similarity calculation unit 133 (step 206).

その結果、第2の局所領域R中の画素が指定領域に含まれると判断された場合(ステップ206でYes)、画素設定部139が、第2の局所領域R内の何れの画素が指定領域に含まれるかを設定する(ステップ207)。そして特性変更部135が、画素設定部139が設定した画素に対し付与される特性としてラベルを変更する(ステップ208)。また判断部134が強さを基に判断を行なった場合は、特性変更部135は、画素設定部139が設定した画素に対し付与される特性としてさらに強さを変更する。 As a result, when it is determined that the pixels in the second local area R 2 are included in the designated area (Yes in step 206), the pixel setting unit 139 determines which pixel in the second local area R 2 is included. It is set whether it is included in the designated area (step 207). Then, the characteristic changing unit 135 changes the label as a characteristic given to the pixel set by the pixel setting unit 139 (step 208). When the determination unit 134 makes a determination based on the strength, the characteristic change unit 135 further changes the strength as a characteristic given to the pixel set by the pixel setting unit 139.

ステップ208の後、および第2の局所領域R中の画素が指定領域に含まれないと判断された場合(ステップ206でNo)、収束判定部136が、上記一連の処理が収束したか否かを判定する(ステップ209)。
その結果、処理が収束した場合(ステップ209でYes)、全ての処理を終了する。
対して処理が収束していない場合(ステップ209でNo)、ステップ202に戻り、新たに第1の局所領域Rや第2の局所領域Rを設定し、収束するまで第2の局所領域R中の画素が指定領域に含まれるか否かが判断されていく。
After step 208, and if the second pixel in the local region R 2 is determined not to be included in the specified area (No in step 206), the convergence determination unit 136, whether the series of processing has converged not (Step 209).
As a result, when the processing converges (Yes in step 209), all the processing ends.
When the process for has not converged (No in step 209), returns to step 202, new first set local regions R 1 and the second local region R 2, the second local region to converge It is determined whether or not the pixels in R 2 are included in the designated area.

第2の実施形態の利用方法としては、例えば、2通りある。1つ目は、図21のようにシードを拡散させる目的で使用することであり、拡散した状態を収束とみなして一旦終了する。その後、ブロックBを解除して、今度は元のとおりの画素を有する画像Gとして考え、図8−2〜8−5に示すような強さの伝搬によって、領域を分離する方法である。
また、2つ目としては、図17(b)のようにブロック化した後、ブロックBを画素とみなし、この場合は、閾値による判断のみに依存するシードの拡散というよりは、強さ比較の更新ルールで収束させる伝搬を行って、収束した結果を領域分離の結果とする方法である。画像Gが大きいときはこれでもよい。
There are, for example, two ways of using the second embodiment. The first is to use it for the purpose of diffusing the seed as shown in FIG. 21, and the diffused state is regarded as convergence and is temporarily terminated. After that, the block B is released, and this time, it is considered as an image G having the original pixels, and the regions are separated by propagation of the intensity as shown in FIGS. 8-2 to 8-5.
Secondly, after blocking as shown in FIG. 17B, block B is regarded as a pixel, and in this case, strength comparison is performed rather than seed diffusion that depends only on judgment based on the threshold value. This is a method in which propagation is performed to converge according to the update rule, and the converged result is used as the result of region separation. This may be used when the image G is large.

[第3の実施形態]
第2の実施形態で、シードの拡散のみならず、強さの更新に基づく収束方法で領域分離までを行った場合、画像Gの大きさやブロックBの大きさによっては、図23(a)に示すように、領域の境界が、粗くなることがある。
[Third Embodiment]
In the second embodiment, when not only the seed diffusion but also the region separation is performed by the convergence method based on the update of the strength, depending on the size of the image G and the size of the block B, FIG. 23 (a) shows. As shown, the boundaries of the area can be rough.

この場合は、図23(b)に示すように、境界領域付近のラベルや強さをリセットした未知領域Mを設定する。そしてブロックBを解除して、画素単位の構造に戻し、未知領域M以外のラベルを付した画素はシードとして利用する。さらに図19(a)で示した画素単位の影響力を用いて、これまでと同様に、図8−5で示した領域拡張方法で強さの伝搬を行えば、図23(c)のような領域の境界が滑らかになる領域分離の結果を得ることができる。
これは領域検出部13は、ブロックBを単位とした指定領域を検出した後に、ブロックBを単位とした指定領域の境界の領域において指定領域の設定を解除し、指定領域の設定を解除されなかった画素の中から選択された基準画素を基に指定領域の境界の領域において指定領域を再度検出する、と言うこともできる。
In this case, as shown in FIG. 23 (b), an unknown region M in which the label and strength near the boundary region are reset is set. Then, the block B is released, the structure is returned to the pixel unit structure, and the pixels labeled other than the unknown region M are used as seeds. Further, when the strength is propagated by the region expansion method shown in FIG. 8-5 as in the past by using the influence of each pixel shown in FIG. 19 (a), it is as shown in FIG. 23 (c). It is possible to obtain the result of region separation in which the boundaries of various regions are smoothed.
This is because the area detection unit 13 cancels the setting of the designated area in the boundary area of the designated area with the block B as the unit after detecting the designated area with the block B as the unit, and the setting of the designated area is not canceled. It can also be said that the designated area is detected again in the boundary area of the designated area based on the reference pixel selected from the pixels.

このような方法を使用する利点は、画像Gに対し、縮小画像を使用して処理することと等価になるので、より高速になる。また単に色の近さを比較する場合に比較してテクスチャの類似度を比較することで、影響力を計算する際の情報量が増えるので、従来よりも精度の高い領域分離が行えることにある。 The advantage of using such a method is that it is equivalent to processing the image G using a reduced image, and thus is faster. Also, by comparing the similarity of textures compared to simply comparing the closeness of colors, the amount of information when calculating the influence increases, so it is possible to perform region separation with higher accuracy than before. ..

以上説明した第1の実施形態〜第3の実施形態により、指定領域の切り出しを行なうことができる。
図24は、前景として写る床と、床以外の後景とからなる写真の画像Gにおいて、シード1およびシード2を設定した場合を示している。
本実施の形態では、図25のような切り抜き結果(過剰な検出や、検出不足が伴う結果)が生じにくく、図26のように、第1の指定領域S1、第2の指定領域S2をより精度よく切り出すことができる。
The designated area can be cut out according to the first to third embodiments described above.
FIG. 24 shows a case where the seed 1 and the seed 2 are set in the image G of the photograph including the floor reflected as the foreground and the background other than the floor.
In the present embodiment, the clipping result (result with excessive detection or insufficient detection) as shown in FIG. 25 is unlikely to occur, and the first designated area S1 and the second designated area S2 are further formed as shown in FIG. It can be cut out with high accuracy.

なおシードの拡散は、前景だけで行なってもよく、後景だけで行なってもよい。また、前景および後景の両方で行ってもよい。前景および後景の両方で行なう場合は、類似度sがどちらも閾値θ以下である場合は、より小さい方を選択するなどの判断を行えばよい。
また上述した例では、第1の局所領域Rおよび第2の局所領域Rに含まれる画素は、同数であったが、異なっていてもよい。
The seed may be diffused only in the foreground or only in the background. It may also be done in both the foreground and the background. In the case of performing in both the foreground and the background, if the similarity s is both equal to or less than the threshold value θ, a judgment such as selecting the smaller one may be made.
Further, in the above-described example , the number of pixels included in the first local region R 1 and the second local region R 2 is the same, but may be different.

なお以上説明した領域検出部13で行われる処理は、画像中の指定領域の代表位置(シード)を表す位置情報を取得する位置情報取得工程と、位置情報から指定領域を検出する領域検出工程と、を備え、領域検出工程は、指定領域に属する画素の周囲のテクスチャと指定領域に含まれるか否かを判断する対象である画素の周囲のテクスチャとの類似度を基に指定領域を検出することを特徴とする画像処理方法として捉えることもできる。 The processes performed by the area detection unit 13 described above include a position information acquisition step of acquiring position information representing a representative position (seed) of the designated area in the image, and an area detection step of detecting the designated area from the position information. , And the area detection step detects the designated area based on the similarity between the texture around the pixel belonging to the designated area and the texture around the pixel to be determined whether or not it is included in the designated area. It can also be regarded as an image processing method characterized by this.

<画像処理装置のハードウェア構成例>
次に、画像処理装置10のハードウェア構成について説明する。
図27は、画像処理装置10のハードウェア構成を示した図である。
画像処理装置10は、上述したようにパーソナルコンピュータ等により実現される。そして図示するように、画像処理装置10は、演算手段であるCPU(Central Processing Unit)91と、記憶手段であるメインメモリ92、およびHDD(Hard Disk Drive)93とを備える。ここで、CPU91は、OS(Operating System)やアプリケーションソフトウェア等の各種プログラムを実行する。また、メインメモリ92は、各種プログラムやその実行に用いるデータ等を記憶する記憶領域であり、HDD93は、各種プログラムに対する入力データや各種プログラムからの出力データ等を記憶する記憶領域である。
さらに、画像処理装置10は、外部との通信を行うための通信インターフェース(以下、「通信I/F」と表記する)94を備える。
<Hardware configuration example of image processing device>
Next, the hardware configuration of the image processing device 10 will be described.
FIG. 27 is a diagram showing a hardware configuration of the image processing device 10.
The image processing device 10 is realized by a personal computer or the like as described above. As shown in the figure, the image processing device 10 includes a CPU (Central Processing Unit) 91 as a calculation means, a main memory 92 as a storage means, and an HDD (Hard Disk Drive) 93. Here, the CPU 91 executes various programs such as an OS (Operating System) and application software. The main memory 92 is a storage area for storing various programs and data used for executing the various programs, and the HDD 93 is a storage area for storing input data for various programs and output data from various programs.
Further, the image processing device 10 includes a communication interface (hereinafter, referred to as “communication I / F”) 94 for communicating with the outside.

<プログラムの説明>
ここで以上説明を行った本実施の形態における画像処理装置10が行なう処理は、例えば、アプリケーションソフトウェア等のプログラムとして用意される。
<Program description>
The process performed by the image processing device 10 in the present embodiment described above is prepared as, for example, a program such as application software.

よって本実施の形態で、画像処理装置10が行なう処理は、コンピュータに、画像中の指定領域の代表位置(シード)を表す位置情報を取得する位置情報取得機能と、位置情報から指定領域を検出する領域検出機能と、を実現させ、領域検出機能は、指定領域に属する画素の周囲のテクスチャと指定領域に含まれるか否かを判断する対象である画素の周囲のテクスチャとの類似度を基に指定領域を検出するプログラムとして捉えることもできる。 Therefore, in the present embodiment, the processing performed by the image processing apparatus 10 is a position information acquisition function for acquiring the position information representing the representative position (seed) of the designated area in the image, and detecting the designated area from the position information. The area detection function is realized, and the area detection function is based on the similarity between the texture around the pixel belonging to the specified area and the texture around the pixel to be determined whether or not it is included in the specified area. It can also be regarded as a program that detects a specified area.

なお、本実施の形態を実現するプログラムは、通信手段により提供することはもちろん、CD−ROM等の記録媒体に格納して提供することも可能である。 The program that realizes this embodiment can be provided not only by communication means but also by storing it in a recording medium such as a CD-ROM.

以上、本実施の形態について説明したが、本発明の技術的範囲は上記実施の形態に記載の範囲には限定されない。上記実施の形態に、種々の変更または改良を加えたものも、本発明の技術的範囲に含まれることは、特許請求の範囲の記載から明らかである。 Although the present embodiment has been described above, the technical scope of the present invention is not limited to the scope described in the above embodiment. It is clear from the description of the claims that the above-described embodiment with various modifications or improvements is also included in the technical scope of the present invention.

1…画像処理システム、10…画像処理装置、11…画像情報取得部、12…ユーザ指示受付部、13…領域検出部、14…領域切替部、15…画像処理部、16…画像情報出力部、20…表示装置、30…入力装置、131…画素選択部、132…局所領域設定部、133…類似度算出部、134…判断部、135…特性変更部、136…収束判定部、137…画像分割部、138…シード反映部 1 ... Image processing system, 10 ... Image processing device, 11 ... Image information acquisition unit, 12 ... User instruction reception unit, 13 ... Area detection unit, 14 ... Area switching unit, 15 ... Image processing unit, 16 ... Image information output unit , 20 ... Display device, 30 ... Input device, 131 ... Pixel selection unit, 132 ... Local area setting unit, 133 ... Similarity calculation unit, 134 ... Judgment unit, 135 ... Characteristic change unit, 136 ... Convergence judgment unit, 137 ... Image segmentation part, 138 ... Seed reflection part

Claims (4)

画像中の指定領域の代表位置を表す位置情報を取得する位置情報取得部と、
位置情報から指定領域を検出する領域検出部と、
を備え、
前記領域検出部は、
前記指定領域に属する画素の周囲のテクスチャと当該指定領域に含まれるか否かを判断する対象である画素の周囲のテクスチャとの類似度を基に当該指定領域を検出し、
前記代表位置が設定された前記画像をブロック毎に分割する画像分割部と、当該ブロックを単位としテクスチャを算出するための範囲として、第1の局所領域および第2の局所領域を設定する局所領域設定部と、当該第1の局所領域内のテクスチャと当該第2の局所領域内のテクスチャとの類似度を算出する類似度算出部と、を備える
ことを特徴とする画像処理装置。
A position information acquisition unit that acquires position information that represents the representative position of the specified area in the image,
An area detection unit that detects a specified area from location information,
With
The area detection unit
The designated area is detected based on the similarity between the texture around the pixel belonging to the designated area and the texture around the pixel to be determined whether or not it is included in the designated area.
An image segmentation portion that divides the image in which the representative position is set into blocks, and a local region that sets a first local region and a second local region as a range for calculating a texture in units of the blocks. An image processing device including a setting unit and a similarity calculation unit for calculating the similarity between the texture in the first local region and the texture in the second local region.
前記類似度により前記第2の局所領域内の画素が前記指定領域に含まれると検出したときに、前記第2の局所領域内の何れの画素が当該指定領域に含まれるかを設定する画素設定部をさらに備えることを特徴とする請求項に記載の画像処理装置。 Pixel setting for setting which pixel in the second local region is included in the designated region when it is detected that the pixel in the second local region is included in the designated region by the similarity. The image processing apparatus according to claim 1 , further comprising a unit. 前記類似度算出部は、前記類似度を基に前記第2の局所領域が前記指定領域に属する強さをさらに算出し、
前記強さを使用して前記第2の局所領域中の画素が前記指定領域に属するか否かを判断することにより、前記指定領域を検出することを特徴とする請求項またはに記載の画像処理装置。
The similarity calculation unit further calculates the strength with which the second local region belongs to the designated region based on the similarity.
The first or second claim, wherein the designated region is detected by using the strength to determine whether or not the pixels in the second local region belong to the designated region. Image processing device.
前記領域検出部は、前記ブロックを単位とした指定領域を検出した後に、当該ブロックを単位とした指定領域の境界の領域において指定領域の設定を解除し、指定領域の設定を解除されなかった画素の中から選択された基準画素を基に当該指定領域の境界の領域において指定領域を再度検出することを特徴とする請求項に記載の画像処理装置。 After detecting the designated area in units of the block, the area detection unit cancels the setting of the designated area in the boundary area of the designated area in the block as a unit, and the pixel in which the setting of the designated area is not canceled. The image processing apparatus according to claim 1 , wherein the designated area is detected again in the boundary area of the designated area based on the reference pixel selected from the above.
JP2016238464A 2016-12-08 2016-12-08 Image processing device Active JP6930099B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016238464A JP6930099B2 (en) 2016-12-08 2016-12-08 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016238464A JP6930099B2 (en) 2016-12-08 2016-12-08 Image processing device

Publications (2)

Publication Number Publication Date
JP2018097414A JP2018097414A (en) 2018-06-21
JP6930099B2 true JP6930099B2 (en) 2021-09-01

Family

ID=62632973

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016238464A Active JP6930099B2 (en) 2016-12-08 2016-12-08 Image processing device

Country Status (1)

Country Link
JP (1) JP6930099B2 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000216979A (en) * 1999-01-22 2000-08-04 Canon Inc Image extraction method and device and storage medium
US20150347862A1 (en) * 2014-05-30 2015-12-03 Fuji Xerox Co., Ltd. Image processing apparatus, image processing method, image processing system, and non-transitory computer readable medium storing program

Also Published As

Publication number Publication date
JP2018097414A (en) 2018-06-21

Similar Documents

Publication Publication Date Title
KR101719088B1 (en) Method for partitioning area, and inspection device
US9792695B2 (en) Image processing apparatus, image processing method, image processing system, and non-transitory computer readable medium
JP5880767B2 (en) Region determination apparatus, region determination method, and program
US20090304280A1 (en) Interactive Segmentation of Images With Single Scribbles
US20150043820A1 (en) Area designating method and area designating device
JP2017126304A (en) Image processing apparatus, image processing method, image processing system, and program
JP6287337B2 (en) Image processing apparatus, image processing method, image processing system, and program
AU2020201976B2 (en) Two dimensional touch interaction screens with content-aware sensors
JP5907196B2 (en) Image processing apparatus, image processing method, image processing system, and program
CN106033334B (en) Method and device for drawing interface element
JP6241320B2 (en) Image processing apparatus, image processing method, image processing system, and program
AU2014280985B2 (en) Image processing apparatus, image processing method, image processing system, and program
US9875555B2 (en) Partitioning an image
JP6550819B2 (en) Selection support device and program
JP6930099B2 (en) Image processing device
JP2018097415A (en) Image processing apparatus, image processing method, image processing system, and program
US20230215050A1 (en) Information processing apparatus, method, and storage medium to generate a color-difference map
US20210072884A1 (en) Information processing apparatus and non-transitory computer readable medium
JP2019101844A (en) Image processing apparatus, image processing method, image processing system and program
JP2016004309A (en) Image processor, image processing method, image processing system and program
JP2024000678A (en) Data comparison device, data comparison method, and data comparison program
CN117475053A (en) Grassland rendering method and device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20191125

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20201224

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210105

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210305

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210330

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210527

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210726

R150 Certificate of patent or registration of utility model

Ref document number: 6930099

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150