JP2017138742A - Image processing apparatus, image processing method, and program - Google Patents

Image processing apparatus, image processing method, and program Download PDF

Info

Publication number
JP2017138742A
JP2017138742A JP2016018418A JP2016018418A JP2017138742A JP 2017138742 A JP2017138742 A JP 2017138742A JP 2016018418 A JP2016018418 A JP 2016018418A JP 2016018418 A JP2016018418 A JP 2016018418A JP 2017138742 A JP2017138742 A JP 2017138742A
Authority
JP
Japan
Prior art keywords
image
comparison
local feature
source image
feature points
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2016018418A
Other languages
Japanese (ja)
Inventor
椎山 弘隆
Hirotaka Shiiyama
弘隆 椎山
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 JP2016018418A priority Critical patent/JP2017138742A/en
Publication of JP2017138742A publication Critical patent/JP2017138742A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

PROBLEM TO BE SOLVED: To make it possible to accurately compare a comparison source image with a comparison destination image.SOLUTION: The present invention extracts local feature points from a comparison source image and a comparison destination image, and calculates their local features. The present invention then determines the local feature points in corresponding relationship with each other on the basis of the calculated local features, and estimates a common area between the comparison source image and comparison destination image.SELECTED DRAWING: Figure 3

Description

本発明は、比較元画像と比較先画像とを比較する技術に関する。   The present invention relates to a technique for comparing a comparison source image and a comparison destination image.

画像の局所的な特徴量(局所特徴量)を用いて類似画像を検索する方法が提案されている。この方法では、まず、画像から特徴的な点(局所特徴点)を抽出する(非特許文献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. However, it is a theoretical story that the local feature is invariant to rotation and enlargement / reduction. In an actual digital image, the local feature before image rotation and enlargement / reduction processing corresponds to that after processing. Some variation occurs between the local feature amount.

回転不変の局所特徴量抽出のために、たとえば非特許文献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 threshold process. ”Is voted, and the higher the number of votes, the more similar.

更に、予め定めた閾値以上類似する特徴点の対応関係を求め、そのペアの位置情報が、同じ幾何変換を満たしているかを検証するRANSAC処理もある。これは、予め定めた閾値以上類似する特徴点のペアからランダムに2ペアを選択しアフィン変換行列を求める。次に、残りの予め定めた閾値以上類似する特徴点のペアの位置情報がアフィン変換行列を満たすかを検証し、予め定めた閾値数のペアが満たす場合に合致と判断する方法である。(非特許文献3)   Furthermore, there is also a RANSAC process that obtains a correspondence relationship between feature points that are similar to each other by a predetermined threshold or more and verifies whether the position information of the pair satisfies the same geometric transformation. In this process, two pairs are randomly selected from pairs of feature points that are similar to each other by a predetermined threshold or more to obtain an affine transformation matrix. Next, it is a method of verifying whether or not the position information of the remaining feature point pairs that are more than a predetermined threshold satisfies the affine transformation matrix, and determining that they match if a predetermined number of threshold pairs are satisfied. (Non Patent Literature 3)

特開2009−284084号公報JP 2009-284084 A

C.Harris and M.J. Stephens,“A combined corner and edge detector,” In Alvey Vision Conference,pages 147−152, 1988.C. Harris and M.M. J. et al. Stephens, “A combined corner and edge detector,” In Album 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. 199 91-110. M. A. Fischler and R. C. Bolles, ”Random sample consensus: A paradigm formodel fitting with applications to image analysis and automated cartography,” Commun. ACM, no.24, vol.6, pp.381−395, June 1981.M.M. A. Fischler and R.M. C. Bolles, "Random sample consensus: A paradigm formatfitting with applications to imaging analysis," Commun. ACM, no. 24, vol. 6, pp. 381-395, June 1981.

非特許文献3に記載の方法では、比較元の画像と比較先の画像との類似を比較する際、比較先画像と比較元画像とで特に対象とする領域を特定することなく、類似する特徴点の対応関係を求めいた。そのため、比較元画像と比較先画像との類似を精度よく求めることが出来ていなかった。そこで、本発明は、比較元画像と比較先画像とを精度よく比較出来るようにすることを目的とする。   In the method described in Non-Patent Document 3, when comparing the similarity between the comparison source image and the comparison destination image, the comparison target image and the comparison source image have similar characteristics without specifying a target area. We asked for the correspondence of points. Therefore, the similarity between the comparison source image and the comparison destination image cannot be obtained with high accuracy. Accordingly, an object of the present invention is to make it possible to accurately compare a comparison source image and a comparison destination image.

上記課題を解決するために、本発明は、比較元画像と比較先画像とを入力する入力手段と、前記入力された比較元画像と比較先画像とから局所特徴点を抽出する抽出手段と、前記抽出された局所特徴点について局所特徴を算出する算出手段と、前記算出された局所特徴に基づいて、前記比較元画像と前記比較先画像とで対応関係にある前記局所特徴点を決定する第1の決定手段と、前記決定された対応関係にある局所特徴点に基づいて、前記比較元画像と前記比較先画像との共通領域を推定する第1の推定手段と、を有することを特徴とする。   In order to solve the above problems, the present invention includes an input unit that inputs a comparison source image and a comparison destination image, an extraction unit that extracts local feature points from the input comparison source image and the comparison destination image, A calculating means for calculating a local feature for the extracted local feature points, and determining the local feature points in a correspondence relationship between the comparison source image and the comparison destination image based on the calculated local features And a first estimation unit that estimates a common area between the comparison source image and the comparison destination image based on the determined local feature points in the determined correspondence relationship. To do.

以上の構成によれば、本発明は、比較元画像と比較先画像とを精度よく比較出来るようになる。   According to the above configuration, the present invention can accurately compare the comparison source image and the comparison destination image.

第1の実施形態に係る画像処理装置のハードウェア構成を示すブロック図。1 is a block diagram showing a hardware configuration of an image processing apparatus according to a first embodiment. 第1の実施形態に係る画像処理装置のソフトウェア構成を示すブロック図。FIG. 2 is a block diagram showing a software configuration of the image processing apparatus according to the first embodiment. 第1の実施形態に係る画像処理装置における比較処理のフローチャート。5 is a flowchart of comparison processing in the image processing apparatus according to the first embodiment. 第1の実施形態に係る比較処理の概要を説明する図。The figure explaining the outline | summary of the comparison process which concerns on 1st Embodiment. 第1の実施形態においてRANSAC処理を用いた幾何関係算出のフローチャート。The flowchart of the geometric relationship calculation using the RANSAC process in 1st Embodiment. 第2の実施形態に係る画像処理装置における比較処理のフローチャート。10 is a flowchart of comparison processing in the image processing apparatus according to the second embodiment. 第3の実施形態に係る画像処理装置における比較処理のフローチャート。10 is a flowchart of comparison processing in the image processing apparatus according to the third embodiment.

[第1の実施形態]
以下、本発明の第1の実施形態について、図面を参照しながら説明する。まず、本実施形態の画像処理装置のハードウェア構成について、図1のブロック図を参照して説明する。本実施形態の画像処理装置は、サーバ装置やクライアント装置により構成される。サーバ装置やクライアント装置はそれぞれ単一のコンピュータ装置で実現してもよいし、必要に応じた複数のコンピュータ装置に各機能を分散して実現するようにしてもよい。複数のコンピュータ装置で構成される場合は、互いに通信可能なようにLocal Area Network(LAN)などで接続されている。コンピュータ装置は、パーソナルコンピュータ(PC)やワークステーション(WS)等の情報処理装置によって実現することができる。
[First Embodiment]
Hereinafter, a first embodiment of the present invention will be described with reference to the drawings. First, the hardware configuration of the image processing apparatus according to the present embodiment will be described with reference to the block diagram of FIG. The image processing apparatus according to the present embodiment includes a server apparatus and a client apparatus. 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とのインターフェイスである。   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. The 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.

出力デバイスインターフェイス106は、コンピュータ装置100の保持するデータや供給されたデータを表示するためのモニタ110とのインターフェイスである。通信インターフェイス107はインターネットなどのネットワーク回線111や、デジタルカメラ112,デジタルビデオカメラ113,スマートフォン114などに接続するための通信インターフェイスである。システムバス108は、101から107の各ユニットを通信可能に接続する伝送路である。後述する本実施形態の各フローチャートの処理等は、ROM102等のコンピュータ読み取り可能な記憶媒体に格納されたプログラムをCPU101が実行することにより実行される。   The output device interface 106 is an interface with a 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. The processing of each flowchart of the present embodiment, which will be described later, is executed by the CPU 101 executing a program stored in a computer-readable storage medium such as the ROM 102.

図2は、本実施形態に係る画像処理装置のソフトウェア構成を示すブロック図である。同図において、画像入力部201は、比較元画像(検索元画像)および比較先画像(登録画像)の入力を行う。画像特徴量群抽出部202は、画像入力部201から入力された比較元画像および比較先画像の画像特徴量群を抽出する。画像特徴量群抽出部202は、各画像から局所特徴点を抽出する特徴点抽出手段、および抽出した局所特徴点について局所特徴を算出する特徴算出手段(第1の算出手段)としての機能を有する。   FIG. 2 is a block diagram showing a software configuration of the image processing apparatus according to the present embodiment. In the figure, an image input unit 201 inputs a comparison source image (search source image) and a comparison destination image (registered image). The image feature amount group extraction unit 202 extracts an image feature amount group of the comparison source image and the comparison destination image input from the image input unit 201. The image feature quantity group extraction unit 202 has a function as a feature point extraction unit that extracts local feature points from each image and a feature calculation unit (first calculation unit) that calculates local features for the extracted local feature points. .

画像特徴量比較部203は、RANSAC処理を行い、更に特徴点座標を比較し、検索結果としてふさわしいものかを確認する処理である。具体的には、画像特徴量比較部203は、比較元画像の局所特徴量と比較先画像の局所特徴量の類似性に基いて、対応関係にある局所特徴点を決定する対応点決定手段(第1の決定手段)としての機能を有する。また、アフィン変換を行い変換後の特徴点座標が合致する特徴点の度数と、座標が一致しない度数をカウントする投票数集計手段としての機能、投票数が予め定めた閾値を超えた場合にリトライを停止する停止手段としての機能を有する。また、画像特徴量比較部203は、投票結果から比較元画像と比較先画像の共通領域を推定する共通領域推定手段(第1の推定手段)としての機能を有する。また、共通領域中で局所特徴量と比較先画像の局所特徴量の類似性に基づく対応関係の無い特徴点と、アフィン変換を行い変換後の特徴点座標が合致しない特徴点を決定する非正対応点抽出手段(第2の決定手段)としての機能を有する。また、これらの結果を用い、比較元画像と比較先画像の差異のある領域を求める差異領域推定手段(第2の推定手段)、その結果を類似スコアに反映する処理を行う類似スコア算出手段(第2の算出手段)としての機能も有する。   The image feature amount comparison unit 203 is a process of performing RANSAC processing, further comparing feature point coordinates, and confirming whether the search result is appropriate. Specifically, the image feature quantity comparison unit 203 determines corresponding local feature points that are in a correspondence relationship based on the similarity between the local feature quantity of the comparison source image and the local feature quantity of the comparison destination image ( A first determination means). Also, a function as a vote counting means that counts the frequency of feature points that match the converted feature point coordinates by performing affine transformation and the frequency that the coordinates do not match, retry when the number of votes exceeds a predetermined threshold It has the function as a stop means to stop. Further, the image feature amount comparison unit 203 has a function as a common region estimation unit (first estimation unit) that estimates a common region of the comparison source image and the comparison destination image from the voting result. In addition, in the common area, a feature point that has no correspondence based on the similarity between the local feature amount and the local feature amount of the comparison target image and a feature point that performs affine transformation and does not match the feature point coordinates after transformation are determined. It has a function as corresponding point extraction means (second determination means). Also, using these results, a different area estimation means (second estimation means) for obtaining an area having a difference between the comparison source image and the comparison target image, and a similarity score calculation means (a second score estimation means) for performing processing for reflecting the result on the similarity score It also has a function as a second calculation means).

比較結果出力部204は、画像特徴量比較部203の比較結果を出力する。記憶部205は処理中のデータを記憶するメモリ、HDD等である。なお、これら各構成は、CPU101により統括的に制御されている。   The comparison result output unit 204 outputs the comparison result of the image feature amount comparison unit 203. The storage unit 205 is a memory, HDD, or the like that stores data being processed. Note that each of these components is centrally controlled by the CPU 101.

次に、本実施形態における比較元画像と比較先画像との比較処理の詳細について説明する。なお、複数の比較先画像(登録画像)から比較元画像(検索元画像)に類似する1以上の画像を検索する際には、以下の比較処理を各比較先画像に対して行い、算出される総合スコアから、類似する画像を決定するようにすればよい。   Next, details of the comparison process between the comparison source image and the comparison destination image in the present embodiment will be described. When one or more images similar to the comparison source image (search source image) are searched from a plurality of comparison destination images (registered images), the following comparison processing is performed on each comparison destination image and is calculated. A similar image may be determined from the overall score.

図3は、本実施形態に係る画像処理装置における比較処理手順の一例を示すフローチャートである。同図において、まずステップS301では、画像入力部201により比較元画像と比較先画像が読み込まれる。図4は、本実施形態に係る比較処理の概略を説明する図であり、このS301では、図4(a)に示すような比較元画像と比較先画像が読み込まれたものとする。なお、比較先画像については、この処理フローよりも前に予め読み込まれ、記憶部205にその情報が登録されていてもよい。   FIG. 3 is a flowchart illustrating an example of a comparison processing procedure in the image processing apparatus according to the present embodiment. In the figure, first in step S301, the image input unit 201 reads a comparison source image and a comparison destination image. FIG. 4 is a diagram for explaining the outline of the comparison processing according to this embodiment. In this S301, it is assumed that the comparison source image and the comparison destination image as shown in FIG. Note that the comparison destination image may be read in advance before this processing flow, and the information may be registered in the storage unit 205.

ステップS302では、画像特徴量群抽出部202が、比較元画像および比較先画像の両画像について局所特徴を計算する。まず、画像特徴量群抽出部202は、画像の回転があってもロバスト(robust)に抽出されるような局所的な特徴点(局所特徴点)を抽出する。この局所特徴点の抽出方法として、ここではHarris作用素を用いる(C.Harris and M.J. Stephens, “A combined corner and edge detector,” In Alvey Vision Conference, pages 147−152, 1988.参照)。   In step S302, the image feature quantity group extraction unit 202 calculates local features for both the comparison source image and the comparison target image. First, the image feature quantity group extraction unit 202 extracts local feature points (local feature points) that are robustly extracted even when the image is rotated. As a method for extracting local feature points, a Harris operator is used here (see C. Harris and MJ Stephens, “A combined corner and edge detector,” In Alvery Vision Conference, pages 147-152, 1988.).

具体的には、Harris作用素を作用させて得られた出力画像H上の画素について、当該画素及び当該画素の8近傍にある画素(合計9画素)の画素値を調べる。そして、当該画素が局所極大になる(当該9画素の中で当該画素の画素値が最大になる)点を局所特徴点として抽出する。ここで、当該画素が局所極大になったときでも、当該画素の値がしきい値以下の場合には局所特徴点として抽出しないようにする。なお、局所特徴点を抽出可能な方法であれば、上述のHarris作用素による特徴点抽出方法に限らず、どのような特徴点抽出方法でも適用可能である。   Specifically, with respect to the pixel on the output image H obtained by applying the Harris operator, the pixel values of the pixel and pixels in the vicinity of the pixel (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. Note that any feature point extraction method is applicable as long as it is a method that can extract local feature points, not limited to the above-described feature point extraction method using the Harris operator.

そして、画像特徴量群抽出部202は、抽出した局所特徴点の特徴量(局所特徴)を算出する。局所特徴としては、SIFT、SURF、FAST等の公知の技術を利用することができる。また、比較先画像が記憶部205に予め登録されている場合には、前もって局所特徴を求めて記憶部205に記憶しておいてもよい。   Then, the image feature quantity group extraction unit 202 calculates the feature quantity (local feature) of the extracted local feature points. As local features, known techniques such as SIFT, SURF, FAST, etc. can be used. In addition, when the comparison destination image is registered in the storage unit 205 in advance, local features may be obtained in advance and stored in the storage unit 205.

ステップS303で、画像特徴量比較部203は、比較元画像から比較先画像に対して投票処理を行い、投票数と対応点のペアを求める。ここでは、まず、比較先画像の局所特徴をVq、局所特徴に関連付けされている局所特徴点をQ、座標をQ(x’,y’)とする。また、比較元画像に存在する局所特徴をVs、局所特徴に関連付けされている局所特徴点をS、座標をS(x,y)とする。画像特徴量比較部203は、VqとVsとのベクトルベクトル特徴間距離を全ての組合せについて計算し、最短距離対応点リストを作成する。そして、計算したベクトル特徴間の距離が閾値Tv以下となり、かつ、最短距離となるようなVqとVsとの対応点ペアを抽出する。   In step S303, the image feature amount comparison unit 203 performs a voting process on the comparison target image from the comparison source image to obtain a pair of the number of votes and corresponding points. Here, first, the local feature of the comparison target image is Vq, the local feature point associated with the local feature is Q, and the coordinates are Q (x ′, y ′). Further, a local feature existing in the comparison source image is Vs, a local feature point associated with the local feature is S, and a coordinate is S (x, y). The image feature quantity comparison unit 203 calculates vector vector feature distances between Vq and Vs for all combinations, and creates a shortest distance corresponding point list. Then, a corresponding point pair of Vq and Vs is extracted such that the calculated distance between the vector features is equal to or less than the threshold value Tv and is the shortest distance.

ステップS304では、画像特徴量比較部203が、投票数が閾値以上か判断する。投票数が閾値未満の場合には、処理をステップS305に進め、比較元画像と比較先画像とは類似するものではないとして処理を終了する。   In step S304, the image feature amount comparison unit 203 determines whether the number of votes is equal to or greater than a threshold value. If the number of votes is less than the threshold value, the process proceeds to step S305, and the process ends, assuming that the comparison source image and the comparison destination image are not similar.

他方、投票数が閾値以上の場合には、処理をステップS306へ進める。そして、ステップS306にて、抽出した対応点ペアに対してRANSACを用い、比較元画像と比較先画像の特徴点位置の幾何関係を求め、幾何関係が正しいもの、すなわち正対応点を決定する。そして、画像特徴量比較部203は、正対応点の個数を求め、ペアリングスコアとする。それと同時に、対応点ペアで幾何関係を満たさない特徴点である非正対応点を決定し、その個数を求める。画像特徴量比較部203は、比較元画像および比較先画像それぞれの非正対応点を記憶部205に記憶する。なお、本ステップS306の処理の詳細は後述する。   On the other hand, if the number of votes is equal to or greater than the threshold, the process proceeds to step S306. In step S306, RANSAC is used for the extracted corresponding point pair to obtain the geometric relationship between the feature point positions of the comparison source image and the comparison destination image, and the correct geometric relationship, that is, the positive corresponding point is determined. Then, the image feature amount comparison unit 203 obtains the number of positive corresponding points and uses it as a pairing score. At the same time, non-positive corresponding points that are feature points that do not satisfy the geometric relationship in the corresponding point pairs are determined, and the number thereof is obtained. The image feature amount comparison unit 203 stores the non-positive corresponding points of the comparison source image and the comparison destination image in the storage unit 205. Details of the process in step S306 will be described later.

ステップS307において、画像特徴量比較部203は、比較先画像上の正対応点から共通領域を特定(推定)する。具体的には、比較先画像における正対応点の分布に基づいて、正対応点を包含する領域を求めて、それを共通領域として特定する。領域の求め方として、簡易には正対応点を含む最外接矩形を求めればよい。なお、領域の形状は矩形に限らず、多角形や不定形状等の他の形態であっても構わない。図4に示す例では、比較元画像がある文書画像の一部であるのに対して、比較先画像はある文書画像全体であるため、ここでは、比較先画像上で共通領域を特定する。すなわち、比較元画像と比較先画像のどちらで共通領域を特定するか予め決められていてもよいが、好適には、比較元画像と比較先画像とで包含関係を推定し、より多くの領域をカバーする画像を選択して、その画像上で共通領域を特定する方がよい。   In step S307, the image feature amount comparison unit 203 specifies (estimates) the common area from the positive corresponding points on the comparison target image. Specifically, based on the distribution of the positive corresponding points in the comparison target image, an area including the positive corresponding points is obtained and specified as a common area. As a method for obtaining the region, it is only necessary to simply obtain the circumscribed rectangle including the positive corresponding point. Note that the shape of the region is not limited to a rectangle, but may be another shape such as a polygon or an indefinite shape. In the example shown in FIG. 4, since the comparison source image is a part of a certain document image, the comparison destination image is the entire document image. Therefore, here, a common area is specified on the comparison destination image. That is, it may be determined in advance whether the comparison source image or the comparison destination image specifies the common region, but preferably, the inclusion relationship is estimated between the comparison source image and the comparison destination image, and more regions are determined. It is better to select an image that covers and identify a common area on the image.

ここで、図4(b)に、ステップS302〜ステップS307の処理の概要を示す。同図において、○や×で示している個所が局所特徴を求める特徴点である。図4(b)では、RANSAC処理で局所特徴が類似し、その幾何関係を満足するものを正対応点として○で表示する。他方、局所特徴が類似するものが無い、または局所特徴が類似していても幾何関係を満足しない点を非正対応点として×で示す。図中の点線は、対応関係を表すものである。また、ステップS307までの処理によって、正対応点○の分布に基づき求めた共通領域を図4(b)の比較先画像上の黒い矩形で示している。   Here, FIG. 4B shows an outline of the processing in steps S302 to S307. In the figure, the points indicated by ○ and × are feature points for obtaining local features. In FIG. 4B, a local feature that is similar in the RANSAC process and satisfies the geometric relationship is indicated by a circle as a positive corresponding point. On the other hand, a point that does not satisfy the geometric relationship even if the local feature is not similar or the local feature is similar is indicated by x as a non-positive corresponding point. The dotted line in the figure represents the correspondence. Further, the common area obtained based on the distribution of the positive corresponding points ◯ by the processing up to step S307 is indicated by a black rectangle on the comparison target image in FIG.

本実施形態では、このように比較元画像と比較先画像との共通領域を決定した上で、比較元画像と比較先画像との類似度(後述する総合スコア)を算出しているため、その類似の程度を精度よく求めることができる。   In the present embodiment, since the common area between the comparison source image and the comparison destination image is determined in this way, the similarity (comprehensive score described later) between the comparison source image and the comparison destination image is calculated. The degree of similarity can be obtained with high accuracy.

続いて、ステップS308では、画像特徴量比較部203が、比較先画像上で特定された共通領域における非正対応点の特徴点群を求める。まず、画像特徴量比較部203は、比較元画像の非正対応点と対応点ペアにならなかった比較先画像の共通領域における特徴点(類似する対応点の無い特徴点)を求める。更に、比較先画像の非正対応点と対応点ペアにならなかった比較元画像の特徴点に対して、ステップS306で求まった幾何変換を行い、比較先画像の共通領域の中に射影されるものだけを選別し求める。   Subsequently, in step S308, the image feature amount comparison unit 203 obtains a feature point group of non-positive corresponding points in the common area specified on the comparison destination image. First, the image feature amount comparison unit 203 obtains a feature point (a feature point having no similar corresponding point) in the common area of the comparison destination image that has not been paired with a non-positive corresponding point of the comparison source image. Furthermore, the geometric transformation obtained in step S306 is performed on the feature points of the comparison source image that did not form a pair of corresponding points with the non-positive corresponding point of the comparison destination image, and projected into the common area of the comparison destination image. Select and ask only for things.

これらの結果の論理和を取ることにより、比較元画像及び比較先画像の共通領域における比較元画像と比較先画像の一致しない特徴点群が求まる。図4(c)には、ステップS308の処理結果を示しており、黒枠で示す共通領域内において、上記2種類の特徴点の両方が求められた様子を示している。   By calculating the logical sum of these results, a feature point group in which the comparison source image and the comparison destination image do not match in the common region of the comparison source image and the comparison destination image is obtained. FIG. 4C shows the processing result of step S308, and shows a state in which both of the two types of feature points are obtained in the common area indicated by a black frame.

本実施形態では、これら2種類の特徴点の論理和を取ることで、比較元画像と比較先画像とで個別に上記特徴点を求めた場合や、非正対応点あるいは対応点ペアにならなかった特徴点をそれぞれ単独で求めた場合よりも差異領域を拡張して特定することが出来る。特に、比較元画像と比較先画像とで画像全体が類似して一部領域で差異があるような場合は、例えば、背景の画像が同一で文字の部分のみに差異がある場合等が考えられる。このような場合、文字では局所特徴点が然程とれず、差異領域を大きく取れないこともあるが、上述のように2種類の特徴点の論理和を取ることで、差異領域を拡張して取ることが出来る。   In the present embodiment, by calculating the logical sum of these two types of feature points, the above feature points are obtained individually for the comparison source image and the comparison destination image, or they do not become non-positive corresponding points or corresponding point pairs. The difference area can be expanded and specified as compared with the case where the obtained feature points are obtained individually. In particular, when the entire image is similar between the comparison source image and the comparison destination image and there is a difference in a part of the area, for example, a case where the background image is the same and only the character portion is different is considered. . In such a case, local feature points cannot be taken so much in characters, and a large difference area may not be obtained, but the difference area is expanded by taking the logical sum of two types of feature points as described above. I can take it.

上記2種類の非正対応点に基づいて差異領域を決定する方法は、例えば、OCRにおける像域分離の手法を応用して決定すればよい。像域分離ではx方向、y方向に対する2値画像の黒画素の投影ヒストグラムを生成し文字や図の領域が推定するが、、本実施形態では、比較先画像におけるx方向、y方向の非正対応点のヒストグラムより差異領域が決定される。簡易的には、x方向、y方向それぞれでヒストグラムの値が所定値以上となる区間を含む最外接矩形として決定される。本実施形態では、例えば図4(d)に示すように、x方向、y方向の非正対応点のヒストグラムから差異領域として1以上の領域群が決定される。   The method of determining the difference area based on the two types of non-corresponding points may be determined by applying an image area separation method in OCR, for example. In the image area separation, a projection histogram of black pixels of a binary image in the x direction and the y direction is generated and a region of a character or a figure is estimated. In this embodiment, however, the x direction and y direction in the comparison destination image are not positive. The difference area is determined from the histogram of the corresponding points. For simplicity, it is determined as a circumscribed rectangle including a section in which the value of the histogram is a predetermined value or more in each of the x direction and the y direction. In the present embodiment, for example, as shown in FIG. 4D, one or more region groups are determined as different regions from the histogram of non-positive corresponding points in the x direction and the y direction.

ステップS309では、画像特徴量比較部203が、比較先画像上で決定された各差異領域において非正対応点数を求める。そして、非正対応点が所定の閾値に満たない領域は差異領域から除外する。これは、例えば文書ドキュメントの紙の汚れなどによるイレギュラで生じた特徴点の影響を排除し、例えば文字等のある程度の大きさを持つ領域に差異領域を限定するためである。なお、ここでは、各差異領域において非正対応点数を求めているが、各差異領域に対する非正対応点数(密度)を算出して、密度が所定値よりも低いものを除外するようにしてもよい。   In step S309, the image feature amount comparison unit 203 obtains the number of non-positive corresponding points in each difference area determined on the comparison target image. Then, an area where the non-positive corresponding point is less than the predetermined threshold is excluded from the difference area. This is because, for example, the influence of the feature points caused by irregularity due to paper stains of the document document is eliminated, and the difference area is limited to an area having a certain size such as characters. Here, the number of non-corresponding corresponding points is obtained in each different area, but the number of non-positive corresponding points (density) for each different area is calculated to exclude those having a density lower than a predetermined value. Good.

ステップS310では、画像特徴量比較部203が、ステップS309で特定した領域群のそれぞれから、非正対応点と対応点ペアにならなかった特徴点の数の総和を算出する。ステップS311において、画像特徴量比較部203は、正対応点数つまりペアリングスコアから、上記非正対応点の数の総和に応じたペナルティ分のスコアを減算し、総合スコアを算出する。なお、差異領域を比較結果に強く反映させる場合には、正対応点数から上記非正対応点の数の総和を減じればよく、また差異領域を弱く反映させる際には、上記非正対応点の数の総和に1未満の計数を乗じたものを正対応点数から減じればよい。そして、比較結果出力部204は、比較元画像と比較先画像との比較結果とし、算出された総合スコアを出力する。例えば、比較元画像に対して複数の比較先画像の総合スコアを算出することにより、比較元画像に類似する所定数の画像を検索する場合には、比較結果出力部204は、本フローで算出された総合スコアを記憶部205に一時的に保存しておくよう出力する。   In step S310, the image feature quantity comparison unit 203 calculates the sum of the number of feature points that did not form a pair of non-positive corresponding points and corresponding point pairs from each of the region groups specified in step S309. In step S <b> 311, the image feature quantity comparison unit 203 calculates a total score by subtracting a penalty score corresponding to the total number of non-positive corresponding points from the number of positive corresponding points, that is, the pairing score. When strongly reflecting the difference area in the comparison result, the total number of the non-correct corresponding points should be subtracted from the number of positive corresponding points. When the difference area is weakly reflected, the non-correct corresponding points What is necessary is just to subtract the thing which multiplied the count of less than 1 to the sum total of the number of positive correspondence points. Then, the comparison result output unit 204 outputs the calculated total score as a comparison result between the comparison source image and the comparison destination image. For example, when searching for a predetermined number of images similar to the comparison source image by calculating a total score of a plurality of comparison destination images with respect to the comparison source image, the comparison result output unit 204 calculates with this flow. The total score thus output is output to be temporarily stored in the storage unit 205.

以上の比較処理によって、本実施形態では、単純なRANSACを用いた正対応点の数によるペアリングスコアよりも、共通領域の差異を敏感に反映した総合スコアを算出することが可能になる。そのため、全体的に類似し一部に差異があるような画像の比較、例えば、背景の図柄が同じで、その中に存在する文字列が異なっているような画像を比較する際であっても、差異部分である文字列の異なりを反映した総合スコアを得ることが可能となる。これにより、比較元画像と比較先画像との比較結果の精度を高めることが可能となる。   Through the above comparison processing, in this embodiment, it is possible to calculate a total score that more sensitively reflects the difference in the common area than the pairing score based on the number of positive corresponding points using simple RANSAC. Therefore, even when comparing images that are generally similar and partially different, for example, when comparing images that have the same background pattern and different character strings. Thus, it is possible to obtain a total score reflecting the difference in the character string that is the difference portion. Thereby, the accuracy of the comparison result between the comparison source image and the comparison destination image can be increased.

次に、上述したステップS306の処理の詳細について図5を用いて説明する。図5は、RANSAC処理を用いた比較元画像と比較先画像の特徴点位置の幾何関係の算出のフローチャートである。   Next, details of the processing in step S306 described above will be described with reference to FIG. FIG. 5 is a flowchart for calculating the geometric relationship between the feature point positions of the comparison source image and the comparison destination image using the RANSAC process.

まず、記号の定義を行う。比較先画像の局所特徴をVq、局所特徴に関連付けされている局所特徴点をQ,座標をQ(x’,y’)とする。また、比較元画像に存在する局所特徴をVs、局所特徴に関連付けされている局所特徴点をS、座標をS(x,y)とする。   First, symbols are defined. It is assumed that the local feature of the comparison target image is Vq, the local feature point associated with the local feature is Q, and the coordinate is Q (x ′, y ′). Further, a local feature existing in the comparison source image is Vs, a local feature point associated with the local feature is S, and a coordinate is S (x, y).

ステップS501で、最終投票数を表す変数VoteMaxを0に初期化する。次に、ステップS502で、S303の処理結果である最短距離対応点リストを読み込む。その内容は、繰り返しになるが、計算したベクトル特徴間の距離が閾値Tv以下となり、かつ、最短距離となるようなVqとVsとの対応点ペアである。   In step S501, a variable VoteMax representing the final number of votes is initialized to zero. Next, in step S502, the shortest distance corresponding point list which is the processing result of S303 is read. The content is repeated, but is a corresponding point pair of Vq and Vs such that the calculated distance between the vector features is equal to or less than the threshold value Tv and the shortest distance.

これ以降、最短距離対応点リストに登録されたk番目の対応点について、当該対応点の局所特徴をそれぞれVq(k)とVs(k)と記載としベクトル特徴間の距離が閾値Tv以下となる特徴の個数をそれぞれNq(k)とNs(k)とする。更にVq(k)とVs(k)に対応付けられている局所特徴点をそれぞれQk、Sk、座標をQk(x’,y’)、Sk(x,y)などと添え字を合わせて記載する。またテップS303で作成された最短距離対応点リストに登録された対応点の組数をm組とする。 Thereafter, for the kth corresponding point registered in the shortest distance corresponding point list, the local features of the corresponding point are described as Vq (k) and Vs (k), respectively, and the distance between the vector features is equal to or less than the threshold Tv. Let the number of features be Nq (k) and Ns (k), respectively. Further, local feature points associated with Vq (k) and Vs (k) are subscripts such as Qk and Sk, coordinates are Qk (x ′ k , y ′ k ), Sk (x k , y k ), and the like. Are described together. Further, the number of pairs of corresponding points registered in the shortest distance corresponding point list created in step S303 is m.

次に、ステップS503で、類似度算出処理の反復カウント数を表す変数Countを0に初期化する。次に、ステップS504で、反復カウント数Countが予め定められた最大反復処理回数Rnを超えていないを判定する。ここで、超えている場合はステップS521へ進み、最終投票数VoteMaxを出力して、この処理を終了する。   In step S503, a variable Count indicating the number of iterations of the similarity calculation process is initialized to zero. In step S504, it is determined whether the iteration count number Count has not exceeded a predetermined maximum number of iterations Rn. Here, when it exceeds, it progresses to step S521, the final vote number VoteMax is output, and this process is complete | finished.

また、ステップS504で、反復カウント数Countが最大反復処理回数Rnを超えていない場合はステップS505へ進み、投票数を表す変数Voteを0に初期化する。次に、ステップS506で、当該最短距離対応点リストから対応点の組の座標を2組ランダムに抽出する。   If it is determined in step S504 that the iteration count number Count does not exceed the maximum number of iterations Rn, the process proceeds to step S505, and a variable Vote indicating the number of votes is initialized to zero. Next, in step S506, two sets of coordinates of corresponding point pairs are randomly extracted from the shortest distance corresponding point list.

ここで、これらの座標をQ1(x’,y’)、S1(x,y)及びQ2(x’,y’)、S2(x,y)と記載する。次に、ステップS507で、抽出したQ1(x’,y’)、S1(x,y)及びQ2(x’,y’)、S2(x,y)が式(1)に示す変換を満たしていると仮定し、(数式1)中の変数aからfを求める。ただし、図5に示すステップS507では、変数aからdで構成される行列をMで示し、変数eからfで構成される行列をTで示している。 Here, these coordinates are described as Q1 (x ′ 1 , y ′ 1 ), S1 (x 1 , y 1 ), Q2 (x ′ 2 , y ′ 2 ), and S2 (x 2 , y 2 ). Next, in step S507, the extracted Q1 (x ′ 1 , y ′ 1 ), S1 (x 1 , y 1 ), Q2 (x ′ 2 , y ′ 2 ), and S2 (x 2 , y 2 ) Assuming that the conversion shown in (1) is satisfied, f is obtained from the variable a in (Formula 1). However, in step S507 shown in FIG. 5, a matrix composed of variables a to d is denoted by M, and a matrix composed of variables e to f is denoted by T.

Figure 2017138742

ここで、第1の実施形態では、簡略化のため、相似変換だけを考える。このとき、上記(数式1)は以下の(数式2)のように書き換えられる。
Figure 2017138742

Here, in the first embodiment, only the similarity transformation is considered for simplification. At this time, the above (Formula 1) is rewritten as the following (Formula 2).

Figure 2017138742

このとき、変数a、b、e、fはx’、y’、x、y、x’、y’、x、yを使って式(3)から式(6)で表される。
Figure 2017138742

At this time, the variables a, b, e, and f are changed from Equation (3) to Equation (6) using x ′ 1 , y ′ 1 , x 1 , y 1 , x ′ 2 , y ′ 2 , x 2 , y 2. ).

Figure 2017138742
Figure 2017138742

Figure 2017138742
Figure 2017138742

Figure 2017138742
Figure 2017138742

Figure 2017138742

次に、投票数集計手段の説明をステップS508からS517までの処理を用いて行う。
Figure 2017138742

Next, the vote counting means will be described using the processing from step S508 to S517.

ステップS508で、上述のステップS505で当該最短距離対応点リストから選択した2組の点以外の点を選択するために、対応点選択変数kを3に初期化する。そして、ステップS509で、対応点選択変数kが当該最短距離対応点リストに登録されている対応点の組数mを超えていないかを判定する。ここで、超えている場合はステップS518へ処理を移すが、これについては後述する。ステップS509における判定で対応点選択変数kが当該最短距離対応点リストに登録されている対応点の組数mを超えていない場合はステップS510へ処理を移す。   In step S508, the corresponding point selection variable k is initialized to 3 in order to select a point other than the two sets of points selected from the shortest distance corresponding point list in step S505 described above. In step S509, it is determined whether or not 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 S518, which will be described later. If it is determined in step S509 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 S510.

このステップS510では、上述のステップS505で当該最短距離対応点リストからランダムに抽出した2組の点S1(x,y)及びS2(x,y)以外の点を当該最短距離対応点リストから抽出する。第1の実施形態では、抽出された点をSk(x,y)と記載する。 In this step S510, points other than the two sets of points S1 (x 1 , y 1 ) and S2 (x 2 , y 2 ) randomly extracted from the shortest distance corresponding point list in step S505 described above correspond to the shortest distance. Extract from the point list. In the first embodiment, the extracted point is described as Sk (x k , y k ).

次に、ステップS511で、Sk(x,y)が式(2)を使って移される座標Sk’(x’,y’)を求める。 Next, in step S511, coordinates Sk ′ (x ′ k , y ′ k ) to which Sk (x k , y k ) is transferred using the equation (2) are obtained .

その後、ステップS512では、座標Sk’(x’,y’)と座標Qk(x’,y’)との幾何学的距離をユークリッド距離で計算し、当該ユークリッド距離が閾値Tdと比較し閾値以下であるか否かを判定する。当該ユークリッド距離が閾値Td以下の場合はステップS513へ進み、投票数Voteをインクリメントし、ステップS514でS‘kの座標を正対応点として記憶する。そして、ステップS515に進む。 Thereafter, in step S512, the geometric distance between the coordinates Sk ′ (x ′ k , y ′ k ) and the coordinates Qk (x ′ k , y ′ k ) is calculated as the Euclidean distance, and the Euclidean distance is calculated from the threshold Td. A comparison is made to determine whether it is below the threshold. If the Euclidean distance is less than or equal to the threshold value Td, the process proceeds to step S513, the vote number Vote is incremented, and the coordinates of S′k are stored as positive corresponding points in step S514. Then, the process proceeds to step S515.

また、当該ユークリッド距離が閾値Tdより大きい場合は、ステップS516で対応ペアだったが幾何関係を満たさなかった特徴点数であるNG_Vote をインクリメントし、ステップS517で、S‘kの座標を非正対応点として記憶する。そして、ステップS515に進む。   If the Euclidean distance is greater than the threshold value Td, NG_Vote, which is the number of feature points that did not satisfy the geometrical relationship in step S516, is incremented. Remember as. Then, the process proceeds to step S515.

ステップS515では、対応点選択変数kをインクリメントし、ステップS509に戻り、最短距離対応点ペアリスト上の未処理のペアを抽出し、対応点選択変数kが当該最短距離対応点リストに登録されている対応点の組数mを超えるまで上述の処理を繰り返す。   In step S515, the corresponding point selection variable k is incremented, and the process returns to step S509 to extract an unprocessed pair on the shortest distance corresponding point pair list, and the corresponding point selection variable k is registered in the shortest distance corresponding point list. The above-described processing is repeated until the number m of corresponding points is exceeded.

次に、ステップS509で、対応点選択変数kが当該最短距離対応点リストに登録されている対応点の組数mを超えた場合の処理であるステップS518を説明する。ステップS518では、投票数Voteの値と最終投票数VoteMaxの値とを比較し、投票数Voteの値が最終投票数VoteMaxの値よりも大きい場合には、ステップS519へ処理を移す。   Next, step S518, which is a process when the corresponding point selection variable k exceeds the number m of corresponding points registered in the shortest distance corresponding point list in step S509, will be described. In step S518, 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 S519.

このステップS519では、最終投票数VoteMaxの値を投票数Voteの値で置き換えた後、ステップS520で反復カウント数Countをインクリメントし、上述のステップS504に処理を戻す。   In step S519, after the value of the final vote number VoteMax is replaced with the value of the vote number Vote, the iteration count number Count is incremented in step S520, and the process returns to step S504 described above.

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

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

以上、本実施形態によれば、比較元画像および比較先画像の局所特徴点の対応関係に基づいて共通領域を決定し、この共通領域における局所特徴点の対応関係に基づいて、比較元画像と比較先画像の類似の程度を求め、比較するようにしている。これにより、比較元画像と比較先画像との比較結果を精度よく求めることが可能になる。   As described above, according to the present embodiment, the common region is determined based on the correspondence relationship between the local feature points of the comparison source image and the comparison target image, and the comparison source image and the comparison source image are determined based on the correspondence relationship of the local feature points in the common region. The degree of similarity of the comparison target images is obtained and compared. As a result, it is possible to accurately obtain a comparison result between the comparison source image and the comparison destination image.

更に、本実施形態では、共通領域から、比較元画像と比較先画像との差異となる差異領域を求め、その差異領域における非対応関係を比較処理に反映するようにしており、この構成によって、比較処理の精度をより高めることが可能となる。   Further, in the present embodiment, a difference area that is a difference between the comparison source image and the comparison destination image is obtained from the common area, and the non-corresponding relationship in the difference area is reflected in the comparison process. The accuracy of the comparison process can be further increased.

[第2の実施形態]
次に、本発明の第2の実施形態について説明する。第2の実施形態は、共通領域の面積に対する差異領域群の面積の総和に応じたものをペナルティ分のスコアとし、それを総合スコアから減算することを特徴とするものである。以下、図面を参照しつつ、本発明の第2の実施形態について説明する。なお、第1の実施形態で既に説明をした構成については、その説明を省略し、同一の符号を付す。
[Second Embodiment]
Next, a second embodiment of the present invention will be described. The second embodiment is characterized in that a score corresponding to the sum of the areas of the different area groups with respect to the area of the common area is used as a penalty score and is subtracted from the total score. Hereinafter, a second embodiment of the present invention will be described with reference to the drawings. In addition, about the structure already demonstrated in 1st Embodiment, the description is abbreviate | omitted and the same code | symbol is attached | subjected.

図6は、本実施形態に係る比較処理のフローチャートである。図6において、ステップS601〜S609の処理は、図3におけるステップS301〜S309の処理と同様であるため、説明を省略する。   FIG. 6 is a flowchart of the comparison process according to the present embodiment. In FIG. 6, the processes in steps S601 to S609 are the same as the processes in steps S301 to S309 in FIG.

ステップS610において、画像特徴量比較部203は、ステップS609までの処理で特定された各差異領域について、その面積を算出する。ここでは、領域の面積としてその領域を構成する画素数を用い、全差異領域に含まれる画素数の総和を算出する。また、共通領域の面積についても、同様にしてその画素数を求める。そして、共通領域の画素数から差異領域の総画素数を減算したものを総合スコアとする。比較処理の結果に差異領域を強く反映させる場合には、共通領域の画素数から全差異領域の総画素数を減じ、差異領域を弱く反映させる際には、全差異領域の総画素数に1未満の計数を乗じたものを共通領域の画素数から減じればよい。   In step S610, the image feature amount comparison unit 203 calculates the area of each different area specified by the processing up to step S609. Here, the total number of pixels included in all the different regions is calculated using the number of pixels constituting the region as the area of the region. In addition, the number of pixels is similarly obtained for the area of the common region. Then, the total score is obtained by subtracting the total number of pixels in the different area from the number of pixels in the common area. When the difference area is strongly reflected in the result of the comparison process, the total number of pixels in all the difference areas is subtracted from the number of pixels in the common area, and when the difference area is weakly reflected, the total number of pixels in all the difference areas is 1 What is necessary is just to subtract the number multiplied by less than the number of pixels in the common area.

以上、本実施形態によれば、ペナルティ分のスコアとして、差異領域における非正対応点の数ではなく、差異領域における面積を用いるようにしている。そのため、第1の実施形態よりも、差異領域における非対応関係を比較処理により反映した結果を得ることができるようになる。   As described above, according to the present embodiment, the area in the difference area is used as the penalty score, not the number of non-positive corresponding points in the difference area. Therefore, a result reflecting the non-corresponding relationship in the different area by the comparison process can be obtained as compared with the first embodiment.

[第3の実施形態]
次に、本発明の第3の実施形態について説明する。第3の実施形態は、比較元画像と比較先画像の共通領域のサイズを合わせ、共通領域内の画素の各RGBカラーチャネルのヒストグラムの平滑化を行ったうえで、画素レベルでの両者の差分を算出するものである。以下、図面を参照しつつ、本発明の第3の実施形態について説明する。なお、第1、第2の実施形態で既に説明をした構成については、その説明を省略し、同一の符号を付す。
[Third Embodiment]
Next, a third embodiment of the present invention will be described. In the third embodiment, the size of the common area of the comparison source image and the comparison destination image is matched, the histogram of each RGB color channel of the pixels in the common area is smoothed, and then the difference between the two at the pixel level Is calculated. The third embodiment of the present invention will be described below with reference to the drawings. In addition, about the structure already demonstrated by 1st, 2nd embodiment, the description is abbreviate | omitted and the same code | symbol is attached | subjected.

図7は、本実施形態に係る比較処理のフローチャートである。図7において、ステップS701〜S707の処理は、図3におけるステップS301〜S307の処理と同様であるため、説明を省略する。   FIG. 7 is a flowchart of the comparison process according to the present embodiment. In FIG. 7, the processing of steps S701 to S707 is the same as the processing of steps S301 to S307 in FIG.

ステップS708において、画像特徴量比較部203は、ステップS707で求めた共通領域に基づいて、比較元画像の共通領域と比較先画像の共通領域が同じサイズになるようにサイズを正規化する。このように、本実施形態の画像特徴量比較部203は、共通領域のサイズを正規化する正規化手段としての機能を有する。   In step S708, the image feature amount comparison unit 203 normalizes the size based on the common area obtained in step S707 so that the common area of the comparison source image and the common area of the comparison destination image have the same size. As described above, the image feature amount comparison unit 203 according to the present embodiment has a function as a normalization unit that normalizes the size of the common area.

ステップS709において、画像特徴量比較部203は、比較元画像と比較先画像の共通領域に対して前処理、具体的には各RGBカラーチャネルでヒストグラムの平滑化を行う。カラーヒストグラムの平滑化にかんしては公知の技術を用いればよく、例えば下記の数式7に基づいたヒストグラムの平滑化を行うことができる。このように、本実施形態の画像特徴量比較部203は、サイズが正規化された共通領域に対して前処理(画素値平滑化)を行う前処理手段としての機能を有する。   In step S709, the image feature amount comparison unit 203 performs preprocessing on the common area of the comparison source image and the comparison target image, specifically, smoothes the histogram in each RGB color channel. For the smoothing of the color histogram, a known technique may be used. For example, the histogram can be smoothed based on Equation 7 below. As described above, the image feature amount comparison unit 203 according to the present embodiment has a function as a preprocessing unit that performs preprocessing (pixel value smoothing) on a common area whose size is normalized.

Figure 2017138742

上記の数式7は、階級値dが0から255とした場合の平滑化後の階級値d1を表す。ここで、SIZEは総画素数、P(i)は階級値iの画素頻度である。比較元画像の共通領域と比較先画像の共通領域の双方に対してd=0から255まで変化させた時のd1の値を求めておき、dとd1の対応をルックアップテーブルとして作成しておく。図7に示す比較処理を実行する際には、記憶部205に予め作成しておいたルックアップテーブルを参照して画素値を変換(平滑化)することで、処理の高速化を図ることが可能となる。
Figure 2017138742

The above formula 7 represents the class value d1 after smoothing when the class value d is 0 to 255. Here, SIZE is the total number of pixels, and P (i) is the pixel frequency of the class value i. The value of d1 when d = 0 to 255 is obtained for both the common area of the comparison source image and the common area of the comparison destination image, and the correspondence between d and d1 is created as a lookup table. deep. When the comparison process shown in FIG. 7 is executed, it is possible to increase the processing speed by converting (smoothing) pixel values with reference to a lookup table created in advance in the storage unit 205. It becomes possible.

ステップS710では、画像特徴量比較部203が、比較元画像と比較先画像の対応する位置の画素に対して各RGBカラーチャネルで差分の絶対値を計算し、これを累積し類似距離とする。この値が0に近いほど類似しているため、本実施形態では、この算出した類似距離に対応するものを総合スコアとして用いる。   In step S710, the image feature amount comparison unit 203 calculates the absolute value of the difference in each RGB color channel with respect to the pixel at the corresponding position in the comparison source image and the comparison destination image, and accumulates this to obtain the similarity distance. Since this value is more similar as it is closer to 0, in this embodiment, the value corresponding to the calculated similarity distance is used as the total score.

以上、本実施形態によれば、比較元画像と比較先画像とで共通領域を求め、この共通領域のサイズが同じになるように正規化処理し、正規化処理した上で画素値の平滑化処理をするようにしている。この構成によって、例えば、比較元画像がスキャンイメージ、比較先画像がオリジナルの電子データをラスタライズした画像のように、コンディションが異なる画像間の比較においても、比較結果を精度よく得ることができる。   As described above, according to the present embodiment, a common area is obtained between the comparison source image and the comparison destination image, the normalization process is performed so that the size of the common area is the same, and the normalization process is performed and then the pixel value is smoothed. I am trying to process it. With this configuration, for example, a comparison result can be obtained with high accuracy even in comparison between images having different conditions, such as an image in which the comparison source image is a scan image and the comparison destination image is rasterized original electronic data.

[その他の実施形態]
上述の各実施形態では、局所特徴として、輝度画像から得られるSIFTやSURFを特徴量の例に挙げたが、色差信号やRGBカラーチャネルでの局所特徴を用いることも可能である。また、上記各実施形態では、局所特徴点の対応関係をRANSAC処理により求める例を説明しているが、局所特徴点同士の対応関係を求められれば、他の従来技術を用いるようにしてもよい。
[Other Embodiments]
In each of the above-described embodiments, SIFT or SURF obtained from a luminance image is given as an example of the feature amount as a local feature. However, a local feature in a color difference signal or an RGB color channel can also be used. In each of the above embodiments, an example in which the correspondence between local feature points is obtained by RANSAC processing has been described. However, if the correspondence between local feature points can be obtained, another conventional technique may be used. .

また、第1、第2の実施形態においては、差異領域を特定せずに、単に、共通領域中で比較元画像と比較先画像のペアを持つ特徴点の数とペアが無い特徴点の数とを算出し、これらの値から総合スコアを算出する方法も考えられる。例えば、ペアを持つ特徴点の数からペアが無い特徴点の数を減じた値を用いて総合スコアを決定すればよい。   In the first and second embodiments, the number of feature points having a pair of the comparison source image and the comparison destination image in the common region and the number of feature points having no pair are simply determined without specifying the difference region. It is also conceivable to calculate the total score from these values. For example, the total score may be determined using a value obtained by subtracting the number of feature points having no pair from the number of feature points having a pair.

また、第3の実施形態の説明では、RGBの各カラーチャネルでヒストグラム平滑化を行う例を挙げたが、輝度情報のみでヒストグラムの平滑化を行い、画素差分の絶対値を累積するようにしてもよい。さらに、共通領域の輝度分布に対して予め定められた閾値で2値化処理を行い、2値画像での差分を求めるようにしてもよい。   In the description of the third embodiment, an example is given in which histogram smoothing is performed for each color channel of RGB, but histogram smoothing is performed only with luminance information, and absolute values of pixel differences are accumulated. Also good. Furthermore, binarization processing may be performed on the luminance distribution of the common area with a predetermined threshold value to obtain a difference in the binary image.

また、本発明は、上記実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(又はCPUやMPU等)がプログラムを読み出して実行する処理である。また、本発明は、複数の機器から構成されるシステムに適用しても、1つの機器からなる装置に適用してもよい。本発明は上記実施例に限定されるものではなく、本発明の趣旨に基づき種々の変形(各実施例の有機的な組合せを含む)が可能であり、それらを本発明の範囲から除外するものではない。即ち、上述した各実施例及びその変形例を組み合わせた構成も全て本発明に含まれるものである。   In addition, the present invention supplies software (program) for realizing the functions of the above-described embodiments to a system or apparatus via a network or various storage media, and the computer of the system or apparatus (or CPU, MPU, etc.) programs Is read and executed. Further, the present invention may be applied to a system composed of a plurality of devices or an apparatus composed of a single device. The present invention is not limited to the above embodiments, and various modifications (including organic combinations of the embodiments) are possible based on the spirit of the present invention, and these are excluded from the scope of the present invention. is not. That is, the present invention includes all the combinations of the above-described embodiments and modifications thereof.

201 画像入力部
202 画像特徴量群抽出部
203 画像特徴量比較部
204 比較結果出力部
205 記憶部
DESCRIPTION OF SYMBOLS 201 Image input part 202 Image feature-value group extraction part 203 Image feature-value comparison part 204 Comparison result output part 205 Storage part

Claims (11)

比較元画像と比較先画像とを入力する入力手段と、
前記入力された比較元画像と比較先画像とから局所特徴点を抽出する抽出手段と、
前記抽出された局所特徴点について局所特徴を算出する算出手段と、
前記算出された局所特徴に基づいて、前記比較元画像と前記比較先画像とで対応関係にある前記局所特徴点を決定する第1の決定手段と、
前記決定された対応関係にある局所特徴点に基づいて、前記比較元画像と前記比較先画像との共通領域を推定する第1の推定手段と、
を有することを特徴とする画像処理装置。
An input means for inputting a comparison source image and a comparison destination image;
Extraction means for extracting local feature points from the input comparison source image and comparison destination image;
Calculating means for calculating local features for the extracted local feature points;
First determination means for determining the local feature point in a correspondence relationship between the comparison source image and the comparison target image based on the calculated local feature;
First estimation means for estimating a common area between the comparison source image and the comparison destination image based on the determined local feature points in the correspondence relationship;
An image processing apparatus comprising:
前記推定された共通領域において前記比較元画像と前記比較先画像とで対応関係のない局所特徴点を決定する第2の決定手段と、
前記決定された対応関係のない局所特徴点に基づいて、前記比較元画像と前記比較先画像との差異領域を推定する第2の推定手段と、
を更に有することを特徴とする請求項1に記載の画像処理装置。
Second determining means for determining local feature points having no correspondence relationship between the comparison source image and the comparison destination image in the estimated common region;
Second estimation means for estimating a difference area between the comparison source image and the comparison destination image based on the determined local feature points having no corresponding relationship;
The image processing apparatus according to claim 1, further comprising:
前記第2の推定手段は、前記決定された対応関係のない局所特徴点を含む矩形を前記差異領域として推定することを特徴とする請求項2に記載の画像処理装置。   The image processing apparatus according to claim 2, wherein the second estimation unit estimates a rectangle including the determined local feature point having no corresponding relationship as the difference area. 前記決定された対応関係にある局所特徴点と前記決定された対応関係のない局所特徴点とに基づいて、前記入力された比較元画像と比較先画像との類似性に関わるスコアを算出する第2の算出手段を更に有することを特徴とする請求項2または3に記載の画像処理装置。   First, a score related to the similarity between the input comparison source image and the comparison destination image is calculated based on the determined local feature point in the correspondence relationship and the determined local feature point without the correspondence relationship. The image processing apparatus according to claim 2, further comprising: 2 calculating means. 前記第2の算出手段は、前記決定された対応関係にある局所特徴点の数と前記決定された対応関係のない局所特徴点の数とに基づいて、前記スコアを算出することを特徴とする請求項4に記載の画像処理装置。   The second calculating means calculates the score based on the number of local feature points in the determined correspondence relationship and the number of local feature points not in the determined correspondence relationship. The image processing apparatus according to claim 4. 前記第2の算出手段は、前記決定された対応関係にある局所特徴点の面積と前記決定された対応関係のない局所特徴点の面積とに基づいて、前記スコアを算出することを特徴とする請求項4に記載の画像処理装置。   The second calculating means calculates the score based on an area of the local feature points in the determined correspondence relationship and an area of the local feature points not in the determined correspondence relationship. The image processing apparatus according to claim 4. 前記推定された比較元画像と比較先画像との共通領域のサイズを正規化する正規化手段と、
前記正規化された比較元画像と比較先画像とに対して前処理を行う前処理手段とを更に有することを特徴とする請求項1に記載の画像処理装置。
Normalizing means for normalizing the size of the common area of the estimated comparison source image and the comparison destination image;
The image processing apparatus according to claim 1, further comprising preprocessing means for performing preprocessing on the normalized comparison source image and comparison destination image.
前記前処理手段は、前記前処理として画素値の平滑化を行うことを特徴とする請求項7に記載の画像処理装置。   The image processing apparatus according to claim 7, wherein the preprocessing unit performs pixel value smoothing as the preprocessing. 前記平滑化された画素値の絶対値に基づいて、前記入力された比較元画像と比較先画像との類似性に関わるスコアを算出する第2の算出出手段を更に有することを特徴とする請求項8に記載の画像処理装置。   The apparatus further comprises second calculating means for calculating a score related to the similarity between the input comparison source image and the comparison target image based on the absolute value of the smoothed pixel value. Item 9. The image processing apparatus according to Item 8. 比較元画像と比較先画像とを入力し、
前記入力された比較元画像と比較先画像とから局所特徴点を抽出し、
前記抽出された局所特徴点について局所特徴を算出し、
前記算出された局所特徴に基づいて、前記比較元画像と前記比較先画像とで対応関係にある前記局所特徴点を決定し、
前記決定された対応関係にある局所特徴点に基づいて、前記比較元画像と前記比較先画像との共通領域を推定する、
ことを特徴とする画像処理方法。
Enter the comparison source image and the comparison destination image,
Extracting local feature points from the input comparison source image and the comparison destination image,
Calculating a local feature for the extracted local feature points;
Based on the calculated local feature, determine the local feature point in a correspondence relationship between the comparison source image and the comparison destination image,
Estimating a common area between the comparison source image and the comparison destination image based on the local feature points in the determined correspondence relationship;
An image processing method.
コンピュータを請求項1から9のいずれか1項に記載の画像処理装置として機能させるためのプログラム。   A program for causing a computer to function as the image processing apparatus according to any one of claims 1 to 9.
JP2016018418A 2016-02-02 2016-02-02 Image processing apparatus, image processing method, and program Pending JP2017138742A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016018418A JP2017138742A (en) 2016-02-02 2016-02-02 Image processing apparatus, image processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016018418A JP2017138742A (en) 2016-02-02 2016-02-02 Image processing apparatus, image processing method, and program

Publications (1)

Publication Number Publication Date
JP2017138742A true JP2017138742A (en) 2017-08-10

Family

ID=59565044

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016018418A Pending JP2017138742A (en) 2016-02-02 2016-02-02 Image processing apparatus, image processing method, and program

Country Status (1)

Country Link
JP (1) JP2017138742A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019057261A (en) * 2017-09-19 2019-04-11 ヤフー株式会社 Retrieval device, retrieval method, and retrieval program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019057261A (en) * 2017-09-19 2019-04-11 ヤフー株式会社 Retrieval device, retrieval method, and retrieval program
JP7088665B2 (en) 2017-09-19 2022-06-21 ヤフー株式会社 Search device, search method and search program

Similar Documents

Publication Publication Date Title
JP3345350B2 (en) Document image recognition apparatus, method thereof, and recording medium
JP5261501B2 (en) Permanent visual scene and object recognition
TW201437925A (en) Object identification device, method, and storage medium
US9256802B2 (en) Object or shape information representation method
JP2010062911A (en) Image processing apparatus, image processing method, and program
WO2016170965A1 (en) Object detection method and image search system
CN110807110B (en) Image searching method and device combining local and global features and electronic equipment
US8306332B2 (en) Image search method and device
CN109871249B (en) Remote desktop operation method and device, readable storage medium and terminal equipment
JP2010176504A (en) Image processor, image processing method, and program
JP2017138743A (en) Image processing apparatus, image processing method, and program
JP2017138742A (en) Image processing apparatus, image processing method, and program
KR101592087B1 (en) Method for generating saliency map based background location and medium for recording the same
JP2015060421A (en) Similar image search method, and similar image search device
JP2016085694A (en) Image processing device, control method of the same, and program
JP6668228B2 (en) Subject identification device, method, and program
JP7369247B2 (en) Information processing device, information processing method and program
JP7297720B2 (en) Camera calibration method, apparatus and program
JP7147828B2 (en) Image processing system, image processing method and program
Fujita Extract an essential skeleton of a character as a graph from a character image
JP7117177B2 (en) Area identification device and program
JP2009015406A (en) Image feature extraction apparatus, image feature extraction method, image feature extraction program, and recording medium which stores its program, image similarity calculation apparatus, image similarity calculation method, image similarity calculation program, recording medium which stores its program
JP2006023976A (en) Parameter setting method, image pattern extraction method, parameter setting device, image pattern extraction device, and program for these methods
JP4869364B2 (en) Image processing apparatus and image processing method
CN117726838A (en) Two-dimensional image target matching method, electronic device and storage medium