JP2015203978A - Image processor, image retrieval device, and method for controlling image processor - Google Patents

Image processor, image retrieval device, and method for controlling image processor Download PDF

Info

Publication number
JP2015203978A
JP2015203978A JP2014083097A JP2014083097A JP2015203978A JP 2015203978 A JP2015203978 A JP 2015203978A JP 2014083097 A JP2014083097 A JP 2014083097A JP 2014083097 A JP2014083097 A JP 2014083097A JP 2015203978 A JP2015203978 A JP 2015203978A
Authority
JP
Japan
Prior art keywords
image
feature amount
search
area
similar
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2014083097A
Other languages
Japanese (ja)
Other versions
JP6355400B2 (en
Inventor
昌弘 松下
Masahiro Matsushita
昌弘 松下
椎山 弘隆
Hirotaka Shiiyama
弘隆 椎山
日出来 空門
Hideki Sorakado
日出来 空門
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2014083097A priority Critical patent/JP6355400B2/en
Priority to US14/680,118 priority patent/US9594981B2/en
Publication of JP2015203978A publication Critical patent/JP2015203978A/en
Application granted granted Critical
Publication of JP6355400B2 publication Critical patent/JP6355400B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Processing Or Creating Images (AREA)

Abstract

PROBLEM TO BE SOLVED: To make those images retrievable without registering a local feature amount from the same image.SOLUTION: An image processor includes an input part for inputting an image of a registration object, a division part for dividing the inputted image into a plurality of areas in accordance with the image, a calculation part for calculating a feature amount of the image in each divided image area, a retrieval part for retrieving similar images from images which have already been registered by using the feature amount in each divided area, and registration part for registering the feature amount of the image of the corresponding divided area in the case that the retrieval part does not retrieve a similar image.

Description

本発明は画像検索技術に関するものである。   The present invention relates to an image search technique.

画像の局所的な特徴量(局所特徴量)を用いて類似画像を検索する方法が提案されている。この方法では、まず、画像から特徴的な点(局所特徴点)を抽出する(非特許文献1)。次に、当該局所特徴点とその周辺の画像情報とに基づいて、当該局所特徴点に対応する特徴量(局所特徴量)を計算する(非特許文献2)。   There has been proposed a method of searching for a similar image using a local feature amount (local feature amount) of an image. In this method, first, characteristic points (local feature points) are extracted from an image (Non-Patent Document 1). Next, a feature amount (local feature amount) corresponding to the local feature point is calculated based on the local feature point and surrounding image information (Non-Patent Document 2).

局所特徴量を利用する手法においては、局所特徴量を回転不変、拡大・縮小不変となる複数の要素で構成される情報として定義する。これにより、画像を回転させたり、拡大又は縮小させたりした場合であっても、検索を可能にする。局所特徴量は一般的にベクトルとして表現される。   In the method using the local feature amount, the local feature amount is defined as information including a plurality of elements that are rotation invariant and enlargement / reduction invariant. Thereby, even when the image is rotated, enlarged or reduced, the search can be performed. The local feature amount is generally expressed as a vector.

回転不変の局所特徴量抽出のために、たとえば非特許文献2では、局所特徴点周辺の局所領域の画素パターンから主方向を算出し、局所特徴量算出時に主方向を基準に局所領域を回転させて方向の正規化を行う。また、拡大・縮小不変の局所特徴量を算出するために、異なるスケールの画像を内部で生成し、各スケールの画像からそれぞれ局所特徴点の抽出と局所特徴量の算出を行う。ここで、内部で生成した一連の異なるスケールの画像集合は一般的にスケールスペースと呼ばれる。   In order to extract the rotation-invariant local feature value, for example, in Non-Patent Document 2, the main direction is calculated from the pixel pattern of the local region around the local feature point, and the local region is rotated based on the main direction when calculating the local feature value. To normalize the direction. Further, in order to calculate the local feature quantity that does not change in size, the image of different scales is generated internally, and local feature points are extracted from the images of the respective scales and the local feature quantities are calculated. Here, a series of image sets of different scales generated internally is generally called a scale space.

上述の方式により、1枚の画像から複数の局所特徴点が抽出される。局所特徴量を用いた画像検索では、それぞれの局所特徴点から算出した局所特徴量同士の比較を行うことによりマッチングを行う。多く利用されている投票方式(特許文献1)は、検索元画像から抽出された各特徴点の局所特徴量に所定以上類似する特徴点を最近傍処理で見つけ、存在すれば「画像」に対して1票を投票し、その投票数の多いものほど類似するとするものである。   With the above-described method, a plurality of local feature points are extracted from one image. In image retrieval using local feature amounts, matching is performed by comparing local feature amounts calculated from respective local feature points. A widely used voting method (Patent Document 1) finds a feature point that is similar to a local feature amount of each feature point extracted from a search source image by a nearest neighbor process. The more votes, the more similar the votes are.

一方、ユーザがプリンタなどから出力したジョブの内容を蓄積し、いつ、誰が、どのようなジョブを実行したのかを追跡可能とする情報漏洩抑止システムに関する技術が提案されている(特許文献2)。画像の漏洩を抑止するために、画像から抽出した特徴量を登録しておき、類似画像の検索を行うことで、画像を出力したジョブを特定する。   On the other hand, there has been proposed a technology related to an information leakage suppression system that accumulates the contents of a job output by a user from a printer or the like and can track when and who executed what job (Patent Document 2). In order to suppress the leakage of the image, the feature amount extracted from the image is registered, and a similar image is searched to identify the job that has output the image.

特開2009-284084号公報JP 2009-284084 特許4921202号公報Japanese Patent No.4921202

C.Harris and M.J. Stephens,“A combined corner and edge detector," In Alvey Vision Conference,pages 147-152, 1988.C. Harris and M.J. Stephens, “A combined corner and edge detector,” In Alvey Vision Conference, pages 147-152, 1988. David G. Lowe, “Distinctive Image Features from Scale-Invariant Keypoints," International Journal of Computer Vision, 60, 2 (2004), pp.91-110.David G. Lowe, “Distinctive Image Features from Scale-Invariant Keypoints,” International Journal of Computer Vision, 60, 2 (2004), pp.91-110.

オフィスでは、複数の人が同じドキュメントを印刷する機会が多々ある。前述の情報漏洩抑止システムにおいて、同じドキュメントが印刷された場合、印刷する度に特徴量をシステムに登録していた。したがって、同じ特徴量がシステムに複数回登録されているという冗長な状態であった。そして、登録されているすべての特徴量との比較を行い、検索結果を生成していた。   In the office, there are many opportunities for multiple people to print the same document. In the above-described information leakage suppression system, when the same document is printed, the feature amount is registered in the system every time it is printed. Therefore, the same feature amount is redundantly registered in the system a plurality of times. Then, comparison is made with all the registered feature quantities, and search results are generated.

従来使用していた非局所的(グローバル)特徴量は、固定サイズで、特徴量サイズも小さく、高速な検索も可能であったため、冗長なデータベースではあったが、大きな問題にはなっていなかった。   The non-local (global) feature used in the past was a fixed size, small feature size, and high-speed search was possible, so it was a redundant database, but it was not a big problem. .

しかしながら、局所特徴量のサイズは、従来の特徴量サイズと比較して数百倍から数千倍大きくなる。したがって、登録数が多くなったときには、データベースの肥大化が課題となる。更にデータベースの肥大化は、検索速度にも影響を及ぼす。従来の方法では、冗長な登録が行われるため、データベースの肥大化を加速させてしまうという課題があった。   However, the size of the local feature amount is hundreds to thousands times larger than the conventional feature amount size. Therefore, when the number of registrations increases, the enlargement of the database becomes a problem. Furthermore, the enlargement of the database affects the search speed. In the conventional method, since redundant registration is performed, there has been a problem of accelerating the enlargement of the database.

また、オフィスでドキュメントを印刷する際、用紙やトナーなどを節約するため、複数ページのドキュメントを縮小し、1ページに割りつけて印刷する機会も多い。そのような縮小した画像からも、原理的にほぼ同じ局所特徴量が抽出されるため、これらをそのまま登録すると、同様に冗長な登録が行われてしまうという課題があった。   In addition, when printing a document in an office, in order to save paper, toner, and the like, there are many opportunities to reduce a plurality of pages of documents and assign them to one page for printing. Since, in principle, almost the same local feature amount is extracted from such a reduced image, there is a problem that redundant registration is similarly performed if these are registered as they are.

本発明は、同じ画像から抽出した局所特徴量を冗長して登録せずに、かつ、それらの画像の検索が可能な方法を提供しようとするものである。   The present invention intends to provide a method capable of searching for images without redundant registration of local feature values extracted from the same image.

この課題を解決するため、例えば本発明の画像処理装置は以下の構成を備える。すなわち、
画像検索装置に画像を登録する画像処理装置であって、
登録対象の画像を入力する入力手段と、
入力した画像を、当該画像に応じて複数の領域に分割する分割手段と、
分割した領域毎に、画像の特徴量を算出する算出手段と、
分割した領域毎に、前記特徴量を用いて、既に登録済み画像から類似画像を検索する検索手段と、
該検索手段の検索結果に類似画像が存在しない場合、前記分割した該当する領域の画像の特徴量を登録する登録手段とを有する。
In order to solve this problem, for example, an image processing apparatus of the present invention has the following configuration. That is,
An image processing apparatus for registering an image in an image search apparatus,
An input means for inputting an image to be registered;
Dividing means for dividing the input image into a plurality of regions according to the image;
Calculating means for calculating the feature amount of the image for each divided area;
Search means for searching for similar images from already registered images using the feature amount for each divided area;
And a registration unit that registers the feature amount of the image of the divided corresponding area when a similar image does not exist in the search result of the search unit.

本発明によれば、同じ画像から抽出した局所特徴量を冗長して登録せずに、かつ、それらの画像の検索が可能となる。   According to the present invention, it is possible to search for images without redundant registration of local feature amounts extracted from the same image.

第1の実施形態を適用するコンピュータ装置の構成図。The block diagram of the computer apparatus to which 1st Embodiment is applied. 第1の実施形態における画像処理装置の機能構成例を示すブロック図。FIG. 2 is a block diagram illustrating a functional configuration example of the image processing apparatus according to the first embodiment. 第1の実施形態における入力画像の一例を示す図。FIG. 5 is a diagram illustrating an example of an input image according to the first embodiment. 第1の実施形態における登録処理の一例を示すフローチャート。6 is a flowchart illustrating an example of a registration process according to the first embodiment. 第1の実施形態における画像特徴量の抽出処理の一例を示すフローチャート。5 is a flowchart illustrating an example of image feature amount extraction processing according to the first embodiment. 第1の実施形態における縮小画像生成処理の一例を示す図。FIG. 6 is a diagram illustrating an example of a reduced image generation process according to the first embodiment. 第1の実施形態における2次元の特徴量空間の格子形状への分割例を示す図。The figure which shows the example of a division | segmentation into the lattice shape of the two-dimensional feature-value space in 1st Embodiment. 第1の実施形態における画像登録処理手順の一例を示すフローチャート。6 is a flowchart illustrating an example of an image registration processing procedure according to the first embodiment. 第1の実施形態における画像特徴量をデータベースに登録するときのスキーマの一例を示す図。The figure which shows an example of the schema when registering the image feature-value in 1st Embodiment in a database. 第1の実施形態における一致領域特定処理結果の一例を示す図。The figure which shows an example of the coincidence area | region specific process result in 1st Embodiment. 第1の実施形態におけるリンク情報を登録後のデータベーステーブルの一例を示す図。The figure which shows an example of the database table after registering the link information in 1st Embodiment. 第1の実施形態における割り付け画像判定処理手順を示すフローチャート。The flowchart which shows the allocation image determination processing procedure in 1st Embodiment. 第1の実施形態における割り付け画像に関しての情報の一例を示す図。The figure which shows an example of the information regarding the layout image in 1st Embodiment. 第1の実施形態における処理対象画像における一致領域を処理対象画像全体に広げた時の領域に対応する検索結果画像の領域を説明する図。The figure explaining the area | region of the search result image corresponding to the area | region when the matching area | region in the process target image in 1st Embodiment is extended to the whole process target image. 第1の実施形態における画像の分割再登録処理手順を示すフローチャート。6 is a flowchart illustrating an image division re-registration process procedure according to the first embodiment. 第1の実施形態における画像の分割再登録後のデータベーステーブルの一例を示す図。The figure which shows an example of the database table after the division | segmentation re-registration of the image in 1st Embodiment. 第1の実施形態における類似基準画像検索処理手順を示すフローチャート。6 is a flowchart illustrating a similarity reference image search processing procedure according to the first embodiment. 第1の実施形態における一致領域特定処理手順を示すフローチャート。5 is a flowchart illustrating a matching area specifying process procedure according to the first embodiment. 第1の実施形態における最短距離対応点リストのスキーマの一例を示す図。The figure which shows an example of the schema of the shortest distance corresponding | compatible point list | wrist in 1st Embodiment. 第1の実施形態における正対応点リスト作成処理手順を示すフローチャート。The flowchart which shows the corresponding point list creation process sequence in 1st Embodiment. 第1の実施形態における検索処理手順の一例を示すフローチャート。5 is a flowchart illustrating an example of a search processing procedure according to the first embodiment. 第2の実施形態における割り付け画像判定処理手順を示すフローチャート。10 is a flowchart illustrating a procedure for an allocated image determination process according to the second embodiment. 第2の実施形態における像域分離結果の一例を示す図。FIG. 10 is a diagram illustrating an example of an image area separation result according to a second embodiment. 第2の実施形態における像域分離結果の画像を割り付け分割するときの分割位置の例を示す図。The figure which shows the example of the division position when assigning and dividing the image of the image area separation result in the second embodiment. 第3の実施形態における登録処理手順を示すフローチャート。The flowchart which shows the registration processing procedure in 3rd Embodiment. 第3の実施形態における画像登録処理手順を示すフローチャート。10 is a flowchart illustrating an image registration processing procedure according to the third embodiment.

以下、添付図面に従って本発明に係る実施形態を詳細に説明する。   Hereinafter, embodiments according to the present invention will be described in detail with reference to the accompanying drawings.

[第1の実施形態]
まず、第1の実施形態におけるサーバ装置やクライアント装置を構成するコンピュータ装置の構成について、図1のブロック図を参照して説明する。サーバ装置やクライアント装置はそれぞれ単一のコンピュータ装置で実現してもよいし、必要に応じた複数のコンピュータ装置に各機能を分散して実現するようにしてもよい。複数のコンピュータ装置で構成される場合は、互いに通信可能なようにLocal Area Network(LAN)などで接続されている。コンピュータ装置は、パーソナルコンピュータ(PC)やワークステーション(WS)等の情報処理装置によって実現することができる。
[First Embodiment]
First, the configuration of a computer device constituting the server device and the client device in the first embodiment will be described with reference to the block diagram of FIG. Each of the server device and the client device may be realized by a single computer device, or may be realized by distributing each function to a plurality of computer devices as necessary. When configured by a plurality of computer devices, they are connected by a local area network (LAN) or the like so that they can communicate with each other. The computer device can be realized by an information processing device such as a personal computer (PC) or a workstation (WS).

図1において、CPU101はコンピュータ装置100全体を制御するCentral Processing Unitである。ROM102は変更を必要としないプログラムやパラメータを格納するRead Only Memoryである。RAM103は外部装置などから供給されるプログラムやデータを一時記憶するRandom Access Memoryである。外部記憶装置104はコンピュータ装置100に固定して設置されたハードディスクやメモリカードなどの記憶装置である。なお、外部記憶装置104は、コンピュータ装置100から着脱可能なフレキシブルディスク(FD)やCompact Disk(CD)等の光ディスク、磁気や光カード、ICカード、メモリカードなどを含んでもよい。入力デバイスインターフェイス105はユーザの操作を受け、データを入力するポインティングデバイスやキーボードなどの入力デバイス109とのインターフェイスである。出力デバイスインターフェイス106はコンピュータ装置100の保持するデータや供給されたデータを表示するためのモニタ110とのインターフェイスである。通信インターフェイス107はインターネットなどのネットワーク回線111や、デジタルカメラ112,デジタルビデオカメラ113,スマートフォン114などに接続するための通信インターフェイスである。システムバス108は101〜107の各ユニットを通信可能に接続する伝送路である。   In FIG. 1, a CPU 101 is a central processing unit that controls the entire computer apparatus 100. The ROM 102 is a Read Only Memory that stores programs and parameters that do not need to be changed. A RAM 103 is a Random Access Memory that temporarily stores programs and data supplied from an external device. The external storage device 104 is a storage device such as a hard disk or a memory card that is fixedly installed in the computer device 100. The external storage device 104 may include an optical disk such as a flexible disk (FD) and a Compact Disk (CD) that can be detached from the computer apparatus 100, a magnetic or optical card, an IC card, a memory card, and the like. The input device interface 105 is an interface with an input device 109 such as a pointing device or a keyboard that receives data from a user and inputs data. The output device interface 106 is an interface with the monitor 110 for displaying data held by the computer apparatus 100 and supplied data. The communication interface 107 is a communication interface for connecting to a network line 111 such as the Internet, a digital camera 112, a digital video camera 113, a smartphone 114, and the like. The system bus 108 is a transmission path that connects the units 101 to 107 so that they can communicate with each other.

後述する各動作は、ROM102等のコンピュータ読み取り可能な記憶媒体に格納されたプログラムをCPU101が実行することにより実行される。   Each operation described later is executed by the CPU 101 executing a program stored in a computer-readable storage medium such as the ROM 102.

図2は、第1の実施形態における画像処理装置の機能構成例を示すブロック図である。図2に示す各構成における動作の詳細については、後述する。   FIG. 2 is a block diagram illustrating a functional configuration example of the image processing apparatus according to the first embodiment. Details of the operation in each configuration shown in FIG. 2 will be described later.

第1の実施形態は、画像特徴量を用いて類似画像を検索するにあたって、入力画像から画像特徴量を算出し、登録する処理に関する。更に、入力画像から画像特徴量を算出し、登録されている画像特徴量と比較することにより、類似する画像を検索する処理に関する。また、複数の画像を割り付けることによって生成された画像(以降、割り付け画像)を登録する場合は、元の複数の画像に分割し、それらの画像ごとに画像特徴量を算出し、登録する。ここでは、分割された元の複数の画像のそれぞれを基準画像という。   The first embodiment relates to a process of calculating and registering an image feature amount from an input image when searching for a similar image using the image feature amount. Further, the present invention relates to processing for searching for similar images by calculating image feature amounts from input images and comparing them with registered image feature amounts. When an image generated by allocating a plurality of images (hereinafter referred to as an allocated image) is registered, the image is divided into a plurality of original images, and an image feature amount is calculated and registered for each of the images. Here, each of the divided plurality of original images is referred to as a reference image.

図2において、画像入力部201は、登録する画像(登録対象画像)、および、検索元画像(クエリ画像)の入力を行う。本実施形態では、図3(A)に一例を示すように、ドキュメントをラスタライズして画像としたものを対象画像として説明する。この入力画像は、ドキュメントを印刷する際に、プリンタドライバで生成することもできる。特にプリンタドライバで生成した場合、その印刷データには1枚の記録紙に何ページを印刷するかを示す情報を含ませることができるので、実施形態では好都合と言える。   In FIG. 2, an image input unit 201 inputs an image to be registered (registration target image) and a search source image (query image). In the present embodiment, as shown in FIG. 3A, an image obtained by rasterizing a document as an image will be described. This input image can also be generated by a printer driver when printing a document. In particular, when generated by a printer driver, the print data can include information indicating how many pages are printed on one sheet of recording paper, which is advantageous in the embodiment.

割り付け画像判定部202は、画像入力部201から入力された入力画像が、割り付け画像であるかどうかを判定すると共に、割り付け画像である場合には割り付けたページ数を判定する。ここで、割り付け画像とは、図3(B)〜(G)に例を示すように、ドキュメントの複数ページを1つ(1枚)にまとめた画像のことである。ドキュメントを印刷する際に、このような設定をすることができる。割り付け印刷を行う際は、複数のページを同じ大きさで縮小し、1枚の記録紙(1個の画像内)に割り付ける。したがって、割り付け印刷可能なページ数は、2ページ、4ページ、6ページ、8ページ、9ページ、16ページ、32ページなどである。一般に、1枚の記録紙にNページを割り付けて印刷することをNin1と呼ばれる。32ページを超えるページ数を1枚(1ページ)に均等に割り付けることも理論的には可能であり、これらのページ数に限定するものではない。割り付けを行う際、例えば3ページのドキュメントから4ページの割り付け画像を生成する場合は、4ページ目の位置には空白のページが入る。割り付け画像判定部202では、割り付け画像と判定された場合は、更に、何ページの割り付け画像であるかを判定する。ここでは、Nページの割り付け画像であると判定されたとして説明する。   The allocated image determination unit 202 determines whether the input image input from the image input unit 201 is an allocated image, and determines the number of allocated pages if the input image is an allocated image. Here, the layout image is an image in which a plurality of pages of a document are grouped into one (one), as shown in examples in FIGS. This can be done when printing a document. When performing layout printing, a plurality of pages are reduced by the same size and allocated to one recording sheet (in one image). Therefore, the number of pages that can be assigned and printed is 2, 4, 6, 8, 8, 9, 16, 32, etc. In general, allocating and printing N pages on one recording sheet is called Nin1. It is theoretically possible to evenly assign the number of pages exceeding 32 pages to one (1 page), and the number of pages is not limited to these. When performing allocation, for example, when a 4-page layout image is generated from a 3-page document, a blank page is placed at the position of the 4th page. The layout image determination unit 202 further determines how many pages the layout image is when it is determined as a layout image. Here, a description will be given assuming that the image is determined to be an N-page layout image.

領域分割部203は、割り付け画像判定部202によりNページの割り付け画像と判定された場合、入力画像をN個の領域に分割する。割り付け方法はあらかじめ定められており、その方法にしたがって分割する。画像特徴量算出部204は、入力画像が割り付け画像で無い場合は、その入力画像、割り付け画像の場合は領域分割部203で分割した領域ごとの画像について、画像特徴量を算出する。   The area dividing unit 203 divides the input image into N areas when the allocated image determining unit 202 determines that the page is an N page allocated image. The allocation method is determined in advance and is divided according to the method. The image feature amount calculation unit 204 calculates an image feature amount for an input image when the input image is not an assigned image, and for each image divided by the region dividing unit 203 when the input image is an assigned image.

画像検索部205は、画像特徴量算出部204で算出された画像特徴量を検索元とし、既に登録されている画像の画像特徴量との比較を行い、類似画像を検索する。画像検索部205で類似画像が見つかった場合、リンク情報登録部206は、検索元とした画像特徴量の画像が、類似画像と同じ画像であるというリンク情報を登録する。画像検索部205で類似画像が見つからなかった場合は、画像特徴量登録部207は、検索元とした画像特徴量を登録する。記憶部208は、処理中のデータ、各種インデックス、画像ファイル等を記憶するメモリ・HDD等である。なお、これら各構成は、不図示のCPUにより統括的に制御されている。   The image search unit 205 uses the image feature amount calculated by the image feature amount calculation unit 204 as a search source, compares the image feature amount of an already registered image, and searches for similar images. When a similar image is found by the image search unit 205, the link information registration unit 206 registers link information that the image feature amount image used as the search source is the same image as the similar image. When a similar image is not found by the image search unit 205, the image feature amount registration unit 207 registers an image feature amount as a search source. The storage unit 208 is a memory / HDD that stores data being processed, various indexes, image files, and the like. Each of these components is centrally controlled by a CPU (not shown).

[登録処理]
図4は、第1の実施形態の画像処理装置における登録処理手順の一例を示すフローチャートである。
[registration process]
FIG. 4 is a flowchart illustrating an example of a registration processing procedure in the image processing apparatus according to the first embodiment.

まず、ステップS401において、画像入力部201を介して登録対象の画像が入力される。入力された登録対象の画像には、画像IDが割り振られる。第1の実施形態では、一例として、ドキュメントを印刷する際にプリンタドライバでラスタライズした画像を入力とした場合について述べる。入力された画像は、記憶部208に保存される。   First, in step S401, an image to be registered is input via the image input unit 201. An image ID is assigned to the input image to be registered. In the first embodiment, as an example, a case where an image rasterized by a printer driver is input when a document is printed will be described. The input image is stored in the storage unit 208.

ステップS402では、割り付け画像判定部202において、入力した登録対象画像が割り付け画像であるかどうかを判定する。前述のように、ドキュメントを印刷する際のプリンタドライバの設定で、割り付け印刷の指示をすることができる。本実施形態では、入力した画像に付随する、その情報を利用する。ステップS403で、入力画像が割り付け画像でない場合はステップS404へ進み、入力画像を処理対象画像に設定する。入力画像が割り付け画像の場合は、ステップS405で、入力した登録対象画像が、何ページの画像で構成されているのかを示す割り付け数Nを取得する。割り付け数Nも、プリンタドライバで設定した情報を利用する。ただし、プリンタドライバの設定情報を利用する場合に限定するものではなく、プリンタや複合機などの機器の操作情報を利用してもよい。例えば、複合機でコピーする際、2枚の用紙を1枚に割りつけてコピーするようなことも可能であり、そのような情報も利用可能である。   In step S402, the allocated image determination unit 202 determines whether the input registration target image is an allocated image. As described above, it is possible to instruct layout printing by setting the printer driver when printing a document. In the present embodiment, the information accompanying the input image is used. If it is determined in step S403 that the input image is not an allocated image, the process proceeds to step S404, where the input image is set as a processing target image. If the input image is an allocated image, in step S405, an allocation number N indicating how many pages of the input registration target image are acquired. The number N assigned also uses information set by the printer driver. However, the present invention is not limited to the case where the printer driver setting information is used, and operation information of a device such as a printer or a multifunction peripheral may be used. For example, when copying with a multifunction machine, it is possible to copy two sheets allocated to one sheet, and such information can also be used.

次にステップS406で、領域分割部203において、入力画像をN個の領域に分割する。この分割はあらかじめ定められた分割方法であり、均等サイズの領域に分割する。次にステップS407でN分割した最初の領域の画像を処理対象画像に設定する。ステップS408では、画像特徴量算出部204において、ステップS404又はステップS407で決定した処理対象画像の画像特徴量を抽出する。   In step S406, the area dividing unit 203 divides the input image into N areas. This division is a predetermined division method and is divided into regions of equal size. In step S407, an image of the first area divided into N is set as a processing target image. In step S408, the image feature amount calculation unit 204 extracts the image feature amount of the processing target image determined in step S404 or step S407.

図5は、ステップS408における画像特徴量抽出処理手順の一例を示すフローチャートである。第1の実施形態では、画像特徴量として画像の局所的な特徴量(局所特徴量)を用いる。まず、ステップS501で、処理対象の画像から輝度成分を抽出し、抽出した輝度成分に基づいて輝度成分画像を生成する。次にステップS502で、輝度成分画像を倍率(縮小率)pに従って順次縮小することを繰り返し、オリジナルのサイズの画像から段階的に縮小した、オリジナルの画像を含めてn枚の縮小画像を生成する。ここで、倍率p及び縮小画像の枚数nは予め決められているものとする。   FIG. 5 is a flowchart illustrating an example of an image feature amount extraction processing procedure in step S408. In the first embodiment, a local feature amount (local feature amount) of an image is used as the image feature amount. First, in step S501, a luminance component is extracted from an image to be processed, and a luminance component image is generated based on the extracted luminance component. In step S502, the luminance component image is successively reduced in accordance with the magnification (reduction ratio) p, and n reduced images including the original image, which are reduced stepwise from the original size image, are generated. . Here, it is assumed that the magnification p and the number n of reduced images are determined in advance.

図6は、縮小画像生成処理の一例を示す図である。図6に示す例は、倍率pが「2の−(1/4)乗」、縮小画像の枚数nが「9」の場合である。もちろん、倍率pは必ずしも「2の−(1/4)乗」で無くとも良い。図6において、601はステップS501で生成された輝度成分画像である。602は当該輝度成分画像601から倍率pに従って再帰的に4回の縮小処理を行って得られた縮小画像である。そして、603は当該輝度成分画像601から倍率pに従って8回縮小された縮小画像である。   FIG. 6 is a diagram illustrating an example of a reduced image generation process. The example shown in FIG. 6 is a case where the magnification p is “2 to the power of − (1/4)” and the number n of reduced images is “9”. Of course, the magnification p is not necessarily "2 to the power of-(1/4)". In FIG. 6, reference numeral 601 denotes the luminance component image generated in step S501. Reference numeral 602 denotes a reduced image obtained by recursively reducing the luminance component image 601 four times according to the magnification p. Reference numeral 603 denotes a reduced image obtained by reducing the luminance component image 601 eight times according to the magnification p.

この例では、縮小画像602は輝度成分画像601が1/2に縮小された画像となり、縮小画像603は輝度成分画像601が1/4に縮小された画像となる。尚、画像を縮小する方法は何れの方法でも良く、第1の実施形態では、線形補間による縮小方法により縮小画像を生成するものとする。   In this example, the reduced image 602 is an image obtained by reducing the luminance component image 601 to ½, and the reduced image 603 is an image obtained by reducing the luminance component image 601 to ¼. Any method may be used to reduce the image. In the first embodiment, a reduced image is generated by a reduction method using linear interpolation.

次に、ステップS503では、n枚の縮小画像の各々に画像の回転があってもロバスト(robust)に抽出されるような局所的な特徴点(局所特徴点)を抽出する。この局所特徴点の抽出方法として、第1の実施形態ではHarris作用素を用いる(非特許文献1:C.Harris and M.J. Stephens, "A combined corner and edge detector," In Alvey Vision Conference, pages 147-152, 1988.参照)。   Next, in step S503, local feature points (local feature points) that are robustly extracted even if there is image rotation in each of the n reduced images are extracted. As a method for extracting local feature points, Harris operator is used in the first embodiment (Non-patent Document 1: C. Harris and MJ Stephens, “A combined corner and edge detector,” In Alvey Vision Conference, pages 147-152. , 1988.).

具体的には、Harris作用素を作用させて得られた出力画像H上の画素について、当該画素及び当該画素の8近傍にある画素(合計9画素)の画素値を調べる。そして、当該画素が局所極大になる(当該9画素の中で当該画素の画素値が最大になる)点を局所特徴点として抽出する。ここで、当該画素が局所極大になったときでも、当該画素の値がしきい値以下の場合には局所特徴点として抽出しないようにする。   Specifically, for the pixels on the output image H obtained by applying the Harris operator, the pixel values of the pixels and the pixels in the vicinity of the pixels (eight pixels in total) (total nine pixels) are examined. Then, a point at which the pixel becomes a local maximum (a pixel value of the pixel becomes the maximum among the nine pixels) is extracted as a local feature point. Here, even when the pixel reaches a local maximum, it is not extracted as a local feature point if the value of the pixel is less than or equal to the threshold value.

尚、局所特徴点を抽出可能な方法であれば、上述のHarris作用素による特徴点抽出方法に限らず、どのような特徴点抽出方法でも適用可能である。   It should be noted that any feature point extraction method is applicable as long as it is a method capable of extracting local feature points, not limited to the feature point extraction method using the Harris operator described above.

次に、ステップS504で、ステップS503で抽出された局所特徴点の各々について、画像の回転があっても不変となるように定義された特徴量(局所特徴量)を算出する。この局所特徴量の算出方法として、第1の実施形態ではLocal Jet及びそれらの導関数の組み合わせを用いる(J.J.Koenderink and A.J.van Doorn, "Representation of local geometry in the visual system," Riological Cybernetics, vol.55, pp.367-375, 1987.参照)。   Next, in step S504, for each of the local feature points extracted in step S503, a feature quantity (local feature quantity) defined so as to remain unchanged even when the image is rotated is calculated. As a method for calculating the local feature, the first embodiment uses a combination of Local Jet and derivatives thereof (JJ Koenderink and AJvan Doorn, “Representation of local geometry in the visual system,” Riological Cybernetics, vol. 55, pp.367-375, 1987.).

具体的には、以下の式(1)により局所特徴量Vを算出する。

Figure 2015203978
ただし、式(1)の右辺で用いている記号は、以下に示す式(2)から式(7)で定義される。ここで、式(2)右辺のG(x,y)はガウス関数、I(x,y)は画像の座標(x,y)における画素値であり、“*”は畳み込み演算を表す記号である。また、式(3)は式(2)で定義された変数Lのxに関する偏導関数、式(4)は当該変数Lのyに関する偏導関数である。式(5)は式(3)で定義された変数Lxのyに関する偏導関数、式(6)は式(3)で定義された変数Lxのxに関する偏導関数、式(7)は式(4)で定義されたLyのyに関する偏導関数である。
Figure 2015203978
尚、局所特徴量を算出可能な方法であれば、上述したような特徴量算出方法に限らず、どのような特徴量算出方法でも適用可能である。 Specifically, the local feature amount V is calculated by the following equation (1).
Figure 2015203978
However, the symbols used on the right side of the equation (1) are defined by the following equations (2) to (7). Here, G (x, y) on the right side of Expression (2) is a Gaussian function, I (x, y) is a pixel value at image coordinates (x, y), and “*” is a symbol representing a convolution operation. is there. Equation (3) is a partial derivative of variable L defined by equation (2) with respect to x, and equation (4) is a partial derivative of variable L with respect to y. Equation (5) is the partial derivative of variable Lx defined in equation (3) with respect to y, equation (6) is the partial derivative of variable Lx defined in equation (3) with respect to x, and equation (7) is the equation. It is a partial derivative with respect to y of Ly defined in (4).
Figure 2015203978
It should be noted that any feature amount calculation method is applicable as long as it is a method capable of calculating a local feature amount, not limited to the above-described feature amount calculation method.

対象画像のすべての局所特徴点に対する局所特徴量をひとまとめにすることで画像特徴量群を得ることができる。   A group of image feature values can be obtained by grouping the local feature values for all the local feature points of the target image.

次に、ステップS505で、ステップS504で抽出した画像特徴量を量子化し、処理対象画像の量子化画像特徴量を生成する。   Next, in step S505, the image feature amount extracted in step S504 is quantized to generate a quantized image feature amount of the processing target image.

第1の実施形態で使用している画像特徴量、すなわち、Local Jetおよびそれらの導関数の組み合わせにより各局所特徴点から算出される局所特徴量は、N次元のベクトルである。ここでは、N次元のうちのn番目の次元の特徴量について、Kn階調に量子化を行う。ここで、NおよびKnはあらかじめ決められているものとする。   The image feature quantity used in the first embodiment, that is, the local feature quantity calculated from each local feature point by a combination of Local Jet and their derivatives is an N-dimensional vector. Here, the nth dimension of the N dimensions is quantized to the Kn gradation. Here, it is assumed that N and Kn are determined in advance.

具体的には以下の式(8)により、量子化を行う。
n=(Vn*Kn)/(Vn_max−Vn_min+1) …(8)
ここで、Qnは、N次元のうちのn番目の次元の特徴量Vnを量子化した値である。Vn_maxとVn_minそれぞれn番目の次元の特徴量の取りうる値の最大値、および、最小値である。
Specifically, quantization is performed by the following equation (8).
Q n = (V n * K n ) / (V n — max −V n — min +1) (8)
Here, Q n is a value obtained by quantizing the feature quantity V n of the n-th dimension among the N dimensions. V n_max and V n_min are the maximum and minimum values that can be taken by the feature quantity of the nth dimension.

各次元の量子化値をひとまとめにすることで量子化画像特徴量を得ることができ、対象画像のすべての量子化画像特徴量をひとまとめにすることで量子化画像特徴量群を得ることができる。   Quantized image feature values can be obtained by grouping the quantized values of each dimension, and quantized image feature groups can be obtained by grouping all quantized image feature values of the target image. .

尚、上記の量子化では、次元ごとに量子化階調数を定めているが、全次元、もしくは、いくつかの次元で共通の階調数にしてもよい。この量子化方法は、図7(a)に示すように、特徴量空間を格子状に分割する方法であるが、図7(b)のような格子形状に分割してもよい。この図で、701の格子は特徴量空間における量子化領域、702は各特徴を表している。図7(a)、(b)ともに、二次元の特徴量空間を量子化分割している例であるが、これを局所特徴量の次元数分の多次元に拡張した分割を行う。   In the above quantization, the number of quantization gradations is determined for each dimension. However, the number of gradations common to all dimensions or several dimensions may be used. This quantization method is a method of dividing the feature amount space into a lattice shape as shown in FIG. 7A, but may be divided into a lattice shape as shown in FIG. 7B. In this figure, reference numeral 701 denotes a quantization area in the feature amount space, and reference numeral 702 denotes each feature. Both FIGS. 7A and 7B are examples in which the two-dimensional feature amount space is quantized and divided, and the division is performed by expanding this to multi-dimensions corresponding to the number of dimensions of the local feature amount.

また、特徴量空間を分割可能な方法であれば、上述したような規則に基づいて量子化する方法に限らずに、どのような分割方法でも適用可能である。例えば、複数の画像を機械学習させることによりクラスタリングのルールを作成し、そのルールに則って特徴量空間を分割し、量子化するようにしてもよい。   Further, as long as it is a method that can divide the feature amount space, any division method can be applied without being limited to the method of quantizing based on the rules as described above. For example, a clustering rule may be created by machine learning of a plurality of images, and the feature amount space may be divided and quantized according to the rule.

また、各次元についての量子化を行った後、以下の式(9)により、量子化値群のラベル化を行うことで、実質的に一次元の特徴量と同等に扱うことも可能である。
IDX=Q1+Q2*K1+Q3*K1*K2+…+Qn*K1*K2*…*Kn-1 …(9)
また、全次元の階調数が共通の場合は、以下の式(10)により、量子化値群のラベル化が可能である。ここで、Kは階調数である。

Figure 2015203978
尚、ラベル化可能な算出方法であれば、上述したような算出方法に限らずに、どのようなラベル化方法でも適用可能である。第1の実施形態では、ラベル化値IDXを特徴量IDという。 In addition, after performing quantization for each dimension, the quantization value group is labeled according to the following equation (9), so that it can be handled substantially equivalent to a one-dimensional feature amount. .
IDX = Q 1 + Q 2 * K 1 + Q 3 * K 1 * K 2 + ... + Q n * K 1 * K 2 * ... * K n-1 (9)
Further, when the number of gradations of all dimensions is common, the quantization value group can be labeled by the following equation (10). Here, K is the number of gradations.
Figure 2015203978
As long as the calculation method can be labeled, any labeling method can be applied without being limited to the calculation method as described above. In the first embodiment, the labeled value IDX is referred to as a feature amount ID.

以上、図4のステップS408の処理内容を説明した。次のステップS409では、画像検索部205において、画像特徴量算出部204で算出された画像特徴量を検索元とし、すでに登録されている画像特徴量との比較を行い、類似画像を検索する。そして、その結果をもとに、リンク情報登録部206、もしくは、画像特徴量登録部207で処理対象画像を登録する。   The processing content of step S408 in FIG. 4 has been described above. In the next step S409, the image search unit 205 searches for a similar image by comparing the image feature amount already registered with the image feature amount calculated by the image feature amount calculation unit 204 as a search source. Based on the result, the processing target image is registered by the link information registration unit 206 or the image feature amount registration unit 207.

ここで、ステップS409における画像登録処理手順の一例を、図8のフローチャートを参照して説明する。   Here, an example of the image registration processing procedure in step S409 will be described with reference to the flowchart of FIG.

まず、ステップS801で、画像検索部205において、ステップS408で算出された画像特徴量を検索元とし、すでに登録されている基準画像の画像特徴量との比較を行い、類似する基準画像を検索する。類似基準画像検索処理では、登録済みの基準画像の画像特徴量との比較が行われ、類似度が算出される。そして、類似度の高い順にソートされた結果が得られる。この類似基準画像検索処理の詳細に関しては、後述する。   First, in step S801, the image search unit 205 uses the image feature amount calculated in step S408 as a search source, compares the image feature amount of a reference image already registered, and searches for a similar reference image. . In the similar reference image search process, a comparison with the image feature amount of the registered reference image is performed, and the similarity is calculated. Then, a result sorted in descending order of similarity is obtained. Details of the similar reference image search processing will be described later.

ステップS802で、所定類似度以上の検索結果が無い場合は、ステップS803に進み、処理対象画像の画像特徴量を登録する。つまり、処理対象画像を、新たな基準画像の1つとして登録する。   If no search result equal to or higher than the predetermined similarity is found in step S802, the process advances to step S803 to register the image feature amount of the processing target image. That is, the processing target image is registered as one of new reference images.

ここで、図9は、画像特徴量をデータベースに登録するときのスキーマ例である。これらは、例であり、違う型のスキーマであっても構わない。   Here, FIG. 9 is an example of a schema for registering image feature amounts in a database. These are examples, and different types of schemas may be used.

図9(A)は、画像IDと基準画像IDを関連付けるスキーマ例である。ここで、画像IDは登録対象画像に付与されるIDである。また、基準画像IDは、登録対象画像が割り付け画像のとき、ページごとに分割した基準画像それぞれに対して付与されるIDである。登録対象画像が割り付け画像でないときは、登録対象画像に対して基準画像IDが付与される。本スキーマでは、更に、登録される画像のどの領域が基準画像なのかを領域情報として記憶する。領域情報としては、例えば、左上座標、右下座標の画素値を記憶する。基準画像ID、画像IDは、登録される画像の枚数にもよるが、それぞれ8バイトの型を用いて記憶される。領域情報は、2バイトの型の4つの値を用いて記憶される。したがって、1枚の基準画像を登録するにあたり、24バイトの記憶領域を必要とする。ただし、この記憶サイズは、一例であり、この値に限定するものではない。   FIG. 9A shows an example of a schema that associates an image ID with a reference image ID. Here, the image ID is an ID given to the registration target image. The reference image ID is an ID given to each reference image divided for each page when the registration target image is an assigned image. When the registration target image is not an assigned image, a reference image ID is assigned to the registration target image. In this schema, which region of the registered image is the reference image is further stored as region information. As the area information, for example, pixel values of upper left coordinates and lower right coordinates are stored. The reference image ID and the image ID are stored using an 8-byte type, although it depends on the number of registered images. The area information is stored using four values of a 2-byte type. Therefore, a 24-byte storage area is required to register one reference image. However, this storage size is an example and is not limited to this value.

図9(B)は、特徴量IDと基準画像IDを関連付けるスキーマ例である。ここで、特徴量IDは画像特徴量をラベル化したときのラベル値である。複数の基準画像から、同じ特徴量IDになる画像特徴量が算出されることがあるため、1つの特徴量IDに対し、複数の基準画像IDが関連付けられることがある。本スキーマでは、更に、特徴点の座標の画素値を記憶する。1枚の基準画像から、同じ特徴量IDになる画像特徴量が算出されることがあり、その場合は、それらの特徴点座標をリストとし、そのリスト自体をリストとして保持する。また、画像特徴量の値も記憶する。特徴量ID、基準画像IDは、それぞれ8バイトの型を用いて記憶される。特徴点座標は、2バイトの型の2つの値を用いて記憶される。ここでは128次元の倍精度小数型で表される画像特徴量を想定しており、8バイトの型の128個の値を用いて記憶される。したがって、1点の特徴点を登録するにあたり、約1キロバイトの記憶領域を必要とする。1枚の基準画像から数1000点の特徴点が抽出されることが一般的である。ここで、1枚の基準画像から抽出される特徴点の数を3000点とすると、1枚の基準画像を登録するにあたり、約3メガバイトの記憶領域を必要とする。もちろん、主成分分析等により画像特徴量の次元数を減らしたり、倍精度小数型を用いる代わりに固定小数型を用いたりすることにより、記憶領域を小さくすることは可能である。   FIG. 9B is an example of a schema that associates the feature amount ID with the reference image ID. Here, the feature amount ID is a label value when the image feature amount is labeled. Since image feature amounts having the same feature amount ID may be calculated from a plurality of reference images, a plurality of reference image IDs may be associated with one feature amount ID. In this schema, pixel values of feature point coordinates are further stored. Image feature amounts having the same feature amount ID may be calculated from a single reference image. In this case, the feature point coordinates are used as a list, and the list itself is held as a list. The image feature value is also stored. Each of the feature amount ID and the reference image ID is stored using an 8-byte type. The feature point coordinates are stored using two values of a 2-byte type. Here, an image feature amount represented by a 128-dimensional double-precision decimal type is assumed, and stored using 128 values of an 8-byte type. Therefore, in order to register one feature point, a storage area of about 1 kilobyte is required. Generally, several thousand feature points are extracted from one reference image. Here, assuming that the number of feature points extracted from one reference image is 3000, a storage area of about 3 megabytes is required to register one reference image. Of course, it is possible to reduce the storage area by reducing the number of dimensions of the image feature amount by principal component analysis or by using a fixed decimal type instead of using a double precision decimal type.

図8のフローに戻り、ステップS802で、所定類似度以上の検索結果がある場合は、ステップS804に進む。ステップS804では、処理対象画像と検索結果画像の一致領域を特定する。一致領域特定処理では、図10の例で示すように、処理対象画像における一致領域の包含割合RQと場所、および、検索結果画像における一致領域の包含割合RSと場所が得られる。   Returning to the flow of FIG. 8, if there is a search result equal to or higher than the predetermined similarity in step S802, the process proceeds to step S804. In step S804, a matching area between the processing target image and the search result image is specified. In the matching area specifying process, as shown in the example of FIG. 10, the inclusion ratio RQ and location of the matching area in the processing target image, and the inclusion ratio RS and location of the matching area in the search result image are obtained.

図10(A)〜(D)は処理対象画像と検索結果画像との関係を示している。同図(A)乃至(D)の左側の符号100乃至103が処理対象画像の例を示し、右側の符号110乃至113が検索結果画像の例を示してる。各図において、太線の矩形で囲まれた範囲が、一致領域とその場所を示している。点線で一致領域の位置を対応付けて表している。また、各画像の横に記載しているRQで始まる数値(%)が、処理対象画像における一致領域の割合を示し、RSで始まる数値が検索結果画像における一致領域の割合を示している。100%は、一致領域が、該当する画像全体であることを表している。   10A to 10D show the relationship between the processing target image and the search result image. In FIGS. 10A to 10D, reference numerals 100 to 103 on the left side indicate examples of processing target images, and reference numerals 110 to 113 on the right side indicate examples of search result images. In each figure, a range surrounded by a bold rectangle indicates the matching area and its location. The position of the coincidence area is shown in association with a dotted line. In addition, a numerical value (%) starting with RQ described beside each image indicates the ratio of the matching area in the processing target image, and a numerical value starting with RS indicates the ratio of the matching area in the search result image. 100% indicates that the matching area is the entire corresponding image.

処理対象画像と検索結果画像の一致領域の関係としては、図10(A)の関係のようにほぼ全面一致している場合、図10(B)の関係のように処理対象画像が検索結果画像を包含している場合がある。また、図10(C)や、図10(D)の関係のように処理対象画像が検索結果画像の一部になっている場合がある。ここで、図10(C)の検索結果画像112は2ページ分を包含しているものであり、本来、ページ単位で登録されるべき画像である。本画像は、登録時のステップS402において、何らかの影響により、割り付け画像と判断されないまま登録されてしまった画像ということになる。この一致領域特定処理の詳細に関しては、後述する。   As the relationship between the matching areas of the processing target image and the search result image, when the entire area matches as in the relationship of FIG. 10A, the processing target image is the search result image as in the relationship of FIG. May be included. In addition, the processing target image may be a part of the search result image as in the relationship of FIG. 10C or FIG. Here, the search result image 112 in FIG. 10C includes two pages, and is an image that should be registered in units of pages. The main image is an image that has been registered without being determined as an assigned image due to some influence in step S402 at the time of registration. Details of the matching area specifying process will be described later.

ステップS805では、処理対象画像における一致領域の包含割合RQと検索結果画像における一致領域の包含割合RSを比較し、ほぼ同じ割合であればステップS806へ進む。ここで、ほぼ同じ割合とは、RQに対し例えば±10%程度のマージンをもたせた範囲内にRSが収まっていることとする。ここで、10%のマージンの値は一例であり、この値は実験により求めるようにしてもよいし、システム管理者が設定できるようにしても良い。RQとRSがほぼ同じ割合のときは、処理対象画像と検索結果画像が同じ画像であると考えることができる。したがって、ステップS806では、処理対象画像から検索結果画像へのリンク情報を登録する。ここでは、新たに画像特徴量を登録するのではなく、すでに登録されている画像特徴量と同じであるという情報のみを登録する。   In step S805, the inclusion ratio RQ of the matching area in the processing target image is compared with the inclusion ratio RS of the matching area in the search result image. If the ratio is approximately the same, the process proceeds to step S806. Here, it is assumed that the RS is within the range having a margin of, for example, about ± 10% with respect to RQ. Here, the value of the margin of 10% is an example, and this value may be obtained by experiments, or may be set by the system administrator. When RQ and RS have substantially the same ratio, it can be considered that the processing target image and the search result image are the same image. Accordingly, in step S806, link information from the processing target image to the search result image is registered. Here, instead of registering a new image feature amount, only information that is the same as the already registered image feature amount is registered.

一例として、処理対象画像の画像IDが5で、検索結果基準画像IDが1であったとする。この場合、図9(A)に示した画像IDと基準画像IDとを管理するテーブルは、図11に示すように更新あれる。すなわち、図11のように、基準画像IDが“1”のレコード中の、「画像ID」フィールドに“5”を挿入(追加)し、領域情報に処理対象画像の一致領域の座標情報を挿入する。1枚の基準画像を登録するにあたって必要な記憶容量は、画像IDの8バイトと領域情報の8バイトの合計16バイトのみである。画像特徴量を登録する場合は、約3メガバイトの記憶領域を必要としていたため、大幅な削減が可能であることがわかる。   As an example, it is assumed that the image ID of the processing target image is 5 and the search result reference image ID is 1. In this case, the table for managing the image ID and the reference image ID shown in FIG. 9A is updated as shown in FIG. That is, as shown in FIG. 11, “5” is inserted (added) into the “image ID” field in the record with the reference image ID “1”, and the coordinate information of the matching region of the processing target image is inserted into the region information. To do. The storage capacity necessary for registering one reference image is only a total of 16 bytes including 8 bytes of image ID and 8 bytes of area information. In the case of registering the image feature amount, a storage area of about 3 megabytes is required, so that it can be seen that a significant reduction is possible.

ステップS805で、RQとRSの値がほぼ同じでない場合はステップS807へ進む。ステップS807で、RQがRSよりも小さい場合は、ステップS803に進み、処理対象画像の画像特徴量を登録する。RQがRSよりも小さい場合とは、図10(B)のように、処理対象画像が検索結果画像を包含している場合である。   If the values of RQ and RS are not substantially the same in step S805, the process proceeds to step S807. If RQ is smaller than RS in step S807, the process proceeds to step S803, and the image feature amount of the processing target image is registered. The case where RQ is smaller than RS is a case where the processing target image includes the search result image as shown in FIG.

ステップS807で、RQがRSよりも大きい場合は、ステップS808に進む。RQがRSよりも大きい場合は、図10(C)や(D)のように、検索結果画像が処理対象画像を包含している場合である。ここで、図10(C)は、割り付け画像の1ページであり、図10(D)は割り付け画像の1ページではなく、単に検索結果画像の一部分である。ステップS808では、処理対象画像がこれらのどちらであるか、すなわち、検索結果画像が割り付け画像であるかどうかの判定を行う。更に、検索結果画像が割り付け画像である場合は、割り付け数、および、割り付け位置を取得する。   If RQ is larger than RS in step S807, the process proceeds to step S808. When RQ is larger than RS, as shown in FIGS. 10C and 10D, the search result image includes the processing target image. Here, FIG. 10C shows one page of the allocated image, and FIG. 10D is not a single page of the allocated image, but merely a part of the search result image. In step S808, it is determined which of these is the processing target image, that is, whether the search result image is an allocated image. Furthermore, when the search result image is an assigned image, the number of assignments and the assigned position are acquired.

図12は、ステップS808における検索結果画像の割り付け画像判定処理手順の一例を示すフローチャートである。   FIG. 12 is a flowchart showing an example of the assigned image determination processing procedure for the search result image in step S808.

まず、ステップS1201で、RS/RQの値により割り付け数候補を取得する。ここでは、図3(B)〜(G)で示した、2ページ、4ページ、6ページ、8ページ、9ページ、16ページの割り付け画像を例に説明する。図13は、割り付け画像に関しての情報をまとめた表である。図13の表中の割合は、割り付けることによる各ページの縮小率である。回転は、割り付ける際に90度回転させるかどうかであり、Yesは回転させることを示しており、Noは回転させないことを示している。回転させる場合は、割り付ける画像の向きと、割り付けた画像の向きが90度回転した状態になる。中心x座標、中心y座標は、割り付けたページの中心のx座標、y座標を幅もしくは高さを1としたときの割合で示したものである。中心x座標のうちのいずれか1つと中心y座標のうちのいずれか1つを組み合わせた座標が、割り付けたページの中心座標となる。   First, in step S1201, allocation number candidates are acquired based on the RS / RQ value. Here, description will be made by taking, as an example, the allocated images of pages 2, 4, 6, 8, 8, 9, and 16 shown in FIGS. FIG. 13 is a table summarizing information about the allocated images. The ratio in the table of FIG. 13 is the reduction ratio of each page by the allocation. Rotation is whether to rotate 90 degrees when allocating, Yes indicates that the rotation is performed, and No indicates that the rotation is not performed. When rotating, the orientation of the image to be assigned and the orientation of the assigned image are rotated 90 degrees. The center x-coordinate and the center y-coordinate are the ratios when the width or height is set to 1 for the center x-coordinate and y-coordinate of the assigned page. Coordinates obtained by combining any one of the center x coordinates and any one of the center y coordinates are the center coordinates of the allocated pages.

ステップS1201では、RS/RQの値が、図13の表の割合とほぼ同じ値の割り付け数を割り付け数候補とする。ここで、ほぼ同じ値とは、図13の表の割合に対し例えば±10%程度のマージンを持たせた範囲内にRS/RQの値が収まっていることとする。ここで、10%のマージンの値は一例であり、この値は実験により求めるようにしてもよい。また、割り付け数ごとにマージンの値を変えるようにしてもよい。この時点では、複数の候補が存在することもある。   In step S1201, an allocation number having an RS / RQ value substantially the same as the ratio in the table of FIG. 13 is determined as an allocation number candidate. Here, substantially the same value means that the RS / RQ value falls within a range having a margin of about ± 10% with respect to the ratio in the table of FIG. Here, the margin value of 10% is an example, and this value may be obtained by experiment. Further, the margin value may be changed for each allocation number. At this point, there may be a plurality of candidates.

次に、ステップS1202で、割り付け数候補が無い場合は、ステップS1203に進み、検索結果画像は割り付け画像ではないと判定する。ステップS1202で、割り付け数候補がある場合は、ステップS1204に進む。   Next, in step S1202, when there is no allocation number candidate, it progresses to step S1203 and determines with a search result image not being an allocation image. If there is an allocation number candidate in step S1202, the process proceeds to step S1204.

ステップS1204では、処理対象画像と検索結果画像の向き、すなわち、縦長画像であるか横長画像であるか、により割り付け数候補を絞る。画像の向きが同じ場合は、図13の表の回転がNoである割り付け数のみを割り付け数候補に残し、それ以外は割り付け数候補から除く。画像の向きが異なる場合は、図13の表の回転がYesである割り付け数のみを割り付け数候補に残し、それ以外は割り付け数候補から除く。   In step S1204, allocation number candidates are narrowed down depending on the orientation of the processing target image and the search result image, that is, whether the image is a vertically long image or a horizontally long image. When the image orientations are the same, only the number of assignments for which the rotation of the table of FIG. 13 is No is left in the assignment number candidates, and the others are excluded from the assignment number candidates. When the orientations of the images are different, only the allocation number whose rotation in the table of FIG. 13 is Yes is left as the allocation number candidate, and the other is excluded from the allocation number candidates.

次に、ステップS1205で、割り付け数候補が無い場合は、ステップS1203に進み、検索結果画像は割り付け画像ではないと判定する。ステップS1205で、割り付け数候補がある場合は、ステップS1206に進む。   Next, in step S1205, if there is no allocation number candidate, the process proceeds to step S1203, and it is determined that the search result image is not an allocation image. If there is an allocation number candidate in step S1205, the process proceeds to step S1206.

ステップS1206では、処理対象画像における一致領域を処理対象画像全体に広げたときの領域に対応する、検索結果画像における領域を求め、その領域の中心座標を取得する。図14の処理対象画像1400の中の細い線1401で囲った領域が一致領域であり、この領域を太い線で囲った画像全体の領域に広げることを考える。そのとき、検索結果画像1410の中の細い線1411で囲った一致領域を、同じ方向に同じ割合だけ広げることで、処理対象画像の全体の領域に対応する検索結果画像の領域を得ることができる。そして、その領域の中心座標を取得する。   In step S1206, a region in the search result image corresponding to the region when the matching region in the processing target image is expanded to the entire processing target image is obtained, and the center coordinates of the region are acquired. A region surrounded by a thin line 1401 in the processing target image 1400 in FIG. 14 is a matching region, and it is considered that this region is expanded to the entire image region surrounded by a thick line. At this time, the region of the search result image corresponding to the entire region of the processing target image can be obtained by expanding the matching region surrounded by the thin line 1411 in the search result image 1410 by the same ratio in the same direction. . And the center coordinate of the area | region is acquired.

ステップS1207では、検索結果画像の領域の中心座標により割り付け数候補を絞る。すなわち、図13の表の中心x座標、および、中心y座標のいずれかが、検索結果画像の領域の中心座標とほぼ同じ値である割り付け数のみを割り付け数候補に残し、それ以外は割り付け数候補から除く。   In step S1207, the allocation number candidates are narrowed down by the center coordinates of the area of the search result image. That is, only the allocation number in which either the center x coordinate or the center y coordinate in the table of FIG. 13 is substantially the same value as the center coordinate of the area of the search result image is left as the allocation number candidate. Remove from the candidate.

ステップS1208で、割り付け数候補が無い場合は、ステップS1203に進み、検索結果画像は割り付け画像ではないと判定する。ステップS1208で、割り付け数候補がある場合は、ステップS1209に進み、検索結果画像は割り付け画像であると判定する。更に、ステップS1207において、どの中心x座標、中心y座標とほぼ同じであったかにより、包含位置、すなわち、割り付け位置を取得する。   If there is no allocation number candidate in step S1208, the process advances to step S1203 to determine that the search result image is not an allocation image. If it is determined in step S1208 that there is an allocation number candidate, the process advances to step S1209 to determine that the search result image is an allocation image. In step S1207, an inclusion position, that is, an allocation position is acquired depending on which center x coordinate and center y coordinate are substantially the same.

以上で、ステップS808における検索結果画像の割り付け画像判定処理は終了である。   This completes the assigned image determination processing for the search result image in step S808.

図8のフローに戻り、ステップS809では、検索結果画像が割り付け画像でない場合は、ステップS803に進み、処理対象画像の画像特徴量を登録する。検索結果画像が割り付け画像の場合は、ステップS810に進み、検索結果画像を割り付け方法に沿って分割した状態で再登録する。   Returning to the flow of FIG. 8, in step S809, if the search result image is not an assigned image, the process proceeds to step S803 to register the image feature amount of the processing target image. If the search result image is an allocated image, the process proceeds to step S810, and the search result image is re-registered in a state of being divided according to the allocation method.

図15は、ステップS810における検索結果画像の分割再登録処理手順の一例を示すフローチャートである。以下、同図に従い、ステップS810の詳細を説明する。まず、ステップS1501で、検索結果画像の割り付け数をKに、登録済みの基準画像IDの最大数をNに代入する。次にステップS1502で、基準画像IDと画像IDとの関連付けテーブルを参照し、検索結果画像の基準画像IDから画像ID、領域情報を取得する。ステップS1503では、割り付け数によってあらかじめ定められている割り付け方法にしたがって、得られた領域情報をK個に分割する。   FIG. 15 is a flowchart illustrating an example of the procedure for dividing and re-registering the search result image in step S810. The details of step S810 will be described below with reference to FIG. First, in step S1501, the assigned number of search result images is substituted for K, and the maximum number of registered reference image IDs is substituted for N. In step S1502, an association table of reference image IDs and image IDs is referred to, and an image ID and area information are acquired from the reference image ID of the search result image. In step S1503, the obtained area information is divided into K pieces according to an assignment method predetermined by the number of assignments.

次に、ステップS1504で、基準画像IDと画像IDとの関連付けテーブルに対し、N+1からN+Kの基準画像IDを追加する。さらに、それらの基準画像IDに対し、ステップS1502で得られた画像IDとステップS1503で得られたK分割した領域情報を関連付けて登録する。ステップS1505では、基準画像IDと画像IDとの関連付けテーブルから、検索結果画像の基準画像IDを削除する。   In step S1504, N + 1 to N + K reference image IDs are added to the reference table of reference image IDs and image IDs. Furthermore, the image ID obtained in step S1502 and the K-divided area information obtained in step S1503 are registered in association with those reference image IDs. In step S1505, the reference image ID of the search result image is deleted from the reference table of the reference image ID and the image ID.

ステップS1506で、特徴量IDと基準画像IDとの関連付けテーブルを参照し、検索結果画像の基準画像IDの特徴点座標を取得する。次にステップS1507では、ステップS1506で得られた特徴点座標が、K分割した領域のうちどの領域に含まれるのかを求め、対応する基準画像IDを取得する。そして、検索結果画像の基準画像IDを、K分割後の基準画像IDに書き換える。   In step S1506, the feature point coordinates of the reference image ID of the search result image are acquired by referring to the association table between the feature amount ID and the reference image ID. In step S1507, it is determined which of the K-divided regions the feature point coordinates obtained in step S1506 are included, and a corresponding reference image ID is acquired. Then, the reference image ID of the search result image is rewritten to the reference image ID after K division.

図8のフローに戻り、ステップS811で、検索結果画像を割り付け分割した複数の画像のうち、処理対象画像から該当する分割画像へのリンク情報を登録する。ステップS811の処理は、ステップS806の処理と同等である。このステップS810、S811の処理により、割り付け画像が何らかの原因で基準画像として一旦は登録されたとしても、その割り付け画像に含まれる1ページの画像が処理対象として入力された場合、割り付け画像に含まれていた各ページが、基準画像として再登録されることになる。   Returning to the flow of FIG. 8, in step S811, link information from the processing target image to the corresponding divided image is registered among the plurality of images obtained by assigning and dividing the search result image. The process in step S811 is equivalent to the process in step S806. Even if the allocated image is once registered as a reference image for some reason by the processing in steps S810 and S811, if one page image included in the allocated image is input as a processing target, it is included in the allocated image. Each page that has been registered is re-registered as a reference image.

ここで、ステップS810およびS811の処理を具体例を用いて説明する。図9の状態から追加登録する場合について説明する。ここでは、処理対象画像と検索結果画像との関係が図10(C)であったとする。そして、処理対象画像の画像IDは5とし、検索結果画像の画像IDは4とする。図10(C)に示すように、検索結果画像は2ページの割り付け画像であり、その左側半分が処理対象画像と一致している。検索結果画像に対しては1枚の基準画像(基準画像IDは5)が登録されていたので、これを2枚の基準画像として登録しなおす。登録済みの最大基準画像IDは5だったとすると、左側ページを基準画像IDの6、右側ページを基準画像IDの7として登録する。図16(A),(B)に分割再登録後の各テーブルの状態を示す。   Here, the processing of steps S810 and S811 will be described using a specific example. A case of additional registration from the state of FIG. 9 will be described. Here, it is assumed that the relationship between the processing target image and the search result image is as shown in FIG. The image ID of the processing target image is 5 and the image ID of the search result image is 4. As shown in FIG. 10C, the search result image is a two-page layout image, and the left half of the search result image matches the processing target image. Since one reference image (reference image ID is 5) is registered for the search result image, it is re-registered as two reference images. If the registered maximum reference image ID is 5, the left page is registered as 6 for the reference image ID, and the right page is registered as 7 for the reference image ID. FIGS. 16A and 16B show the state of each table after division re-registration.

図16(A)の基準画像IDと画像IDとの関連付けに対しては、基準画像IDの6と7を追加し、基準画像IDの5に登録されていた画像IDの4を挿入する。更に、基準画像IDが6の行に対しては基準画像IDの5に登録されていた画像IDが4の領域情報の左側の領域情報を、基準画像IDが7の行に対しては右側の領域情報を、それぞれの領域情報として挿入する。基準画像IDが5の行については、削除する。さらに、処理対象画像のリンク情報を追加する。すなわち、基準画像IDが6の行の画像IDに5を挿入し、領域情報に処理対象画像の座標情報を挿入する。   For the association between the reference image ID and the image ID in FIG. 16A, the reference image IDs 6 and 7 are added, and the image ID 4 registered in the reference image ID 5 is inserted. Further, for the row with the reference image ID 6, the region information on the left side of the region information with the image ID 4 registered in the reference image ID 5 is displayed. The area information is inserted as each area information. The row with the reference image ID 5 is deleted. Further, link information of the processing target image is added. That is, 5 is inserted into the image ID of the row whose reference image ID is 6, and the coordinate information of the processing target image is inserted into the region information.

図16(B)の特徴量IDと基準画像IDとの関連付けに対しては、基準画像IDの5が登録されている特徴量IDを検索する。図9(B)から、特徴量IDの1と4が取得される。そして、それらの特徴点の座標情報を取得する。特徴量IDの1に登録されている特徴点の座標は、検索結果画像の左側ページ内に存在する点であることがわかるので、基準画像IDを5から6に変更する。特徴量IDの4に登録されている特徴点の座標は、検索結果画像の右側ページ内に存在する点であることがわかるので、基準画像IDを5から7に変更する。   For the association between the feature amount ID and the reference image ID in FIG. 16B, the feature amount ID in which the reference image ID 5 is registered is searched. Feature amount IDs 1 and 4 are acquired from FIG. And the coordinate information of those feature points is acquired. Since the coordinates of the feature points registered in the feature amount ID 1 are found to be points on the left page of the search result image, the reference image ID is changed from 5 to 6. Since the coordinates of the feature point registered in the feature amount ID 4 are found to be points on the right page of the search result image, the reference image ID is changed from 5 to 7.

以上で、図4のステップS409における画像登録処理は終了である。次に、図4のフローに戻り、ステップS410にて、入力画像が割り付け画像でない場合は、第1の実施形態の登録処理を終了する。入力画像が割り付け画像の場合は、ステップS411に進む。   This completes the image registration process in step S409 in FIG. Next, returning to the flow of FIG. 4, if the input image is not an assigned image in step S410, the registration process of the first embodiment is terminated. If the input image is an assigned image, the process proceeds to step S411.

ステップS411ですべての画像の処理が終了した場合は、第1の実施形態の画像登録処理を終了する。すべての画像の処理が終了していない場合は、ステップS412で次の領域の画像を処理対象画像に設定し、ステップS408以降の処理を繰り返す。   If all the images have been processed in step S411, the image registration processing of the first embodiment is ended. If all the images have not been processed, the image in the next area is set as the processing target image in step S412, and the processing in step S408 and subsequent steps is repeated.

[類似基準画像検索処理]
ここで、図8のステップS801の類似基準画像検索処理の詳細について、図17のフローチャートを用いて説明する。ここで説明する検索処理方式は、投票方式ともいわれる方式である。
[Similar standard image search processing]
Details of the similarity reference image search process in step S801 in FIG. 8 will be described with reference to the flowchart in FIG. The search processing method described here is a method called a voting method.

まず、ステップS1701で、登録されている基準画像数分の投票箱を用意する。技術的には、RAM上に、各基準画像用の投票数を格納するための変数を確保する処理である。   First, in step S1701, ballot boxes for the number of registered reference images are prepared. Technically, it is a process of securing a variable for storing the number of votes for each reference image on the RAM.

次に、ステップS1702で、すべての投票箱の投票数を0でリセットする。ステップS1703では、カウンタkを1でリセットする。ステップS1704では、処理対象画像のk番目の特徴量IDを取得し、ステップS1705で特徴量IDのkに登録されている基準画像IDリストを取得する。ステップS1706で、基準画像IDリスト中のすべての基準画像IDの投票箱に、投票を行う。投票を行う際の投票数は、常に1にしてもよいし、特徴量の類似度をもとにした投票数にしてもよい。また、特徴点の座標をもとにした投票数にしてもよい。   In step S1702, the number of votes in all ballot boxes is reset to zero. In step S1703, the counter k is reset to 1. In step S1704, the k-th feature amount ID of the processing target image is acquired, and in step S1705, the reference image ID list registered in the feature amount ID k is acquired. In step S1706, votes are cast in the ballot boxes for all the reference image IDs in the reference image ID list. The number of votes at the time of voting may be always 1 or may be based on the similarity of feature quantities. Alternatively, the number of votes may be based on the feature point coordinates.

ステップS1707で、カウンタkに1を加える(インクリメント)。ステップS1708で、カウンタkが処理対象画像の特徴点数以下である場合はステップS1704に戻り、特徴点数を超えた場合はステップS1709に進む。最後に、ステップS1709で、投票数の多い順にソートする。   In step S1707, 1 is added to the counter k (increment). If it is determined in step S1708 that the counter k is equal to or smaller than the number of feature points of the processing target image, the process returns to step S1704, and if the number exceeds the number of feature points, the process proceeds to step S1709. Finally, in step S1709, sorting is performed in descending order of votes.

なお、特徴量を量子化した際に、特徴量は類似していても、量子化値が異なる場合がある。その場合は、特徴量IDが異なってしまう。その対策として、ステップS1705において、特徴量IDのkに登録されている基準画像IDリストを取得するだけでなく、特徴量IDのkと類似度が高い特徴量IDに登録されている基準画像IDも取得する。そして、ステップS1706で、それらすべての基準画像IDに投票するという方式が採られることもある。   When the feature amount is quantized, the quantized value may be different even if the feature amount is similar. In that case, the feature amount ID is different. As a countermeasure, in step S1705, not only the reference image ID list registered in the feature quantity ID k is acquired, but also the reference image ID registered in the feature quantity ID having a high similarity to the feature quantity ID k. Also get. In step S1706, a method of voting for all the reference image IDs may be employed.

[一致領域特定処理]
ここで、図8のステップS804の一致領域特定処理の詳細について、図18のフローチャートを用いて説明する。
[Matched area identification process]
Details of the matching area specifying process in step S804 in FIG. 8 will be described with reference to the flowchart in FIG.

まず、ステップS1801で、比較元画像の特徴点に対して最も特徴量間距離が短い比較先画像の特徴点を対応点とし、それらのリストを最短距離対応点リストとして作成する。具体的には、比較元画像のある特徴点の特徴量と比較先画像のすべての特徴量との特徴量間距離を計算する。その中で、最も短い距離が閾値Tv以内であれば、比較先画像の特徴点IDと最も近い距離になった比較先画像の特徴点IDとを最短距離対応点とし、最短距離対応点リストに登録する。その際、それらの特徴点の座標、特徴量間距離も合わせて登録する。比較元画像のすべての特徴点に対してこの処理を行うことにより、最短距離対応点リストが作成できる。最短距離対応点リストのスキーマは、例えば図19のように、比較元画像の特徴点IDとその座標、比較先画像の特徴点IDとその座標からなる。ただし、必ずしも1つのスキーマにこれらの項目がある必要はなく、複数のスキーマの結合により、これらの情報が得られれば良い。   First, in step S1801, the feature points of the comparison destination image having the shortest distance between feature amounts with respect to the feature points of the comparison source image are set as corresponding points, and those lists are created as the shortest distance corresponding point list. Specifically, the distance between the feature amounts of the feature amount of a feature point in the comparison source image and all the feature amounts of the comparison destination image is calculated. Among them, if the shortest distance is within the threshold Tv, the feature point ID of the comparison destination image that is closest to the feature point ID of the comparison destination image is set as the shortest distance correspondence point, and the shortest distance correspondence point list is displayed. sign up. At that time, the coordinates of the feature points and the distance between the feature amounts are also registered. By performing this process on all feature points of the comparison source image, a shortest distance corresponding point list can be created. The schema of the shortest distance corresponding point list includes, for example, as shown in FIG. 19, a feature point ID and its coordinates of the comparison source image, and a feature point ID and its coordinates of the comparison destination image. However, it is not always necessary to have these items in one schema, and it is only necessary to obtain these information by combining a plurality of schemas.

これ以降、最短距離対応点リストにはm組の最短距離対応点が登録されたとして説明する。また、最短距離対応点リストに登録されたk番目の対応点について、比較元画像、比較先画像の特徴点IDをそれぞれQk、Skと表し、それらの特徴点座標をそれぞれ(x’k,y’k)、(xk,yk)と表す。   In the following description, it is assumed that m sets of shortest distance corresponding points are registered in the shortest distance corresponding point list. For the k-th corresponding point registered in the shortest distance corresponding point list, the feature point IDs of the comparison source image and the comparison destination image are represented as Qk and Sk, respectively, and their feature point coordinates are represented as (x′k, y). 'k) and (xk, yk).

次に、ステップS1802では、ステップS1801で作成された最短距離対応点リストの中から、実際の画像上で正しい対応点と推測される対応点のみを選別し、正対応点リストを作成する。1枚の画像の中には、類似する特徴量も存在する。したがって、特徴量間距離が最短であるというだけで対応付けた対応点、すなわち、ステップS1801で作成された対応点の中には、実際の画像上では正しく対応した点ではない点が含まれる。本処理では、複数の特徴点の位置関係を用いることにより、正しい対応点と推測される対応点を選別する。   Next, in step S1802, only the corresponding points that are estimated to be correct corresponding points on the actual image are selected from the shortest distance corresponding point list generated in step S1801, and a correct corresponding point list is created. There are similar feature amounts in one image. Accordingly, the corresponding points that are associated only by the shortest distance between the feature amounts, that is, the corresponding points created in step S1801 include points that are not correctly corresponding points on the actual image. In this process, by using the positional relationship between a plurality of feature points, the corresponding points that are estimated to be correct are selected.

図20は、ステップS1802における正対応点リストの作成処理手順の一例を示すフローチャートである。ここで説明する方式は、RANSAC(RANdom SAmple Consensus)といわれる方式である。   FIG. 20 is a flowchart illustrating an example of a processing procedure for creating a corresponding point list in step S1802. The system described here is a system called RANSAC (RANdom Sample Consensus).

まず、ステップS2001で、最終投票数を表す変数VoteMaxを0に初期化する。次に、ステップS2002で、類似度算出処理の反復カウント数を表す変数Countを0に初期化する。   First, in step S2001, a variable VoteMax representing the final number of votes is initialized to zero. Next, in step S2002, a variable Count indicating the number of repetition counts of the similarity calculation process is initialized to zero.

ステップS2003で、反復カウント数Countが最大反復処理回数Rnを超えていない場合はステップS2004へ進み、投票数を表す変数Voteを0に初期化する。次に、ステップS2005で、当該最短距離対応点リストから対応点の組をランダムに2組抽出する。ここでは、最短距離対応点リストのi番目の対応点とj番目の対応点を抽出した場合を説明する。i番目の対応点の特徴点IDは、QiとSiであり、それらの座標はそれぞれ(x’ i,y’ i)、(xi,yi)である。また、j番目の対応点の特徴点IDは、QjとSjであり、それらの座標はそれぞれ(x’ j,y’ j)、(xj,yj)である。   In step S2003, if the iteration count number Count does not exceed the maximum number of iterations Rn, the process proceeds to step S2004, and a variable Vote indicating the number of votes is initialized to zero. Next, in step S2005, two pairs of corresponding points are extracted at random from the shortest distance corresponding point list. Here, a case where the i-th corresponding point and the j-th corresponding point in the shortest distance corresponding point list are extracted will be described. The feature point IDs of the i-th corresponding point are Qi and Si, and their coordinates are (x ′ i, y ′ i) and (xi, yi), respectively. The feature point IDs of the j-th corresponding point are Qj and Sj, and their coordinates are (x'j, y'j) and (xj, yj), respectively.

次に、ステップS2006で、抽出したQi(x’i,y’ i)、Si(xi,yi)及びQj(x’j,y’j)、Sj(xj,yj)が式(11)に示す変換を満たしていると仮定し、式(11)中の変数a〜fを求める。   Next, in step S2006, the extracted Qi (x′i, y′i), Si (xi, yi), Qj (x′j, y′j), and Sj (xj, yj) are expressed in the equation (11). Assuming that the conversion shown is satisfied, variables a to f in Equation (11) are obtained.

ただし、図20に示すステップS2006では、変数a〜dで構成される行列をMで示し、変数e〜fで構成される行列をTで示している。

Figure 2015203978
ここで、第1の実施形態では、簡略化のため、相似変換だけを考える。このとき、上記式(11)は以下の式(12)のように書き換えられる。
Figure 2015203978
このとき、変数a、b、e、fはx’i、y’i、xi、yi、x’j、y’j、xj、yjを使って式(13)から式(16)で表される。
Figure 2015203978
However, in step S2006 shown in FIG. 20, a matrix composed of variables a to d is denoted by M, and a matrix composed of variables ef is denoted by T.
Figure 2015203978
Here, in the first embodiment, only the similarity transformation is considered for simplification. At this time, the above equation (11) is rewritten as the following equation (12).
Figure 2015203978
At this time, the variables a, b, e, and f are expressed by equations (13) to (16) using x′i, y′i, xi, yi, x′j, y′j, xj, and yj. The
Figure 2015203978

次に、ステップS2007で、対応点選択変数kを1で初期化する。ステップS2008では、上述のステップS2005で当該最短距離対応点リストからランダムに抽出された2組の点以外の点を選択するために、kがiでもjでもないかを判定する。kがiかjのときは、ステップS2015に進み、kをインクリメントした後、ステップS2008に戻る。kがiでもjでもないときは、ステップS2009に進み、対応点選択変数kが当該最短距離対応点リストに登録されている対応点の組数mを超えていないかを判定する。ここで、超えている場合はステップS2016へ処理を移すが、これについては後述する。ステップS2009における判定で対応点選択変数kが当該最短距離対応点リストに登録されている対応点の組数mを超えていない場合はステップS2010へ処理を移す。このステップS2010では、上述のステップS2006で当該最短距離対応点リストからランダムに抽出した2組の点Si及びSj以外の点を当該最短距離対応点リストから抽出する。第一の実施形態では、抽出された点をSkとし、Skの座標は(xk,yk)とする。   Next, in step S2007, the corresponding point selection variable k is initialized with 1. In step S2008, it is determined whether k is neither i nor j in order to select points other than the two sets of points randomly extracted from the shortest distance corresponding point list in step S2005 described above. When k is i or j, the process proceeds to step S2015, and after incrementing k, the process returns to step S2008. If k is neither i nor j, the process advances to step S2009 to determine whether the corresponding point selection variable k exceeds the number m of corresponding points registered in the shortest distance corresponding point list. Here, if it exceeds, the process moves to step S2016, which will be described later. If it is determined in step S2009 that the corresponding point selection variable k does not exceed the number m of corresponding points registered in the shortest distance corresponding point list, the process proceeds to step S2010. In step S2010, points other than the two sets of points Si and Sj randomly extracted from the shortest distance corresponding point list in step S2006 are extracted from the shortest distance corresponding point list. In the first embodiment, the extracted point is Sk, and the coordinates of Sk are (xk, yk).

次にステップS2011で、Skの座標(xk,yk)が式(12)を使って移される点S’kの座標(uk,vk)を求める。   Next, in step S2011, the coordinates (uk, vk) of the point S'k to which the coordinates (xk, yk) of Sk are moved using the equation (12) are obtained.

その後、ステップS2012では、S’kの座標(uk,vk)とQkの座標(x’k,y’k)との幾何学的距離をユークリッド距離で計算し、当該ユークリッド距離がしきい値Td以下であるか否かを判定する。当該ユークリッド距離がしきい値Td以下の場合はステップS2013へ進み2つの画像の対応点情報を仮正対応点リストに記憶し、ステップS2014で投票数Voteをインクリメントし、ステップS2015へ処理を移す。また、当該ユークリッド距離がしきい値Tdより大きい場合は、何もせずにステップS2015へ処理を移す。このステップS2015では、対応点選択変数kをインクリメントし、ステップS2008に戻り、対応点選択変数kが当該最短距離対応点リストに登録されている対応点の組数mを超えるまで、上述の処理を繰り返す。   After that, in step S2012, the geometric distance between the coordinates (uk, vk) of S′k and the coordinates (x′k, y′k) of Qk is calculated as the Euclidean distance, and the Euclidean distance is calculated as the threshold value Td. It is determined whether or not: If the Euclidean distance is equal to or less than the threshold value Td, the process proceeds to step S2013, the corresponding point information of the two images is stored in the provisional corresponding point list, the vote number Vote is incremented in step S2014, and the process proceeds to step S2015. If the Euclidean distance is greater than the threshold value Td, the process proceeds to step S2015 without doing anything. In step S2015, the corresponding point selection variable k is incremented, and the process returns to step S2008, and the above processing is performed until the corresponding point selection variable k exceeds the number m of corresponding points registered in the shortest distance corresponding point list. repeat.

次に、ステップS2009で、対応点選択変数kが当該最短距離対応点リストに登録されている対応点の組数mを超えた場合の処理であるステップS2016を説明する。ステップS2016では、投票数Voteの値と最終投票数VoteMaxの値とを比較し、投票数Voteの値が最終投票数VoteMaxの値よりも大きい場合にはステップS2017へ処理を移す。このステップS2017では、最終投票数VoteMaxの値を投票数Voteの値で置き換え、次のステップS2018で、正対応点リストを仮正対応点リストで置き換える。その後、ステップS2019で反復カウント数Countをインクリメントし、上述のステップS2003に処理を戻す。   Next, step S2016, which is processing when the corresponding point selection variable k exceeds the number m of corresponding points registered in the shortest distance corresponding point list in step S2009, will be described. In step S2016, the value of the vote number Vote and the value of the final vote number VoteMax are compared. If the value of the vote number Vote is larger than the value of the final vote number VoteMax, the process proceeds to step S2017. In this step S2017, the value of the final vote number VoteMax is replaced with the value of the vote number Vote, and in the next step S2018, the correct corresponding point list is replaced with the provisional correct corresponding point list. Thereafter, the iteration count number Count is incremented in step S2019, and the process returns to step S2003 described above.

また、ステップS2016で、投票数Voteの値が最終投票数VoteMaxの値以下の場合にはステップS2019へ処理を移し、反復カウント数Countをインクリメントし、上述のステップS2003に処理を戻す。   If the value of the vote number Vote is equal to or less than the value of the final vote number VoteMax in step S2016, the process proceeds to step S2019, the repeat count number Count is incremented, and the process returns to step S2003 described above.

次に、ステップS2003で、反復カウント数Countが予め定められた最大反復処理回数Rnを超えている場合はステップS2020へ進み、最終投票数VoteMax、正対応点リストを出力し、この処理を終了する。   Next, in step S2003, if the iteration count number Count exceeds the predetermined maximum number of iterations Rn, the process proceeds to step S2020, the final vote number VoteMax, the correct corresponding point list is output, and this process ends. .

尚、第1の実施形態における類似度の算出方法の説明では、相似変換だけを考えて説明したが、アフィン変換などその他の幾何学変換についても、ステップS2006でそれぞれに応じた変換行列を求めることにより、対応可能である。例えば、アフィン変換の場合には、まずステップS2005で、ランダムに選択する対応点の組の座標数を3とする。次に、ステップS2006で、式(12)ではなく式(11)を使うこととし、ステップS2005で選択した3組の対応点(合計6点)を使って変数a〜fを求めれば良い。   In the description of the similarity calculation method according to the first embodiment, only the similarity transformation is described. However, for other geometric transformations such as affine transformation, a transformation matrix corresponding to each is obtained in step S2006. Can be supported. For example, in the case of affine transformation, first, in step S2005, the number of coordinates of a set of corresponding points to be selected at random is set to 3. Next, in step S2006, equation (11) is used instead of equation (12), and the variables a to f may be obtained using the three sets of corresponding points (total of 6 points) selected in step S2005.

以上で、図18のステップS1802における正対応点リスト作成処理は終了である。次に図18のフローに戻り、ステップS1803で、正対応点リストの特徴点の座標をもとに、処理対象画像、および、検索結果画像の最外接矩形を求める。正対応点リストの各特徴点のx座標、y座標それぞれの最小値、最大値を求める。(x座標の最小値,y座標の最小値)と(x座標の最大値,y座標の最大値)の2点で囲まれた矩形を最外接矩形とする。   This is the end of the corresponding point list creation process in step S1802 of FIG. Next, returning to the flow of FIG. 18, in step S1803, the outermost bounding rectangle of the processing target image and the search result image is obtained based on the coordinates of the feature points in the correct corresponding point list. The minimum value and maximum value of each of the x-coordinate and y-coordinate of each feature point in the positive corresponding point list are obtained. A rectangle surrounded by two points (minimum value of x coordinate, minimum value of y coordinate) and (maximum value of x coordinate, maximum value of y coordinate) is defined as a circumscribed rectangle.

次に、ステップS1804で、最外接矩形の面積を画像全面の面積で割ることにより、処理対象画像における一致領域の包含割合RQ、および、検索結果画像における一致領域の包含割合RSを求める。   In step S1804, the area of the outermost rectangle is divided by the area of the entire image to obtain the inclusion ratio RQ of the matching area in the processing target image and the inclusion ratio RS of the matching area in the search result image.

[検索処理]
図21は、第1の実施形態の画像処理装置における検索処理手順の一例を示すフローチャートである。
[Search processing]
FIG. 21 is a flowchart illustrating an example of a search processing procedure in the image processing apparatus according to the first embodiment.

まず、ステップS2101において、画像入力部201を介して検索元画像(クエリ画像)が入力される。ステップS2102では、画像特徴量算出部204において、検索元画像の画像特徴量を抽出する。ステップS2102の画像特徴量抽出処理は、図4のステップ308における処理と同じである。   First, in step S2101, a search source image (query image) is input via the image input unit 201. In step S2102, the image feature amount calculation unit 204 extracts the image feature amount of the search source image. The image feature amount extraction process in step S2102 is the same as the process in step 308 in FIG.

次に、ステップS2103で、画像検索部205において、ステップS2102で算出された画像特徴量を検索元とし、すでに登録されている基準画像の画像特徴量との比較を行い、類似する基準画像を検索する。ステップS2103の類似基準画像検索処理は、図8のステップS801における処理と同じである。類似基準画像検索処理では、登録済みの基準画像の画像特徴量との比較が行われ、類似度が算出される。そして、類似度の高い順にソートされた結果が得られる。   Next, in step S2103, the image search unit 205 uses the image feature amount calculated in step S2102 as a search source, compares it with the image feature amount of the already registered reference image, and searches for a similar reference image. To do. The similarity reference image search process in step S2103 is the same as the process in step S801 in FIG. In the similar reference image search process, a comparison with the image feature amount of the registered reference image is performed, and the similarity is calculated. Then, a result sorted in descending order of similarity is obtained.

次に、ステップS2104で、画像検索部205において、ステップS2103で検索された基準画像IDに対応した画像IDを取得する。図9(A)や図11、図16(A)に示すように、基準画像IDに対して、複数の画像IDが関連付けられて登録されており、基準画像IDに対応した画像IDをすべて取得する。   In step S2104, the image search unit 205 acquires an image ID corresponding to the reference image ID searched in step S2103. As shown in FIG. 9A, FIG. 11, and FIG. 16A, a plurality of image IDs are registered in association with the reference image ID, and all image IDs corresponding to the reference image ID are acquired. To do.

最後に、ステップS2105において、ステップS2104で取得した画像を類似度とともに表示する。   Finally, in step S2105, the image acquired in step S2104 is displayed together with the similarity.

上記例では、基準画像に対応する画像の類似度を同じ値で表示しているが、領域情報をもとに、類似度を調整してもよい。例えば、ステップS2103で検索された基準画像IDに対して登録されている画像IDを取得する際、領域情報をもとに、該画像IDの画像における基準画像の包含割合を求める。そして、包含割合をもとに類似度の調整を行い、再度類似度でソートした結果を検索結果として出力するようにしてもよい。また、基準画像ごとに特徴点数を記憶しておき、その特徴点数をもとに、類似度の調整を行うようにしてもよい。   In the above example, the similarity of the image corresponding to the reference image is displayed with the same value, but the similarity may be adjusted based on the region information. For example, when acquiring an image ID registered for the reference image ID searched in step S2103, the inclusion ratio of the reference image in the image with the image ID is obtained based on the region information. Then, the similarity may be adjusted based on the inclusion ratio, and the result sorted again by the similarity may be output as the search result. Alternatively, the number of feature points may be stored for each reference image, and the degree of similarity may be adjusted based on the number of feature points.

また、上記例では、検索結果として検索結果画像と類似度を表示するとしているが、領域情報をもとに、どの領域が検索元画像と同じ領域であったかを表示するようにしてもよい。   In the above example, the similarity with the search result image is displayed as the search result. However, based on the region information, which region is the same region as the search source image may be displayed.

以上のように第1の実施形態では、登録する画像が割り付け画像であるかどうかを判定し、割り付け画像の場合は、割りつけられた元の画像(基準画像)ごとに登録するようにした。その際、登録する基準画像がすでに登録されている基準画像と類似する場合は、すでに登録されている基準画像へのリンク情報を登録するようにした。これにより、同じ画像を複数回登録する場合に、検索結果に影響を与えずに、少ない記憶領域で登録することが可能となる。また、割り付け枚数の異なる画像同士であっても、ページ単位のリンク情報で登録することにより、少ない記憶領域で登録することが可能となる。   As described above, in the first embodiment, it is determined whether or not an image to be registered is an allocated image, and in the case of an allocated image, registration is performed for each allocated original image (reference image). At this time, if the reference image to be registered is similar to the already registered reference image, link information to the already registered reference image is registered. Thus, when the same image is registered a plurality of times, it is possible to register with a small storage area without affecting the search result. Also, even images with different numbers of layouts can be registered with a small storage area by registering with link information in units of pages.

[第2の実施形態]
以下、第2の実施形態を説明する。上記の第1の実施形態では、画像登録時の処理である図4のステップS402において、プリンタドライバの設定情報や、プリンタや複合機などの機器の操作情報をもとに、入力画像の割り付け画像判定を行った。第2の実施形態では、入力された画像を解析(像域分離)することにより、割り付け画像判定を行う例を説明する。
[Second Embodiment]
Hereinafter, a second embodiment will be described. In the first embodiment described above, in step S402 in FIG. 4, which is a process at the time of image registration, an input image assigned image is set based on printer driver setting information and operation information of a device such as a printer or a multifunction peripheral. Judgment was made. In the second embodiment, an example will be described in which an assigned image is determined by analyzing an input image (image region separation).

図22は、第2の実施形態の画像処理装置における入力画像の割り付け画像判定処理手順の一例を示すフローチャートである。   FIG. 22 is a flowchart illustrating an example of an assigned image determination processing procedure for an input image in the image processing apparatus according to the second embodiment.

まず、ステップS2201で、入力画像を解析し、像域分離処理(又は、矩形領域決定処理)を行う。像域分離処理とは、例えば、図23における画像2301を2302に示すように、意味のある領域毎の塊として認識する。そして、該領域各々の属性(テキスト(TEXT)/図画(PICTURE)/写真(PHOTO)/線(LINE)/表(TABLE)等)を判定し、異なる属性を持つ領域に分割する処理である。   First, in step S2201, the input image is analyzed, and image area separation processing (or rectangular area determination processing) is performed. With image area separation processing, for example, an image 2301 in FIG. 23 is recognized as a cluster for each meaningful area as indicated by 2302. Then, the attribute (text (TEXT) / drawing (PICTURE) / photograph (PHOTO) / line (LINE) / table (TABLE)), etc.) of each area is determined and divided into areas having different attributes.

ここで、像域分離処理の一実施例について詳細に説明する。まず、入力画像を白黒画像に2値化し、これで得られる2値画像中の輪郭線追跡を行って黒画素輪郭で囲まれる画素が連続する塊を抽出する。そして、面積の大きい黒画素の塊については、内部にある白画素に対しても輪郭線追跡を行って白画素の塊を抽出し、さらに一定面積以上の白画素の塊の内部からは再帰的に黒画素の塊を抽出する。   Here, an embodiment of the image area separation process will be described in detail. First, the input image is binarized into a black and white image, and contour tracing is performed in the binary image obtained thereby to extract a block in which pixels surrounded by a black pixel contour are continuous. For a black pixel block having a large area, the white pixel block is extracted by tracing the outline of the white pixel inside, and recursively from the inside of the white pixel block having a certain area or more. A black pixel block is extracted.

このようにして得られた黒画素の塊に外接する矩形領域を、その大きさ及び形状で分類し、異なる属性を持つ領域へ分類する。例えば、縦横比が1に近く、大きさが一定の範囲の領域は文字相当の画素塊とし、近接する文字が整列している場合にはそれらを連結してグループ化し、そのグループ化した矩形領域をテキスト領域とする。文字領域意外の画素塊について、扁平な画素塊を線領域、一定大きさ以上でかつ矩形の白画素塊を整列よく内包する黒画素塊の占める範囲を表領域、不定形の画素塊が散在している領域を写真領域、それ以外の任意形状の画素塊を図画領域とする。   The rectangular regions circumscribing the black pixel block thus obtained are classified according to their sizes and shapes, and are classified into regions having different attributes. For example, an area having an aspect ratio close to 1 and having a constant size is a pixel block corresponding to a character, and when adjacent characters are aligned, they are connected and grouped, and the grouped rectangular region Is the text area. For pixel blocks other than the character area, flat pixel blocks are line areas, black pixel blocks that are larger than a certain size and that contain rectangular white pixel blocks in a well-aligned manner are table areas, and irregular pixel blocks are scattered. An area of the image is a photographic area, and a pixel block of any other shape is a drawing area.

次にステップS2202で、像域分離した領域をもとに、割り付け数候補を求める。まず、あらかじめ定められている分割方法で入力画像を分割できるか考える。図24で一例を示す。図24(A)は、像域分離した状態の図である。図24(B)〜(G)は、それぞれ順番に、画像を2〜16分割した分割位置を破線(2501等)で示した図であり、これらの情報は予めハードディスクなどの記憶装置に記憶されているものとする。ここでは、この線のことを、分割線(ページ境界位置でもある)という。このとき、像域分離した領域が、分割線をまたいでいるかどうか(ページを跨いでいるかどうか)を調べる。この図により、同図(B)、(C)は領域が分割線をまたいでいないことがわかる。また、同図(D)〜(G)は領域が分割線をまたいでいることがわかる。したがって、この例では、{2、4}を割り付け数の候補とする。   Next, in step S2202, allocation number candidates are obtained based on the image area separated regions. First, it is considered whether the input image can be divided by a predetermined division method. An example is shown in FIG. FIG. 24A is a diagram showing a state where image areas are separated. FIGS. 24B to 24G are diagrams in which the division positions obtained by dividing the image by 2 to 16 are shown by broken lines (2501 etc.) in order, and these pieces of information are stored in advance in a storage device such as a hard disk. It shall be. Here, this line is referred to as a dividing line (also a page boundary position). At this time, it is checked whether or not the region where the image area is separated straddles the dividing line (ie, whether it straddles the page). From this figure, it can be seen that the regions in FIGS. 7B and 7C do not cross the dividing line. Also, FIGS. 4D to 4G show that the region straddles the dividing line. Therefore, in this example, {2, 4} is a candidate for the number of allocation.

次に、ステップS2203で、割り付け数候補が無い場合は、ステップS2204に進み、割り付け画像ではないと判定し、処理を終了する。ステップS2203で、割り付け数候補がある場合は、ステップS2205に進み、割り付け画像であると判定する。そして、ステップS2206で、割り付け数候補のうち最大の数を割り付け数とし、処理を終了する。上記の例の場合、割り付け数候補が{2、4}であったので、大きい方の「4」が最終的な割り付け数であると判定する。   In step S2203, if there is no allocation number candidate, the process proceeds to step S2204, where it is determined that the image is not an allocation image, and the process ends. If there is an allocation number candidate in step S2203, the process advances to step S2205 to determine that the image is an allocation image. In step S2206, the maximum number among the allocation number candidates is set as the allocation number, and the process ends. In the case of the above example, since the allocation number candidates are {2, 4}, it is determined that the larger “4” is the final allocation number.

以上のように第2の実施形態では、入力された画像を解析(像域分離)することにより、処理対象画像に含まれるページ数判定が可能となる。これにより、プリンタドライバの設定情報や、機器の操作情報が無い場合であっても、入力画像の割り付け画像判定を行うことができ、基準画像ごとの登録が可能となる。   As described above, in the second embodiment, the number of pages included in the processing target image can be determined by analyzing the input image (image region separation). As a result, even when there is no printer driver setting information or device operation information, the assigned image of the input image can be determined, and registration for each reference image is possible.

[第3の実施形態]
以下、第3の実施形態を説明する。上記第1、第2の実施形態では、入力画像として、文書画像の割り付け画像を想定している。第3の実施形態は、割り付け画像ではなく、1ページ文書に複数の画像が貼り付けられている画像が入力されたときの例である。ここでいう画像とは、自然画のみを対象としてもよいし、ドローや線画なども対象としてもよい。また、テキストの画像も対象としてもよい。この場合は、貼り付けられている画像ごとに登録を行う。
[Third Embodiment]
Hereinafter, a third embodiment will be described. In the first and second embodiments, a document image layout image is assumed as the input image. The third embodiment is an example when an image in which a plurality of images are pasted on a one-page document is input instead of an allocated image. Here, the image may be a natural image only, or a draw or a line drawing. Text images may also be targeted. In this case, registration is performed for each pasted image.

図25は、第3の実施形態の画像処理装置における登録処理手順の一例を示すフローチャートである。本フローは、図4のフローと類似しており、図4のフローと同じ処理を行う箇所については、同じステップ番号を振っている。ここでは、処理の異なる箇所のみの説明を行う。   FIG. 25 is a flowchart illustrating an example of a registration processing procedure in the image processing apparatus according to the third embodiment. This flow is similar to the flow of FIG. 4, and the same step numbers are assigned to portions that perform the same processing as the flow of FIG. 4. Here, only a different part of the process will be described.

ステップS2502では、入力画像の像域分離処理を行う。像域分離処理は、図22のステップS2201と同じである。ステップS2503、および、ステップS2510は、複数の領域があると判定されたか否かで分岐を行う。ステップS2505は領域数Nを取得し、ステップS2506で領域分割を行う。ここでいう領域分割は、ステップS2502で求められた領域を抽出する処理を行う。ステップS2509では、処理対象画像の登録処理を行う。   In step S2502, an image area separation process is performed on the input image. The image area separation process is the same as step S2201 in FIG. Steps S2503 and S2510 branch depending on whether or not it is determined that there are a plurality of regions. In step S2505, the number of areas N is acquired, and in step S2506, area division is performed. In this area division, processing for extracting the area obtained in step S2502 is performed. In step S2509, processing target image registration processing is performed.

図26は、ステップS2509における画像登録処理手順の一例を示すフローチャートである。本フローは、図8のフローを類似しており、図8のフローと同じ処理を行う箇所については、同じステップ番号を振っている。ここでは、処理の異なる箇所のみの説明を行う。   FIG. 26 is a flowchart illustrating an example of an image registration processing procedure in step S2509. This flow is similar to the flow of FIG. 8, and the same step numbers are assigned to the portions that perform the same processing as the flow of FIG. 8. Here, only a different part of the process will be described.

ステップS2605で、処理対象画像における一致領域の包含割合RQと検索結果画像における一致領域の包含割合RSを比較し、ほぼ同じではない、と判定された場合、ステップS803に進み、処理対象画像の画像特徴量を登録する。図8のステップS807〜S811相当の処理は行わない。   In step S2605, the inclusion ratio RQ of the matching region in the processing target image is compared with the inclusion ratio RS of the matching region in the search result image. If it is determined that they are not substantially the same, the process proceeds to step S803, and the processing target image Register feature values. The processing corresponding to steps S807 to S811 in FIG. 8 is not performed.

以上のように第3の実施形態では、1ページ文書に複数の画像が貼り付けられている場合、貼り付けられている画像(基準画像)ごとに登録を行うようにした。その際、登録する基準画像がすでに登録されている基準画像と類似する場合は、すでに登録されている基準画像へのリンク情報を登録するようにした。これにより、同じ画像が異なる文書に貼り付けられている場合であっても、画像単位のリンク情報で登録することにより、少ない記憶領域で登録することが可能となる。   As described above, in the third embodiment, when a plurality of images are pasted on a one-page document, registration is performed for each pasted image (reference image). At this time, if the reference image to be registered is similar to the already registered reference image, link information to the already registered reference image is registered. As a result, even when the same image is pasted on different documents, it is possible to register with a small storage area by registering with link information in units of images.

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

201…画像入力部、202…割り付け画像判定部、203…領域分割部、204…画像特徴量算出部、205…画像検索部、206…リンク情報登録部、207…画像特徴量登録部、208…記憶部   DESCRIPTION OF SYMBOLS 201 ... Image input part, 202 ... Assigned image determination part, 203 ... Area division part, 204 ... Image feature-value calculation part, 205 ... Image search part, 206 ... Link information registration part, 207 ... Image feature-value registration part, 208 ... Memory

Claims (11)

画像検索装置に画像を登録する画像処理装置であって、
登録対象の画像を入力する入力手段と、
入力した画像を、当該画像に応じて複数の領域に分割する分割手段と、
分割した領域毎に、画像の特徴量を算出する算出手段と、
分割した領域毎に、前記特徴量を用いて、既に登録済み画像から類似画像を検索する検索手段と、
該検索手段の検索結果に類似画像が存在しない場合、前記分割した該当する領域の画像の特徴量を登録する登録手段と、
を有することを特徴とする画像処理装置。
An image processing apparatus for registering an image in an image search apparatus,
An input means for inputting an image to be registered;
Dividing means for dividing the input image into a plurality of regions according to the image;
Calculating means for calculating the feature amount of the image for each divided area;
Search means for searching for similar images from already registered images using the feature amount for each divided area;
A registration unit that registers the feature amount of the image of the divided corresponding area when a similar image does not exist in the search result of the search unit;
An image processing apparatus comprising:
前記分割手段は、
前記入力手段による入力画像が、複数ページを1枚の画像に割り付けた画像であるか否か、割り付けた画像であれば、その割り付けページ数を判定するページ数判定手段を含み、
前記ページ数判定手段で判定されたページ数に従って、前記入力画像を分割する
ことを特徴とする請求項1に記載の画像処理装置。
The dividing means includes
Whether or not the input image by the input means is an image obtained by allocating a plurality of pages to one image, and if it is an allocated image, includes a page number determining means for determining the number of allocated pages;
The image processing apparatus according to claim 1, wherein the input image is divided according to the number of pages determined by the page number determination unit.
前記入力手段は、登録対象の1枚の画像が何ページで構成されるかを示す設定情報を更に入力し、
前記ページ数判定手段は、前記設定情報を参照してページ数を判定することを特徴とする請求項2に記載の画像処理装置。
The input means further inputs setting information indicating how many pages are included in one image to be registered,
The image processing apparatus according to claim 2, wherein the page number determination unit determines the number of pages with reference to the setting information.
前記ページ数判定手段は、
前記入力手段による入力画像を2値化する2値化手段と、
該2値化手段で得られた2値画像から、黒画素が連続する領域を求め、各領域の大きさ形状に基づき複数の矩形領域を求める矩形領域決定手段と、
1枚の画像に含まれるページ数で決まるページ境界位置の情報を参照し、前記矩形領域決定手段で決定した各矩形領域が、前記ページ境界にまたがらない最大となるページ数を、前記分割するページ数として決定する手段と
を有する請求項2に記載の画像処理装置。
The page number determination means includes
Binarization means for binarizing an input image by the input means;
A rectangular area determining means for obtaining an area in which black pixels are continuous from the binary image obtained by the binarizing means and obtaining a plurality of rectangular areas based on the size and shape of each area;
With reference to the information on the page boundary position determined by the number of pages included in one image, the rectangular area determined by the rectangular area determining means divides the maximum number of pages that do not cross the page boundary. The image processing apparatus according to claim 2, further comprising means for determining the number of pages.
前記分割手段は、
前記入力手段による入力画像を2値化する2値化手段と、
該2値化手段で得られた2値画像中の黒画素が連続する領域の属性を判定し、同じ属性を持つ領域どうしを連結した領域を、分割する領域として決定する手段と
を有することを特徴とする請求項1に記載の画像処理装置。
The dividing means includes
Binarization means for binarizing an input image by the input means;
A means for determining an attribute of a region where black pixels are continuous in the binary image obtained by the binarization means, and determining a region obtained by connecting regions having the same attribute as a region to be divided. The image processing apparatus according to claim 1, wherein:
前記登録手段は、
前記検索手段が前記分割した領域の画像に類似する類似画像を検索したときの、前記分割した領域の画像が前記類似画像を包含する関係にある場合、前記類似する画像を分割し、各分割した領域の画像の特徴量を、前記検索手段で検索する基準画像の特徴量として再登録する第1の登録手段と、
前記検索手段が前記分割した領域の画像に類似する類似画像を検索したときの、前記分割した領域の画像が前記類似画像に包含される関係にある場合、前記分割した領域の画像の特徴量を、前記類似する画像へのリンクする画像の特徴量として登録する第2の登録手段とを含む
ことを特徴とする請求項1乃至5のいずれか1項に記載の画像処理装置。
The registration means includes
When the search means searches for a similar image similar to the image of the divided area and the image of the divided area includes the similar image, the similar image is divided and each divided First registration means for re-registering the feature quantity of the image in the region as the feature quantity of the reference image searched by the search means;
When the search means searches for a similar image similar to the image of the divided area and the image of the divided area is included in the similar image, the feature amount of the image of the divided area is calculated. The image processing apparatus according to claim 1, further comprising: a second registration unit configured to register as a feature amount of an image linked to the similar image.
前記第1の登録手段は、
前記検索手段が前記分割した領域の画像と、検索で得られた類似画像それぞれが一致する領域の割合の比に基づき、前記類似画像が複数ページが割り当てられた画像か否かを判定する手段を有し、
当該手段で複数ページが割り当てられた画像であると判定された場合に、前記類似画像を分割して登録を行うことを特徴とする請求項6に記載の画像処理装置。
The first registration means includes:
Means for determining whether or not the similar image is an image to which a plurality of pages are allocated based on a ratio of a ratio of the regions in which the image of the divided region and the similar image obtained by the search match each other. Have
The image processing apparatus according to claim 6, wherein when the image is determined to be an image to which a plurality of pages are assigned, the similar image is divided and registered.
検索元となるクエリ画像を入力する手段と、
前記クエリ画像の特徴量を算出する手段と、
該手段で算出した特徴量を用いて、請求項1乃至7のいずれか1項に記載の画像処理装置から類似画像を検索する手段と、
前記類似画像とのリンク情報を持つ画像を検索する手段と
を有することを特徴とする画像検索装置。
A means for inputting a query image as a search source;
Means for calculating a feature amount of the query image;
Means for retrieving a similar image from the image processing apparatus according to any one of claims 1 to 7, using the feature amount calculated by the means;
An image search apparatus comprising: means for searching for an image having link information with the similar image.
画像検索装置に画像を登録する画像処理装置の制御方法であって、
入力手段が、登録対象の画像を入力する入力工程と、
分割手段が、入力した画像を、当該画像に応じて複数の領域に分割する分割工程と、
算出手段が、分割した領域毎に、画像の特徴量を算出する算出工程と、
検索手段が、分割した領域毎に、前記特徴量を用いて、既に登録済み画像から類似画像を検索する検索工程と、
登録手段が、該検索工程の検索結果に類似画像が存在しない場合、前記分割した該当する領域の画像の特徴量を登録する登録工程と、
を有することを特徴とする画像処理装置の制御方法。
An image processing apparatus control method for registering an image in an image search apparatus,
An input step in which an input means inputs an image to be registered;
A dividing step in which the dividing unit divides the input image into a plurality of regions according to the image;
A calculation step in which the calculation means calculates a feature amount of the image for each divided area;
A search step for searching for a similar image from an already registered image using the feature amount for each divided area;
A registration step in which a registration unit registers a feature amount of an image of the divided corresponding area when a similar image does not exist in the search result of the search step;
A control method for an image processing apparatus, comprising:
コンピュータが読み込み実行することで、前記コンピュータを、請求項1乃至8のいずれか1項に記載の装置が有する各手段を機能させるためのプログラム。   The program for functioning each means which the apparatus of any one of Claim 1 thru | or 8 has by making the computer read and execute. 請求項10に記載のプログラムを格納したコンピュータが読み取り可能な記憶媒体。   A computer-readable storage medium storing the program according to claim 10.
JP2014083097A 2014-04-14 2014-04-14 Image processing apparatus, image search apparatus, and control method for image processing apparatus Active JP6355400B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2014083097A JP6355400B2 (en) 2014-04-14 2014-04-14 Image processing apparatus, image search apparatus, and control method for image processing apparatus
US14/680,118 US9594981B2 (en) 2014-04-14 2015-04-07 Image search apparatus and control method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014083097A JP6355400B2 (en) 2014-04-14 2014-04-14 Image processing apparatus, image search apparatus, and control method for image processing apparatus

Publications (2)

Publication Number Publication Date
JP2015203978A true JP2015203978A (en) 2015-11-16
JP6355400B2 JP6355400B2 (en) 2018-07-11

Family

ID=54597408

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014083097A Active JP6355400B2 (en) 2014-04-14 2014-04-14 Image processing apparatus, image search apparatus, and control method for image processing apparatus

Country Status (1)

Country Link
JP (1) JP6355400B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021193629A (en) * 2017-01-13 2021-12-23 株式会社ブロードリーフ Damage determination device, and period schedule operation device and repair maintenance expense operation device using the same

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000261648A (en) * 1999-03-05 2000-09-22 Fuji Xerox Co Ltd Image forming device
JP2007080210A (en) * 2005-09-16 2007-03-29 Ricoh Co Ltd Information management device, information management method, information management program and recording medium
JP2007164648A (en) * 2005-12-16 2007-06-28 Ricoh Co Ltd Similar image search device, similar image search method, program and information recording medium
JP2009027385A (en) * 2007-07-18 2009-02-05 Canon Inc Image processor, its method and computer program
JP2012063890A (en) * 2010-09-14 2012-03-29 Toshiba Corp Annotation device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000261648A (en) * 1999-03-05 2000-09-22 Fuji Xerox Co Ltd Image forming device
JP2007080210A (en) * 2005-09-16 2007-03-29 Ricoh Co Ltd Information management device, information management method, information management program and recording medium
JP2007164648A (en) * 2005-12-16 2007-06-28 Ricoh Co Ltd Similar image search device, similar image search method, program and information recording medium
JP2009027385A (en) * 2007-07-18 2009-02-05 Canon Inc Image processor, its method and computer program
JP2012063890A (en) * 2010-09-14 2012-03-29 Toshiba Corp Annotation device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021193629A (en) * 2017-01-13 2021-12-23 株式会社ブロードリーフ Damage determination device, and period schedule operation device and repair maintenance expense operation device using the same
JP2021193630A (en) * 2017-01-13 2021-12-23 株式会社ブロードリーフ Damage determination device, and period schedule operation device and repair maintenance expense operation device using the same
JP7054423B2 (en) 2017-01-13 2022-04-13 株式会社ブロードリーフ Period arithmetic unit and period arithmetic program.
JP7054424B2 (en) 2017-01-13 2022-04-13 株式会社ブロードリーフ Second-hand goods sales system, and second-hand goods sales program.

Also Published As

Publication number Publication date
JP6355400B2 (en) 2018-07-11

Similar Documents

Publication Publication Date Title
US10726252B2 (en) Method of digitizing and extracting meaning from graphic objects
US9594981B2 (en) Image search apparatus and control method thereof
US9916521B2 (en) Depth normalization transformation of pixels
Xiong et al. Text-independent writer identification using SIFT descriptor and contour-directional feature
JP2015103088A (en) Image processing apparatus, image processing method, and program
Ray Choudhury et al. Automatic extraction of figures from scholarly documents
Grana et al. Layout analysis and content enrichment of digitized books
CN113033269B (en) Data processing method and device
Davila et al. Tangent-V: Math formula image search using line-of-sight graphs
JP6355400B2 (en) Image processing apparatus, image search apparatus, and control method for image processing apparatus
JP6598480B2 (en) Image processing apparatus, image processing method, and program
Úbeda et al. Pattern spotting in historical documents using convolutional models
WO2020039260A2 (en) Systems and methods for segmentation of report corpus using visual signatures
Diem et al. Semi-automated document image clustering and retrieval
Bharathi et al. Segregated handwritten character recognition using GLCM features
Berriche et al. Seam carving-based Arabic handwritten sub-word segmentation
JP7384603B2 (en) Document form identification
Böschen et al. A comparison of approaches for automated text extraction from scholarly figures
Ziran et al. Accurate graphic symbol detection in ancient document digital reproductions
Browuer et al. Segregating and extracting overlapping data points in two-dimensional plots
Zitan et al. Performance investigation of a proposed CBIR search engine using deep convolutional neural networks
Can et al. Line segmentation of individual demographic data from Arabic handwritten population registers of ottoman empire
JP6327918B2 (en) Image search apparatus and control method thereof
Gao et al. An Interactive Appearance-based Document Retrieval System for Historical Newspapers.
Rumalshan et al. Transfer Learning Approach for Railway Technical Map (RTM) Component Identification

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170331

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180219

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180223

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180327

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180612

R151 Written notification of patent or utility model registration

Ref document number: 6355400

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151