JP6010318B2 - Image inspection apparatus, image inspection method, and program - Google Patents

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

Info

Publication number
JP6010318B2
JP6010318B2 JP2012083510A JP2012083510A JP6010318B2 JP 6010318 B2 JP6010318 B2 JP 6010318B2 JP 2012083510 A JP2012083510 A JP 2012083510A JP 2012083510 A JP2012083510 A JP 2012083510A JP 6010318 B2 JP6010318 B2 JP 6010318B2
Authority
JP
Japan
Prior art keywords
image
character
character data
unit
difference
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.)
Active
Application number
JP2012083510A
Other languages
Japanese (ja)
Other versions
JP2013214178A (en
Inventor
藤井 英郎
英郎 藤井
Original Assignee
株式会社バイステック
大和サービス株式会社
株式会社ワイ・エム・ピー・インターナショナル
山栄物産株式会社
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 株式会社バイステック, 大和サービス株式会社, 株式会社ワイ・エム・ピー・インターナショナル, 山栄物産株式会社 filed Critical 株式会社バイステック
Priority to JP2012083510A priority Critical patent/JP6010318B2/en
Publication of JP2013214178A publication Critical patent/JP2013214178A/en
Application granted granted Critical
Publication of JP6010318B2 publication Critical patent/JP6010318B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Inking, Control Or Cleaning Of Printing Machines (AREA)
  • Processing Or Creating Images (AREA)
  • Document Processing Apparatus (AREA)

Description

本発明は、二つの画像間の差異を検査する画像検査装置等に関するものである。   The present invention relates to an image inspection apparatus for inspecting a difference between two images.

従来の画像検査装置として、色調変動量の算出基準となる印刷物を撮像して基準画像を生成し、また表色値の比較対象となる印刷物を撮像して比較画像を生成する撮像手段と、基準画像と比較画像の各々の対応する所定領域において積分を実行することにより基準表色値と比較表色値を生成する積分手段と、基準表色値と比較表色値に基づいて色調変動量を計算する比較手段とを具備するものが知られていた(例えば、特許文献1参照)。   As a conventional image inspection apparatus, an image pickup unit that generates a reference image by capturing a printed material that is a reference for calculating a color tone variation amount, and that generates a comparison image by capturing a printed material that is a comparison target of colorimetric values; Integration means for generating a reference color value and a comparison color value by executing integration in a predetermined area corresponding to each of the image and the comparison image, and a color variation amount based on the reference color value and the comparison color value There has been known one having a comparison means for calculating (see, for example, Patent Document 1).

特開2003−266646号公報(第1頁、第1図等)JP 2003-266646 A (first page, FIG. 1 etc.)

しかしながら、従来の画像検査装置においては、例えば、比較する画像を重ね合わせた場合の、重なる部分を比較することで画像の差異を検出していたため、画像間の内容の差異を適切に検出することができないという課題があった。   However, in the conventional image inspection apparatus, for example, when the images to be compared are overlapped, the difference between the images is detected by comparing the overlapping portions. There was a problem that it was not possible.

例えば、比較する画像内における文字等の要素のレイアウトが変化している場合、画像全体における実質的に記載されている内容が同じであっても、重なる部分は異なる画像となるため、画像間の多くの領域で差異が検出されてしまうという問題があった。例えば、印刷時の様々な事情や制約等により、印刷物を作成するための原稿の画像に対して加工が行われた結果、原稿と、実際に印刷に利用される印刷データとの間で、文字の配置等が変更されてしまう場合がある。このような場合、原稿と印刷データとの間で実質的に内容が同じであっても、従来においては、配置が変更された文字の部分が差異の箇所として検出されてしまう、という問題があった。   For example, if the layout of elements such as characters in the images to be compared has changed, even if the content described in the entire image is substantially the same, the overlapping portions will be different images, so There was a problem that a difference was detected in many areas. For example, as a result of processing an image of a document for creating a printed material due to various circumstances and restrictions during printing, characters between the document and the print data actually used for printing are displayed. May be changed. In such a case, even if the contents are substantially the same between the document and the print data, there has been a problem that the character portion whose arrangement has been changed is detected as a difference portion. It was.

本発明の画像検査装置は、第一画像が格納される第一画像格納部と、第二画像が格納される第二画像格納部と、第一画像と第二画像とを比較して、差異の箇所を検出する検出部と、検出部が検出した差異の箇所を示す情報を出力する出力部とを備え、検出部は、第一画像と第二画像とからそれぞれ文字の画像を取得する文字画像取得手段と、第一画像から取得した文字の画像である1以上の第一文字画像と、第二画像から取得した文字の画像である1以上の第二文字画像とを比較して、差異の箇所を検出する文字画像比較手段とを備えた画像検査装置である。   The image inspection apparatus of the present invention compares the first image and the second image with the first image storage unit that stores the first image, the second image storage unit that stores the second image, A detection unit that detects the location of the character, and an output unit that outputs information indicating the location of the difference detected by the detection unit. The detection unit acquires a character image from each of the first image and the second image. The image acquisition means compares one or more first character images, which are character images acquired from the first image, with one or more second character images, which are character images acquired from the second image. It is an image inspection apparatus provided with the character image comparison means which detects a location.

かかる構成により、画像間の内容の差異を適切に検出することができる。   With this configuration, it is possible to appropriately detect a difference in content between images.

また、本発明の画像検査装置は、前記画像検査装置において、検出部は、第一画像に含まれる文字の画像に対応する文字データである1以上の第一文字データと、第二画像に含まれる文字の画像に対応する文字データである1以上の第二文字データとを取得する文字データ取得手段と、文字データ取得手段が取得した第一文字データと、第二文字データとを比較して差異の箇所を検出する文字データ比較手段とを更に備えた画像検査装置である。   In the image inspection apparatus according to the present invention, in the image inspection apparatus, the detection unit is included in one or more first character data that is character data corresponding to an image of a character included in the first image, and the second image. Character data acquisition means for acquiring one or more second character data that is character data corresponding to a character image, the first character data acquired by the character data acquisition means, and the second character data An image inspection apparatus further comprising character data comparison means for detecting a location.

かかる構成により、画像間の内容の差異を異なる処理で検出することができ、異なる観点から画像間の内容の差異を適切に検出することができる。   With this configuration, it is possible to detect a difference in content between images by different processes, and to appropriately detect a difference in content between images from different viewpoints.

また、本発明の画像検査装置は、前記画像検査装置において、検出部は、第一文字画像に対して第二文字画像の文字が入れ替わっている箇所を検出する入替検出手段を更に備え、出力部は、入替検出手段が検出した文字が入れ替わっている箇所を示す情報を出力する画像検査装置である。   In the image inspection apparatus of the present invention, in the image inspection apparatus, the detection unit further includes a replacement detection unit that detects a place where the character of the second character image is replaced with respect to the first character image, and the output unit includes This is an image inspection apparatus that outputs information indicating a place where the character detected by the replacement detection means is replaced.

かかる構成により、文字が入れ替わっている箇所を検出することができる。   With this configuration, it is possible to detect a place where characters are replaced.

また、本発明の画像検査装置は、前記画像検査装置において、検出部は、第一文字画像に対して第二文字画像の1以上の文字が追加されている箇所を検出する追加検出手段を更に備え、出力部は、追加検出手段が検出した文字が追加されている箇所を示す情報を出力する画像検査装置である。   In the image inspection apparatus of the present invention, in the image inspection apparatus, the detection unit further includes an additional detection unit that detects a location where one or more characters of the second character image are added to the first character image. The output unit is an image inspection apparatus that outputs information indicating a place where the character detected by the addition detection unit is added.

かかる構成により、文字が追加されている箇所を検出することができる。   With this configuration, it is possible to detect a place where a character is added.

また、本発明の画像検査装置は、前記画像検査装置において、検出部は、第一文字画像に対して第二文字画像の1以上の文字が削除されている箇所を検出する削除検出手段を更に備え、出力部は、削除検出手段が検出した文字が削除されている箇所を示す情報を出力する画像検査装置である。   In the image inspection apparatus of the present invention, in the image inspection apparatus, the detection unit further includes a deletion detection unit that detects a position where one or more characters of the second character image are deleted from the first character image. The output unit is an image inspection apparatus that outputs information indicating a location where the character detected by the deletion detection unit is deleted.

かかる構成により、文字が削除されている箇所を検出することができる。   With this configuration, it is possible to detect a location where a character is deleted.

また、本発明の画像検査装置は、前記画像検査装置において、検出部は、文字データ取得手段が取得した第一文字データおよび第二文字データについてそれぞれ形態素解析を行う形態素解析手段を更に備え、文字データ比較手段は、形態素解析により第一文字データおよび第二文字データについてそれぞれ得られた形態素または単語を比較して、差異の箇所を検出する画像検査装置である。   In the image inspection apparatus of the present invention, in the image inspection apparatus, the detection unit further includes a morpheme analysis unit that performs morpheme analysis on each of the first character data and the second character data acquired by the character data acquisition unit. The comparison means is an image inspection device that compares morphemes or words respectively obtained for the first character data and the second character data by morphological analysis and detects a difference portion.

かかる構成により、形態素単位または単語単位で画像内の文字の差異を検出することができるため、一文字単位で文字の差異が検出される場合に比べて、どのような差異が発生したかを把握しやすい。また、一文字単位で差異が検出される場合とは異なり、差異の発生した箇所を推定しやすいため、元の画像と差異の検出された箇所とを重ねなくても差異の箇所を示すことができる。   With this configuration, it is possible to detect differences in characters in the image in units of morpheme or words, so it is possible to grasp what kind of difference has occurred compared to the case where differences in characters are detected in units of characters. Cheap. Also, unlike the case where a difference is detected in units of one character, it is easy to estimate the location where the difference has occurred, so the location of the difference can be shown without overlapping the original image and the location where the difference was detected. .

また、本発明の画像検査装置は、前記画像検査装置において、検出部は、第一画像と第二画像とについてそれぞれレイアウトの認識を行って、1以上の領域をそれぞれ検出するレイアウト認識手段と、レイアウト認識手段が第一画像について認識した1以上の領域と、第二画像について認識した1以上の領域との対応関係を判断する対応判断手段とを更に備え、文字画像取得手段は、対応判断手段が対応すると判断した領域の組ごとにそれぞれ第一文字画像と第二文字画像とを取得し、文字画像比較手段は、各領域ごとに第一文字画像と、第二文字画像とを比較して、差異の箇所を検出する画像検査装置である。   In the image inspection apparatus of the present invention, in the image inspection apparatus, the detection unit performs layout recognition for each of the first image and the second image, and detects one or more areas, respectively. The layout recognition means further comprises correspondence determination means for determining a correspondence relationship between one or more areas recognized for the first image and one or more areas recognized for the second image, and the character image acquisition means includes correspondence determination means. The first character image and the second character image are obtained for each set of regions determined to correspond to each other, and the character image comparison means compares the first character image and the second character image for each region, It is an image inspection apparatus which detects the location.

かかる構成により、文字の配置されている領域が大きく変更されていても、対応する領域間で文字の比較ができるため、正しく文字の比較を行うことができる。   With such a configuration, even if the area where the characters are arranged is greatly changed, the characters can be compared between the corresponding areas, so that the characters can be compared correctly.

また、本発明の画像検査装置は、前記画像検査装置において、文字画像比較手段は、少なくとも第一画像と第二画像とをそれぞれ構成する画素の輝度値の差を閾値と比較して差異の箇所を検出するものであり、検出部は、第一画像と第二画像とをそれぞれ構成する画素の輝度値の差の出現状況に応じて、閾値を設定する閾値設定手段を備えた画像検査装置である。   In the image inspection apparatus of the present invention, in the image inspection apparatus, the character image comparison unit compares at least a difference in luminance value between pixels constituting each of the first image and the second image with a threshold value. The detection unit is an image inspection apparatus that includes a threshold setting unit that sets a threshold according to the appearance of a difference in luminance value of pixels that form the first image and the second image, respectively. is there.

かかる構成により、比較する文字の画像に合わせて設定された閾値を用いて画素の一致を判断できるため、高精度に文字の画像の比較を行うことができる。   With this configuration, pixel matching can be determined using a threshold value set in accordance with the character image to be compared, so that character images can be compared with high accuracy.

また、本発明の画像検査装置は、前記画像検査装置において、閾値の入力を受け付ける閾値受付部を更に備え、文字画像比較手段は、少なくとも第一画像と第二画像とをそれぞれ構成する画素の輝度値の差を閾値受付部が受け付けた閾値と比較して差異の箇所を検出する画像検査装置である。   In the image inspection apparatus of the present invention, the image inspection apparatus further includes a threshold reception unit that receives an input of a threshold, and the character image comparison unit includes brightness of pixels that respectively constitute at least the first image and the second image. It is an image inspection apparatus that detects a difference portion by comparing a difference between values with a threshold received by a threshold receiving unit.

かかる構成により、文字の画像の違いを検出する程度を、ユーザが適宜設定することができる。   With such a configuration, the user can appropriately set the degree of detecting the difference in character images.

また、本発明の画像検査装置は、前記画像検査装置において、文字画像比較手段は、少なくとも第一文字画像と第二文字画像とをそれぞれ構成する画素の輝度値の差を閾値と比較して差異の箇所を検出するものであり、出力部が出力する1以上の差異の箇所に対するユーザの評価結果を受け付ける評価結果受付部と、評価結果受付部が受け付けた各評価結果に対応する差異の箇所についての、第一文字画像と第二文字画像との輝度値に関する情報を取得する輝度値取得部と、評価結果と、評価結果に対応する箇所の輝度値に関する情報との組合せと、閾値との組合せを学習して、比較を行う第一文字画像と第二文字画像に対応した閾値を取得する閾値取得部とを更に備えた画像検査装置である。   In the image inspection apparatus of the present invention, in the image inspection apparatus, the character image comparison unit compares at least a difference in luminance values of pixels constituting the first character image and the second character image with a threshold value, A part for detecting a location, an evaluation result receiving unit that receives a user's evaluation result for one or more points of difference output by the output unit, and a portion of a difference corresponding to each evaluation result received by the evaluation result receiving unit Learning a combination of a luminance value acquisition unit that acquires information about luminance values of the first character image and the second character image, a combination of an evaluation result, information on a luminance value of a portion corresponding to the evaluation result, and a threshold value The image inspection apparatus further includes a first character image to be compared and a threshold value acquisition unit that acquires a threshold value corresponding to the second character image.

かかる構成により、過去の判断結果を基に設定された閾値を用いて、適切な文字の画像の比較を行うことができる。   With this configuration, it is possible to compare appropriate character images using a threshold value set based on past determination results.

本発明による画像検査装置等によれば、画像間の内容の差異を適切に検出することができる。   According to the image inspection apparatus or the like according to the present invention, it is possible to appropriately detect a difference in content between images.

本発明の実施の形態における画像検査装置のブロック図Block diagram of an image inspection apparatus according to an embodiment of the present invention 同動作について説明するフローチャートFlow chart explaining the operation 同動作について説明するフローチャートFlow chart explaining the operation 同動作について説明するフローチャートFlow chart explaining the operation 同動作について説明するフローチャートFlow chart explaining the operation 同第一画像の一例を示す図The figure which shows an example of the first image 同抽出文字データ管理情報の一例を示す図The figure which shows an example of the extraction character data management information 同第二画像の一例を示す図The figure which shows an example of the second image 同色領域の検出処理を示す図The figure which shows the detection process of the same color area 同認識領域の検出処理を示す図The figure which shows the detection process of the recognition area 同第一領域管理情報を示す図The figure which shows the first area management information 同認識領域の検出処理を示す図The figure which shows the detection process of the recognition area 同第二領域管理情報を示す図The figure which shows the second area management information 同第二文字画像を示す図Figure showing the second character image 同第二文字画像管理情報を示す図The figure which shows the second character image management information 同第二文字データ管理情報を示す図The figure which shows the second character data management information 同比較結果情報を示す図Figure showing the comparison result information 同領域対応管理情報を示す図The figure which shows the same area correspondence management information 同形態素比較結果情報の一例を示す図The figure which shows an example of the same morpheme comparison result information 同比較結果情報の一例を示す図The figure which shows an example of the same comparison result information 同比較結果情報の一例を示す図The figure which shows an example of the same comparison result information 同表示例を示す図Figure showing the display example 同表示例を示す図Figure showing the display example 同表示例を示す図Figure showing the display example 同表示例を示す図Figure showing the display example 同表示例を示す図Figure showing the display example 本実施の形態による画像検査装置を実現するコンピュータの外観の一例を示す模式図The schematic diagram which shows an example of the external appearance of the computer which implement | achieves the image inspection apparatus by this Embodiment 同コンピュータの内部構成を示す図Diagram showing the internal configuration of the computer

以下、画像検査装置等の実施形態について図面を参照して説明する。なお、実施の形態において同じ符号を付した構成要素は同様の動作を行うので、再度の説明を省略する場合がある。   Hereinafter, embodiments of an image inspection apparatus and the like will be described with reference to the drawings. In addition, since the component which attached | subjected the same code | symbol in embodiment performs the same operation | movement, description may be abbreviate | omitted again.

(実施の形態)
図1は、本実施の形態における画像検査装置1のブロック図である。
(Embodiment)
FIG. 1 is a block diagram of an image inspection apparatus 1 in the present embodiment.

画像検査装置1は、第一画像格納部11、第二画像格納部12、検出部13、閾値受付部14、評価結果受付部15、輝度値取得部16、閾値取得部17、出力部18を備える。   The image inspection apparatus 1 includes a first image storage unit 11, a second image storage unit 12, a detection unit 13, a threshold reception unit 14, an evaluation result reception unit 15, a luminance value acquisition unit 16, a threshold acquisition unit 17, and an output unit 18. Prepare.

検出部13は、レイアウト認識手段131、文字画像取得手段132、文字データ取得手段133、文字データ比較手段134、形態素解析手段135、対応判断手段136、文字画像比較手段137、閾値格納手段138、閾値設定手段139、入替検出手段140、追加検出手段141、削除検出手段142を備える。   The detection unit 13 includes a layout recognition unit 131, a character image acquisition unit 132, a character data acquisition unit 133, a character data comparison unit 134, a morpheme analysis unit 135, a correspondence determination unit 136, a character image comparison unit 137, a threshold storage unit 138, a threshold value Setting means 139, replacement detection means 140, addition detection means 141, and deletion detection means 142 are provided.

第一画像格納部11には、第一画像が格納される。第一画像は、比較の基準となる画像である。本実施の形態で述べる画像とは、例えば、カラーやグレースケール、白黒等の静止画である。画像は、例えば、文字の画像や、マスコットキャラクター、アイコン、模様、イラストレーション等である。本実施の形態の画像は、例えば、1以上の文字の画像を含む画像である。本実施の形態の画像は、ビットマップデータであってもベクタデータであっても良い。また、画像は、1以上の文字データ(テキストデータ)を有していても良い。文字データとは、例えば、文字の画像を出力するための情報であり、例えば、文字コードである。第一画像のファイル形式等は問わない。第一画像は、例えば、印刷用の原稿であり、例えば、この第一画像を元に、実際の印刷に用いられる画像データが作成される。第一画像は、例えば、容器等の表面に印刷される印刷データの元となる原稿である。なお、第一画像が文字データを有している場合、第一画像は、この第一画像内の文字データが配置されている各領域から抽出した1以上の文字データと、文字データが抽出された各領域を指定する情報とを、更に有していても良い。文字データが配置されている各領域とは、例えば、テキストブロックや、テキストフレームと呼ばれる領域である。ここでの格納は、一時記憶であっても良い。例えば、図示しない入力受付部等が受け付けた第一画像が、第一画像格納部11に一時記憶されても良い。第一画像格納部11は、不揮発性の記録媒体が好適であるが、揮発性の記録媒体でも実現可能である。   The first image storage unit 11 stores a first image. The first image is an image serving as a reference for comparison. The image described in the present embodiment is, for example, a still image such as color, gray scale, and black and white. The image is, for example, a character image, a mascot character, an icon, a pattern, an illustration, or the like. The image of the present embodiment is an image including an image of one or more characters, for example. The image of the present embodiment may be bitmap data or vector data. The image may have one or more character data (text data). The character data is information for outputting a character image, for example, and is, for example, a character code. The file format of the first image does not matter. The first image is, for example, a document for printing. For example, image data used for actual printing is created based on the first image. The first image is, for example, a manuscript from which print data is printed on the surface of a container or the like. When the first image has character data, the first image is obtained by extracting one or more character data extracted from each area where the character data in the first image and character data are extracted. Information for designating each area may be further included. Each area where character data is arranged is, for example, an area called a text block or a text frame. The storage here may be temporary storage. For example, a first image received by an input receiving unit or the like (not shown) may be temporarily stored in the first image storage unit 11. The first image storage unit 11 is preferably a non-volatile recording medium, but can also be realized by a volatile recording medium.

第二画像格納部12には、第二画像が格納される。第二画像は、第一画像と同様の画像である。第二画像は、第一画像と比較される画像である。第二画像は、例えば、第一画像を元に作成された画像である。例えば、第一画像を原稿として作成された実際の印刷に用いられる印刷データの画像である。第二画像は、例えば、容器等の表面に印刷される印刷データである。第一画像と第二画像とのファイル形式やサイズ等は、同じであっても異なるものであっても良い。ここでの格納は、一時記憶であっても良い。例えば、図示しない入力受付部等が受け付けた第二画像が、第二画像格納部12に一時記憶されても良い。第二画像格納部12は、不揮発性の記録媒体が好適であるが、揮発性の記録媒体でも実現可能である。   The second image storage unit 12 stores a second image. The second image is the same image as the first image. The second image is an image that is compared with the first image. The second image is an image created based on the first image, for example. For example, it is an image of print data used for actual printing created using a first image as a document. The second image is print data printed on the surface of a container or the like, for example. The file format and size of the first image and the second image may be the same or different. The storage here may be temporary storage. For example, a second image received by an input receiving unit or the like (not shown) may be temporarily stored in the second image storage unit 12. The second image storage unit 12 is preferably a non-volatile recording medium, but can also be realized by a volatile recording medium.

検出部13は、第一画像と第二画像とを比較して差異の箇所を検出する。差異の箇所とは、画像間の一致しない部分である。本実施の形態においては、検出部13が、第一画像から取得した文字の画像である1以上の第一文字画像と、第二画像から取得した文字の画像である1以上の第二文字画像とを比較して、差異の箇所を検出する処理を含む場合の一例について説明する。   The detection unit 13 compares the first image and the second image to detect a difference portion. The difference portion is a portion where images do not match. In the present embodiment, the detection unit 13 includes one or more first character images that are character images acquired from the first image, and one or more second character images that are character images acquired from the second image. An example in the case of including processing for detecting a difference portion will be described.

レイアウト認識手段131は、第一画像と第二画像とについてそれぞれレイアウトの認識を行って、1以上の領域をそれぞれ検出する。レイアウトの認識を行うということは、例えば、画像内において、文字が配置されている1以上の領域(テキストブロック、テキストフレーム等)やテキストを含む領域等を認識することである。例えば、レイアウト認識手段131は、第一画像と、第二画像とについてそれぞれ文字が配置されている領域を認識する。領域を認識するということは、例えば、領域を定義する情報を取得することである。領域を定義する情報を取得するということは、例えば、領域の輪郭を定義可能な情報を取得することである。輪郭を定義可能な情報を取得するということは、例えば、領域の位置の情報(例えば座標)と、サイズの情報(例えば、縦横の長さの情報)との組合せや、輪郭の頂点の座標(輪郭が多角形である場合)や、領域の輪郭を示す座標群を取得することである。また、領域を定義する情報を取得するということは、領域内の全ての画素の座標情報を取得することであっても良い。以下、レイアウト認識手段131がレイアウトを認識する処理の例について説明する。なお、ここでは、レイアウト認識手段131が第一画像および第二画像から最終的に認識する各領域を認識領域と呼ぶ。   The layout recognizing unit 131 recognizes layouts for the first image and the second image, respectively, and detects one or more regions. Recognizing a layout means, for example, recognizing one or more areas (text blocks, text frames, etc.) in which characters are arranged, an area including text, and the like in an image. For example, the layout recognizing unit 131 recognizes areas where characters are arranged for the first image and the second image, respectively. Recognizing an area means, for example, acquiring information defining the area. Obtaining information defining a region means obtaining information that can define the contour of the region, for example. Acquiring information that can define a contour means, for example, a combination of region position information (for example, coordinates) and size information (for example, vertical and horizontal length information), or coordinates of vertexes of the contour ( A case where the contour is a polygon) and a coordinate group indicating the contour of the region. Further, obtaining information defining a region may mean obtaining coordinate information of all pixels in the region. Hereinafter, an example of processing in which the layout recognition unit 131 recognizes a layout will be described. Here, each area that the layout recognition unit 131 finally recognizes from the first image and the second image is referred to as a recognition area.

図2は、レイアウト認識手段131が、第一画像および第二画像について行うレイアウトの認識処理の一例を説明するためのフローチャートである。ここでは、例として、第一画像について領域検出を行う場合について説明するが、第二画像についても、同様の処理を行うようにして良い。   FIG. 2 is a flowchart for explaining an example of layout recognition processing performed by the layout recognition unit 131 for the first image and the second image. Here, as an example, the case of performing region detection for the first image will be described, but the same processing may be performed for the second image.

(ステップS101)レイアウト認識手段131は、第一画像について同一背景色の領域を認識する処理を行う。この処理の詳細については後述する。   (Step S <b> 101) The layout recognition unit 131 performs processing for recognizing the same background color region for the first image. Details of this processing will be described later.

(ステップS102)レイアウト認識手段131は、ステップS101で認識された領域のそれぞれについて、枠で囲まれた領域の認識を行う。この処理の詳細については後述する。   (Step S102) The layout recognition unit 131 recognizes a region surrounded by a frame for each of the regions recognized in Step S101. Details of this processing will be described later.

(ステップS103)レイアウト認識手段131は、ステップS101、およびステップS102で認識された各領域について登録マーカの検出を行う。登録マーカとは、予め登録されているマーカ(印、標識等)であり、具体的には画像である。そして、各領域から、検出されたマーカが配置されている領域を除外する。この処理の詳細については後述する。   (Step S103) The layout recognizing means 131 detects a registered marker for each area recognized in Step S101 and Step S102. A registered marker is a marker (a mark, a sign, etc.) registered in advance, and specifically an image. And the area | region where the detected marker is arrange | positioned is excluded from each area | region. Details of this processing will be described later.

(ステップS104)レイアウト認識手段131は、第一画像内の残りの領域を定義する情報を取得する。これにより、同一背景色の領域内の枠で囲まれた領域(ただし、登録マーカと一致する領域を除去した領域)と、第一画像内の残りの領域とを認識したこととなる。これにより認識された領域が認識領域である。なお、残りの領域については、他の領域とは異なる色や輝度を有する画素を含む最小矩形領域を認識するようにしてよい。最小矩形領域の認識処理は公知技術であるので、ここでは詳細の説明は省略する。そして、処理を終了する。   (Step S104) The layout recognizing unit 131 acquires information defining the remaining area in the first image. As a result, the area surrounded by the frame in the area of the same background color (however, the area from which the area matching the registered marker is removed) and the remaining area in the first image are recognized. The area recognized in this way is the recognition area. For the remaining area, a minimum rectangular area including pixels having different colors and brightness from other areas may be recognized. Since the process of recognizing the minimum rectangular area is a known technique, detailed description thereof is omitted here. Then, the process ends.

図3は、上記のステップS101において説明した、レイアウト認識手段131が、第一画像から同一背景色の領域を認識する処理の詳細を説明するためのフローチャートである。   FIG. 3 is a flowchart for explaining the details of the process of recognizing the same background color area from the first image by the layout recognizing unit 131 described in step S101.

(ステップS201)レイアウト認識手段131は、第一画像を構成する各画素の色の値(例えば、CMYK値や、RGB値等)を用いて、領域ラベリング処理を行う。領域ラベリング処理とは、隣接する同じ色の画素を連結して領域を検出する処理である。なお、例えば、色の値の差(例えば、色相の差等)が予め指定された閾値以下のものについては、同じ色の画素と判断するようにしても良い。領域ラベリング処理により、第一画像内から、1以上の同じ色の領域を検出する。なお、特定の色は、ラベリング対象から除外するようにしてもよい。   (Step S <b> 201) The layout recognition unit 131 performs region labeling processing using the color values (for example, CMYK values, RGB values, etc.) of each pixel constituting the first image. The area labeling process is a process for detecting an area by connecting adjacent pixels of the same color. For example, a pixel having a color value difference (for example, a hue difference) equal to or less than a predetermined threshold value may be determined as a pixel having the same color. One or more areas of the same color are detected from the first image by the area labeling process. A specific color may be excluded from the labeling target.

(ステップS202)レイアウト認識手段131は、ラベリングされた領域のうちの、一定面積以上の領域を候補領域として検出する。   (Step S202) The layout recognizing unit 131 detects a region having a certain area or more as a candidate region among the labeled regions.

(ステップS203)レイアウト認識手段131は、現在検出されている(削除されずに残っている)候補領域のうちの面積の最も小さい候補領域を選択する。現在検出されている候補領域とは、削除されずに残っている候補領域である。   (Step S203) The layout recognizing unit 131 selects the candidate area having the smallest area among the currently detected candidate areas (remaining without being deleted). The candidate area currently detected is a candidate area that remains without being deleted.

(ステップS204)レイアウト認識手段131は、ステップS203で選択した候補領域の内部(例えば、候補領域で囲まれた領域も含む)を、同一色で塗りつぶす。   (Step S204) The layout recognition unit 131 fills the inside of the candidate area selected in Step S203 (for example, including the area surrounded by the candidate area) with the same color.

(ステップS205)レイアウト認識手段131は、同一色で塗りつぶされた領域を定義する情報を、同一背景色の領域を定義する情報として取得し、図示しない記憶媒体等に蓄積する。そして、この領域を候補領域から除外する。なお、ここで認識された同一背景色の各領域を、ここでは、色領域と呼ぶ。   (Step S205) The layout recognizing unit 131 acquires information defining an area filled with the same color as information defining an area of the same background color, and accumulates it in a storage medium (not shown). Then, this area is excluded from the candidate areas. In addition, each area | region of the same background color recognized here is called a color area | region here.

(ステップS206)レイアウト認識手段131は、他の候補領域があるか否かを判断する。ある場合、ステップS203に戻り、ない場合、処理を終了する。   (Step S206) The layout recognition unit 131 determines whether there is another candidate area. If there is, the process returns to step S203, and if not, the process ends.

なお、上記の処理において、レイアウト認識対象となる画像が、ベクトルデータである場合、ラベリング処理等の対象となる画素として、ベクトルデータを所定の解像度にレンダリングした場合の各画素や、ベクトルデータのプレビュー画像の各画素を用いても良い。かかることは、以下の他の処理においても同様である。あるいは、同じ色を有している隣接したベクトル図形が配置されている領域を、同一背景色の領域として認識しても良い。   In the above processing, when the image to be recognized for layout is vector data, each pixel when vector data is rendered at a predetermined resolution as a pixel to be subjected to labeling processing, etc., or a preview of vector data Each pixel of the image may be used. The same applies to other processes described below. Or you may recognize the area | region where the adjacent vector figure which has the same color is arrange | positioned as an area | region of the same background color.

図4は、上記のステップS102において説明した、ステップS101で認識された色領域のそれぞれにおいて、レイアウト認識手段131が、枠で囲まれた領域の認識を行う処理を説明するためのフローチャートである。   FIG. 4 is a flowchart for explaining a process in which the layout recognition unit 131 recognizes a region surrounded by a frame in each of the color regions recognized in step S101 described in step S102.

(ステップS301)レイアウト認識手段131は、ステップS101で認識された一の色領域を選択する。   (Step S301) The layout recognizing means 131 selects one color area recognized in step S101.

(ステップS302)レイアウト認識手段131は、ステップS301で選択した色領域内の各画素について、隣接する画素間の画素値(例えば輝度値)を比較して、画素のエッジを抽出する。例えば、画素値の差が、予め指定された閾値以上であれば、エッジであると検出する。なお、エッジ検出の差異の閾値等は、予め指定されていても良いし、動的に設定されても良い。   (Step S302) The layout recognition unit 131 extracts pixel edges by comparing pixel values (for example, luminance values) between adjacent pixels for each pixel in the color region selected in Step S301. For example, if the difference between pixel values is equal to or greater than a predetermined threshold value, an edge is detected. Note that the threshold value for edge detection difference or the like may be specified in advance or may be set dynamically.

(ステップS303)レイアウト認識手段131は、ステップS302で抽出したエッジから、一の色領域の内部にエッジで囲まれた閉曲線が存在するか否かを判断する。存在する場合、ステップS304に進み、存在しない場合、ステップS308に進む。   (Step S303) The layout recognizing means 131 determines whether or not a closed curve surrounded by an edge exists in one color area from the edge extracted in Step S302. When it exists, it progresses to step S304, and when it does not exist, it progresses to step S308.

(ステップS304)レイアウト認識手段131は、一の閉曲線を選択し、この閉曲線の周囲の長さが、予め指定された長さ以上であるか否かを判断する。予め指定された長さ以上である場合、ステップS305に進み、長さ未満である場合、ステップS307に進む。   (Step S304) The layout recognizing unit 131 selects one closed curve and determines whether or not the length of the circumference of the closed curve is equal to or longer than a predetermined length. If it is longer than the length specified in advance, the process proceeds to step S305, and if it is less than the length, the process proceeds to step S307.

(ステップS305)レイアウト認識手段131は、ステップS304で選択した一の閉曲線の内部を、一の枠で囲まれた領域と判断し、この領域を定義する情報を取得し、この領域を識別する情報である領域識別情報と対応付けて、図示しない記憶媒体等に蓄積する。   (Step S305) The layout recognition unit 131 determines that the inside of the one closed curve selected in Step S304 is an area surrounded by one frame, acquires information defining this area, and identifies this area Are stored in a storage medium (not shown) in association with the area identification information.

(ステップS306)レイアウト認識手段131は、ステップS301で選択した一の色領域の内部から、ステップS305で定義した領域を除外する。   (Step S306) The layout recognition unit 131 excludes the area defined in Step S305 from the inside of the one color area selected in Step S301.

(ステップS307)レイアウト認識手段131は、色領域内に別の閉曲線があるか否かを判断する。ある場合、ステップS304に戻り、ない場合、ステップS308に進む。   (Step S307) The layout recognition unit 131 determines whether there is another closed curve in the color region. If there is, the process returns to step S304, and if not, the process proceeds to step S308.

(ステップS308)レイアウト認識手段131は、ステップS101で検出された別の色領域が存在するか否かを判断する。存在する場合、ステップS302に戻り、存在しない場合、上位の処理にリターンする。   (Step S308) The layout recognizing unit 131 determines whether another color area detected in step S101 exists. If it exists, the process returns to step S302, and if it does not exist, the process returns to the upper process.

以上の処理により、色領域のうちの枠で囲まれた領域を認識することができる。   Through the above processing, an area surrounded by a frame in the color area can be recognized.

なお、上記の処理において、レイアウト認識対象となる画像が、ベクトルデータである場合、色領域内の直線で囲まれた領域等を、枠で囲まれた領域として認識するようにしても良い。   In the above processing, when the image to be recognized for layout is vector data, an area surrounded by straight lines in the color area may be recognized as an area surrounded by a frame.

次に、上記のステップS103において説明した、ステップS102で認識された各領域について登録マーカの検出を行う処理について簡単に説明する。レイアウト認識手段131は、予め登録されている登録マーカの画像を、図示しない記憶媒体等から読み出す。そして、ステップS101で認識された領域と、ステップS102で認識された領域とにおいて、それぞれ、登録マーカと一致する領域の検出を行う。そして、上記の各領域から、検出されたマーカが配置されている領域を除外し、このマーカの領域を除外した領域を定義する情報を取得し、図示しない記憶媒体等に蓄積する。登録マーカと一致する領域の検出は、例えば、登録マーカの画像の位置(座標)とサイズ(スケール)とをパラメータとして変更しながら、第一画像のステップS101で認識された領域内の画像と、ステップS102で認識された領域内の画像とのマッチングを行い、予め指定された値以上の評価値を得られた場合に、登録マーカが発見されたと判断する。なお、画像間のマッチングを行う処理については公知の技術であるので、ここでは詳細な説明は省略する。   Next, a process for detecting a registered marker for each area recognized in step S102 described in step S103 will be briefly described. The layout recognition unit 131 reads an image of a registered marker registered in advance from a storage medium (not shown). And the area | region which corresponds with a registration marker is each detected in the area | region recognized by step S101 and the area | region recognized by step S102. Then, the area where the detected marker is arranged is excluded from each area described above, information defining the area excluding the marker area is acquired, and stored in a storage medium (not shown) or the like. For example, the detection of the area that matches the registered marker is performed by changing the position (coordinates) and size (scale) of the image of the registered marker as parameters, and the image in the area recognized in step S101 of the first image, Matching with the image in the region recognized in step S102 is performed, and when an evaluation value equal to or higher than a predesignated value is obtained, it is determined that a registered marker has been found. Note that the processing for performing matching between images is a known technique, and thus detailed description thereof is omitted here.

なお、レイアウト認識手段131は、上記の処理を全て行うようにしても良いし、一部だけを行うようにしても良い。例えば、色領域を認識する処理を行わずに、枠で囲まれた領域だけを検出するようにしても良い。また、レイアウト認識手段131は、他のレイアウト認識の処理を行うようにしてもよい。   Note that the layout recognition unit 131 may perform all of the above processing, or may perform only a part thereof. For example, only the area surrounded by the frame may be detected without performing the process of recognizing the color area. Further, the layout recognition unit 131 may perform other layout recognition processing.

文字画像取得手段132は、第一画像と第二画像とからそれぞれ文字の画像を取得する。文字画像取得手段132が取得する一の文字の画像は、好ましくは、1文字単位の文字の画像である。ここでは、第一画像から取得した文字の画像を第一文字画像、第二画像から取得した文字の画像を第二文字画像と呼ぶ。文字画像取得手段132は、例えば、レイアウト認識手段131が認識した各認識領域に含まれる文字の画像をそれぞれ取得する。また、文字画像取得手段132は、文字の画像を取得するために、第一画像や第二画像において、各文字の画像を検出する処理を行っても良く、さらに検出した各文字の画像を定義する情報(例えば、輪郭を定義する情報)を取得しても良い。なお、画像内の一の領域から、1文字単位の文字の画像を検出し取得する処理は、いわゆるOCR(Optical Character Recognition)の技術として公知の技術であるので、ここでは詳細な説明は省略する。なお、第一画像や第二画像が文字データを含む画像である場合、各文字のアウトラインデータや、各文字のビットマップデータや、各文字をラスタライズして得られたビットマップデータ等を取得するようにしても良い。また、文字画像取得手段132は、結果的に、第一画像と第二画像とに含まれる文字の画像を取得できればよく、取得の方法や手段等は問わない。例えば、第一画像に含まれる文字データを、一旦、第一画像から抽出後、その抽出した文字データを文字ごとにラスタライズして第一文字画像を取得しても良く、このような場合も第一画像の文字画像を取得したと考えて良い。   The character image acquisition unit 132 acquires character images from the first image and the second image, respectively. The image of one character acquired by the character image acquisition unit 132 is preferably a character image in units of one character. Here, the character image acquired from the first image is referred to as a first character image, and the character image acquired from the second image is referred to as a second character image. The character image acquisition unit 132 acquires, for example, each character image included in each recognition area recognized by the layout recognition unit 131. In addition, the character image acquisition unit 132 may perform a process of detecting each character image in the first image and the second image in order to acquire a character image, and further define an image of each detected character. Information (for example, information defining the contour) may be acquired. Note that the process of detecting and acquiring a character image in units of one character from one region in the image is a known technique as a so-called OCR (Optical Character Recognition) technique, and thus detailed description thereof is omitted here. . If the first image or the second image is an image including character data, outline data of each character, bitmap data of each character, bitmap data obtained by rasterizing each character, and the like are acquired. You may do it. Moreover, the character image acquisition means 132 should just acquire the image of the character contained in a 1st image and a 2nd image as a result, and the acquisition method, means, etc. are not ask | required. For example, the character data included in the first image may be once extracted from the first image, and then the first character image may be acquired by rasterizing the extracted character data for each character. You may think that the character image of the image was acquired.

また、後述する対応判断手段136が、第一画像と第二画像とにおいて上記で認識された認識領域間における対応関係を検出した場合、文字画像取得手段132は、第一画像と第二画像とにおいてそれぞれ認識された認識領域のうちの、後述する対応判断手段136が対応する認識領域であると判断した認識領域の組ごとに、それぞれ、一文字ごとの文字の画像を取得するようにしてもよい。この場合の文字の画像を取得する際の文字の配列順番や取得方向等は、通常、第一画像と第二画像とで同じ配列順番および取得方向となるようにする。   Further, when the correspondence determination unit 136 described later detects a correspondence relationship between the recognition areas recognized above in the first image and the second image, the character image acquisition unit 132 determines that the first image and the second image The character image for each character may be acquired for each set of recognition regions that are determined to be corresponding recognition regions by the later-described correspondence determination unit 136 among the recognition regions that are recognized in FIG. . In this case, the character arrangement order, the acquisition direction, and the like when acquiring the character image are usually the same arrangement order and acquisition direction in the first image and the second image.

文字データ取得手段133は、第一画像に含まれる文字の画像に対応する文字データである1以上の第一文字データと、第二画像に含まれる文字の画像に対応する文字データである1以上の第二文字データとを取得する。文字データは、例えば、文字コードである。あるいは、文字データは文字コードに対応するハッシュ等であっても良い。具体的には、文字データ取得手段133は、第一画像に含まれる各認識領域ごとに、文字画像取得手段132が取得した1以上の第一文字画像に対応する文字データを取得する。また、文字データ取得手段133は、第二画像に含まれる各認識領域ごとに、文字画像取得手段132が取得した1以上の第二文字画像に対応する文字データを取得する。これにより、第一文字画像及び第二文字画像にそれぞれ対応する第一文字データ及び第二文字データとが取得される。なお、文字画像と文字データとの対応関係を示す情報(例えば、文字画像の識別情報と、文字コードとを対応付けた情報等)は、例えば、図示しない記憶媒体等に蓄積しておくようにする。なお、第一文字画像や第二文字画像等の文字の画像に対応する文字データを取得する処理は、OCR等の技術として公知の技術であるのでここでは詳細な説明は省略する。   The character data acquisition unit 133 includes one or more first character data that is character data corresponding to a character image included in the first image and one or more character data corresponding to a character image included in the second image. Get second character data. The character data is, for example, a character code. Alternatively, the character data may be a hash or the like corresponding to the character code. Specifically, the character data acquisition unit 133 acquires character data corresponding to one or more first character images acquired by the character image acquisition unit 132 for each recognition area included in the first image. Further, the character data acquisition unit 133 acquires character data corresponding to one or more second character images acquired by the character image acquisition unit 132 for each recognition area included in the second image. Thereby, the first character data and the second character data corresponding to the first character image and the second character image are acquired. Information indicating the correspondence between the character image and the character data (for example, information in which the character image identification information is associated with the character code) is stored in, for example, a storage medium (not shown). To do. Note that the process of acquiring character data corresponding to a character image such as a first character image or a second character image is a known technique as a technique such as OCR, and a detailed description thereof will be omitted here.

文字データ比較手段134は、文字データ取得手段133が取得した第一文字データと、第二文字データとを比較して差異の箇所を検出する。ここでは、文字データ比較手段134は、レイアウト認識手段131が第一画像と第二画像とからそれぞれ認識した認識領域間において、第一文字データと第二文字データとを比較して差異の箇所を検出する。文字データ比較手段134は、第一画像の一の認識領域と、第二画像の一の認識領域とから、それぞれ同じ配列順番に沿って、第一文字データと第二文字データとをそれぞれ一文字ごとに取得し、比較することで、各文字データが一致するか否かを順番に判断していく。例えば、それぞれの認識領域について取得された文字データから、上の行から下の行に向かって、左から右に向かって一文字ずつ文字データを読み出し、読み出した文字データ(例えば、文字コードや文字のハッシュ)を比較することで、文字の一致、不一致を判断していく。また、比較した文字が一致しない場合、一致する文字が現れるまで探索を行うことで、例えば、改行ずれや、文字の追加、削除等によって生じた文字データの差異がある箇所を検出するようにしてもよい。一致しない文字が検出された箇所は、差異のある箇所の一つである。また、比較した文字が一致しなかった場合において、第一文字データの比較に用いられた文字と、第二文字データの比較に用いられた文字の次の文字とが一致した場合には、第一画像のこの一致しなかった箇所の直前の箇所は文字が欠落しているために差異が検出された箇所となる。なお、文字データで構成される二つの文字列を比較して、差異の箇所を検出する処理は、文書校正や、文書比較等の技術等として、公知の技術であるのでここでは詳細な説明は省略する。文字データ比較手段134は、例えば、比較によって、一致しないと判断された箇所、即ち差異があると判断された箇所を示す情報を、図示しない記憶媒体等に蓄積する。差異があると判断された箇所を示す情報は、例えば、差異があると判断された文字データに対応する文字画像の識別情報や、差異があると判断された文字画像の位置を示す情報等である。また、同様に、一致すると判断された箇所、即ち差異がないと判断された箇所を示す情報を、同様に、図示しない記憶媒体等に蓄積するようにしてもよい。差異がないと判断された箇所の情報に関しても同様である。   The character data comparison unit 134 compares the first character data acquired by the character data acquisition unit 133 with the second character data and detects a difference portion. Here, the character data comparison unit 134 compares the first character data and the second character data between the recognition regions recognized by the layout recognition unit 131 from the first image and the second image, and detects a difference portion. To do. The character data comparing means 134 converts the first character data and the second character data for each character in the same arrangement order from one recognition area of the first image and one recognition area of the second image. By acquiring and comparing, it is sequentially determined whether or not the character data match. For example, character data is read character by character from left to right from the upper line to the lower line from the character data acquired for each recognition area, and the read character data (for example, character code or character By comparing (hash), the character match / mismatch is judged. If the compared characters do not match, the search is performed until a matching character appears, so as to detect, for example, a part where there is a difference in character data caused by line breaks, character addition, deletion, etc. Also good. A place where a mismatched character is detected is one of the places having a difference. In addition, when the compared characters do not match, if the character used for comparing the first character data matches the character next to the character used for comparing the second character data, A portion immediately before the unmatched portion of the image is a portion where a difference is detected because a character is missing. The process of comparing two character strings composed of character data and detecting a difference portion is a well-known technique as a technique such as document proofing or document comparison, so a detailed description will be given here. Omitted. For example, the character data comparing unit 134 accumulates information indicating a portion determined not to match by comparison, that is, a portion determined to have a difference, in a storage medium (not illustrated). Information indicating the location determined to have a difference is, for example, identification information of a character image corresponding to character data determined to have a difference, information indicating a position of a character image determined to have a difference, or the like. is there. Similarly, information indicating a location determined to match, that is, a location determined to have no difference, may be similarly stored in a storage medium (not shown) or the like. The same applies to the information on the part determined not to be different.

文字データ比較手段134は、対応する認識領域間の比較を行う。対応する認識領域間とは、同じ内容(同じ情報)を有すると考えられる領域である。ただし、対応する認識領域がわからない場合は、文字データ比較手段134は、例えば、対応する認識領域を検出する処理も兼ねて、第一画像において認識された1以上の認識領域と、第二画像において認識された1以上の認識領域との組合せについて、各認識領域間の第一文字データと第二文字データとを比較して差異の箇所を検出する。ここでの差異の箇所を検出する処理は、一致する箇所を検出する処理と考えても良い。文字データ比較手段134は、どのような組合せについて比較を行っても良いが、第一画像の一の認識領域と、第二画像の一の認識領域との対応関係が判断可能となるような組合せについて比較を行うことが好ましい。このように認識領域の組合せについて文字データの比較を行うのは、第一画像と第二画像とで、文字の配置されている領域が入れ替わったりしている場合があり、第一画像のどの認識領域が、第二画像のどの認識領域に対応するかを、後述する対応判断手段136が判断できるようにするためである。   The character data comparison unit 134 performs comparison between corresponding recognition areas. Between the corresponding recognition areas is an area considered to have the same content (same information). However, if the corresponding recognition area is not known, the character data comparison unit 134, for example, also serves to detect the corresponding recognition area, and in the second image, the one or more recognition areas recognized in the first image. For the combination with one or more recognized recognition areas, the first character data and the second character data between the recognition areas are compared to detect a difference. The process for detecting the difference portion here may be considered as a process for detecting a matching portion. The character data comparison unit 134 may compare any combination, but a combination that can determine the correspondence between one recognition area of the first image and one recognition area of the second image. It is preferable to make a comparison. Character data comparison is performed for combinations of recognition areas in this way because the area where the characters are arranged may be switched between the first image and the second image. This is because the correspondence determination unit 136 (to be described later) can determine which recognition area of the second image corresponds to the area.

例えば、文字データ比較手段134は、レイアウト認識手段131が認識した第一画像の全ての認識領域と、第二画像の全ての認識領域との組合せについて、第一文字データと第二文字データとの比較を行う。   For example, the character data comparison unit 134 compares the first character data and the second character data for combinations of all the recognition areas of the first image recognized by the layout recognition unit 131 and all the recognition areas of the second image. I do.

また、例えば、文字データ比較手段134は、レイアウト認識手段131が同様の処理で検出した認識領域については、同じ内容の情報が記載されている認識領域であると考えるようにして、同様の処理で検出された認識領域間のみの文字データを比較するようにしても良い。   Further, for example, the character data comparison unit 134 performs the same process by considering that the recognition area detected by the layout recognition unit 131 is the same as the recognition area in which the same content information is described. You may make it compare the character data only between the recognized recognition areas.

なお、第一画像の一の認識領域と第二画像の一の認識領域との文字データ間の比較を行った時点で、両者の文字データの一致率が予め指定された比率以上であった場合に、この認識領域の組を構成する各認識領域については、他の認識領域との文字データ間の比較は行わないようにして良い。   In addition, when the comparison between character data of one recognition area of the first image and one recognition area of the second image is performed, the matching rate of the character data of both is equal to or higher than a predetermined ratio In addition, for each recognition area constituting the set of recognition areas, comparison between character data with other recognition areas may not be performed.

また、第一画像と第二画像とにおいて、文字が配置される認識領域等に大きな変化がない場合には、第一画像内における認識領域と、第二画像内における認識領域との、それぞれの画像内における位置とが互いに重なる認識領域についてだけ、文字データの比較を行うようにしても良い。   In addition, in the first image and the second image, when there is no significant change in the recognition area where the characters are arranged, the recognition area in the first image and the recognition area in the second image The character data may be compared only for the recognition regions that overlap each other in the image.

また、文字データ比較手段134は、形態素解析により第一文字データおよび第二文字データについてそれぞれ得られた形態素または単語を比較して、差異の箇所を検出するようにしても良い。例えば、文字データ比較手段134は、後述する形態素解析手段135が、第一画像および第二画像の各認識領域について文字データ取得手段133が取得した文字データに対して形態素解析を行うことで取得した形態素間を比較して、形態素が一致するか否かを判断する。形態素ごとに比較を行うことで、第二画像における形態素単位の文字の違いを検出することができる。例えば、文字データ比較手段134は、上述したような一文字単位の文字データの比較に代えて、あるいは、文字データの比較に加えて、上記のような形態素または単語による比較を行うようにしても良い。文字データ比較手段134は、例えば、形態素または単語が異なると判断された箇所を示す情報、即ち差異があると判断された箇所を示す情報を、図示しない記憶媒体等に蓄積する。この差異があると判断された箇所を示す情報は、例えば、差異があると判断された1以上の文字データにそれぞれ対応する文字画像の識別情報や、文字画像の位置を示す情報等である。   In addition, the character data comparison unit 134 may compare the morpheme or the word obtained for the first character data and the second character data by the morphological analysis, and detect the difference portion. For example, the character data comparison unit 134 is acquired by a morpheme analysis unit 135 (to be described later) performing morphological analysis on the character data acquired by the character data acquisition unit 133 for each recognition area of the first image and the second image. The morphemes are compared to determine whether the morphemes match. By performing the comparison for each morpheme, it is possible to detect a difference in characters in morpheme units in the second image. For example, the character data comparison unit 134 may perform comparison by morpheme or word as described above instead of or in addition to the character data comparison as described above. . The character data comparison unit 134 accumulates, for example, information indicating a portion determined to have a different morpheme or word, that is, information indicating a portion determined to have a difference in a storage medium (not illustrated). The information indicating the portion determined to have a difference is, for example, identification information of a character image corresponding to one or more character data determined to have a difference, information indicating the position of the character image, or the like.

形態素解析手段135は、文字データ取得手段133が取得した第一文字データおよび第二文字データについてそれぞれ形態素解析を行う。形態素解析については、公知の技術であるのでここでは詳細な説明は省略する。なお、形態素解析のシステムとしては、例えば、「"Mecab(和布蕪)"[平成24年2月28日検索]、インターネット(URL:http://mecab.googlecode.com/svn/trunk/mecab/doc/index.html)」や、「"ChaSen(茶筌)"、[平成24年2月28日検索]、インターネット(URL:http://chasen-legacy.sourceforge.jp/)」等が利用可能である。また、文字列から単語を取得する処理等としては、コンピュータ等で利用される日本語入力システム等の技術として公知の技術である。   The morpheme analysis unit 135 performs morpheme analysis on the first character data and the second character data acquired by the character data acquisition unit 133, respectively. Since morphological analysis is a known technique, a detailed description thereof is omitted here. As a morphological analysis system, for example, ““ Mecab ”(searched on February 28, 2012), Internet (URL: http://mecab.googlecode.com/svn/trunk/mecab/ doc / index.html), "" ChaSen ", [Search February 28, 2012], Internet (URL: http://chasen-legacy.sourceforge.jp/) It is. The processing for acquiring words from a character string is a known technique as a technique for a Japanese input system used in a computer or the like.

形態素解析手段135は、通常、MPUやメモリ等から実現され得る。形態素解析手段135の処理手順は、通常、ソフトウェアで実現され、当該ソフトウェアはROM等の記録媒体に記録されている。但し、ハードウェア(専用回路)で実現しても良い。   The morphological analysis unit 135 can be usually realized by an MPU, a memory, or the like. The processing procedure of the morphological analysis unit 135 is usually realized by software, and the software is recorded in a recording medium such as a ROM. However, it may be realized by hardware (dedicated circuit).

対応判断手段136は、レイアウト認識手段131が第一画像について認識した1以上の認識領域と、第二画像について認識した1以上の認識領域との対応関係を判断する。例えば、対応判断手段136は、文字データ比較手段134が、第一画像において認識された1以上の認識領域と、第二画像において認識された1以上の認識領域との組合せについて行った、各認識領域間の第一文字データと第二文字データとを比較して差異の箇所を検出する処理の検出結果に応じて、対応関係を判断する。例えば、第一画像の認識領域と第二画像の認識領域との組合せについて行われた第一文字データと第二文字データの差異の箇所の検出処理において、検出された差異の箇所の数または比率が最も少なかった第一画像の認識領域と第二画像の認識領域との組み合わせが、対応する認識領域であると判断する。あるいは、形態素または単語の比較において、一致しない形態素や単語が検出された数または比率が最も小さかった認識領域の組合せを、対応する認識領域と判断しても良い。   The correspondence determining unit 136 determines a correspondence relationship between one or more recognition regions recognized by the layout recognition unit 131 for the first image and one or more recognition regions recognized for the second image. For example, the correspondence determining unit 136 performs each recognition performed by the character data comparing unit 134 on a combination of one or more recognition regions recognized in the first image and one or more recognition regions recognized in the second image. Correspondence is determined according to the detection result of the process of comparing the first character data and the second character data between the regions to detect the difference. For example, in the detection process of the difference part between the first character data and the second character data performed for the combination of the recognition area of the first image and the recognition area of the second image, the number or ratio of the detected difference parts is It is determined that the combination of the recognition area of the first image and the recognition area of the second image that is the smallest is the corresponding recognition area. Alternatively, in the comparison of morphemes or words, a combination of recognition areas having the smallest number or ratio of detected morphemes or words that are not matched may be determined as the corresponding recognition areas.

また、対応判断手段136は、第一画像と第二画像の認識領域間の1以上の文字データの類似度を取得して、この類似度が最も高い認識領域が対応する認識領域であると判断するようにしても良い。類似の判断は、例えば、動的計画法による文字列類似度計算等を行うことにより類似度を算出することで判断可能である。文字列間の類似度の計算については、以下の文献を参考にされたい「"付録A符号列の比較と照合"、[平成24年2月29日検索]、インターネット(URL:http://sslab.nuee.nagoya-u.ac.jp/~sato/lec/kisoron2/string.pdf)」。また、上記の方法の他に、N-gramを利用して領域間の類似度を判断しても良い。N-gramに関しては、以下の文献を参照されたい「"N-gramモデルを利用したテキスト分析"、[平成24年2月29日検索]、インターネット(URL:http://www.shuiren.org/chuden/teach/n-gram/index-j.html)」。   Further, the correspondence determining unit 136 acquires the similarity of one or more character data between the recognition areas of the first image and the second image, and determines that the recognition area having the highest similarity is the corresponding recognition area. You may make it do. Similarity determination can be made, for example, by calculating similarity by performing character string similarity calculation by dynamic programming. For the calculation of the similarity between character strings, refer to the following document “Appendix A Code String Comparison and Matching”, [February 29, 2012 Search], Internet (URL: http: // sslab.nuee.nagoya-u.ac.jp/~sato/lec/kisoron2/string.pdf) ". In addition to the above method, the similarity between regions may be determined using an N-gram. Regarding N-grams, refer to the following documents: "" Text analysis using N-gram model ", [February 29, 2012 search], Internet (URL: http://www.shuiren.org) /chuden/teach/n-gram/index-j.html) ".

また、対応判断手段136は、第一画像と第二画像との認識領域間で第一文字画像と第二文字画像の数(あるいは、文字コードの数)を比較して、数が同じである認識領域、あるいは、数が最も近い認識領域間を対応する認識領域と判断するようにしてもよい。   In addition, the correspondence determining unit 136 compares the numbers of the first character image and the second character image (or the number of character codes) between the recognition regions of the first image and the second image, and recognizes that the numbers are the same. You may make it judge the recognition area corresponding between the area | regions or the recognition area | regions with the nearest number.

なお、対応判断手段136は、結果的に、第一画像において検出された認識領域の全てと、第二画像において検出された認識領域の全てとが、それぞれ一対一で対応させるようにすることが好ましい。   Note that, as a result, the correspondence determining unit 136 may cause all of the recognition regions detected in the first image to correspond to all of the recognition regions detected in the second image on a one-to-one basis. preferable.

文字画像比較手段137は、第一画像から取得した文字の画像である1以上の第一文字画像と、第二画像から取得した文字の画像である1以上の第二文字画像とを比較して、差異の箇所を検出する。文字画像比較手段137は、具体的には、第一画像と第二画像とをそれぞれ構成する画素の輝度値の差を閾値と比較して差異の箇所を検出する。この閾値としては、例えば、後述する閾値格納手段138に格納されている閾値が用いられる。この閾値については後述する。文字画像比較手段137は、例えば、対応判断手段136が対応すると判断した第一画像の認識領域と、第二画像の認識領域とから文字データ取得手段133が取得した第一文字データと第二文字データとを比較して差異の箇所を検出する。ここでは、例えば、文字データ比較手段134が二つの認識領域間にそれぞれ含まれる文字画像に対応する文字データの比較を行っているため、各認識領域内の、文字データの一致する箇所は予め分かっている。このため、第一画像と第二画像との文字データの一致、不一致が認識されていると判断された箇所を基準として、それぞれの認識領域から、文字データに対応する文字画像を一文字ずつ文字画像取得手段132に取得させ、文字画像比較手段137は、取得された文字画像を比較して、差異の箇所を検出する。   The character image comparison unit 137 compares one or more first character images, which are character images acquired from the first image, with one or more second character images, which are character images acquired from the second image, Detect differences. Specifically, the character image comparison unit 137 detects a difference portion by comparing a difference in luminance value between pixels constituting the first image and the second image with a threshold value. As this threshold value, for example, a threshold value stored in threshold value storage means 138 described later is used. This threshold will be described later. For example, the character image comparison unit 137 includes the first character data and the second character data acquired by the character data acquisition unit 133 from the recognition area of the first image determined to be supported by the correspondence determination unit 136 and the recognition area of the second image. And detect the difference. Here, for example, since the character data comparison unit 134 compares character data corresponding to character images included between the two recognition areas, the matching positions of the character data in each recognition area are known in advance. ing. For this reason, character images corresponding to the character data are character-by-character character-by-character from each recognition area with reference to a position where it is determined that the character data matches or does not match between the first image and the second image. The character image comparison unit 137 detects the difference portion by comparing the acquired character images.

差異の箇所の検出は、例えば、第一文字画像と第二文字画像とのサイズや形状等をサイズ変更を行うことによって揃え、揃えた第一文字画像と第二文字画像とを重ねた場合に対応する(重なりあう)画素間の画素値(例えば、輝度値)を比較することにより行われる。例えば、画素値の差が、閾値以上である部分は、差異の箇所であると判断され、閾値未満である部分は、差異のない箇所であると判断される。また、差異のある画素や画素群の数や比率によって、第一文字画像と第二文字画像とが一致するか否かを判断する。即ち、比較した第一文字画像と、第二文字画像とが、第一画像と第二画像の差異の箇所であるか否かを判断する。例えば、差異のある画素数や、差異のある画素の文字画像全体の画素に対する比率が、予め指定された閾値を超える場合に、なお、第一文字画像と第二文字画像との比較は、画素単位で行わなくても良く、例えば、複数の画素で構成されるブロック単位等で比較が行われても良い。この場合、例えば、複数の画素値の平均値等の、複数の画素値を統計処理した値を比較するようにしても良い。   The detection of the difference portion corresponds to, for example, the case where the first character image and the second character image are aligned by changing the size or shape of the first character image and the aligned first character image and the second character image. This is done by comparing pixel values (for example, luminance values) between (overlapping) pixels. For example, a portion where the difference in pixel values is greater than or equal to the threshold is determined to be a difference portion, and a portion where the difference is less than the threshold is determined to be a portion having no difference. Further, it is determined whether or not the first character image and the second character image match based on the number and ratio of the pixels or pixel groups having the difference. That is, it is determined whether or not the compared first character image and second character image are a difference between the first image and the second image. For example, when the number of pixels having a difference or the ratio of pixels having a difference to the pixels of the entire character image exceeds a predetermined threshold value, the comparison between the first character image and the second character image is performed in pixel units. For example, the comparison may be performed in units of blocks including a plurality of pixels. In this case, for example, a value obtained by statistically processing a plurality of pixel values such as an average value of a plurality of pixel values may be compared.

文字画像比較手段137は、一致しないと判断された第二文字画像、または第一文字画像を示す情報(例えば、これらの画像の座標や識別情報)を、図示しない記憶媒体に蓄積する。また、文字画像比較手段137は、検出した差異のある箇所を示す情報(例えば、座標)等を、図示しない記憶媒体等に蓄積するようにしても良い。また、同様に、一致すると判断された第二文字画像と第一文字画像とを示す情報(例えば、一致すると判断された第一文字画像と第二文字画像とのそれぞれの識別情報や、それぞれの座標等)を、図示しない記憶媒体に蓄積するようにしてもよい。また、文字画像比較手段137は、差異のない箇所を示す情報を、図示しない記憶媒体等に蓄積するようにしてもよい。
上記で行われた文字データ比較手段134による比較は、第一画像や第二画像からOCRで取得された文字データの比較であるが、OCRは、複数の文字データの候補から、一の候補を提示するものであることから、必ずしも、画像内の文字を正確にしめすものではないため、文字データ比較手段134で比較した後、文字画像比較手段137で比較を行うことで、より正確な比較を行うことができる。
The character image comparison unit 137 accumulates information indicating the second character image determined not to match or the first character image (for example, coordinates and identification information of these images) in a storage medium (not shown). Further, the character image comparison unit 137 may accumulate information (for example, coordinates) indicating a detected difference portion in a storage medium (not shown) or the like. Similarly, information indicating the second character image and the first character image determined to match (for example, the identification information of each of the first character image and the second character image determined to match, the respective coordinates, etc. ) May be stored in a storage medium (not shown). Further, the character image comparison unit 137 may store information indicating a portion having no difference in a storage medium (not shown) or the like.
The comparison by the character data comparison unit 134 performed as described above is a comparison of character data acquired by OCR from the first image or the second image. The OCR selects one candidate from a plurality of character data candidates. Since it is presented, it does not necessarily indicate the accuracy of the characters in the image. Therefore, after comparing with the character data comparing means 134, comparing with the character image comparing means 137 allows more accurate comparison. It can be carried out.

閾値格納手段138は、文字画像比較手段137が第一文字画像の画素と、第二文字画像の画素とが一致するか否かを判断するために用いられる閾値が格納される。閾値は、例えば、輝度値やCMYK値等の画素値である。例えば、デフォルト等で予め指定された閾値が格納される。また、後述する閾値設定手段139が設定した閾値が蓄積されるようにしてもよい。また、後述する閾値受付部14がユーザ等から受け付けた閾値が蓄積されてもよい。ここでの格納は、一時記憶も含む概念である。閾値格納手段138は、不揮発性の記録媒体が好適であるが、揮発性の記録媒体でも実現可能である。   The threshold storage unit 138 stores a threshold used by the character image comparison unit 137 to determine whether or not the pixel of the first character image matches the pixel of the second character image. The threshold is, for example, a pixel value such as a luminance value or a CMYK value. For example, a threshold value designated in advance by default or the like is stored. Further, the threshold value set by the threshold value setting means 139 described later may be accumulated. Further, threshold values received from a user or the like by a threshold receiving unit 14 described later may be accumulated. The storage here is a concept including temporary storage. The threshold storage means 138 is preferably a non-volatile recording medium, but can also be realized by a volatile recording medium.

閾値設定手段139は、第一画像と第二画像とをそれぞれ構成する画素の輝度値の差の出現状況に応じて、第一文字画像の画素と、第二文字画像の画素とが一致するか否かを判断するために用いられる閾値を設定する。そして、設定した閾値を閾値格納手段138に蓄積する。閾値設定手段139は、統計処理することで得られた値を閾値に設定する。例えば、第一画像と第二画像とをそれぞれ構成する複数の画素の輝度値の差の平均値や、中央値等を閾値に設定する。また、例えば、第一画像と第二画像との対応する認識領域内におけるそれぞれの画像を構成する画素の輝度値の差の平均値や、中央値等を閾値に設定してもよい。また、比較しようとする第一文字画像と第二文字画像内の画素、あるいは、その周辺の予め指定されたサイズの領域も含めた領域内の画素の輝度値の差の平均値や中央値等を閾値に用いてもよい。また、第一画像と第二画像内(あるいは、それらの対応する領域内等)に含まれる画素間の輝度値の差をある閾値で二つのクラスに分割した場合に、クラス間分散が最も大きくなるような閾値を取得して設定するようにしてもよい。また、画素間の輝度値の差の平均値を用いる代わりに、各画像の画素の輝度値の平均値の差を閾値等に用いてもよい。   The threshold value setting unit 139 determines whether the pixel of the first character image and the pixel of the second character image match according to the appearance situation of the difference in luminance value of the pixels constituting the first image and the second image, respectively. A threshold value used to determine whether is set. Then, the set threshold value is accumulated in the threshold value storage means 138. The threshold value setting means 139 sets a value obtained by statistical processing as a threshold value. For example, an average value or a median value of differences in luminance values of a plurality of pixels constituting the first image and the second image is set as a threshold value. In addition, for example, an average value, a median value, or the like of a difference between luminance values of pixels constituting each image in a corresponding recognition area between the first image and the second image may be set as a threshold value. In addition, the average value or the median value of the difference in luminance values of the pixels in the first character image and the second character image to be compared, or the pixels in the area including the area of a predetermined size around the first character image and the second character image. You may use for a threshold. In addition, when the difference in luminance value between pixels contained in the first image and the second image (or in the corresponding area thereof) is divided into two classes with a certain threshold, the interclass variance is the largest. Such a threshold value may be acquired and set. Further, instead of using the average value of the luminance value differences between the pixels, the average value difference of the luminance values of the pixels of each image may be used as a threshold value or the like.

入替検出手段140は、第一文字画像に対して第二文字画像の文字が入れ替わっている箇所を検出する。例えば、入替検出手段140は、文字画像比較手段137が差異のある箇所として検出した箇所のうちの、一致しない第一文字画像または一致しない第二文字画像が、二つ以上連続して並んでいる箇所を検出し、この検出した箇所の連続した二以上の第二文字画像を異なる順番で並べて順列を生成する。そして、生成した順列と、並べ替えをおこなっていない二以上の第一文字画像とを、一文字ごとに比較し、上記と同様に、一致しているか否かを判断していく。そして、生成した順列のうちの一つを構成する二以上の第二文字画像のそれぞれが、並べ替えをおこなっていない二以上の第一文字画像のそれぞれと一致していると判断された場合に、この複数の第一文字画像と第二文字画像とが一致しなかった箇所を、第一画像に対して第二画像の文字列が入れ替わっている箇所として検出する。そして、検出した箇所を示す情報(例えば、検出された二以上の第二文字画像の識別情報や、二以上の第二文字画像が配置されていた位置や領域の情報)を、図示しない記憶媒体等に蓄積する。なお、ここでは、第二文字画像を並べ替えた順列を用いた場合について説明したが、第一文字画像を並べた順列を用いてもよい。また、他の方法によって、文字列の入れ替わった箇所を検出してもよい。また、一致しない第一文字画像または第二文字画像が連続している箇所を検出する際においては、改行を挟む場合も、文字画像が連続して並んでいると判断してよい。   The replacement detection unit 140 detects a place where the character of the second character image is replaced with respect to the first character image. For example, the replacement detection means 140 is a place where two or more consecutive non-matching first character images or non-matching second character images are continuously arranged among the places detected by the character image comparison means 137 as differences. Are detected, and two or more second character images in which the detected portions are continuously arranged are arranged in a different order to generate a permutation. Then, the generated permutation and the two or more first character images that have not been rearranged are compared for each character, and it is determined whether or not they match as described above. Then, when it is determined that each of the two or more second character images constituting one of the generated permutations matches each of the two or more first character images that have not been rearranged, A portion where the plurality of first character images and the second character image do not match is detected as a portion where the character string of the second image is replaced with respect to the first image. Then, information indicating the detected location (for example, identification information of two or more detected second character images and information on positions or areas where the two or more second character images are arranged) is not shown. Accumulate in etc. In addition, although the case where the permutation which rearranged the 2nd character image was used was demonstrated here, the permutation which arranged the 1st character image may be used. Moreover, you may detect the location where the character string was replaced by another method. Moreover, when detecting the location where the 1st character image or 2nd character image which does not correspond is detected, you may determine that the character image is located in a line also when inserting a new line.

なお、ここでは、文字画像比較手段137の比較結果を利用して文字列が入れ替わっている箇所を検出するようにしたが、文字データ比較手段134の比較結果を利用して文字列が入れ替わっている箇所を検出するようにしてもよい。かかることは、以下の追加検出手段141及び削除検出手段142についても同様である。   Here, the place where the character string is replaced is detected using the comparison result of the character image comparing means 137, but the character string is replaced using the comparison result of the character data comparing means 134. You may make it detect a location. The same applies to the following addition detection means 141 and deletion detection means 142.

追加検出手段141は、第一文字画像に対して第二文字画像の1以上の文字が追加されている箇所を検出する。なお、ここでの、第一文字画像に対する第二文字画像の追加されている箇所とは、第二文字画像に対する第一文字画像の削除されている箇所と考えても良い。例えば、追加検出手段141は、文字画像比較手段137が差異のある箇所として検出した箇所のうちの、対応する第一文字画像が存在しなかった第二文字画像が配置されている箇所を検出する。そして、追加検出手段141は、この第二文字画像を示す情報(例えば、第二文字画像の識別情報や、座標等)を、文字が追加された箇所を示す情報として取得する。   The addition detection unit 141 detects a place where one or more characters of the second character image are added to the first character image. Here, the portion where the second character image is added to the first character image may be considered as the portion where the first character image is deleted from the second character image. For example, the additional detection unit 141 detects a place where the second character image in which the corresponding first character image does not exist among the places detected by the character image comparison unit 137 as a difference. And the addition detection means 141 acquires the information (for example, identification information of a 2nd character image, a coordinate, etc.) which shows this 2nd character image as information which shows the location where the character was added.

削除検出手段142は、第一文字画像に対して第二文字画像の1以上の文字が削除されている箇所を検出する。なお、ここでの、第一文字画像に対する第二文字画像の削除されている箇所とは、第二文字画像に対する第一文字画像の削除されている箇所と考えても良い。例えば、削除検出手段142は、対応する第二文字画像が存在しなかった第一文字画像を検出する。そして、削除検出手段142は、この第一文字画像を示す情報(例えば、第一文字画像の識別情報や、座標等)を、文字が削除された箇所を示す情報として取得する。   The deletion detection unit 142 detects a location where one or more characters of the second character image are deleted from the first character image. Here, the portion where the second character image is deleted from the first character image may be considered as the portion where the first character image is deleted from the second character image. For example, the deletion detection unit 142 detects a first character image in which no corresponding second character image exists. Then, the deletion detection unit 142 acquires information indicating the first character image (for example, identification information and coordinates of the first character image) as information indicating a location where the character is deleted.

閾値受付部14は、文字画像比較手段137が第一文字画像の画素と、第二文字画像の画素とが一致するか否かを判断するために用いられる閾値を受け付ける。例えば、ユーザ等が、図示しない入力手段等を介して入力する閾値を受け付ける。閾値受付部14は、受け付けた閾値を、閾値格納手段138に蓄積する。閾値の入力手段は、テンキーやキーボードやマウスやメニュー画面によるもの等、何でも良い。閾値受付部14は、テンキーやキーボード等の入力手段のデバイスドライバーや、メニュー画面の制御ソフトウェア等で実現され得る。   The threshold reception unit 14 receives a threshold used by the character image comparison unit 137 to determine whether or not the first character image pixel matches the second character image pixel. For example, a threshold value input by a user or the like via an input unit (not shown) or the like is received. The threshold reception unit 14 accumulates the received threshold in the threshold storage unit 138. The threshold value input means may be anything such as a numeric keypad, a keyboard, a mouse, or a menu screen. The threshold reception unit 14 can be realized by a device driver for input means such as a numeric keypad or a keyboard, control software for a menu screen, or the like.

評価結果受付部15は、後述する出力部18が出力する1以上の差異の箇所に対するユーザの評価結果を受け付ける。具体的には、評価結果受付部15は、出力された差異の箇所あるいは差異ではない箇所が、実際に差異の箇所であるか否かを示す評価結果を、各差異の箇所について受け付ける。例えば、出力部18が、第一文字画像と第二文字画像とが一致しない箇所を、差異の箇所ではない箇所として示している場合に、この箇所に対して、マウスやタッチパネル等を利用して、差異の箇所であることを指定した場合に、評価結果受付部15は、この箇所について、差異の箇所であるという評価結果を受け付ける。また、出力部18が、第一文字画像と第二文字画像とが一致する箇所を、差異の箇所として示している場合に、この箇所に対して、マウスやタッチパネル等を利用して、差異の箇所ではないことを指定した場合に、評価結果受付部15は、指定された差異の箇所が差異の箇所でないという評価結果を受け付ける。また、差異の箇所として正しく示された箇所について、差異の箇所であることを示す評価結果を受け付けるようにしてもよい。   The evaluation result receiving unit 15 receives a user evaluation result for one or more differences output from the output unit 18 described later. Specifically, the evaluation result receiving unit 15 receives an evaluation result indicating whether or not the outputted difference portion or a portion that is not a difference is actually a difference portion, for each difference portion. For example, when the output unit 18 indicates a portion where the first character image and the second character image do not coincide with each other as a portion that is not a difference portion, for this portion, using a mouse, a touch panel, or the like, When designating that it is a difference part, the evaluation result reception part 15 receives the evaluation result that it is a difference part about this part. In addition, when the output unit 18 indicates a part where the first character image and the second character image match as a part of the difference, the part of the difference is used with respect to this part using a mouse, a touch panel, or the like. When it is specified that the difference is not, the evaluation result receiving unit 15 receives the evaluation result that the specified difference portion is not the difference portion. Moreover, you may make it receive the evaluation result which shows that it is a difference location about the location correctly shown as a difference location.

入力手段は、テンキーやキーボードやマウスやメニュー画面によるもの等、何でも良い。評価結果受付部15は、テンキーやキーボード等の入力手段のデバイスドライバーや、メニュー画面の制御ソフトウェア等で実現され得る。   The input means may be anything such as a numeric keypad, keyboard, mouse or menu screen. The evaluation result receiving unit 15 can be realized by a device driver for input means such as a numeric keypad or a keyboard, control software for a menu screen, or the like.

輝度値取得部16は、評価結果受付部15が受け付けた各評価結果に対応する差異の箇所についての、第一文字画像と第二文字画像との輝度値に関する情報を取得する。ここで取得する輝度値に関する情報は、例えば、評価結果を受け付けた箇所に位置する第一文字画像と第二文字画像との対応する各画素の輝度値の差の集合や、これらの輝度値の差を統計処理して得られた値(例えば平均値や、中央値、最大値、最小値、最も出現頻度の高い値等)である。また、評価結果を受け付けた箇所に位置する第一文字画像と第二文字画像とのそれぞれの画素の輝度値の値や、各文字画像を構成する1以上について得られた輝度値を上記と同様の統計処理して得られた値である。この輝度値に関する値は、複数種類の値であっても良い。また、この輝度値に関する値は、評価結果を受け付けた箇所に位置する第一文字画像と第二文字画像との対応する各画素間の輝度値の差に関する値でも良い。ここで取得する輝度値に関する値は、例えば、後述する閾値取得部17がどのような機械学習を行って、どのように閾値を設定するかによって異なる。   The luminance value acquisition unit 16 acquires information related to the luminance values of the first character image and the second character image for the difference portion corresponding to each evaluation result received by the evaluation result receiving unit 15. The information about the brightness value acquired here is, for example, a set of differences in brightness values of corresponding pixels between the first character image and the second character image located at the location where the evaluation result is received, or the difference between these brightness values. (For example, an average value, a median value, a maximum value, a minimum value, a value having the highest appearance frequency, etc.). Further, the luminance value of each pixel of the first character image and the second character image located at the location where the evaluation result is received, and the luminance value obtained for one or more constituting each character image are the same as described above. This is a value obtained by statistical processing. The value relating to the luminance value may be a plurality of types of values. Further, the value relating to the luminance value may be a value relating to a difference in luminance value between corresponding pixels of the first character image and the second character image located at the location where the evaluation result is received. The value relating to the luminance value acquired here differs depending on, for example, what kind of machine learning the threshold acquisition unit 17 described later performs and how to set the threshold.

輝度値取得部16は、通常、MPUやメモリ等から実現され得る。輝度値取得部16の処理手順は、通常、ソフトウェアで実現され、当該ソフトウェアはROM等の記録媒体に記録されている。但し、ハードウェア(専用回路)で実現しても良い。   The luminance value acquisition unit 16 can usually be realized by an MPU, a memory, or the like. The processing procedure of the luminance value acquisition unit 16 is usually realized by software, and the software is recorded in a recording medium such as a ROM. However, it may be realized by hardware (dedicated circuit).

閾値取得部17は、評価結果受付部15が受け付けた評価結果と、評価結果に対応する箇所について(具体的には、第一文字画像と第二文字画像とについて)輝度値取得部16が取得した輝度値に関する情報と、この第一文字画像と第二文字画像とを比較する際に文字画像比較手段137が利用した閾値との組合せを学習データとして用いて学習を行う。なお、学習データを用いた学習については、SVR等の学習モデルが、公知技術として利用可能である。この場合、学習データは教師データと考えてもよい。ただし、学習はどのように行うようにしても良い。例えば、誤りであることを示す評価結果が得られた場合に、評価に用いられた閾値を、正しい評価が得られる方向の値に変動させていくことで、閾値を学習させるようにしても良い。例えば、一の輝度値で評価した場合に、異なる文字であると判断された文字間について、評価が誤っているという評価結果を受け付けた場合、この閾値の値を予め指定された値だけ下げたり上げたりしていくことで、最適な閾値を学習させるようにしても良い。閾値取得部17は、学習によって取得した閾値を閾値格納手段138に蓄積する。   The threshold value acquisition unit 17 acquires the evaluation result received by the evaluation result reception unit 15 and the location corresponding to the evaluation result (specifically, the first character image and the second character image) by the luminance value acquisition unit 16. Learning is performed by using, as learning data, a combination of information relating to the luminance value and a threshold value used by the character image comparison unit 137 when comparing the first character image and the second character image. For learning using learning data, a learning model such as SVR can be used as a known technique. In this case, the learning data may be considered as teacher data. However, learning may be performed in any way. For example, when an evaluation result indicating an error is obtained, the threshold value may be learned by changing the threshold value used for the evaluation to a value in a direction in which a correct evaluation can be obtained. . For example, when an evaluation result indicating that the evaluation is incorrect is received between characters determined to be different characters when evaluated with one luminance value, the threshold value may be decreased by a predetermined value. The optimum threshold value may be learned by increasing it. The threshold acquisition unit 17 accumulates the threshold acquired by learning in the threshold storage unit 138.

閾値取得部17の学習結果を利用して閾値を利用する場合について以下に説明する。文字画像比較手段137が一の組の第一文字画像と第二文字画像との比較を行う直前に、上述した輝度値取得部16がこの第一文字画像と第二文字画像とから上記と同様の輝度値に関する情報を取得するようにする。そして、この輝度値に関する情報が、閾値取得部17に入力されるようにする。閾値取得部17は、この輝度値に関する情報を用いて、複数の閾値のそれぞれを用いて文字画像比較手段137が評価を行った場合に、どのような評価結果(即ち、文字画像比較手段137の判断結果が、正しいものであるか否かを示す値)が得られるかを、学習結果を用いて取得する。そして、文字画像比較手段137の判断結果が正しくなる閾値の一つ(例えば最も低い閾値)を取得して、閾値格納手段138に蓄積する。そして、文字画像比較手段137は、この閾値を用いて、上記の一の組の第一文字画像と第二文字画像との比較を行うようにする。   A case where the threshold is used by using the learning result of the threshold acquisition unit 17 will be described below. Immediately before the character image comparison unit 137 compares the first character image and the second character image in one set, the luminance value acquisition unit 16 described above obtains the same luminance as described above from the first character image and the second character image. Get information about values. Then, information regarding the luminance value is input to the threshold value acquisition unit 17. The threshold acquisition unit 17 uses the information on the brightness value to evaluate what evaluation result (that is, the character image comparison unit 137 does when the character image comparison unit 137 performs evaluation using each of the plurality of threshold values. Whether the determination result is a correct value) is obtained using the learning result. Then, one of the threshold values (for example, the lowest threshold value) at which the determination result of the character image comparison unit 137 is correct is acquired and accumulated in the threshold value storage unit 138. Then, the character image comparison means 137 uses the threshold value to compare the first character image and the second character image of the one set.

閾値取得部17は、通常、MPUやメモリ等から実現され得る。閾値取得部17の処理手順は、通常、ソフトウェアで実現され、当該ソフトウェアはROM等の記録媒体に記録されている。但し、ハードウェア(専用回路)で実現しても良い。   The threshold acquisition unit 17 can usually be realized by an MPU, a memory, or the like. The processing procedure of the threshold acquisition unit 17 is usually realized by software, and the software is recorded in a recording medium such as a ROM. However, it may be realized by hardware (dedicated circuit).

出力部18は、検出部13が検出した差異の箇所を示す情報を出力する。差異の箇所を示す情報を出力するとは、例えば、第一画像や第二画像、あるいはその一部に対して、差異が検出された箇所を、差異が検出されなかった箇所と異なる出力態様で出力することである。例えば、差異が検出された第一文字画像あるいは第二文字画像を、他の文字画像とは異なる出力態様で出力することである。出力態様が異なるとは、出力する文字画像の背景色が異なることや、出力する文字画像に、他の色の画像を合成して(例えばオーバーレイして)出力することや出力と文字画像を、予め指定されたパターンの線等で囲って出力することである。例えば、差異が検出された第一文字画像や第二文字画像を、他とは異なる色の画像と合成して出力する。また、差異の箇所を示す情報を出力するということは、差異の箇所を、座標等で指定する情報を出力することであってもよい。出力が表示である場合、出力態様は表示態様と考えても良い。なお、出力部18は、第二画像や第一画像のレイアウト認識手段131が認識した認識領域のうちの、差異の箇所を含む認識領域を、他とは異なる出力態様で出力しても良い。   The output unit 18 outputs information indicating the location of the difference detected by the detection unit 13. Outputting the information indicating the location of the difference is, for example, outputting the location where the difference is detected in a different output mode from the location where the difference was not detected for the first image, the second image, or a part thereof. It is to be. For example, the first character image or the second character image in which the difference is detected is output in an output mode different from other character images. When the output mode is different, the background color of the output character image is different, the image of the other color is combined with the output character image (for example, by overlaying), the output and the character image are output, It is to output by surrounding with a line of a pattern designated in advance. For example, a first character image or a second character image in which a difference is detected is combined with an image having a different color and output. Further, outputting the information indicating the difference portion may mean outputting information specifying the difference portion with coordinates or the like. When the output is a display, the output mode may be considered as a display mode. Note that the output unit 18 may output a recognition area including a different portion of the recognition areas recognized by the layout recognition unit 131 of the second image or the first image in an output mode different from the others.

出力部18は、例えば、文字画像比較手段137が差異の箇所として検出した箇所を示す情報を出力する。また、出力部18は、例えば、入替検出手段140が検出した文字列が入れ替わっている箇所を示す情報を出力する。また、出力部18は、追加検出手段141が検出した文字が追加されている箇所を示す情報を出力する。また、出力部18は、削除検出手段142が検出した文字が削除されている箇所を示す情報を出力する。なお、出力部18は、文字データ比較手段134が文字コードについて検出した差異の箇所を示す情報を出力してもよい。また、出力部18は、文字データ比較手段134が形態素解析を利用して検出した形態素または単語についての差異がある箇所を示す情報を出力するようにしてもよい。なお、出力部18は、異なる検出が行われた箇所を、異なる出力態様で出力するようにしても良い。例えば、入替検出手段140が検出した文字列が入れ替わっている箇所と、追加検出手段141が検出した文字が追加されている箇所とを異なる出力態様で出力しても良い。異なる出力態様とは、視覚等で識別可能となるような出力態様(例えば、表示態様)で出力することであり、例えば、異なる色やパターンをオーバーレイ表示したり、異なる色やパターンの線で囲って表示したり、異なる色やパターンの下線等を出力することである。   For example, the output unit 18 outputs information indicating a part detected by the character image comparison unit 137 as a difference part. Moreover, the output part 18 outputs the information which shows the location where the character string detected by the replacement detection means 140 is replaced, for example. Further, the output unit 18 outputs information indicating a location where the character detected by the addition detection unit 141 is added. Further, the output unit 18 outputs information indicating a location where the character detected by the deletion detection unit 142 is deleted. The output unit 18 may output information indicating the location of the difference detected by the character data comparison unit 134 for the character code. Further, the output unit 18 may output information indicating a portion where there is a difference between morphemes or words detected by the character data comparison unit 134 using morpheme analysis. Note that the output unit 18 may output portions where different detections are performed in different output modes. For example, the part where the character string detected by the replacement detection unit 140 is switched and the part where the character detected by the addition detection unit 141 is added may be output in different output modes. A different output mode means output in an output mode (for example, a display mode) that can be visually identified. For example, different colors and patterns are overlaid or surrounded by lines of different colors and patterns. Or display underline of different colors or patterns.

ここで述べる出力とは、ディスプレイへの表示、プロジェクターを用いた投影、プリンタへの印字、外部の装置への送信、記録媒体への蓄積、他の処理装置や他のプログラムなどへの処理結果の引渡しなどを含む概念である。出力部18は、ディスプレイやスピーカー等の出力デバイスを含むと考えても含まないと考えても良い。出力部18は、出力デバイスのドライバーソフトまたは、出力デバイスのドライバーソフトと出力デバイス等で実現され得る。   The output described here means display on a display, projection using a projector, printing on a printer, transmission to an external device, storage on a recording medium, processing result to other processing devices or other programs, etc. It is a concept that includes delivery. The output unit 18 may or may not include an output device such as a display or a speaker. The output unit 18 may be implemented by output device driver software, or output device driver software and an output device.

次に、画像検査装置1の動作について図5のフローチャートを用いて説明する。ここでは、第一画像格納部11と第二画像格納部12とには、比較の対象となる第一画像と第二画像とがそれぞれ予め格納されているものとする。また、ここでは一例として、第一画像は、文字データを含む画像データであるとし、第一画像格納部11には、第一画像と、第一画像内から抽出された第一文字データとが対応付けて格納されているものとする。また、抽出された文字データは、第一画像内のそれぞれが格納されていた領域(例えば、テキストボックス)等の識別情報と対応付けて第一画像格納部11に格納されているものとする。   Next, the operation of the image inspection apparatus 1 will be described using the flowchart of FIG. Here, it is assumed that the first image storage unit 11 and the second image storage unit 12 store a first image and a second image to be compared in advance. Further, as an example here, the first image is image data including character data, and the first image and the first character data extracted from the first image correspond to the first image storage unit 11. It is assumed that it is stored with the attached. Further, it is assumed that the extracted character data is stored in the first image storage unit 11 in association with identification information such as an area (for example, a text box) in which each of the first images is stored.

(ステップS401)レイアウト認識手段131は、第一画像格納部11に格納されている第一画像に対するレイアウト認識の処理を行う。ここで行われるレイアウト認識の処理は、例えば、図2で示した処理と同様の処理である。レイアウト認識手段131は、認識した1以上の認識領域を定義する情報を、第一画像の識別情報(例えば、ファイル名等)と、認識領域の識別情報とに対応付けて、図示しない記憶媒体等に蓄積する。   (Step S <b> 401) The layout recognition unit 131 performs layout recognition processing on the first image stored in the first image storage unit 11. The layout recognition process performed here is, for example, the same process as the process shown in FIG. The layout recognizing unit 131 associates information defining one or more recognized recognition areas with identification information (for example, a file name) of the first image and identification information of the recognition area, and a storage medium (not shown). To accumulate.

(ステップS402)レイアウト認識手段131は、第二画像格納部12に格納されている第二画像に対するレイアウト認識の処理を行う。ここで行われるレイアウト認識の処理は、例えば、図2で示した処理と同様の処理である。レイアウト認識手段131は、認識した1以上の認識領域を定義する情報を、第二画像の識別情報と、認識領域の識別情報とに対応付けて、図示しない記憶媒体等に蓄積する。   (Step S <b> 402) The layout recognition unit 131 performs layout recognition processing on the second image stored in the second image storage unit 12. The layout recognition process performed here is, for example, the same process as the process shown in FIG. The layout recognizing unit 131 stores information defining one or more recognized recognition areas in a storage medium or the like (not shown) in association with the identification information of the second image and the identification information of the recognition area.

(ステップS403)文字画像取得手段132は、第二画像の各認識領域について、それぞれ、一文字ごとの文字画像である1以上の第二文字画像を検出し、取得する。検出した各第二文字画像が配置されている領域を示す情報(例えば、各第二文字画像のコーナーの座標を示す情報等)には、第二文字画像の識別情報を付与して図示しない記憶媒体に蓄積する。   (Step S403) The character image acquisition means 132 detects and acquires one or more second character images, which are character images for each character, for each recognition area of the second image. Information indicating the area where each detected second character image is arranged (for example, information indicating the coordinates of the corners of each second character image) is added with identification information of the second character image and is not shown in the figure. Accumulate on media.

(ステップS404)文字画像取得手段132は、第二画像の各認識領域について、各認識領域から文字画像取得手段132が取得した1以上の第二文字画像を用いて、各第二文字画像に対応する第二文字データを取得する。取得した第二文字データは、対応する第二文字画像の識別情報と対応付けて、図示しない記憶媒体に蓄積する。   (Step S404) The character image acquisition unit 132 corresponds to each second character image by using one or more second character images acquired by the character image acquisition unit 132 from each recognition region for each recognition region of the second image. The second character data to be acquired is acquired. The acquired second character data is stored in a storage medium (not shown) in association with the identification information of the corresponding second character image.

(ステップS405)文字データ比較手段134は、カウンターmの値に1を代入する。   (Step S405) The character data comparison means 134 substitutes 1 for the value of the counter m.

(ステップS406)文字データ比較手段134は、カウンターnの値に1を代入する。   (Step S406) The character data comparing means 134 substitutes 1 for the value of the counter n.

(ステップS407)文字データ比較手段134は、ステップS404で取得された第二文字データのうちの、第二画像のm番目の認識領域から取得された第二文字データと、第一画像と対応付けられて第一画像格納部11に格納されている、第一画像のn番目の認識領域から抽出された第一文字データとを比較する。例えば、予め指定された順番に、第二文字データと第一文字データとを一文字ずつ読み出して比較して、一致しているか否かを判断していく。ここでの比較は、例えば、文字コードの比較や、文字について得られたハッシュの比較である。そして、一致しているか否かを示す情報を、例えば比較に用いられた第二文字データと対応する第二文字画像の識別情報と対応付けて、図示しない記憶媒体等に蓄積する。また、比較された第一文字データを識別する情報も更に対応付けて蓄積するようにしても良い。なお、第一文字データと第二文字データとが一致しない場合、文字を一文字飛ばして再度比較等を行うようにしてもよい。   (Step S407) The character data comparison unit 134 associates the second character data acquired from the m-th recognition area of the second image, of the second character data acquired in Step S404, with the first image. The first character data extracted from the nth recognition area of the first image stored in the first image storage unit 11 is compared. For example, the second character data and the first character data are read and compared one by one in the order designated in advance, and it is determined whether or not they match. The comparison here is, for example, a comparison of character codes or a comparison of hashes obtained for characters. Then, information indicating whether or not they match is stored in a storage medium (not shown) in association with the identification information of the second character image corresponding to the second character data used for the comparison, for example. Further, information for identifying the compared first character data may be further stored in association with each other. If the first character data and the second character data do not match, the character may be skipped and the comparison or the like may be performed again.

(ステップS408)文字データ比較手段134は、ステップS407の比較により得られた、第一文字データと第二文字データとが一致しているか否かを示す比較結果を示す情報を、例えば比較に用いられた第二文字データと対応する第二文字画像の識別情報と、比較された認識領域の識別情報とを対応付けて、図示しない記憶媒体等に蓄積する。また、比較された第一文字データを識別する情報も更に対応付けて蓄積するようにしても良い。   (Step S408) The character data comparison unit 134 uses, for example, information indicating a comparison result obtained by the comparison in step S407 and indicating whether the first character data and the second character data match each other. The identification information of the second character image corresponding to the second character data and the identification information of the compared recognition area are associated with each other and stored in a storage medium (not shown). Further, information for identifying the compared first character data may be further stored in association with each other.

(ステップS409)文字データ比較手段134は、カウンターnの値を1インクリメントする。   (Step S409) The character data comparison unit 134 increments the value of the counter n by 1.

(ステップS410)文字データ比較手段134は、レイアウト認識手段131が第一画像について認識した認識領域のなかにn番目の認識領域があるか否かを判断する。ある場合、ステップS407に戻り、ない場合、ステップS411に進む。   (Step S410) The character data comparison unit 134 determines whether or not there is an nth recognition area among the recognition areas recognized by the layout recognition unit 131 for the first image. If there is, the process returns to step S407, and if not, the process proceeds to step S411.

(ステップS411)文字データ比較手段134は、カウンターmの値を1インクリメントする。   (Step S411) The character data comparison unit 134 increments the value of the counter m by 1.

(ステップS412)文字データ比較手段134は、レイアウト認識手段131が第二画像について認識した認識領域のなかに、m番目の認識領域があるか否かを判断する。ある場合、ステップS406に戻り、ない場合、ステップS413に進む。   (Step S412) The character data comparing means 134 determines whether or not the mth recognition area is present in the recognition areas recognized by the layout recognition means 131 for the second image. If there is, the process returns to step S406, and if not, the process proceeds to step S413.

(ステップS413)対応判断手段136は、文字データ比較手段134が取得した各認識領域ごとの比較結果を示す情報に応じて、第一画像の認識領域と、第二画像の認識領域とにおいて対応する認識領域を決定する。例えば、ステップS408で蓄積された比較結果を用いて、第二画像の一の認識領域に対して、この認識領域に含まれる第二文字データと一致する第一文字データの比率(または数)が最も高い第一画像の認識領域を検出し、この検出された認識領域と、上記の一の認識領域とを、対応する認識領域に決定する。そして、それぞれの認識領域の識別情報を有する情報を認識領域間の対応関係を示す情報として、図示しない記憶媒体等に蓄積する。   (Step S413) The correspondence determining unit 136 corresponds to the recognition region of the first image and the recognition region of the second image according to the information indicating the comparison result for each recognition region acquired by the character data comparison unit 134. Determine the recognition area. For example, using the comparison result accumulated in step S408, the ratio (or number) of the first character data that matches the second character data included in this recognition area is the highest for one recognition area of the second image. A high recognition area of the first image is detected, and the detected recognition area and the one recognition area are determined as corresponding recognition areas. Then, information having identification information of each recognition area is stored in a storage medium or the like (not shown) as information indicating the correspondence between the recognition areas.

(ステップS414)形態素解析手段135は、対応判断手段136により対応付けられた第一画像と第二画像との各認識領域に対応する第一文字データと第二文字データとに対して、順次形態素解析を行う。   (Step S414) The morpheme analysis unit 135 sequentially performs morpheme analysis on the first character data and the second character data corresponding to the recognition areas of the first image and the second image associated by the correspondence determination unit 136. I do.

(ステップS415)文字データ比較手段134は、対応する各認識領域間で、形態素解析により得られた形態素間の比較を、形態素単位で順番に行い、比較結果を図示しない記憶媒体等に蓄積する。例えば、形態素単位で一致するか否かの判断が行われ、形態素の識別情報と、一致する形態素の有無を示す情報等が対応付けられて、図示しない記憶媒体等に蓄積される。   (Step S415) The character data comparison means 134 performs comparison between morphemes obtained by morpheme analysis between corresponding recognition regions in order, and accumulates the comparison results in a storage medium (not shown). For example, it is determined whether or not they match in morpheme units, and morpheme identification information is associated with information indicating the presence or absence of the matching morpheme and stored in a storage medium (not shown).

(ステップS416)文字画像比較手段137は、文字画像の比較に利用される閾値として、閾値設定手段139が学習結果を利用して取得した閾値を利用するか否かを判断する。利用する場合、ステップS420に進み、利用しない場合、ステップS417に進む。   (Step S416) The character image comparison unit 137 determines whether or not to use the threshold acquired by the threshold setting unit 139 using the learning result as the threshold used for comparing the character images. If so, the process proceeds to step S420. If not, the process proceeds to step S417.

(ステップS417)閾値受付部14は、閾値を受け付けているか否かを判断する。受け付けている場合、ステップS418に進み、受け付けていない場合、ステップS419に進む。   (Step S417) The threshold reception unit 14 determines whether a threshold is received. If accepted, the process proceeds to step S418. If not accepted, the process proceeds to step S419.

(ステップS418)閾値受付部14は、ステップS417で受け付けた閾値を設定する。具体的には、閾値格納手段138に蓄積する。そして、ステップS420に進む。   (Step S418) The threshold receiving unit 14 sets the threshold received in step S417. Specifically, it accumulates in the threshold storage means 138. Then, the process proceeds to step S420.

(ステップS419)閾値設定手段139は、ステップS413で対応付けられた各認識領域の組について、各認識領域の画素の輝度の値の出現状況を利用して各認識領域の組ごとに閾値を取得する。そして、取得した閾値を、各認識領域の組と対応付けて閾値格納手段138に蓄積する。   (Step S419) The threshold value setting unit 139 obtains a threshold value for each recognition area set by using the appearance status of the luminance value of the pixel in each recognition area for each recognition area set associated in step S413. To do. Then, the acquired threshold value is stored in the threshold value storage means 138 in association with each recognition area group.

(ステップS420)文字画像比較手段137は、カウンターpの値に1を代入する。   (Step S420) The character image comparison means 137 substitutes 1 for the value of the counter p.

(ステップS421)文字画像取得手段132は、第一画像と第二画像との、ステップS413で対応付けられた各認識領域の組のうちの、p番目の組の認識領域から、それぞれ、第一文字画像と第二文字画像とを予め指定された取得順番に従って、一文字ごとに取得する。文字画像取得手段132は、例えば、第一画像から抽出された文字データのうちの、このp番目の認識領域内の認識領域に対応付けられている文字データ(即ち、p番目の認識領域から抽出された文字データ)を、一文字ごとにラスタライズすることにより第一文字画像を取得する。ただし、ラスタライズはまとめて行うようにしてもよい。   (Step S421) The character image obtaining unit 132 obtains the first character from the p-th recognition area among the recognition area pairs associated with the first image and the second image in Step S413. An image and a second character image are acquired for each character in accordance with an acquisition order designated in advance. For example, the character image acquisition unit 132 extracts character data associated with the recognition area in the p-th recognition area from the character data extracted from the first image (ie, extracted from the p-th recognition area). The first character image is obtained by rasterizing the character data) for each character. However, rasterization may be performed collectively.

(ステップS422)文字画像比較手段137は、ステップS421で取得された第一文字画像と第二文字画像とを一文字単位で比較して、同一文字であるか否かを判断する。そして、判断結果を、比較に用いられた第一文字画像の識別情報や、比較に用いられた第一文字画像に対応する第一文字コードの識別情報や、第二文字画像の識別情報と対応付けて図示しない記憶媒体等に蓄積する。なお、比較する際には、文字データ比較手段134による比較による判断結果が対応付けられている第一文字データと第二文字データとにそれぞれ対応する第一文字画像と第二文字画像とを比較することが好ましい。このようにすることで、文字データ比較手段134の比較結果を利用して無駄のない比較を行うことができるという効果がある。また、文字データ比較手段134の比較結果を確認できるという効果が得られる。なお、ステップS416で、閾値取得部17が取得する閾値を取得することが指定されている場合、例えば、一の第一文字画像と第二文字画像とを比較する際に、輝度値取得部16が、この第一文字画像と第二文字画像との各画素について輝度値に関する情報を取得し、この輝度値に関する情報を用いて、閾値取得部17が、学習結果を利用して、評価結果受付部15が受け付ける評価が、文字画像比較手段137の判断結果が正しいことを示す評価となると考えられる閾値を取得して、閾値格納手段138に一時記憶して、この閾値を用いて一の第一文字画像と第二文字画像とを比較するようにする。   (Step S422) The character image comparison means 137 compares the first character image and the second character image acquired in step S421 in units of one character, and determines whether or not they are the same character. The determination result is shown in correspondence with the identification information of the first character image used for comparison, the identification information of the first character code corresponding to the first character image used for comparison, and the identification information of the second character image. Do not store in storage media. When comparing, the first character image and the second character image respectively corresponding to the first character data and the second character data associated with the result of comparison by the character data comparison unit 134 are compared. Is preferred. By doing so, there is an effect that it is possible to perform a lean comparison using the comparison result of the character data comparison unit 134. Moreover, the effect that the comparison result of the character data comparison means 134 can be confirmed is acquired. In addition, when it is specified in step S416 that the threshold acquired by the threshold acquiring unit 17 is acquired, for example, when comparing one first character image and a second character image, the luminance value acquiring unit 16 The information about the luminance value is acquired for each pixel of the first character image and the second character image, and the threshold value acquisition unit 17 uses the learning result to use the information about the luminance value to evaluate the evaluation result reception unit 15. Obtains a threshold value that is considered to be an evaluation indicating that the determination result of the character image comparison unit 137 is correct, temporarily stores the threshold value in the threshold value storage unit 138, and uses this threshold value as one first character image The second character image is compared.

(ステップS423)文字画像比較手段137は、カウンターpの値を1インクリメントする。   (Step S423) The character image comparison means 137 increments the value of the counter p by 1.

(ステップS424)文字画像比較手段137は、ステップS413で対応付けられた認識領域の組に、p番目の組があるか否かを判断する。ある場合、ステップS421に戻り、ない場合、ステップS425に進む。   (Step S424) The character image comparing means 137 determines whether or not the p-th set is present in the recognition area set associated in step S413. If there is, the process returns to step S421, and if not, the process proceeds to step S425.

(ステップS425)入替検出手段140は、文字画像比較手段137の比較結果、または、文字データ比較手段134の比較結果を利用して、第一文字画像に対して第二文字画像の文字が入れ替わっている箇所を検出する。そして、検出した箇所を示す情報を、図示しない記憶媒体等に蓄積する。   (Step S425) The replacement detection unit 140 uses the comparison result of the character image comparison unit 137 or the comparison result of the character data comparison unit 134 to replace the character of the second character image with respect to the first character image. Detect the location. And the information which shows the detected location is accumulate | stored in the storage medium etc. which are not shown in figure.

(ステップS426)追加検出手段141は、文字画像比較手段137の比較結果、または、文字データ比較手段134の比較結果を利用して、第一文字画像に対して第二文字画像の1以上の文字が追加されている箇所を検出する。そして、検出した箇所を示す情報を、図示しない記憶媒体等に蓄積する。   (Step S426) The addition detection unit 141 uses the comparison result of the character image comparison unit 137 or the comparison result of the character data comparison unit 134 to detect one or more characters of the second character image with respect to the first character image. Detect the added part. And the information which shows the detected location is accumulate | stored in the storage medium etc. which are not shown in figure.

(ステップS427)削除検出手段142は、文字画像比較手段137の比較結果、または、文字データ比較手段134の比較結果を利用して、第一文字画像に対して第二文字画像の1以上の文字が削除されている箇所を検出する。そして、削除された箇所を示す情報を、図示しない記憶媒体等に蓄積する。   (Step S427) The deletion detection unit 142 uses the comparison result of the character image comparison unit 137 or the comparison result of the character data comparison unit 134 to detect one or more characters of the second character image with respect to the first character image. Detect deleted parts. And the information which shows the deleted location is accumulate | stored in the storage medium etc. which are not shown in figure.

(ステップS428)出力部18は、検出部13が検出した第一画像に対する第二画像の差異のある箇所を示す情報を出力する。例えば、文字画像比較手段137が差異の箇所として検出した箇所(即ち、第一文字画像と第二文字画像とが一致しない箇所)を示す情報を出力する。また、出力部18は、例えば、入替検出手段140が検出した文字列が入れ替わっている箇所を示す情報を出力する。また、出力部18は、追加検出手段141が検出した文字が追加されている箇所を示す情報を出力する。また、出力部18は、削除検出手段142が検出した文字が削除されている箇所を示す情報を出力する。なお、出力部18は、文字データ比較手段134が文字コードについて検出した差異の箇所を示す情報を出力してもよい。また、出力部18は、文字データ比較手段134が形態素解析を利用して検出した形態素または単語についての差異がある箇所を示す情報を出力するようにしてもよい。また、これらの情報は、図示しない受付部等が受け付けるユーザの操作によって適宜切り替えて出力されるようにしても良い。また、第二画像や第一画像についてレイアウト認識手段131が認識した認識領域のうちの、差異のある認識領域を、他の認識領域と異なる出力態様で出力しても良い。   (Step S428) The output unit 18 outputs information indicating a portion where there is a difference between the second image and the first image detected by the detection unit 13. For example, the information which shows the location (namely, location where the 1st character image and the 2nd character image do not correspond) which the character image comparison means 137 detected as a difference location is output. Moreover, the output part 18 outputs the information which shows the location where the character string detected by the replacement detection means 140 is replaced, for example. Further, the output unit 18 outputs information indicating a location where the character detected by the addition detection unit 141 is added. Further, the output unit 18 outputs information indicating a location where the character detected by the deletion detection unit 142 is deleted. The output unit 18 may output information indicating the location of the difference detected by the character data comparison unit 134 for the character code. Further, the output unit 18 may output information indicating a portion where there is a difference between morphemes or words detected by the character data comparison unit 134 using morpheme analysis. Further, these pieces of information may be appropriately switched and output by a user operation received by a reception unit (not shown) or the like. Moreover, you may output the recognition area with a difference among the recognition areas which the layout recognition means 131 recognized about the 2nd image and the 1st image in the output mode different from another recognition area.

(ステップS429)評価結果受付部15は、出力部18が出力した1以上の差異の箇所についての、ユーザの評価結果を受け付けたか否かを判断する。受け付けた場合、ステップS430に進み、受け付けていない場合、ステップS432に進む。   (Step S429) The evaluation result receiving unit 15 determines whether or not the user's evaluation result for one or more differences output by the output unit 18 has been received. If accepted, the process proceeds to step S430. If not accepted, the process proceeds to step S432.

(ステップS430)輝度値取得部16は、ステップS429で評価結果を受け付けた各箇所(例えば、文字画像)について輝度値に関する値を取得する。   (Step S430) The luminance value acquisition unit 16 acquires a value related to the luminance value for each location (for example, a character image) for which the evaluation result has been received in Step S429.

(ステップS431)閾値取得部17は、ステップS429で受け付けた評価結果と、この評価結果に対応してステップS430で取得された輝度値に関する値と、評価の対象となった文字画像比較手段137の比較処理において文字画像比較手段137が用いた閾値(例えば、ステップS418でユーザが設定した閾値等)の組を学習データとして用いて、学習を行う。   (Step S431) The threshold acquisition unit 17 receives the evaluation result received in Step S429, the value related to the luminance value acquired in Step S430 corresponding to the evaluation result, and the character image comparison unit 137 that is the object of evaluation. Learning is performed using a set of threshold values (for example, a threshold value set by the user in step S418) used by the character image comparison unit 137 in the comparison process as learning data.

(ステップS432)出力部18は、出力を終了するか否かを判断する。例えば、出力を終了する指示等を図示しない受付部等を介して受け付けた場合に、出力を終了すると判断する。出力を終了する場合、出力を終了して、処理を終了する。出力を終了しない場合、ステップS428に戻る。なお、出力を更新する必要がない場合等には、ステップS429に戻るようにしても良い。   (Step S432) The output unit 18 determines whether or not to end the output. For example, it is determined that the output is to be ended when an instruction to end the output or the like is received via a receiving unit (not shown) or the like. When the output is to be ended, the output is ended and the processing is ended. If the output is not terminated, the process returns to step S428. If there is no need to update the output, the process may return to step S429.

なお、ステップS419等を省略して、閾値格納手段138にデフォルト等として格納されている閾値を、文字画像比較手段137が文字画像の比較に用いるようにしても良い。   Note that step S419 and the like may be omitted, and the character image comparison unit 137 may use the threshold value stored in the threshold value storage unit 138 as a default for character image comparison.

なお、図5のフローチャートにおいて、電源オフや処理終了の割り込みにより処理は終了する。   In the flowchart of FIG. 5, the process ends when the power is turned off or the process ends.

以下、本実施の形態における画像検査装置1の具体的な動作について説明する。   Hereinafter, a specific operation of the image inspection apparatus 1 in the present embodiment will be described.

図6は、第一画像格納部11に格納されている第一画像の一例を示す図である。ここでは、第一画像221は、文字データを含む画像であるとする。図において、テキストボックス61〜64は文字データが配置されている領域である。各テキストボックス61〜64には、図に示すように、テキストボックスの識別情報として、「T1061」から「T1064」が割り当てられているとする。本実施の形態においては、この第一画像221は、例えば、デザイン会社や、印刷の依頼者等が提出した、飲料等の缶等の容器の側面に印刷される画像の原稿の画像であるとする。具体的には、円筒形の缶の表面に印刷する原稿画像であり、この第一画像221のファイル名は、「版データ原稿」であるとする。なお、ここでは、印刷の対象となる容器が、一例として円筒形の缶とした場合について説明するが、印刷の対象となる容器は、どのような形状(直方体、球形等)のどのような材質(金属、プラスチック等)の容器であっても良い。   FIG. 6 is a diagram illustrating an example of the first image stored in the first image storage unit 11. Here, it is assumed that the first image 221 is an image including character data. In the figure, text boxes 61 to 64 are areas where character data is arranged. As shown in the drawing, it is assumed that “T1061” to “T1064” are assigned to the text boxes 61 to 64 as the identification information of the text box. In the present embodiment, the first image 221 is, for example, an image of a document that is printed on the side of a container such as a can such as a beverage submitted by a design company or a requester of printing. To do. Specifically, it is a document image to be printed on the surface of a cylindrical can, and the file name of the first image 221 is “plate data document”. Here, the case where the container to be printed is a cylindrical can as an example will be described. However, the container to be printed has any shape (rectangular, spherical, etc.) and any material. It may be a container of (metal, plastic, etc.).

図7は、抽出した文字データを管理する抽出文字データ管理情報の一例を示す図である。抽出文字データ管理情報は、「ファイル名」と、「抽出文字データ」と、「ボックスID」という項目を有している。「ファイル名」は、文字データの抽出元となる第一画像221のファイル名である。「抽出文字データ」は、第一画像221の各テキストボックスから抽出された文字データである。「ボックスID」は、文字データの抽出先となるテキストボックスの識別情報である。なお、抽出された文字データは、第一画像格納部11に格納されているものとする。なお、ここでは、各行をレコードと考える。   FIG. 7 is a diagram illustrating an example of extracted character data management information for managing extracted character data. The extracted character data management information has items of “file name”, “extracted character data”, and “box ID”. “File name” is the file name of the first image 221 from which character data is extracted. “Extracted character data” is character data extracted from each text box of the first image 221. “Box ID” is identification information of a text box from which character data is extracted. It is assumed that the extracted character data is stored in the first image storage unit 11. Here, each line is considered a record.

図8は、第二画像格納部12に格納されている第二画像222の一例を示す図である。この第二画像222は、第一画像221に対応した第二画像222であるとする。この画像データ内の文字データは全てアウトライン化されており、文字データ(文字コード)の情報は有していないものとする。本実施の形態においては、この第二画像222は、容器メーカーや、容器に印刷を行う印刷会社等が作成した、実際の缶への印刷に利用される印刷データであり、第一画像221を元に作成された印刷データであるとする。この第二画像222のファイル名は、「印刷データ」であるとする。この第二画像222においては、第一画像221に対してレイアウト等の変更が加えられているものとする。   FIG. 8 is a diagram illustrating an example of the second image 222 stored in the second image storage unit 12. The second image 222 is assumed to be the second image 222 corresponding to the first image 221. It is assumed that all the character data in this image data is outlined and does not have character data (character code) information. In the present embodiment, the second image 222 is print data used for printing on an actual can created by a container manufacturer, a printing company that prints on the container, and the like. It is assumed that the print data is originally created. It is assumed that the file name of the second image 222 is “print data”. In the second image 222, it is assumed that the layout or the like has been changed with respect to the first image 221.

まず、ユーザが、図示しない受付部等に対して、第二画像格納部12に格納されている第二画像222「印刷データ」の、第一画像格納部11に格納されている第一画像221「版データ原稿」に対する差異を検査する指示を与えたとする。   First, the user receives a first image 221 stored in the first image storage unit 11 of the second image 222 “print data” stored in the second image storage unit 12 with respect to a reception unit (not shown) or the like. It is assumed that an instruction for inspecting a difference with respect to the “plate data original” is given.

レイアウト認識手段131は、第一画像221に対してレイアウトを認識する処理を行う。まず、図6に示した第一画像221について、同じ色の領域(色領域)を検出する。次に、レイアウト認識手段131は、検出された図形のうちの一定面積以上の領域を候補領域として検出する。次に、レイアウト認識手段131は、現在検出されている候補領域のうちの面積の最も小さい候補領域を選択し、その内部を含む領域を定義する情報を、色領域を定義する情報として取得し、図示しない記憶媒体等に蓄積する(登録する)。ここでは、領域を定義する情報は、領域の周囲の変曲点等の座標であるとする。また、領域識別情報は、予め指定されたルール等に従って付与されるものとする。蓄積した領域は、候補領域から除外する。同様にして、他の候補領域についても、順次、色領域を定義する情報を取得し、蓄積する。   The layout recognition unit 131 performs processing for recognizing the layout of the first image 221. First, an area of the same color (color area) is detected for the first image 221 shown in FIG. Next, the layout recognizing unit 131 detects a region having a certain area or more in the detected figure as a candidate region. Next, the layout recognizing unit 131 selects a candidate area having the smallest area among the currently detected candidate areas, acquires information defining the area including the interior as information defining the color area, Accumulate (register) in a storage medium (not shown). Here, it is assumed that the information defining the region is coordinates such as an inflection point around the region. Further, the area identification information is given according to a rule designated in advance. The accumulated area is excluded from the candidate areas. Similarly, for other candidate areas, information defining the color area is sequentially acquired and accumulated.

例えば、第一画像221については、図9に示すような色領域91、および色領域92が検出される。   For example, for the first image 221, a color area 91 and a color area 92 as shown in FIG. 9 are detected.

次に、レイアウト認識手段131は、上記で検出した各色領域91、92について、枠で囲まれた領域を検出する。まず、レイアウト認識手段131は、ステップS101で認識された一の色領域を選択し、選択した色領域の各画素について、隣接する画素間の画素値(例えば輝度値)を比較して、画素のエッジを抽出する。例えば、画素値の差が、予め指定された閾値以上であれば、エッジであると検出する。レイアウト認識手段131は、抽出したエッジから、一の色領域の内部にエッジで囲まれた閉曲線が存在するか否かを判断する。ここでは、閉曲線が存在するため、一の閉曲線を選択し、この閉曲線の周囲の長さが、予め指定された長さ以上であるか否かを判断する。ここでは、予め指定された長さ以上であるため、選択した一の閉曲線の内部を、一の枠で囲まれた領域と判断し、この領域を定義する情報を取得し、この領域を識別する情報である第一領域識別情報と対応付けて、図示しない記憶媒体等に蓄積する。領域を定義する情報は、例えば、領域の周囲の変曲点等の座標である。さらに、同じ色領域内で、他の閉曲線の検出を行い、検出された場合、検出された閉曲線の内部の領域を定義する情報と、領域識別情報とを対応づけて図示しない記憶媒体等に蓄積する。同様の処理を他の色領域についても順次行う。   Next, the layout recognition unit 131 detects an area surrounded by a frame for each of the color areas 91 and 92 detected above. First, the layout recognizing unit 131 selects one color area recognized in step S101, compares pixel values (for example, luminance values) between adjacent pixels for each pixel in the selected color area, Extract edges. For example, if the difference between pixel values is equal to or greater than a predetermined threshold value, an edge is detected. From the extracted edge, the layout recognition unit 131 determines whether or not a closed curve surrounded by the edge exists within one color region. Here, since there is a closed curve, one closed curve is selected, and it is determined whether or not the circumference of the closed curve is equal to or longer than a predetermined length. Here, since the length is longer than a predetermined length, the inside of the selected one closed curve is determined as an area surrounded by one frame, information defining this area is acquired, and this area is identified. The information is stored in a storage medium or the like (not shown) in association with the first area identification information that is information. The information defining the area is, for example, coordinates such as an inflection point around the area. Further, another closed curve is detected in the same color area, and if detected, information defining the area inside the detected closed curve and the area identification information are associated with each other and stored in a storage medium (not shown). To do. Similar processing is sequentially performed for other color regions.

更に検出された各領域において、予め図示しない記憶媒体等に格納されている登録マーカの画像と一致する画像を検出し、検出した領域を、各領域から除外する。なお、ここでは、登録マーカ画像と一致する画像が検出されなかったとする。   Further, in each detected area, an image matching a registered marker image stored in a storage medium (not shown) or the like is detected in advance, and the detected area is excluded from each area. Here, it is assumed that an image that matches the registered marker image is not detected.

更に、レイアウト認識手段131は、色領域以外の残りの領域において、他の領域とは異なる色や輝度を有する画素(例えば、文字の画素)を、第一画像221の両端および上下方向から検出し、最も高さの高い位置の画素と、低い位置の画素と、最も左側の位置の画素と、最も右側の位置の画素とをそれぞれ検出し、これらの点を通過する辺を有する矩形領域を残りの領域として認識し、この領域を定義する情報と、第一領域識別情報とを対応づけて図示しない記憶媒体等に蓄積する。   Furthermore, the layout recognizing unit 131 detects pixels (for example, character pixels) having different colors and brightness from other regions in the remaining region other than the color region from both ends and the vertical direction of the first image 221. Detect the pixel at the highest position, the pixel at the lowest position, the pixel at the leftmost position, and the pixel at the rightmost position, respectively, and leave a rectangular area with sides passing through these points. And the information defining this area and the first area identification information are associated with each other and stored in a storage medium (not shown).

これにより、図6に示した第一画像221については、図10に示すような四つの認識領域1001〜1004が検出される。四つの認識領域1001〜1004にそれぞれ対応づけられた第一領域識別情報は「R01」〜「R04」であるとする。   Accordingly, four recognition regions 1001 to 1004 as shown in FIG. 10 are detected for the first image 221 shown in FIG. It is assumed that the first area identification information associated with each of the four recognition areas 1001 to 1004 is “R01” to “R04”.

図11は、レイアウト認識手段131が第一画像221について認識した認識領域を定義する情報を管理する第一領域管理情報である。第一領域管理情報は、「ファイル名」、「領域ID」、「領域定義情報」という項目を有している。「ファイル名」は、第一画像221のファイル名である。「第一領域ID」は、第一領域識別情報である。「領域定義情報」は、領域を定義する情報である。ここでは、各領域が矩形の領域であったとし、領域を定義する情報は、領域の四隅の座標であるとする。なお、本実施の形態においては、xr、ys(r、sは1以上の整数)は、それぞれ特定の数値であるとする。   FIG. 11 shows first area management information for managing information defining a recognition area recognized by the layout recognition unit 131 for the first image 221. The first area management information has items of “file name”, “area ID”, and “area definition information”. “File name” is the file name of the first image 221. The “first area ID” is first area identification information. “Region definition information” is information that defines a region. Here, it is assumed that each area is a rectangular area, and the information defining the area is the coordinates of the four corners of the area. In the present embodiment, xr and ys (r and s are integers of 1 or more) are specific numerical values, respectively.

同様に、レイアウト認識手段131は、図8に示した第二画像222についても、上記の第一画像221の場合と同様に一以上の認識領域を検出する。   Similarly, the layout recognition unit 131 also detects one or more recognition regions for the second image 222 shown in FIG. 8 as in the case of the first image 221 described above.

この処理により、図8に示した第二画像222については、図12に示すような四つの認識領域1201〜1204が検出されたとする。四つの認識領域1201〜1204にそれぞれ対応づけられた第二領域識別情報は「R21」〜「R24」であるとする。   It is assumed that four recognition areas 1201 to 1204 as shown in FIG. 12 are detected for the second image 222 shown in FIG. 8 by this processing. It is assumed that the second area identification information associated with each of the four recognition areas 1201 to 1204 is “R21” to “R24”.

図13は、レイアウト認識手段131が第二画像222について認識した認識領域を定義する情報を管理する第二領域管理情報である。第二領域管理情報は、「ファイル名」、「第二領域ID」、「領域定義情報」という項目を有している。「ファイル名」は、第二画像222のファイル名である。「第二領域ID」は、領域識別情報である。「領域定義情報」は、領域を定義する情報である。ここでは、各領域が矩形の領域であったとし、領域を定義する情報は、領域の四隅の座標であるとする。   FIG. 13 shows second area management information for managing information defining a recognition area recognized by the layout recognition unit 131 for the second image 222. The second area management information has items of “file name”, “second area ID”, and “area definition information”. “File name” is the file name of the second image 222. “Second area ID” is area identification information. “Region definition information” is information that defines a region. Here, it is assumed that each area is a rectangular area, and the information defining the area is the coordinates of the four corners of the area.

次に、文字画像取得手段132は、レイアウト認識手段131が第二画像222について認識した各認識領域について、それぞれ、1以上の第二文字画像を検出する。まず、「第二領域ID」が「R21」の認識領域について、一文字ごとに、第二文字画像を検出していく。例えば、一の第二文字画像は、一の文字が収まる最小矩形画像である。このような第二文字画像を検出する処理は、OCR等の技術において公知の技術である。そして、検出した第二文字画像を管理する情報として、検出した各第二文字画像の領域を定義する情報と、検出した第二文字画像の領域の識別情報である第二文字画像識別情報とを、第二領域ID「R21」と対応づけて、図示しない記憶媒体に蓄積する。   Next, the character image acquisition unit 132 detects one or more second character images for each recognition area recognized by the layout recognition unit 131 for the second image 222. First, the second character image is detected for each character in the recognition region whose “second region ID” is “R21”. For example, one second character image is a minimum rectangular image in which one character fits. Such processing for detecting the second character image is a technique known in the art such as OCR. Then, as information for managing the detected second character image, information that defines the area of each detected second character image, and second character image identification information that is identification information of the detected second character image area In association with the second area ID “R21”, it is stored in a storage medium (not shown).

図14は、「第二領域ID」が「R21」の認識領域1201について、文字画像取得手段132が検出した第二文字画像を示す図である。図において、斜線で示した各矩形画像が、文字画像取得手段132により検出された各第二文字画像であるとする。   FIG. 14 is a diagram illustrating a second character image detected by the character image acquisition unit 132 for the recognition region 1201 whose “second region ID” is “R21”. In the figure, it is assumed that each rectangular image indicated by diagonal lines is each second character image detected by the character image acquisition means 132.

同様にして、文字画像取得手段132は、「第二領域ID」が、「R22」から「R24」までの各認識領域についても第二文字画像を検出し、検出した各第二文字画像を管理する情報を、図示しない記憶媒体に蓄積する。   Similarly, the character image acquisition unit 132 detects the second character image for each recognition region whose “second region ID” is “R22” to “R24”, and manages each detected second character image. Information to be stored in a storage medium (not shown).

図15は、第二画像222の各認識領域について検出された第二文字画像を管理する第二文字画像管理情報を示す図である。第二文字画像管理情報は、第二文字画像を検出した認識領域の識別情報である「第二領域ID」と、第二文字画像識別情報である「第二文字画像ID」と、第二文字画像の領域を定義する情報である「文字領域定義」とを有する。   FIG. 15 is a diagram showing second character image management information for managing the second character image detected for each recognition area of the second image 222. The second character image management information includes “second region ID” that is identification information of the recognition region in which the second character image is detected, “second character image ID” that is second character image identification information, and second character It has “character area definition” which is information defining the area of the image.

次に、文字データ取得手段133は、第二画像222から検出した各第二文字画像に対応する文字データを、OCRの技術を利用して取得する。ここでは、各認識領域に配置されている第二文字画像について、上の行から下の行に向かって左から右に順次文字データを取得していく。そして、各第二文字画像について取得した文字データを、対応する第二文字画像の識別情報である第二文字画像識別情報と、第二画像222内の認識領域を示す第二領域識別情報とを対応づけて、図示しない記憶媒体に蓄積する。   Next, the character data acquisition unit 133 acquires character data corresponding to each second character image detected from the second image 222 by using the OCR technique. Here, for the second character image arranged in each recognition area, character data is sequentially acquired from the left to the right from the upper row to the lower row. And the character data acquired about each 2nd character image is made into the 2nd character image identification information which is the identification information of a corresponding 2nd character image, and the 2nd area | region identification information which shows the recognition area in the 2nd image 222. Correspondingly, it is stored in a storage medium (not shown).

図16は、文字データ取得手段133が取得した第二文字データを管理する第二文字データ管理情報である。第二文字データ管理情報は、「第二領域ID」と、「第二文字画像ID」と、第二文字データである「第二文字」と、いう項目を有している。「第二領域ID」は、図13の「第二領域ID」に相当する。なお、ここでは、「第二文字」の値として、実際の文字を示しているが、「第二文字」の値は、文字コードであってもよい。   FIG. 16 shows second character data management information for managing the second character data acquired by the character data acquisition means 133. The second character data management information has items of “second region ID”, “second character image ID”, and “second character” as second character data. The “second area ID” corresponds to the “second area ID” in FIG. Here, an actual character is shown as the value of “second character”, but the value of “second character” may be a character code.

次に、文字データ比較手段134は、第二画像222の各認識領域について取得した一以上の第二文字データと、第一画像221の各認識領域に含まれる第一文字データとを比較する。そして、この比較結果から、対応判断手段136は、認識領域間の対応関係を判断する。第一画像221の各認識領域に含まれる第一文字データとしては、ここでは、レイアウト認識手段131が第一画像221について検出した各認識領域内に含まれる(あるいは重なる)テキストボックスから抽出された第一文字データを取得する。例えば、図6および図8に示すように、「第一領域ID」が「R01」である第一画像221の認識領域内には、識別情報が「T1061」であるテキストボックス61が含まれているため、「第一領域ID」が「R01」である第一画像221の認識領域内の第一文字データとしては、テキストボックス61から抽出した文字データを用いる。具体的には、「第一領域ID」が「R01」である第一画像221の認識領域に対応する第一文字データとして、図7に示した抽出文字データ管理情報から、「ボックスID」が「T1061」であるレコードの「抽出文字データ」の値を用いる。   Next, the character data comparison unit 134 compares the one or more second character data acquired for each recognition area of the second image 222 with the first character data included in each recognition area of the first image 221. Then, from the comparison result, the correspondence determining unit 136 determines the correspondence between the recognition areas. Here, as the first character data included in each recognition area of the first image 221, the first character data extracted from the text box included (or overlapped) in each recognition area detected for the first image 221 by the layout recognition unit 131 is used. Get single character data. For example, as shown in FIGS. 6 and 8, the recognition area of the first image 221 whose “first area ID” is “R01” includes a text box 61 whose identification information is “T1061”. Therefore, the character data extracted from the text box 61 is used as the first character data in the recognition region of the first image 221 whose “first region ID” is “R01”. Specifically, as the first character data corresponding to the recognition region of the first image 221 whose “first region ID” is “R01”, the “box ID” is “1” from the extracted character data management information shown in FIG. The value of “extracted character data” of the record “T1061” is used.

なお、第一画像221から予め抽出した文字データが用意されていない場合や、第一画像221から文字データが抽出できない場合には、第二画像222の場合と同様に、文字画像取得手段132は、第一画像221の各認識領域についてそれぞれ一以上の第一文字画像を検出し、第二文字データを取得するようにすればよい。   When character data extracted in advance from the first image 221 is not prepared, or when character data cannot be extracted from the first image 221, the character image acquisition unit 132 is similar to the case of the second image 222. The second character data may be acquired by detecting one or more first character images for each recognition area of the first image 221.

文字データ比較手段134は、まず、第二画像222の「第二領域ID」が「R21」である認識領域から取得した第二文字データと、第一画像221の「第一領域ID」が「R01」である認識領域から取得した第一文字データとを一文字ごとに比較する。第二画像222の「第二領域ID」が「R21」である認識領域から取得した第二文字データとしては、第二文字データ管理情報の「第二領域ID」が「R21」であるレコードの「第二文字」の値を上から順番に取得して用いる。「第一領域ID」が「R01」である認識領域から取得した第一文字データとしては、抽出文字データ管理情報の「ボックスID」が「T1061」であるレコードの「抽出文字データ」の値を用いる。比較の結果、一致する文字と一致しない文字とを検出する。また、一致する文字がない場合に、文字をずらして比較を行うことで、文字の欠落も検出する。そして、文字の比較結果を、第一画像221の第一領域ID「R01」と第二画像222の第二領域ID「R21」とを対応づけて、図示しない記憶媒体に蓄積する。文字の比較結果は、比較された各第二文字データと、各第二文字データに対応する第二文字画像の識別情報と、比較された第一文字データと、一致または不一致を示す情報とを有する情報である。   First, the character data comparison unit 134 determines that the second character data acquired from the recognition area where the “second area ID” of the second image 222 is “R21” and the “first area ID” of the first image 221 are “ The first character data acquired from the recognition area “R01” is compared for each character. As the second character data acquired from the recognition region where the “second region ID” of the second image 222 is “R21”, the record of which the “second region ID” of the second character data management information is “R21”. The value of “second character” is acquired and used in order from the top. As the first character data acquired from the recognition region whose “first region ID” is “R01”, the value of “extracted character data” of the record whose “box ID” of the extracted character data management information is “T1061” is used. . As a result of the comparison, a matching character and a non-matching character are detected. In addition, when there is no matching character, a character loss is detected by performing a comparison by shifting the character. The character comparison result is stored in a storage medium (not shown) in association with the first area ID “R01” of the first image 221 and the second area ID “R21” of the second image 222. The character comparison result includes each second character data compared, identification information of the second character image corresponding to each second character data, the first character data compared, and information indicating a match or mismatch. Information.

図17は、図示しない記憶媒体に蓄積された比較結果を示す比較結果情報である。比較結果情報は、第一画像221の第一領域識別情報である「第一領域ID」と、第二画像222の第二領域識別情報である「第二領域ID」と、第二文字を示す「第二文字」と、第二文字画像の識別情報である「第二文字画像ID」と、比較された第一文字データである「第一文字」と、文字データを比較した場合の一致または不一致を示す情報である「比較結果」と、「第二文字画像」が示す第二文字画像と、「第一文字」が示す第一文字データに対応する第一文字画像とを比較した場合の一致または不一致を示す情報である「画像比較結果」と、文字が入れ替わっていることを示す情報である「入替」と、文字が追加されていることを示す情報である「追加」と、文字が削除されていることを示す情報である「削除」という項目を有している。なお、文字データの欠落により、対応する第一文字コードや、第二文字コードがない場合、「第二文字」や「第二文字画像ID」や「第一文字」の値は、空欄(例えばNULL)となる。また、ここでは、第一文字画像と第二文字画像の比較や、文字の入替、追加、削除等の検出は行われていないため、「画像比較結果」、「入替」、「追加」、「削除」の値は、空欄(例えばNULL)となっている。   FIG. 17 shows comparison result information indicating the comparison results accumulated in a storage medium (not shown). The comparison result information indicates “first area ID” that is first area identification information of the first image 221, “second area ID” that is second area identification information of the second image 222, and a second character. Match or mismatch when character data is compared with “second character”, “second character image ID” which is identification information of the second character image, and “first character” which is the first character data compared. The comparison result, the second character image indicated by the “second character image”, and the first character image corresponding to the first character data indicated by the “first character” are matched or mismatched. The information “image comparison result”, the information “replacement” indicating that the character is replaced, the information “addition” indicating that the character is added, and the character being deleted It has an item “Delete” which is information indicating There. When there is no corresponding first character code or second character code due to missing character data, the values of “second character”, “second character image ID”, and “first character” are blank (for example, NULL). It becomes. Also, here, the comparison between the first character image and the second character image and the detection of the replacement, addition, deletion, etc. of the characters are not performed, so “image comparison result”, “replacement”, “addition”, “deletion” "Is blank (for example, NULL).

同様に、文字データ比較手段134は、第二画像222の「第二領域ID」が「R21」である認識領域から取得した第二文字データと、第一画像221の「第一領域ID」が「R02」から「R04」である各認識領域からそれぞれ取得した第一文字データとを一文字ごとに比較して、比較結果情報を取得する。   Similarly, the character data comparison unit 134 determines that the second character data acquired from the recognition area where the “second area ID” of the second image 222 is “R21” and the “first area ID” of the first image 221 are the same. Comparison result information is obtained by comparing the first character data respectively obtained from the recognition areas “R02” to “R04” for each character.

さらに、文字データ比較手段134は、第二画像222の「第二領域ID」が「R22」から「R24」の各認識領域についても同様の処理を繰り返す。   Further, the character data comparison unit 134 repeats the same processing for each recognition area whose “second area ID” of the second image 222 is “R22” to “R24”.

次に、対応判断手段136は、図示しない記憶媒体に蓄積された比較結果情報において、「第二領域ID」が「R21」であるレコードのうちの、「比較結果」の値が「一致」であるレコードの数を、「第一領域ID」の値ごとに集計し、集計した値が最も高い「第一領域ID」が示す第一画像221の認識領域が「第二領域ID」が「R21」である第二画像222の認識領域に対応する認識領域であると判断する。「第二領域ID」が「R22」から「R24」の認識領域についても同様に、対応する第一画像221の認識領域を判断する。そして、対応する認識領域の「第一領域ID」と「第二領域ID」とを有する情報である領域対応管理情報を、図示しない記憶媒体に蓄積する。   Next, in the comparison result information stored in a storage medium (not shown), the correspondence determination unit 136 indicates that the value of the “comparison result” is “match” among the records whose “second area ID” is “R21”. The number of records is counted for each value of “first area ID”, and the recognition area of the first image 221 indicated by the “first area ID” having the highest total value is “R21 ID”. Is a recognition area corresponding to the recognition area of the second image 222. Similarly, the recognition area of the corresponding first image 221 is also determined for the recognition areas whose “second area ID” is “R22” to “R24”. Then, the area correspondence management information, which is information having “first area ID” and “second area ID” of the corresponding recognition area, is stored in a storage medium (not shown).

図18は、認識領域間の対応関係を示す領域対応管理情報である。領域対応管理情報は、「第二領域ID」と「第一領域ID」とを有している。   FIG. 18 shows area correspondence management information indicating the correspondence between recognition areas. The area correspondence management information has a “second area ID” and a “first area ID”.

このように、認識領域間の対応関係を取得することで、第一画像221と第二画像222とで同じ文列が配置されている認識領域に大きな変動があった場合であっても、文字の比較を行うことが可能となる。   Thus, even if there is a large variation in the recognition area where the same sentence string is arranged in the first image 221 and the second image 222 by acquiring the correspondence relationship between the recognition areas, Can be compared.

なお、対応していない認識領域間について取得した比較結果情報のレコードについては削除してよい。   Note that the record of the comparison result information acquired between the recognition areas that are not compatible may be deleted.

次に、形態素解析手段135は、第一画像221および第二画像222の、対応判断手段136により対応すると判断された認識領域の第一文字データと第二文字データとに対して、それぞれ、形態素解析を行う。   Next, the morpheme analysis unit 135 performs morpheme analysis on the first character data and the second character data in the recognition area determined to correspond by the correspondence determination unit 136 of the first image 221 and the second image 222, respectively. I do.

そして、文字データ比較手段134は、対応すると判断された各認識領域の第一文字データと第二文字データとを、形態素解析で得られた形態素ごとに、文字の配列順番に沿って比較していく。そして、文字データ比較手段134は、形態素の比較結果を示す情報である形態素比較結果情報として、比較された第一画像221の認識領域の識別情報と、比較された第二画像222の認識領域の識別情報と、比較に用いられた第一画像221の形態素と、比較に用いられた第二画像222の形態素と、比較結果である一致または不一致を示す情報とを有する情報を、図示しない記憶媒体に蓄積する。   Then, the character data comparison unit 134 compares the first character data and the second character data of each recognition area determined to correspond to each morpheme obtained by the morpheme analysis according to the character arrangement order. . Then, the character data comparison unit 134 uses the identification information of the recognition area of the compared first image 221 and the recognition area of the compared second image 222 as morpheme comparison result information that is information indicating the comparison result of the morpheme. A storage medium (not shown) including identification information, a morpheme of the first image 221 used for comparison, a morpheme of the second image 222 used for comparison, and information indicating matching or mismatching as a comparison result To accumulate.

図19は、文字データ比較手段134が図示しない記憶媒体に蓄積した形態素比較結果情報の一例を示す図である。形態素比較結果情報は、「第一領域ID」と、「第二領域ID」と、「第一形態素」と、「第二形態素」と、「比較結果」という項目を有している。「第一形態素」は、第一画像221の形態素である。「第二形態素」は、第二画像222の形態素である。「比較結果」は、対応する「第一形態素」と「第二形態素」との比較結果であり、値「一致」は、形態素が一致することを示し、「不一致」は、一致しないことを示す。   FIG. 19 is a diagram showing an example of morpheme comparison result information stored in a storage medium (not shown) by the character data comparison unit 134. The morpheme comparison result information includes items of “first region ID”, “second region ID”, “first morpheme”, “second morpheme”, and “comparison result”. The “first morpheme” is a morpheme of the first image 221. The “second morpheme” is a morpheme of the second image 222. The “comparison result” is a comparison result between the corresponding “first morpheme” and “second morpheme”, the value “match” indicates that the morphemes match, and “mismatch” indicates that they do not match. .

次に、閾値設定手段139は、閾値取得部17が取得する閾値を、第一文字画像と第二文字画像との比較に用いるか否かを判断する。ここでは、例えば、用いないことが、予め、初期設定等で設定されていたとすると、閾値受付部14は、ユーザからの閾値を受け付けるための入力インターフェース等をモニタ等に表示する。ここで、ユーザが、閾値を入力しない指示を入力したとすると、閾値設定手段139は、閾値設定手段139が設定した閾値を第一文字画像と第二文字画像との比較に用いることをユーザが選択したと判断して、比較に用いる閾値を取得する。ここでは、閾値設定手段139は、図18に示した領域対応管理情報で対応付けられている第一画像221の認識領域と第二画像222の認識領域との組ごとに閾値を取得し、設定する。例えば、閾値設定手段139は、領域対応管理情報で対応付けられている「第一領域ID」が「R04」である認識領域と、「第二領域ID」が「R21」である認識領域との各画素の輝度値をそれぞれ取得し、それぞれの認識領域の輝度値の平均を算出する。そして、第一領域の輝度値の平均値と第二領域の輝度値の平均値との差を「第一領域ID」が「R04」である認識領域内の第一文字画像と、「第二領域ID」が「R21」である認識領域内の第二文字画像との比較に用いる閾値に設定する。ここでは、例として、第二領域の輝度値の平均値から、第一領域の輝度値の平均値を減算した値を閾値に設定する。第一領域の輝度値を減算した差の平均値同様に、他の対応する認識領域にも、閾値設定手段139は、閾値を設定する。   Next, the threshold setting unit 139 determines whether or not to use the threshold acquired by the threshold acquisition unit 17 for comparison between the first character image and the second character image. Here, for example, if not used is set in advance by initial setting or the like, the threshold reception unit 14 displays an input interface or the like for receiving a threshold from the user on a monitor or the like. Here, if the user inputs an instruction not to input a threshold value, the threshold setting unit 139 selects that the threshold value set by the threshold setting unit 139 is used for comparison between the first character image and the second character image. The threshold value used for comparison is acquired. Here, the threshold value setting unit 139 acquires and sets a threshold value for each pair of the recognition area of the first image 221 and the recognition area of the second image 222 that are associated with the area correspondence management information illustrated in FIG. To do. For example, the threshold value setting unit 139 includes a recognition area whose “first area ID” is “R04” and a recognition area whose “second area ID” is “R21” associated with each other in the area correspondence management information. The brightness value of each pixel is acquired, and the average of the brightness values of each recognition area is calculated. Then, the difference between the average value of the luminance values of the first area and the average value of the luminance values of the second area is set to the first character image in the recognition area whose “first area ID” is “R04”, and “second area” The threshold is used for comparison with the second character image in the recognition area whose ID is “R21”. Here, as an example, a value obtained by subtracting the average value of the luminance values of the first region from the average value of the luminance values of the second region is set as the threshold value. The threshold value setting unit 139 sets threshold values for other corresponding recognition regions as well as the average value of the differences obtained by subtracting the luminance values of the first region.

なお、ユーザが閾値を入力した場合、ユーザが入力した閾値を用いるようにすればよい。また、ユーザが閾値を入力しない場合には、閾値設定手段139が設定する閾値を用いるか否かを、ダイアログ等を出してユーザに確認するようにし、ユーザが閾値設定手段139が設定する閾値を用いないことを指示した場合には、デフォルト等で設定されている閾値を用いるようにしても良い。   In addition, what is necessary is just to use the threshold value which the user input, when a user inputs a threshold value. When the user does not input a threshold value, a dialog or the like is issued to confirm whether or not the threshold value set by the threshold value setting unit 139 is used, and the threshold value set by the threshold value setting unit 139 is determined by the user. When it is instructed not to use, a threshold set by default or the like may be used.

つぎに、文字画像取得手段132は、図18に示した領域対応管理情報で対応付けられている第一画像221の認識領域と第二画像222の認識領域との組ごとに、第一文字画像と第二文字画像とを一文字ずつ取得する。ここでは、文字画像取得手段132は、一の認識領域の第二文字画像として、上記で検出した第二文字画像を一文字ごとに取得する。また、文字画像取得手段132は、第一画像221の一の認識領域内のテキストボックスから抽出した文字データを一文字ごとにラスタライズ(すなわちビットマップ化)することで、一の認識領域の第一文字画像を取得する。ここでは、図17に示した比較結果情報の各レコードに含まれる「第二文字画像ID」が示す第二文字画像と「第一文字」が示す第一文字データから得られた第一文字画像との組を、情報のレコードから順番に取得する。   Next, the character image acquisition unit 132 sets the first character image and the combination of the recognition region of the first image 221 and the recognition region of the second image 222 associated with the region correspondence management information shown in FIG. Acquire the second character image one character at a time. Here, the character image acquisition means 132 acquires the 2nd character image detected above for every character as a 2nd character image of one recognition area. Further, the character image acquisition unit 132 rasterizes (ie, bitmaps) the character data extracted from the text box in one recognition area of the first image 221 for each character, so that the first character image in one recognition area. To get. Here, the combination of the second character image indicated by the “second character image ID” included in each record of the comparison result information shown in FIG. 17 and the first character image obtained from the first character data indicated by the “first character”. In order from the information record.

文字画像比較手段137は、文字画像取得手段132が取得した一文字ごとの第一文字画像と第二文字画像との対応する画素の輝度値の差を算出する。なお、比較する第一文字画像と第二文字画像とのサイズ(縦横の画素数)が異なる場合、画素数が一致するよう、第一文字画像および第二文字画像の一方または両方のサイズを変更する。そして、各文字画像の同じ座標の画素を対応する画素と判断する。また、ここでは例として、第二文字画像の画素の輝度値から、第一文字画像の画素の輝度値を減算した値を、画素の輝度値の差とする。そして、この認識領域の組について閾値設定手段139が上記で設定した閾値と、算出した輝度値の差とを比較し、輝度値の差が閾値以上であれば、比較した画素を一致しない画素と判断する。判断結果は、例えば、図示しない記憶媒体等に一時記憶する。そして、同様の比較を、1の組の第一文字画像と第二文字画像との対応する画素について行った後、文字画像比較手段137は、一致しないと判断された画素数の、比較した画素数に対する比率を算出し、算出した値が予め指定された閾値以上である場合に、比較した第一文字画像と第二文字画像とが一致しないと判断し、閾値未満である場合には、一致すると判断する。そして、一致する場合は、図17に示した比較結果情報と同様の、対応するレコードの「画像比較結果」の値を、一致することを示す値である「一致」に設定し、一致しない場合は、値を、一致しないことを示す値である「不一致」に設定する。   The character image comparison unit 137 calculates a difference in luminance value of corresponding pixels between the first character image and the second character image for each character acquired by the character image acquisition unit 132. When the first character image and the second character image to be compared have different sizes (vertical and horizontal pixel numbers), the size of one or both of the first character image and the second character image is changed so that the pixel numbers match. And the pixel of the same coordinate of each character image is judged as a corresponding pixel. Here, as an example, a value obtained by subtracting the luminance value of the pixel of the first character image from the luminance value of the pixel of the second character image is set as the difference in the luminance value of the pixel. Then, the threshold value setting means 139 compares the threshold value set above with the calculated luminance value difference for the set of recognition areas. If the luminance value difference is equal to or larger than the threshold value, the compared pixels are not matched. to decide. The determination result is temporarily stored in, for example, a storage medium (not shown). Then, after the same comparison is performed for the corresponding pixels of the first character image and the second character image in one set, the character image comparison unit 137 compares the number of pixels determined to be inconsistent. When the calculated value is equal to or greater than a predetermined threshold value, it is determined that the compared first character image and the second character image do not match, and when the calculated value is less than the threshold value, they are determined to match. To do. If they match, the value of “image comparison result” of the corresponding record is set to “match”, which is a value indicating matching, similar to the comparison result information shown in FIG. Sets the value to “mismatch”, which is a value indicating that they do not match.

なお、この例において、文字画像比較手段137が、比較結果情報の各レコードに対応する文字画像を取得する場合において、一のレコードに「第二文字画像ID」または「第一文字」の一方がなかった際には、このレコードに対応する第一文字画像と第二文字画像とのいずれも読み出さないようにしても良いし、一方を読み出すが、文字画像間の比較は行わないようにしても良い。この場合、このレコードの「画像比較結果」の値は、「不一致」に設定する。   In this example, when the character image comparison unit 137 acquires a character image corresponding to each record of the comparison result information, there is no one of “second character image ID” or “first character” in one record. In this case, neither the first character image nor the second character image corresponding to this record may be read out, or one of them may be read out, but the comparison between the character images may not be performed. In this case, the value of “image comparison result” of this record is set to “mismatch”.

同様の処理を、対応付けられた一の組の認識領域の第一文字画像と第二文字画像について行った後、他の組の認識領域に関しても同様の処理を行う。   The same processing is performed for the first character image and the second character image of the associated recognition area of one set, and then the same processing is performed for the other recognition areas.

図20は、文字画像比較手段137が第一文字画像と第二文字画像との比較を行った結果得られた比較結果情報の一例を示す図である。   FIG. 20 is a diagram illustrating an example of comparison result information obtained as a result of the character image comparison unit 137 comparing the first character image and the second character image.

入替検出手段140は、図20に示したような比較結果情報を用いて、第一画像221に対して、第二画像222の文字の入替があった箇所を検出する。具体的には、入替検出手段140は、図20に示した比較結果情報の「画像比較結果」の値を、上のレコードから下のレコードに向かって順番に取得し、「画像比較結果」の値が、「不一致」である連続した複数のレコードを検出する。そして、検出した複数のレコードの「第二文字」の値の配列順番を変更して、複数の文字列を取得する。そして、取得した各文字列と、検出した複数のレコードの「第一文字」を、上のレコードから下のレコードに向かって取り出して並べた文字列とをそれぞれ比較して、一致するものがあるか否かを判断する。一致するものがあれば、文字が入れ替えられていると判断する。そして、これらの連続した複数のレコードの「入替」の値に、文字の入替があったことを示す値である「1」を入力する。一致するものが一つもなければ、文字が入れ替えられていないと判断して、「入替」の値は、空欄(例えばNULL)のままとする。   The replacement detection unit 140 detects a place where the character of the second image 222 is replaced with respect to the first image 221 using the comparison result information as shown in FIG. Specifically, the replacement detection unit 140 acquires the value of the “image comparison result” of the comparison result information illustrated in FIG. 20 in order from the upper record to the lower record, and displays the “image comparison result” value. A plurality of consecutive records whose values are “mismatch” are detected. Then, the arrangement order of the “second character” values of the detected plurality of records is changed, and a plurality of character strings are acquired. Then, compare each acquired character string with the character string in which the "first character" of the detected multiple records is extracted from the top record toward the bottom record, and whether there is a match. Judge whether or not. If there is a match, it is determined that the characters have been replaced. Then, “1”, which is a value indicating that the character has been replaced, is input as the “replacement” value of the plurality of consecutive records. If there is no match, it is determined that the character has not been replaced, and the value of “replacement” is left blank (for example, NULL).

追加検出手段141は、図20に示したような比較結果情報を用いて、第一画像221に対して、第二画像222の文字の追加があった箇所を検出する。具体的には、追加検出手段141は、図20に示した比較結果情報の「第一文字」の値と、「第二文字」の値とを、上のレコードから下のレコードに向かって順番に取得し、「第一文字」の値が空欄(NULL)で、「第二文字」の値が空欄でないレコードを検出する。そして、検出した複数のレコードの「追加」の値に、文字の追加があったことを示す値である「1」を入力する。   The addition detection unit 141 detects a portion where the character of the second image 222 has been added to the first image 221 using the comparison result information as shown in FIG. Specifically, the addition detection unit 141 sequentially sets the value of “first character” and the value of “second character” of the comparison result information shown in FIG. 20 from the upper record to the lower record. Acquired records are detected in which the value of “first character” is blank (NULL) and the value of “second character” is not blank. Then, “1”, which is a value indicating that a character has been added, is input as the “addition” value of the plurality of detected records.

削除検出手段142は、図20に示したような比較結果情報を用いて、第一画像221に対して、第二画像222の文字の削除があった箇所を検出する。具体的には、削除検出手段142は、図20に示した比較結果情報の「第一文字」の値と、「第二文字」の値とを、上のレコードから下のレコードに向かって順番に取得し、「第二文字」の値が空欄(NULL)で、「第一文字」の値が空欄でないレコードを検出する。そして、検出した複数のレコードの「削除」の値に、文字の削除があったことを示す値である「1」を入力する。   The deletion detection unit 142 uses the comparison result information as illustrated in FIG. 20 to detect a portion where the character of the second image 222 has been deleted from the first image 221. Specifically, the deletion detection unit 142 sequentially sets the value of “first character” and the value of “second character” in the comparison result information shown in FIG. 20 from the upper record to the lower record. Acquired records are detected in which the value of “second character” is blank (NULL) and the value of “first character” is not blank. Then, “1”, which is a value indicating that the character has been deleted, is input as the “delete” value of the plurality of detected records.

図21は、文字の入替や、追加や、削除の検出を行った結果得られた比較結果情報を示す図である。   FIG. 21 is a diagram illustrating comparison result information obtained as a result of character replacement, addition, or deletion detection.

出力部18は、図21に示した比較結果情報と、図15に示した第二文字画像管理情報等を用いて、第一画像221と第二画像222との比較の結果、差異があると判断した箇所を示す情報を取得して出力する。例えば、差異があると判断した箇所を示す表示用の画像を取得し、図示しないモニタ等に出力する。   The output unit 18 uses the comparison result information shown in FIG. 21 and the second character image management information shown in FIG. 15 as a result of comparison between the first image 221 and the second image 222. Obtain and output information indicating the determined location. For example, a display image indicating a location determined to have a difference is acquired and output to a monitor (not shown) or the like.

例えば、出力部18は、第二画像格納部12に格納されている第二画像222を読み出し、図15に示した第二文字画像管理情報の各レコードの「文字領域定義」が示す各領域上(即ち、各第二文字画像の領域上)に、予め指定された色の画像をオーバーレイする。このとき、図21に示した比較結果情報において、「画像比較結果」の値が「不一致」であるレコードの「第二文字画像ID」の値と一致する「第二文字画像ID」を有する第二文字画像管理情報のレコードの「文字領域定義」が示す領域上には、オーバーレイされる他の画像の色と異なる予め指定された色の画像をオーバーレイする。同様に、第一画像格納部11に格納されている第一画像221を読み出し、第一画像221に配置されている文字データの各一文字を含む最小矩形領域上に,予め指定された色の画像をオーバーレイするとともに、図21に示した比較結果情報において、「画像比較結果」の値が「不一致」であるレコードに対応する第一文字データが示す文字上には、他の文字上に配置される画像の色とは異なる色の画像をオーバーレイする。なお、「画像比較結果」の値が「不一致」である一のレコードに対応する第一文字データが示す文字は、この一のレコードと同じ「第一領域ID」を有するレコード内におけるこの一のレコードの出現順番(レコードの上から数えた配列順番)と、この一のレコードの「第一領域ID」が示す第一画像221上の認識領域内に含まれる(あるいは、認識領域と重なる)テキストボックスとを検出することによって特定可能である。例えば、上記検出されたテキストボックス内に配列された1以上の文字データのうちの、先頭からの順番が、上記で検出された出現順番が示す順番である文字が、「画像比較結果」の値が「不一致」である一のレコードに対応する第一文字データが示す文字である。一の「第一領域ID」が示す第一画像221上の認識領域内に含まれる(あるいは、認識領域と重なる)テキストボックスは、第一画像221内に認識される認識領域や第一画像221内のテキストボックスが配置される領域を定義する座標等の情報を用いて取得可能である。なお、予め、文字データを第一画像221から抽出する際に、一文字ごとの文字データについて、その文字の配置されている第一画像221内の位置(あるいは領域)を示す情報を取得するようにして、この位置(あるいは領域)を示す情報を、各文字データと対応付けて抽出文字データ管理情報で管理しておくようにすることで、この情報を用いて「画像比較結果」の値が「不一致」である一のレコードに対応する第一文字データが示す文字の位置(あるいは領域)を、第一画像221内において検出できるようにしても良い。   For example, the output unit 18 reads the second image 222 stored in the second image storage unit 12, and stores the second image 222 on each region indicated by “character region definition” of each record of the second character image management information illustrated in FIG. 15. In other words, an image of a color designated in advance is overlaid on the area of each second character image. At this time, in the comparison result information shown in FIG. 21, the second character image ID having the “second character image ID” that matches the value of the “second character image ID” of the record whose “image comparison result” value is “mismatch”. An image of a predesignated color different from the color of the other image to be overlaid is overlaid on the area indicated by “character area definition” of the record of the two-character image management information. Similarly, the first image 221 stored in the first image storage unit 11 is read out, and an image of a color designated in advance is placed on the minimum rectangular area including each character of the character data arranged in the first image 221. 21 is overlaid on other characters on the character indicated by the first character data corresponding to the record whose “image comparison result” value is “mismatch” in the comparison result information shown in FIG. Overlay an image with a color different from the image color. The character indicated by the first character data corresponding to the one record whose “image comparison result” value is “mismatch” is the one record in the record having the same “first region ID” as the one record. Text box included in the recognition area on the first image 221 (or overlapping the recognition area) indicated by the order of appearance (array order counted from the top of the record) and the “first area ID” of this one record Can be identified by detecting. For example, among the one or more character data arranged in the detected text box, the character whose order from the top is the order indicated by the appearance order detected above is the value of “image comparison result”. Is a character indicated by the first character data corresponding to one record in which “mismatch” is present. A text box included in the recognition area on the first image 221 indicated by one “first area ID” (or overlapping with the recognition area) is a recognition area or first image 221 recognized in the first image 221. It can be obtained using information such as coordinates that define the area in which the text box is placed. When character data is extracted from the first image 221 in advance, information indicating the position (or region) in the first image 221 where the character is arranged is acquired for each character data. Thus, information indicating this position (or region) is associated with each character data and managed in the extracted character data management information, so that the value of “image comparison result” is “ The position (or region) of the character indicated by the first character data corresponding to one record that is “mismatch” may be detected in the first image 221.

そして、このようにして、色のついた画像をオーバーレイして取得した第一画像221と第二画像222とをモニタに表示することで、差異のある箇所を示した第一画像221と第二画像222とを表示することができる。   Then, the first image 221 and the second image 222 obtained by overlaying the colored images in this way are displayed on the monitor, whereby the first image 221 and the second image showing the difference are displayed. An image 222 can be displayed.

なお、ここでは、「画像比較結果」の値が「不一致」である文字上に、他と異なる色の画像をオーバーレイ表示するようにしたが、「比較結果」の値が「不一致」である文字上に、他と異なる色の画像をオーバーレイ表示するようにしても良い。   In this example, an image of a color different from the other color is overlaid on the character whose “image comparison result” value is “mismatched”, but the character whose “comparison result” value is “mismatch”. In addition, an image of a color different from the others may be displayed in an overlay manner.

また、出力部18は、レイアウト認識手段131が認識した一の認識領域内に、差異のある箇所が検出された場合に、第一画像221や第二画像222のこの認識領域全体を、予め指定された色の画像でオーバーレイ表示するようにしても良い。   Further, the output unit 18 designates the entire recognition area of the first image 221 and the second image 222 in advance when a difference is detected in one recognition area recognized by the layout recognition unit 131. It is also possible to display an overlay with an image of the selected color.

図22は、差異のある箇所を示した第一画像221と第二画像222との表示例を示す図である。図において、領域220は差異のある箇所をオーバーレイ表示した部分である。図においては、第一画像221と、第二画像222とを並べて表示している。これにより、差異のある箇所を、ユーザに知らせることができる。   FIG. 22 is a diagram illustrating a display example of the first image 221 and the second image 222 showing a portion having a difference. In the figure, an area 220 is a portion where a difference is displayed as an overlay. In the figure, a first image 221 and a second image 222 are displayed side by side. Thereby, a user can be notified of a part with a difference.

また、ユーザが、図示しない受付部等を介して、画像検査装置1に、文字の入れ替わった箇所を表示する指示を与えたとする。出力部18は、図22に示した差異の箇所を示した表示において、「画像比較結果」の値が「不一致」である文字上に、他の文字とは異なる色の画像をオーバーレイする代わりに、図21に示した比較結果情報において、「入替」の値が「1」であるレコードの「第二文字画像ID」の値と一致する「第二文字画像ID」を有する第二文字画像管理情報のレコードの「文字領域定義」が示す領域上に、他の文字上にオーバーレイされる画像とは異なる色の画像をオーバーレイする。第一画像221についても同様である。   Further, it is assumed that the user gives an instruction to display the place where the character is replaced to the image inspection apparatus 1 via a reception unit (not shown) or the like. In the display showing the difference portion shown in FIG. 22, the output unit 18 instead of overlaying an image of a color different from that of other characters on the character whose “image comparison result” value is “mismatch”. 21, the second character image management having “second character image ID” that matches the value of “second character image ID” of the record whose “replacement” value is “1”. An image of a color different from the image overlaid on another character is overlaid on the region indicated by the “character region definition” of the information record. The same applies to the first image 221.

図23は、文字の入れ替えがあった箇所を示した第一画像221と第二画像222との表示例を示す図である。図において、領域230は差異のある箇所をオーバーレイ表示した部分である。これにより、文字の入れ替わった箇所をユーザに知らせることができる。   FIG. 23 is a diagram showing a display example of the first image 221 and the second image 222 showing the places where characters have been replaced. In the figure, a region 230 is a portion where a difference is displayed in an overlay manner. Thereby, it is possible to notify the user of the place where the character is changed.

また、ユーザが、図示しない受付部等を介して、画像検査装置1に、文字が追加された箇所を表示する指示を与えたとする。出力部18は、図22に示した差異の箇所を示した表示において、「画像比較結果」の値が「不一致」である文字上に、他の文字とは異なる色の画像をオーバーレイする代わりに、図21に示した比較結果情報において、「追加」の値が「1」であるレコードの「第二文字画像ID」の値と一致する「第二文字画像ID」を有する第二文字画像管理情報のレコードの「文字領域定義」が示す領域上に、他の文字上にオーバーレイされる画像とは異なる色の画像をオーバーレイする。第一画像221についても同様である。   Further, it is assumed that the user gives an instruction to display the location where the character is added to the image inspection apparatus 1 via a reception unit (not shown) or the like. In the display showing the difference portion shown in FIG. 22, the output unit 18 instead of overlaying an image of a color different from that of other characters on the character whose “image comparison result” value is “mismatch”. 21, the second character image management having “second character image ID” that matches the value of “second character image ID” of the record whose “addition” value is “1” in the comparison result information shown in FIG. An image of a color different from the image overlaid on another character is overlaid on the region indicated by the “character region definition” of the information record. The same applies to the first image 221.

図24は、文字の追加があった箇所を示した第一画像221と第二画像222との表示例を示す図である。図において、領域240は差異のある箇所をオーバーレイ表示した部分である。これにより、文字が追加された箇所をユーザに知らせることができる。   FIG. 24 is a diagram showing a display example of the first image 221 and the second image 222 showing the places where characters have been added. In the figure, a region 240 is a portion where a difference is displayed in an overlay manner. As a result, the user can be notified of the location where the character has been added.

また、ユーザが、図示しない受付部等を介して、画像検査装置1に、文字が削除された箇所を表示する指示を与えたとする。出力部18は、図22に示した差異の箇所を示した表示において、「画像比較結果」の値が「不一致」である文字上に、他の文字とは異なる色の画像をオーバーレイする代わりに、図21に示した比較結果情報において、「削除」の値が「1」であるレコードの「第二文字画像ID」の値と一致する「第二文字画像ID」を有する第二文字画像管理情報のレコードの「文字領域定義」が示す領域上に、他の文字上にオーバーレイされる画像とは異なる色の画像をオーバーレイする。第一画像221についても同様である。   Further, it is assumed that the user gives an instruction to display the location where the character has been deleted to the image inspection apparatus 1 via a reception unit (not shown). In the display showing the difference portion shown in FIG. 22, the output unit 18 instead of overlaying an image of a color different from that of other characters on the character whose “image comparison result” value is “mismatch”. In the comparison result information shown in FIG. 21, the second character image management having “second character image ID” that matches the value of “second character image ID” of the record whose “delete” value is “1”. An image of a color different from the image overlaid on another character is overlaid on the region indicated by the “character region definition” of the information record. The same applies to the first image 221.

図25は、文字の削除があった箇所を示した第一画像221と第二画像222との表示例を示す図である。図において、領域250は差異のある箇所をオーバーレイ表示した部分である。これにより、文字が削除された箇所をユーザに知らせることができる。   FIG. 25 is a diagram showing a display example of the first image 221 and the second image 222 showing the locations where characters have been deleted. In the figure, a region 250 is a portion where a difference is displayed as an overlay. As a result, the user can be notified of the location where the character has been deleted.

また、ユーザが、図示しない受付部等を介して、画像検査装置1に、形態素解析を利用して検出した差異の箇所を表示する指示を与えたとする。出力部18は、図19に示した形態素解析結果情報の上のレコードから下のレコードに向かって順番に、「第一形態素」と「第二形態素」との値をそれぞれ分けて取得して、取得順に従ってそれぞれを配列した文字列の画像を取得するとともに、この画像の「比較結果」の値が「一致」である形態素上の領域と、「不一致」である形態素上の領域とに、それぞれ、予め指定された異なる色の画像をオーバーレイする。このようにして取得した画像を出力部18が、図示しないモニタ等に表示する。   In addition, it is assumed that the user gives an instruction to display the difference portion detected using morphological analysis to the image inspection apparatus 1 via a reception unit (not shown). The output unit 18 acquires the values of the “first morpheme” and the “second morpheme” in order from the upper record to the lower record of the morpheme analysis result information shown in FIG. Acquire images of character strings arranged in accordance with the acquisition order, and each of the regions on the morpheme where the value of the “comparison result” is “match” and the region on the morpheme that is “mismatch” , Overlay images of different colors specified in advance. The output unit 18 displays the image acquired in this manner on a monitor or the like (not shown).

図26は、形態素解析による差異の箇所の検出結果を示す表示例である。図において、領域261は、検出された差異の箇所を示している。なお、ここでは、文字だけを表示したが、図22に示すように、第一画像221や第二画像222上の、各形態素に対応する文字が配置されている領域を検出して、検出した領域上に、形態素の比較結果の値に応じた色の画像をオーバーレイ表示しても良い。   FIG. 26 is a display example showing a detection result of a difference portion by morphological analysis. In the figure, an area 261 indicates the location of the detected difference. Although only the characters are displayed here, as shown in FIG. 22, the areas where the characters corresponding to the morphemes are arranged on the first image 221 and the second image 222 are detected and detected. An image of a color corresponding to the value of the morpheme comparison result may be overlaid on the area.

ここで、例えば、図22に示すような差異が検出された箇所が表示されている状態において、誤って検出されている箇所を発見したとする。例えば、対応する一の第一文字画像と一の第二文字画像とが同じ文字であるのに、差異のある箇所として検出されている箇所、あるいは、対応する一の第一文字画像と一の第二文字画像とが異なる文字であるのに、差異のない箇所として検出されている箇所を、ユーザが発見したとする。ユーザが、第二画像222上において、このような箇所に位置する文字を、マウス等を操作してクリックすることで、画像検査装置1が誤認した箇所として指定したとすると、評価結果受付部15は、クリックされた位置の第二文字画像について、文字画像比較手段137の判断は、誤りであることを示す評価結果を受け付ける。また、評価結果受付部15は、クリックされなかった位置の第二文字画像について、判断が正しいという評価結果を受け付ける。   Here, for example, it is assumed that a location where a difference is detected as shown in FIG. For example, a corresponding one first character image and one second character image are the same character, but are detected as different portions, or corresponding one first character image and one second character image. It is assumed that the user has found a portion detected as a portion having no difference even though the character image is a different character. If the user designates a character positioned at such a location on the second image 222 as a location that the image inspection apparatus 1 misidentifies by clicking with a mouse or the like, the evaluation result receiving unit 15 The character image comparison means 137 accepts an evaluation result indicating that the second character image at the clicked position is erroneous. The evaluation result receiving unit 15 receives an evaluation result indicating that the determination is correct for the second character image at the position where the click has not been made.

輝度値取得部16は、評価結果受付部15が受け付けた評価結果ごとに、評価結果を受け付けた各第二文字画像と、各第二文字画像のそれぞれと比較された第一文字画像とを取得し、評価結果ごとに、第一文字画像と第二文字画像とから輝度値に関する情報を取得する。輝度値に関する情報は、種類が多い方が好ましい。例えば輝度値に関する情報として、第一文字画像の輝度の平均値、中央値、最大値、最小値や、第二文字画像の輝度の平均値、中央値、最大値、最小値を取得する。また、第一文字画像および第二文字画像における最も出現数が多い輝度等も取得する。また、輝度値取得部16は、評価結果ごとに、文字画像比較手段137が第一文字画像と第二文字画像との各画素が一致するか否かを判断するために利用した輝度値の差の閾値を取得する。   The luminance value acquisition unit 16 acquires, for each evaluation result received by the evaluation result reception unit 15, a second character image that has received the evaluation result and a first character image that has been compared with each of the second character images. For each evaluation result, information on the brightness value is acquired from the first character image and the second character image. It is preferable that there are many types of information regarding luminance values. For example, as the information about the brightness value, the average value, median value, maximum value, and minimum value of the brightness of the first character image, and the average value, median value, maximum value, and minimum value of the brightness of the second character image are acquired. Further, the luminance and the like having the highest number of appearances in the first character image and the second character image are also acquired. In addition, the luminance value acquisition unit 16 determines, for each evaluation result, the difference between the luminance values used by the character image comparison unit 137 to determine whether or not the pixels of the first character image and the second character image match. Get the threshold.

上記で取得された評価結果ごとの、評価結果と、輝度値に関する情報と、閾値との組を、閾値取得部17は教師データとして学習する。   For each evaluation result acquired above, the threshold acquisition unit 17 learns a set of the evaluation result, information about the luminance value, and the threshold as teacher data.

そして、文字画像比較手段137が、第一文字画像と第二文字画像の画素が一致するか否かを判断する閾値として、閾値設定手段139が設定した閾値を用いるよう、図示しない受付部等を介してユーザが画像検査装置1に設定を行ったとする。   Then, the character image comparison unit 137 uses a threshold value set by the threshold value setting unit 139 as a threshold value for determining whether or not the pixels of the first character image and the second character image coincide with each other via a reception unit (not shown). Assume that the user has set the image inspection apparatus 1.

この場合、文字画像比較手段137が、一の第一文字画像と一の第二文字画像との対応する画素の比較を行う直前に、毎回、輝度値取得部16は、比較対象となる各第一文字画像と第二文字画像とから、上記と同様の項目の輝度値に関する情報を取得する。そして、閾値取得部17は、この輝度値に関する情報と、予め用意された複数の閾値のそれぞれとの組合せを入力として受け付け、各閾値ごとに、評価の結果を出力する。出力される閾値ごとの評価の結果は、一の閾値を用いて、比較対象となる第一文字画像と第二画像222との対応する画素の差を評価した場合に、その評価結果が正しいものであるか、誤ったものであるかを示す値である。このため、閾値取得部17は、評価結果が正しいものとなる閾値の中から、一の閾値(ここでは、最も値が小さい閾値)を取得し、閾値格納手段138に一時記憶する。そして、文字画像比較手段137は、この一の第一文字画像と第二文字画像の画素が一致するか否かの判断をこの閾値を用いて行う。これにより、学習結果を利用した閾値による画素の比較が可能となる。   In this case, immediately before the character image comparison means 137 compares the corresponding pixels of one first character image and one second character image, the luminance value acquisition unit 16 makes each first character to be compared. From the image and the second character image, information related to the brightness value of the item similar to the above is acquired. The threshold acquisition unit 17 receives a combination of information on the luminance value and each of a plurality of thresholds prepared in advance as an input, and outputs an evaluation result for each threshold. The result of evaluation for each threshold value that is output is that the evaluation result is correct when the difference between corresponding pixels of the first character image to be compared and the second image 222 is evaluated using one threshold value. It is a value indicating whether or not there is an error. For this reason, the threshold value acquisition unit 17 acquires one threshold value (here, the threshold value with the smallest value) from the threshold values at which the evaluation result is correct, and temporarily stores it in the threshold value storage means 138. Then, the character image comparing means 137 uses this threshold value to determine whether or not the pixels of the first character image and the second character image match. Thereby, the pixel comparison by the threshold value using the learning result becomes possible.

なお、本具体例においては、第一画像221から予め文字データが抽出されている場合について説明したが、本発明は、文字データが予め抽出されていなくても適用可能なものであり、例えば、文字データが予め抽出されていない場合には、第二画像222から第二文字データや第二文字画像を取得する処理と同様の処理を、第一画像221に対しても行うようにすればよい。   In this specific example, the case where character data is extracted in advance from the first image 221 has been described. However, the present invention is applicable even if character data is not extracted in advance, for example, If character data has not been extracted in advance, the same processing as that for acquiring the second character data or the second character image from the second image 222 may be performed on the first image 221 as well. .

以上、本実施の形態によれば、第一画像221と第二画像222とから取得した文字の画像を比較することで、第一画像221と第二画像222との差異の箇所を検出するようにしたため、レイアウトの違いや文字サイズの違いの有無にかかわらず、実質的な情報の有無で画像間の内容の差異を検出することができる。   As described above, according to the present embodiment, the difference between the first image 221 and the second image 222 is detected by comparing the character images acquired from the first image 221 and the second image 222. Therefore, the difference in content between images can be detected by the presence or absence of substantial information regardless of the difference in layout or the difference in character size.

また、第一画像221と第二画像222とのそれぞれにおいてレイアウト認識を行って検出した認識領域について、対応する認識領域を判断し、対応する認識領域間において文字の比較を行うようにしたことにより、文字の配置されている認識領域が大きく変更されていても、正しく文字の比較を行うことができる。   In addition, for the recognition areas detected by performing the layout recognition in each of the first image 221 and the second image 222, the corresponding recognition area is determined, and the characters are compared between the corresponding recognition areas. Even if the recognition area in which the characters are arranged has been greatly changed, the characters can be compared correctly.

なお、本実施の形態においては、レイアウト認識手段131が第一画像221及び第二画像222に対してレイアウト認識を行って認識領域を検出し、対応判断手段136が対応する認識領域を検出して文字画像比較手段が、対応する認識領域間で文字の画像の比較を行うようにしたが、第一画像221と第二画像222とで文字のレイアウトに大きな違いがない場合や、テキストボックスが、それぞれの画像に一つしかない場合等には、レイアウトの認識処理は行わないようにしても良く、この場合、レイアウト認識手段131等は省略可能である。また、ここでは、文字画像から取得した文字データを併用したが、文字データを用いた文字の比較は省略して、第一画像221及び第二画像222に配置されている文字について、文字画像による比較だけを行うようにしてもよい。   In the present embodiment, the layout recognition unit 131 performs layout recognition on the first image 221 and the second image 222 to detect a recognition region, and the correspondence determination unit 136 detects a corresponding recognition region. The character image comparison means compares the character images between the corresponding recognition regions. If there is no significant difference in the character layout between the first image 221 and the second image 222, If there is only one image, the layout recognition process may not be performed. In this case, the layout recognition unit 131 and the like can be omitted. Here, the character data acquired from the character image is used together, but the comparison of the characters using the character data is omitted, and the characters arranged in the first image 221 and the second image 222 depend on the character image. Only the comparison may be performed.

なお、上記各実施の形態において、各処理(各機能)は、単一の装置(システム)によって集中処理されることによって実現されてもよく、あるいは、複数の装置によって分散処理されることによって実現されてもよい。   In each of the above embodiments, each process (each function) may be realized by centralized processing by a single device (system), or by distributed processing by a plurality of devices. May be.

また、上記各実施の形態では、画像検査装置がスタンドアロンである場合について説明したが、画像検査装置は、スタンドアロンの装置であってもよく、サーバ・クライアントシステムにおけるサーバ装置であってもよい。後者の場合には、出力部や受付部は、通信回線を介して入力を受け付けたり、画面を出力したりすることになる。   Further, although cases have been described with the above embodiments where the image inspection apparatus is a stand-alone, the image inspection apparatus may be a stand-alone apparatus or a server apparatus in a server / client system. In the latter case, the output unit or the reception unit receives an input or outputs a screen via a communication line.

また、上記各実施の形態において、検出部13、輝度値取得部16、閾値取得部17等の各構成要素は専用のハードウェアにより構成されてもよく、あるいは、ソフトウェアにより実現可能な構成要素については、プログラムを実行することによって実現されてもよい。例えば、ハードディスクや半導体メモリ等の記録媒体に記録されたソフトウェア・プログラムをCPU等のプログラム実行部が読み出して実行することによって、各構成要素が実現され得る。その実行時に、プログラム実行部は、格納部(例えば、ハードディスクやメモリ等の記録媒体)にアクセスしながらプログラムを実行してもよい。   In each of the above embodiments, each component such as the detection unit 13, the luminance value acquisition unit 16, and the threshold acquisition unit 17 may be configured by dedicated hardware, or a component that can be realized by software. May be realized by executing a program. For example, each component can be realized by a program execution unit such as a CPU reading and executing a software program recorded on a recording medium such as a hard disk or a semiconductor memory. At the time of execution, the program execution unit may execute the program while accessing a storage unit (for example, a recording medium such as a hard disk or a memory).

なお、上記各実施の形態における画像検査装置を実現するソフトウェアは、以下のようなプログラムである。つまり、このプログラムは、第一画像が格納される第一画像格納部と、第二画像が格納される第二画像格納部と、にアクセス可能なコンピュータを、第一画像と第二画像とを比較して、差異の箇所を検出する検出部と、検出部が検出した差異の箇所を示す情報を出力する出力部として機能させるためのプログラムであって、検出部は、第一画像と第二画像とからそれぞれ文字の画像を取得する文字画像取得手段と、第一画像から取得した文字の画像である1以上の第一文字画像と、第二画像から取得した文字の画像である1以上の第二文字画像とを比較して、差異の箇所を検出する文字画像比較手段とを備えたプログラムである。   The software that realizes the image inspection apparatus in each of the above embodiments is the following program. In other words, the program sets up a computer that can access the first image storage unit in which the first image is stored and the second image storage unit in which the second image is stored. Comparing, a program for functioning as a detection unit that detects a location of a difference and an output unit that outputs information indicating the location of the difference detected by the detection unit. A character image acquisition means for acquiring a character image from each of the images; one or more first character images that are character images acquired from the first image; and one or more first characters that are character images acquired from the second image. This is a program comprising character image comparing means for comparing two character images and detecting a difference portion.

なお、上記プログラムにおいて、情報を送信する送信ステップや、情報を受信する受信ステップなどでは、ハードウェアによって行われる処理、例えば、送信ステップにおけるモデムやインターフェースカードなどで行われる処理(ハードウェアでしか行われない処理)は含まれない。   In the above program, in a transmission step for transmitting information, a reception step for receiving information, etc., processing performed by hardware, for example, processing performed by a modem or an interface card in the transmission step (only performed by hardware). Not included) is not included.

なお、上記プログラムにおいて、上記プログラムが実現する機能には、ハードウェアでしか実現できない機能は含まれない。例えば、情報を取得する取得部や、情報を出力する出力部などにおけるモデムやインターフェースカードなどのハードウェアでしか実現できない機能は、上記プログラムが実現する機能には含まれない。   In the program, the functions realized by the program do not include functions that can be realized only by hardware. For example, a function that can be realized only by hardware such as a modem or an interface card in an acquisition unit that acquires information or an output unit that outputs information is not included in the function realized by the program.

また、このプログラムを実行するコンピュータは、単数であってもよく、複数であってもよい。すなわち、集中処理を行ってもよく、あるいは分散処理を行ってもよい。   Further, the computer that executes this program may be singular or plural. That is, centralized processing may be performed, or distributed processing may be performed.

図27は、上記プログラムを実行して、上記実施の形態による画像検査装置を実現するコンピュータの外観の一例を示す模式図である。上記実施の形態は、コンピュータハードウェア及びその上で実行されるコンピュータプログラムによって実現されうる。   FIG. 27 is a schematic diagram illustrating an example of an external appearance of a computer that executes the program and realizes the image inspection apparatus according to the embodiment. The above-described embodiment can be realized by computer hardware and a computer program executed on the computer hardware.

図27において、コンピュータシステム900は、CD−ROM(Compact Disk Read Only Memory)ドライブ905、FD(Floppy(登録商標) Disk)ドライブ906を含むコンピュータ901と、キーボード902と、マウス903と、モニタ904とを備える。   27, a computer system 900 includes a computer 901 including a CD-ROM (Compact Disk Read Only Memory) drive 905 and an FD (Floppy (registered trademark) Disk) drive 906, a keyboard 902, a mouse 903, a monitor 904, and the like. Is provided.

図28は、コンピュータシステム900の内部構成を示す図である。図28において、コンピュータ901は、CD−ROMドライブ905、FDドライブ906に加えて、MPU(Micro Processing Unit)911と、ブートアッププログラム等のプログラムを記憶するためのROM912と、MPU911に接続され、アプリケーションプログラムの命令を一時的に記憶すると共に、一時記憶空間を提供するRAM(Random Access Memory)913と、アプリケーションプログラム、システムプログラム、及びデータを記憶するハードディスク914と、MPU911、ROM912等を相互に接続するバス915とを備える。なお、コンピュータ901は、LANへの接続を提供する図示しないネットワークカードを含んでいてもよい。   FIG. 28 is a diagram showing an internal configuration of the computer system 900. 28, in addition to the CD-ROM drive 905 and the FD drive 906, a computer 901 is connected to an MPU (Micro Processing Unit) 911, a ROM 912 for storing a program such as a bootup program, and the MPU 911. A RAM (Random Access Memory) 913 that temporarily stores program instructions and provides a temporary storage space, a hard disk 914 that stores application programs, system programs, and data, and an MPU 911 and a ROM 912 are interconnected. And a bus 915. The computer 901 may include a network card (not shown) that provides connection to the LAN.

コンピュータシステム900に、上記実施の形態による画像検査装置等の機能を実行させるプログラムは、CD−ROM921、またはFD922に記憶されて、CD−ROMドライブ905、またはFDドライブ906に挿入され、ハードディスク914に転送されてもよい。これに代えて、そのプログラムは、図示しないネットワークを介してコンピュータ901に送信され、ハードディスク914に記憶されてもよい。プログラムは実行の際にRAM913にロードされる。なお、プログラムは、CD−ROM921やFD922、またはネットワークから直接、ロードされてもよい。   A program that causes the computer system 900 to execute the functions of the image inspection apparatus and the like according to the above-described embodiment is stored in the CD-ROM 921 or FD 922, inserted into the CD-ROM drive 905 or FD drive 906, and stored in the hard disk 914. May be forwarded. Instead, the program may be transmitted to the computer 901 via a network (not shown) and stored in the hard disk 914. The program is loaded into the RAM 913 when executed. The program may be loaded directly from the CD-ROM 921, the FD 922, or the network.

プログラムは、コンピュータ901に、上記実施の形態による画像検査装置の機能を実行させるオペレーティングシステム(OS)、またはサードパーティプログラム等を必ずしも含んでいなくてもよい。プログラムは、制御された態様で適切な機能(モジュール)を呼び出し、所望の結果が得られるようにする命令の部分のみを含んでいてもよい。コンピュータシステム900がどのように動作するのかについては周知であり、詳細な説明は省略する。   The program does not necessarily include an operating system (OS) or a third party program that causes the computer 901 to execute the functions of the image inspection apparatus according to the above embodiment. The program may include only a part of an instruction that calls an appropriate function (module) in a controlled manner and obtains a desired result. How the computer system 900 operates is well known and will not be described in detail.

本発明は、以上の実施の形態に限定されることなく、種々の変更が可能であり、それらも本発明の範囲内に包含されるものであることは言うまでもない。   The present invention is not limited to the above-described embodiments, and various modifications are possible, and it goes without saying that these are also included in the scope of the present invention.

以上のように、本発明にかかる画像検査装置等は、画像間の差異の箇所を検査する装置等として適しており、特に、画像間の文字についての差異の箇所を検査する装置等として有用である。   As described above, the image inspection apparatus according to the present invention is suitable as an apparatus for inspecting a difference between images, and particularly useful as an apparatus for inspecting a difference between characters between images. is there.

1 画像検査装置
11 第一画像格納部
12 第二画像格納部
13 検出部
14 閾値受付部
15 評価結果受付部
16 輝度値取得部
17 閾値取得部
18 出力部
131 レイアウト認識手段
132 文字画像取得手段
133 文字データ取得手段
134 文字データ比較手段
135 形態素解析手段
136 対応判断手段
137 文字画像比較手段
138 閾値格納手段
139 閾値設定手段
140 入替検出手段
141 追加検出手段
142 削除検出手段
DESCRIPTION OF SYMBOLS 1 Image inspection apparatus 11 1st image storage part 12 2nd image storage part 13 Detection part 14 Threshold value reception part 15 Evaluation result reception part 16 Luminance value acquisition part 17 Threshold value acquisition part 18 Output part 131 Layout recognition means 132 Character image acquisition means 133 Character data acquisition means 134 Character data comparison means 135 Morphological analysis means 136 Correspondence determination means 137 Character image comparison means 138 Threshold storage means 139 Threshold setting means 140 Replacement detection means 141 Additional detection means 142 Deletion detection means

Claims (11)

2以上の文字を含む第一画像が格納される第一画像格納部と、
2以上の文字を含む第二画像が格納される第二画像格納部と、
前記第一画像と第二画像とを比較して、差異の箇所を検出する検出部と、
前記検出部が検出した差異の箇所を示す情報を出力する出力部とを備え、
前記検出部は、
前記第一画像と第二画像とからそれぞれ文字の画像を取得する文字画像取得手段と、
前記第一画像に含まれる文字の画像に対応する文字データである2以上の第一文字データと、前記第二画像に含まれる文字の画像に対応する文字データである2以上の第二文字データとを取得する文字データ取得手段と、
前記文字データ取得手段が取得した第一文字データと、第二文字データとを、配列順番に沿って比較して差異の箇所を検出する文字データ比較手段と、
前記第一画像から取得した文字の画像である2以上の第一文字画像と、前記第二画像から取得した文字の画像である2以上の第二文字画像とであって、前記文字データ比較手段により比較された第一文字データと第二文字データとにそれぞれ対応する第一文字画像と第二文字画像とをそれぞれ構成する画素の画素値を比較して、差異の箇所を検出する文字画像比較手段とを備え
前記出力部は、前記文字データ比較手段が検出した差異の箇所を示す情報と、前記文字画像比較手段が検出した差異の箇所を示す情報とを出力する画像検査装置。
A first image storage unit storing a first image including two or more characters;
A second image storage unit that stores a second image including two or more characters;
A detector for comparing the first image with the second image to detect a difference portion;
An output unit that outputs information indicating the location of the difference detected by the detection unit;
The detector is
A character image acquisition means for acquiring a character image from each of the first image and the second image;
Two or more first character data that is character data corresponding to a character image included in the first image; and two or more second character data that are character data corresponding to a character image included in the second image; Character data acquisition means for acquiring
Character data comparison means for comparing the first character data acquired by the character data acquisition means and the second character data in the arrangement order to detect a difference portion;
Two or more first character images that are character images acquired from the first image, and two or more second character images that are character images acquired from the second image, the character data comparing means Character image comparison means for comparing pixel values of pixels constituting the first character image and the second character image respectively corresponding to the compared first character data and second character data, and detecting a difference portion Prepared ,
The image output apparatus, wherein the output unit outputs information indicating a difference location detected by the character data comparison means and information indicating a difference location detected by the character image comparison means .
前記検出部は、前記第一文字画像に対して前記第二文字画像の文字が入れ替わっている箇所を検出する入替検出手段を更に備え、
前記出力部は、前記入替検出手段が検出した文字が入れ替わっている箇所を示す情報を出力する請求項1記載の画像検査装置。
The detection unit further includes a replacement detection means for detecting a place where the character of the second character image is replaced with respect to the first character image,
The image inspection apparatus according to claim 1, wherein the output unit outputs information indicating a place where a character detected by the replacement detection unit is replaced.
前記検出部は、前記第一文字画像に対して前記第二文字画像の1以上の文字が追加されている箇所を検出する追加検出手段を更に備え、
前記出力部は、前記追加検出手段が検出した文字が追加されている箇所を示す情報を出力する請求項1または請求項2記載の画像検査装置。
The detection unit further includes an additional detection unit that detects a location where one or more characters of the second character image are added to the first character image,
The image inspection apparatus according to claim 1, wherein the output unit outputs information indicating a location where the character detected by the addition detection unit is added.
前記検出部は、前記第一文字画像に対して前記第二文字画像の1以上の文字が削除されている箇所を検出する削除検出手段を更に備え、
前記出力部は、前記削除検出手段が検出した文字が削除されている箇所を示す情報を出力する請求項1から請求項3いずれか記載の画像検査装置。
The detection unit further includes a deletion detection unit that detects a location where one or more characters of the second character image are deleted from the first character image,
The image inspection apparatus according to claim 1, wherein the output unit outputs information indicating a location where the character detected by the deletion detection unit is deleted.
前記検出部は、
前記文字データ取得手段が取得した第一文字データおよび第二文字データについてそれぞれ形態素解析を行う形態素解析手段を更に備え、
前記文字データ比較手段は、前記形態素解析により前記第一文字データおよび第二文字データについてそれぞれ得られた形態素または単語を比較して、差異の箇所を検出する請求項1記載の画像検査装置。
The detector is
Morphological analysis means for performing morphological analysis for each of the first character data and the second character data acquired by the character data acquisition means,
The image inspection apparatus according to claim 1, wherein the character data comparison unit compares morphemes or words respectively obtained for the first character data and the second character data by the morphological analysis, and detects a difference portion.
前記検出部は、第一画像と第二画像とについてそれぞれレイアウトの認識を行って、1以上の領域をそれぞれ検出するレイアウト認識手段と、
前記レイアウト認識手段が第一画像について認識した1以上の領域と、第二画像について認識した1以上の領域との対応関係を判断する対応判断手段とを更に備え、
前記文字データ比較手段は、前記レイアウト認識手段が、前記第一画像について認識した1以上の領域と、第二画像について認識した1以上の領域との組合せについて、各認識した領域毎に取得された第一文字画像に対応する第一文字データと第二文字画像に対応する第二文字データとを配列順番に沿って比較して差異の箇所を検出し、
前記対応判断手段は、前記文字データ比較手段が、前記第一画像について認識した1以上の領域と、第二画像について認識した1以上の領域との組合せについて行なった第一文字データと第二文字データとの差異の箇所の検出結果に応じて、対応する領域を判断し、
前記文字画像取得手段は、前記対応判断手段が対応すると判断した領域の組ごとにそれぞれ前記第一文字画像と第二文字画像とを取得し、
前記文字画像比較手段は、前記各領域ごとに第一文字画像と、第二文字画像とを比較して、差異の箇所を検出する請求項1から請求項5いずれか記載の画像検査装置。
The detection unit performs layout recognition for each of the first image and the second image, and detects one or more regions;
Correspondence determining means for determining a correspondence relationship between one or more areas recognized by the layout recognition means for the first image and one or more areas recognized for the second image;
The character data comparing means is acquired for each recognized area for a combination of one or more areas recognized by the layout recognition means for the first image and one or more areas recognized for the second image. The first character data corresponding to the first character image and the second character data corresponding to the second character image are compared along the arrangement order to detect a difference portion,
The correspondence determination means includes first character data and second character data that the character data comparison means performs for a combination of one or more areas recognized for the first image and one or more areas recognized for the second image. According to the detection result of the difference between and the corresponding area,
The character image acquisition means acquires the first character image and the second character image for each set of regions determined to be supported by the correspondence determination means,
The image inspection apparatus according to claim 1, wherein the character image comparison unit compares the first character image and the second character image for each region to detect a difference portion.
前記文字画像比較手段は、少なくとも前記第一画像と第二画像とをそれぞれ構成する画素の輝度値の差を閾値と比較して差異の箇所を検出するものであり、
前記検出部は、前記第一画像と第二画像とをそれぞれ構成する画素の輝度値の差を統計処理することで得られた値を前記閾値に設定する閾値設定手段を備えた請求項1から請求項6記載の画像検査装置。
The character image comparison means detects a difference portion by comparing a difference between luminance values of pixels constituting at least the first image and the second image with a threshold value,
The detection unit includes a threshold setting unit that sets a value obtained by statistically processing a difference in luminance value of pixels constituting the first image and the second image as the threshold. The image inspection apparatus according to claim 6.
閾値の入力を受け付ける閾値受付部を更に備え、
前記文字画像比較手段は、少なくとも前記第一画像と第二画像とをそれぞれ構成する画素の輝度値の差を前記閾値受付部が受け付けた閾値と比較して差異の箇所を検出する請求項1から請求項7記載の画像検査装置。
A threshold receiving unit for receiving a threshold input;
The character image comparison unit detects a difference portion by comparing a difference in luminance value of pixels constituting at least the first image and the second image with a threshold received by the threshold receiving unit. The image inspection apparatus according to claim 7.
前記文字画像比較手段は、少なくとも前記第一文字画像と第二文字画像とをそれぞれ構成する画素の輝度値の差を閾値と比較して差異の箇所を検出するものであり、
前記出力部が出力する1以上の差異の箇所に対するユーザの評価結果を受け付ける評価結果受付部と、
前記評価結果受付部が受け付けた各評価結果に対応する差異の箇所についての、第一文字画像と第二文字画像との輝度値に関する情報を取得する輝度値取得部と、
前記評価結果と、当該評価結果に対応する箇所の輝度値に関する情報との組合せと、前記閾値との組合せを学習して、比較を行う第一文字画像と第二文字画像に対応した閾値を取得する閾値取得部とを更に備えた請求項1から請求項8いずれか記載の画像検査装置。
The character image comparison means detects a difference portion by comparing a difference between luminance values of pixels constituting at least the first character image and the second character image with a threshold value,
An evaluation result receiving unit that receives a user's evaluation result for one or more differences output by the output unit;
A luminance value acquisition unit that acquires information about the luminance values of the first character image and the second character image for the location of the difference corresponding to each evaluation result received by the evaluation result reception unit;
The combination of the evaluation result and the information related to the luminance value of the portion corresponding to the evaluation result and the combination of the threshold value are learned, and the threshold value corresponding to the first character image and the second character image to be compared is acquired. The image inspection apparatus according to claim 1, further comprising a threshold acquisition unit.
2以上の文字を含む第一画像が格納される第一画像格納部と、2以上の文字を含む第二画像が格納される第二画像格納部と、文字画像取得手段と文字データ取得手段と文字データ比較手段と文字画像比較手段とを備えた検出部と、出力部とを用いて行われる画像検査方法であって、
前記検出部が、前記第一画像と第二画像とを比較して、差異の箇所を検出する検出ステップと、
前記出力部が、前記検出部が検出した差異の箇所を示す情報を出力する出力ステップとを備え、
前記検出ステップは、
前記文字画像取得手段が、前記第一画像と第二画像とからそれぞれ文字の画像を取得する文字画像取得ステップと、
前記文字データ取得手段が、前記第一画像に含まれる文字の画像に対応する文字データである2以上の第一文字データと、前記第二画像に含まれる文字の画像に対応する文字データである2以上の第二文字データとを取得する文字データ取得ステップと、
前記文字データ比較手段が、前記文字データ取得ステップで取得した第一文字データと、第二文字データとを、配列順番に沿って比較して差異の箇所を検出する文字データ比較ステップと
前記文字画像比較手段が、前記第一画像から取得した文字の画像である2以上の第一文字画像と、前記第二画像から取得した文字の画像である2以上の第二文字画像とであって、前記文字データ比較ステップにより比較された第一文字データと第二文字データとにそれぞれ対応する第一文字画像と第二文字画像とをそれぞれ構成する画素の画素値を比較して、差異の箇所を検出する文字画像比較ステップとを備え
前記出力ステップは、前記文字データ比較ステップで検出した差異の箇所を示す情報と、前記文字画像比較ステップで検出した差異の箇所を示す情報とを出力する画像検査方法。
A first image storage unit that stores a first image including two or more characters, a second image storage unit that stores a second image including two or more characters, a character image acquisition unit, and a character data acquisition unit; An image inspection method performed using a detection unit including a character data comparison unit and a character image comparison unit, and an output unit,
The detection unit compares the first image with the second image, and detects a difference portion; and
The output unit includes an output step of outputting information indicating a location of the difference detected by the detection unit;
The detecting step includes
A character image acquisition step in which the character image acquisition means acquires a character image from each of the first image and the second image;
The character data acquisition means is character data corresponding to two or more first character data that is character data corresponding to a character image included in the first image and character data corresponding to a character image included in the second image. A character data acquisition step for acquiring the above second character data;
The character data comparison unit detects the difference between the first character data acquired in the character data acquisition step and the second character data in the arrangement order, and the character image comparison. The means includes two or more first character images that are character images acquired from the first image, and two or more second character images that are character images acquired from the second image, wherein the character data Character image comparison for detecting a difference portion by comparing pixel values of pixels constituting the first character image and the second character image respectively corresponding to the first character data and the second character data compared in the comparison step With steps ,
The image inspection method in which the output step outputs information indicating a difference portion detected in the character data comparison step and information indicating a difference portion detected in the character image comparison step .
2以上の文字を含む第一画像が格納される第一画像格納部と、2以上の文字を含む第二画像が格納される第二画像格納部と、にアクセス可能なコンピュータを、
前記第一画像と第二画像とを比較して、差異の箇所を検出する検出部と、
前記検出部が検出した差異の箇所を示す情報を出力する出力部として機能させるためのプログラムであって、
前記検出部は、
前記第一画像と第二画像とからそれぞれ文字の画像を取得する文字画像取得手段と、
前記第一画像に含まれる文字の画像に対応する文字データである2以上の第一文字データと、前記第二画像に含まれる文字の画像に対応する文字データである2以上の第二文字データとを取得する文字データ取得手段と、
前記文字データ取得手段が取得した第一文字データと、第二文字データとを、配列順番に沿って比較して差異の箇所を検出する文字データ比較手段と、
前記第一画像から取得した文字の画像である2以上の第一文字画像と、前記第二画像から取得した文字の画像である2以上の第二文字画像とであって、前記文字データ比較手段により比較された第一文字データと第二文字データとにそれぞれ対応する第一文字画像と第二文字画像とをそれぞれ構成する画素の画素値を比較して、差異の箇所を検出する文字画像比較手段とを備え
前記出力部は、前記文字データ比較手段が検出した差異の箇所を示す情報と、前記文字画像比較手段が検出した差異の箇所を示す情報とを出力するプログラム。
A computer accessible to a first image storage unit storing a first image including two or more characters and a second image storage unit storing a second image including two or more characters;
A detector for comparing the first image with the second image to detect a difference portion;
A program for functioning as an output unit that outputs information indicating the location of the difference detected by the detection unit,
The detector is
A character image acquisition means for acquiring a character image from each of the first image and the second image;
Two or more first character data that is character data corresponding to a character image included in the first image; and two or more second character data that are character data corresponding to a character image included in the second image; Character data acquisition means for acquiring
Character data comparison means for comparing the first character data acquired by the character data acquisition means and the second character data in the arrangement order to detect a difference portion;
Two or more first character images that are character images acquired from the first image, and two or more second character images that are character images acquired from the second image, the character data comparing means Character image comparison means for comparing pixel values of pixels constituting the first character image and the second character image respectively corresponding to the compared first character data and second character data, and detecting a difference portion Prepared ,
The output unit is a program for outputting information indicating a difference location detected by the character data comparison means and information indicating a difference location detected by the character image comparison means .
JP2012083510A 2012-04-02 2012-04-02 Image inspection apparatus, image inspection method, and program Active JP6010318B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012083510A JP6010318B2 (en) 2012-04-02 2012-04-02 Image inspection apparatus, image inspection method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012083510A JP6010318B2 (en) 2012-04-02 2012-04-02 Image inspection apparatus, image inspection method, and program

Publications (2)

Publication Number Publication Date
JP2013214178A JP2013214178A (en) 2013-10-17
JP6010318B2 true JP6010318B2 (en) 2016-10-19

Family

ID=49587460

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012083510A Active JP6010318B2 (en) 2012-04-02 2012-04-02 Image inspection apparatus, image inspection method, and program

Country Status (1)

Country Link
JP (1) JP6010318B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6729448B2 (en) * 2017-02-28 2020-07-22 京セラドキュメントソリューションズ株式会社 Image forming device
JP2019105910A (en) * 2017-12-11 2019-06-27 三菱電機株式会社 Display verification apparatus, display verification method and display verification program
CN111083424B (en) * 2019-11-25 2023-04-07 视联动力信息技术股份有限公司 Audio and video encryption transmission method and device, electronic equipment and storage medium
CN113359628B (en) * 2021-05-31 2023-04-07 三江侗族自治县仙池茶业有限公司 Control method and device for green tea processing process

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009087270A (en) * 2007-10-02 2009-04-23 Fuji Xerox Co Ltd Image processing device and program
JP5298831B2 (en) * 2008-12-19 2013-09-25 富士ゼロックス株式会社 Image processing apparatus and program
JP2010263464A (en) * 2009-05-08 2010-11-18 Kyocera Mita Corp Image forming apparatus
JP4518212B2 (en) * 2010-01-08 2010-08-04 富士ゼロックス株式会社 Image processing apparatus and program

Also Published As

Publication number Publication date
JP2013214178A (en) 2013-10-17

Similar Documents

Publication Publication Date Title
JP6672973B2 (en) Image forming system, image forming apparatus, image forming method, and program
JP5903966B2 (en) Image inspection apparatus, image forming apparatus, and control method for image inspection apparatus
US20090226090A1 (en) Information processing system, information processing apparatus, information processing method, and storage medium
US20060285748A1 (en) Document processing device
US20100303382A1 (en) Data input system, data input receiving device, data input receiving method and computer readable medium
US9843694B2 (en) Image reading device and method, reading area display device and method, and program
JP6010318B2 (en) Image inspection apparatus, image inspection method, and program
US11418658B2 (en) Image processing apparatus, image processing system, image processing method, and storage medium
EP3147810A1 (en) Image processing apparatus and program
CN102171708A (en) Business document processor
US20220141349A1 (en) Image processing device and image forming apparatus capable of detecting and correcting mis-converted character in text extracted from document image
US11797857B2 (en) Image processing system, image processing method, and storage medium
US7844080B2 (en) Image processing system and image processing method, and computer program
CN103795895A (en) Image forming apparatus and method
US11153447B2 (en) Image processing apparatus and non-transitory computer readable medium storing program
JP2018151699A (en) Information processing device and program
JP2006235785A (en) Image processor, image processing method and computer program
US9641723B2 (en) Image processing apparatus with improved slide printout based on layout data
US8295602B2 (en) Image processing apparatus and image processing method
JP2013090262A (en) Document character difference detection device
JP2022090469A (en) Format defining device, format defining method, and program
JP5445740B2 (en) Image processing apparatus, image processing system, and processing program
JP2007249774A (en) Character color determining unit, character color determining method, and computer program
US20240087129A1 (en) Information processing apparatus, non-transitory computer readable medium, and information processing method
US20220343666A1 (en) Image processing apparatus, image processing method, and storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20141110

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150811

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150821

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20151013

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160315

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160425

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160916

R150 Certificate of patent or registration of utility model

Ref document number: 6010318

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250