JP5304553B2 - Image processing apparatus and image processing program - Google Patents
Image processing apparatus and image processing program Download PDFInfo
- Publication number
- JP5304553B2 JP5304553B2 JP2009208573A JP2009208573A JP5304553B2 JP 5304553 B2 JP5304553 B2 JP 5304553B2 JP 2009208573 A JP2009208573 A JP 2009208573A JP 2009208573 A JP2009208573 A JP 2009208573A JP 5304553 B2 JP5304553 B2 JP 5304553B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- similarity
- region
- linear
- peak positions
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Image Analysis (AREA)
Description
本発明は、画像処理装置及び画像処理プログラムに関する。 The present invention relates to an image processing apparatus and an image processing program.
従来から2つの文書の相似性を判断するために、例えば、従来では、文書をラスタ画像化し、各画像の特徴量を求め、各特徴量を参照に相似変換パラメータを推定し、一方の画像をこの推定した相似変換パラメータにて拡縮してから他方の画像と照合する技術が提案されている。 Conventionally, in order to determine the similarity of two documents, for example, conventionally, a document is converted into a raster image, a feature amount of each image is obtained, a similarity conversion parameter is estimated with reference to each feature amount, and one image is obtained. There has been proposed a technique for collating with the other image after scaling with the estimated similarity transformation parameter.
本発明は、2つの画像の相似性の判断を行う過程において求める相似変換パラメータの推定精度の向上を図ることを目的とする。 An object of the present invention is to improve the estimation accuracy of similarity transformation parameters obtained in the process of judging the similarity of two images.
本発明に係る画像処理装置は、比較対象とする各画像の画素値を水平又は垂直の少なくとも一方方向に累算し、その累算値のピーク位置を特定する情報を含む特徴量情報を取得する手段と、取得した各画像に対応した特徴量情報から、一方の画像の前記ピーク位置を基準点から拡縮又は平行移動の少なくとも一方をさせることにより他方の画像の前記ピーク位置に重ね合わせるための相似変換パラメータであって拡縮率及び移動量で表される相似変換パラメータを推定する相似変換パラメータ推定手段と、前記一方の画像を前記相似変換パラメータにより補正した後、前記各画像の相似関係を示す指標を算出する手段と、を有し、前記相似変換パラメータ推定手段は、一方の画像の前記ピーク位置それぞれを、他方の画像の前記ピーク位置のそれぞれと重ね合わせるための拡縮率及び移動量で表される拡縮率−移動量平面座標上の一次関数を生成し、相似変換パラメータが存在するであろう拡縮率−移動量平面座標上の予め決められた範囲を複数の領域に分割し、各領域を通過する一次関数の数を求めると共に当該各一次関数を生成した各画像の前記ピーク位置の組を領域毎に特定し、領域毎に特定した前記ピーク位置の組の中に同じピーク位置に基づく一次関数が重複して通過する領域が存在する場合、重複して通過する領域が存在しなくなるまで、当該領域を複数の領域に再分割し、その再分割した各領域を通過する一次関数の数を求めると共に当該各一次関数を生成した各画像の前記ピーク位置の組を特定する処理を繰り返し行い、一次関数が通過する数が最大となる領域を通過する一次関数に基づいて相似変換パラメータを求める、ことを特徴とする。 The image processing apparatus according to the present invention accumulates pixel values of respective images to be compared in at least one of horizontal and vertical directions, and acquires feature amount information including information for specifying a peak position of the accumulated value. Similarity for superimposing the peak position of one image to the peak position of the other image by causing the peak position of one image to be scaled or translated from the reference point from the feature amount information corresponding to each acquired image A similarity conversion parameter estimating means for estimating a similarity conversion parameter represented by a scaling factor and a movement amount, and an index indicating a similarity relationship between the images after correcting the one image with the similarity conversion parameter; And the similarity transformation parameter estimation means calculates each of the peak positions of one image and the peak position of the other image. Generate a linear function on the scale-moving plane coordinate expressed by the scaling ratio and the moving amount for superimposing each, and the scaling factor-moving-plane coordinate on which similar transformation parameters will exist The predetermined range is divided into a plurality of regions, the number of linear functions passing through each region is obtained, and the set of peak positions of each image that has generated each linear function is specified for each region. If there are areas where the linear functions based on the same peak position overlap in the set of specified peak positions, the area is subdivided into a plurality of areas until there is no overlapping area. Then, the number of linear functions that pass through each of the subdivided areas is calculated and the process of specifying the set of peak positions of each image that has generated each linear function is repeated, and the number of linear functions that pass through is maximized. The area Request similarity transformation parameter based on a linear function over to, characterized in that.
また、前記相似変換パラメータ推定手段は、一次関数が通過する数が最大となる領域を検出してから、その検出した領域のみを対象として、前記特定したピーク位置の組の中に同じピーク位置に基づく一次関数が重複して通過する領域の検出を行うことを特徴とする。 Further, the similarity transformation parameter estimation means detects a region where the number of passes through the linear function is maximum, and then targets only the detected region to the same peak position in the specified set of peak positions. It is characterized in that a region where a linear function based thereon passes through is detected.
また、前記相似変換パラメータ推定手段は、領域を複数の領域に再分割した場合、分割対象となった領域において一次関数の交点を求め、再分割により生成された領域のうち、求めた交点が存在する領域及びその領域に隣接した領域のみを、通過する一次関数の数を求めると共に当該各一次関数を生成した各画像の前記ピーク位置の組を特定する対象とすることを特徴とする。 Further, when the similarity transformation parameter estimation means subdivides the region into a plurality of regions, the intersection of the linear function is obtained in the region to be divided, and the obtained intersection exists among the regions generated by the subdivision. Only the region to be performed and the region adjacent to the region are targeted for obtaining the number of linear functions passing therethrough and specifying the set of peak positions of each image in which each linear function is generated.
本発明に係る画像処理プログラムは、コンピュータを、比較対象とする各画像の画素値を水平又は垂直の少なくとも一方方向に累算し、その累算値のピーク位置を特定する情報を含む特徴量情報を取得する手段、取得した各画像に対応した特徴量情報から、一方の画像の前記ピーク位置を基準点から拡縮又は平行移動の少なくとも一方をさせることにより他方の画像の前記ピーク位置に重ね合わせるための相似変換パラメータであって拡縮率及び移動量で表される相似変換パラメータを推定する相似変換パラメータ推定手段、前記一方の画像を前記相似変換パラメータにより補正した後、前記各画像の相似関係を示す指標を算出する手段、として機能させ、前記相似変換パラメータ推定手段は、一方の画像の前記ピーク位置それぞれを、他方の画像の前記ピーク位置のそれぞれと重ね合わせるための拡縮率及び移動量で表される拡縮率−移動量平面座標上の一次関数を生成し、相似変換パラメータが存在するであろう拡縮率−移動量平面座標上の予め決められた範囲を複数の領域に分割し、各領域を通過する一次関数の数を求めると共に当該各一次関数を生成した各画像の前記ピーク位置の組を領域毎に特定し、領域毎に特定した前記ピーク位置の組の中に同じピーク位置に基づく一次関数が重複して通過する領域が存在する場合、重複して通過する領域が存在しなくなるまで、当該領域を複数の領域に再分割し、その再分割した各領域を通過する一次関数の数を求めると共に当該各一次関数を生成した各画像の前記ピーク位置の組を特定する処理を繰り返し行い、一次関数が通過する数が最大となる領域を通過する一次関数に基づいて相似変換パラメータを求める、ことを特徴とする。 The image processing program according to the present invention includes feature amount information including information for accumulating pixel values of images to be compared in at least one of horizontal and vertical directions and specifying a peak position of the accumulated value. And a feature amount information corresponding to each acquired image to superimpose the peak position of one image on the peak position of the other image by performing at least one of enlargement / reduction or translation from the reference point A similarity transformation parameter estimating means for estimating a similarity transformation parameter represented by an enlargement / reduction ratio and a movement amount, and correcting the one image with the similarity transformation parameter, and then showing a similarity relationship between the images. Functioning as a means for calculating an index, wherein the similarity transformation parameter estimation means determines each peak position of one image as the other Generate a linear function on the plane coordinate of the scaling factor-moving amount expressed by the scaling factor and the moving amount to be superimposed on each of the peak positions of the image, and the scaling factor-moving amount that the similarity conversion parameter will exist A predetermined range on the plane coordinates is divided into a plurality of regions, the number of linear functions passing through each region is obtained, and the set of peak positions of each image that has generated each linear function is specified for each region. If there is a region where the linear function based on the same peak position passes through in the set of peak positions specified for each region, a plurality of such regions are excluded until there is no region where the overlapping passes. Subdividing into regions, calculating the number of linear functions that pass through each of the subdivided regions, and repeating the process of specifying the set of peak positions of each image that generated each linear function, and passing the linear function That number seek similarity transformation parameter based on a linear function passing through a region to be a maximum, it is characterized.
請求項1,4記載の発明によれば、本構成を有さない場合に比較して、2つの画像の相似性の判断を行う過程において求める相似変換パラメータの推定精度の向上を図ることができる。 According to the first and fourth aspects of the invention, it is possible to improve the estimation accuracy of the similarity transformation parameter obtained in the process of judging the similarity between two images, compared to the case where the present configuration is not provided. .
請求項2,3記載の発明によれば、2つの画像の相似性の判断を、対象とする領域を特定しない場合と比較して、より短時間に、あるいは、より少ないメモリ使用量で実現することができる。 According to the second and third aspects of the present invention, the similarity determination between two images is realized in a shorter time or with a smaller memory usage compared to the case where the target area is not specified. be able to.
以下、図面に基づいて、本発明の好適な実施の形態について説明する。 Hereinafter, preferred embodiments of the present invention will be described with reference to the drawings.
図1は、本発明に係る画像処理装置20の一実施の形態を示したブロック構成図であり、図2は、この画像処理装置20を形成するコンピュータのハードウェア構成図である。本実施の形態において画像処理装置20を形成するコンピュータは、従前から存在する汎用的なハードウェア構成で実現できる。すなわち、コンピュータは、図2に示したようにCPU1、ROM2、RAM3、ハードディスクドライブ(HDD)4を接続したHDDコントローラ5、入力手段として設けられたマウス6とキーボード7、及び表示装置として設けられたディスプレイ8をそれぞれ接続する入出力コントローラ9、通信手段として設けられたネットワークコントローラ10を内部バス11に接続して構成される。
FIG. 1 is a block configuration diagram showing an embodiment of an
図1に戻り、画像処理装置20は、投影波形生成部21,22、特徴量生成部23,24、変動補正パラメータ推定部25、投影波形補正部26及び照合スコア算出部27を有している。投影波形生成部21は、入力文書画像から投影波形を生成する。投影波形生成部22は、参照文書画像から投影波形を生成する。投影波形生成部21と投影波形生成部22は、処理対象とする画像が異なるだけで、実施する処理自体は同じでよい。特徴量生成部23は、投影波形生成部21により生成された投影波形から入力文書画像の特徴量を生成する。特徴量生成部24は、投影波形生成部22により生成された投影波形から参照文書画像の特徴量を生成する。特徴量生成部23と特徴量生成部24は、処理対象とする画像の投影波形が異なるだけで、実施する処理自体は同じでよい。変動補正パラメータ推定部25は、各特徴量生成部23,24により得られた各文書画像の特徴量を取得すると、その各文書画像の特徴量から変動補正パラメータを相似変換パラメータとして推定する。投影波形補正部26は、変動補正パラメータ推定部25により得られた変動補正パラメータで入力文書画像の投影波形を補正する。照合スコア算出部27は、参照文書画像と、投影波形補正部26により補正された入力文書画像の投影波形とを照合することによって参照文書と入力文書との相似関係の判定指標となる照合スコアを算出する。
Returning to FIG. 1, the
画像処理装置20における各構成要素21〜27は、画像処理装置20を形成するコンピュータと、コンピュータに搭載されたCPU1で動作するプログラムとの協調動作により実現される。
Each
また、本実施の形態で用いるプログラムは、通信手段により提供することはもちろん、CD−ROMやDVD−ROM等のコンピュータ読み取り可能な記録媒体に格納して提供することも可能である。通信手段や記録媒体から提供されたプログラムはコンピュータにインストールされ、コンピュータのCPUがインストールプログラムを順次実行することで各種処理が実現される。 Further, the program used in this embodiment can be provided not only by communication means but also by storing it in a computer-readable recording medium such as a CD-ROM or DVD-ROM. The program provided from the communication means or the recording medium is installed in the computer, and various processes are realized by the CPU of the computer sequentially executing the installation program.
本実施の形態における特徴的なことは、変動補正パラメータ推定部25における変動補正パラメータの推定処理において、重複投票を検出するようにし、そして、重複投票が検出された場合には、重複投票が検出されたセルを再分割して重複投票をなくし、重複投票がなくなった段階で最大投票値となるセルに基づき変動補正パラメータの推定を行うようにしたことである。それ以外の処理は、特許文献1と同様の処理内容としてもよい。
A characteristic feature of the present embodiment is that a duplicate vote is detected in the fluctuation correction parameter estimation process in the fluctuation correction
次に、本実施の形態における画像照合処理について図3に示したフローチャートを用いて説明する。 Next, image collation processing in the present embodiment will be described with reference to the flowchart shown in FIG.
比較対象となる入力文書及び参照文書の各画像が送られてくると、投影波形生成部21,22は、それぞれの文書画像を受け取り(ステップ100)、各画像からX,Y方向への投影波形を生成する(ステップ200)。そして、特徴量生成部23,24は、それぞれ生成された投影波形に基づき各画像の特徴量を生成する(ステップ300)。ここまでの処理について、図4を用いて詳述する。
When the images of the input document and reference document to be compared are sent, the projection
なお、参照文書の画像というのは、入力文書の画像との照合の際に参照される文書のラスタライズされた画像データである。入力文書の画像というのは、参照文書の画像と照合される文書のラスタライズされた画像データである。つまり、本実施の形態における画像処理装置20は、入力文書が参照文書と相似関係にあるか否かについて判定を行うための指標として照合スコアを提供する。これらの画像データは、画像処理装置20に、ユーザにより指定された各文書の画像データを画像データベースから読み出されて入力されたり、スキャナ等の画像入力手段により読み取られ、ラスタ画像データに変換された後に入力されたりする。ここで説明する投影波形及び特徴量の生成処理は、入力文書及び参照文書の各画像に対して同じ処理を施すので、ここでは、入力文書の画像を代表して説明する。
Note that the image of the reference document is rasterized image data of the document that is referred to when collating with the image of the input document. The image of the input document is rasterized image data of the document that is collated with the image of the reference document. That is, the
入力文書の画像が入力されると、投影波形生成部21は、このラスタ画像データに対し、水平方向又は垂直方向の少なくとも一方に対する投影波形を形成する。例えば、入力される文書が縦書きであるか横書きであるかが予めわかっており、当該方向の投影波形のみで十分個々の文書の特徴を表すことができることがわかっている場合は、一方向のみへの投影を形成するだけでもよい。ただ、文書画像データの特徴が不明瞭な場合は両方向への投影波形を形成するのが好ましい。本実施の形態では、X,Yの両方向に対して投影波形を生成する。
When an image of the input document is input, the projection
ここで、投影とは、ラスタ形式の画像データに対し、X方向又はY方向に沿ったある経路において当該経路上に位置する画素の画素値を累算する処理をいう。X方向又はY方向に沿って経路が複数ある場合に、その累算した結果の数列が投影波形をなす。投影波形生成部21は、画素値の累算結果を経路毎に求める。この場合、現実的には投影波形の形成処理前に公知の傾き補正技術を利用して読み取り時の軽微な傾きを補正しておくことが好ましい。
Here, the projection refers to a process of accumulating pixel values of pixels located on a certain path along the X direction or the Y direction with respect to raster-format image data. When there are a plurality of paths along the X direction or the Y direction, a sequence of the accumulated results forms a projection waveform. The projection
X方向の経路の場合、投影波形生成部21は、文書画像12に対し、X方向の経路上の画素の画素値を累算することにより投影波形を生成する。そして、本実施の形態では、その経路の中から所定の条件を満たす特徴部分を表す位置を選別する。特徴部分を表す位置を選別する所定の条件の一例としては、極値(局所的ピーク)、変曲点などの微分波形特徴量などがある。本実施の形態では、累算値の局所ピーク値となる位置を選別する。そして、特徴量生成部23は、選別した局所ピークとなる位置の座標(xn)と当該位置の投影波高値(pxn)とを組にすることによって当該位置の特徴量(xn,pxn)として生成し、これらの特徴量のリストをX方向の入力文書画像特徴量として生成する。Y方向においても同様にして、局所ピークとなる位置の座標(ym)と当該位置の投影波高値(pym)とを組にすることによって当該位置の特徴量(ym,pym)として生成し、これらの特徴量のリストをY方向の入力文書画像特徴量として生成する。なお、本実施の形態では、X,Y方向それぞれにおいて局所ピーク座標を抽出しているので、nとmの各値は必ずしも一致するとは限らない。
In the case of a path in the X direction, the projection
投影波形生成部22及び特徴量生成部24も同様に処理して投影波形の生成及びX,Yの各方向の参照文書画像特徴量を生成する。なお、入力文書画像及び参照文書画像のX方向の各局所ピーク座標の数は、必ずしも一致するとは限らない。Y方向においても同様である。
The projection
なお、参照文書に関しては、特徴量の生成処理までを事前に実施し、その処理結果をHDD4に保存しておき、この処理結果値を以降の処理において読み出し利用するようにしてもよい。 For the reference document, the process up to the feature value generation process may be performed in advance, the process result may be stored in the HDD 4, and the process result value may be read and used in subsequent processes.
続いて、変動補正パラメータ推定部25は、上記処理にて生成した参照文書画像及び入力文書画像の各文書画像特徴量から両文書のX,Y方向への投影波形が最も重なるような変動補正パラメータを推定する(ステップ400)。変動補正パラメータが複数組推定される場合は、変動補正パラメータのリストを生成する。変動補正パラメータ推定部25は、参照文書と入力文書とを照合するために入力文書画像の局所ピーク座標を参照文書画像の局所ピーク座標に重ね合わせるように処理するわけであるが、この際、入力文書画像を拡大又は縮小し、あるいは平行に移動させることになる。つまり、変動補正パラメータというのは、X,Yの各方向において、参照文書画像の局所ピーク座標に入力文書画像の局所ピーク座標を重ね合わせる際の入力文書画像の拡縮率と移動量により表される。この変動補正パラメータ推定部25における変動補正パラメータ推定処理について、図5に示したフローチャートを用いて説明する。
Subsequently, the fluctuation correction
変動補正パラメータ推定部25は、参照文書と入力文書の各画像の特徴量について、次の処理をX,Y方向毎にそれぞれ行う。まず、X方向について、図6に例示したように参照文書画像の特徴量にm個の局所ピーク座標a1〜amが、入力文書画像の特徴量にn個の局所ピーク座標b1〜bnが、それぞれ含まれているとすると、変動補正パラメータ推定部25は、参照文書画像特徴量から局所ピーク座標(ai(1≦i≦m))を、入力文書画像特徴量から局所ピーク座標(bj(1≦j≦n))を、それぞれ一つずつ選び、その入力文書画像特徴量における局所ピーク座標bjを参照文書画像特徴量における局所ピーク座標aiに重ね合わせるときの拡縮率と移動量の関係を示す直線式を生成する。この直線式は、s−k平面座標上において、ai=k×bj+sという一次関数の式にて表せる。式中のkは原点を基準点としてbjをaiに重ね合わせるために投影波形を拡縮させたときの拡縮率、sはbjを拡縮と共に平行移動させたときの移動量である。各局所ピーク座標の全ての組み合わせについて同様の直線式を生成することにより直線式のリストを生成する(ステップ401)。つまり、直線式のリストには、m×n本の直線式が含まれる。この直線式をs−k平面座標に描画した場合の例を図7に示す。直線リストを生成する際、変動補正パラメータ推定部25は、直線式を生成する際に対応付けた1組の局所ピーク座標(aiとbj)を、この直線式に関連付けして記憶しておく。
The fluctuation correction
以上の処理をY方向についても行う。ここまでの処理により、図7に例示したs−k平面座標がX,Y方向それぞれに生成される。 The above processing is also performed in the Y direction. Through the processing so far, the s-k plane coordinates illustrated in FIG. 7 are generated in the X and Y directions, respectively.
ところで、拡縮率kに関し、k=1は拡縮無し、0<k<1は縮小、k>1は拡大を意味するが、例えば変動補正パラメータである拡縮率kが存在するであろう範囲を、最大値kmax=10.0、最小値kmin=0.1などと予め決めておく。同様に、移動量sに関し、例えば移動量sの移動範囲を最大値smax=50ピクセル、移動範囲の最小値smin=−50ピクセルなどと予め決めておく。そして、このように予め設定された補正範囲を例えば16分割などの所定数に分割する(ステップ402)。この分割により得られた小領域をセルと称することにする。このs−k平面座標の補正範囲内を複数に分割したときのs−k平面座標の例を図8に示す。なお、補正範囲を分割する所定の数については、追って説明する。 By the way, regarding the expansion / contraction rate k, k = 1 means no expansion / contraction, 0 <k <1 means reduction, and k> 1 means enlargement. For example, a range in which the expansion / contraction rate k, which is a fluctuation correction parameter, will exist, The maximum value kmax = 10.0 and the minimum value kmin = 0.1 are determined in advance. Similarly, for the movement amount s, for example, the movement range of the movement amount s is determined in advance as a maximum value smax = 50 pixels, a minimum value smin = -50 pixels of the movement range, and the like. Then, the preset correction range is divided into a predetermined number such as 16 divisions (step 402). The small area obtained by this division is called a cell. An example of the sk plane coordinates when the correction range of the sk plane coordinates is divided into a plurality of parts is shown in FIG. The predetermined number for dividing the correction range will be described later.
変動補正パラメータ推定部25は、続いてセル毎に直線を投票し(ステップ403)、そして投票値が最大となるセルを検出する(ステップ404)。投票というのは、当該セルを通過する直線の数を積算することである。なお、投票値が最大となるセルが複数検出された場合は、それらのセルのリストを生成する。
Subsequently, the fluctuation correction
そして、変動補正パラメータ推定部25は、投票が最大となるセルの中から重複投票となるセルを検出する(ステップ405)。ここで、重複投票について説明する。
Then, the fluctuation correction
例えば、図9に例示したように、入力文書画像特徴量に含まれる局所ピーク座標b2,b3はそれぞれ、わずかに拡縮をするか、わずかに移動させることによって参照文書画像特徴量に含まれる局所ピーク座標a2と重ねられるとする。図10は、直線式が通過するあるセルを示した図であるが、この例のように局所ピーク座標a2,b2に基づき生成された直線式及び局所ピーク座標a2,b3に基づき生成された直線式のように、同じ局所ピーク座標a2により生成された直線式が同じセルの中に重複して通過する場合があり得る。数ピクセルの間隔で引かれた罫線などが文書画像に含まれていた場合は、このようなケースが発生しうるかもしれない。しかしながら、局所ピーク座標a2は、局所ピーク座標b2及びb3と同時に重ねられることはない。つまり、1つの局所ピーク座標が同時に複数の局所ピーク座標と対応付けられることはあり得ない。本実施の形態では、このように、1つの局所ピーク座標に基づき生成された直線式が1つのセルに投票されていることを重複投票と称することにするが、このような重複投票を含むセルにおける投票数は正しい値を示していない。ステップ406では、図10に例示した重複投票がされているセルが検出される。 For example, as illustrated in FIG. 9, the local peak coordinates b2 and b3 included in the input document image feature are slightly enlarged or reduced, or moved slightly, so that the local peak included in the reference document image feature is obtained. It is assumed that it is overlapped with the coordinates a2. FIG. 10 is a diagram showing a certain cell through which a linear expression passes, but a linear expression generated based on the local peak coordinates a2 and b2 and a straight line generated based on the local peak coordinates a2 and b3 as in this example. Like a formula, the straight line formula generated by the same local peak coordinate a2 may pass through the same cell redundantly. Such a case may occur when ruled lines drawn at intervals of several pixels are included in the document image. However, the local peak coordinates a2 are not overlapped simultaneously with the local peak coordinates b2 and b3. That is, one local peak coordinate cannot be associated with a plurality of local peak coordinates at the same time. In the present embodiment, the fact that a linear expression generated based on one local peak coordinate is voted for one cell is referred to as a duplicate vote, but a cell including such a duplicate vote. The number of votes in is not correct. In step 406, a cell in which duplicate voting illustrated in FIG. 10 is performed is detected.
変動補正パラメータ推定部25は、直線式のリストを生成する際に当該セルの中を通過する各直線式に関連付けられた局所ピーク座標を参照することによって重複投票を検出する。そして、重複投票が検出されなかった場合(ステップ406でN)、投票値が最大となるセルを特定する(ステップ407)。なお、投票値が最大となるセルが複数特定され場合もあり得る。そして、変動補正パラメータ推定部25は、変動補正パラメータを推定することになるが(ステップ408)、この処理については追って詳述する。
The fluctuation correction
一方、重複投票が検出された場合(ステップ406でY)、変動補正パラメータ推定部25は、重複投票が検出されたセルのみを所定数に再分割する(ステップ409)。重複投票が検出されたセルのみを再分割の対象とするので、他のセルは、再分割のためにメモリ(RAM3)にロードする必要はない。図10に例示したセルが再分割されたときの例を図11に示す。複数のセルで重複投票が検出された場合、その検出された複数のセル全てにおいて再分割する。再分割する所定の数については、追って説明する。そして、再分割したセルにおいて改めて投票を行う(ステップ410)。再分割したセル毎に投票を行った後は、最大投票値となるセルを検出する処理(ステップ404)に戻る。重複投票が検出されなくなるまでセルの再分割、投票する処理(ステップ409,410)は、再帰的に繰り返される。
On the other hand, when a duplicate vote is detected (Y in step 406), the fluctuation correction
以上のようにして、重複投票されたセルがない状態で最大投票値となるセルが特定されと、変動補正パラメータ推定部25は、セルに含まれる直線式の交点、すなわち変動補正パラメータである拡縮率kと移動量sを推定する(ステップ408)。
As described above, when a cell having the maximum vote value is identified in a state where there is no duplicate voted cell, the fluctuation correction
なお、入力文書と参照文書とが相似関係にある場合、最大投票値となるセルが複数特定された場合でも、基本的には、拡縮率kと移動量sの組は1つだけ得られる。つまり、ある最大投票値となるセルの中に交点は存在しなくても、そのセルの中を通過する直線式から求められる交点は、他の最大投票値となるセルの中にある交点と一致するはずである。但し、スキャナの読取精度等の要因で、理論的には複数の交点が得られてしまう場合もあり得る。この場合、複数の変動補正パラメータが推定されることになる。ここで、変動補正パラメータを推定する処理(ステップ408)について詳述する。 When the input document and the reference document are in a similar relationship, only one set of the scaling ratio k and the movement amount s is basically obtained even when a plurality of cells having the maximum vote value are specified. In other words, even if there is no intersection point in the cell that has the maximum vote value, the intersection point that is obtained from the linear expression that passes through the cell matches the intersection point in the cell that has the other maximum vote value. Should do. However, theoretically, a plurality of intersections may be obtained due to factors such as the reading accuracy of the scanner. In this case, a plurality of variation correction parameters are estimated. Here, the process of estimating the fluctuation correction parameter (step 408) will be described in detail.
参照文書と入力文書が相似関係にあるとしたならば、理論的には、正しい拡縮率kと移動量sとの組が1つだけ存在するため、あるセル内で複数の直線がs−k平面座標のその拡縮率kと移動量sとで表される交点(s*,k*)で交わるはずである。ところが、実際には、スキャナの読取精度、各文書の用紙の伸縮、ノイズの影響などが原因で多少の誤差が生じ、これにより、本来、直線式が交点(s*,k*)で交わるところを、図12に例示するように若干のずれが生じてくる場合があり得る。そこで、本実施の形態では、以下の説明するように拡縮率k及び移動量sの各パラメータ値を補正して複数の直線から1つの交点(s*,k*)を求めるようにした。 If it is assumed that the reference document and the input document are in a similar relationship, theoretically, there is only one set of the correct scaling factor k and the movement amount s. It should intersect at an intersection (s *, k *) represented by the expansion / contraction ratio k of the plane coordinates and the movement amount s. However, in practice, some errors occur due to the reading accuracy of the scanner, the expansion and contraction of the paper of each document, the influence of noise, and the like, and this is where the linear equations essentially intersect at the intersection (s *, k *). As shown in FIG. 12, there may be a slight deviation. Therefore, in the present embodiment, as described below, each parameter value of the scaling factor k and the movement amount s is corrected to obtain one intersection (s *, k *) from a plurality of straight lines.
本実施の形態においては、直線群から最小距離にある点の座標を交点の座標とみなすようにした。すなわち、セル内の点(s,k)から直線ai=k×bj+sまでの距離をdi,jとすると、
以上のようにして、変動補正パラメータ推定部25は、セル内における点(s*,k*)、すなわち、拡縮率k及び移動量sを変動補正パラメータとして求める。
As described above, the fluctuation correction
なお、上記説明では、ステップ410において再分割した全てのセルに対して改めて投票を行うとした。ただ、再分割した場合、図13のようにセルAに交点があると考えられる場合、セルCに対しセルAと同様に投票を行っても、セルCの直線式から得られる交点は、セルAに存在することになるのでその投票処理は無駄になる。そこで、セルを再分割した場合、再分割したセルの中で交点が存在するセルAをステップ410における投票の前に求めておき、セルAに隣接しないセルCに関しては、投票等以降の処理の対象外としてもよい。つまり、セルCに関するデータは、メモリにロードする必要はない。なお、セルAに隣接したセルBに対しても処理対象外としてもよいが、セルBに存在するはずの交点が、実際には誤差のためにセルAに存在すると誤って推定されるような場合も考慮して、隣接するセルBは処理対象外としないようにしてもよい。 In the above description, it is assumed that voting is performed again for all the cells re-divided in step 410. However, if subdivision is performed and cell A is considered to have an intersection as shown in FIG. 13, even if voting is performed on cell C in the same manner as cell A, the intersection obtained from the linear expression of cell C is Since it exists in A, the voting process is useless. Therefore, when the cell is subdivided, the cell A in which the intersection exists among the subdivided cells is obtained before the voting in step 410, and the cell C that is not adjacent to the cell A is processed after the voting or the like. It may be excluded. That is, the data relating to the cell C need not be loaded into the memory. Note that the cell B adjacent to the cell A may be excluded from the processing target, but the intersection that should exist in the cell B is actually erroneously estimated to exist in the cell A due to an error. In consideration of the case, the adjacent cell B may not be excluded from processing.
ここで、補正範囲及びセルの分割について説明する。 Here, the correction range and cell division will be described.
前述したように、本実施の形態においては、ステップ402において補正範囲を複数のセルに分割した。ここで、補正範囲を大まかに分割すると(セルの数を少なくすると)、重複投票が発生するセルの数が増えてしまい、再分割及び再分割後の各領域への投票を行う処理にかかる負荷が増大する。一方、補正範囲を細かに分割すると(セルの数を多くすると)、直線式の投票や重複投票の検出に要する処理負荷が大きくなる。このように、補正範囲を分割する数に関しては、トレードオフの関係にある。ただ、本実施の形態では、重複投票が発生した場合、その発生したセルのみを再分割及び再度の投票の対象とすることによって、これらの問題を解消しうる。つまり、補正範囲の分割する所定数に関しては、自由度が高く、適当に設定しておいても処理速度やメモリ使用量の点で従来と比較して改善が見込める。セルの再分割についても同様である。
As described above, in the present embodiment, the correction range is divided into a plurality of cells in
図3に戻り、以上のようにして変動補正パラメータが得られると、投影波形補正部26は、変動補正パラメータ推定部25により得られた変動補正パラメータ(拡縮率kと移動量s)で入力文書画像の投影波形を補正する(ステップ500)。なお、複数の変動補正パラメータが求められていた場合には、それぞれの変動補正パラメータで入力文書画像の投影波形を補正する。
Returning to FIG. 3, when the fluctuation correction parameter is obtained as described above, the projection
照合スコア算出部27は、参照文書画像の投影波形と、投影波形補正部26により補正された入力文書画像の投影波形とを照合することによって参照文書と入力文書との相似関係の判定指標となる照合スコアを算出する(ステップ600)。照合スコアは、例えば相関係数によりX,Y方向毎に求めるようにしてもよい。
The collation
照合スコア算出部27が算出した照合スコアを参照することによって、操作者が入力文書と参照文書の相似関係を判断する。あるいは、他の装置が照合スコアを予め設定した閾値と比較することによって相似関係の有無を判定する。複数の変動補正パラメータが求められていたことにより複数の組の照合スコアが算出されていた場合には、照合スコアの大きい方のみを正しい変動補正パラメータと認識して判定してもよい。
By referring to the matching score calculated by the matching
ところで、照合スコアをX,Yの各方向の相関値の和とした場合、X,Y方向の各相関値が0.7,0.7のときも0.4,1.0のときも、照合スコアは共に1.4と算出される。ただ、前者に対し、後者の場合は、X方向の相関値が0.4と低いのにかかわらず、参照文書と入力文書とに相似関係があると判定されてしまうかもしれない。そこで、先に求めた相関値が所定の閾値より小さい場合は、入力文書と参照文書との間に相似関係はないと判定し、これ以降の処理をスキップしてもよい。 By the way, when the collation score is the sum of correlation values in the X and Y directions, the correlation values in the X and Y directions are 0.7, 0.7, 0.4, and 1.0. The matching score is calculated to be 1.4. However, in the latter case, it may be determined that there is a similarity between the reference document and the input document, regardless of whether the correlation value in the X direction is as low as 0.4. Therefore, if the previously obtained correlation value is smaller than a predetermined threshold value, it may be determined that there is no similarity between the input document and the reference document, and the subsequent processing may be skipped.
ところで、入力文書と参照文書の相似関係の判定を、照合スコア算出部27を動作させることなく行うようにしてもよい。例えば、入力文書を拡縮する場合、横方向と縦方向の拡縮率を、通常は縦横ほぼ均等の割合で拡縮するはずである。つまり、通常は、縦横均等の倍率でコピーするものであり、極端に縦長や横長にコピーなどしない。本実施の形態では、変動補正パラメータ推定部25が変動補正パラメータ(拡縮率k及び移動量s)をX,Y方向それぞれに推定するわけであるが、いずれかの文書画像におけるX方向とY方向の変動補正パラメータ値があまりにも異なっていた場合、例えば入力文書画像におけるX方向の拡縮率がY方向の0.9〜1.1倍の範囲にない場合など所定の差異以上に異なっていた場合には、適切な変動補正パラメータが得られなかったとして以降の処理をスキップする。つまり、X,Y方向の拡縮率kが所定以上に異なる場合は、照合スコア算出部27に照合スコアを算出させるまでもなく入力文書と参照文書との間に相似関係はないものと判定する。
By the way, the similarity relationship between the input document and the reference document may be determined without operating the matching
1 CPU、2 ROM、3 RAM、4 ハードディスクドライブ(HDD)、5 HDDコントローラ、6 マウス、7 キーボード、8 ディスプレイ、9 入出力コントローラ、10 ネットワークコントローラ、11 内部バス、20 画像処理装置、21,22 投影波形生成部、23,24 特徴量生成部、25 変動補正パラメータ推定部、26 投影波形補正部、27 照合スコア算出部。 1 CPU, 2 ROM, 3 RAM, 4 hard disk drive (HDD), 5 HDD controller, 6 mouse, 7 keyboard, 8 display, 9 input / output controller, 10 network controller, 11 internal bus, 20 image processing device, 21 and 22 Projection waveform generation unit, 23, 24 Feature amount generation unit, 25 Variation correction parameter estimation unit, 26 Projection waveform correction unit, 27 Collation score calculation unit.
Claims (4)
取得した各画像に対応した特徴量情報から、一方の画像の前記ピーク位置を基準点から拡縮又は平行移動の少なくとも一方をさせることにより他方の画像の前記ピーク位置に重ね合わせるための相似変換パラメータであって拡縮率及び移動量で表される相似変換パラメータを推定する相似変換パラメータ推定手段と、
前記一方の画像を前記相似変換パラメータにより補正した後、前記各画像の相似関係を示す指標を算出する手段と、
を有し、
前記相似変換パラメータ推定手段は、
一方の画像の前記ピーク位置それぞれを、他方の画像の前記ピーク位置のそれぞれと重ね合わせるための拡縮率及び移動量で表される拡縮率−移動量平面座標上の一次関数を生成し、
相似変換パラメータが存在するであろう拡縮率−移動量平面座標上の予め決められた範囲を複数の領域に分割し、
各領域を通過する一次関数の数を求めると共に当該各一次関数を生成した各画像の前記ピーク位置の組を領域毎に特定し、
領域毎に特定した前記ピーク位置の組の中に同じピーク位置に基づく一次関数が重複して通過する領域が存在する場合、重複して通過する領域が存在しなくなるまで、当該領域を複数の領域に再分割し、その再分割した各領域を通過する一次関数の数を求めると共に当該各一次関数を生成した各画像の前記ピーク位置の組を特定する処理を繰り返し行い、
一次関数が通過する数が最大となる領域を通過する一次関数に基づいて相似変換パラメータを求める、
ことを特徴とする画像処理装置。 Means for accumulating pixel values of each image to be compared in at least one of the horizontal and vertical directions and acquiring feature amount information including information for specifying a peak position of the accumulated value;
Similarity conversion parameters for superimposing the peak position of one image on the other image by performing at least one of enlargement / reduction or translation from the reference point, based on the acquired feature amount information corresponding to each image A similarity conversion parameter estimating means for estimating a similarity conversion parameter represented by a scaling ratio and a movement amount;
Means for calculating an index indicating a similarity relationship between the images after correcting the one image with the similarity transformation parameter;
Have
The similarity transformation parameter estimation means includes
Generating a linear function on a plane coordinate of an enlargement / reduction ratio-movement amount represented by an enlargement / reduction ratio and a movement amount for superimposing each of the peak positions of one image with each of the peak positions of the other image;
Dividing a predetermined range on the plane coordinate of the scaling ratio-movement amount plane where the similarity conversion parameter will exist, into a plurality of regions,
Determine the number of linear functions that pass through each area and identify the set of peak positions of each image that generated each linear function for each area,
If there is a region where the linear functions based on the same peak position overlap in the set of peak positions specified for each region, the region is divided into a plurality of regions until there is no overlapping region. Re-divided into two, repeatedly calculating the number of linear functions that pass through each of the subdivided regions and identifying the set of peak positions of each image that generated the respective linear functions,
Find similarity transformation parameters based on a linear function that passes through the region where the number of linear functions passes is maximum,
An image processing apparatus.
一次関数が通過する数が最大となる領域を検出してから、その検出した領域のみを対象として、前記特定したピーク位置の組の中に同じピーク位置に基づく一次関数が重複して通過する領域の検出を行うことを特徴とする請求項1に記載の画像処理装置。 The similarity transformation parameter estimation means includes
A region where a linear function based on the same peak position is duplicated and passed through only the detected region after detecting a region where the number of passes through the linear function is maximum. The image processing apparatus according to claim 1, wherein the detection is performed.
領域を複数の領域に再分割した場合、分割対象となった領域において一次関数の交点を求め、再分割により生成された領域のうち、求めた交点が存在する領域及びその領域に隣接した領域のみを、通過する一次関数の数を求めると共に当該各一次関数を生成した各画像の前記ピーク位置の組を特定する対象とすることを特徴とする請求項1に記載の画像処理装置。 The similarity transformation parameter estimation means includes
When the area is subdivided into multiple areas, the intersection of the linear function is obtained in the area to be divided, and among the areas generated by the subdivision, only the area where the obtained intersection exists and the area adjacent to the area The image processing apparatus according to claim 1, wherein the number of linear functions that pass is determined and the set of peak positions of each image that has generated each linear function is specified.
比較対象とする各画像の画素値を水平又は垂直の少なくとも一方方向に累算し、その累算値のピーク位置を特定する情報を含む特徴量情報を取得する手段、
取得した各画像に対応した特徴量情報から、一方の画像の前記ピーク位置を基準点から拡縮又は平行移動の少なくとも一方をさせることにより他方の画像の前記ピーク位置に重ね合わせるための相似変換パラメータであって拡縮率及び移動量で表される相似変換パラメータを推定する相似変換パラメータ推定手段、
前記一方の画像を前記相似変換パラメータにより補正した後、前記各画像の相似関係を示す指標を算出する手段、
として機能させ、
前記相似変換パラメータ推定手段は、
一方の画像の前記ピーク位置それぞれを、他方の画像の前記ピーク位置のそれぞれと重ね合わせるための拡縮率及び移動量で表される拡縮率−移動量平面座標上の一次関数を生成し、
相似変換パラメータが存在するであろう拡縮率−移動量平面座標上の予め決められた範囲を複数の領域に分割し、
各領域を通過する一次関数の数を求めると共に当該各一次関数を生成した各画像の前記ピーク位置の組を領域毎に特定し、
領域毎に特定した前記ピーク位置の組の中に同じピーク位置に基づく一次関数が重複して通過する領域が存在する場合、重複して通過する領域が存在しなくなるまで、当該領域を複数の領域に再分割し、その再分割した各領域を通過する一次関数の数を求めると共に当該各一次関数を生成した各画像の前記ピーク位置の組を特定する処理を繰り返し行い、
一次関数が通過する数が最大となる領域を通過する一次関数に基づいて相似変換パラメータを求める、
ことを特徴とする画像処理プログラム。 Computer
Means for accumulating pixel values of each image to be compared in at least one of the horizontal and vertical directions and acquiring feature amount information including information for specifying a peak position of the accumulated value;
Similarity conversion parameters for superimposing the peak position of one image on the other image by performing at least one of enlargement / reduction or translation from the reference point, based on the acquired feature amount information corresponding to each image A similarity conversion parameter estimating means for estimating a similarity conversion parameter represented by a scaling ratio and a movement amount;
Means for calculating an index indicating a similarity relationship between the images after correcting the one image with the similarity transformation parameter;
Function as
The similarity transformation parameter estimation means includes
Generating a linear function on a plane coordinate of an enlargement / reduction ratio-movement amount represented by an enlargement / reduction ratio and a movement amount for superimposing each of the peak positions of one image with each of the peak positions of the other image;
Dividing a predetermined range on the plane coordinate of the scaling ratio-movement amount plane where the similarity conversion parameter will exist, into a plurality of regions,
Determine the number of linear functions that pass through each area and identify the set of peak positions of each image that generated each linear function for each area,
If there is a region where the linear functions based on the same peak position overlap in the set of peak positions specified for each region, the region is divided into a plurality of regions until there is no overlapping region. Re-divided into two, repeatedly calculating the number of linear functions that pass through each of the subdivided regions and identifying the set of peak positions of each image that generated the respective linear functions,
Find similarity transformation parameters based on a linear function that passes through the region where the number of linear functions passes is maximum,
An image processing program characterized by that.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009208573A JP5304553B2 (en) | 2009-09-09 | 2009-09-09 | Image processing apparatus and image processing program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009208573A JP5304553B2 (en) | 2009-09-09 | 2009-09-09 | Image processing apparatus and image processing program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2011059961A JP2011059961A (en) | 2011-03-24 |
JP5304553B2 true JP5304553B2 (en) | 2013-10-02 |
Family
ID=43947519
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2009208573A Expired - Fee Related JP5304553B2 (en) | 2009-09-09 | 2009-09-09 | Image processing apparatus and image processing program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5304553B2 (en) |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4140221B2 (en) * | 2001-09-18 | 2008-08-27 | 富士ゼロックス株式会社 | Image collation device and image collation program |
JP4254204B2 (en) * | 2001-12-19 | 2009-04-15 | 富士ゼロックス株式会社 | Image collation apparatus, image forming apparatus, and image collation program |
JP4661034B2 (en) * | 2003-07-28 | 2011-03-30 | 富士ゼロックス株式会社 | Print quality inspection apparatus and method |
JP4946882B2 (en) * | 2008-01-16 | 2012-06-06 | 日本電気株式会社 | Image processing apparatus, image processing system, image processing method, and program |
-
2009
- 2009-09-09 JP JP2009208573A patent/JP5304553B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2011059961A (en) | 2011-03-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4254204B2 (en) | Image collation apparatus, image forming apparatus, and image collation program | |
JP4991317B2 (en) | Facial feature point detection apparatus and method | |
JP4637618B2 (en) | Lane recognition device | |
JP5640774B2 (en) | Information collation apparatus, information collation method, and information collation program | |
US9390310B2 (en) | Striped pattern image examination support device, striped pattern image examination support method and program | |
JP6245880B2 (en) | Information processing apparatus, information processing method, and program | |
JP4901676B2 (en) | License plate information processing apparatus and license plate information processing method | |
WO2006006356A1 (en) | Image checking device, image checking method, and image checking program | |
JP2002298141A (en) | Pattern collating device, pattern collating method thereof, and pattern collating program | |
JP2006301881A (en) | Currency identifying device, currency identifying method and currency identifying program | |
JP6547903B2 (en) | Image processing apparatus, image processing method and storage medium | |
JP5304553B2 (en) | Image processing apparatus and image processing program | |
JP3884468B2 (en) | Fast image search method | |
WO2011083665A1 (en) | Similarity degree calculation device, similarity degree calculation method, and program | |
JP4140221B2 (en) | Image collation device and image collation program | |
JP4957075B2 (en) | Reliability evaluation program and reliability evaluation apparatus | |
JP2014032605A (en) | Image recognition device, image recognition method, and image recognition program | |
JP4563741B2 (en) | Image collation device, image collation method, and image collation program. | |
WO2022064644A1 (en) | Image generation system, image generation method, and recording medium | |
JP7206605B2 (en) | Information processing equipment | |
JP5169648B2 (en) | Original image search device and original image search program | |
JP4221960B2 (en) | Form identification device and identification method thereof | |
JP3781324B2 (en) | Image alignment method, fax character recognition method, and recording medium | |
JP4304722B2 (en) | Deformation estimation method, deformation estimation apparatus, and deformation estimation program | |
JP4692377B2 (en) | Image collation device, image collation method and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20120817 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20130521 |
|
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: 20130528 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20130610 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 Ref document number: 5304553 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
LAPS | Cancellation because of no payment of annual fees |