JP2005196678A - Template matching method, and objective image area extracting device - Google Patents

Template matching method, and objective image area extracting device Download PDF

Info

Publication number
JP2005196678A
JP2005196678A JP2004004605A JP2004004605A JP2005196678A JP 2005196678 A JP2005196678 A JP 2005196678A JP 2004004605 A JP2004004605 A JP 2004004605A JP 2004004605 A JP2004004605 A JP 2004004605A JP 2005196678 A JP2005196678 A JP 2005196678A
Authority
JP
Japan
Prior art keywords
image
template
matching
edge
point
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.)
Pending
Application number
JP2004004605A
Other languages
Japanese (ja)
Other versions
JP2005196678A5 (en
Inventor
Takaji Kitagawa
崇二 北川
Seiichiro Watanabe
誠一郎 渡辺
Tadahiro Kuroda
忠広 黒田
Kazuhiro Sato
一弘 佐藤
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.)
NEUCORE TECHNOL Inc
Original Assignee
NEUCORE TECHNOL Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEUCORE TECHNOL Inc filed Critical NEUCORE TECHNOL Inc
Priority to JP2004004605A priority Critical patent/JP2005196678A/en
Priority to US10/970,804 priority patent/US20050152604A1/en
Publication of JP2005196678A publication Critical patent/JP2005196678A/en
Publication of JP2005196678A5 publication Critical patent/JP2005196678A5/ja
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • G06V40/162Detection; Localisation; Normalisation using pixel segmentation or colour matching
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/752Contour matching

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To extract an objective image area by a template of remarkably small data amount with high accuracy. <P>SOLUTION: The template data 13 is composed of a positive point indicating a position where an edge of an objective image exists, of a processed area, and a negative point indicating a position where the edge does not exist, of the processed area, and a matching value is calculated in accordance with the positional relationship of each of positive points and negative points and each edge existing on the image of the processed area. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

本発明は、画像処理技術に関し、特に、入���画像に含まれる対象画像の領域を、その対象画像の形状的特徴を示すテンプレートデータに基づき特定し、その対象画像領域に関する情報を抽出する技術に関する。   The present invention relates to an image processing technique, and more particularly, to a technique for specifying a region of a target image included in an input image based on template data indicating a shape feature of the target image and extracting information related to the target image region.

従来より、入力画像に含まれる対象画像を、その対象画像の特徴を示すテンプレートデータに基づき特定する技術として、テンプレートマッチング方法が広く用いられている。これは、図13に示すように、入力画像上でテンプレートデータTと等しい大きさの処理領域を画素単位で走査して、それぞれの処理領域画像Wについて入力画像とテンプレートデータとの一致性を示すマッチング値を求め、その最大値が得られた処理領域に基づき所望の対象画像領域を特定するものである。
マッチング値については、例えば正規化相関係数などが用いられる。正規化相関係数R(x,y)は、処理領域画像W内の画素u(i,j)の画素値W(x+i,y+j)とテンプレートデータT内の画素u'(i,j)の画素値T(i,j)とを用いて、式(4)に基づき求められる。なお、Wavgは処理領域での平均画素値、Tavgはテンプレートの平均画素値である。この正規化相関係数は両画像の相関が高ければ1に近づき、低ければ−1に近づくものとなる。
Conventionally, a template matching method has been widely used as a technique for specifying a target image included in an input image based on template data indicating characteristics of the target image. As shown in FIG. 13, the processing area having the same size as the template data T is scanned in units of pixels on the input image, and the consistency between the input image and the template data is shown for each processing area image W. A matching value is obtained, and a desired target image area is specified based on the processing area where the maximum value is obtained.
For the matching value, for example, a normalized correlation coefficient is used. The normalized correlation coefficient R (x, y) is determined by the pixel value W (x + i, y + j) of the pixel u (i, j) in the processing region image W and the pixel u ′ (i) in the template data T. , j) and the pixel value T (i, j), are obtained based on equation (4). Wavg is an average pixel value in the processing area, and Tavg is an average pixel value of the template. This normalized correlation coefficient approaches 1 if the correlation between both images is high, and approaches -1 if the correlation is low.

このようなテンプレートマッチング方法は、例えば電子部品の基板装着装置で利用される。この種の装置では、基板に装着しようとして吸着している部品をカメラ等の撮像装置で撮像し、前述したテンプレートマッチング方法に基づき、その吸着位置や方向を認識し位置や方向の修正を行うことにより、部品を基板上�����置�����������������装着することが可能になる。
具体的な部品の吸着位置や方向の認識は次のような方法で行われている。まず、撮像画像において部品の画像から縦方向および横方向の射影分布を作成し、この射影分布より対象部品のおおまかな位置や方向を認識する。そして、そのおおまかな位置情報や方向情報より、対象部品の四隅の角がどの辺の領域にあるのかを予測し、その領域において四隅の角の形状を持ったテンプレートを用いたテンプレートマッチング方法を行うことで正確な部品の位置を認識するものとなっている。
Such a template matching method is used, for example, in an electronic component board mounting apparatus. In this type of device, the part that is to be attached to the board is picked up by an image pickup device such as a camera, and the suction position and direction are recognized and the position and direction are corrected based on the template matching method described above. Thus, it is possible to place the components on the board and mount them with high accuracy.
The recognition of the specific component suction position and direction is performed by the following method. First, vertical and horizontal projection distributions are created from the component image in the captured image, and the approximate position and direction of the target component are recognized from the projection distribution. Then, based on the rough position information and direction information, the side of the four corners of the target part is predicted to be in which region, and a template matching method using a template having the shape of the four corners in that region is performed. Thus, the position of the accurate part is recognized.

従来、このようなテンプレートマッチング方法の領域抽出精度を向上させるため、各種技術が提案されている。
まず、第1の技術として、例えば特許文献1のような技術が提案されている。このテンプレートマッチング方法は、テンプレートデータ上にマッチング値の計算上、無効データとして取り扱うように設定したマスク領域を設けている。このようなテンプレートを用いることで、テンプレートの微小な角度のずれがマッチング値を求めるときの相関計算上、影響を及ぼさないように工夫されている。
Conventionally, various techniques have been proposed in order to improve the region extraction accuracy of such a template matching method.
First, as a first technique, for example, a technique such as Patent Document 1 has been proposed. In this template matching method, a mask region set so as to be treated as invalid data in the calculation of a matching value is provided on the template data. By using such a template, it is devised so that a minute angle shift of the template does not affect the correlation calculation when the matching value is obtained.

また、第2の従来技術として、前述したテンプレートマッチング方法を用いて人物顔領域を抽出する装置が提案されている(例えば、非特許文献1など参照)。これは、人物顔領域を含む濃淡画像中を図14に示したようなモザイク顔テンプレートを用いて探索することにより、画像中における人物顔領域を特定するものとなっている。
このほか、第3の従来技術として、人物顔領域を含むデジタルカラー画像から、予め設定された肌色に該当する肌色画素のみを抽出した肌色抽出画像のから肌色抽出領域のエッジ画像を作成し、その画像中を楕円形上のテンプレートを用いたテンプレートマッチングにより探索することで、人物顔領域を抽出する技術も提案されている。
As a second conventional technique, an apparatus for extracting a human face region using the template matching method described above has been proposed (see, for example, Non-Patent Document 1). In this case, the human face area in the image is specified by searching the grayscale image including the human face area using the mosaic face template as shown in FIG.
In addition, as a third conventional technique, an edge image of a skin color extraction region is created from a skin color extraction image obtained by extracting only skin color pixels corresponding to a preset skin color from a digital color image including a human face region, There has also been proposed a technique for extracting a human face region by searching through an image by template matching using an elliptical template.

なお、出願人は、本明細書に記載した先行技術文献情報で特定される先行技術文献以外には、本発明に関連する先行技術文献を出願時までに発見するには至らなかった。
特開平8−315147号公報 長尾智晴著、「C言語による画像処理入門」、昭晃堂、2000年11月20日、p.204―211
The applicant has not yet found prior art documents related to the present invention by the time of filing other than the prior art documents specified by the prior art document information described in this specification.
JP-A-8-315147 Tomoharu Nagao, “Introduction to Image Processing in C Language”, Shosodo, November 20, 2000, p. 204-211

しかしながら、このような従来技術では、対象画像領域の抽出に必要なテンプレート数が多いため処理時間が長く、またノイズの影響を受けて誤抽出しやすいという問題点があった。
まず、前述した第1の従来技術では、部品の位置を認識するために、撮像した画像において対象画像とする部品の画像縦方向および横方向の射影分布を作成する必要がある。また、対象画像およびテンプレートデータともに撮像されたモノクロームの2値化画像もしくは濃淡画像を使用しているためテンプレート数が多くなってしまい、マッチング処理を行う上で相関計算に時間がかかるなどの問題がある。
However, such a conventional technique has a problem that the processing time is long because of the large number of templates necessary for extracting the target image area, and erroneous extraction is easily caused by the influence of noise.
First, in the first prior art described above, in order to recognize the position of a component, it is necessary to create projection distributions in the vertical and horizontal directions of the component as a target image in the captured image. In addition, since a monochrome binarized image or grayscale image captured for both the target image and the template data is used, the number of templates increases, and there is a problem that it takes a long time for correlation calculation in performing matching processing. is there.

また、前述した第2の従来技術では、モザイク顔のテンプレートが用いられているが、この場合も、入力画像、テンプレートデータともにモノクローム濃淡画像を用いており、画像中の顔全体とのテンプレートマッチングを行うため、テンプレート数が多くなる。このため、テンプレートを格納するメモリ量の増大や、テンプレートマッチングの処理時間の増大するという問題がある。さらに、このような画像の濃淡情報を利用して顔領域を探索する方法では、画像中の人物が横を向いている場合など、画像中の顔の向きなどによる変化が認識率に大きく影響を与えてしまうという問題もある。   In the second prior art described above, a mosaic face template is used. In this case, both the input image and the template data use monochrome grayscale images, and template matching with the entire face in the image is performed. This increases the number of templates. For this reason, there are problems that the amount of memory for storing templates increases and the processing time for template matching increases. Furthermore, in such a method of searching for a face region using the gray level information of an image, a change due to the orientation of the face in the image greatly affects the recognition rate, such as when a person in the image is facing sideways. There is also the problem of giving.

また、前述した第3の従来技術では、人物顔領域を含むデジタルカラー画像から、予め設定された肌色に該当する肌色画素のみを抽出した肌色抽出画像から肌色抽出領域のエッジ画像を作成し、その画像中を楕円形上のテンプレートを用いたテンプレートマッチングにより探索することで、顔領域を抽出ということが行われている。しかし、この方法では楕円形状のエッジテンプレートが顔以外で色が人物の肌の色に近かった領域のエッジにとらわれてしまうという問題があった。   In the third prior art described above, an edge image of a skin color extraction region is created from a skin color extraction image obtained by extracting only skin color pixels corresponding to a preset skin color from a digital color image including a human face region. A face region is extracted by searching the image by template matching using an elliptical template. However, this method has a problem that the elliptical edge template is caught by the edge of a region other than the face and whose color is close to the color of the person's skin.

実��に第3の従来技術をデジタルカメラなどの画像に応用した場合では、図15に示すように、顔領域301に対して顔テンプレート302がマッチングするものの、木の幹など肌色に近い色をしていて表面がざらついている物体が存在すると、肌色抽出領域のエッジ画像上に多くのエッジがノイズとして現れ、このようなノイズが存在する誤った領域へ顔テンプレート303がマッチング��まうという問題点があ���。
ま��、���角形のエッジ画像中から特定の角度を持った対象角の位置検出を行う場合では、図16に示すように、所望の対象角311へ角テンプレート312がマッチングするものの、2つの三角形が作る誤った領域へ角テンプレート313がマッチングしてしまうという問題点がある。
When the third prior art is actually applied to an image of a digital camera or the like, the face template 302 matches the face area 301 as shown in FIG. If there is an object with a rough surface, many edges appear as noise on the edge image of the skin color extraction region, and the face template 303 is matched to an erroneous region where such noise exists. .
Further, in the case of detecting the position of the target angle having a specific angle from the edge image of the triangle, as shown in FIG. 16, although the corner template 312 matches the desired target angle 311, two triangles are created. There is a problem that the corner template 313 is matched to an incorrect region.

本発明はこのような課題を解決するためのものであり、極めて小さいデータ量のテンプレートで精度よく対象画像領域を抽出できるようにする。テンプレートマッチング方法および対象画像領域抽出装置を提供することを目的としている。   The present invention is for solving such a problem, and makes it possible to accurately extract a target image region with a template having an extremely small data amount. An object of the present invention is to provide a template matching method and a target image region extraction apparatus.

このような目的を達成するために、本発明にかかるテンプレートマッチング方法は、入力画像のエッジ画像から取得した任意の処理領域における処理領域画像と、対象画像の形状的特徴を示すテンプレートデータとを用いて、処理領域画像と対象画像との一致性を示すマッチング値を算出し、このマッチング値に基づき入力画像における対象画像の領域を特定するテンプレートマッチング方法において、テンプレートデータは、処理領域のうち対象画像のエッジが存在する位置を示すポジティブ点と、処理領域のうちエッジが存在しない位置を示すネガティブ点とからなり、各ポジティブ点およびネガティブ点と処理領域画像内に存在する各エッジとの位置関係に応じてマッチング値を算出する第1のステップを備えるものである。   In order to achieve such an object, the template matching method according to the present invention uses a processing region image in an arbitrary processing region acquired from an edge image of an input image, and template data indicating the shape characteristics of the target image. In the template matching method for calculating the matching value indicating the matching between the processing region image and the target image and identifying the target image region in the input image based on the matching value, the template data is the target image in the processing region. The positive point indicating the position where the edge exists and the negative point indicating the position where the edge does not exist in the processing region, and the positional relationship between each positive point and the negative point and each edge existing in the processing region image Accordingly, a first step of calculating a matching value is provided.

この際、エッジ画像を、入力画像に含まれるエッジの画像をそれぞれの階調値で示す複数の画素から構成し、第1のステップとして、各ポジティブ点およびネガティブ点ごとに、これら各点の位置に対応する処理領域画像の画素の階調値に基づき評価値をそれぞれ算出する第2のステップと、これらポジティブ点およびネガティブ点の評価値からマッチング値を算出する第3のステップとを設けてもよい。   At this time, the edge image is composed of a plurality of pixels indicating the image of the edge included in the input image with respective gradation values, and as a first step, the position of each point is determined for each positive point and negative point. A second step of calculating an evaluation value based on the gradation value of each pixel of the processing region image corresponding to the above, and a third step of calculating a matching value from the evaluation value of the positive point and the negative point. Good.

さらに、第2のステップとして、各ポジティブ点ごとに、処理領域画像のうち当該ポジティブ点の位置に対応する画素の階調値を評価値として算出するステップと、各ネガティブ点ごとに、エッジ画像の階調数から処理領域画像のうち当該ネガティブ点の位置に対応する画素の階調値を減算した値を評価値として算出するステップとを設け、第3のステップとして、第2のステップで算出された各評価値の総和からマッチング値を算出するステップを設けてもよい。   Further, as a second step, for each positive point, a step of calculating a gradation value of a pixel corresponding to the position of the positive point in the processing region image as an evaluation value, and for each negative point, an edge image A value obtained by subtracting the gradation value of the pixel corresponding to the position of the negative point in the processing area image from the number of gradations is provided as an evaluation value, and the third step is calculated in the second step. A step of calculating the matching value from the sum of the evaluation values may be provided.

また、第1のステップとして、テンプレートデータの各ポジティブ点およびネガティブ点の座標変換に用いる複数種のパラメータをマッチング候補情報として生成する第4のステップと、マッチング候補情報に基づきテンプレートデータの各ポジティブ点およびネガティブ点の座標を変換し、マッチング値の算出に用いる新たなテンプレートデータを生成する第5のステップとをさらに設けてもよい。   In addition, as a first step, a fourth step of generating a plurality of types of parameters used for coordinate conversion of each positive point and negative point of the template data as matching candidate information, and each positive point of the template data based on the matching candidate information And a fifth step of converting the coordinates of the negative point and generating new template data used for calculating the matching value.

この際、第4のステップとして、テンプレートデータの各ポジティブ点およびネガティブ点の座標変換に用いる複数種のパラメータを含む染色体情報を持つ複数の個体を保持するステップと、各個体のいずれか複数を親個体として指定するステップと、親個体から遺伝的アルゴリズムに基づき子個体を生成するステップと、子個体の染色体情報に含まれるパラメータをマッチング候補情報として出力するステップとを設けてもよい。   At this time, as a fourth step, a step of holding a plurality of individuals having chromosome information including a plurality of types of parameters used for coordinate conversion of each positive point and negative point of the template data, A step of designating as an individual, a step of generating a child individual from a parent individual based on a genetic algorithm, and a step of outputting a parameter included in chromosome information of the child individual as matching candidate information may be provided.

さらに、第4のステップに加えて、保持されている個体���うち、当該個体のマッチング候補情報に基づき生成された新たなテンプレートデータを用いて得られたマッチング値が最も低いものを置換候補として選択するステップと、子個体のマッチング候補情報に基づき生成された新たなテンプレートデータを用いて得られたマッチング値が、置換候補のマッチング値より高い場合は、置換候補に代えて子個体を新たな個体として保持するステップとを設けてもよい。   Further, in addition to the fourth step, among the held individuals, the one with the lowest matching value obtained using new template data generated based on the matching candidate information of the individual is selected as a replacement candidate And when the matching value obtained using the new template data generated based on the matching candidate information of the child individual is higher than the matching value of the replacement candidate, the child individual is replaced by the new individual. May be provided as a step.

また、テンプレートにおけるネガティブ点を、対象画像のエッジの周囲に存在する当該対象画像の他のエッジに重ならないように配置してもよい。
この際、ネガティブ点を、対象画像のエッジにより形成される領域の内側に配置してもよく、あるいは対象画像のエッジにより形成される領域の外側に配置してもよい。
Further, negative points in the template may be arranged so as not to overlap other edges of the target image existing around the edges of the target image.
At this time, the negative point may be arranged inside the region formed by the edge of the target image, or may be arranged outside the region formed by the edge of the target image.

また、ネガティブ点を、ポジティブ点の配置が形成する形状に沿って、この形状の周囲に配置してもよい。
また、ポジティブ点を、当該ポジティブ点が配置される領域で対象画像のエッジが出現する割合に応じた密度で配置してもよく、あるいはネガティブ点を、当該ネガティブ点が配置される領域で対象画像以外のエッジが出現する割合に応じた密度で配置してもよい。
また、対象画像として人物顔画像を用い、対象画像のエッジとして、人物顔画像の下部輪郭を示すエッジを用いてもよい。
Moreover, you may arrange | position a negative point around this shape along the shape which arrangement | positioning of a positive point forms.
Further, the positive points may be arranged at a density according to the ratio at which the edge of the target image appears in the area where the positive points are arranged, or the negative points are arranged in the area where the negative points are arranged. You may arrange | position with the density according to the ratio which edges other than appear.
Further, a human face image may be used as the target image, and an edge indicating the lower outline of the human face image may be used as the edge of the target image.

また、テンプレートデータとして、人物顔画像の下部輪郭を示すエッジが存在する位置を示すポジティブ点と、人物顔画像の下部輪郭を示すエッジが存在しない位置を示すネガティブ点とを有する顔テンプレートデータを用いてもよく、人物顔画像の下部輪郭を示すエッジとして半楕円形状を用いてもよい。
この際、ポジティブ点を、人物顔画像の頬輪郭領域に高い密度で配置され、人物顔画像の顎輪郭領域に低い密度で配置してもよく、あるいはネガティブ点を、人物顔画像の下部輪郭を示すエッジにより形成される領域の外側領域のうち、人物顔画像の頬輪郭領域に高い密度で配置され、人物顔画像の顎輪郭領域に低い密度で配置してもよい。
Further, as template data, face template data having a positive point indicating a position where an edge indicating the lower outline of the human face image exists and a negative point indicating a position where no edge indicating the lower outline of the human face image exists is used. Alternatively, a semi-elliptical shape may be used as an edge indicating the lower outline of the human face image.
At this time, positive points may be arranged at a high density in the cheek outline area of the human face image and may be arranged at a low density in the jaw outline area of the human face image, or negative points may be arranged at the lower outline of the human face image. Of the outer region of the region formed by the edges shown, it may be arranged at a high density in the cheek contour region of the human face image and may be arranged at a low density in the jaw contour region of the human face image.

また、本発明にかかる対象画像領域抽出装置は、上記いずれかのテンプレートマッチング方法を用いて、入力画像に含まれる人物顔画像の領域を特定するようにしたものである。   In addition, the target image region extraction apparatus according to the present invention is configured to specify the region of the human face image included in the input image using any one of the template matching methods described above.

また、本発明にかかる他の対象画像領域抽出装置は、入力画像から物の輪郭を示すエッジ画像を生成する画像入力部と、エッジ画像を記憶保持する画像保持部と、抽出したい対象画像の形状的特徴を示すテンプレートデータを記憶保持するテンプレートデータ保持部と、テンプレートデータの座標変換に用いる複数種のパラメータをマッチング候補情報として生成するマッチング候補出力部と、テンプレートデータ保持部から読み出したテンプレートデータをマッチング候補情報に基づき座標変換し新たなテンプレートデータを生成するテンプレート座標計算部と、画像保持部のエッジ画像上に順次設定した処理領域から取り出した処理領域画像とテンプレートデータ座標変換部で生成されたテンプレートデータとの一致性を示すマッチング値を算出するマッチング計算処理部と、マッチング計算処理部から得られたマッチング値が所定の基準値を超えた場合、当該マッチング値が得られた処理領域を対象画像を含む領域として特定する対象領域特定部と、特定された処理領域の座標位置とテンプレートデータとに基づき、対象画像領域に関する領域情報を出力する領域情報抽出部とを備え、テンプレートデータを、処理領域のうち対象画像のエッジが存在する位置を示すポジティブ点と、処理領域のうちエッジが存在しない位置を示すネガティブ点とから構成し、テンプレート座標計算部で、各ポジティブ点およびネガティブ点と処理領域画像内に存在する各エッジとの位置関係に応じてマッチング値を算出するようにしたものである。   In addition, another target image region extraction apparatus according to the present invention includes an image input unit that generates an edge image indicating an outline of an object from an input image, an image holding unit that stores and holds the edge image, and the shape of the target image to be extracted. A template data holding unit that stores and holds template data indicating a characteristic, a matching candidate output unit that generates a plurality of types of parameters used for coordinate conversion of the template data as matching candidate information, and template data read from the template data holding unit A template coordinate calculation unit that generates coordinate data based on the matching candidate information and generates new template data, and a processing region image extracted from the processing region sequentially set on the edge image of the image holding unit and the template data coordinate conversion unit Matching that shows consistency with template data A matching calculation processing unit that calculates the target area, and when the matching value obtained from the matching calculation processing unit exceeds a predetermined reference value, the processing region from which the matching value is obtained is specified as a region including the target image. A region information extraction unit that outputs region information related to the target image region based on the coordinate position of the specified processing region and the template data, and the template data includes the edge of the target image in the processing region. It consists of positive points that indicate positions and negative points that indicate positions where no edge exists in the processing area. In the template coordinate calculation unit, the position of each positive point and negative point and each edge that exists in the processing area image The matching value is calculated according to the relationship.

この際、エッジ画像を、入力画像に含まれるエッジの画像をそれぞれの階調値で示す複数の画素から構成し、テンプレート座標計算部で、各ポジティブ点およびネガティブ点ごとに、これら各点の位置に対応する処理領域画像の画素の階調値に基づき評価値をそれぞれ算出し、これらポジティブ点およびネガティブ点の評価値からマッチング値を算出するようにしてもよい。   At this time, the edge image is composed of a plurality of pixels indicating the edge image included in the input image with respective gradation values, and the position of each point is determined for each positive point and negative point in the template coordinate calculation unit. The evaluation value may be calculated based on the gradation value of the pixel of the processing region image corresponding to, and the matching value may be calculated from the evaluation value of these positive points and negative points.

さらに、テンプレート座標計算部で、各ポジティブ点ごとに、処理領域画像のうち当該ポジティブ点の位置に対応する画素の階調値を評価値として算出し、各ネガティブ点ごとに、エッジ画像の階調数から処理領域画像のうち当該ネガティブ点の位置に対応する画素の階調値を減算した値を評価値として算出し、各評価値の総和からマッチング値を算出するようにしてもよい。   Further, the template coordinate calculation unit calculates the gradation value of the pixel corresponding to the position of the positive point in the processing region image as an evaluation value for each positive point, and the gradation of the edge image for each negative point. A value obtained by subtracting the gradation value of the pixel corresponding to the position of the negative point in the processing area image from the number may be calculated as an evaluation value, and the matching value may be calculated from the sum of the evaluation values.

また、マッチング候補出力部に、テンプレートデータの各ポジティブ点およびネガティブ点の座標変換に用いる複数種のパラメータを含む染色体情報を持つ複数の個体を記憶保持する個体群保持部と、個体群保持部に保持されている各個体のいずれか複数を親個体として指定する親個体指定部と、親個体から遺伝的アルゴリズムに基づき子個体を生成し、この子個体の染色体情報に含まれるパラメータをマッチング候補情報として出力する新規個体生成部と���設けてもよい。   In addition, the matching candidate output unit includes an individual group holding unit for storing and holding a plurality of individuals having chromosome information including a plurality of types of parameters used for coordinate conversion of each positive point and negative point of the template data, and an individual group holding unit. A parent individual designating unit that designates one or more of each retained individual as a parent individual, and a child individual is generated from the parent individual based on a genetic algorithm, and parameters included in the chromosome information of the child individual are matched with candidate information And a new individual generation unit that outputs as

さらに、マッチング候補出力部に、個体群保持部に保持されている個体のうち、当該個体のマッチング候補情報に基づき生成された新たなテンプレートデータを用いて得られたマッチング値が最も低いものを置換候補として選択するステップと、子個体のマッチング候補情報に基づき生成された新たなテンプレートデータを用いて得られたマッチング値が、置換候補のマッチング値より高い場合は、置換候補に代えて子個体を新たな個体として保持するステップとを設けてもよい。   Further, the matching candidate output unit replaces the individual held in the individual group holding unit with the lowest matching value obtained using new template data generated based on the matching candidate information of the individual. If the matching value obtained using the step of selecting as a candidate and the new template data generated based on the matching candidate information of the child individual is higher than the matching value of the replacement candidate, the child individual is replaced with the replacement candidate. A step of holding it as a new individual may be provided.

本発明によれば、極めて小さいデータ量のテンプレートで対象画像のエッジ位置を探索することが可能となるとともに、対象画像以外のエッジをネガティブ点で認識でき精度よく対象画像領域を抽出できる。
したがって、従来のように複数のテンプレートを用いたりテンプレートデータとして濃淡画像を用いる場合と比較して、マッチング値算出処理に要する処理時間を大幅に短縮でき、テンプレートデータを保持しておくための記憶容量を大幅に削減できるとともに、ノイズの影響を受けることなく高い精度で対象画像領域を抽出できる。
According to the present invention, it is possible to search for an edge position of a target image with a template having an extremely small data amount, and it is possible to recognize an edge other than the target image with a negative point and extract a target image region with high accuracy.
Therefore, the processing time required for the matching value calculation process can be significantly reduced and the storage capacity for holding the template data compared to the conventional case where a plurality of templates are used or a grayscale image is used as template data. Can be significantly reduced, and the target image region can be extracted with high accuracy without being affected by noise.

次に、本発明の実施の形態について図面を参照して説明する。
[第1の実施の形態]
まず、図1を参照して、本発明の第1の実施の形態にかかるテンプレートマッチング方法およびこれを用いた対象画像領域抽出装置について説明する。図1は本発明の第1の実施の形態にかかる対象画像領域抽出装置の構成を示すブロック図である。
Next, embodiments of the present invention will be described with reference to the drawings.
[First Embodiment]
First, with reference to FIG. 1, a template matching method according to a first embodiment of the present invention and a target image region extraction apparatus using the same will be described. FIG. 1 is a block diagram showing a configuration of a target image area extracting apparatus according to a first embodiment of the present invention.

この対象画像領域抽出装置は、全体して画像処理を行うコンピュータからなり、CPUやDSP(Digital Signal Processer)などのマイクロプロセッサおよびその周辺回��を含むハードウェアと予め用意されたプログラムとが協働し、あるいはハードウェア単独で各種機能手段を実現する。
この機能手段としては、画像入力部1、画像保持部2、テンプレートテータ保持部3、マッチング候補出力部4、テンプレート座標計算部5、マッチング計算処理部6、対象領域特定部7、および対象領域情報抽出部8が設けられている。
This target image region extraction apparatus is composed of a computer that performs image processing as a whole, and hardware including a microprocessor such as a CPU and a DSP (Digital Signal Processor) and its peripheral circuits and a program prepared in advance cooperate with each other. Alternatively, various functional means are realized by hardware alone.
The function means includes an image input unit 1, an image holding unit 2, a template data holding unit 3, a matching candidate output unit 4, a template coordinate calculation unit 5, a matching calculation processing unit 6, a target area specifying unit 7, and target area information. An extraction unit 8 is provided.

本実施の形態にかかるテンプレートマッチング方法は、入力画像のエッジ画像から順次取得した処理領域画像と対象画像の形状的特徴を示すテンプレートデータとを比較し、両者の一致性を示すマッチング値に基づき、入力画像のエッジ画像から所望の対象画像領域を抽出する際、その対象画像のうちエッジ位置��示すポジティブ点と、エッジのない位置を示すネガティブ点とからなるテンプレートデータを用いるようにしたものである。そして、各ポジティブ点およびネガティブ点と処理領域画像内に存在する各エッジとの位置関係に応じてマッチング値を算出するようにしたものである。また、本実施の形態にかかる対象画像領域抽出装置は、このようなテンプレートマッチング方法を用いて、入力画像における所望の対象画像領域の位置、回転角度、大きさなどの対象領域情報を抽出するようにしたものである。   The template matching method according to the present embodiment compares the processing region image sequentially acquired from the edge image of the input image with the template data indicating the geometric feature of the target image, and based on the matching value indicating the matching between the two, When a desired target image region is extracted from an edge image of an input image, template data including a positive point indicating an edge position and a negative point indicating a position without an edge in the target image is used. . Then, the matching value is calculated according to the positional relationship between each positive point and negative point and each edge existing in the processing region image. Further, the target image region extraction apparatus according to the present embodiment uses such a template matching method to extract target region information such as the position, rotation angle, and size of a desired target image region in the input image. It is a thing.

次に、図1を参照して、各機能手段について説明する。
画像入力部1は、カメラなどの撮像装置で撮像された入力画像10を通信回線や記録媒体を介して、あるいは撮像装置から直接取り込んで、エッジ抽出処理を行うことにより物の輪郭を示すエッジ画像11を生成して出力する機能手段である。この際、例え��人物顔領域を抽出する場合には、そのデジタルカラー画像からなる入力画像10に対して、肌色画素の抽出、ノイズの除去、微分���ィ��タによるエッジの抽出が行われる。そして、得られたエッジ画像が2値化された後、ローパスフィルタによるぼかし処理が行われ、所定の階調数、例えば7階調(3ビット)や3階調(2ビット)を持つエッジ画像11が生成される。これら画像処理には公知の処理を用いればよい。このようにして得られたエッジ画像11は、一般に、エッジ部分が階調値の大きい黒画素で表現され、エッジのない領域が階調値の小さい白画素で表現される。
Next, each functional means will be described with reference to FIG.
The image input unit 1 captures an input image 10 captured by an imaging device such as a camera via a communication line or a recording medium or directly from the imaging device, and performs an edge extraction process to show an edge image indicating the contour of an object 11 is a functional means for generating and outputting 11. At this time, for example, when extracting a human face area, skin color pixels are extracted, noise is removed, and edges are extracted by a differential filter, with respect to the input image 10 composed of the digital color image. Then, after the obtained edge image is binarized, blur processing is performed by a low-pass filter, and the edge image has a predetermined number of gradations, for example, 7 gradations (3 bits) or 3 gradations (2 bits). 11 is generated. A known process may be used for these image processes. In the edge image 11 thus obtained, the edge portion is generally expressed by black pixels having a large gradation value, and the region having no edge is expressed by white pixels having a small gradation value.

画像保持部2は、メモリやハードディスクなどの記憶装置からなり、画像入力部1で生成されたエッジ画像11を記憶保持する機能手段である。
テンプレートデータ保持部3は、メモリやハードディスクなどの記憶装置からなり、予め入力されたテンプレートデータ13を、入力画像10から抽出したい対象画像の形状的特徴を示すテンプレートデータとして保持する機能手段である。このテンプレートデータ13は、対象画像のうちエッジ位置を表すポジティブ点と、エッジのない位置を表すネガティブ点とから形成されており、実際には、これらポジティブ点およびネガティブ点の位置を示す座標情報から構成されている。
The image holding unit 2 includes a storage device such as a memory or a hard disk, and is a functional unit that stores and holds the edge image 11 generated by the image input unit 1.
The template data holding unit 3 includes a storage device such as a memory or a hard disk, and is a functional unit that holds template data 13 input in advance as template data indicating the shape characteristics of the target image to be extracted from the input image 10. This template data 13 is formed from positive points representing edge positions in the target image and negative points representing positions without edges. Actually, from the coordinate information indicating the positions of these positive points and negative points. It is configured.

マッチング候補出力部4は、テンプレートデータ13をエッジ画像11とマッチングさせる際の中心位置、回転角、拡大率などの変換パラメータをランダムに選択しマッチング候補情報14として出力する機能手段である。
テンプレート座標計算部5は、マッチング候補出力部4からのマッチング候補情報14に基づき、テンプレートデータ保持部3から読み出したテンプレートデータ13を座標変換���、新たなテンプレートデータ15として出力する機能手段である。
The matching candidate output unit 4 is a functional unit that randomly selects conversion parameters such as a center position, a rotation angle, and an enlargement ratio when the template data 13 is matched with the edge image 11 and outputs it as matching candidate information 14.
The template coordinate calculation unit 5 is a functional unit that performs coordinate conversion of the template data 13 read from the template data holding unit 3 based on the matching candidate information 14 from the matching candidate output unit 4 and outputs the template data 15 as new template data 15.

マッチング計算処理部6は、テンプレート座標計算部5からのテンプレートデータ15を用いて、画像保持部2から読み出したエッジ画像11について、後述するマッチング値算出処理を行うことにより、エッジ画像11上に順次設定した処理領域ごとにマッチング値を計算し、計算結果16として出力する機能手段である。
この際、マッチング計算処理部6は、マッチング値算出処理として、テンプレートデータ15で設定されているポジティブ点またはネガティブ点とエッジ画像11内に存在するエッジとの位置関係に応じてマッチング値を算出する。
The matching calculation processing unit 6 uses the template data 15 from the template coordinate calculation unit 5 to sequentially perform matching value calculation processing, which will be described later, on the edge image 11 read from the image holding unit 2, thereby sequentially on the edge image 11. This is a functional means for calculating a matching value for each set processing region and outputting it as a calculation result 16.
At this time, the matching calculation processing unit 6 calculates a matching value according to the positional relationship between the positive point or the negative point set in the template data 15 and the edge existing in the edge image 11 as the matching value calculation processing. .

対象領域特定部7は、マッチング計算処理部6からの計算結果16に含まれるマッチング値と予め設定されている基準値とを比較し、その基準値を超えるマッチング値が見つかった時点で、そのマッチング値が得られた処理領域が所望の対象画像の存在する位置であると特定し、その処理領域を示す処理領域情報17を出力する機能手段である。
対象領域情報抽出部8は、対象領域特定部7からの処理領域情報17で指定された処理領域を示す座標情報とテンプレートデータ15とに基づいて、入力画像10における所望の対象画像領域に関する情報として、対象画像領域の位置、角度、大きさなどを示す対象領域情報18を出力する機能手段である。
The target area specifying unit 7 compares the matching value included in the calculation result 16 from the matching calculation processing unit 6 with a preset reference value, and when a matching value exceeding the reference value is found, the matching value is detected. This is a functional means for specifying that the processing area from which the value is obtained is a position where a desired target image exists, and outputting processing area information 17 indicating the processing area.
The target area information extraction unit 8 is information on a desired target image area in the input image 10 based on the coordinate information indicating the processing area specified by the processing area information 17 from the target area specifying unit 7 and the template data 15. This is a functional means for outputting target area information 18 indicating the position, angle, size, etc. of the target image area.

[テンプレートデータの構成]
次に、図2および図3を参照して、本実施の形態で用いるテンプレートデータの構成について説明する。図2は本実施の形態で用いるテンプレートデータの構成例である。図3は本実施の形態で用いるテンプレートデータの他の構成例である。
例えば、入力画像から顔領域を抽出する場合、図2のテンプレートデータ13に示すように、特徴点として、人物顔の輪郭ここでは半楕円形の顎輪郭を示すエッジに沿ってポジティブ点21が配置され、これらポジティブ点21により形成される領域23の外側、すなわち顔の輪郭の外側にネガティブ点22が配置されている。
[Configuration of template data]
Next, the configuration of template data used in the present embodiment will be described with reference to FIGS. FIG. 2 is a configuration example of template data used in this embodiment. FIG. 3 shows another configuration example of template data used in this embodiment.
For example, when a face area is extracted from an input image, as shown in the template data 13 in FIG. 2, positive points 21 are arranged as feature points along the edge indicating a human face outline, here, a semi-elliptical jaw outline. The negative point 22 is arranged outside the region 23 formed by the positive points 21, that is, outside the outline of the face.

また、図3のテンプレートデータ13では、特徴点として、図2と同様に人物顔の輪郭を示すエッジに沿ってポジティブ点21が配置され、これらポジティブ点21により形成される領域23の外側にネガティブ点22Aが配置されており、領域23の内側にネガティブ点22Bが配置されている。
なお、これらポジティブ点21およびネガティブ点22,22A,22Bからなる特徴点は、処理領域と等しい所定の大きさのテンプレート領域上における座標情報により指定される。
In the template data 13 of FIG. 3, positive points 21 are arranged as feature points along the edges indicating the outline of the human face as in FIG. 2, and a negative point is formed outside the region 23 formed by these positive points 21. A point 22 </ b> A is arranged, and a negative point 22 </ b> B is arranged inside the region 23.
Note that the feature points including the positive points 21 and the negative points 22, 22A, 22B are designated by coordinate information on a template area having a predetermined size equal to the processing area.

[テンプレートデータの変換処理]
次に、図4を参照して、本実施の形態で用いるテンプレートデータの変換処理について説明する。図4は本実施の形態で用いるテンプレートデータの変換処理を示す説明図であり、(a)は回転角および中心座標に関する変換を示す説明図、(b)は拡大率に関する変換を示す説明図、(c)はテンプレートデータの変換に用いる数式である。
テンプレート座標計算部5では、マッチング候補出力部4からのマッチング候補情報14に基づきテンプレートデータ13の変換を行う。マッチング候補情報14には、テンプレートデータ13に対する変換パラメータとして、中心座標x,y、回転角θ、および拡大率Mが含まれている。
[Template data conversion processing]
Next, template data conversion processing used in the present embodiment will be described with reference to FIG. 4A and 4B are explanatory views showing the conversion processing of template data used in the present embodiment, wherein FIG. 4A is an explanatory view showing conversion related to the rotation angle and center coordinates, and FIG. 4B is an explanatory view showing conversion related to the enlargement ratio. (C) is a mathematical formula used for conversion of template data.
The template coordinate calculation unit 5 converts the template data 13 based on the matching candidate information 14 from the matching candidate output unit 4. The matching candidate information 14 includes center coordinates x, y, a rotation angle θ, and an enlargement factor M as conversion parameters for the template data 13.

中心位置x,yは、例えば図4(a)に示すように、エッジ画像11とのマッチング値算出処理でポジティブ点およびネガティブ点からなる特徴点群の基準となる座標、例えば人物顔における顎などの座標を指示する変換パラメータであり、指定されたx,yに中心位置を持つ新たなテンプレートデータが得られる。
回転角θは、特徴点群の回転量を示す変換パラメータであり、例えばテンプレートデータ13が顔の輪郭を示す場合、その輪郭を示す特徴点群が所定の原点座標を中心としてθだけ回���された新たなテンプレートデータが得られる。
For example, as shown in FIG. 4A, the center positions x and y are coordinates serving as a reference for a feature point group including positive points and negative points in a matching value calculation process with the edge image 11, for example, jaws in a human face. New template data having a center position at designated x and y is obtained.
The rotation angle θ is a conversion parameter indicating the amount of rotation of the feature point group. For example, when the template data 13 indicates a face outline, the feature point group indicating the outline is rotated by θ around a predetermined origin coordinate. New template data is obtained.

また、拡大率Mは、例えば図4(b)に示すように、テンプレートデータ13の拡大/縮小��������いを示す変換パラメータであり、例えばテンプレートデータ13が顔の輪郭を示す場合、その輪郭を示す特徴点群が拡大率Mだけ拡大/縮小された新たなテンプレートデータが得られる。
テンプレートデータ13を構成する特徴点群の点列Pすなわちp1〜pnの座標情報は、図4(c)の式(1)により予め与えられており、上記変換パラメータをもとに、式(2)および式(3)を用いて点列Pにアフィン変換を行い、変換により得られた新たな座標情報が、テンプレートデータ15の特徴点群の点列Hすなわちh1〜hnとなる。
Further, the enlargement ratio M is a conversion parameter indicating the degree of enlargement / reduction of the template data 13, for example, as shown in FIG. 4B. New template data in which the feature point group is enlarged / reduced by the enlargement ratio M is obtained.
The coordinate information of the point sequence P of the feature point group constituting the template data 13, that is, p1 to pn is given in advance by the equation (1) in FIG. 4C, and the equation (2) based on the conversion parameter. ) And Equation (3) are used to perform affine transformation on the point sequence P, and the new coordinate information obtained by the transformation becomes the point sequence H of the feature point group of the template data 15, that is, h1 to hn.

[マッチング値算出処理]
次に、図5を参照して、本実施の形態にかかるマッチング値算出方法について説明する。図5は本発明の第1の実施の形態にかかるマッチング値算出処理を示すフローチャートである。以下では、エッジ画像11に設定された1つの処理領域の画像とテンプレートデータ15とを用いて、両者のマッチング値を計算する場合を例として説明する。
まず、マッチング計算処理部6は、エッジ画像11から当該処理領域の画像データを読み出し(ステップ100)、マッチング値mを初期値(m=0)に設定する(ステップ101)。
[Matching value calculation process]
Next, a matching value calculation method according to the present embodiment will be described with reference to FIG. FIG. 5 is a flowchart showing the matching value calculation processing according to the first embodiment of the present invention. In the following, a case where a matching value between the two processing regions is calculated using an image of one processing region set in the edge image 11 and the template data 15 will be described as an example.
First, the matching calculation processing unit 6 reads the image data of the processing region from the edge image 11 (step 100), and sets the matching value m to an initial value (m = 0) (step 101).

次に、テンプレートデータ15から任意のポジティブ点hを選択して読み出す(ステップ102)。そして、処理領域画像のうちポジティブ点hの座標情報hx,hyに相当する位置の画素の階調値gを取得して、ポジティブ点hに対応する評価値として算出し(ステップ103)、この評価値gをマッチング値mに加算する(ステップ104)。
このようにして、すべてのポジティブ点hについて、上記ステップ102〜104を繰り返し実行する(ステップ105:NO)。
Next, an arbitrary positive point h is selected and read from the template data 15 (step 102). Then, the gradation value g of the pixel at the position corresponding to the coordinate information hx, hy of the positive point h in the processing area image is acquired and calculated as an evaluation value corresponding to the positive point h (step 103). The value g is added to the matching value m (step 104).
In this way, the above steps 102 to 104 are repeatedly executed for all positive points h (step 105: NO).

ステップ105において、すべてのポジティブ点hを選択してポジティブ点の評価処理が終了した場合は(ステップ105:YES)、テンプレートデータ15から任意のネガティブ点hを読み出す(ステップ106)。そして、処理領域画像のうちネガティブ点hの座標情報hx,hyに相当する位置の画素の階調値gを取得して、これをエッジ画像11の階調数Lから減算した値L−gを、ネガティブ点hに対応する評価値として算出し(ステップ107)、この評価値L−gをマッチング値mに加算する(ステップ108)。   In step 105, when all positive points h are selected and the positive point evaluation process is completed (step 105: YES), an arbitrary negative point h is read from the template data 15 (step 106). Then, a gradation value g of a pixel at a position corresponding to the coordinate information hx, hy of the negative point h in the processing region image is acquired, and a value L-g obtained by subtracting this from the gradation number L of the edge image 11 is obtained. The evaluation value corresponding to the negative point h is calculated (step 107), and this evaluation value L-g is added to the matching value m (step 108).

このようにして、すべてのネガティブ点hについて、上記ステップ106〜108を繰り返し実行し(ステップ109:NO)、すべてのネガティブ点hを選択してネガティブ点の評価処理が終了した場合は(ステップ109:YES)、得られたマッチング値mをポジティブ点とネガティブ点の個数Nで除算することにより、正規化されたマッチング値を算出し(ステップ110)、一連のマッチング値算出処理を終了する。
これにより、得られるマッチング値mは、0から1までの値をとり、大きい値のほうが処理領域画像とテンプレートデータ15との一致性が高いことを示す。
In this way, the above steps 106 to 108 are repeatedly executed for all negative points h (step 109: NO), and when all negative points h are selected and the negative point evaluation process is completed (step 109). :)), the normalized matching value is calculated by dividing the obtained matching value m by the number N of positive points and negative points (step 110), and the series of matching value calculation processes is terminated.
Thereby, the obtained matching value m takes a value from 0 to 1, and a larger value indicates that the matching between the processing region image and the template data 15 is higher.

このように本実施の形態では、対象画像のエッジ位置を示すポジティブ点と対象画像のエッジのない位置を示すネガティブ点とからなるテンプレートデータを用い、各ポジティブ点およびネガティブ点と処理領域画像内に存在する各エッジとの位置関係に応じてマッチング値を算出するようにしたので、極めて小さいデータ量のテンプレートで対象画像のエッジ位置を探索することが可能となるとともに、対象画像以外のエッジを認識でき精度よく対象画像領域を抽出できる。
したがって、従来のように複数のテンプレートを用いたりテンプレートデータとして濃淡画像を用いる場合と比較して、マッチング値算出処理に要する処理時間を大幅に短縮できるとともに、テンプレートデータを保持しておくための記憶容量を大幅に削減できる。
As described above, in the present embodiment, template data including positive points indicating edge positions of the target image and negative points indicating positions without the edges of the target image are used, and each positive point and negative point are included in the processing region image. Since the matching value is calculated according to the positional relationship with each existing edge, it is possible to search for the edge position of the target image using a template with an extremely small amount of data, and recognize edges other than the target image. The target image area can be extracted with high accuracy.
Therefore, the processing time required for the matching value calculation process can be greatly shortened as compared with the conventional case where a plurality of templates are used or a grayscale image is used as the template data, and a memory for storing the template data. The capacity can be greatly reduced.

また、マッチング値を算出する際、各ポジティブ点およびネガティブ点ごとに、これら各点の位置に対応する処理領域画像の画素の階調値に基づき評価値をそれぞれ算出し、これら評価値からマッチング値を算出するようにしたので、処理領域画像の画素の階調値に対する演算だけでマッチング値を算出でき、処理を簡素化できる。
この際、より��体的には、各ポジティブ点ごとに、当該ポジティブ点の位置に対応する画素の階調値を評価値として算出するともとに、各ネガティブ点ごとに、エッジ画像の階調数から当該ネガティブ点の位置に対応する画素の階調値を減算した値を評価値として算出し、これら各評価値の総和からマッチング値を算出するようにしたので、マッチング値の算出が加減算処理だけで実現でき、極めて短時間でマッチング値を算出できる。
Further, when calculating the matching value, for each positive point and negative point, an evaluation value is calculated based on the gradation value of the pixel of the processing area image corresponding to the position of each point, and the matching value is calculated from these evaluation values. Therefore, the matching value can be calculated only by the calculation for the gradation value of the pixel of the processing area image, and the processing can be simplified.
In this case, more specifically, for each positive point, the gradation value of the pixel corresponding to the position of the positive point is calculated as an evaluation value, and the number of gradations of the edge image for each negative point. Since the value obtained by subtracting the gradation value of the pixel corresponding to the position of the negative point from is calculated as the evaluation value, and the matching value is calculated from the sum of these evaluation values, the calculation of the matching value is only the addition / subtraction process. The matching value can be calculated in a very short time.

[テンプレートマッチング処理]
次に、図6を参照して、本発明の第1の実施の形態にかかる対象画像領域抽出装置の動作として、テンプレートマッチング処理について説明する。図6は本発明の第1の実施の形態にかかるテンプレートマッチング処理を示すフローチャートである。
まず、画像入力部1は、処理対象となる入力画像10を取り込んでエッジ画像11を生成し(ステップ120)、エッジ画像11を画像保持部2に保持する(ステップ121)。
[Template matching process]
Next, with reference to FIG. 6, a template matching process will be described as an operation of the target image region extraction apparatus according to the first embodiment of the present invention. FIG. 6 is a flowchart showing the template matching process according to the first embodiment of the present invention.
First, the image input unit 1 takes in the input image 10 to be processed, generates an edge image 11 (step 120), and holds the edge image 11 in the image holding unit 2 (step 121).

次に、マッチング候補出力部4は、ランダム発生関数などを用いたマッチング候補選択処理により、中心位置、回転角、拡大率などの変換パラメータを選択してマッチング候補情報14として出力する(ステップ122)。
テンプレート座標計算部5は、このマッチング候補情報14に基づき、予めテンプレートデータ保持部3から読み出したテンプレートデータ13を変換し、テンプレートデータ15として出力する(ステップ123)。
Next, the matching candidate output unit 4 selects a conversion parameter such as a center position, a rotation angle, and an enlargement ratio by matching candidate selection processing using a random generation function and outputs it as matching candidate information 14 (step 122). .
The template coordinate calculation unit 5 converts the template data 13 read from the template data holding unit 3 in advance based on the matching candidate information 14 and outputs the converted template data 15 (step 123).

マッチング計算処理部6は、画像保持部2のエッジ画像11から任意の処理領域に対応する処理領域画像を読み出し(ステップ124)、上記テンプレートデータ15を用いて前述した図5のマッチング値算出処理を行う(ステップ125)。そして、このマッチング値算出処理により各処理領域画像ごとに得られたマッチング値を、当該処理領域を示す領域情報とともに計算結果16として出力する。   The matching calculation processing unit 6 reads a processing region image corresponding to an arbitrary processing region from the edge image 11 of the image holding unit 2 (step 124), and performs the above-described matching value calculation processing of FIG. Perform (step 125). Then, the matching value obtained for each processing region image by this matching value calculation processing is output as the calculation result 16 together with the region information indicating the processing region.

対象領域特定部7は、���ッチング計算処理部6からの計算結果16に含まれるマッチング値と予め設定されている基準値とを比較し(ステップ126)、その基準値を超えるマッチング値が見つからなかっ���場合は(ステップ1�������NO)�����処理の処理領域がある場合にのみ(ステップ127:YES)、ステップ124へ戻って新たな処理領域に対するマッチング処理へ移行する。   The target area specifying unit 7 compares the matching value included in the calculation result 16 from the matching calculation processing unit 6 with a preset reference value (step 126), and no matching value exceeding the reference value is found. In such a case (step 126: NO), only when there is an unprocessed processing area (step 127: YES), the process returns to step 124 to shift to a matching process for a new processing area.

この際、未処理の処理領域がなく、当該テンプレートデータ15を用いたマッチング処理が終了した場合は(ステップ127:NO)、未処理のマッチング候補がある場合にのみ、例えば使用したマッチング候補が所定数に達していない場合には(ステップ128:YES)、ステップ122へ戻って新たなマッチング候補を用いたテンプレートデータ15の生成処理へ移行する。
一方、未処理のマッチング候補がなく、例えば使用したマッチング候補の数が所定数に達し、すべてのマッチング候補についてのマッチング処理が終了した場合は(ステップ128)、所望の対象画像が入力画像10で特定できないことになり、一連のテンプレートマッチング処理を終了する。
At this time, when there is no unprocessed processing area and the matching process using the template data 15 is completed (step 127: NO), for example, the used matching candidate is determined only when there is an unprocessed matching candidate. If the number has not been reached (step 128: YES), the process returns to step 122 and shifts to a process for generating the template data 15 using a new matching candidate.
On the other hand, when there is no unprocessed matching candidate, for example, when the number of used matching candidates reaches a predetermined number and the matching processing for all the matching candidates is completed (step 128), the desired target image is the input image 10 As a result, the series of template matching processing is terminated.

また、ステップ126において、基準値を超えるマッチング値が見つかった場合(ステップ126:YES)、対象領域特定部7は、そのマッチング値が得られた当該処理領域が所望の対象画像領域を含む領域であると特定し、当該処理領域を示す処理領域情報17を出力する(ステップ129)。
対象領域情報抽出部8は、対象領域特定部7からの処理領域情報17に基づき、入力画像10上における処理領域画像の基準位置を把握するとともに、テンプレートデータ15に基づき、例えば処理領域の最左点・最上点・最右点・最下点で囲まれた矩形領域を把握し、これら情報から対象領域情報18を生成して出力し(ステップ130)、一連のテンプレートマッチング処理を終了する。
When a matching value exceeding the reference value is found in step 126 (step 126: YES), the target area specifying unit 7 is an area in which the processing area from which the matching value is obtained includes a desired target image area. It identifies that there is, and outputs processing area information 17 indicating the processing area (step 129).
The target area information extraction unit 8 grasps the reference position of the processing area image on the input image 10 based on the processing area information 17 from the target area specifying unit 7, and based on the template data 15, for example, the leftmost of the processing area A rectangular area surrounded by the points, the uppermost point, the rightmost point, and the lowermost point is grasped, and the target area information 18 is generated and output from these pieces of information (step 130), and a series of template matching processes is terminated.

図7に本実施の形態による顔領域の抽出結果を示す。前述した従来技術による図15の結果では、木の幹が肌色に近い色をしていて表面がざらついているため、肌色抽出領域のエッジ画像上に多くのエッジがノイズとして現れ、そこに顔テンプレート303がマッチングしてしまっていた。本実施の形態によれば、テンプレートデータがポジティブ点とネガティブ点から構成されているため、図7に示すように、ノイズにテンプレートがとらわれなくなり、顔領域201に対してポジティブ点とネガティブ点からなる顔テンプレート202が正しくマッチングするものとなる。   FIG. 7 shows the extraction result of the face area according to this embodiment. In the result of FIG. 15 according to the prior art described above, since the trunk of the tree has a color close to the skin color and the surface is rough, many edges appear as noise on the edge image of the skin color extraction region, and there is a face template there. 303 matched. According to the present embodiment, since the template data is composed of positive points and negative points, the template is not caught by noise as shown in FIG. The face template 202 matches correctly.

また、図8に本実施の形態による角領域の抽出結果を示す。前述した従来技術による図16の結果では、2つの三角形が作る誤った領域への角テンプレート313がマッチングしてしまっていた。本実施の形態によれば、テンプレートデータがポジティブ点とネガティブ点から構成されているため、図8に示すように、2つの三角形が作る余分なエッジすなわち対象画像以外のエッジがネガティブ点により認識されて、所望の角領域との違いがマッチング値に考慮され、所望の角領域211に対してポジティブ点とネガティブ点からなる角テンプレート212が正しくマッチングするものとなる。   FIG. 8 shows the extraction result of the corner region according to this embodiment. In the result of FIG. 16 according to the prior art described above, the corner template 313 to the wrong region created by the two triangles has been matched. According to the present embodiment, since the template data is composed of positive points and negative points, as shown in FIG. 8, extra edges formed by two triangles, that is, edges other than the target image are recognized by the negative points. Thus, the difference from the desired corner region is considered in the matching value, and the corner template 212 composed of positive points and negative points is correctly matched to the desired corner region 211.

また、本実施の形態では、テンプレートデータの各ポジティブ点およびネガティブ点の座標変換に用いる複数種のパラメータをマッチング候補情報としてランダムに生成し、このマッチング候補情報に基づきテンプレートデータの各ポジティブ点およびネガティブ点の座標を変換し、マッチング値の算出に用いる新たなテンプレートデータを生成するようにしたので、位置、回転角あるいは大きさが異なる膨大な種類の対象画像が入力画像10内に含まれる可能性がある場合でも、このような広大な探索空間から少ないテンプレートデータで、所望の対象画像領域を効率よく抽出できる。   Further, in the present embodiment, a plurality of types of parameters used for coordinate conversion of each positive point and negative point of the template data are randomly generated as matching candidate information, and each positive point and negative of the template data are generated based on this matching candidate information. Since the coordinates of the points are converted and new template data used for calculating the matching value is generated, there is a possibility that a large number of types of target images having different positions, rotation angles, or sizes may be included in the input image 10. Even if there is, a desired target image area can be efficiently extracted from such a vast search space with a small amount of template data.

なお、以上では、テンプレートデータの構成例として図2や図3を示したが、これに限定されるものではない。
例えばテンプレートデータとして、対象画像のエッジにポジティブ点を配置し、そのエッジの周囲に存在する当該対象画像の他のエッジに重ならないように、ネガティブ点を配置したものを用いてもよい。これにより、ポジティブ点による当該対象画像の特定に用いない当該対象画像の他のエッジを、当該抽出画像以外のエッジとしてネガティブ点で認識してしまうケースを避けることができ、さらに精度良くテンプレートマッチングを行うことができる。
In the above, FIG. 2 and FIG. 3 are shown as configuration examples of the template data, but the present invention is not limited to this.
For example, as template data, a positive point may be arranged at the edge of the target image and a negative point may be arranged so as not to overlap other edges of the target image existing around the edge. As a result, it is possible to avoid a case where other edges of the target image that are not used for specifying the target image by positive points are recognized as negative edges other than the extracted image, and template matching can be performed with higher accuracy. It can be carried out.

この際、対象画像のエッジにより形成される領域の内側に、ネガティブ点を追加して配置してもよい。これにより、上記領域の内側に対象画像の他のエッジが少ない場合には、そのネガティブ点による上記誤認が回避されるとともに、そのネガティブ点により当該抽出画像以外のエッジを認識でき、比較的少ない数のネガティブ点を追加するだけでマッチング精度をさらに向上できる。
あるいは、対象画像のエッジにより形成される領域の外側に、ネガティブ点を追加して配置してもよい。これにより、上記領域の外側に対象画像の他のエッジが少ない場合には、そのネガティブ点による上記誤認が回避されるとともに、そのネガティブ点により当該抽出画像以外のエッジを認識でき、比較的少ない数のネガティブ点を追加するだけでマッチング精度をさらに向上できる。
At this time, a negative point may be additionally arranged inside the region formed by the edge of the target image. As a result, when there are few other edges of the target image inside the area, the misperception due to the negative points is avoided, and edges other than the extracted image can be recognized by the negative points, and a relatively small number Matching accuracy can be further improved by simply adding negative points.
Alternatively, a negative point may be additionally arranged outside the area formed by the edge of the target image. As a result, when there are few other edges of the target image outside the region, the above misidentification due to the negative point is avoided, and edges other than the extracted image can be recognized by the negative point, and a relatively small number Matching accuracy can be further improved by simply adding negative points.

また、他のテンプレートデータとして、対象画像のエッジ上に配置したポジティブ点が形成する形状に沿って、これらポジティブ点の周囲にネガティブ点を配置したものを用いるようにしてもよい。これにより、少ない数のポジティブ点およびネガティブ点で対象画像のエッジを効率よく特定でき、データ量の少ないテンプレートで効果的に対象画像のエッジとマッチングすることができる。   Further, as other template data, data in which negative points are arranged around these positive points along the shape formed by the positive points arranged on the edge of the target image may be used. Thereby, the edge of the target image can be efficiently identified with a small number of positive points and negative points, and the edge of the target image can be effectively matched with a template having a small amount of data.

また、他のテンプレートデータとして、ポジティブ点を対象画像のエッジが存在する領域に配置する際、その領域で当該エッジが出現する割合に応じた密度でポジティブ点を配置するようにしてもよい。これにより、ポジティブ点で特定すべきエッジの量に応じてポジティブ点の数を調整でき、データ量の少ないテンプレートで効果的に対象画像のエッジとマッチングすることができる。   As another template data, when positive points are arranged in a region where an edge of the target image exists, positive points may be arranged at a density according to the ratio of the appearance of the edge in the region. As a result, the number of positive points can be adjusted according to the amount of edges to be specified by positive points, and matching with the edges of the target image can be performed effectively with a template having a small amount of data.

また、他のテンプレートデータとして、ネガティブ点を対象画像のエッジの周囲に存在する領域に配置する際、その領域で当該対象画像以外のエッジが出現する割合に応じた密度で配置するようにしてもよい。これにより、ネガティブ点で認識すべき他のエッジの量に応じてネガティブ点��数を調整でき、データ量の少ないテンプレートで効果的に対象画像のエッジとマッチングすることができる。   As another template data, when negative points are arranged in a region existing around the edge of the target image, the negative points may be arranged at a density corresponding to the ratio of the edges other than the target image appearing in the region. Good. Thereby, the number of negative points can be adjusted according to the amount of other edges to be recognized at the negative points, and the edges of the target image can be effectively matched with a template having a small amount of data.

また、本実施の形態にかかるテンプレートマッチング方法または対象画像領域抽出装置を、入力画像から人物顔画像の領域を抽出する際に用いる場合、対象画像は人物顔画像とし、対象画像のエッジとして、人物顔画像の下部輪郭を示すエッジを用いればよく、このように、人物顔画像のうち比較的明確なエッジが得られる下部輪郭を利用するようにしたので、高い精度で効率よく人物顔画像の領域を抽出できる。   Further, when the template matching method or the target image region extraction device according to the present embodiment is used when extracting a human face image region from an input image, the target image is a human face image, and the person image is an edge of the target image. It is only necessary to use an edge indicating the lower contour of the face image. Thus, since the lower contour from which a relatively clear edge is obtained is used in the human face image, the region of the human face image is efficiently obtained with high accuracy. Can be extracted.

また、テンプレートデータとしては、人物顔画像の下部輪郭を示すエッジが存在する位置を示すポジティブ点と、人物顔画像の下部輪郭を示すエッジが存在しない位置を示すネガティブ点とを有する顔テンプレートデータを用いればよく、顔テンプレートデータが人物顔画像以外の領域へマッチングすることを回避でき、高い精度で効率よく人物顔画像の領域を抽出できる。
この際、人物顔画像の下部輪郭を示すエッジとして半楕円形状を用いてもよく、顔テンプレートデータを容易に構成できる。また、モザイク顔のテンプレートや楕円形のような顔全体の輪郭のエッジを模倣したものを使用する場合に比べ、テンプレートの構成点数を減らせることから、マッチング処理時間を短縮することが可能になる。
Further, as template data, face template data having positive points indicating positions where edges indicating the lower contour of the human face image exist and negative points indicating positions where edges indicating the lower contour of the human face image are not present. It can be used, and it can be avoided that the face template data is matched to an area other than the human face image, and the human face image area can be efficiently extracted with high accuracy.
At this time, a semi-elliptical shape may be used as an edge indicating the lower outline of the human face image, and the face template data can be easily configured. Compared to using a mosaic face template or an ellipse-like contour edge of the entire face, the number of components of the template can be reduced, so that the matching processing time can be shortened. .

さらに、顔テンプレートデータのポジティブ点については、人物顔画像の頬輪郭領域に高い密度で配置し、人物顔画像の顎輪郭領域に低い密度で配置してもよく、人物顔画像以外のエッジが存在しやすい顎輪郭のエッジが明確ではない場合でも、高い精度で人物顔画像の領域を抽出できる。
また、ネガティブ点については、人物顔画像の下部輪郭を示すエッジにより形成される領域の外側領域のうち、人物顔画像の頬輪郭領域に高い密度で配置し、人物顔画像の顎輪郭領域に低い密度で配置してもよく、カラー画像から肌色領域のエッジをとることで顔領域を含んだエッジ画像を作成した場合などにおいて、顎と首が合さってしまい顎のエッジが明確でない場合においても、高い精度で人物顔領域を抽出することができる。
Furthermore, the positive points of the face template data may be arranged at a high density in the cheek outline region of the human face image and may be arranged at a low density in the jaw outline region of the human face image, and there are edges other than the human face image. Even if the edge of the chin contour that is easy to do is not clear, the human face image region can be extracted with high accuracy.
The negative points are arranged at a high density in the cheek contour region of the human face image out of the region formed by the edge indicating the lower contour of the human face image and low in the jaw contour region of the human face image. Even when the edge of the skin color area is taken from the color image and the edge image including the face area is created, the chin and neck are joined and the chin edge is not clear. The human face area can be extracted with high accuracy.

[第2の実施の形態]
次に、図9を参照して、本発明の第2の実施の形態にかかるテンプレートマッチング方法およびこれを用いた対象画像領域抽出装置について説明する。図9は本発明の第2の実施の形態にかかる対象画像領域抽出装置の構成を示すブロック図である。
前述した第1の実施の形態では、マッチング候補を選択する際、ランダムに選択する場合について説明した。本実施の形態では、遺伝的アルゴリズム(GA:Genetic Algorithm)に基づきマッチング候補を選択する場合について説明する。
[Second Embodiment]
Next, with reference to FIG. 9, a template matching method according to a second embodiment of the present invention and a target image region extraction apparatus using the same will be described. FIG. 9 is a block diagram showing a configuration of a target image area extracting apparatus according to the second embodiment of the present invention.
In the first embodiment described above, the case of selecting a random candidate when selecting a matching candidate has been described. In the present embodiment, a case will be described in which matching candidates are selected based on a genetic algorithm (GA).

図9に示した対象画像領域抽出装置では、図1のマッチング候補出力部4およびマッチング計算処理部6に代えて、マッチング候補出力部4Aおよびマッチング計算処理部6Aが設けられているほかは前述と同様の構成を有し、前述と同様のテンプレートデータを用いるものであり、図1と同じまたは同等部分には同一符号を付してある。   In the target image region extraction apparatus shown in FIG. 9, the above-described configuration is the same as that described above except that a matching candidate output unit 4A and a matching calculation processing unit 6A are provided instead of the matching candidate output unit 4 and the matching calculation processing unit 6 in FIG. It has the same configuration and uses the same template data as described above, and the same or equivalent parts as in FIG.

マッチング候補出力部4Aは、遺伝的アルゴリズムに基づいて、テンプレートデータ13をエッジ画像11とマッチングさせる際の中心位置、回転角、拡大率などの変換パラメータをランダムに選択しマッチング候補情報14として出力する機能手段である。
マッチング計算処理部6Aは、テンプレート座標計算部5からのテンプレートデータ15を用いて、画像保持部2から読み出したエッジ画像11について、後述するマッチング値算出処理を行うことにより、エッジ画像11上に順次設定した処理領域ごとにマッチング値を計算し、当該処理領域の領域情報とともに計算結果16として出力する機能手段である。この際、遺伝的アルゴリズムの調整のため、得られたマッチング値をマッチング候補出力部4Aへ出力する。
The matching candidate output unit 4A randomly selects conversion parameters such as a center position, a rotation angle, and an enlargement ratio when matching the template data 13 with the edge image 11 based on a genetic algorithm, and outputs it as matching candidate information 14. Functional means.
Using the template data 15 from the template coordinate calculation unit 5, the matching calculation processing unit 6 </ b> A sequentially performs the matching value calculation processing, which will be described later, on the edge image 11 read from the image holding unit 2, so This is a functional means for calculating a matching value for each set processing area and outputting it as a calculation result 16 together with area information of the processing area. At this time, in order to adjust the genetic algorithm, the obtained matching value is output to the matching candidate output unit 4A.

[遺伝的アルゴリズムに基づくマッチング候補選択処理]
次に、図9および図10を参照して、本実施の形態にかかるマッチング候補出力部4Aでの遺伝的アルゴリズムに基づくマッチング候補選択処理について説明する。図9は、マッチング候補出力部4Aの構成例を示すブロック図である。図10は遺伝的アルゴリズムで用いる染色体情報の構成例である。
[Matching candidate selection process based on genetic algorithm]
Next, with reference to FIG. 9 and FIG. 10, the matching candidate selection process based on the genetic algorithm in the matching candidate output part 4A concerning this Embodiment is demonstrated. FIG. 9 is a block diagram illustrating a configuration example of the matching candidate output unit 4A. FIG. 10 is a configuration example of chromosome information used in the genetic algorithm.

遺伝的アルゴリズムとは、生物の遺伝子メカニズム、例えば複数の個体からの新たな個体を生成する交叉、染色体情報の一部が変異する突然変異、さらにはある評価基準による個体の淘汰などのメカニズムを情報処理技術に取り入れて、既存の情報から最適な解を求めるための方法である(例えば、安居院猛/長尾知晴共著、「ジェネティックアルゴリズム」、昭晃堂、ISBN4-7856-9046-1 C3055など参照)。   A genetic algorithm is information about the genetic mechanism of an organism, such as crossover that generates a new individual from multiple individuals, mutations that change part of the chromosomal information, or even an individual's wrinkle according to some criteria. This is a method for obtaining the optimal solution from existing information by incorporating it into the processing technology (for example, see Takeshi Yasui / Tomoharu Nagao, “Genetic Algorithm”, Shoshodo, ISBN4-7856-9046-1 C3055, etc.) .

図10はマッチング候補出力部4Aの構成例を示すブロック図である。マッチング候補出力部4Aは、このような遺伝的アルゴリズムを実現するための機能手段として、図10のような、個体群保持部41、親個体指定部42、交叉・突然変異処理部43、置換対象選択部44、および個体置換処理部45を有している。   FIG. 10 is a block diagram illustrating a configuration example of the matching candidate output unit 4A. As a functional means for realizing such a genetic algorithm, the matching candidate output unit 4A includes an individual group holding unit 41, a parent individual designating unit 42, a crossover / mutation processing unit 43, a replacement target, as shown in FIG. A selection unit 44 and an individual replacement processing unit 45 are included.

次に、図12を参照して、本実施の形態にかかるマッチング候補情報生成処理について説明する。
個体群保持部41は、テンプレートデータの変換を決定する中心位置、回転角、拡大率などの変換パラメータを含む染色体情報を持つ個体を予め複数保持している。図11は個体(染色体情報)の構成例である。この個体51の構成例では、中心位置を示すx座標61およびy座標62と、回転角θ63と、拡大率M64とを、それぞれ2進数のビット列で表現して連結されている。
Next, with reference to FIG. 12, the matching candidate information generation process according to the present embodiment will be described.
The individual group holding unit 41 holds in advance a plurality of individuals having chromosome information including conversion parameters such as a center position, a rotation angle, and an enlargement ratio that determine template data conversion. FIG. 11 shows a configuration example of an individual (chromosome information). In the configuration example of the individual 51, the x-coordinate 61 and y-coordinate 62 indicating the center position, the rotation angle θ63, and the enlargement factor M64 are each represented by a binary bit string and connected.

親個体指定部42は、アドレス情報52をランダムに生成して個体群保持部41へ出力することにより、予め個体群保持部41に保持されている各個体のうちのいずれか複数を親個体として指定する(ステップ150)。なお、アドレス情報52については、ランダム以外に、例えば規則性を持つ順番で指定したり、各個体のマッチング有効性などの評価値に応じた確率で選択してもよい。
交叉・突然変異処理部43は、アドレス情報52により選択された複数の個体51を個体群保持部41から受け取り、これらを親個体に対して交叉や突然変異などの遺伝的アルゴリズムに基づき子個体と呼ばれる新たな個体を発生させ(ステップ151)、その子個体の染色体情報に含まれるパラメータをマッチング候補情報14として出力する(ステップ152)。
The parent individual designating unit 42 generates address information 52 at random and outputs the address information 52 to the individual group holding unit 41, so that any one of the individual held in the individual group holding unit 41 in advance is set as a parent individual. Specify (step 150). In addition to the random information, the address information 52 may be specified in an order having regularity, or may be selected with a probability corresponding to an evaluation value such as matching effectiveness of each individual.
The crossover / mutation processing unit 43 receives a plurality of individuals 51 selected by the address information 52 from the individual group holding unit 41, and determines them as child individuals based on a genetic algorithm such as crossover or mutation with respect to the parent individual. A new individual called is generated (step 151), and parameters included in the chromosome information of the child individual are output as matching candidate information 14 (step 152).

これにより、テンプレート座標計算部5では、マッチング候補出力部4Aからのマッチング候補情報14に含まれる変換パラメータに基づきテンプレートデータ13を変換して、新たなテンプレートデータ15を生成する。
そして、マッチング計算処理部6Aでは、このテンプレートデータ15に基づき前述と同様のマッチング値算出処理を実行してマッチング値を計算し、その計算結果16を対象領域特定部7へ出力する。これにより、対象領域特定部7および対象領域情報抽出部8で前述と同様の処理が行われ、所望の対象領域情報18が得られる。
As a result, the template coordinate calculation unit 5 converts the template data 13 based on the conversion parameters included in the matching candidate information 14 from the matching candidate output unit 4A to generate new template data 15.
Then, the matching calculation processing unit 6A executes matching value calculation processing similar to that described above based on the template data 15, calculates the matching value, and outputs the calculation result 16 to the target region specifying unit 7. As a result, the target region specifying unit 7 and the target region information extracting unit 8 perform the same processing as described above, and desired target region information 18 is obtained.

その後、マッチング計算処理部6Aは、上記のようにして得られたマッチング値19をマッチング候補出力部4Aへフィードバックする。
マッチング候補出力部4Aの個体置換処理部45では、マッチング計算処理部6Aからフィードバックされたマッチング値19に基づき、個体群保持部41に保持されている当該個体を評価し、マッチング値が高くマッチング有効性のある個体への置換を行う。
Thereafter, the matching calculation processing unit 6A feeds back the matching value 19 obtained as described above to the matching candidate output unit 4A.
In the individual replacement processing unit 45 of the matching candidate output unit 4A, the individual held in the individual group holding unit 41 is evaluated based on the matching value 19 fed back from the matching calculation processing unit 6A. Replace with a sex individual.

この際、置換対象選択部44では、個体群保持部41に保持されている各個体51のうち、これら個体を用いた場合に得られるマッチング値が最低のものを置換候補個体54とし選択し、個体置換処理部45へ通知する(ステップ153)。なお、各固体のマッチング値については、予めこれら固体の染色体情報に含まれるパラメータで座標変換して得られたテンプレートデータを用いて、エッジ画像11や所定のサンプルエッジ画像とのマッチング値を求めておいてもよい。
個体置換処理部45は、その置換候補個体54のマッチング値とフィードバックされた子個体のマッチング値19とを比較する(ステップ154)。
At this time, the replacement target selection unit 44 selects, as the replacement candidate individual 54, the one with the lowest matching value obtained when using these individuals among the individuals 51 held in the individual group holding unit 41, The individual replacement processing unit 45 is notified (step 153). As for the matching value of each solid, a matching value with the edge image 11 or a predetermined sample edge image is obtained using template data obtained by performing coordinate conversion with parameters included in the solid chromosome information in advance. It may be left.
The individual replacement processing unit 45 compares the matching value of the replacement candidate individual 54 with the fed-back matching value 19 of the child individual (step 154).

ここで、子個体のマッチング値19が置換候補個体54のマッチング値より高い場合(ステップ155:YES)、その置換候補個体54を当該子個体で置換するよう置換指示55を出力する。これに応じて、個体群保持部41では、置換候補個体54をマッチング有効性の高い当該子個体で置換する(ステップ154)。これにより個体の淘汰が行われ、一連のマッチング候補情報生成処理を終了する。
また、子個体のマッチング値が置換候補個体54のマッチング値より高くない場合(ステップ155:NO)、マッチング有効性の低い子個体の破棄すなわち淘汰が行われ、一連のマッチング候補情報生成処理を終了する。
Here, when the matching value 19 of the child individual is higher than the matching value of the replacement candidate individual 54 (step 155: YES), a replacement instruction 55 is output to replace the replacement candidate individual 54 with the child individual. In response to this, the individual group holding unit 41 replaces the replacement candidate individual 54 with the child individual having high matching effectiveness (step 154). As a result, the individual is trapped, and the series of matching candidate information generation processing ends.
If the matching value of the child individual is not higher than the matching value of the replacement candidate individual 54 (step 155: NO), the child individual with low matching effectiveness is discarded, that is, the trap is performed, and the series of matching candidate information generation processing ends. To do.

通常、入力画像内の抽出画像が、どのような中心位置、回転角、拡大率で変換したテンプレートデータと効率よくマッチングするかは不明であり、マッチングに有効な変換パラメータを早期に見つけることが、抽出処理時間の短縮の重要な課題となる。
本実施の形態では、遺伝的アルゴリズムを用いてマッチング候補情報を生成するようにしたので、膨大な組み合わせが存在する変換パラメータのうちから、アドレス情報52で選択された親個体を手がかりとして、マッチングに有効な個体を進化させて所望の変換パラメータを効率よく見つけることができる。
Normally, it is unclear how the extracted image in the input image matches efficiently with the template data converted by what center position, rotation angle, and magnification, and it is possible to find conversion parameters effective for matching early, This is an important issue for shortening the extraction processing time.
In this embodiment, since the matching candidate information is generated using the genetic algorithm, the matching is performed using the parent individual selected by the address information 52 as a clue from among the conversion parameters having a huge number of combinations. Effective individuals can be evolved to find desired conversion parameters efficiently.

したがって、各変換パラメータを順に変化させて生成したテンプレートデータを用いる場合、さらにはランダムな変換パラメータに基づき生成したテンプレートデータを用いる場合と比較して、所望の抽出画像を見つけるのに必要なテンプレートマッチング処理の回数を大幅に削減でき、抽出処理時間を大幅に短縮できる。
また、個体または親個体のうち、最も低いマッチング値の個体を置換候補として選択し、子個体のマッチング値が置換候補のマッチング値より高い場合には、置換候補に代えて子個体を保持するようにしたので、個体または親個体全体のマッチング値を改善することができ、より高い効率で最適な変換パラメータを見つけることができる。
Therefore, when using template data generated by changing each conversion parameter in turn, compared to using template data generated based on random conversion parameters, template matching necessary to find the desired extracted image The number of processes can be greatly reduced, and the extraction processing time can be greatly shortened.
In addition, the individual with the lowest matching value is selected as the replacement candidate among the individuals or the parent individual, and if the matching value of the child individual is higher than the matching value of the replacement candidate, the child individual is retained instead of the replacement candidate Therefore, the matching value of the individual or the whole parent individual can be improved, and an optimal conversion parameter can be found with higher efficiency.

なお、個体置換処理については上記処理手順に限定されるものではなく、遺伝的アルゴリズムで用いられる他の処理手順を用いてもよい。例えば、染色体情報に、各個体の寿命情報を追加し、その寿命時期の到来に応じて当該個体を消去してもよく、個体群から親個体を選択する際、各個体のマッチング値に応じた確率でマッチング値��高い���体を優先的に選択するようにしてもよい。   Note that the individual replacement process is not limited to the above process procedure, and other process procedures used in the genetic algorithm may be used. For example, the lifetime information of each individual may be added to the chromosome information, and the individual may be deleted according to the arrival of the lifetime, and when selecting a parent individual from the individual group, according to the matching value of each individual Individuals having a high matching value with probability may be preferentially selected.

本発明の第1の実施の形態にかかる対象画像領域抽出装置の構成を示すブロック図である。It is a block diagram which shows the structure of the target image area extraction apparatus concerning the 1st Embodiment of this invention. テンプレートデータ(顔輪郭)の構成例である。It is an example of composition of template data (face outline). テンプレートデータ(顔輪郭)の他の構成例である。It is another example of composition of template data (face outline). テンプレートデータの変換処理を示す説明図である。It is explanatory drawing which shows the conversion process of template data. 本発明の第1の実施の形態にかかるマッチング値算出処理を示すフローチャートである。It is a flowchart which shows the matching value calculation process concerning the 1st Embodiment of this invention. 本発明の第1の実施の形態にかかるテンプレートマッチング処理を示すフローチャートである。It is a flowchart which shows the template matching process concerning the 1st Embodiment of this invention. 本発明の第1の実施の形態にかかる対象画像領域抽出装置による抽出結果(顔領域)である。It is the extraction result (face area) by the target image area extraction device concerning a 1st embodiment of the present invention. 本発明の第1の実施の形態にかかる対象画像領域抽出装置による抽出結果(角領域)である。It is the extraction result (corner area | region) by the target image area extraction apparatus concerning the 1st Embodiment of this invention. 本発明の第2の実施の形態にかかる対象画像領域抽出装置の構成を示すブロック図である。It is a block diagram which shows the structure of the target image area extraction apparatus concerning the 2nd Embodiment of this invention. 本発明の第2の実施の形態にかかるマッチング候補出力部の構成例である。It is a structural example of the matching candidate output part concerning the 2nd Embodiment of this invention. 個体(染色体情報)の構成例である。It is an example of composition of an individual (chromosome information). 本発明の第2の実施の形態にかかるマッチング候補情報生成処理を示すフローチャートである。It is a flowchart which shows the matching candidate information generation process concerning the 2nd Embodiment of this invention. 従来のテンプレートマッチング処理を示す説明図である。It is explanatory drawing which shows the conventional template matching process. 従来のテンプレートデータ(モザイク顔テンプレート)の構成例である。It is an example of composition of conventional template data (mosaic face template). 従来の対象画像領域抽出技術による抽出結果(顔領域)である。It is the extraction result (face area) by the conventional object image area extraction technique. 従来の対象画像領域抽出技術による抽出結果(角領域)である。It is the extraction result (corner area | region) by the conventional object image area | region extraction technique.

符号の説明Explanation of symbols

1…画像入力部、2…画像保持部、3…テンプレートテータ保持部、4,4A…マッチング候補出力部、5…テンプレート座標計算部、6,6A…マッチング計算処理部、7…対象画像位置特定、8…対象領域情報抽出部、10…入力画像、11…エッジ画像、13,15…テンプレートデータ、14…マッチング候補情報、16…計算結果、17…処理領域情報、18…対象領域情報、19…マッチング値、21…ポジティブ点、22,22A,22B…ネガティブ点、41…個体群保持部、42…親個体指定部、43…交叉・突然変異処理部、44…置換対象選択部、45…個体置換処理部、51…個体、52…アドレス情報、54…置換候補個体、55…置換指示、61…x座標、62…y座標、63…回転角θ、64…拡大率M。
DESCRIPTION OF SYMBOLS 1 ... Image input part, 2 ... Image holding part, 3 ... Template data holding part, 4, 4A ... Matching candidate output part, 5 ... Template coordinate calculation part, 6, 6A ... Matching calculation process part, 7 ... Target image position specification , 8 ... Target area information extraction unit, 10 ... Input image, 11 ... Edge image, 13, 15 ... Template data, 14 ... Matching candidate information, 16 ... Calculation result, 17 ... Processing area information, 18 ... Target area information, 19 ... matching value, 21 ... positive point, 22, 22A, 22B ... negative point, 41 ... individual group holding unit, 42 ... parent individual designation unit, 43 ... crossover / mutation processing unit, 44 ... replacement target selection unit, 45 ... Individual replacement processing unit 51... Individual, 52. Address information, 54. Replacement candidate individual, 55. Replacement instruction, 61... X coordinate, 62.

Claims (23)

入力画像のエッジ画像から取得した任意の処理領域における処理領域画像と、対象画像の形状的特徴を示すテンプレートデータとを用いて、前記処理領域画像と前記対象画像との一致性を示すマッチング値を算出し、このマッチング値に基づき前記入力画像における前記対象画像の領域を特定するテンプレートマッチング方法において、
前記テンプレートデータは、前記処理領域のうち前記対象画像のエッジが存在する位置を示すポジティブ点と、前記処理領域のうち前記エッジが存在しない位置を示すネガティブ点とからなり、
前記各ポジティブ点およびネガティブ点と前記処理領域画像内に存在する各エッジとの位置関係に応じて前記マッチング値を算出する第1のステップを備えることを特徴とするテンプレートマッチング方法。
Using a processing area image in an arbitrary processing area acquired from the edge image of the input image and template data indicating the shape characteristics of the target image, a matching value indicating the matching between the processing area image and the target image is obtained. In the template matching method for calculating and specifying the region of the target image in the input image based on the matching value,
The template data consists of a positive point indicating a position where the edge of the target image exists in the processing area and a negative point indicating a position where the edge does not exist in the processing area,
A template matching method comprising: a first step of calculating the matching value according to a positional relationship between each positive point and negative point and each edge existing in the processing region image.
請求項1に記載のテンプレートマッチング方法において、
前記エッジ画像は、前記入力画像に含まれるエッジの画像をそれぞれの階調値で示す複数の画素からなり、
前記第1のステップは、前記各ポジティブ点およびネガティブ点ごとに、これら各点の位置に対応する前記処理領域画像の画素の階調値に基づき評価値をそれぞれ算出する第2のステップと、これらポジティブ点およびネガティブ点の評価値から前記マッチング値を算出する第3のステップとを備えることを特徴とするテンプレートマッチング方法。
The template matching method according to claim 1,
The edge image is composed of a plurality of pixels each representing an edge image included in the input image with gradation values,
The first step includes, for each positive point and negative point, a second step of calculating an evaluation value based on a gradation value of a pixel of the processing region image corresponding to the position of each point, and A template matching method comprising: a third step of calculating the matching value from evaluation values of positive points and negative points.
請求項2に記載のテンプレートマッチング方法において、
前記第2のステップは、前記各ポジティブ点ごとに、前記処理領域画像のうち当該ポジティブ点の位置に対応する画素の階調値を評価値として算出するステップと、前記各ネガティブ点ごとに、前記エッジ画像の階調数から前記処理領域画像のうち当該ネガティブ点の位置に対応する画素の階調値を減算した値を評価値として算出するステップとを有し、
前記第3のステップは、前記第2のステップで算出された各評価値の総和から前記マッチング値を算出するステップを有することを特徴とするテンプレートマッチング方法。
The template matching method according to claim 2, wherein
The second step calculates, for each positive point, a gradation value of a pixel corresponding to the position of the positive point in the processing region image as an evaluation value, and for each negative point, Calculating a value obtained by subtracting the gradation value of the pixel corresponding to the position of the negative point in the processing region image from the number of gradations of the edge image as an evaluation value,
The template matching method, wherein the third step includes a step of calculating the matching value from the sum of the evaluation values calculated in the second step.
請求項1に記載のテンプレートマッチング方法において、
前記第1のステップは、前記テンプレートデータの各ポジティブ点およびネガティブ点の座標変換に用いる複数種のパラメータをマッチング候補情報として生成する第4のステップと、前記マッチング候補情報に基づき前記テンプレートデータの各ポジティブ点およびネガティブ点の座標を変換し、前記マッチング値の算出に用いる新たなテンプレートデータを生成する第5のステップとをさらに備えることを特徴とするテンプレートマッチング方法。
The template matching method according to claim 1,
The first step includes a fourth step of generating a plurality of types of parameters used for coordinate conversion of each positive point and negative point of the template data as matching candidate information, and each of the template data based on the matching candidate information. A template matching method, further comprising: a fifth step of converting the coordinates of the positive point and the negative point and generating new template data used for calculating the matching value.
請求項4に記載のテンプレートマッチング方法において、
前記第4のステップは、前記テンプレートデータの各ポジティブ点およびネガティブ点の座標変換に用いる複数種のパラメータを含む染色体情報を持つ複数の個体を保持するステップと、前記各個体のいずれか複数を親個体として指定するステップと、前記親個体から遺伝的アルゴリズムに基づき子個体を生成するステップと、前記子個体の染色体情報に含まれるパラメータを前記マッチング候補情報として出力するステップとを備えることを特徴とするテンプレートマッチング方法。
The template matching method according to claim 4, wherein
The fourth step includes a step of holding a plurality of individuals having chromosome information including a plurality of types of parameters used for coordinate conversion of each positive point and negative point of the template data; A step of designating as an individual, a step of generating a child individual from the parent individual based on a genetic algorithm, and a step of outputting a parameter included in chromosome information of the child individual as the matching candidate information, Template matching method.
請求項5に記載のテンプレートマッチング方法において、
前記第4のステップは、前記保持されている個体のうち、当該個体のマッチング候補情報に基づき生成された新たなテンプレートデータを用いて得られた前記マッチング値が最も低いものを置換候補として選択するステップと、前記子個体のマッチング候補情報に基づき生成された新たなテンプレートデータを用いて得られた前記マッチング値が、前記置換候補のマッチング値より高い場合は、前記置換候補に代えて前記子個体を新たな個体として保持するステップとをさらに備えることを特徴とするテンプレートマッチング方法。
The template matching method according to claim 5, wherein
In the fourth step, among the held individuals, the one having the lowest matching value obtained using new template data generated based on the matching candidate information of the individual is selected as a replacement candidate. And when the matching value obtained using the new template data generated based on the matching candidate information of the child individual is higher than the matching value of the replacement candidate, the child individual is substituted for the replacement candidate A template matching method, further comprising the step of holding as a new individual.
請求項1に記載のテンプレートマッチング方法において、
前記ネガティブ点は、対象画像のエッジの周囲に存在する当該対象画像の他のエッジに重ならないように配置されることを特徴とするテンプレートマッチング方法。
The template matching method according to claim 1,
The template matching method, wherein the negative points are arranged so as not to overlap other edges of the target image existing around an edge of the target image.
請求項7に記載のテンプレートマッチング方法において、
前記ネガティブ点は、前記対象画像のエッジにより形成される領域の内側に配置されることを特徴とするテンプレートマッチング方法。
The template matching method according to claim 7, wherein
The template matching method, wherein the negative point is arranged inside an area formed by an edge of the target image.
請求項7に記載のテンプレートマッチング方法において、
前記ネガティブ点は、前記対象画像のエッジにより形成される領域の外側に配置されることを特徴とするテンプレートマッチング方法。
The template matching method according to claim 7, wherein
The template matching method, wherein the negative point is arranged outside an area formed by an edge of the target image.
請求項1に記載のテンプレートマッチング方法において、
前記ネガティブ点は、前記ポジティブ点の配置が形成する形状に沿って、この形状の周囲に配置されることを特徴とするテンプレートマッチング方法。
The template matching method according to claim 1,
The template matching method, wherein the negative points are arranged around a shape formed by the arrangement of the positive points.
請求項1に記載のテンプレートマッチング方法において、
前記ポジティブ点は、当該ポジティブ点が配置される領域で前記対象画像のエッジが出現する割合に応じた密度で配置されていることを特徴とするテンプレートマッチング方法。
The template matching method according to claim 1,
The template matching method, wherein the positive points are arranged at a density corresponding to a ratio of appearance of the edge of the target image in an area where the positive points are arranged.
請求項1に記載のテンプレートマッチング方法において、
前記ネガティブ点は、当該ネガティブ点が配置される領域で前記対象画像以外のエッジが出現する割合に応じた密度で配置されていることを特徴とするテンプレートマッチング方法。
The template matching method according to claim 1,
The template matching method, wherein the negative points are arranged at a density corresponding to a ratio of edges other than the target image appearing in an area where the negative points are arranged.
請求項1に記載のテンプレートマッ��ング方法において、
前記対象画像は人物顔画像からなり、前記対象画像のエッジは、人物顔画像の下部輪郭を示すエッジからなることを特徴とするテンプレートマッチング方法。
The template matching method according to claim 1,
The template matching method, wherein the target image is a human face image, and an edge of the target image is an edge indicating a lower contour of the human face image.
請求項1に記載のテンプレートマッチング方法において、
前記テンプレートデータは、人物顔画像の下部輪郭を示すエッジが存在する位置を示すポジティブ点と、前記人物顔画像の下部輪郭を示すエッジが存在しない位置を示すネガティブ点とを有する顔テンプレートデータからなることを特徴とするテンプレートマッチング方法。
The template matching method according to claim 1,
The template data includes face template data having a positive point indicating a position where an edge indicating a lower contour of a human face image is present and a negative point indicating a position where an edge indicating a lower contour of the human face image is not present. A template matching method characterized by that.
請求項14に記載のテンプレートマッチング方法において、
前記人物顔画像の下部輪郭を示すエッジとして半楕円形状を用いることを特徴とするテンプレートマッチング方法。
The template matching method according to claim 14, wherein
A template matching method using a semi-elliptical shape as an edge indicating a lower contour of the human face image.
請求項14に記載のテンプレートマッチング方法において、
前記ポジティブ点は、前記人物顔画像の頬輪郭領域に高い密度で配置され、前記人物顔画像の顎輪郭領域に低い密度で配置されていることを特徴とするテンプレートマッチング方法。
The template matching method according to claim 14, wherein
The template matching method, wherein the positive points are arranged at a high density in a cheek outline region of the person face image and arranged at a low density in a jaw outline region of the person face image.
請求項14に記載のテンプレートマッチング方法において、
前記ネガティブ点は、前記人物顔画像の下部輪郭を示すエッジにより形成される領域の外側領域のうち、前記人物顔画像の頬輪郭領域に高い密度で配置され、前記人物顔画像の顎輪郭領域に低い密度で配置されていることを特徴とするテンプレートマッチング方法。
The template matching method according to claim 14, wherein
The negative points are arranged at a high density in the cheek contour region of the human face image out of the region formed by the edge indicating the lower contour of the human face image, and in the jaw contour region of the human face image. A template matching method characterized by being arranged at a low density.
請求項1〜17のいずれかに記載のテンプレートマッチング方法を用いて、入力画像に含まれる人物顔画像の領域を特定することを特徴とする対象画像領域抽出装置。   18. A target image region extraction device that identifies a region of a human face image included in an input image using the template matching method according to claim 1. 入力画像から物の輪郭を示すエッジ画像を生成する画像入力部と、
前記エッジ画像を記憶保持する画像保持部と、
抽出したい対象画像の形状的特徴を示すテンプレートデータを記憶保持するテンプレートデータ保持部と、
前記テンプレートデータの座標変換に用いる複数種のパラメータをマッチング候補情報として生成するマッチング候補出力部と、
前記テンプレートデータ保持部から読み出したテンプレートデータを前記マッチング候補情報に基づき座標変換し新たなテンプレートデータを生成するテンプレート座標計算部と、
前記画像保持部の前記エッジ画像上に順次設定した処理領域から取り出した処理領域画像と前記テンプレートデータ座標変換部で生成されたテンプレートデータとの一致性を示すマッチング値を算出するマッチング計算処理部と、
前記マッチング計算処理部から得られたマッチング値が所定の基準値を超えた場合、当該マッチング値が得られた処理領域を前記対象画像を含む領域として特定する対象領域特定部と、
前記特定された処理領域の座標位置と前記テンプレートデータとに基づき、前記対象画像領域に関する領域情報を出力する領域情報抽出部とを備え、
前記テンプレートデータは、前記処理領域のうち前記対象画像のエッジが存在する位置を示すポジティブ点と、前記処理領域のうち前記エッジが存在しない位置を示すネガティブ点とからなり、
前記テンプレート座標計算部は、前記各ポジティブ点およびネガティブ点と前記処理領域画像内に存在する各エッジとの位置関係に応じて前記マッチング値を算出することを特徴とする対象画像領域抽出装置。
An image input unit for generating an edge image indicating an outline of an object from the input image;
An image holding unit for storing and holding the edge image;
A template data holding unit for storing and holding template data indicating the shape characteristics of the target image to be extracted;
A matching candidate output unit that generates a plurality of types of parameters used for coordinate conversion of the template data as matching candidate information;
A template coordinate calculation unit that converts the template data read from the template data holding unit based on the matching candidate information to generate new template data; and
A matching calculation processing unit that calculates a matching value indicating a match between the processing region image extracted from the processing region sequentially set on the edge image of the image holding unit and the template data generated by the template data coordinate conversion unit; ,
When the matching value obtained from the matching calculation processing unit exceeds a predetermined reference value, a target region specifying unit that specifies the processing region from which the matching value is obtained as a region including the target image;
An area information extraction unit that outputs area information related to the target image area based on the coordinate position of the identified processing area and the template data;
The template data consists of a positive point indicating a position where the edge of the target image exists in the processing area and a negative point indicating a position where the edge does not exist in the processing area,
The template coordinate calculation unit calculates the matching value according to a positional relationship between each positive point and negative point and each edge existing in the processing region image.
請求項19に記載の対象画像領域抽出装置において、
前記エッジ画像は、前記入力画像に含まれるエッジの画像をそれぞれの階調値で示す複数の画素からなり、
前記テンプレート座標計算部は、前記各ポジティブ点およびネガティブ点ごとに、これら各点の位置に対応する前記処理領域画像の画素の階調値に基づき評価値をそれぞれ算出し、これらポジティブ点およびネガティブ点の評価値から前記マッチング値を算出することを特徴とする対象画像領域抽出装置。
The target image region extraction device according to claim 19,
The edge image is composed of a plurality of pixels each representing an edge image included in the input image with gradation values,
The template coordinate calculation unit calculates an evaluation value for each positive point and negative point based on a gradation value of a pixel of the processing region image corresponding to the position of each point, and the positive point and the negative point. The target image area extracting apparatus, wherein the matching value is calculated from the evaluation value.
請求項20に記載の対象画像領域抽出装置において、
前記テンプレート座標計算部は、前記各ポジティブ点ごとに、前記処理領域画像のうち当該ポジティブ点の位置に対応する画素の階調値を評価値として算出し、前記各ネガティブ点ごとに、前記エッジ画像の階調数から前記処理領域画像のうち当該ネガティブ点の位置に対応する画素の階調値を減算した値を評価値として算出し、
前記各評価値の総和から前記マッチング値を算出することを特徴とする対象画像領域抽出装置。
The target image region extraction device according to claim 20,
The template coordinate calculation unit calculates, as an evaluation value, a gradation value of a pixel corresponding to the position of the positive point in the processing region image for each positive point, and for each negative point, the edge image A value obtained by subtracting the gradation value of the pixel corresponding to the position of the negative point in the processing area image from the number of gradations of
The target image area extracting apparatus, wherein the matching value is calculated from a sum of the evaluation values.
請求項19に記載の対象画像領域抽出装置において、
前記���ッチング候補出力部は、
前記テンプレートデータの各ポジティブ点およびネガティブ点の座標変換に用いる複数種のパラメータを含む染色体情報を持つ複数の個体を記憶保持する個体群保持部と、
前記個体群保持部に保持されている前記各個体のいずれか複数を親個体として指定する親個体指定部と、
前記親個体から遺伝的アルゴリズムに基づき子個体を生成し、この子個体の染色体情報に含まれるパラメータを前記マッチング候補情報として出力する新規個体生成部とを備えることを特徴とする対象画像領域抽出装置。
The target image region extraction device according to claim 19,
The matching candidate output unit
An individual group holding unit for storing and holding a plurality of individuals having chromosome information including a plurality of types of parameters used for coordinate conversion of each positive point and negative point of the template data;
A parent individual designating unit that designates as a parent individual any one of the individuals held in the individual group holding unit;
A target image region extraction apparatus comprising: a new individual generation unit that generates a child individual from the parent individual based on a genetic algorithm and outputs a parameter included in chromosome information of the child individual as the matching candidate information .
請求項22に記載の対象画像領域抽出装置において、
前記マッチング候補出力部は、
前記個体群保持部に保持されている個体のうち、当該個体のマッチング候補情報に基づき生成された新たなテンプレートデータを用いて得られた前記マッチング値が最も低いものを置換候補として選択するステップと、
前記子個体のマッチング候補情報に基づき生成された新たなテンプレートデータを用いて得られた前記マッチング値が、前記置換候補のマッチング値より高い場合は、前記置換候補に代えて前記子個体を新たな個体として保持するステップとをさらに備えることを特徴とする対象画像領域抽出装置。
The target image region extraction device according to claim 22,
The matching candidate output unit
A step of selecting the lowest matching value obtained using new template data generated based on matching candidate information of the individual among the individuals held in the individual group holding unit as a replacement candidate; ,
When the matching value obtained using the new template data generated based on the matching candidate information of the child individual is higher than the matching value of the replacement candidate, the child individual is replaced with the new replacement candidate. A target image area extracting apparatus, further comprising a step of holding the object as an individual.
JP2004004605A 2004-01-09 2004-01-09 Template matching method, and objective image area extracting device Pending JP2005196678A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2004004605A JP2005196678A (en) 2004-01-09 2004-01-09 Template matching method, and objective image area extracting device
US10/970,804 US20050152604A1 (en) 2004-01-09 2004-10-21 Template matching method and target image area extraction apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004004605A JP2005196678A (en) 2004-01-09 2004-01-09 Template matching method, and objective image area extracting device

Publications (2)

Publication Number Publication Date
JP2005196678A true JP2005196678A (en) 2005-07-21
JP2005196678A5 JP2005196678A5 (en) 2006-02-09

Family

ID=34737203

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004004605A Pending JP2005196678A (en) 2004-01-09 2004-01-09 Template matching method, and objective image area extracting device

Country Status (2)

Country Link
US (1) US20050152604A1 (en)
JP (1) JP2005196678A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009043184A (en) * 2007-08-10 2009-02-26 Omron Corp Image processing method and image processing apparatus
JP2009116385A (en) * 2007-11-01 2009-05-28 Sony Corp Information processing apparatus, information processing method, image identification apparatus, image identification method, and program
KR101321227B1 (en) 2011-08-16 2013-10-23 삼성전기주식회사 Apparatus for generating template

Families Citing this family (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070250548A1 (en) * 2006-04-21 2007-10-25 Beckman Coulter, Inc. Systems and methods for displaying a cellular abnormality
DE102009049073A1 (en) * 2009-10-12 2011-04-21 Metaio Gmbh Method for presenting virtual information in a view of a real environment
WO2012001862A1 (en) * 2010-06-29 2012-01-05 株式会社 日立ハイテクノロジーズ Method for creating template for pattern matching, and image processing apparatus
CN101968846B (en) * 2010-07-27 2013-05-15 上海摩比源软件技术有限公司 Face tracking method
CN101964064B (en) * 2010-07-27 2013-06-19 上海摩比源软件技术有限公司 Human face comparison method
JP5706647B2 (en) 2010-09-03 2015-04-22 キヤノン株式会社 Information processing apparatus and processing method thereof
JP5779089B2 (en) * 2011-12-28 2015-09-16 株式会社ドワンゴ Edge detection apparatus, edge detection program, and edge detection method
WO2015068417A1 (en) * 2013-11-11 2015-05-14 日本電気株式会社 Image collation system, image collation method, and program
CN103679159B (en) * 2013-12-31 2017-10-17 海信集团有限公司 Face identification method
CN105868695B (en) * 2016-03-24 2019-04-02 北京握奇数据系统有限公司 A kind of face identification method and system
CN109447061A (en) * 2018-09-29 2019-03-08 南京理工大学 Reactor oil level indicator recognition methods based on crusing robot
CN109977765A (en) * 2019-02-13 2019-07-05 平安科技(深圳)有限公司 Facial image recognition method, device and computer equipment
CN110378376A (en) * 2019-06-12 2019-10-25 西安交通大学 A kind of oil filler object recognition and detection method based on machine vision
CN110751682B (en) * 2019-10-28 2022-07-05 普联技术有限公司 Method, device, terminal equipment and storage medium for extracting and identifying image
CN111738320B (en) * 2020-03-04 2022-12-06 沈阳工业大学 Shielded workpiece identification method based on template matching
CN112085033B (en) * 2020-08-19 2024-04-09 浙江华睿科技股份有限公司 Template matching method, device, electronic device and storage medium
CN112164032B (en) * 2020-09-14 2023-12-29 浙江华睿科技股份有限公司 A dispensing method, device, electronic equipment and storage medium
CN112365539B (en) * 2020-11-11 2022-12-27 中南大学 Method for positioning boundary of metal solution of ingot casting mold
CN112801094B (en) * 2021-02-02 2022-08-30 中国长江三峡集团有限公司 Pointer instrument image inclination correction method
CN114357967B (en) * 2021-11-19 2025-06-13 泰康保险集团股份有限公司 A method and device for parsing bill files
CN116402992A (en) * 2021-12-28 2023-07-07 拓荆键科(海宁)半导体设备有限公司 Image recognition method, device and system for wafer bonding
CN116309442B (en) * 2023-03-13 2023-10-24 北京百度网讯科技有限公司 Method for determining picking information and method for picking target object
CN118379518B (en) * 2024-04-26 2024-12-24 北京美蓝智达科技有限公司 An intelligent skin management system based on image analysis

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59137942A (en) * 1983-01-28 1984-08-08 Hitachi Ltd Picture positioning system
JPS62186381A (en) * 1986-02-12 1987-08-14 Hitachi Ltd Picture alignment system
EP0698990B1 (en) * 1994-08-25 1999-02-17 STMicroelectronics S.r.l. Fuzzy device for image noise reduction
US5754677A (en) * 1994-10-25 1998-05-19 Fuji Machine Mfg. Co., Ltd. Image processing apparatus
TW368640B (en) * 1996-12-25 1999-09-01 Hitachi Ltd Image processor, image processing device and image processing method
WO1998050878A1 (en) * 1997-05-05 1998-11-12 Shell Oil Company Visual recognition method
US6327388B1 (en) * 1998-08-14 2001-12-04 Matsushita Electric Industrial Co., Ltd. Identification of logos from document images
JP4236749B2 (en) * 1999-01-13 2009-03-11 富士機械製造株式会社 Image processing method and apparatus
JP2001209802A (en) * 1999-11-15 2001-08-03 Fuji Photo Film Co Ltd Face extraction method and apparatus, and recording medium
JP4165871B2 (en) * 2002-03-15 2008-10-15 キヤノン株式会社 Position detection method, position detection apparatus, and exposure apparatus
US7327887B2 (en) * 2002-04-10 2008-02-05 National Instruments Corporation Increasing accuracy of discrete curve transform estimates for curve matching
US7120301B2 (en) * 2002-04-10 2006-10-10 National Instruments Corporation Efficient re-sampling of discrete curves

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009043184A (en) * 2007-08-10 2009-02-26 Omron Corp Image processing method and image processing apparatus
JP2009116385A (en) * 2007-11-01 2009-05-28 Sony Corp Information processing apparatus, information processing method, image identification apparatus, image identification method, and program
US8374437B2 (en) 2007-11-01 2013-02-12 Sony Corporation Information processing apparatus, information processing method, image identifying apparatus, image identifying method, and program
KR101321227B1 (en) 2011-08-16 2013-10-23 삼성전기주식회사 Apparatus for generating template

Also Published As

Publication number Publication date
US20050152604A1 (en) 2005-07-14

Similar Documents

Publication Publication Date Title
JP2005196678A (en) Template matching method, and objective image area extracting device
CN108229490A (en) Critical point detection method, neural network training method, device and electronic equipment
JP5505409B2 (en) Feature point generation system, feature point generation method, and feature point generation program
JP6639523B2 (en) Automatic learning image sorting device, automatic learning image sorting method, and automatic learning image sorting program
JP6320649B1 (en) Machine learning device and image recognition device
CN101251897A (en) Image processing device, image processing method, and program
JP2014089626A (en) Image detection device and control program and image detection method
CN113781421B (en) Underwater-based target identification method, device and system
CN112381061A (en) Facial expression recognition method and system
CN104123554B (en) SIFT image characteristic extracting methods based on MMTD
CN110443148A (en) A kind of action identification method, system and storage medium
JP2006006359A (en) Image generator, image generator method, and its program
WO2010043954A1 (en) Method, apparatus and computer program product for providing pattern detection with unknown noise levels
JP2010205067A (en) Device, method and program for extracting area
CN107609562B (en) Scale space feature detection method based on SIFT algorithm
CN115100714A (en) Living body detection method and device based on face image and server
CN119131369B (en) Colon polyp target detection method and system based on improvement YOLOv8
CN111192302A (en) Feature matching method based on motion smoothness and RANSAC algorithm
CN113228105A (en) Image processing method and device and electronic equipment
CN115147613A (en) Infrared small target detection method based on multidirectional fusion
CN114937006A (en) Hammerhead refinement defect detection method based on image enhancement
CN113505784A (en) Automatic nail annotation analysis method and device, electronic equipment and storage medium
JP2006325937A (en) Image determination device, image determination method, and program therefor
JP6202938B2 (en) Image recognition apparatus and image recognition method
CN112818983A (en) Method for judging character inversion by using picture acquaintance

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20051216

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20051216

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090330

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090414

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090710

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090811

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20100202