JP2008225739A - Feature amount measuring method and feature amount measuring apparatus - Google Patents

Feature amount measuring method and feature amount measuring apparatus Download PDF

Info

Publication number
JP2008225739A
JP2008225739A JP2007061615A JP2007061615A JP2008225739A JP 2008225739 A JP2008225739 A JP 2008225739A JP 2007061615 A JP2007061615 A JP 2007061615A JP 2007061615 A JP2007061615 A JP 2007061615A JP 2008225739 A JP2008225739 A JP 2008225739A
Authority
JP
Japan
Prior art keywords
feature
pixel
feature amount
index
feature quantity
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
JP2007061615A
Other languages
Japanese (ja)
Inventor
Tomoko Yonekawa
智子 米川
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2007061615A priority Critical patent/JP2008225739A/en
Publication of JP2008225739A publication Critical patent/JP2008225739A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To solve the problem that a feature amount of obliquely connected pixel components may not be measured conventionally by one image scanning. <P>SOLUTION: A feature amount measuring method uses a feature amount table storing a frequency of merging and a feature amount, and a feature amount pointer table storing an index of the feature amount table, refers to pixels within a window including a target pixels to be measured, and measures while matching the feature amounts of referred pixels and the target pixels in accordance with the presence of pixels to which pointer indexes indicating data locations in the feature amount pointer table within the window are given and the presence of discrepancies of the pointer indexes given to the pixels within the window, other than the target pixels. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、画像処理装置に用いられる二値画像の特徴量計測処理を、一回の走査で計測する特徴量計測方法および特徴量計測装置に関する。   The present invention relates to a feature amount measuring method and a feature amount measuring apparatus for measuring a feature amount measurement process of a binary image used in an image processing apparatus by one scan.

通常、二値画像の特徴量計測処理は、例えば、1を示す画素が上下左右および斜めに接続している連結成分において、同一の連結成分に自然数の名前を付けるラベリングと、各連結成分の面積等の特徴量を計測する特徴量計測に分けられる。連結成分が複雑な形状をしている場合、一回のラスタ走査では同一の連結成分に複数のラベルが付与され、ラベルが同一となるように整合がとれるまで画像を複数回走査する。   Usually, the feature value measurement processing of a binary image is performed by, for example, labeling a natural number for the same connected component in a connected component in which pixels indicating 1 are connected vertically, horizontally, and diagonally, and the area of each connected component It is divided into feature amount measurement for measuring feature amounts such as. When the connected component has a complicated shape, a plurality of labels are given to the same connected component in a single raster scan, and the image is scanned a plurality of times until the labels are matched.

このような課題を解決するために、メモリでポインタ管理をすることにより、一回の走査で特徴量を計測するアルゴリズムが提案されている(例えば、特許文献1参照)。これは2×2の画素を計測しパターンを当てはめ、パターンを基に各ラスタのラベルを3個のメモリを用いてポインタ管理するものである。   In order to solve such a problem, an algorithm for measuring a feature amount by one scan by managing pointers in a memory has been proposed (for example, see Patent Document 1). In this method, 2 × 2 pixels are measured and a pattern is applied, and the label of each raster is pointer-managed using three memories based on the pattern.

特開平5−12444号公報(第3〜5頁、第1〜13図)Japanese Patent Laid-Open No. 5-12444 (pages 3-5, FIGS. 1-13)

しかし上記従来技術においては、斜めに連結した画素成分を計測しないという制限がある。また上記従来技術においては、パターンを適用するために特徴量計測を行う注目画素が0の場合についても、2×2の画素を計測しなければならない。また一般に、ソフトウェアの場合はハードウェアよりも処理速度が遅いため、参照する画素数が多いとメモリへのアクセス数が増え、ソフトウェア処理性能が低下する。   However, the above conventional technique has a limitation that pixel components connected obliquely are not measured. Further, in the above-described prior art, 2 × 2 pixels must be measured even when the target pixel for performing feature amount measurement is 0 in order to apply the pattern. In general, since the processing speed of software is slower than that of hardware, if the number of pixels to be referenced is large, the number of accesses to the memory increases, and the software processing performance deteriorates.

この発明はかかる課題を解決するためになされたもので、画像処理において1回の走査で特徴量を計測するとともに、斜めに連結した画素成分の特徴量も計測可能し、かつ参照する画素数を減らすことでソフトウェアの処理性能を低下させないことを目的とする。   The present invention has been made to solve such a problem. In the image processing, the feature amount is measured by one scanning, the feature amount of the pixel component obliquely connected can be measured, and the number of pixels to be referred to is determined. The purpose is not to decrease the processing performance of the software by reducing it.

本発明に係る特徴量計測方法は、
画像の特徴量を計測する特徴量計測方法において、
前記特徴量と前記特徴量のマージ回数を格納する特徴量テーブルと、
前記特徴量テーブルに格納される特徴量とマージ回数の格納場所を示す特徴量インデックスを格納する特徴量ポインタテーブルと、
を用い、
特徴量計測を行う注目画素を含むウインドウ内の画素を参照し、前記注目画素以外に前記ウインドウ内に前記特徴量ポインタテーブルのデータ格納場所を示すポインタインデックスを付与された画素がない場合は、新規特徴量を作成し前記特徴量テーブルの未使用領域に格納するとともに、前記新規特徴量を指し示す特徴量インデックスを前記特徴量ポインタテーブルに格納する第1の工程と、
前記注目画素を含むウインドウ内の画素を参照し、前記注目画素以外に前記ウインドウ内にポインタインデックスを付与された画素があり、前記ポインタインデックスを付与された画素に矛盾がない場合は、特徴量ポインタテーブルの前記ポインタインデックスに格納された特徴量インデックスが指し示す特徴量をインクリメントする第2の工程と、
前記注目画素を含むウインドウ内の画素を参照し、前記注目画素以外に前記ウインドウ内にポインタインデックスを付与された画素があり、前記ポインタインデックスを付与された画素に矛盾がある場合は、前記特徴量テーブルのうち該当する特徴量のマージ結果である特徴量と修正したマージ回数を格納するとともに、特徴量ポインタテーブルの前記ポインタインデックスに格納された特徴量インデックスのうち、マージされた特徴量インデックスをマージした特徴量インデックスに書き換え、マージ後の特徴量を指し示すようにする第3の工程と、
を有することを特徴とする。
The feature amount measuring method according to the present invention includes:
In the feature quantity measurement method for measuring the feature quantity of an image,
A feature quantity table for storing the feature quantity and the number of merges of the feature quantities;
A feature amount pointer table for storing a feature amount index indicating a storage location of the feature amount and the number of merges stored in the feature amount table;
Use
Refer to the pixel in the window including the target pixel for which the feature amount measurement is performed, and if there is no pixel assigned a pointer index indicating the data storage location of the feature amount pointer table in the window other than the target pixel, new A first step of creating a feature quantity and storing it in an unused area of the feature quantity table, and storing a feature quantity index indicating the new feature quantity in the feature quantity pointer table;
When there is a pixel assigned a pointer index in the window other than the pixel of interest with reference to a pixel in the window including the pixel of interest, and the pixel assigned the pointer index is consistent, a feature amount pointer A second step of incrementing the feature value indicated by the feature value index stored in the pointer index of the table;
If there is a pixel assigned a pointer index in the window other than the pixel of interest with reference to a pixel in the window including the pixel of interest, and there is a contradiction in the pixel assigned the pointer index, the feature amount Stores the feature quantity that is the result of merging the corresponding feature quantity in the table and the corrected number of merges, and merges the merged feature quantity index among the feature quantity indexes stored in the pointer index of the feature quantity pointer table A third step of rewriting to the feature amount index and indicating the feature amount after merging;
It is characterized by having.

本発明のように、注目画素に対して左、左上、上、右上画素を含むウインドウを用いて上記処理を行うことで、注目画素の斜め上の画素との特徴量の整合をとることができるため、斜めに連結した画素成分の特徴量も1回の走査で計測可能となる。   As in the present invention, by performing the above processing using a window including the left, upper left, upper, and upper right pixels with respect to the target pixel, it is possible to match the feature amount with the pixel diagonally above the target pixel. Therefore, it is possible to measure the feature amounts of pixel components that are obliquely connected by one scan.

実施の形態1.
図1は、本発明の実施の形態1における特徴量計測方法のデータ構造および画像走査方向を示す図である。図1(a)は、実施の形態1における入力画像11の特徴量計測に用いるデータ構造を示す図である。入力画像11は0/1の二値画像であり、そのうち斜線がかかった四角枠は1の値を示す画素(以下、1の画素)12とし、それ以外の点線で囲まれた四角枠は0の値を示す画素(以下、0の画素)13とする。
Embodiment 1 FIG.
FIG. 1 is a diagram showing a data structure and an image scanning direction of a feature amount measuring method according to Embodiment 1 of the present invention. FIG. 1A is a diagram illustrating a data structure used for feature quantity measurement of the input image 11 in the first embodiment. The input image 11 is a binary image of 0/1. Among them, a square frame with hatching is a pixel (hereinafter referred to as 1 pixel) 12 indicating a value of 1, and a square frame surrounded by other dotted lines is 0. A pixel (hereinafter referred to as 0 pixel) 13 indicating the value of.

入力画像11は、画像処理を行うにあたり画像データ14として取り込まれる。従って画像処理の初期状態においては、画像データ14と入力画像11は同じである。また画像データ14におけるドットのかかった四角枠は、特徴量計測を行う注目画素15であり、特徴量計測においては、後述する特徴量ポインタテーブル17のポインタインデックスを付与する画素を示している。また注目画素15を含む太枠は、注目画素15の特徴量計測を行う際に着目する領域を示すウインドウ16である。   The input image 11 is captured as image data 14 when image processing is performed. Accordingly, in the initial state of image processing, the image data 14 and the input image 11 are the same. A square frame with dots in the image data 14 is a target pixel 15 for measuring a feature quantity. In the feature quantity measurement, a pixel to which a pointer index of a feature quantity pointer table 17 described later is added is shown. A thick frame including the target pixel 15 is a window 16 indicating a region of interest when the feature amount measurement of the target pixel 15 is performed.

特徴量ポインタテーブル17は、後述する特徴量テーブル18の特徴量インデックスを格納するテーブルである。従って、特徴量ポインタテーブル17に同じ特徴量インデックスが複数格納されている場合、それらは同じ特徴量インデックスを指していることを意味する。なおポインタインデックスとは、特徴量ポインタテーブル17におけるデータ(特徴量インデックス)の格納場所を示すものである。   The feature value pointer table 17 is a table that stores a feature value index of a feature value table 18 described later. Therefore, when a plurality of the same feature amount indexes are stored in the feature amount pointer table 17, it means that they point to the same feature amount index. The pointer index indicates a storage location of data (feature amount index) in the feature amount pointer table 17.

特徴量テーブル18は、計測した特徴量を格納している特徴量格納領域19と、過去に特徴量をマージした回数を格納しているマージ回数格納領域20から成り立つテーブルである。特徴量テーブル18の各要素は、初期状態を含む有効/無効の状態を持つ。特徴量格納領域19、マージ回数格納領域20とも初期状態は「0」である。なお特徴量インデックスとは、特徴量テーブル18におけるデータ(特徴量およびマージ回数)の格納場所を示すものである。   The feature quantity table 18 is a table that includes a feature quantity storage area 19 that stores measured feature quantities and a merge count storage area 20 that stores the number of times feature quantities have been merged in the past. Each element of the feature amount table 18 has a valid / invalid state including an initial state. The initial state of both the feature amount storage area 19 and the merge count storage area 20 is “0”. The feature amount index indicates a storage location of data (feature amount and merge count) in the feature amount table 18.

また図1(b)は、特徴量計測の対象となる画像データ14の走査方向を矢印で示したものである。   FIG. 1B shows the scanning direction of the image data 14 to be subjected to feature quantity measurement with arrows.

図2は、特徴量計測処理のフローチャートを示したものである。また図2記載のフローチャートのうち、後述するステップS16の処理を図3に、後述するステップS18の処理を図4に、後述するステップS19の処理を図5に、後述するステップS19の処理を図6に示す。   FIG. 2 shows a flowchart of the feature amount measurement process. In the flowchart shown in FIG. 2, the process of step S16 described later is shown in FIG. 3, the process of step S18 described later is shown in FIG. 4, the process of step S19 described later is shown in FIG. 5, and the process of step S19 described later is shown. It is shown in FIG.

図2から図6のフローチャートに従い、特徴量計測の具体的な処理内容を説明する。また具体的な処理内容については、図2から図6のフローチャートとともに、図7から図10を適宜参照しつつ説明する。なお本発明の実施の形態にて取り上げる特徴量は面積、つまり1の画素12の数とし、特徴量のマージ処理は、2つの面積を加算する処理を指す。また、マージ処理で特徴量テーブル18の格納領域を無効にする場合、特徴量である面積の値を0とすることによって無効にする。   The specific processing content of the feature amount measurement will be described with reference to the flowcharts of FIGS. Specific processing contents will be described with reference to FIGS. 7 to 10 as appropriate together with the flowcharts of FIGS. Note that the feature value taken up in the embodiment of the present invention is an area, that is, the number of one pixel 12, and the feature value merge process indicates a process of adding two areas. Further, when invalidating the storage area of the feature quantity table 18 in the merge processing, the area value as the feature quantity is invalidated by setting it to 0.

図2のステップS11では、特徴量計測を行う画像データ14として二値画像である入力画像11を入力する。従って、画像データ14の初期状態は入力画像11と同一であり、特徴量ポインタテーブル17と特徴量テーブル18の初期データは「0」にする。   In step S11 of FIG. 2, the input image 11 which is a binary image is input as the image data 14 for measuring the feature amount. Therefore, the initial state of the image data 14 is the same as that of the input image 11, and the initial data of the feature amount pointer table 17 and the feature amount table 18 is set to “0”.

ステップS12で入力画像11の走査のループ処理を開始し、図2のフローチャートに従って特徴量計測を実施する。このループ処理は、入力画像11の走査を画素に対して繰り返し、走査終了をもってループ処理を終了する。   In step S12, a scanning loop process of the input image 11 is started, and feature quantity measurement is performed according to the flowchart of FIG. In this loop processing, the scanning of the input image 11 is repeated for the pixels, and the loop processing is terminated when the scanning is completed.

ステップS13では、注目画素15が1の画素12であるか、0の画素13であるか判定する。図7はステップS13、ステップS15、ステップS16の一連の処理を示した図である。図7(a)は、注目画素15までに走査を行った走査方向を示す図である。図7(a)では、走査方向を矢印で示している。図7(a)に示された画像データ14では、注目画素15までは0の画素13が続くため、ステップS13ではNOが選択されステップS14へ飛び、入力画像走査のループを繰り返す。   In step S <b> 13, it is determined whether the target pixel 15 is the 1 pixel 12 or the 0 pixel 13. FIG. 7 is a diagram showing a series of processes of step S13, step S15, and step S16. FIG. 7A is a diagram illustrating a scanning direction in which scanning has been performed up to the target pixel 15. In FIG. 7A, the scanning direction is indicated by an arrow. In the image data 14 shown in FIG. 7A, since the pixel 13 of 0 continues to the target pixel 15, NO is selected in step S13, and the process jumps to step S14 to repeat the input image scanning loop.

また図7(a)に示したように注目画素15に対して、注目画素15以外の画素を参照する順序は、例えば、実施の形態1においては、A、B、C,Dの順番とする。ただし、注目画素15以外の画素全てを参照するため、参照する順序はこれに限るものではない。   As shown in FIG. 7A, the order of referring to the pixels other than the target pixel 15 with respect to the target pixel 15 is, for example, the order of A, B, C, and D in the first embodiment. . However, since all the pixels other than the target pixel 15 are referred to, the reference order is not limited to this.

図7(b)は、走査処理において最初に検出する1の画素12を示す図である。特徴量計測では、まずこの1の画素12を注目画素15として計測を行う。この注目画素15は1の画素12であるため、ステップS13はYESとなる。   FIG. 7B is a diagram showing one pixel 12 detected first in the scanning process. In the feature amount measurement, measurement is first performed with the one pixel 12 as the target pixel 15. Since the target pixel 15 is one pixel 12, step S13 is YES.

ステップS15では、注目画素15以外にウインドウ16内で0より大きい値が存在するか否かの判定を行う。図7(b)では、注目画素15を除くウインドウ16内の全ての画素が0の画素13であるため、ステップS15ではNOとなり、ステップS16へ進む。   In step S15, it is determined whether there is a value greater than 0 in the window 16 other than the target pixel 15. In FIG. 7B, since all the pixels in the window 16 excluding the target pixel 15 are 0 pixels 13, NO is determined in step S15, and the process proceeds to step S16.

ステップS16では、新規特徴量の作成、および注目画素の更新を行う。ステップS16の処理内容を詳述したのが、図3である。ステップS16の処理は、図3に示すようにステップS31とステップS32より構成される。   In step S16, a new feature amount is created and the target pixel is updated. FIG. 3 shows details of the processing in step S16. The process of step S16 is comprised from step S31 and step S32 as shown in FIG.

ステップS31では、特徴量テーブル18および特徴量ポインタテーブル17の未使用領域を確保し、確保した特徴量テーブル18の特徴量インデックスを、確保した特徴量ポインタテーブル17に格納する。新規に確保した特徴量ポインタテーブル17は、ステップS32で作成する新規特徴量を指すよう設定される。図7(b)では、ここまでの処理を示している。   In step S31, unused areas of the feature quantity table 18 and the feature quantity pointer table 17 are secured, and the feature quantity index of the secured feature quantity table 18 is stored in the secured feature quantity pointer table 17. The newly secured feature value pointer table 17 is set to indicate the new feature value created in step S32. FIG. 7B shows the processing so far.

ステップS32では、確保した特徴量テーブル18の領域に新規特徴量を作成し、格納する。具体的には、特徴量テーブル18の特徴量格納領域19に、面積として「1」を格納する。また、格納された特徴量格納領域19に対応するマージ回数格納領域20は「0」にする(新規特徴量を格納した領域は一度もマージされていないため)。また画像データ14の注目画素15に付与するポインタインデックスは、確保した特徴量ポインタテーブル17のポインタインデックス(図7の場合、m)とする。そしてステップS16へ戻る。上記処理の結果を示したのが、図7(c)である。図2のステップS16へ戻ったらステップS14に進み、特徴量計測のループ処理を繰り返す。   In step S32, a new feature quantity is created and stored in the area of the secured feature quantity table 18. Specifically, “1” is stored as the area in the feature amount storage area 19 of the feature amount table 18. The merge count storage area 20 corresponding to the stored feature quantity storage area 19 is set to “0” (since the area storing the new feature quantity has never been merged). The pointer index assigned to the target pixel 15 of the image data 14 is the pointer index of the secured feature amount pointer table 17 (m in FIG. 7). Then, the process returns to step S16. The result of the above processing is shown in FIG. When the process returns to step S16 in FIG. 2, the process proceeds to step S14, and the loop process for feature quantity measurement is repeated.

図8は、図7(c)の後に特徴量計測のループ処理を続けた図であり、図2のステップS13、ステップS15、ステップS17、ステップS18の一連の処理を示した図である。   FIG. 8 is a diagram in which the loop processing for feature quantity measurement is continued after FIG. 7C, and is a diagram showing a series of processing of step S13, step S15, step S17, and step S18 of FIG.

図8(a)では、注目画素15までに走査を行った走査方向を矢印で示している。図8(a)に示した走査方向では、図7(c)の後に0の画素13によるループ処理を行う。その後、1の画素12があったため、図7で示した処理と同様の処理を行い、この1の画素12を新規特徴量とするため、特徴量ポインタテーブル17のポインタインデックス(m+1)に、特徴量インデックスの未使用領域を指し示す(n+1)を格納する。   In FIG. 8A, the scanning direction in which scanning has been performed up to the target pixel 15 is indicated by an arrow. In the scanning direction shown in FIG. 8A, a loop process with the pixel 13 of 0 is performed after FIG. 7C. Thereafter, since there is one pixel 12, the same processing as that shown in FIG. 7 is performed, and in order to make this one pixel 12 a new feature amount, a feature index is added to the pointer index (m + 1) of the feature amount pointer table 17. (N + 1) indicating the unused area of the quantity index is stored.

また特徴量テーブル18において、特徴量インデックス(n+1)の特徴量格納領域19に特徴量である面積「1」を格納する。またマージ回数は0回であるため、特徴量インデックス(n+1)のマージ回数格納領域20には「0」を格納する。また対応する画素は、確保した特徴量ポインタテーブル17のポインタインデックスである(m+1)を付与する。その後、図8(a)に従い走査を繰り返し、次の注目画素の処理を行う状態が図8(b)である。   In the feature quantity table 18, the area “1” as the feature quantity is stored in the feature quantity storage area 19 of the feature quantity index (n + 1). Since the number of merges is 0, “0” is stored in the merge number storage area 20 of the feature index (n + 1). The corresponding pixel is assigned (m + 1) which is the pointer index of the secured feature value pointer table 17. Thereafter, the scanning is repeated according to FIG. 8A, and the state of processing the next target pixel is FIG. 8B.

図8(b)における注目画素15について考える。ステップS13では、注目画素15が1の画素12であるのでYESと判定し、ステップS15に進む。ステップS15では、注目画素15の上に、ポインタインデックスがmとされた1の画素12があるためYESと判定し、ステップS17へ進む。   Consider the pixel of interest 15 in FIG. In step S13, since the target pixel 15 is the one pixel 12, it determines with YES and progresses to step S15. In step S15, since there is one pixel 12 whose pointer index is m above the target pixel 15, it is determined YES, and the process proceeds to step S17.

ステップS17では、ウインドウ16内のポインタインデックスに矛盾があるか否かの判定を行う。例えば図8の場合、注目画素15を除いたウインドウ16内には、ポインタインデックスmの画素以外は全て0の画素13であるため、矛盾はない(NO)と判定してステップS18へ進む。   In step S17, it is determined whether or not there is a contradiction in the pointer index in the window 16. For example, in the case of FIG. 8, in the window 16 excluding the target pixel 15, all the pixels 13 other than the pixel of the pointer index m are 0 pixels 13, so it is determined that there is no contradiction (NO) and the process proceeds to step S 18.

ここで、ウインドウ16内の1の画素12は全て同一の連結成分でなくてはならないため、ウインドウ16内の1の画素12に付与されているポインタインデックスに格納されている特徴量インデックスは同一の特徴量を指し示していなくてはならない。   Here, since one pixel 12 in the window 16 must be the same connected component, the feature index stored in the pointer index assigned to the one pixel 12 in the window 16 is the same. Must point to the feature quantity.

従って、「ポインタインデックスに矛盾がある」とは、注目画素15を除くウインドウ16内の画素において、付与されたポインタインデックスに格納される特徴量インデックスが異なることをいう。反対に、「ポインタインデックスに矛盾がない」とは、注目画素15を除くウインドウ16内の画素において、付与されたポインタインデックスに格納される特徴量インデックスが同一であることをいう。また本明細書で「特徴量の整合をとる」とは、上記矛盾が生じている状態を矛盾のない状態にすることをいう。   Therefore, “the pointer index is inconsistent” means that the feature amount index stored in the assigned pointer index is different in the pixels in the window 16 excluding the target pixel 15. On the other hand, “the pointer index is consistent” means that the feature amount index stored in the assigned pointer index is the same in the pixels in the window 16 excluding the target pixel 15. Also, in this specification, “matching feature amounts” means making the state in which the contradiction occurs without any contradiction.

ステップS18では、特徴量および注目画素の更新を行う。ステップS18の処理内容を詳述したのが、図4である。ステップS18の処理は、図4に示すようにステップS41より構成される。   In step S18, the feature amount and the target pixel are updated. FIG. 4 shows details of the processing in step S18. The process in step S18 includes step S41 as shown in FIG.

ステップS41では、まず特徴量を更新する。図8(b)の場合では、参照順序Bの上画素のポインタインデックスがmであるため、特徴量ポインタテーブル17のポインタインデックスmに格納されている特徴量インデックスnが指している特徴量、つまり特徴量テーブル18の特徴量インデックスnに対して、注目画素15の特徴量(面積)をインクリメントする。従って、特徴量テーブル18の特徴量インデックスnにおける特徴量格納領域19は、「1」+「1」=「2」となる。   In step S41, the feature amount is first updated. In the case of FIG. 8B, since the pointer index of the upper pixel in the reference order B is m, the feature quantity pointed to by the feature quantity index n stored in the pointer index m of the feature quantity pointer table 17, that is, The feature amount (area) of the target pixel 15 is incremented with respect to the feature amount index n of the feature amount table 18. Therefore, the feature quantity storage area 19 in the feature quantity index n of the feature quantity table 18 is “1” + “1” = “2”.

またステップS41において、注目画素15のポインタインデックスは、関連付ける画素のポインタインデックスとする。つまり、上画素のポインタインデックスmを、注目画素15のポインタインデックスとする。そしてステップS18へ戻る。上記処理の結果を示したのが、図8(c)である。図2のステップS18に戻ったらステップS14へ進み、特徴量計測のループ処理を繰り返す。   In step S41, the pointer index of the target pixel 15 is the pointer index of the associated pixel. That is, the pointer index m of the upper pixel is set as the pointer index of the target pixel 15. Then, the process returns to step S18. The result of the above processing is shown in FIG. When the process returns to step S18 in FIG. 2, the process proceeds to step S14, and the loop process for feature quantity measurement is repeated.

図9は、図8(c)の後に特徴量計測のループ処理を続けた図であり、図2のステップS13、ステップS15、ステップS17、ステップS19の一連の処理を示した図である。   FIG. 9 is a diagram in which the loop process for feature quantity measurement is continued after FIG. 8C, and is a diagram showing a series of processes of step S13, step S15, step S17, and step S19 in FIG.

図9(a)では、注目画素15までに走査を行った走査方向を矢印で示している。図9(a)における注目画素15について考える。ステップS13では、注目画素15が1の画素12であるのでYESと判定し、ステップS15に進む。   In FIG. 9A, the scanning direction in which scanning has been performed up to the target pixel 15 is indicated by an arrow. Consider the pixel of interest 15 in FIG. In step S13, since the target pixel 15 is the one pixel 12, it determines with YES and progresses to step S15.

ステップS15では、注目画素15の左上および左にポインタインデックスmとされた1の画素12が、右上にポインタインデックス(m+1)とされた1の画素12があるため、0より大きい値が存在する(YES)と判定し、ステップS17へ進む。   In step S15, since one pixel 12 having the pointer index m is located on the upper left and left of the target pixel 15 and one pixel 12 having the pointer index (m + 1) is present on the upper right, there is a value greater than 0 ( YES), the process proceeds to step S17.

ステップS17では、ウインドウ16内のポインタインデックスに矛盾があるか否かの判定を行う。例えば、注目画素15を除いたウインドウ16内において、注目画素15の左上および左画素のポインタインデックスはmであり、注目画素15の右上画素のポインタインデックスは(m+1)であるため、矛盾がある(YES)と判定し、ステップS19へ進む。   In step S17, it is determined whether or not there is a contradiction in the pointer index in the window 16. For example, in the window 16 excluding the target pixel 15, the pointer index of the upper left and left pixels of the target pixel 15 is m, and the pointer index of the upper right pixel of the target pixel 15 is (m + 1), so there is a contradiction ( YES), the process proceeds to step S19.

ステップS19では、特徴量マージ処理および特徴量ポインタテーブル17の整合処理を行う。ステップS19の処理内容を詳述したのが、図5と図6である。このうち、図5は特徴量マージ処理に関する処理を示し、図6は特徴量ポインタテーブル17の整合処理に関する処理を示している。   In step S19, feature amount merge processing and feature amount pointer table 17 matching processing are performed. FIG. 5 and FIG. 6 detail the processing contents of step S19. Among these, FIG. 5 shows processing related to the feature amount merge processing, and FIG. 6 shows processing related to the matching processing of the feature amount pointer table 17.

特徴量マージ処理は、図5に示すようにステップS51とステップS52より構成される。また特徴量ポインタテーブル17の整合処理は、図6に示すようにステップS61からステップS67より構成される。なお、特徴量マージ処理と特徴量ポインタテーブル17の整合処理の順序はどちらを先に行っても良いが、本実施の形態においては、特徴量マージ処理を先に行う例を示す。   The feature amount merging process includes step S51 and step S52 as shown in FIG. The matching process of the feature amount pointer table 17 includes steps S61 to S67 as shown in FIG. It should be noted that either the feature amount merging process or the matching process of the feature amount pointer table 17 may be performed first, but the present embodiment shows an example in which the feature amount merging process is performed first.

図5のうち、ステップS51では、注目画素15の特徴量を加えた上で特徴量をマージする。ステップS51では、注目画素15に対して、特徴量ポインタテーブル17のポインタインデックスmに格納されている特徴量インデックスnが指している特徴量、つまり特徴量テーブル18の特徴量インデックスnに、注目画素15の特徴量(面積)をインクリメントする。従って、特徴量テーブル18の特徴量インデックスnにおける特徴量格納領域19は、「2」+「1」=「3」となる。   In FIG. 5, in step S51, the feature amount of the target pixel 15 is added and the feature amount is merged. In step S51, the target pixel 15 is compared with the feature amount pointed to by the feature amount index n stored in the pointer index m of the feature amount pointer table 17, that is, the feature amount index n of the feature amount table 18. The feature amount (area) of 15 is incremented. Accordingly, the feature quantity storage area 19 in the feature quantity index n of the feature quantity table 18 is “2” + “1” = “3”.

なお、ウインドウ16内に含まれる注目画素15以外の画素には、ポインタインデックスがmと(m+1)の2種類がある。そのうち、図7(a)で示したAからDの順序で注目画素15以外の画素を参照すると、図9(b)においては、注目画素15の左上の画素(ポインタインデックスm)の参照を先に行う(参照順序A)。従って、注目画素15に付与されるポインタインデックスは参照順序が先のmとし、上記のように特徴量をインクリメントする。   Note that there are two types of pointer indexes m and (m + 1) for pixels other than the target pixel 15 included in the window 16. Among these, referring to the pixels other than the target pixel 15 in the order of A to D shown in FIG. 7A, in FIG. 9B, the reference to the upper left pixel (pointer index m) of the target pixel 15 is first performed. (Reference order A). Accordingly, the pointer index assigned to the target pixel 15 is m in the reference order, and the feature amount is incremented as described above.

またステップS51において、注目画素15のポインタインデックスは、関連付ける画素のポインタインデックスとする。つまり注目画素15のポインタインデックスは、上記のとおりmとする。これまでの一連の処理を示したのが図9(b)である。   In step S51, the pointer index of the target pixel 15 is the pointer index of the associated pixel. That is, the pointer index of the target pixel 15 is m as described above. FIG. 9B shows a series of processes so far.

またステップS51において、ポインタインデックスが矛盾している特徴量をマージする。具体的には、特徴量テーブル18の特徴量インデックスnに格納されている特徴量「3」と、特徴量テーブル18の特徴量インデックス(n+1)に格納されている特徴量「1」をマージして、「3」+「1」=「4」をマージ結果として特徴量テーブル18の特徴量インデックスnに格納する。   In step S51, feature quantities having inconsistent pointer indexes are merged. Specifically, the feature quantity “3” stored in the feature quantity index n of the feature quantity table 18 and the feature quantity “1” stored in the feature quantity index (n + 1) of the feature quantity table 18 are merged. Then, “3” + “1” = “4” is stored in the feature amount index n of the feature amount table 18 as a merge result.

なお図9の場合は、特徴量をマージする時に特徴量インデックスnの方にマージさせたが、特徴量インデックス(n+1)の方にマージさせてもよい。   In the case of FIG. 9, the feature amount is merged toward the feature amount index n when merging the feature amounts, but may be merged toward the feature amount index (n + 1).

次にステップS52では、空にした特徴量の領域を無効にする。図9の例では、特徴量のマージに伴い、特徴量テーブル18の特徴量インデックス(n+1)において特徴量格納領域19が空となったため、特徴量テーブル18の特徴量インデックス(n+1)を無効にする。ステップS52の処理を終えたら、ステップS19へ戻る。   In step S52, the emptied feature amount area is invalidated. In the example of FIG. 9, the feature quantity storage area 19 becomes empty in the feature quantity index (n + 1) of the feature quantity table 18 as the feature quantities are merged, so the feature quantity index (n + 1) of the feature quantity table 18 is invalidated. To do. When the process of step S52 is completed, the process returns to step S19.

次に特徴量ポインタテーブル17の整合処理を行う。特徴量ポインタテーブル17の整合処理では、図6に記載されているように、まずステップS61において、ウインドウ16内の画素について、無効にする特徴量を指している特徴量ポインタテーブル17の値をマージ後の特徴量を指すように書き換える。   Next, matching processing of the feature amount pointer table 17 is performed. In the matching processing of the feature value pointer table 17, as described in FIG. 6, first, in step S61, the values in the feature value pointer table 17 indicating the feature values to be invalidated are merged for the pixels in the window 16. Rewrite to point to the feature value later.

例えば図9の例だと、無効にするのは特徴量インデックス(n+1)である。これを格納している特徴量ポインタテーブル17のポインタインデックスは(m+1)であり、このポインタインデックス(m+1)に対応する画素は、注目画素15の右上の画素である。特徴量テーブル18の特徴量インデックス(n+1)は無効となるため、特徴量ポインタテーブル17のポインタインデックス(m+1)に格納されている値(n+1)をnに書き換え、特徴量テーブル18の特徴量インデックスnを指し示すようにする。   For example, in the example of FIG. 9, the feature quantity index (n + 1) is invalidated. The pointer index of the feature value pointer table 17 storing this is (m + 1), and the pixel corresponding to this pointer index (m + 1) is the upper right pixel of the target pixel 15. Since the feature quantity index (n + 1) in the feature quantity table 18 becomes invalid, the value (n + 1) stored in the pointer index (m + 1) in the feature quantity pointer table 17 is rewritten to n, and the feature quantity index in the feature quantity table 18 Point to n.

無効になった特徴量テーブル18の特徴量インデックス(n+1)は、過去に特徴量をマージしたことがないため、ウインドウ16外の特徴量ポインタテーブルの整合に関するループ、つまりステップS62からステップS65は実施せず、ステップS66に進む(ステップS62からステップS65に関する処理は後述する)。   Since the feature quantity index (n + 1) of the invalid feature quantity table 18 has never merged the feature quantities in the past, the loop relating to the matching of the feature quantity pointer table outside the window 16, that is, steps S62 to S65 are executed. Otherwise, the process proceeds to step S66 (the processing related to step S65 from step S62 will be described later).

ステップS66では、特徴量テーブル18のマージ回数を加算し、マージ回数を特徴量テーブル18のマージ回数格納領域20に格納する。図9の例では、特徴量テーブル18の特徴量インデックスnのマージ回数格納領域20には初期値「0」に今回のマージ処理分の「1」を加え、「0」+「1」=「1」が入る。   In step S66, the number of merges in the feature value table 18 is added, and the merge number is stored in the merge number storage area 20 of the feature value table 18. In the example of FIG. 9, “1” corresponding to the current merge process is added to the initial value “0” in the merge count storage area 20 of the feature value index n in the feature value table 18, and “0” + “1” = “ 1 ”is entered.

ステップS67では、無効になった特徴量テーブル18のマージ回数を0にする。図9の例では、特徴量テーブル18の特徴量インデックス(n+1)が無効となったので、特徴量インデックス(n+1)のマージ回数格納領域20に「0」を格納する。上記処理の結果を示したのが、図9(c)である。図2のステップS19に戻ったらステップS14へ進み、特徴量計測のループ処理を繰り返す。   In step S67, the number of merges of the invalid feature quantity table 18 is set to zero. In the example of FIG. 9, since the feature value index (n + 1) in the feature value table 18 becomes invalid, “0” is stored in the merge count storage area 20 of the feature value index (n + 1). The result of the above processing is shown in FIG. When the process returns to step S19 in FIG. 2, the process proceeds to step S14, and the loop process for feature quantity measurement is repeated.

図10は、図9(c)の後に特徴量計測のループ処理を続けた図であり、図2のステップS13、ステップS15、ステップS17、ステップS19の一連の処理を示した図である。   FIG. 10 is a diagram in which the loop process for feature quantity measurement is continued after FIG. 9C, and is a diagram showing a series of processes of step S13, step S15, step S17, and step S19 in FIG.

図10(a)では、注目画素15までに走査を行った走査方向を矢印で示しており、図9(c)の後の、特徴量計測のループを続けた図を示す。図9(c)から図10(a)に至るまでにおいて、ポインタインデックス(m+2)を示している1の画素12は、ウインドウ16内に1の画素12がないため新規特徴量としてインデックス(m+2)を付与されたものである。   In FIG. 10A, the scanning direction in which scanning has been performed up to the pixel of interest 15 is indicated by an arrow, and a diagram in which the feature amount measurement loop is continued after FIG. 9C is shown. In FIG. 9C to FIG. 10A, the one pixel 12 indicating the pointer index (m + 2) is not included in the window 16, and therefore the index (m + 2) is a new feature amount. Is given.

またそれ以降の1の画素12にはインデックスmが付与されている。これは、図7(a)に示した参照順序に従い、対応する画素に対して右上、上、左上、左上の画素にポインタインデックスmが付与された画素があるからである。   Further, an index m is assigned to the subsequent one pixel 12. This is because, according to the reference order shown in FIG. 7A, there are pixels in which the pointer index m is assigned to the upper right, upper, upper left, and upper left pixels for the corresponding pixels.

図10(b)において、特徴量ポインタテーブル17のポインタインデックスmは、特徴量インデックスnを指し示すため、nが格納されている。また特徴量ポインタテーブル17のポインタインデックス(m+1)には、マージ後の特徴量インデックスnを指し示すため、nが格納されている。また特徴量ポインタテーブル17のポインタインデックス(m+2)には、新規特徴量が格納されている特徴量インデックス(n+2)を指し示すため、(n+2)が格納されている。   In FIG. 10B, since the pointer index m of the feature amount pointer table 17 indicates the feature amount index n, n is stored. The pointer index (m + 1) of the feature value pointer table 17 stores n in order to indicate the feature value index n after merging. The pointer index (m + 2) of the feature quantity pointer table 17 stores (n + 2) to indicate the feature quantity index (n + 2) in which the new feature quantity is stored.

また特徴量テーブル18の特徴量格納領域19において、特徴量インデックスnには、特徴量インデックスn(面積は「7」)と特徴量インデックス(n+1)の特徴量(面積は「1」)をマージした「8」が格納されている。また特徴量テーブル18の特徴量格納領域19において、特徴量インデックス(n+1)は無効となっているため、「0」が格納されている。また特徴量テーブル18の特徴量格納領域19において、特徴量インデックス(n+2)には、新規特徴量である「1」が格納されている。   Further, in the feature quantity storage area 19 of the feature quantity table 18, the feature quantity index n is merged with the feature quantity index n (area “7”) and the feature quantity (n + 1) feature quantity (area is “1”). “8” is stored. In the feature quantity storage area 19 of the feature quantity table 18, the feature quantity index (n + 1) is invalid, and therefore “0” is stored. In the feature quantity storage area 19 of the feature quantity table 18, “1” which is a new feature quantity is stored in the feature quantity index (n + 2).

また特徴量テーブル18のマージ回数格納領域20において、特徴量インデックスnにはマージ回数「1」が、特徴量インデックス(n+1)は無効としたため「0」が、特徴量インデックス(n+2)はマージしていないためマージ回数「0」が格納されている。   In the merge count storage area 20 of the feature quantity table 18, since the merge quantity “1” is invalidated for the feature quantity index n and the feature quantity index (n + 1) is invalid, “0” is merged for the feature quantity index (n + 2). The merge count “0” is stored.

図10(b)における注目画素15について考える。ステップS13では、注目画素15が1の画素12であるのでYESと判定し、ステップS15に進む。   Consider the pixel of interest 15 in FIG. In step S13, since the target pixel 15 is the one pixel 12, it determines with YES and progresses to step S15.

ステップS15では、注目画素15の左に、ポインタインデックスmとされた1の画素12が、右上にポインタインデックス(m+2)とされた1の画素12があるため、0より大きい値が存在する(YES)と判定し、ステップS17へ進む。   In step S15, since one pixel 12 with the pointer index m is on the left of the target pixel 15 and one pixel 12 with the pointer index (m + 2) is on the upper right, a value greater than 0 exists (YES) ) And the process proceeds to step S17.

ステップS17では、ウインドウ16内の特徴量に矛盾があるか否かの判定を行う。例えば図10では、注目画素15を除いたウインドウ16内において、注目画素15の左のポインタインデックスはmであり、注目画素15の右上のポインタインデックスは(m+2)であり、異なる特徴量インデックスを格納しているため、矛盾がある(YES)と判定し、ステップS19へ進む。   In step S17, it is determined whether or not there is a contradiction in the feature amount in the window 16. For example, in FIG. 10, in the window 16 excluding the target pixel 15, the left pointer index of the target pixel 15 is m, and the upper right pointer index of the target pixel 15 is (m + 2), and different feature amount indexes are stored. Therefore, it is determined that there is a contradiction (YES), and the process proceeds to step S19.

ステップS19では、前述のように特徴量マージ処理および特徴量ポインタテーブル17の整合処理を行う。   In step S19, the feature amount merge processing and the feature amount pointer table 17 matching processing are performed as described above.

図5に示された特徴量マージ処理において、ステップS51では、注目画素15の特徴量を加えた上で特徴量をマージする。ステップS51において、注目画素15には、特徴量ポインタテーブル17のポインタインデックス(m+2)に格納されている特徴量インデックス(n+2)が指している特徴量、つまり特徴量テーブル18の特徴量インデックス(n+2)に、注目画素15の特徴量(面積)をインクリメントする。従って、特徴量テーブル18の特徴量インデックス(n+2)における特徴量格納領域19は、「1」+「1」=「2」となる。   In the feature amount merging process shown in FIG. 5, in step S51, the feature amount is merged after adding the feature amount of the target pixel 15. In step S51, the target pixel 15 has the feature point indicated by the feature amount index (n + 2) stored in the pointer index (m + 2) of the feature amount pointer table 17, that is, the feature amount index (n + 2) of the feature amount table 18. ), The feature amount (area) of the target pixel 15 is incremented. Therefore, the feature quantity storage area 19 in the feature quantity index (n + 2) of the feature quantity table 18 is “1” + “1” = “2”.

なお、ウインドウ16内に含まれる注目画素15以外の画素には、ポインタインデックスがmと(m+2)の2種類がある。そのうち、図7(a)で示したAからDの順序で注目画素15以外の画素を参照すると、図10(b)においては、注目画素15の左上、上にはポインタインデックスが付与された画素がなく、右上にポインタインデックス(m+2)が付与された画素がある。この画素は、ポインタインデックスmが付与された左の画素より先に参照される。従って、注目画素15に付与されるポインタインデックスは(m+2)となる。   In addition, there are two types of pointer indexes m and (m + 2) for pixels other than the target pixel 15 included in the window 16. Among them, referring to pixels other than the target pixel 15 in the order of A to D shown in FIG. 7A, in FIG. 10B, pixels to which a pointer index is assigned at the upper left and above the target pixel 15 There is a pixel with a pointer index (m + 2) on the upper right. This pixel is referenced before the left pixel to which the pointer index m is assigned. Therefore, the pointer index assigned to the target pixel 15 is (m + 2).

またステップS51において、注目画素15のポインタインデックスは、関連付ける画素のポインタインデックスとする。つまり注目画素15のポインタインデックスは、上記のとおり(m+2)とする。これまでの一連の処理を示したのが図10(b)である。   In step S51, the pointer index of the target pixel 15 is the pointer index of the associated pixel. That is, the pointer index of the target pixel 15 is (m + 2) as described above. FIG. 10B shows a series of processes so far.

またステップS51において、ポインタインデックスが矛盾している特徴量をマージする。具体的には、特徴量テーブル18の特徴量インデックスnに格納されている特徴量「8」と、特徴量テーブル18の特徴量インデックス(n+2)に格納されている特徴量「2」をマージして、「8」+「2」=「10」をマージ結果として特徴量テーブル18の特徴量インデックス(n+2)に格納する。   In step S51, feature quantities having inconsistent pointer indexes are merged. Specifically, the feature quantity “8” stored in the feature quantity index n of the feature quantity table 18 and the feature quantity “2” stored in the feature quantity index (n + 2) of the feature quantity table 18 are merged. Then, “8” + “2” = “10” is stored in the feature amount index (n + 2) of the feature amount table 18 as a merge result.

なお上記例の場合は、特徴量をマージする時に特徴量インデックス(n+2)の方にマージさせたが、特徴量インデックスnの方にマージさせてもよい。   In the case of the above example, when the feature amounts are merged, the feature amount index (n + 2) is merged. However, the feature amount index n may be merged.

次にステップS52では、空にした特徴量の領域を無効にする。図10の例では、特徴量のマージに伴い、特徴量テーブル18の特徴量インデックスnにおいて特徴量格納領域19が空となったため、特徴量テーブル18の特徴量インデックスnを無効にする。ステップS52の処理を終えたら、ステップS19へ戻る。   In step S52, the emptied feature amount area is invalidated. In the example of FIG. 10, the feature quantity storage area 19 becomes empty in the feature quantity index n of the feature quantity table 18 as the feature quantities are merged, so the feature quantity index n of the feature quantity table 18 is invalidated. When the process of step S52 is completed, the process returns to step S19.

次に特徴量ポインタテーブル17の整合処理を行う。特徴量ポインタテーブル17の整合処理では、図6に記載されているように、まずステップS61において、ウインドウ16内の画素について、無効にする特徴量を指している特徴量ポインタテーブル17の値をマージ後の特徴量を指すように書き換える。   Next, matching processing of the feature amount pointer table 17 is performed. In the matching processing of the feature value pointer table 17, as described in FIG. 6, first, in step S61, the values in the feature value pointer table 17 indicating the feature values to be invalidated are merged for the pixels in the window 16. Rewrite to point to the feature value later.

例えば図10では、無効にするのは特徴量インデックスnである。特徴量テーブル18の特徴量インデックスnを無効とするため、特徴量ポインタテーブル17のポインタインデックスmに格納されている値nを(n+2)に書き換え、特徴量テーブル18の特徴量インデックス(n+2)を指し示すようする。   For example, in FIG. 10, the feature quantity index n is invalidated. In order to invalidate the feature quantity index n of the feature quantity table 18, the value n stored in the pointer index m of the feature quantity pointer table 17 is rewritten to (n + 2), and the feature quantity index (n + 2) of the feature quantity table 18 is changed. Try to point.

無効になった特徴量テーブル18の特徴量インデックスnは、過去に1回特徴量をマージしているため、ウインドウ16外の特徴量ポインタテーブルの整合に関するループ、つまりステップS62からステップS65を実施する。   Since the feature quantity index n of the invalid feature quantity table 18 has merged the feature quantities once in the past, a loop related to matching of the feature quantity pointer table outside the window 16, that is, steps S62 to S65 are executed. .

上記内容は、以下のことを意味する。ウインドウ16内の画素にはmと(m+2)の2種類のポインタインデックスを付与された画素がある。それらの画素は、異なる特徴量インデックスを指し示しているため、「矛盾した状態」である。そこで矛盾を解消し特徴量の整合をとるため、ポインタインデックスmとポインタインデックス(m+2)の指し示す特徴量を同一にした。それが、上記例では特徴量インデックス(n+2)を指し示すようにすることに相当する。   The above contents mean the following. The pixels in the window 16 include pixels to which two types of pointer indexes of m and (m + 2) are assigned. Since these pixels indicate different feature amount indexes, they are in an “inconsistent state”. Therefore, in order to resolve the contradiction and to match the feature amounts, the feature amounts indicated by the pointer index m and the pointer index (m + 2) are made the same. This is equivalent to indicating the feature amount index (n + 2) in the above example.

ここで、ポインタインデックスmがもともと指し示していた特徴量インデックスはnであるが、そのマージ回数格納領域20を参照すると「1」が格納されている。これは、過去に1回マージした結果、特徴量インデックスnを指し示しているポインタインデックスが、m以外にあと一ついることを示している。そして、上記あと一つのポインタインデックスは、ウインドウ16外の画素に付与されているものである、ということである。そして、特徴量インデックスnを指し示しているあと一つのポインタインデックスも同様に特徴量の整合をとるため、ステップS62からステップS65を実施する。   Here, the feature quantity index originally pointed to by the pointer index m is n, but “1” is stored when the merge count storage area 20 is referenced. This indicates that as a result of merging once in the past, there is another pointer index other than m indicating the feature amount index n. The other pointer index is assigned to a pixel outside the window 16. Then, the step S62 to the step S65 are performed in order to match the feature amounts of the other pointer index indicating the feature amount index n.

ステップS62では、無効になった特徴量テーブル18の特徴量インデックスnは、図10(b)のマージ回数格納領域20にもあるように過去に1回特徴量をマージしている。従って、ステップS62で特徴量ポインタテーブル17を検索する。   In step S62, the feature quantity index n of the invalid feature quantity table 18 has merged the feature quantity once in the past as in the merge count storage area 20 of FIG. 10B. Therefore, the feature amount pointer table 17 is searched in step S62.

ステップS63では、空にした(または空にする)特徴量を指しているか否かの判定を行う。例えば、特徴量ポインタテーブル17のポインタインデックス(m+1)を参照した場合、ポインタインデックス(m+1)は空にした特徴量テーブル18の特徴量インデックスnを指し示している。従ってステップS63はYESとなり、ステップS64に進む。もし空にした(または空にする)特徴量を指し示していない場合は、ステップS64を飛ばしてステップS65へ進む。   In step S63, it is determined whether or not the feature quantity that has been emptied (or emptied) is indicated. For example, when the pointer index (m + 1) of the feature value pointer table 17 is referred to, the pointer index (m + 1) points to the feature value index n of the feature value table 18 that is emptied. Therefore, step S63 becomes YES and proceeds to step S64. If no empty (or empty) feature value is indicated, step S64 is skipped and the process proceeds to step S65.

ステップS64では、マージした(マージする)特徴量を指しているポインタに付け替える。例えば図10(b)の場合、特徴量ポインタテーブル17のポインタインデックス(m+1)は、無効となったnから特徴量をマージした(n+2)へ書き換えられる。   In step S64, the pointer is replaced with a pointer indicating the merged feature amount. For example, in the case of FIG. 10B, the pointer index (m + 1) in the feature value pointer table 17 is rewritten from n which has become invalid to (n + 2) in which the feature values are merged.

1回ポインタを修正したため、あと一つのポインタインデックスはポインタインデックス(m+1)であり、その特徴量ポインタテーブルの書き換えが終了したため、特徴量の整合がとれ矛盾が解消したので、ステップS62からステップS65のループを抜ける。なお、ウインドウ16外のポインタインデックスで特徴量の整合を取らなくてはならないものが2つ以上ある場合は、ステップS62からステップS65のループを繰り返す。   Since the pointer has been corrected once, the other pointer index is the pointer index (m + 1), and since the rewriting of the feature value pointer table has been completed, the feature values are consistent and the contradiction is resolved. Exit the loop. If there are two or more pointer indexes outside the window 16 that must be matched with the feature amount, the loop from step S62 to step S65 is repeated.

ステップS66では、特徴量テーブル18のマージ回数を加算し、マージ回数を特徴量テーブル18のマージ回数格納領域20に格納する。図10の例では、特徴量テーブル18の特徴量インデックス(n+2)のマージ回数格納領域20には初期値「0」に、特徴量インデックスnに格納されていた今までのマージ回数「1」と今回のマージ処理分の「1」を加え、「0」+「1」+「1」=「2」が入る。   In step S66, the number of merges in the feature value table 18 is added, and the merge number is stored in the merge number storage area 20 of the feature value table 18. In the example of FIG. 10, the merge number storage area 20 of the feature value index (n + 2) in the feature value table 18 is set to the initial value “0”, and the number of merges so far “1” stored in the feature value index n. “1” for the current merge process is added, and “0” + “1” + “1” = “2” is entered.

ステップS67では、無効になった特徴量テーブル18のマージ回数を「0」にする。図10の例では、特徴量テーブル18の特徴量インデックスnが無効となっているので、特徴量インデックスnのマージ回数格納領域20に「0」を格納する。上記処理の結果を示したのが、図10(c)である。図2のステップS19に戻ったらステップS14へ進み、特徴量計測のループ処理を繰り返す。   In step S67, the number of merges of the invalid feature quantity table 18 is set to “0”. In the example of FIG. 10, since the feature amount index n of the feature amount table 18 is invalid, “0” is stored in the merge count storage area 20 of the feature amount index n. The result of the above processing is shown in FIG. When the process returns to step S19 in FIG. 2, the process proceeds to step S14, and the loop process for feature quantity measurement is repeated.

走査処理を全て終了し、図2におけるステップS12からステップS14までの間の一連のループ処理が終わったら、ステップS20へ進む。ステップS20では、上記ループ処理によりマージして求めた特徴量である連結成分の面積の合計を出力する。   When all the scanning processes are completed and a series of loop processes from step S12 to step S14 in FIG. 2 are completed, the process proceeds to step S20. In step S20, the sum of the areas of connected components, which are feature amounts obtained by merging by the loop processing, is output.

このように、注目画素15に対して左、左上、上、右上画素を含むウインドウを用いて上記処理を行うことで、注目画素15の斜め上の画素との特徴量の整合をとることができるため、図1に示したような斜めに連結した画素成分の特徴量も1回の走査で計測可能となる。   As described above, by performing the above processing using the window including the left, upper left, upper, and upper right pixels with respect to the target pixel 15, it is possible to match the feature amount with the diagonally upper pixel of the target pixel 15. Therefore, the feature amounts of pixel components connected obliquely as shown in FIG. 1 can also be measured by one scan.

なお特徴量をマージするにあたり、どちらの特徴量インデックスにマージするかの基準には、マージ回数の多い方にマージする、特徴量テーブル18の特徴量インデックスの小さい方にマージする等が考えられ、いずれの方にマージするかの基準は適宜定めればよい。   In merging the feature amounts, as a criterion for merging to which feature amount index, merging to the one with the larger number of merges, merging to the smaller feature amount index of the feature amount table 18, etc. can be considered, The criteria for merging to which direction may be determined as appropriate.

例えば図11にて特徴量をマージする場合、マージ後の特徴量を特徴量テーブル18の特徴量インデックスnもしくは特徴量インデックス(n+1)に格納する。ここで、特徴量テーブル18の特徴量インデックスnにマージ後の特徴量を格納した場合、特徴量ポインタテーブル17のポインタインデックス(m+1)から(m+3)に格納されている値を(n+1)からnに書き換えなければならない。   For example, when merging feature amounts in FIG. 11, the merged feature amounts are stored in the feature amount index n or the feature amount index (n + 1) of the feature amount table 18. Here, when the merged feature value is stored in the feature value index n of the feature value table 18, the values stored in the pointer indexes (m + 1) to (m + 3) of the feature value pointer table 17 are changed from (n + 1) to n. Must be rewritten to

一方、特徴量テーブル18の特徴量インデックス(n+1)にマージ後の特徴量を格納した場合、特徴量ポインタテーブル17のポインタインデックスmに格納されている値をnから(n+1)に書き換えるだけでよい。   On the other hand, when the merged feature value is stored in the feature value index (n + 1) of the feature value table 18, the value stored in the pointer index m of the feature value pointer table 17 need only be rewritten from n to (n + 1). .

ゆえに特徴量をマージする際は、特徴量テーブル18のマージ回数格納領域20に格納されている過去のマージ回数が多い方にマージ後の特徴量を格納することで、特徴量ポインタテーブル17を更新する負荷をより低減することができる。   Therefore, when merging feature amounts, the feature amount pointer table 17 is updated by storing the merged feature amount in the one where the past number of merges stored in the merge number storage area 20 of the feature amount table 18 is larger. The load to be performed can be further reduced.

実施の形態2.
図12は、処理を行う画像データ14と、注目画素15に対してウインドウ16内の参照する画素の順序をAからDで示したものである。なお、実施の形態1と実施の形態2における注目画素15以外の参照画素の順序は異なっている。
Embodiment 2. FIG.
FIG. 12 shows the image data 14 to be processed and the order of reference pixels in the window 16 with respect to the target pixel 15 from A to D. Note that the order of reference pixels other than the target pixel 15 in the first and second embodiments is different.

図13は、実施の形態2における特徴量計測のフローチャートを示している。図13は、実施の形態1に対して画素を参照する手順を追加したフローチャートである。   FIG. 13 shows a flowchart of feature quantity measurement in the second embodiment. FIG. 13 is a flowchart in which a procedure for referring to a pixel is added to the first embodiment.

ステップS11およびステップS12およびステップS13について、注目画素15が1でない(NOの)場合は、実施の形態1と同様であるため、説明は省略する。   About step S11, step S12, and step S13, when the attention pixel 15 is not 1 (NO), since it is the same as that of Embodiment 1, description is abbreviate | omitted.

ステップS13において注目画素15が1の画素12である場合、YESを選択し、ステップS111に進む。   If the target pixel 15 is one pixel 12 in step S13, YES is selected and the process proceeds to step S111.

特徴量計測を行う際、実施の形態1では、ステップS15において、注目画素15以外にウインドウ16内で0より大きい値が存在するか否かを判定するにあたり、注目画素15に対して注目画素15以外、つまり左と左上と上と右上の画素全てを参照して判定していた。しかし実施の形態2においては、ステップS13以降の処理で、参照する画素の優先順位をつけて判定する。   When performing feature quantity measurement, in Embodiment 1, in determining whether or not there is a value larger than 0 in the window 16 in addition to the target pixel 15 in step S15, the target pixel 15 is compared with the target pixel 15. In other words, the determination was made with reference to all pixels on the left, upper left, upper and upper right. However, in the second embodiment, in the processing after step S13, the priority of the pixel to be referred to is determined and determined.

例えば、注目画素15の上画素のポインタインデックスが0より大きい場合、ステップS111ではYESと判定するため、他の画素を参照する必要はない。それは、左上画素と上画素の特徴量は上画素が注目画素だったときに整合をとっており、上画素と右上画素の特徴量は右上画素が注目画素だったときに整合をとっており、左画素と上画素の特徴量は左画素が注目画素だったときに整合をとっているからである。ステップS111でYESと判定した場合、ステップS18へ進む。   For example, if the pointer index of the upper pixel of the pixel of interest 15 is greater than 0, it is not necessary to refer to another pixel because YES is determined in step S111. The feature values of the upper left pixel and the upper pixel are matched when the upper pixel is the target pixel, and the feature values of the upper pixel and the upper right pixel are matched when the upper right pixel is the target pixel. This is because the feature values of the left pixel and the upper pixel are matched when the left pixel is the target pixel. When it determines with YES by step S111, it progresses to step S18.

ステップS18の処理は実施の形態1の図4、図8と同様であるため、説明は省略する。ステップS18の処理を終了後、ステップS14へ進み、特徴量計測のループ処理を繰り返す。   Since the process of step S18 is the same as that of FIG. 4 and FIG. 8 of Embodiment 1, description is abbreviate | omitted. After the process of step S18 is complete | finished, it progresses to step S14 and repeats the loop process of a feature-value measurement.

注目画素15の上画素が0の画素13である場合、ステップS111ではNOと判定するため、ステップS112へ進む。   If the upper pixel of the target pixel 15 is the zero pixel 13, the process proceeds to step S 112 to determine NO in step S 111.

ステップS112では、左または左上画素が0より大きいか否かの判定を行う。もしYESならば、左画素または左上画素と右上画素は、過去に同一ウインドウ内にあったことがない。従って、特徴量の整合がとれておらず異なる特徴量を指している可能性があるため、ステップS113、ステップS115で確認する必要がある。またステップS112において、左および左上が0(NO)の場合は、ステップS114へ進む。   In step S112, it is determined whether the left or upper left pixel is greater than zero. If YES, the left pixel or the upper left pixel and the upper right pixel have never been in the same window in the past. Accordingly, there is a possibility that the feature quantities are not matched and may indicate different feature quantities, so it is necessary to check in step S113 and step S115. If the left and upper left are 0 (NO) in step S112, the process proceeds to step S114.

ステップS113では、右上画素が0より大きいか否かの判定を行う。右上画素が0である(NOの)場合はステップS18へ進み、左または左上画素に対して整合がとれるように特徴量/注目画素更新を行う。ステップS18の処理は実施の形態1の図4、図8と同様であるため、説明は省略する。ステップS18の処理を終了後、ステップS14へ進み、特徴量計測のループ処理を繰り返す。ステップS113において右上画素が0より大きい(YESの)場合、ステップS115へ進む。   In step S113, it is determined whether the upper right pixel is greater than zero. If the upper right pixel is 0 (NO), the process proceeds to step S18, and the feature amount / target pixel update is performed so that the left or upper left pixel is matched. Since the process of step S18 is the same as that of FIG. 4 and FIG. 8 of Embodiment 1, description is abbreviate | omitted. After the process of step S18 is complete | finished, it progresses to step S14 and repeats the loop process of a feature-value measurement. If it is determined in step S113 that the upper right pixel is greater than 0 (YES), the process proceeds to step S115.

ステップS115では、左または左上画素の特徴量と右上画素の特徴量が同一か否かの判定を行う。ステップS115においてYESの場合は、ステップS18へ進み、左または左上画素に対して特徴量/注目画素更新を行う。ステップS18の処理は実施の形態1の図4、図8と同様であるため、説明は省略する。ステップS18の処理を終了後、ステップS14へ進み、特徴量計測のループ処理を繰り返す。ステップS115において左または左上画素の特徴量と右上画素の特徴量が同一でない(NOの)場合、ステップS19へ進む。これは、実施の形態1のステップS17における矛盾がある(YES)の場合に相当する。   In step S115, it is determined whether the feature quantity of the left or upper left pixel is the same as the feature quantity of the upper right pixel. If YES in step S115, the process proceeds to step S18, and the feature amount / target pixel update is performed on the left or upper left pixel. Since the process of step S18 is the same as that of FIG. 4 and FIG. 8 of Embodiment 1, description is abbreviate | omitted. After the process of step S18 is complete | finished, it progresses to step S14 and repeats the loop process of a feature-value measurement. If the feature amount of the left or upper left pixel and the feature amount of the upper right pixel are not the same (NO) in step S115, the process proceeds to step S19. This corresponds to the case where there is a contradiction (YES) in step S17 of the first embodiment.

ステップS19では、左または左上画素に対して整合がとれるように特徴量マージ処理および特徴量ポインタテーブル17の整合処理を行う。ステップS19の処理は実施の形態1の図5、図6、図9、図10と同様であるため、説明は省略する。ステップS19の処理を終了後、ステップS14へ進み、特徴量計測のループ処理を繰り返す。   In step S19, the feature amount merging process and the feature amount pointer table 17 matching process are performed so that the left or upper left pixel can be matched. Since the process of step S19 is the same as that of FIG. 5, FIG. 6, FIG. 9, FIG. 10 of Embodiment 1, description is abbreviate | omitted. After the process of step S19 is complete | finished, it progresses to step S14 and repeats the loop process of a feature-value measurement.

ステップS112において、左および左上が0(NO)の場合は、ステップS114へ進む。ステップS114では、右上画素が0より大きいか否かの判定を行う。もし右上画素が0より大きい(YESの)場合、ステップS18へ進み、右上画素に対して整合がとれるように特徴量/注目画素更新を行う。ステップS18の処理は実施の形態1の図4、図8と同様であるため、説明は省略する。ステップS18の処理を終了後、ステップS14へ進み、特徴量計測のループ処理を繰り返す。ステップS114において右上画素が0(NO)の場合、ステップS16へ進む。   In step S112, when the left and upper left are 0 (NO), the process proceeds to step S114. In step S114, it is determined whether or not the upper right pixel is greater than zero. If the upper right pixel is larger than 0 (YES), the process proceeds to step S18, and the feature amount / target pixel update is performed so that the upper right pixel is matched. Since the process of step S18 is the same as that of FIG. 4 and FIG. 8 of Embodiment 1, description is abbreviate | omitted. After the process of step S18 is complete | finished, it progresses to step S14 and repeats the loop process of a feature-value measurement. If the upper right pixel is 0 (NO) in step S114, the process proceeds to step S16.

ステップS16では、新規特徴量作成/注目画素更新を行う。ステップS16の処理は、実施の形態1における図3、図7と同様であるため、説明は省略する。またステップS14、ステップS20の処理も実施の形態1と同様であるため、説明は省略する。   In step S16, new feature value creation / target pixel update is performed. Since the process of step S16 is the same as that of FIG. 3 and FIG. 7 in Embodiment 1, description is abbreviate | omitted. Moreover, since the process of step S14 and step S20 is the same as that of Embodiment 1, description is abbreviate | omitted.

このように、新規特徴量を作成する際は、注目画素15以外の画素が全て0あることを確認する必要がある。従って、ステップS13にて注目画素15が1であること、ステップS111にて注目画素15の上画素が0であること、ステップS112にて左および左上画素が0であること、ステップS114にて右上画素が0であること全ての判定を実施しなくてはならない。   Thus, when creating a new feature amount, it is necessary to confirm that all the pixels other than the target pixel 15 are zero. Accordingly, the target pixel 15 is 1 in step S13, the upper pixel of the target pixel 15 is 0 in step S111, the left and upper left pixels are 0 in step S112, and the upper right in step S114. All decisions must be made that the pixel is zero.

上記フローチャートを用いた処理の例を示したのが図14である。まず図14(a)に示す例1を考える。注目画素15に対して上画素AはナシであるためNOを選択し、ステップS111からすステップS112へ遷移する。次に、左画素Bと左上画素CはナシであるためNOを選択し、ステップS112からステップS114へ遷移する。次に、右上画素DはナシであるためNOを選択し、ステップS114からステップS16へ遷移する。そしてステップS16にて新規特徴量作成/注目画素更新を実施する。従って、画素を4回(A、B、C、D)参照している。   FIG. 14 shows an example of processing using the flowchart. First, consider Example 1 shown in FIG. Since the upper pixel A is pear with respect to the target pixel 15, NO is selected, and the process proceeds from step S111 to step S112. Next, since the left pixel B and the upper left pixel C are pears, NO is selected, and the process proceeds from step S112 to step S114. Next, since the upper right pixel D is pear, NO is selected, and the process proceeds from step S114 to step S16. In step S16, new feature amount creation / attention pixel update is performed. Therefore, the pixel is referred to four times (A, B, C, D).

次に図14(b)に示す例2を考える。注目画素15に対して上画素AはアリであるためYESを選択し、ステップS111からステップS18へ遷移する。そしてステップS18にて特徴量/注目画素更新(上画素)を実施する。従って、画素を1回(A)参照している。   Next, consider Example 2 shown in FIG. Since the upper pixel A is an ant with respect to the target pixel 15, YES is selected, and the process proceeds from step S111 to step S18. In step S18, the feature amount / target pixel update (upper pixel) is performed. Therefore, the pixel is referred to once (A).

次に図14(c)に示す例3を考える。注目画素15に対して上画素AはナシであるためNOを選択し、ステップS111からステップS112へ遷移する。次に、左画素BはアリであるためYESを選択し、ステップS112からステップS113へ遷移する。次に、右上画素DはアリであるためYESを選択し、ステップS113からステップS115へ遷移する。次に、左画素と右上画素の特徴量は同一でないため、ステップS115からステップS19へ遷移する。そしてステップS19にて特徴量マージ/ポインタテーブルの整合を実施する。従って、画素を3回(A、B、D)参照している。   Next, consider Example 3 shown in FIG. Since the upper pixel A is pear with respect to the target pixel 15, NO is selected, and the process proceeds from step S111 to step S112. Next, since the left pixel B is an ant, YES is selected, and the process proceeds from step S112 to step S113. Next, since the upper right pixel D is an ant, YES is selected, and the process proceeds from step S113 to step S115. Next, since the feature amounts of the left pixel and the upper right pixel are not the same, the process proceeds from step S115 to step S19. In step S19, feature amount merging / pointer table matching is performed. Therefore, the pixel is referred to three times (A, B, D).

最後に図14(d)に示す例4を考える。注目画素15に対して上画素AはナシであるためNOを選択し、ステップS111からステップS112へ遷移する。次に、左画素BはアリであるためYESを選択し、ステップS112からステップS113へ遷移する。次に、右上画素DはナシであるためNOを選択し、ステップS113からステップS18へ遷移する。そしてステップS18にて特徴量/注目画素更新(左or左上画素)を実施する。従って、画素を3回(A、B、D)参照している。   Finally, consider Example 4 shown in FIG. Since the upper pixel A is pear with respect to the target pixel 15, NO is selected, and the process proceeds from step S111 to step S112. Next, since the left pixel B is an ant, YES is selected, and the process proceeds from step S112 to step S113. Next, since the upper right pixel D is pear, NO is selected, and the process proceeds from step S113 to step S18. In step S18, the feature amount / target pixel update (left or upper left pixel) is performed. Therefore, the pixel is referred to three times (A, B, D).

図15は、図13のフローチャートに従い図1の入力画像11について特徴量を計測した際の注目画素を除く参照画素数を示している。なお図15記載の四角枠内の数値は、図7から図10記載の付与されたポインタインデックスを表しておらず、上記のように参照画素数を示している点に注意を要する。   FIG. 15 shows the number of reference pixels excluding the target pixel when the feature amount is measured for the input image 11 of FIG. 1 according to the flowchart of FIG. Note that the numerical values in the square frame shown in FIG. 15 do not represent the assigned pointer indexes shown in FIGS. 7 to 10 and indicate the number of reference pixels as described above.

図12の参照順序および図13のフローチャートにより、図15記載のように参照画素数が4個ではなく3個で済む箇所、また参照画素数が1個で済む箇所ができることがわかる。   From the reference order in FIG. 12 and the flowchart in FIG. 13, it can be seen that there are places where only three reference pixels are required instead of four, and where only one reference pixel is required, as shown in FIG. 15.

実施の形態2のように、注目画素15に対して、参照する画素の優先順位をつけて判定する処理を実施することにより、参照しなくてもよい画素を参照せずに済むため、処理スピードが向上する。   As in the second embodiment, the process of determining the priority of the reference pixel with respect to the target pixel 15 is performed, so that it is not necessary to refer to a pixel that does not need to be referred to. Will improve.

なお、本発明の実施の形態を説明するために、計測する特徴量として面積つまり連結成分の画素数を用いた。しかし計測する特徴量は面積に限定する必要はない。例えば、連結成分の重心を計測する特徴量としてもよい。   In order to describe the embodiment of the present invention, the area, that is, the number of pixels of the connected component, was used as the feature quantity to be measured. However, the feature quantity to be measured need not be limited to the area. For example, it is good also as a feature-value which measures the gravity center of a connection component.

その場合は、新規特徴量を作成するステップS16の処理のうち、図3記載のステップS32において、面積に1を加算することに加えて、注目画素15のX座標、Y座標を加算する処理を行う。   In that case, in addition to adding 1 to the area in step S32 shown in FIG. 3 in the process of step S16 for creating a new feature amount, the process of adding the X coordinate and the Y coordinate of the target pixel 15 is performed. Do.

また特徴量/注目画素更新処理を行うステップS18の処理のうち、図4記載のステップS41において、面積をインクリメントする処理に加えて、注目画素15のX座標、Y座標を加算する処理を行う。   In addition, in step S18 shown in FIG. 4 in the process of step S18 for performing the feature amount / target pixel update process, the process of adding the X coordinate and the Y coordinate of the target pixel 15 is performed in addition to the process of incrementing the area.

このように処理して、X座標、Y座標を加算した連結成分の画素数で平均をとることにより、連結成分の画素の重心を特徴量として計測することができる。   By processing in this way and taking the average of the number of connected component pixels obtained by adding the X and Y coordinates, the center of gravity of the connected component pixels can be measured as a feature amount.

なお実施の形態1、実施の形態2に記載した方法は、例えばCPU(Central Processing Unit、中央処理装置)にて実施される。またデータの格納はRAM(Random Access Memory)等の記憶素子を用いてデータを格納させればよい。   Note that the method described in the first and second embodiments is performed by, for example, a CPU (Central Processing Unit). Data can be stored using a storage element such as a RAM (Random Access Memory).

本発明の実施の形態1における特徴量計測方法のデータ構造および画像走査方向を示す図である。It is a figure which shows the data structure and image scanning direction of the feature-value measuring method in Embodiment 1 of this invention. 本発明の実施の形態1における特徴量計測のフローチャートを示す図である。It is a figure which shows the flowchart of the feature-value measurement in Embodiment 1 of this invention. 本発明の実施の形態1におけるステップS16(新規特徴量作成および注目画素更新)のフローチャートを示す図である。It is a figure which shows the flowchart of step S16 (new feature-value production and attention pixel update) in Embodiment 1 of this invention. 本発明の実施の形態1におけるステップS18(特徴量および注目画素更新)のフローチャートを示す図である。It is a figure which shows the flowchart of step S18 (feature amount and attention pixel update) in Embodiment 1 of this invention. 本発明の実施の形態1におけるステップS19(特徴量マージ処理)のフローチャートを示す図である。It is a figure which shows the flowchart of step S19 (feature amount merge process) in Embodiment 1 of this invention. 本発明の実施の形態1におけるステップS19(特徴量ポインタテーブルの整合処理)のフローチャートを示す図である。It is a figure which shows the flowchart of step S19 (matching process of a feature-value pointer table) in Embodiment 1 of this invention. 本発明の実施の形態1における特徴量計測のうち、ステップS13、ステップS15、ステップS16の一連の処理を示した図である。It is the figure which showed a series of processes of step S13, step S15, and step S16 among the feature-value measurement in Embodiment 1 of this invention. 本発明の実施の形態1における特徴量計測のうち、ステップS13、ステップS15、ステップS17、ステップS18の一連の処理を示した図である。It is the figure which showed a series of processes of step S13, step S15, step S17, and step S18 among the feature-value measurement in Embodiment 1 of this invention. 本発明の実施の形態1における特徴量計測のうち、ステップS13、ステップS15、ステップS17、ステップS19を示した図である。It is the figure which showed step S13, step S15, step S17, and step S19 among the feature-value measurement in Embodiment 1 of this invention. 本発明の実施の形態1における特徴量計測のうち、ステップS13、ステップS15、ステップS17、ステップS19を示した図である。It is the figure which showed step S13, step S15, step S17, and step S19 among the feature-value measurement in Embodiment 1 of this invention. 本発明の実施の形態1における特徴量計測のうち、マージ処理を行う基準の例を示した図である。It is the figure which showed the example of the reference | standard which performs a merge process among the feature-value measurement in Embodiment 1 of this invention. 本発明の実施の形態2における処理を行う画像データと注目画素に対してウインドウ内の参照する画素の順序を示す図である。It is a figure which shows the order of the pixel referred in a window with respect to the image data and the attention pixel which perform the process in Embodiment 2 of this invention. 本発明の実施の形態2における特徴量計測のフローチャートを示す図である。It is a figure which shows the flowchart of the feature-value measurement in Embodiment 2 of this invention. 本発明の実施の形態2におけるフローチャートを用いた処理例を示した図である。It is the figure which showed the example of a process using the flowchart in Embodiment 2 of this invention. 本発明の実施の形態2における特徴量を計測した際の注目画素を除く参照画素数を示した図である。It is the figure which showed the reference pixel number except the attention pixel at the time of measuring the feature-value in Embodiment 2 of this invention.

符号の説明Explanation of symbols

11.入力画像
12.1の画素
13.0の画素
14.画像データ
15.注目画素
16.ウインドウ
17.特徴量ポインタテーブル
18.特徴量テーブル
19.特徴量格納領域
20.マージ回数格納領域
11. 13. pixel 13.0 of input image 12.1; Image data 15. Pixel of interest 16. Window 17. Feature amount pointer table 18. Feature amount table 19. Feature amount storage area 20. Merge count storage area

Claims (7)

画像の特徴量を計測する特徴量計測方法において、
前記特徴量と前記特徴量のマージ回数を格納する特徴量テーブルと、
前記特徴量テーブルに格納される特徴量とマージ回数の格納場所を示す特徴量インデックスを格納する特徴量ポインタテーブルと、
を用い、
特徴量計測を行う注目画素を含むウインドウ内の画素を参照し、前記注目画素以外に前記ウインドウ内に前記特徴量ポインタテーブルのデータ格納場所を示すポインタインデックスを付与された画素がない場合は、新規特徴量を作成し前記特徴量テーブルの未使用領域に格納するとともに、前記新規特徴量を指し示す特徴量インデックスを前記特徴量ポインタテーブルに格納する第1の工程と、
前記注目画素を含むウインドウ内の画素を参照し、前記注目画素以外に前記ウインドウ内にポインタインデックスを付与された画素があり、前記ポインタインデックスを付与された画素に矛盾がない場合は、特徴量ポインタテーブルの前記ポインタインデックスに格納された特徴量インデックスが指し示す特徴量をインクリメントする第2の工程と、
前記注目画素を含むウインドウ内の画素を参照し、前記注目画素以外に前記ウインドウ内にポインタインデックスを付与された画素があり、前記ポインタインデックスを付与された画素に矛盾がある場合は、前記特徴量テーブルのうち該当する特徴量のマージ結果である特徴量と修正したマージ回数を格納するとともに、特徴量ポインタテーブルの前記ポインタインデックスに格納された特徴量インデックスのうち、マージされた特徴量インデックスをマージした特徴量インデックスに書き換え、マージ後の特徴量を指し示すようにする第3の工程と、
を有することを特徴とする特徴量計測方法。
In the feature quantity measurement method for measuring the feature quantity of an image,
A feature quantity table for storing the feature quantity and the number of merges of the feature quantities;
A feature amount pointer table for storing a feature amount index indicating a storage location of the feature amount and the number of merges stored in the feature amount table;
Use
Refer to the pixel in the window including the target pixel for which the feature amount measurement is performed, and if there is no pixel assigned a pointer index indicating the data storage location of the feature amount pointer table in the window other than the target pixel, new A first step of creating a feature quantity and storing it in an unused area of the feature quantity table, and storing a feature quantity index indicating the new feature quantity in the feature quantity pointer table;
When there is a pixel assigned a pointer index in the window other than the pixel of interest with reference to a pixel in the window including the pixel of interest, and the pixel assigned the pointer index is consistent, a feature amount pointer A second step of incrementing the feature value indicated by the feature value index stored in the pointer index of the table;
If there is a pixel assigned a pointer index in the window other than the pixel of interest with reference to a pixel in the window including the pixel of interest, and there is a contradiction in the pixel assigned the pointer index, the feature amount Stores the feature quantity that is the result of merging the corresponding feature quantity in the table and the corrected number of merges, and merges the merged feature quantity index among the feature quantity indexes stored in the pointer index of the feature quantity pointer table A third step of rewriting to the feature amount index and indicating the feature amount after merging;
A feature quantity measuring method characterized by comprising:
前記ウインドウは、前記注目画素と前記注目画素に対する左、左上、上、右上の画素を含み、前記左、左上、上、右上の画素の少なくとも一つの画素を参照することで、特徴量を計測することを特徴とする請求項1記載の特徴量計測方法。   The window includes the target pixel and left, upper left, upper, and upper right pixels with respect to the target pixel, and measures a feature amount by referring to at least one of the left, upper left, upper, and upper right pixels. The method of measuring a feature quantity according to claim 1. 画像の特徴量を計測する特徴量計測方法において、
前記特徴量と前記特徴量のマージ回数を格納する特徴量テーブルと、
前記特徴量テーブルに格納される特徴量とマージ回数の格納場所を示す特徴量インデックスを格納する特徴量ポインタテーブルと、
を用い、
前記第1から第3の工程において、前記注目画素の1画素前までの特徴量計測で、前記注目画素に対するウインドウ内の画素の特徴量に矛盾がない場合は前記矛盾のない画素のうちの一つを参照して特徴量計測を行い、前記ウインドウ内に注目画素以外の画素全てに前記ポイントインデックスが付与されていない場合は新規特徴量を作成することを特徴とする請求項1または請求項2記載の特徴量計測方法。
In the feature quantity measurement method for measuring the feature quantity of an image,
A feature quantity table for storing the feature quantity and the number of merges of the feature quantities;
A feature amount pointer table for storing a feature amount index indicating a storage location of the feature amount and the number of merges stored in the feature amount table;
Use
In the first to third steps, if there is no contradiction in the feature quantity of the pixel in the window with respect to the target pixel in the feature quantity measurement up to one pixel before the target pixel, one of the consistent pixels 3. A feature quantity is measured with reference to one, and a new feature quantity is created when the point index is not assigned to all pixels other than the target pixel in the window. The characteristic amount measuring method described.
前記特徴量のマージは、前記特徴量テーブルに格納されているマージ回数のうち、マージ回数が多い方の特徴量にマージ結果を格納することを特徴とする請求項1から請求項3のうちいずれか一項記載の特徴量計測方法。   4. The feature amount merging includes storing a merge result in a feature amount having a larger number of merges out of the number of merges stored in the feature amount table. The characteristic amount measuring method according to claim 1. 前記特徴量は、0/1を示す二値画像のうち1を示す画素の連結成分の面積であることを特徴とする請求項1から請求項4のうちいずれか一項記載の特徴量計測方法。   5. The feature amount measuring method according to claim 1, wherein the feature amount is an area of a connected component of a pixel indicating 1 in a binary image indicating 0/1. . 前記特徴量は、0/1を示す二値画像のうち1を示す画素の連結成分の重心であることを特徴とする請求項1から請求項4のうちいずれか一項記載の特徴量計測方法。   5. The feature amount measuring method according to claim 1, wherein the feature amount is a centroid of a connected component of a pixel indicating 1 in a binary image indicating 0/1. . 前記特徴量テーブルと前記特徴量ポインタテーブルに格納するデータを記憶する記憶素子と、
前記第1の工程から前記第3の工程を実行処理する中央処理装置と、
を備えたことを特徴とする請求項1から請求項6のうちいずれか一項記載の特徴量計測装置。
A storage element for storing data to be stored in the feature quantity table and the feature quantity pointer table;
A central processing unit for performing the third process from the first process;
The feature amount measuring apparatus according to claim 1, further comprising:
JP2007061615A 2007-03-12 2007-03-12 Feature amount measuring method and feature amount measuring apparatus Pending JP2008225739A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007061615A JP2008225739A (en) 2007-03-12 2007-03-12 Feature amount measuring method and feature amount measuring apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007061615A JP2008225739A (en) 2007-03-12 2007-03-12 Feature amount measuring method and feature amount measuring apparatus

Publications (1)

Publication Number Publication Date
JP2008225739A true JP2008225739A (en) 2008-09-25

Family

ID=39844303

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007061615A Pending JP2008225739A (en) 2007-03-12 2007-03-12 Feature amount measuring method and feature amount measuring apparatus

Country Status (1)

Country Link
JP (1) JP2008225739A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05189563A (en) * 1992-01-10 1993-07-30 Matsushita Electric Ind Co Ltd Image processor
JP2000339456A (en) * 1999-03-19 2000-12-08 Japan Radio Co Ltd Picture processing method
JP2003058895A (en) * 2001-08-09 2003-02-28 Matsushita Electric Ind Co Ltd Device and method for labeling

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05189563A (en) * 1992-01-10 1993-07-30 Matsushita Electric Ind Co Ltd Image processor
JP2000339456A (en) * 1999-03-19 2000-12-08 Japan Radio Co Ltd Picture processing method
JP2003058895A (en) * 2001-08-09 2003-02-28 Matsushita Electric Ind Co Ltd Device and method for labeling

Similar Documents

Publication Publication Date Title
KR101655000B1 (en) Edge tracing with hysteresis thresholding
CN102479294B (en) Methods and systems for medical image processing, retrieval, and reviewing
CN112001406B (en) Text region detection method and device
KR20150037367A (en) Cache memory system and operating method for the same
JP3086189B2 (en) Texture map packing
JP2016186703A (en) Image recognition method, image recognition device, and image recognition program
CN116881515B (en) Method and electronic equipment for comparing capacitance results solved by different algorithms
JPH1125280A (en) User-assist type identification of object boundary in raster picture
CN111913777A (en) Information processing method, information processing device, electronic equipment and storage medium
JP2008225739A (en) Feature amount measuring method and feature amount measuring apparatus
CN116128912A (en) Method, device, equipment and medium for segmenting hip joint image
CN103955449B (en) The method and apparatus for positioning target sample
US11709993B2 (en) Efficient concurrent invocation of sheet defined functions including dynamic arrays
CN115761119A (en) Neighborhood voxel storage method and device, computer equipment and storage medium
CN110619597A (en) Semitransparent watermark removing method and device, electronic equipment and storage medium
CN113822839B (en) Medical image processing method, medical image processing device, computer equipment and storage medium
CN115185415A (en) Scanning data display method, device, equipment and storage medium
CN110110260B (en) Page rendering method and device and electronic equipment
US20040107312A1 (en) System and method for determining a cache optimized ordering of cells in an unstructured graph
CN112711574A (en) Database security detection method and device, electronic equipment and medium
US7103658B2 (en) Rendering calculation processing status monitoring program, and storage medium, apparatus, and method therefor
Buzer Optimal simplification of polygonal chains for subpixel-accurate rendering
US20240070979A1 (en) Method and apparatus for generating 3d spatial information
CN111177448B (en) Discrete graph combination method and device and electronic equipment
JP6055428B2 (en) Software quality standard calculation apparatus and software quality standard calculation method

Legal Events

Date Code Title Description
A621 Written request for application examination

Effective date: 20100203

Free format text: JAPANESE INTERMEDIATE CODE: A621

A521 Written amendment

Effective date: 20110316

Free format text: JAPANESE INTERMEDIATE CODE: A523

A977 Report on retrieval

Effective date: 20110822

Free format text: JAPANESE INTERMEDIATE CODE: A971007

A131 Notification of reasons for refusal

Effective date: 20110830

Free format text: JAPANESE INTERMEDIATE CODE: A131

A02 Decision of refusal

Effective date: 20111227

Free format text: JAPANESE INTERMEDIATE CODE: A02