JP4497399B2 - Pattern image search device and pattern image search program - Google Patents
Pattern image search device and pattern image search program Download PDFInfo
- Publication number
- JP4497399B2 JP4497399B2 JP2004011992A JP2004011992A JP4497399B2 JP 4497399 B2 JP4497399 B2 JP 4497399B2 JP 2004011992 A JP2004011992 A JP 2004011992A JP 2004011992 A JP2004011992 A JP 2004011992A JP 4497399 B2 JP4497399 B2 JP 4497399B2
- Authority
- JP
- Japan
- Prior art keywords
- pattern
- image
- pattern image
- image data
- original image
- 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.)
- Expired - Fee Related
Links
Images
Description
本発明は、模様画像検索装置及びプログラムに関し、より詳細には、ユーザーが所望する模様画像を、大量の模様画像から探し出すための画像検索の技術に係る模様画像検索装置及びプログラムに関する。 The present invention relates to a pattern image search apparatus and program, and more particularly to a pattern image search apparatus and program related to an image search technique for searching for a pattern image desired by a user from a large number of pattern images.
近年、コンピュータ技術や画像処理技術の発達に伴って、大量の電子画像を蓄積して画像データベースを構築する試みが盛んに行われている。画像データベースを構築する際に重要となるのは、大量に蓄積した画像の中から利用したい画像を簡単に得ることができるようにするための画像検索方法である。 In recent years, with the development of computer technology and image processing technology, attempts to build an image database by accumulating a large amount of electronic images have been actively conducted. What is important when constructing an image database is an image retrieval method for easily obtaining an image to be used from among a large amount of accumulated images.
画像検索方法の1つとして、各画像に言葉を用いた検索キーを付与し、文書の検索と同様の方法で、入力されたキーワードと画像に付された検索キーとを照合し、キーワードに一致する検索キーが付された画像を検索結果として返すというものがある。 As one of the image search methods, a search key using words is assigned to each image, and the input keyword is matched with the search key attached to the image in the same way as the document search to match the keyword. In some cases, an image with a search key to be returned is returned as a search result.
また、キーワードと言葉による検索キーとを照合することによって画像を検索するのではなく、検索条件として特定の画像(以下「問合わせ画像」という。)を与え、問合わせ画像に類似する画像を画像データベースの中から検索ができるようにすることが望ましい。このような検索方法を実現するために、問合わせ画像及び検索対象の画像からそれぞれ画像の特徴を表す特徴量を抽出し、問合わせ画像の特徴量と、検索対称の画像の特徴量との類似性を判定し、問合わせ画像の特徴量と類似する特徴量を有する画像を検索結果として返すという方法が提案されている。つまり、この画像検索方法は、特徴量間の類似性を画像自体の類似性と考えることによって、類似する画像を検索するというものである。 Also, instead of searching for an image by matching a keyword with a search key based on words, a specific image (hereinafter referred to as “query image”) is given as a search condition, and an image similar to the query image is displayed. It is desirable to be able to search from the database. In order to realize such a search method, feature quantities representing image characteristics are extracted from the query image and the search target image, respectively, and the similarity between the query image feature quantity and the search symmetric image feature quantity is similar. There has been proposed a method of determining the sex and returning an image having a feature amount similar to the feature amount of the inquiry image as a search result. In other words, this image search method searches for similar images by considering the similarity between feature quantities as the similarity of the images themselves.
更に、高速で高精度の画像検索を行うために、画像全体を検索するのではなく特定の領域を取り出して画像検索を行う方法や、一定のパターンが繰り返される周期性を持った画像に適用する検索方法が提案されている。 Furthermore, in order to perform high-speed and high-accuracy image search, it is applied not only to the entire image but also to a method of searching for a specific area and searching for an image or an image having periodicity in which a certain pattern is repeated. Search methods have been proposed.
例えば、特許文献1では、画像入力手段により得られた検索条件として与えられたテクスチャー画像及び検索対象となるテクスチャー画像をグレースケール画像に変換し、自己相関関数、周期性特徴量、及び統計的特徴量を計算して周期性の有無を判別し、周期性を有すれば周期性特徴量に基づいて、周期性を有しなければ統計的特徴量に基づいて検索条件として与えられた画像に対する検索対象となる画像の類似度を計算することで、類似度の高い順に検索対象となる画像を抽出して利用者に対して表示する点が記載されている。また、特許文献2には、ユーザー所望の領域である問合わせ画像から領域を抽出する際に、画像からエッジを抽出し、画像中のピクセルの色によりクラスタリングし、抽出したエッジにより得られた領域とクラスタリングにより得られた領域とに基づいて、領域分割を行うことにより画像から領域を抽出することを可能とし、登録された大量の画像の領域からユーザーの所望する画像の領域を検索する点が記載されている。また、特許文献3には、画像を領域情報に基づく画像類似度の導出とエッジ情報に基づく画像類似度の導出の組合わせに基づく、画像データベース照会のための方法が記載されている。また、特許文献4には、画像を入力し、画像のテクスチャの周期性を求め、求められた周期性に基づいて、画像のテクスチャの基本パターンを抽出し、抽出した基本パターンを正規化し、シフトさせた後、基本パターンを画像と関連づけて特徴量として画像データベースに登録する点が記載されている。
こうした従来の画像検索方法においては、蓄積された画像全体の画像データを検索することを前提としているので、複雑な処理が必要となり、検索速度を落とす原因となっている。しかしながら、画像データとして模様画像を蓄積する場合には、模様画像に所定のパターンが繰り返し表出することから、従来の画像検索方法を用いることは、かえって不要な処理を行うことになる。 Such a conventional image search method is based on the premise that image data of the entire stored image is searched, so that complicated processing is required, which causes a decrease in search speed. However, when a pattern image is stored as image data, a predetermined pattern is repeatedly displayed in the pattern image. Therefore, using the conventional image search method performs an unnecessary process.
例えば、特許文献1では、自己相関係数計算、周期性特徴量計算、統計的特徴量計算を行い、画像の周期性の有無を判別して、周期性を有すれば周期性特徴量に基づいて、周期性を有しなければ統計的特徴量に基づいて検索を行い、また、周期的特徴量は、画像全体について抽出するので、同じ模様が並んでいる模様画像においては、その模様画像中の全ての模様の特徴量を抽出することになるので、その分処理が複雑になり、更には特徴量のデータ量が大きくなる。他の文献も同様に、画像全体の画像データから分析処理する以上模様画像の特性を生かした検索方法となっていない。
For example, in
そこで、本発明は、模様画像の特性である所定のパターンを考慮した特徴量を用いて検索することにより高精度で高速の画像検索を行うことを可能とする模様画像検索装置及び模様画像検索プログラムを提供することを目的とするものである。 Therefore, the present invention provides a pattern image search device and a pattern image search program that can perform high-accuracy and high-speed image search by performing a search using a feature amount considering a predetermined pattern that is a characteristic of the pattern image. Is intended to provide.
本発明に係る模様画像検索装置は、所定のパターンを繰り返して構成される模様画像に関する元画像データを多数蓄積した画像データベースと、該画像データベースに蓄積された元画像データと当該元画像データの複製画像データとを重ねて、X―Y座標でX軸及びY軸上でずらしたときのピクセルの輝度の差分平均値がそれぞれ所定の閾値よりも小さくなる各軸上の位置に基づき矩形のパターン画像領域のサイズを決定するサイズ決定手段と、前記決定されたと同じサイズの矩形を元画像データに重ね、前記矩形をずらしたときの、その境界線における元画像データのピクセルの輝度分布に関する分散値を算出し、算出した分散値のうち最小となったときの矩形の領域を当該模様画像のパターン画像領域に設定し、設定されたパターン画像領域内の画像データに基づいて模様特徴量を抽出する模様特徴量抽出手段と、抽出された模様画像の模様特徴量を蓄積する手段と、検索対象の模様画像の模様特徴量及び蓄積された模様画像の模様特徴量を比較する手段と、比較結果に基づいて検索対象の模様画像に類似する模様画像を検索する手段と、を備えたことを特徴とする。
A pattern image retrieval apparatus according to the present invention includes an image database in which a large number of original image data relating to a pattern image configured by repeating a predetermined pattern, an original image data stored in the image database, and a copy of the original image data A rectangular pattern image based on the position on each axis where the average difference in pixel luminance is smaller than a predetermined threshold value when the image data is overlaid and shifted on the X and Y axes in the XY coordinates. A size determination means for determining the size of the region , and a dispersion value relating to a luminance distribution of pixels of the original image data at the boundary line when the rectangle having the same size as the determined image is overlaid on the original image data and the rectangle is shifted. calculated, the rectangular area when the smallest of the calculated variance value is set in the pattern image area of the pattern image, set pattern image And pattern feature extraction means for extracting a pattern feature amount based on the region of the image data, means for storing the pattern feature amount of the extracted pattern image, the pattern feature amount of the search target of the pattern image and the stored pattern image It means for comparing a pattern characteristic of, characterized by comprising a means for retrieving a pattern images similar to the search target pattern image based on the comparison result.
本発明に係る模様画像検索プログラムは、コンピュータを、所定のパターンを繰り返して構成される模様画像に関する元画像データを多数蓄積した画像データベースから読み出された元画像データと、当該元画像データの複製データとを重ねて、X―Y座標でX軸及びY軸上でずらしたときのピクセルの輝度の差分平均値がそれぞれ所定の閾値よりも小さくなる各軸上の位置に基づき矩形のパターン画像領域のサイズを決定するサイズ決定手段と、前記決定されたと同じサイズの矩形を元画像データに重ね、前記矩形をずらしたときの、その境界線における元画像データのピクセルの輝度分布に関する分散値を算出し、算出した分散値のうち最小となったときの矩形の領域を当該模様画像のパターン画像領域に設定し、設定されたパターン画像領域内の画像データに基づいて模様特徴量を抽出する模様特徴量抽出手段と、抽出された模様画像の模様特徴量を蓄積させる手段と、検索対象の模様画像の模様特徴量及び蓄積された模様画像の模様特徴量を比較する手段と、比較結果に基づいて検索対象の模様画像に類似する模様画像を検索する手段と、として機能させることを特徴とする。 Pattern image retrieval program according to the present invention, the computer, the original image data read out from the image database in which a large number storing original image data related to the pattern image formed by repeating a predetermined pattern, replication of the original image data overlapping the data, X-Y coordinate X-axis and Y difference average value of the luminance of the pixel when displaced on the axis rectangular pattern images based on respective positions on small Kunar each axis than the predetermined threshold A size determination means for determining the size of the region , and a dispersion value relating to a luminance distribution of pixels of the original image data at the boundary line when the rectangle having the same size as the determined image is overlaid on the original image data and the rectangle is shifted. The rectangular area when the calculated variance value is the minimum is set as the pattern image area of the pattern image, and the set pattern image is set. And pattern feature extraction means for extracting a pattern feature amount based on image data in the image area, and means for Ru to accumulate pattern feature amount of the extracted pattern image, is a pattern feature amount of the search target of the pattern image and storage It means for comparing the pattern feature amount pattern image, characterized in that to function as a means for retrieving a pattern images similar to the search target pattern image based on the comparison result.
本発明は、上記のような構成を有することで、模様画像の元画像データから所定パターンのパターン画像領域を決定してパターン画像領域内の画像データについて模様特徴量を抽出しているので、元画像データを分析処理する場合に比べデータ処理量を大幅に低減でき、高速のデータ処理が可能となる。そして、模様画像は繰り返し表出する所定パターンの画像データにその特徴が最もよく現われるので、パターン領域内の画像データから模様特徴量を抽出して検索を行えば精度の高い検索を行うことができる。また、検索対象の模様画像についても同様にパターン画像領域を決定して模様特徴量を抽出すれば、すべての模様画像が同一の条件で模様特徴量が算出され、以後に検索対象の模様画像の模様特徴量及び蓄積された模様画像の模様特徴量を比較する場合に正確にその類似性を比較することができ、検索対象の模様画像に類似する模様画像を検索する際の検索精度を高めることが可能となる。また、パターン画像領域を決定する場合に、例えば、エッジが明確な模様画像では、元画像データ及びその複製画像データを重ね合わせ、両者の表示位置をX軸方向及びY軸方向にそれぞれ所定量ずつずらせ、重合した画像領域における2つの画像データの差分を算出し、算出された差分が最も小さくなるX軸方向及びY軸方向のずらし量のうち最小値を前記パターン画像領域のサイズと決定することで、効率よくかつ正確にパターン画像領域のサイズを算出することが可能である。また、パターン画像領域を決定する場合に、例えば、エッジが明確でない模様画像では、元画像データをフーリエ変換してパワースペクトルを算出し、予め設定された閾値を超えたパワースペクトルに基づいてパターン画像領域のサイズを決定するようにすれば、効率よくかつ正確にパターン画像領域のサイズを算出することが可能である。上述した2つのパターン画像領域のサイズを決定するやり方は、どちらか一方を使用してもよいし、両方使用してパターン画像領域のサイズの精度を更に高めることもできる。 Since the present invention has the configuration as described above, the pattern feature amount is extracted from the image data in the pattern image area by determining the pattern image area of the predetermined pattern from the original image data of the pattern image. Compared with the case where image data is analyzed, the amount of data processing can be greatly reduced, and high-speed data processing becomes possible. The feature of the pattern image appears most frequently in the image data of the predetermined pattern that is repeatedly expressed. Therefore, if the search is performed by extracting the pattern feature amount from the image data in the pattern area, the search can be performed with high accuracy. . Similarly, if the pattern image region is extracted and the pattern feature amount is extracted for the pattern image to be searched, the pattern feature amount is calculated under the same conditions for all the pattern images. When comparing the pattern feature amount and the pattern feature amount of the accumulated pattern image, the similarity can be compared accurately, and the search accuracy when searching for a pattern image similar to the pattern image to be searched is improved. Is possible. When determining a pattern image area, for example, in a pattern image with clear edges, the original image data and its duplicate image data are overlapped, and the display positions of both are set in predetermined amounts in the X-axis direction and the Y-axis direction, respectively. The difference between the two image data in the shifted and overlapped image area is calculated, and the minimum value of the shift amounts in the X-axis direction and the Y-axis direction where the calculated difference is the smallest is determined as the size of the pattern image area. Thus, the size of the pattern image area can be calculated efficiently and accurately. When determining a pattern image area, for example, in a pattern image with unclear edges, the power image is calculated by Fourier transforming the original image data, and the pattern image is based on the power spectrum exceeding a preset threshold value. If the size of the area is determined, the size of the pattern image area can be calculated efficiently and accurately. Either one of the methods for determining the sizes of the two pattern image regions described above may be used, or both may be used to further increase the accuracy of the size of the pattern image region.
以下、本発明に係る実施形態について詳しく説明する。なお、以下に説明する実施形態は、本発明を実施するにあたって好ましい具体例であるから、技術的に種々の限定がなされているが、本発明は、以下の説明において特に発明を限定する旨明記されていない限り、これらの形態に限定されるものではない。 Hereinafter, embodiments according to the present invention will be described in detail. The embodiments described below are preferable specific examples for carrying out the present invention, and thus various technical limitations are made. However, the present invention clearly indicates that the invention is particularly limited in the following description. Unless otherwise specified, the present invention is not limited to these forms.
図1は、本発明の実施形態に関するブロック構成図を示している。CPU2は、全体を制御し演算処理を行い、ROM3はブートプログラム等を記憶し、RAM4はCPU2のワークエリアとして使用される。入力装置5は、画像登録命令や検索実行命令を入力するためのもので、表示装置6は、登録された模様画像や検索結果画像を表示するために用いられる。大容量記憶装置11は、アプリケーションプログラムや画像データ等を記憶しており、インターフェイス13(I/F)は、スキャナやデジタルカメラ等の画像入力機器12と接続されるようになっており、ネットワーク・アダプタ15は、ネットワーク14に接続するために用いられる。そして、これらのブロックは、バス1により相互に接続されて互いに通信を行うようになっている。
FIG. 1 is a block diagram showing an embodiment of the present invention. The
大容量記憶装置11には、模様画像検索を実行するための模様画像検索プログラム7、多数の模様画像に関する元画像データが蓄積される模様画像データベース8(以下「データベース」を「DB」と略称する。)、模様画像DB8に蓄積された元画像データに基づいて抽出したパターン画像領域内の画像データを蓄積するパターン画像DB9、パターン画像DB9に蓄積した画像データに基づいて抽出した模様特徴量を蓄積する模様特徴量DB10が記憶されている。
The large-
入力装置5としては、例えばキーボード、マウスやリモートコントローラー等が考えられ、表示装置6としては、CRT、液晶ディスプレイやプラズマディスプレイ等が考えられる。また、大容量記憶装置11としては、ハードディスクドライブ(HDD)やDVDドライブ等が考えられる。また、ネットワーク14としては、インターネットやLANが考えられる。
As the
図2は、本発明の実施形態に関する別のブロック構成図を示している。この例では、クライアント−サーバー方式を用いており、複数のクライアントPC16には画像入力機器12が接続されており、ネットワーク14を介してサーバ17に接続されている。サーバ17の大容量記憶装置には、図1の大容量記憶装置11と同様に、模様画像検索プログラム7、模様画像DB8、パターン画像DB9、模様特徴量DB10が記憶されている。クライアントPC16からサーバー17と接続することで模様画像検索を実行することができ、また、模様画像DB8を共有化することで、多数の模様画像をサーバー17に集中して蓄積することができ、模様画像の検索をより広範囲に行うことができるようになる。
FIG. 2 shows another block diagram related to the embodiment of the present invention. In this example, a client-server system is used, and an
本実施形態では、画像検索プログラム7を読み出してCPU2で実行することによって実現される。画像検索プログラム7は、ハードディスク、フレキシブルディスク、CD−ROM、MO、DVD等の大容量記憶装置に用いられる記録媒体に記録されて提供することができ、また、他のアプリケーションプログラムの一部として提供することができると共に、それのみ単独で提供することもできる。
In the present embodiment, the image search program 7 is read out and executed by the
また、画像検索プログラム7は、サーバ17からインターネットやLANのようなネットワーク14を介してクライアントPC16にダウンロードされて実行することも可能である。ネットワーク14としては、例えば放送波のような無線のネットワークでもよく、こうしたネットワークによって画像検索プログラム7を配信することもできる。
The image search program 7 can also be downloaded from the
図3は、模様画像を登録する場合の全体処理フローを示しており、図4は、模様画像を検索する場合の全体処理フローを示している。以下、図1のブロック構成を用いて処理フローを説明する。 FIG. 3 shows the overall processing flow when registering a pattern image, and FIG. 4 shows the overall processing flow when searching for a pattern image. The processing flow will be described below using the block configuration of FIG.
図3に示す模様画像登録処理を行う場合には、入力装置5及び画像入力機器12を操作して模様画像を元画像データとして入力(S1)し、CPU2は、模様画像DB8に入力された元画像データを蓄積する。次に、CPU2は、模様画像検索プログラム7を読み出してパターン画像データの抽出処理(S2)を行う。抽出処理は、模様画像DB8に蓄積した元画像データに基づいて模様画像に繰り返し表出するパターンに対応するパターン画像データを後述する方法で抽出する。抽出されたパターン画像データは、適切に抽出されたか確認するために表示装置6に表示するよう処理された(S3)後、画像サイズの正規化(例えば、100×100ピクセル)を行い、パターン画像DB9に蓄積される(S4)。そして、パターン画像DB9に蓄積されたパターン画像データに基づいて後述する模様特徴量の抽出処理(S5)を行い、抽出した模様特徴量を模様特徴量DB10に蓄積(S6)して終了する。
When the pattern image registration process shown in FIG. 3 is performed, the pattern image is input as original image data by operating the
以上のような処理により多数の模様画像に関するデータを大容量記憶装置11に蓄積していき、次の検索処理に用いる。
Data relating to a large number of pattern images is accumulated in the large-
図4に示す模様画像検索処理を行う場合には、入力装置5及び画像入力機器12を操作して検索対象の模様画像を元画像データとして入力(S10)する。そして、CPU2は、画像検索プログラム7を読み出して検索対象の模様画像の元画像データに基づいてパターン画像データの抽出処理(S11)を行う。抽出処理は、図3のステップS2と同様に行えばよい。抽出されたパターン画像データは、適切に抽出されたか確認するために表示装置6に表示するよう処理され(S12)た後、画像サイズの正規化(例えば、100×100ピクセル)を行って、図3のステップS5と同様の模様特徴量の抽出処理(S13)を行う。
When the pattern image search process shown in FIG. 4 is performed, a pattern image to be searched is input as original image data by operating the
次に、抽出された模様特徴量と模様特徴量DB10に蓄積された模様特徴量とを比較処理し(S14)、類似度の高い順に検索結果を表示(S15)する。表示する場合には、検索された模様画像の元画像データ及びパターン画像データを模様画像DB8及びパターン画像DB9から読み出して表示装置6に逐次表示していくことで、検索結果を効率よくチェックしていくことができる。
Next, the extracted pattern feature value is compared with the pattern feature value stored in the pattern feature value DB 10 (S14), and the search results are displayed in descending order of similarity (S15). When displaying, the original image data and the pattern image data of the retrieved pattern image are read from the pattern image DB 8 and the
ステップS14における模様特徴量の比較処理については、公知の手法を用いて行えばよい(例えば、特開2000−187731号公報参照)。画像の特徴量をベクトルデータとして特徴空間座標系における1つのポイントで表現することで、検索対象の模様画像のポイントと蓄積された模様画像のポイントと間の距離が、両者の類似度となる。検索対象の模様画像と蓄積された各模様画像との間の類似度を比較することで、類似度の高い順に検索することができるようになる。なお、類似度であるポイント間の距離の計算には一般にユークリッド距離などのベクトルの距離定義式が利用される。また、画像の特徴量の種類に合わせて独自の距離を定義することもできる。更に、複数の特徴量の類似度より総合類似度を求めることもできる。 The pattern feature amount comparison processing in step S14 may be performed using a known method (for example, see Japanese Patent Application Laid-Open No. 2000-187731). By expressing the feature amount of the image as vector data by one point in the feature space coordinate system, the distance between the point of the pattern image to be searched and the point of the accumulated pattern image becomes the similarity between them. By comparing the similarity between the pattern image to be searched and each of the accumulated pattern images, the search can be performed in descending order of similarity. It should be noted that vector distance definition formulas such as Euclidean distance are generally used to calculate the distance between points as the similarity. It is also possible to define a unique distance according to the type of feature amount of the image. Furthermore, the total similarity can be obtained from the similarity of a plurality of feature amounts.
図3及び図4におけるパターン画像データの抽出処理について説明する。図5には、模様画像の元画像データ及びその複製画像データの重ね合わせを用いた処理フローを示している。 The pattern image data extraction process in FIGS. 3 and 4 will be described. FIG. 5 shows a processing flow using the superimposition of the original image data of the pattern image and the duplicate image data.
まず、読み出した元画像データの複製画像データを作成し(S100)、2つの画像データを重合処理する。図6には、模様画像の例として星形の模様が繰り返し配列されたものを重合処理した例を示している。理解しやすくするために、元画像データは、右肩上がりハッチングを施した星形が規則的に並んだ模様画像120aで示されており、複製画像データは、右肩下がりハッチングを施した星型が規則的に並んだ模様画像120bで示されている。そして、重合処理されると、まず、図6(a)に示すように、2つの画像が完全に重なった状態とされる。そのため、重合部分120は元画像データ120a及び複製画像データ120bと同一となる。
First, duplicate image data of the read original image data is created (S100), and the two image data are superposed. FIG. 6 shows an example in which a star image is repeatedly arranged as an example of a pattern image. For ease of understanding, the original image data is shown as a
次に、重合部分120の画像データに関してピクセルの輝度について差分平均値を算出する(S102)。ピクセルの輝度は画像データの不連続部分であるエッジにおいて大きい差分が生じるため、エッジが多く存在すると差分平均値は大きくなる傾向がある。そして、2つの画像データ120a及び120bの模様がずれていると、重合部分120の画像データにエッジが多く生じるようになることから、差分平均値により2つの画像データの模様のずれの程度をみることができる。
Next, a difference average value is calculated for the luminance of the pixel with respect to the image data of the overlapped portion 120 (S102). Since the luminance of the pixel has a large difference at the edge that is a discontinuous portion of the image data, the difference average value tends to increase when there are many edges. If the patterns of the two
そこで、複製画像データ120bを数ピクセル分ずらして元画像データ120aと重合処理し(S103)、複製画像データ120bが元画像データ120aと重なった部分が存在する有効範囲内であるか否かチェックして(S104)、有効範囲内であれば再度ステップS102に戻って、重合部分120の画像データに関してピクセルの輝度について差分平均値を算出する。
Therefore, the
差分平均値g(i,j)は、以下の式により算出される。
図6(b)に示すように、x軸方向に複製画像データ120bをずらすと、2つの画像データは模様がずれた状態になるので、差分平均値は大きくなる。そして、図6(c)に示すようにさらにx軸方向にずらしていくと、2つの画像データは模様が一致して差分平均値は小さくなる。図6(d)に示すようにx軸方向及びy軸方向にずらした場合も2つの画像データの模様がずれた状態になって差分平均値は大きくなるが、図6(e)に示すようにさらにずらしていくと、2つの画像データの模様が一致して差分平均値が小さくなる。このように、複製画像データ120bを数ピクセル分ずつずらしていくとそのずらし量により差分平均値に大小が生じるようになる。
As shown in FIG. 6B, when the
以上のような処理を元画像データ120aの有効範囲内で繰り返して差分平均値を算出した後差分平均値のずらし量に対する分布を画像処理する(S105)。図7には、横軸にx軸方向のずらし量iをとり、縦軸にy軸方向のずらし量jをとって、差分平均値の分布をピクセルの輝度に変換して画像として表している。黒く示されているのは、差分平均値の小さい部分121で、初期状態である2つの画像データが完全に一致した場合(i=j=0)での差分平均値よりわずかに大きい閾値を設定し、その閾値より小さい差分平均値の分布を示している。閾値は、パターンの配置が正確な周期をなしていない場合や、ずらすピッチが大きい場合は、大きく設定した方がよい。
The above processing is repeated within the effective range of the
次に、図7に示す差分平均値の分布画像から、パターン画像領域のサイズを算出する(S106)。図7に示す分布画像に左下角のi=j=0の点を基準にして矩形122を描画し、矩形122の上辺122aと右辺122bを例えば1ピクセルずつ徐々に大きくして矩形122を徐々に広げていき、矩形122の上辺122a上にあるピクセルの輝度が予め設定した値より小さくなったときに、上辺122aの拡張を終了する。また、右辺122bも同様に、右辺122b上にあるピクセルの輝度が予め設定した値より小さくなったときに、拡張を終了する。両者の拡張が終了した時点の矩形122のサイズが、パターン画像領域のサイズとなる。すなわち、パターン画像領域の幅は上辺122aの長さとなり、パターン画像領域の高さは右辺122bの長さとなる。
Next, the size of the pattern image area is calculated from the distribution image of the difference average value shown in FIG. 7 (S106). A
このように、2つの画像データをずらしながら模様が一致する差分平均値の小さい位置に基づいて模様画像の所定パターンに対応したパターン画像領域のサイズを決めることができる。 In this way, the size of the pattern image area corresponding to the predetermined pattern of the pattern image can be determined based on the position where the difference average value where the patterns match while shifting the two image data.
次に、サイズが決められたパターン画像領域内に配置されるべき画像データを決める配置処理を行う(S107)。図8には、パターン画像領域の決められたサイズと同じ矩形122が元画像データ120aに重ねて表示された状態を示している。模様画像のパターン画像データは、なるべく独立した状態で抽出することが好ましい。そのため、元画像データに矩形122をずらしながら重ね合わせ、その境界線における元画像データのピクセルの輝度分布に関する分散値を算出する。
Next, an arrangement process for determining image data to be arranged in the pattern image area whose size has been determined is performed (S107). FIG. 8 shows a state in which a
矩形122で示される境界線に模様が重なっている状態では境界線における輝度分布の変動が大きくなり、分散値が大きくなる。逆に境界線に模様が重なっていない状態では、境界線における輝度分布の変動が小さくなり、分散値が小さくなる。したがって、境界線に模様ができるだけ重なっていない状態でパターン画像領域を配置すれば、より独立した状態のパターン画像が抽出できる。そこで、矩形122をずらしながら算出された分散値のうち最小値となった矩形122の配置状態でパターン画像領域を設定する(図8参照)。
In the state where the pattern overlaps the boundary line indicated by the
こうしてパターン画像領域のサイズ及び配置が決められると、元画像データからパターン画像領域内の画像データがパターン画像データとして抽出される(S108)。 When the size and arrangement of the pattern image area are thus determined, the image data in the pattern image area is extracted from the original image data as the pattern image data (S108).
図9には、パターン画像データの抽出処理の別の例を示している。この例では、抽出処理は、元画像データの周波数特性を用いる。画像データは、一般に正弦波又は余弦波で表される濃淡模様を重ね合せて表現できることが知られている。この場合、濃淡模様を表す正弦波又は余弦波をフーリエ変換し、画像を空間周波数領域において表現することで、画像の周波数特性が表れてくる。この例においてもこうした画像の周波数特性を用いて行う。 FIG. 9 shows another example of pattern image data extraction processing. In this example, the extraction process uses the frequency characteristics of the original image data. It is known that image data can be expressed by superimposing gray patterns generally represented by sine waves or cosine waves. In this case, the frequency characteristic of the image appears by performing Fourier transform on the sine wave or cosine wave representing the light and shade pattern and expressing the image in the spatial frequency domain. In this example as well, the image frequency characteristics are used.
まず、図6に示す星形模様の元画像データに対して公知の高速フーリエ変換(FFT)処理を行い(S200)、周波数分布を示す画像処理を行う(S201)。図10は、画像処理された周波数分布図を示している。横軸には横方向の周波数をとり、縦軸に縦方向の周波数をとり、周波数をピクセルの輝度に変換して表している。縦軸と横軸の交点は空間周波数領域123の中心点を表している。中心点から離れるほど周波数が高く、逆に中心点に近づくほど周波数が低くなっている。つまりは、中心からの距離が画像の濃淡模様を示す波の周波数の大きさを表し、中心からの方向がその波の方向を示している。規則性のある模様画像の場合は同じ周期で所定のパターンが現れるので、その最も顕著な周期を示す部分、つまりは周波数を示す部分が図10の黒く示す点のような周波数特徴部124として現れる。
First, a known fast Fourier transform (FFT) process is performed on the star-shaped original image data shown in FIG. 6 (S200), and an image process indicating a frequency distribution is performed (S201). FIG. 10 shows an image processed frequency distribution diagram. The horizontal axis represents the horizontal frequency, the vertical axis represents the vertical frequency, and the frequency is converted into pixel luminance. The intersection of the vertical axis and the horizontal axis represents the center point of the
次に、図10に示す周波数分布図を用いてパターン画像領域のサイズ算出処理を行う(S202)。周波数分布図の中心点を中心とする半径1ピクセルの円を描き、その半径を徐々に大きくしていく。円の円周上のいずれかのピクセルの輝度が予め設定された閾値より小さくなった場合に円の拡張を終了する。輝度が閾値より小さくなったピクセル位置の中心点からみた角度θ及び距離Fが、それぞれ周波数成分の角度と周波数となる。パターン画像領域を矩形状とした場合、角度はパターン画像領域の対角線の角度であり、周波数からはその逆数である波長、すなわちパターン画像領域の対角線の長さが求められる。したがって、対角線の角度と長さからパターン画像領域のサイズが一意的に決めることができる。 Next, the size calculation process of the pattern image region is performed using the frequency distribution diagram shown in FIG. 10 (S202). A circle with a radius of 1 pixel centered on the center point of the frequency distribution diagram is drawn, and the radius is gradually increased. When the luminance of any pixel on the circumference of the circle becomes smaller than a preset threshold value, the expansion of the circle is terminated. The angle θ and the distance F viewed from the center point of the pixel position where the luminance is smaller than the threshold value are the angle and frequency of the frequency component, respectively. When the pattern image area is rectangular, the angle is an angle of the diagonal line of the pattern image area, and the wavelength that is the reciprocal of the frequency, that is, the length of the diagonal line of the pattern image area is obtained. Therefore, the size of the pattern image region can be uniquely determined from the angle and length of the diagonal line.
決定されたパターン画像領域のサイズを用いて、S107と同様にパターン画像領域の配置処理を行い(S203)、S108と同様にパターン画像領域内の画像データをパターン画像データとして抽出処理する(S204)。 Using the determined size of the pattern image area, pattern image area placement processing is performed in the same manner as in S107 (S203), and image data in the pattern image area is extracted as pattern image data in the same manner as in S108 (S204). .
以上のように、パターン画像データの抽出処理として2つの例を説明したが、重ね合わせによる抽出処理では、模様画像の所定のパターンの形状がほぼ同一で、1パターンの形状が明確な場合(例えば、図6に示すようなほぼ同じ星形が規則的に並んでいる模様画像)に有効である。一方、周波数特性による抽出処理では、模様画像に一定の規則性はあるが、1パターンの形状が明確ではなく、同じ模様画像同士を重ね合わせても正確な一致が困難な場合(例えば、麻袋の表面に類する模様画像)に有効である。そして、両方の処理を組み合わせることで、パターン画像の抽出精度を高めることもできる。また、模様の種類により、ユーザーが抽出処理を選択して行うようにしてもよい。 As described above, two examples of pattern image data extraction processing have been described. However, in the extraction processing by superposition, the shape of a predetermined pattern of the pattern image is almost the same and the shape of one pattern is clear (for example, This is effective for a pattern image in which substantially the same star shape is regularly arranged as shown in FIG. On the other hand, in the extraction process based on frequency characteristics, the pattern image has a certain regularity, but the shape of one pattern is not clear, and accurate matching is difficult even if the same pattern image is superimposed (for example, This is effective for a pattern image similar to the surface). Then, by combining both processes, the pattern image extraction accuracy can be increased. Further, the extraction process may be selected by the user depending on the pattern type.
次に、ステップS5及びS13で行われる模様特徴量の抽出処理について詳述する。図11に示すように、パターン画像130が抽出処理により抽出されている。模様画像の場合には、色や輝度よりも模様の形状が重視される傾向がある。そこで、パターン画像130からエッジを抽出する処理を行う。ここで、エッジとは、濃淡画像に含まれる濃度の変化が激しい部分のことであり、エッジは1つの領域が終わって別の領域が始まっている境界線、例えば物体の輪郭形状を表現する線であったり、切れ目/裂け目/シワ等の断片的線分とみなすことができるので、パターン画像のエッジ抽出により得られるエッジ画像は、パターン画像の特徴を最もよく表しているものと考えられる。エッジの抽出には、例えばSobel等の一般的なエッジ検出法を用いる。これによりパターン画像130から、エッジ強度を示す多値画像である、パターンエッジ画像131が得られる。
Next, the pattern feature amount extraction processing performed in steps S5 and S13 will be described in detail. As shown in FIG. 11, the
次に、パターンエッジ画像131を予め決められた数のブロック132に分割して、各ブロック132のエッジの方向やエッジ強度の平均値等を特徴量として抽出する。ブロックに分割することにより、パターンエッジ画像131におけるエッジの方向及び強度がブロック毎に決まるので、位置情報が加わることになる。こうした求められたブロックごとのエッジの方向及び強度並びに位置情報が模様特徴量として抽出される。
Next, the
本発明の実施態様としては、以下のものが考えられる。 The following can be considered as embodiments of the present invention.
第一に、決定されたサイズに対応した境界線に沿った元画像データの輝度分布に関する分散値を当該境界線の設定位置を所定量ずつずらして算出し、算出された前記分散値のうち最小値となる設定位置の境界線により画定される画像領域を前記パターン画像領域として決定するようにすれば、独立したパターンに対応するパターン画像領域に設定することができる。すなわち、模様に繰り返し現われる所定のパターンに境界線が設定されると、一般に境界線上の輝度分布が激しく変動することから、なるべく輝度分布の変動が少ない−分散値が低い位置に境界線を設定すれば、所定のパターンから離れた位置に境界線が設定されていると考えられる。したがって、所定のパターンを独立した状態でパターン画像領域とすることができる。
First, a variance value related to the luminance distribution of the original image data along the boundary line corresponding to the determined size is calculated by shifting the set position of the boundary line by a predetermined amount, and the smallest of the calculated variance values If the image area defined by the boundary line of the setting position as a value is determined as the pattern image area, it can be set to a pattern image area corresponding to an independent pattern. That is, when a boundary line is set in a predetermined pattern that repeatedly appears in the pattern, the luminance distribution on the boundary line generally fluctuates violently. Therefore, the luminance distribution varies as little as possible-the boundary line is set at a position where the variance value is low. For example, it is considered that the boundary line is set at a position away from the predetermined pattern. Therefore, a predetermined pattern can be used as a pattern image region in an independent state.
第二に、模様特徴量を蓄積する際に当該模様画像に関するパターン画像領域内の画像データを表示したり、検索された類似する模様画像の元画像データ及びパターン画像領域内の画像データを表示したりすることで、パターン画像領域が適切に設定されているか処理結果の確認を行うことができ、また、検索結果を視認しながら確認できるといった利便性を高めることが可能となる。 Second, when accumulating the pattern feature amount, the image data in the pattern image area related to the pattern image is displayed, or the original image data of the searched similar pattern image and the image data in the pattern image area are displayed. As a result, the processing result can be confirmed whether the pattern image area is appropriately set, and the convenience of checking the search result while visually confirming it can be improved.
1・・バス、2・・CPU、3・・ROM、4・・RAM、
5・・入力装置、6・・表示装置、7・・画像検索プログラム、
8・・模様画像DB、9・・パターン画像DB、10・・模様特徴量DB、
11・・大容量記憶装置、12・・画像入力機器、13・・I/F、
14・・ネットワーク、15・・ネットワーク・アダプタ、
16・・クライアントPC、17・・サーバ。
1 .... bus, 2 .... CPU, 3 .... ROM, 4 .... RAM,
5 .... Input device, 6 .... Display device, 7 .... Image search program,
8... Pattern image DB, 9... Pattern image DB, 10.
11 .. Mass storage device, 12 .... Image input device, 13 .... I / F,
14. Network, 15. Network adapter,
16. Client PC, 17 ... server.
Claims (2)
前記決定されたと同じサイズの矩形を元画像データに重ね、前記矩形をずらしたときの、その境界線における元画像データのピクセルの輝度分布に関する分散値を算出し、算出した分散値のうち最小となったときの矩形の領域を当該模様画像のパターン画像領域に設定し、設定されたパターン画像領域内の画像データに基づいて模様特徴量を抽出する模様特徴量抽出手段と、
抽出された模様画像の模様特徴量を蓄積する手段と、検索対象の模様画像の模様特徴量及び蓄積された模様画像の模様特徴量を比較する手段と、比較結果に基づいて検索対象の模様画像に類似する模様画像を検索する手段と、を備えたことを特徴とする模様画像検索装置。 An image database in which a large number of original image data relating to a pattern image constituted by repeating a predetermined pattern is accumulated, and the original image data accumulated in the image database and the duplicate image data of the original image data are overlapped, and XY Size determining means for determining the size of the rectangular pattern image area based on the position on each axis where the average difference value of the luminance of the pixels when shifted on the X-axis and Y-axis in coordinates is smaller than a predetermined threshold value; ,
A rectangle having the same size as that determined is overlaid on the original image data, and when the rectangle is shifted, a variance value related to the luminance distribution of the pixels of the original image data at the boundary line is calculated, and the minimum of the calculated variance values is calculated. A pattern feature amount extraction unit that sets a rectangular region when the pattern image region becomes to be a pattern image region of the pattern image, and extracts a pattern feature amount based on image data in the set pattern image region;
Means for accumulating the pattern feature quantity of the extracted pattern image, means for comparing the pattern feature quantity of the pattern image to be searched and the pattern feature quantity of the accumulated pattern image, and the pattern image to be searched based on the comparison result pattern image retrieval apparatus characterized by comprising a means for retrieving a pattern image similar to.
所定のパターンを繰り返して構成される模様画像に関する元画像データを多数蓄積した画像データベースから読み出された元画像データと、当該元画像データの複製データとを重ねて、X―Y座標でX軸及びY軸上でずらしたときのピクセルの輝度の差分平均値がそれぞれ所定の閾値よりも小さくなる各軸上の位置に基づき矩形のパターン画像領域のサイズを決定するサイズ決定手段と、
前記決定されたと同じサイズの矩形を元画像データに重ね、前記矩形をずらしたときの、その境界線における元画像データのピクセルの輝度分布に関する分散値を算出し、算出した分散値のうち最小となったときの矩形の領域を当該模様画像のパターン画像領域に設定し、設定されたパターン画像領域内の画像データに基づいて模様特徴量を抽出する模様特徴量抽出手段と、
抽出された模様画像の模様特徴量を蓄積させる手段と、
検索対象の模様画像の模様特徴量及び蓄積された模様画像の模様特徴量を比較する手段と、
比較結果に基づいて検索対象の模様画像に類似する模様画像を検索する手段と、
として機能させることを特徴とする模様画像検索プログラム。
Computer
Overlapping the original image data read from the image database storing a large number of original image data related to the pattern image formed by repeating a predetermined pattern, and a replication data of the original image data, X-axis in X-Y coordinate and a size determination means for difference average value of the luminance of the pixel when displaced on the Y axis to determine the size of the rectangular pattern image area based on respective positions on each small Kunar axis than a predetermined threshold value,
A rectangle having the same size as that determined is overlaid on the original image data, and when the rectangle is shifted, a variance value related to the luminance distribution of the pixels of the original image data at the boundary line is calculated, and the minimum of the calculated variance values is calculated. the rectangular area when it becomes set in the pattern image area of the pattern image, and pattern feature extraction means for extracting a pattern feature amount based on image data of the set pattern image area,
It means for Ru to accumulate pattern feature amount of the extracted pattern image,
Means for comparing the pattern feature quantity of the pattern image to be searched and the pattern feature quantity of the accumulated pattern image ;
It means for retrieving a pattern images similar to the search target pattern image based on the comparison result,
A pattern image search program characterized by functioning as
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004011992A JP4497399B2 (en) | 2004-01-20 | 2004-01-20 | Pattern image search device and pattern image search program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004011992A JP4497399B2 (en) | 2004-01-20 | 2004-01-20 | Pattern image search device and pattern image search program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2005208739A JP2005208739A (en) | 2005-08-04 |
JP4497399B2 true JP4497399B2 (en) | 2010-07-07 |
Family
ID=34898511
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004011992A Expired - Fee Related JP4497399B2 (en) | 2004-01-20 | 2004-01-20 | Pattern image search device and pattern image search program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4497399B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5741007B2 (en) * | 2011-01-21 | 2015-07-01 | 株式会社リコー | Image processing apparatus, pixel interpolation method, and program |
JP5703777B2 (en) * | 2011-01-24 | 2015-04-22 | 株式会社リコー | Image processing apparatus, pixel interpolation method, and program |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001218046A (en) * | 2000-02-02 | 2001-08-10 | Ricoh Co Ltd | Dot area judging method |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3726442B2 (en) * | 1997-09-01 | 2005-12-14 | コニカミノルタビジネステクノロジーズ株式会社 | Image feature amount comparison device and recording medium on which image feature amount comparison program is recorded |
-
2004
- 2004-01-20 JP JP2004011992A patent/JP4497399B2/en not_active Expired - Fee Related
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001218046A (en) * | 2000-02-02 | 2001-08-10 | Ricoh Co Ltd | Dot area judging method |
Also Published As
Publication number | Publication date |
---|---|
JP2005208739A (en) | 2005-08-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102016880B (en) | Scale robust feature-based identifiers for image identification | |
KR100353798B1 (en) | Method for extracting shape descriptor of image object and content-based image retrieval system and method using it | |
Wong et al. | Dynamic and hierarchical multi-structure geometric model fitting | |
US9201879B2 (en) | Method, apparatus and system for generating a feature vector | |
JP4924165B2 (en) | Shape comparison device and shape comparison method | |
JP5487970B2 (en) | Feature point arrangement collation apparatus, image collation apparatus, method and program thereof | |
EP2172856A2 (en) | Image processing apparatus, image processing method and program | |
US20120301014A1 (en) | Learning to rank local interest points | |
US7177480B2 (en) | Graphic processing method and device | |
US20030185445A1 (en) | Method for extracting and matching gesture features of image | |
JP2006523345A (en) | Shape matching method for indexing and searching multimedia data | |
WO2008100248A2 (en) | Feature matching method | |
US20200005078A1 (en) | Content aware forensic detection of image manipulations | |
JP2008225692A (en) | Image retrieval method, device and program | |
JP4721829B2 (en) | Image retrieval method and apparatus | |
JP5705611B2 (en) | Apparatus and method for detecting rotation angle from normal position of image | |
JP4497399B2 (en) | Pattern image search device and pattern image search program | |
JP2005208740A (en) | Sub-image search apparatus and sub-image search program | |
US20080112619A1 (en) | Ruled-line-projection extracting apparatus, ruled-line projection extracting method, and computer product | |
US20130114898A1 (en) | Template matching processing device and template matching processing program | |
JP2002183732A (en) | Pattern recognition method and computer-readable storage medium stored with program executing pattern recognition | |
JP2006221525A (en) | Object retrieval system and method | |
JP5229161B2 (en) | Information providing apparatus, information providing method, and information providing program | |
JP4525526B2 (en) | Pattern matching method and apparatus | |
CN113077410A (en) | Image detection method, device and method, chip and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20061228 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20091014 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20091016 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20091214 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100113 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100315 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20100408 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20100408 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130423 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140423 Year of fee payment: 4 |
|
LAPS | Cancellation because of no payment of annual fees |