JP5109548B2 - Image processing apparatus and program - Google Patents

Image processing apparatus and program Download PDF

Info

Publication number
JP5109548B2
JP5109548B2 JP2007243095A JP2007243095A JP5109548B2 JP 5109548 B2 JP5109548 B2 JP 5109548B2 JP 2007243095 A JP2007243095 A JP 2007243095A JP 2007243095 A JP2007243095 A JP 2007243095A JP 5109548 B2 JP5109548 B2 JP 5109548B2
Authority
JP
Japan
Prior art keywords
image
combination
correction
processing apparatus
scan image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2007243095A
Other languages
Japanese (ja)
Other versions
JP2009077086A (en
Inventor
俊哉 小山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Fujifilm Business Innovation Corp
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 Fuji Xerox Co Ltd, Fujifilm Business Innovation Corp filed Critical Fuji Xerox Co Ltd
Priority to JP2007243095A priority Critical patent/JP5109548B2/en
Publication of JP2009077086A publication Critical patent/JP2009077086A/en
Application granted granted Critical
Publication of JP5109548B2 publication Critical patent/JP5109548B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)

Description

本発明は、画像処理装置、及びプログラムに関する。   The present invention relates to an image processing apparatus and a program.

修正前の紙原稿のスキャン画像と、修正(例えば、加筆やホワイトペンによる文字削除等)が加えられた後の当該紙原稿のスキャン画像とを比較して、修正部分を抽出する画像処理装置がある。下記特許文献1には、両スキャン画像の二値画像の差分を生成することにより修正部分を抽出する画像処理装置が開示されている。
特開2004−341914号公報
An image processing apparatus that compares a scanned image of a paper document before correction with a scanned image of the paper document after correction (for example, writing or character deletion using a white pen) and extracts a corrected portion. is there. Patent Document 1 below discloses an image processing apparatus that extracts a corrected portion by generating a difference between binary images of both scan images.
JP 2004-341914 A

しかしながら、修正前の紙原稿のスキャンと、修正後の紙原稿のスキャンとを、完全に同じ条件で行うことは困難であるため、両スキャン画像の間には、修正部分以外の部分であっても、色合いに差ができる。例えば、時間の経過や、スキャナーの違いにより、両スキャン画像は色合いが異なる場合がある。そのため、場合によっては、両スキャン画像が二値化された時に、本来ON画素とならない部分(例えば空白部分)が一方の画像でだけON画素となり、その結果、修正部分以外の部分が誤って抽出されるという問題があった。   However, since it is difficult to scan a paper document before correction and a paper document after correction under completely the same conditions, there are portions other than the correction portion between the two scan images. There is also a difference in hue. For example, the two scanned images may have different colors due to the passage of time or the difference in scanners. Therefore, in some cases, when both scanned images are binarized, a portion that is not originally an ON pixel (for example, a blank portion) becomes an ON pixel only in one image, and as a result, a portion other than the correction portion is erroneously extracted. There was a problem of being.

本発明の目的は、修正部分を正確に抽出する画像処理装置及びプログラムを提供することにある。   An object of the present invention is to provide an image processing apparatus and a program for accurately extracting a corrected portion.

請求項1の発明は、修正前の紙原稿から読取られた第1スキャン画像と、前記修正前の紙原稿に修正が加えられた、修正後の紙原稿から読取られた第2スキャン画像と、を取得する画像取得手段と、前記第1スキャン画像を第1色補正パラメータに基づいて補正し、第2スキャン画像を第2色補正パラメータに基づいて補正する補正手段と、前記補正手段により補正された第1スキャン画像の所与の比較領域における色合いと、前記補正手段により補正された第2スキャン画像の前記比較領域における色合いと、を比較する比較手段と、前記比較手段による比較の結果が所定条件を満足する場合に、前記第1色補正パラメータに基づいて補正された第1スキャン画像と、前記第2色補正パラメータに基づいて補正された第2スキャン画像と、に基づき修正部分を抽出する抽出手段とを含むことを特徴とする画像処理装置である。   The invention of claim 1 includes a first scan image read from a paper document before correction, a second scan image read from the paper document after correction, the correction being made to the paper document before correction, Corrected by the correction means, the correction means for correcting the first scan image based on the first color correction parameter, the correction means for correcting the second scan image based on the second color correction parameter, and the correction means. Comparison means for comparing the hue in a given comparison area of the first scan image with the hue in the comparison area of the second scan image corrected by the correction means, and the comparison result by the comparison means is predetermined. A first scan image corrected based on the first color correction parameter, a second scan image corrected based on the second color correction parameter, when the condition is satisfied; An image processing apparatus characterized by comprising extracting means for extracting the correction area based.

請求項2の発明は、請求項1の発明において、前記比較手段は、前記補正手段により補正された前記第1スキャン画像の前記比較領域における各画素値の出現頻度分布と、補正手段により補正された第2スキャン画像の前記比較領域における各画素値の出現頻度分布と、の相関係数を算出し、前記抽出手段は、前記相関係数の値が所定値以上である場合に、前記修正部分を抽出することを特徴とする。ここで、画素値とは、例えば、明度値や、R値、G値、B値等の色値などである。   According to a second aspect of the present invention, in the first aspect of the invention, the comparison unit is corrected by the correction unit and the appearance frequency distribution of each pixel value in the comparison region of the first scan image corrected by the correction unit. And calculating the correlation coefficient between the appearance frequency distributions of the pixel values in the comparison area of the second scan image, and the extracting means calculates the correction portion when the value of the correlation coefficient is equal to or greater than a predetermined value. Is extracted. Here, the pixel value is, for example, a lightness value, a color value such as an R value, a G value, or a B value.

請求項3の発明は、請求項1の発明において、前記補正手段により補正された第1スキャン画像の前記比較領域における画像と、前記補正手段により補正された第2スキャン画像の前記比較領域における画像と、に基づく差分情報に基づいて指標値を算出し、前記抽出手段は、前記指標値の値に応じて前記修正部分を抽出することを特徴とする。   According to a third aspect of the invention, in the first aspect of the invention, the image in the comparison area of the first scan image corrected by the correction means and the image in the comparison area of the second scan image corrected by the correction means. The index value is calculated based on the difference information based on and the extraction means extracts the correction portion according to the value of the index value.

請求項4の発明は、請求項3の発明において、前記指標値は、差分抽出画素の数、又は差分抽出画素の分散度を示す数値であり、前記抽出手段は前記指標値が所定値以下である場合に、前記修正部分を抽出することを特徴とする。   According to a fourth aspect of the present invention, in the third aspect of the present invention, the index value is a numerical value indicating the number of difference extraction pixels or the variance of the difference extraction pixels, and the extraction means has the index value equal to or less than a predetermined value. In some cases, the correction portion is extracted.

請求項5の発明は、請求項1乃至4のいずれかの発明において、前記補正手段は、前記第1色補正パラメータと前記第2色補正パラメータの少なくとも一方を変更しながら、前記第1スキャン画像と前記第2スキャン画像と、を補正し、前記比較手段は、前記1色補正パラメータと前記第2色補正パラメータの少なくとも一方が変更されるごとに、前記補正手段により補正された第1スキャン画像の色合いと、第2スキャン画像の色合いとを比較することを特徴とする。   According to a fifth aspect of the invention, in the invention according to any one of the first to fourth aspects, the correction unit changes the at least one of the first color correction parameter and the second color correction parameter while changing the first scan image. And the second scan image, and the comparison means corrects the first scan image corrected by the correction means every time at least one of the one color correction parameter and the second color correction parameter is changed. And the second scan image are compared with each other.

請求項6の発明は、請求項5の発明において、前記第1色補正パラメータと前記第2色補正パラメータとを含むパラメータセットを少なくとも1つ記憶するパラメータセット記憶手段をさらに含み、前記補正手段は、前記パラメータセット記憶手段から選択するパラメータセットを変更しながら、当該選択したパラメータセットに含まれる前記第1色補正パラメータと前記第2色補正パラメータとに基づいて、前記第1スキャン画像と前記第2スキャン画像とを補正することを特徴とする。   The invention of claim 6 further comprises parameter set storage means for storing at least one parameter set including the first color correction parameter and the second color correction parameter in the invention of claim 5, wherein the correction means The first scan image and the second color correction parameter are changed based on the first color correction parameter and the second color correction parameter included in the selected parameter set while changing the parameter set selected from the parameter set storage unit. The two-scan image is corrected.

請求項7の発明は、請求項5又は6の発明において、前記補正手段は、前記比較手段による比較の結果が前記所定条件を満足しない場合に、前記第1色補正パラメータ及び前記第2色補正パラメータの少なくとも一方を変更することを特徴とする。   According to a seventh aspect of the present invention, in the fifth or sixth aspect of the present invention, the correction means, when the comparison result by the comparison means does not satisfy the predetermined condition, the first color correction parameter and the second color correction. At least one of the parameters is changed.

請求項8の発明は、請求項6の発明において、前記比較手段による比較の結果が前記所定条件を満足するときのパラメータセットから、前記比較の結果に基づいて1つのパラメータセットを選択し、当該パラメータセットに含まれる前記第1色補正パラメータに基づいて補正された第1スキャン画像と、当該パラメータセットに含まれる前記第2色補正パラメータに基づいて補正された第2スキャン画像と、に基づき前記修正部分を抽出することを特徴とする。   The invention of claim 8 is the invention of claim 6, wherein one parameter set is selected based on the result of the comparison from parameter sets when the result of the comparison by the comparison means satisfies the predetermined condition, Based on the first scan image corrected based on the first color correction parameter included in the parameter set and the second scan image corrected based on the second color correction parameter included in the parameter set. It is characterized by extracting a corrected portion.

請求項9の発明は、請求項1乃至8のいずれかの発明において、前記第1スキャン画像と、前記第2スキャン画像と、を縮小する縮小手段をさらに含み、前記補正手段は、前記縮小手段により縮小された第1スキャン画像を前記第1色補正パラメータに基づいて補正し、前記縮小手段により縮小された第2スキャン画像を前記第2色補正パラメータに基づいて補正することを特徴とする。   The invention of claim 9 further includes a reduction means for reducing the first scan image and the second scan image in any one of the inventions of claims 1 to 8, wherein the correction means is the reduction means. The first scan image reduced by the correction is corrected based on the first color correction parameter, and the second scan image reduced by the reduction means is corrected based on the second color correction parameter.

請求項10の発明は、請求項1乃至9のいずれかの発明において、前記補正手段は、前記第1スキャン画像のうち前記比較領域の画像を補正し、前記第2スキャン画像のうち前記比較領域の画像を補正することを特徴とする。   According to a tenth aspect of the present invention, in the invention according to any one of the first to ninth aspects, the correction unit corrects an image in the comparison area in the first scan image, and the comparison area in the second scan image. The image is corrected.

請求項11の発明は、修正前の紙原稿から読取られた第1スキャン画像と、前記修正前の紙原稿に修正が加えられた、修正後の紙原稿から読取られた第2スキャン画像と、を取得する画像取得手段と、前記第1スキャン画像を第1二値化パラメータに基づいて二値化し、前記第2スキャン画像を第2二値化パラメータに基づいて二値化する二値化手段と、前記二値化手段により二値化された第1スキャン画像の所与の比較領域における画像と、前記二値化手段により二値化された第2スキャン画像の前記比較領域における画像と、を比較する比較手段と、前記比較手段による比較の結果が所定条件を満足する場合に、前記第1二値化パラメータに基づいて二値化された第1スキャン画像と、前記第2二値化パラメータに基づいて二値化された第2スキャン画像と、に基づいて修正部分を抽出する抽出手段と、を含むことを特徴とする画像処理装置である。   The invention according to claim 11 is a first scan image read from a paper document before correction, a second scan image read from a paper document after correction, the correction being made to the paper document before correction, And image acquisition means for acquiring the first scan image based on the first binarization parameter, and binarization means for binarizing the second scan image based on the second binarization parameter And an image in a given comparison area of the first scan image binarized by the binarization means, an image in the comparison area of the second scan image binarized by the binarization means, The first scan image binarized based on the first binarization parameter when the comparison result by the comparison unit satisfies a predetermined condition, and the second binarization Binarized based on parameters And 2 scanned image, extracting means for extracting the modified portion based on an image processing apparatus which comprises a.

請求項12の発明は、請求項11の発明において、前記比較手段は、前記二値化手段により二値化された第1スキャン画像の前記比較領域における有意な画素の数と、前記二値化手段により二値化された第2スキャン画像の前記比較領域における有意な画素の数と、の差を算出し、前記抽出手段は、前記差の値が所定値以下である場合に前記修正部分を抽出することを特徴とする。   According to a twelfth aspect of the present invention, in the invention according to the eleventh aspect, the comparison unit includes the number of significant pixels in the comparison region of the first scan image binarized by the binarization unit, and the binarization. A difference between the number of significant pixels in the comparison area of the second scan image binarized by the means and the extraction means calculates the correction portion when the difference value is equal to or less than a predetermined value. It is characterized by extracting.

請求項13の発明は、請求項11の発明において、前記比較手段は、前記二値化手段により二値化された第1スキャン画像の前記比較領域における画像と、前記二値化手段により二値化された第2スキャン画像の前記比較領域における画像と、の差分情報に基づいて指標値を算出し、前記抽出手段は、前記指標値の値に応じて前記修正部分を抽出することを特徴とする。   According to a thirteenth aspect of the present invention, in the invention of the eleventh aspect, the comparison means includes an image in the comparison area of the first scan image binarized by the binarization means and a binary value by the binarization means. An index value is calculated based on difference information between the converted second scan image and the image in the comparison area, and the extraction unit extracts the correction portion according to the value of the index value. To do.

請求項14の発明は、請求項13の発明において、前記指標値は、差分抽出画素の数、又は差分抽出画素の分散度を示す数値であり、前記抽出手段は、前記指標値が所定値以下である場合に前記修正部分を抽出することを特徴とする。   According to a fourteenth aspect of the present invention, in the thirteenth aspect, the index value is a numerical value indicating the number of difference extraction pixels or a variance of the difference extraction pixels, and the extraction means includes the index value equal to or less than a predetermined value. In this case, the correction part is extracted.

請求項15の発明は、請求項11乃至14のいずれかの発明において、前記二値化手段は、前記第1二値化パラメータと前記第2二値化パラメータの少なくとも一方を変更しながら、前記第1スキャン画像と前記第2スキャン画像と、を二値化し、前記比較手段は、前記第1二値化パラメータと前記第2二値化パラメータの少なくとも一方が変更されるごとに、前記二値化手段により二値化された第1スキャン画像と、前記二値化手段により二値化された第2スキャン画像とを比較することを特徴とする。   The invention of claim 15 is the invention according to any one of claims 11 to 14, wherein the binarization means changes at least one of the first binarization parameter and the second binarization parameter, The first scan image and the second scan image are binarized, and the comparison unit is configured to output the binary data every time at least one of the first binarization parameter and the second binarization parameter is changed. The first scan image binarized by the binarizing unit and the second scan image binarized by the binarizing unit are compared.

請求項16の発明は、請求項15の発明において、前記二値化手段は、前記比較手段による比較の結果が前記所定条件を満足しない場合に、前記第1二値化パラメータと前記第2二値化パラメータの少なくとも一方を変更することを特徴とする。   According to a sixteenth aspect of the present invention, in the fifteenth aspect of the invention, the binarization unit may be configured such that when the comparison result by the comparison unit does not satisfy the predetermined condition, the first binarization parameter and the second binarization parameter. It is characterized in that at least one of the valuation parameters is changed.

請求項17の発明は、請求項11乃至16のいずれかの発明において、前記第1スキャン画像と、前記第2スキャン画像と、を縮小する縮小手段をさらに含み、前記二値化手段は、前記縮小手段により縮小された第1スキャン画像を前記第1二値化パラメータに基づいて二値化し、前記縮小手段により縮小された第2スキャン画像を前記第2二値化パラメータに基づいて二値化することを特徴とする。   The invention of claim 17 further includes a reduction means for reducing the first scan image and the second scan image according to any one of claims 11 to 16, wherein the binarization means comprises the binarization means, The first scan image reduced by the reduction means is binarized based on the first binarization parameter, and the second scan image reduced by the reduction means is binarized based on the second binarization parameter. It is characterized by doing.

請求項18の発明は、請求項11乃至17のいずれかの発明において、前記二値化手段は、前記第1スキャン画像のうち前記比較領域の画像を二値化し、前記第2スキャン画像のうち前記比較領域の画像を二値化することを特徴とする。   According to an eighteenth aspect of the present invention, in the invention according to any one of the eleventh to seventeenth aspects, the binarizing means binarizes the image of the comparison area in the first scan image, and includes the second scan image. The image of the comparison area is binarized.

請求項19の発明は、請求項1乃至18のいずれかの発明において、前記所与の比較領域は、前記第1スキャン画像と前記第2スキャン画像の各々の一部を占める領域であることを特徴とする。   According to a nineteenth aspect of the present invention, in any one of the first to eighteenth aspects, the given comparison region is a region that occupies a part of each of the first scan image and the second scan image. Features.

請求項20の発明は、請求項19の発明において、前記所与の比較領域は、予め定められた領域であることを特徴とする。   The invention of claim 20 is characterized in that, in the invention of claim 19, the given comparison area is a predetermined area.

請求項21の発明は、請求項19の発明において、前記所与の比較領域は、利用者により指定される領域であることを特徴とする。   The invention of claim 21 is the invention of claim 19, wherein the given comparison area is an area designated by a user.

請求項22の発明は、請求項19の発明において、前記第1スキャン画像と前記第2スキャン画像のレイアウトを解析する解析手段と、前記解析手段による解析の結果に基づいて前記所与の比較領域を決定する決定手段と、をさらに含むことを特徴とする。   According to a twenty-second aspect of the present invention, in the invention of the nineteenth aspect, an analysis unit that analyzes a layout of the first scan image and the second scan image, and the given comparison region based on an analysis result by the analysis unit And determining means for determining.

請求項23の発明は、請求項19の発明において、前記第1スキャン画像の二値画像と前記第2スキャン画像の二値画像との差分を生成し、当該差分に基づいて前記所与の比較領域を決定する決定手段とをさらに含むことを特徴とする。   The invention of claim 23 is the invention of claim 19, wherein a difference between the binary image of the first scan image and the binary image of the second scan image is generated, and the given comparison is performed based on the difference. And determining means for determining an area.

請求項24の発明は、修正前の紙原稿から読取られた第1スキャン画像と、前記修正前の紙原稿に修正が加えられた、修正後の紙原稿から読取られた第2スキャン画像と、を取得する画像取得手段、前記第1スキャン画像を第1色補正パラメータに基づいて補正し、前記第2スキャン画像を第2色補正パラメータに基づいて補正する補正手段、前記補正手段により補正された第1スキャン画像の所与の比較領域における色合いと、前記補正手段により補正された第2スキャン画像の前記比較領域における色合いと、を比較する比較手段、前記比較手段による比較の結果が所定条件を満足する場合に、前記第1色補正パラメータに基づいて補正された第1スキャン画像と、前記第2色補正パラメータに基づいて補正された第2スキャン画像と、に基づき修正部分を抽出する抽出手段、としてコンピュータを機能させるプログラムである。   According to a twenty-fourth aspect of the present invention, a first scan image read from a paper document before correction, a second scan image read from a paper document after correction, the correction of the paper document before correction, The image acquisition means for acquiring the correction, the correction of the first scan image based on the first color correction parameter, the correction means of correcting the second scan image based on the second color correction parameter, and the correction by the correction means Comparison means for comparing the hue in a given comparison area of the first scan image with the hue in the comparison area of the second scan image corrected by the correction means, and the comparison result by the comparison means satisfies a predetermined condition. If satisfied, a first scan image corrected based on the first color correction parameter; a second scan image corrected based on the second color correction parameter; Extracting means for extracting the correction area based, it is a program causing a computer to function as a.

請求項25の発明は、修正前の紙原稿から読取られた第1スキャン画像と、前記修正前の紙原稿に修正が加えられた、修正後の紙原稿から読取られた第2スキャン画像と、を取得する画像取得手段、前記第1スキャン画像を第1二値化パラメータに基づいて二値化し、前記第2スキャン画像を第2二値化パラメータに基づいて二値化する二値化手段、前記二値化手段により二値化された第1スキャン画像の所与の比較領域における画像と、前記二値化手段により二値化された第2スキャン画像の所与の比較領域における画像と、を比較する比較手段、前記比較手段による比較の結果が所定条件を満足する場合に、前記第1二値化パラメータに基づいて二値された第1スキャン画像と、前記第2二値化パラメータに基づいて二値化された第2スキャン画像と、に基づいて修正部分を抽出する抽出手段、としてコンピュータを機能させるプログラムである。   The invention of claim 25 includes a first scan image read from a paper document before correction, a second scan image read from the paper document after correction, the correction being made to the paper document before correction, Image acquisition means for acquiring, binarization means for binarizing the first scan image based on a first binarization parameter, and binarizing the second scan image based on a second binarization parameter, An image in a given comparison area of the first scan image binarized by the binarization means, and an image in a given comparison area of the second scan image binarized by the binarization means; Comparing means for comparing the first scan image binarized based on the first binarization parameter and the second binarization parameter when the comparison result by the comparison unit satisfies a predetermined condition Second binarized based on A catcher down image, a program for causing a computer to function correction part extraction means for extracting, as based on.

請求項1,11,24,25の発明によれば、修正部分を正確に抽出することができる。   According to invention of Claim 1,11,24,25, a correction part can be extracted correctly.

請求項2,4の発明によれば、第1スキャン画像の色合いと、第2スキャン画像の色合いと、を一定程度類似させてから修正部分を抽出することができる。   According to the second and fourth aspects of the present invention, it is possible to extract the corrected portion after making the hue of the first scan image and the hue of the second scan image similar to a certain degree.

請求項3の発明によれば、第1スキャン画像の色合いと、第2スキャン画像の色合いと、の類似度を指標化して評価することができる。   According to the invention of claim 3, the similarity between the hue of the first scan image and the hue of the second scan image can be indexed and evaluated.

請求項5の発明によれば、第1スキャン画像の色合いと、第2スキャン画像の色合いと、を類似させられる第1色補正パラメータ及び第2色補正パラメータを検索することができる。   According to the fifth aspect of the present invention, it is possible to search for the first color correction parameter and the second color correction parameter that can make the hue of the first scan image and the hue of the second scan image similar.

請求項6の発明によれば、第1スキャン画像の色合いと、第2スキャン画像の色合いと、を類似させられる第1色補正パラメータ及び第2色補正パラメータを、簡単に検索することができる。   According to the sixth aspect of the present invention, it is possible to easily search for the first color correction parameter and the second color correction parameter that can make the hue of the first scan image and the hue of the second scan image similar to each other.

請求項7の発明によれば、第1スキャン画像の色合いと、第2スキャン画像の色合いと、が類似するか否かを判断しながら、第1色補正パラメータ及び第2色補正パラメータを検索することができる。   According to the seventh aspect of the present invention, the first color correction parameter and the second color correction parameter are searched while determining whether or not the hue of the first scan image is similar to the hue of the second scan image. be able to.

請求項8の発明によれば、第1スキャン画像の色合いと、第2スキャン画像の色合いと、を類似させられる最適な第1色補正パラメータ及び第2色補正パラメータを決定することができる。   According to the eighth aspect of the present invention, it is possible to determine the optimal first color correction parameter and second color correction parameter that can make the hue of the first scan image and the hue of the second scan image similar to each other.

請求項9,10の発明によれば、第1色補正パラメータと第2色補正パラメータの決定に必要な処理を軽減することができる。   According to the ninth and tenth aspects of the present invention, processing necessary for determining the first color correction parameter and the second color correction parameter can be reduced.

請求項12,14の発明によれば、第1スキャン画像の二値画像と、第2スキャン画像の二値画像と、を類似させてから修正部分を抽出することができる。   According to the inventions of claims 12 and 14, the corrected portion can be extracted after making the binary image of the first scan image similar to the binary image of the second scan image.

請求項13の発明によれば、第1スキャン画像の二値画像と、第2スキャン画像の二値画像と、の類似度を指標化して評価することができる。   According to the invention of claim 13, the similarity between the binary image of the first scan image and the binary image of the second scan image can be indexed and evaluated.

請求項15の発明によれば、第1スキャン画像の二値画像と、第2スキャン画像の二値画像と、を類似させられる第1二値化パラメータ及び第2二値化パラメータを検索することができる。   According to the invention of claim 15, the first binarization parameter and the second binarization parameter that make the binary image of the first scan image similar to the binary image of the second scan image are searched. Can do.

請求項16の発明によれば、第1スキャン画像の二値画像と、第2スキャン画像の二値画像と、が類似するか否かを判断しながら、第1二値化パラメータ及び第2二値化パラメータを検索することができる。   According to the invention of claim 16, the first binarization parameter and the second second image are determined while determining whether or not the binary image of the first scan image is similar to the binary image of the second scan image. The value parameter can be searched.

請求項17,18の発明によれば、第1スキャン画像の二値画像と、第2スキャン画像の二値画像とを類似させられる第1二値化パラメータと第2二値化パラメータの決定に必要な処理を軽減することができる。   According to the seventeenth and eighteenth aspects of the present invention, the first binarization parameter and the second binarization parameter for determining the similarity between the binary image of the first scan image and the binary image of the second scan image are determined. Necessary processing can be reduced.

請求項19の発明によれば、比較的少ない処理で、修正部分の抽出を正確に行うことができる。   According to the nineteenth aspect of the present invention, it is possible to accurately extract the corrected portion with relatively little processing.

請求項20,21,22,23の発明によれば、修正部分を含まない領域が比較領域になりやすくなる。   According to the inventions of claims 20, 21, 22, and 23, a region that does not include a correction portion is likely to be a comparison region.

本発明の実施形態(以下、実施形態1)について図面を参照しながら説明する。図1は本発明の実施形態1に係る画像処理装置2を含んで構成される修正抽出システム100を表す図である。修正抽出システム100は、画像処理装置2と画像読取装置4とを含んで構成され、画像処理装置2と画像読取装置4とは通信可能に接続されている。修正抽出システム100において、利用者は、修正前の紙原稿を画像読取装置4に読み取らせ、読取画像(以下、修正前画像)を画像処理装置2に登録する。また、修正前の紙原稿に加筆やホワイトペンによる削除等の修正を加えた、修正後の紙原稿を画像読取装置4に読み取らせ、読取画像(以下、修正後画像)を画像処理装置2に登録する。そして、利用者は、所定の修正部分抽出指示操作を行い、画像処理装置2に、修正前画像と修正後画像とを比較させ修正部分を抽出させる。なお、ここでは、紙原稿は複数の紙媒体を含む。   Embodiments of the present invention (hereinafter referred to as Embodiment 1) will be described with reference to the drawings. FIG. 1 is a diagram showing a correction extraction system 100 configured to include an image processing apparatus 2 according to Embodiment 1 of the present invention. The correction extraction system 100 includes an image processing device 2 and an image reading device 4, and the image processing device 2 and the image reading device 4 are connected to be communicable. In the correction extraction system 100, the user causes the image reading device 4 to read a paper document before correction, and registers a read image (hereinafter referred to as an image before correction) in the image processing device 2. In addition, the image reading device 4 is caused to read the corrected paper document in which correction such as addition or deletion with a white pen is performed on the uncorrected paper document, and the read image (hereinafter, corrected image) is read by the image processing device 2. sign up. Then, the user performs a predetermined correction part extraction instruction operation, and causes the image processing apparatus 2 to compare the uncorrected image with the corrected image and extract the corrected part. Here, the paper document includes a plurality of paper media.

次に、各装置について具体的に説明する。画像読取装置4は、例えばADF(AUTO DOCUMENT FEEDER)などの自動給紙機構を備えた各種スキャナとして実現される。画像読取装置4は、紙原稿を光学的に読取り、読取画像を画像処理装置2に送信し、画像処理装置2に記憶させる。ここでは、画像読取装置4は、修正前画像と、修正後画像とを送信し、画像処理装置2に記憶させる。   Next, each device will be specifically described. The image reading device 4 is realized as various scanners including an automatic paper feeding mechanism such as ADF (AUTO DOCUMENT FEEDER). The image reading device 4 optically reads a paper document, transmits the read image to the image processing device 2, and stores it in the image processing device 2. Here, the image reading device 4 transmits the pre-correction image and the post-correction image and stores them in the image processing device 2.

画像処理装置2は、例えば、パーソナルコンピュータやサーバとして実現される。画像処理装置2は、画像読取装置4から受信した修正前画像と修正後画像とを記憶する。また、画像処理装置2は、利用者の指示を受け入れて、修正前画像と修正後画像とを比較し、修正部分を抽出する。画像処理装置2は、構成的には、図2に示すように、制御部22と、記憶部24と、画像入力部26と、操作部28と、を含んで構成される。なお、画像処理装置2は、上記各部以外にも、図示しない表示部や、ネットワークインターフェイス等も含む。以下、各部について説明する。   The image processing apparatus 2 is realized as a personal computer or a server, for example. The image processing device 2 stores the pre-correction image and the post-correction image received from the image reading device 4. Further, the image processing apparatus 2 accepts a user instruction, compares the uncorrected image with the corrected image, and extracts a corrected portion. As shown in FIG. 2, the image processing apparatus 2 is configured to include a control unit 22, a storage unit 24, an image input unit 26, and an operation unit 28. The image processing apparatus 2 includes a display unit (not shown), a network interface, and the like in addition to the above-described units. Hereinafter, each part will be described.

制御部22は、CPU等であり、記憶部24に格納されているプログラムに従って動作する。   The control unit 22 is a CPU or the like and operates according to a program stored in the storage unit 24.

記憶部24は、RAM、ROM、ハードディスク等であり、各種情報を記憶するものである。記憶部24は、制御部22によって実行されるプログラムを格納している。また、記憶部24は、画像入力部26から入力された修正前画像と修正後画像とを記憶する。また、記憶部24は、制御部22の処理の実行に必要となる種々の情報を保持するワークメモリにもなる。   The storage unit 24 is a RAM, a ROM, a hard disk or the like, and stores various information. The storage unit 24 stores a program executed by the control unit 22. The storage unit 24 stores the pre-correction image and the post-correction image input from the image input unit 26. The storage unit 24 also serves as a work memory that holds various information necessary for executing the processing of the control unit 22.

画像入力部26は、画像読取装置4に接続されたインターフェイスであり、画像読取装置4から送信される画像を受信し、記憶部24に出力する。操作部28は、例えば、キーボードやマウスであり、利用者の操作内容の情報を制御部22に出力する。以上が、画像処理装置2を構成する各部の内容である。   The image input unit 26 is an interface connected to the image reading device 4, receives an image transmitted from the image reading device 4, and outputs the image to the storage unit 24. The operation unit 28 is, for example, a keyboard or a mouse, and outputs information on the operation contents of the user to the control unit 22. The above is the content of each part constituting the image processing apparatus 2.

図3は、制御部22が上記プログラムに従って動作することにより、画像処理装置2で実現される機能のブロック図である。同図に示すように、画像処理装置2は、比較領域決定部32と、補正部34と、比較部36と、パラメータセット記憶部38と、全体位置・歪補正部40と、局所位置・歪補正部42
と、修正部分抽出部44と、を含む。さらに、局所位置・歪補正部42は、図4に示すように、差分抽出部42aと、統合化処理部42bと、第2分割領域算出部42cと、第1分割領域算出部42dと、第2画像分割部42eと、第1画像分割部42fと、分割画像位置・歪補正部42gと、を含む。以下、各部について説明する。
FIG. 3 is a block diagram of functions realized by the image processing apparatus 2 when the control unit 22 operates according to the program. As shown in the figure, the image processing apparatus 2 includes a comparison area determination unit 32, a correction unit 34, a comparison unit 36, a parameter set storage unit 38, an overall position / distortion correction unit 40, a local position / distortion. Correction unit 42
And a corrected portion extraction unit 44. Further, as shown in FIG. 4, the local position / distortion correction unit 42 includes a difference extraction unit 42a, an integration processing unit 42b, a second divided region calculation unit 42c, a first divided region calculation unit 42d, A two-image dividing unit 42e, a first image dividing unit 42f, and a divided image position / distortion correcting unit 42g are included. Hereinafter, each part will be described.

(パラメータセット記憶部38)
パラメータセット記憶部38は、記憶部24を中心として実現される。パラメータセット記憶部38は、第1色補正パラメータP1と第2色補正パラメータP2のパラメータセットを少なくとも1つ記憶する。図5は、パラメータセット記憶部38の記憶内容の一例を示す図である。同図に示すように、パラメータセット記憶部38は、パラメータセットを複数記憶し、各パラメータセットには組み合わせ番号が付されている。ここで、第1色補正パラメータP1及び第2色補正パラメータP2は、トーンカーブである。なお、パラメータセット記憶部38に記憶されるパラメータセットは予め定められたものであってもよいし、利用者によって登録されたものであってもよい。また、第1色補正パラメータP1及び第2色補正パラメータP2は、ルックアップテーブルであってもよい。
(Parameter set storage unit 38)
The parameter set storage unit 38 is realized centering on the storage unit 24. The parameter set storage unit 38 stores at least one parameter set of the first color correction parameter P1 and the second color correction parameter P2. FIG. 5 is a diagram illustrating an example of the contents stored in the parameter set storage unit 38. As shown in the figure, the parameter set storage unit 38 stores a plurality of parameter sets, and each parameter set is assigned a combination number. Here, the first color correction parameter P1 and the second color correction parameter P2 are tone curves. The parameter set stored in the parameter set storage unit 38 may be determined in advance or may be registered by the user. Further, the first color correction parameter P1 and the second color correction parameter P2 may be look-up tables.

(比較領域決定部32)
比較領域決定部32は、制御部22を中心として実現され、補正部34に補正された修正前画像と修正後画像とを比較するための領域(比較領域)を決定する。本実施形態では、比較領域決定部32は、修正前画像と修正後画像の各々の一部を占める領域を比較領域とする。具体的には、比較領域決定部32は、修正前画像と修正後画像のレイアウトを解析する。そして、解析の結果、文字/線/表などの画像領域や、文字/線/表などを多く含むページを比較領域として決定する。
(Comparison area determination unit 32)
The comparison area determination unit 32 is realized centering on the control unit 22 and determines an area (comparison area) for comparing the uncorrected image and the corrected image corrected by the correction unit 34. In the present embodiment, the comparison area determination unit 32 sets an area occupying a part of each of the pre-correction image and the post-correction image as a comparison area. Specifically, the comparison area determination unit 32 analyzes the layout of the pre-correction image and the post-correction image. As a result of the analysis, an image area such as a character / line / table or a page containing a large number of characters / lines / tables is determined as a comparison area.

(補正部34)
補正部34は、制御部22を中心として実現され、色補正パラメータを用いて、例えば画像の明度を補正する。本実施形態では、補正部34は、第1色補正パラメータP1と第2色補正パラメータP2の少なくとも一方を変更しながら、第1色補正パラメータP1で修正前画像の比較領域における明度を補正するとともに、第2色補正パラメータP2で修正後画像の比較領域における明度を補正することにより、1つのパラメータセットを特定する。ここでは、補正部34は、比較部36によって算出される比較領域の明度画素数分布(明度ヒストグラム)同士の相関係数Rが所定閾値TH(例えば、0.95)以上になるまで、組み合わせ番号の小さいパラメータセットから順に、当該パラメータセットの第1色補正パラメータP1と第2色補正パラメータP2の各々で修正前画像の明度と修正後画像の明度を補正することにより、相関係数Rが所定閾値TH以上となるパラメータセットを特定する。
(Correction unit 34)
The correction unit 34 is realized centering on the control unit 22 and corrects, for example, the brightness of the image using the color correction parameter. In the present embodiment, the correction unit 34 corrects the lightness in the comparison area of the pre-correction image with the first color correction parameter P1 while changing at least one of the first color correction parameter P1 and the second color correction parameter P2. Then, one parameter set is specified by correcting the lightness in the comparison area of the corrected image with the second color correction parameter P2. Here, the correction unit 34 determines the combination number until the correlation coefficient R between the lightness pixel number distributions (lightness histograms) in the comparison region calculated by the comparison unit 36 is equal to or greater than a predetermined threshold TH (for example, 0.95). The correlation coefficient R is predetermined by correcting the lightness of the image before correction and the lightness of the image after correction with each of the first color correction parameter P1 and the second color correction parameter P2 of the parameter set in order from the smallest parameter set. A parameter set that is equal to or greater than the threshold value TH is specified.

なお、補正部34は、すべてのパラメータセットを用いて修正前画像と修正後画像とを補正した後、相関係数Rが所定閾値TH以上となるパラメータセットのうち相関係数Rが最大のパラメータセットを特定するようにしてもよい。   The correction unit 34 corrects the pre-correction image and the post-correction image using all the parameter sets, and then the parameter having the maximum correlation coefficient R among the parameter sets in which the correlation coefficient R is equal to or greater than the predetermined threshold value TH. A set may be specified.

(比較部36)
比較部36は、制御部22を中心として実現され、第1色補正パラメータP1と第2色補正パラメータP2の少なくとも一方が変更されるごとに、補正部34により補正された修正前画像の明度と、修正後画像の明度とを比較する。具体的には、比較部36は、補正部34がパラメータセットの一つ一つを用いて修正前画像と修正後画像とを補正するごとに、修正前画像の比較領域における明度画素数分布(第1明度ヒストグラム)と、修正後画像の比較領域における明度画素数分布(第2明度ヒストグラム)と、の相関係数Rを算出する。
(Comparator 36)
The comparison unit 36 is realized centering on the control unit 22, and each time at least one of the first color correction parameter P1 and the second color correction parameter P2 is changed, the brightness of the image before correction corrected by the correction unit 34 is calculated. The brightness of the corrected image is compared. Specifically, the comparison unit 36, every time the correction unit 34 corrects the pre-correction image and the post-correction image using each of the parameter sets, the lightness pixel number distribution (in the comparison region of the pre-correction image) ( A correlation coefficient R between the first brightness histogram) and the brightness pixel number distribution (second brightness histogram) in the comparison region of the corrected image is calculated.

ここで、第1明度ヒストグラムにおける明度iの画素数を「Xi」と表し、第2明度ヒストグラムにおける明度iの画素数を「Yi」と表した場合、相関係数R(−1≦R≦1)は以下の数式で表される。なお、比較部36は、Red,Green,Blueの各色プレーンの画素数分布を作成し、各色プレーンの相関係数を算出してもよい。   Here, when the number of pixels of lightness i in the first lightness histogram is represented as “Xi” and the number of pixels of lightness i in the second lightness histogram is represented as “Yi”, the correlation coefficient R (−1 ≦ R ≦ 1). ) Is represented by the following mathematical formula. The comparison unit 36 may create a pixel number distribution of each color plane of Red, Green, and Blue, and calculate a correlation coefficient of each color plane.

Figure 0005109548
Figure 0005109548

(全体位置・歪補正部40)
全体位置・歪補正部40は、制御部22を中心として実現され、周知の方法(例えば、特開2006−235785号公報に記載の方法)を用いて、対象となる2つの画像の全体的な位置合わせを行い、両画像間の位置ズレや歪みを補正するものである。本実施形態では、補正部34により特定されたパラメータセットの第1色補正パラメータP1で補正された修正前画像と、同パラメータセットの第2色補正パラメータP2で補正された修正後画像とを対象として、頁ごとに位置合わせを行う。なお、ここでは、修正後画像を基準として、当該修正後画像に合わせて修正前画像の位置ズレや歪みを補正する。もちろん、修正前画像を基準として、当該修正前画像に合わせて修正後画像の位置ズレや歪みを補正するようにしてもよい。
(Overall position / distortion correction unit 40)
The overall position / distortion correction unit 40 is realized with the control unit 22 as the center, and using a well-known method (for example, the method described in Japanese Patent Laid-Open No. 2006-235785), the overall position of the two images to be processed is determined. Alignment is performed to correct misalignment and distortion between both images. In the present embodiment, the pre-correction image corrected with the first color correction parameter P1 of the parameter set specified by the correction unit 34 and the post-correction image corrected with the second color correction parameter P2 of the parameter set are targeted. As shown in FIG. Here, the positional deviation and distortion of the pre-correction image are corrected according to the post-correction image using the post-correction image as a reference. Of course, the positional deviation and distortion of the corrected image may be corrected according to the pre-correction image on the basis of the pre-correction image.

具体的には、全体位置・歪補正部40は、修正後画像(正確には、補正部34により特定されたパラメータセットの第2色補正パラメータP2で補正された修正後画像)を所定閾値で二値化した二値画像に合わせて、修正前画像(正確には、補正部34により特定されたパラメータセットの第1色補正パラメータP1で補正された修正前画像)を所定閾値で二値化した二値画像の全体的な位置ズレや歪みを補正する。こうして、全体位置・歪補正部40は、全体的に、修正前画像と修正後画像との位置を合わせる。   Specifically, the overall position / distortion correction unit 40 sets the corrected image (correctly, the corrected image corrected by the second color correction parameter P2 of the parameter set specified by the correction unit 34) with a predetermined threshold. In accordance with the binarized binary image, the pre-correction image (more precisely, the pre-correction image corrected with the first color correction parameter P1 of the parameter set specified by the correction unit 34) is binarized with a predetermined threshold value. Correct the overall positional deviation and distortion of the binary image. In this way, the overall position / distortion correction unit 40 aligns the positions of the pre-correction image and the post-correction image as a whole.

(局所位置・歪補正部42)
局所位置・歪補正部42は、制御部22を中心として実現され、対象となる2つの画像の間にある局所的な位置ズレを補正する。本実施形態では、局所位置・歪補正部42は、全体位置・歪補正部40により全体的な位置合わせが行われた修正前画像(正確には、補正部34により特定されたパラメータセットの第1色補正パラメータP1で補正された修正前画像)と修正後画像(正確には、補正部34により特定されたパラメータセットの第2色補正パラメータP2で補正された修正後画像)とを対象として、頁ごとに、両画像の局所的な位置ズレを補正する。これは、通常、スキャナ等で画像を読み取った場合、スキャン画像には、レンズ歪、モータ回転のムラ、振動などにより、局所的な歪みが生じるため、全体位置・歪補正部40により位置合わせを行ったとしてもなお、修正前画像と修正後画像との間に局所的な位置ズレがあることが考えられるからである。以下、局所位置・歪補正部42の各部について説明する。
(Local position / distortion correction unit 42)
The local position / distortion correction unit 42 is realized with the control unit 22 as a center, and corrects a local positional deviation between two target images. In the present embodiment, the local position / distortion correction unit 42 is a pre-correction image (more precisely, the first parameter set specified by the correction unit 34) that has been subjected to overall alignment by the overall position / distortion correction unit 40. The target image is a corrected image (corrected image corrected by the one-color correction parameter P1) and an corrected image (correctly corrected image corrected by the second color correction parameter P2 of the parameter set specified by the correcting unit 34). For each page, the local positional deviation between both images is corrected. Normally, when an image is read by a scanner or the like, local distortion occurs in the scanned image due to lens distortion, motor rotation unevenness, vibration, and the like. This is because even if it is performed, there may be a local positional deviation between the pre-correction image and the post-correction image. Hereinafter, each part of the local position / distortion correction unit 42 will be described.

(差分抽出部42a)
差分抽出部42aは、修正後画像を所定閾値で二値化した二値画像と、修正前画像を所定閾値で二値化した二値画像とを比較することによって差分情報を抽出する。具体的には、例えば、修正後画像の二値画像から、修正前画像の二値画像のON画素を膨張した画像を引き算することによって差分情報を抽出する。ここにおいて、ON画素とは、二値画像において白を背景としたときの黒画素である。なお、上記では、修正後画像の二値画像から修正前画像の二値画像のON画素を膨張した画像を引き算することによって差分情報を抽出しているが、修正前画像の二値画像から、修正後画像の二値画像のON画素を膨張した画像を引き算することによって差分情報を抽出してもよいし、両方法で差分情報を抽出するようにしてもよい。
(Difference extraction unit 42a)
The difference extraction unit 42a extracts difference information by comparing a binary image obtained by binarizing the corrected image with a predetermined threshold and a binary image obtained by binarizing the uncorrected image with a predetermined threshold. Specifically, for example, the difference information is extracted by subtracting an image obtained by expanding ON pixels of the binary image of the pre-correction image from the binary image of the post-correction image. Here, the ON pixel is a black pixel when a white background is used in the binary image. In the above, the difference information is extracted by subtracting the image obtained by expanding the ON pixels of the binary image of the pre-correction image from the binary image of the post-correction image, but from the binary image of the pre-correction image, The difference information may be extracted by subtracting the image obtained by expanding the ON pixels of the binary image of the corrected image, or the difference information may be extracted by both methods.

(統合化処理部42b)
統合化処理部42bは、差分抽出部42aによって抽出された差分情報たる差分抽出画素に基づいて、同一領域と見なしうる差分抽出画素同士を統合化して統合化領域とする。ここで、統合化とは、同一領域と見なせる差分抽出画素同士を1つの画素群とすることを言う。
(Integration processing unit 42b)
The integration processing unit 42b integrates the difference extraction pixels that can be regarded as the same region based on the difference extraction pixel that is the difference information extracted by the difference extraction unit 42a to form an integration region. Here, the integration means that the difference extraction pixels that can be regarded as the same region are set as one pixel group.

具体的には、統合化処理部42bは、抽出した画素同士の距離、例えばユークリッド距離やシティーブロック距離を求め、当該距離が所定閾値以下の場合に、その画素同士を同一領域と見なして統合化領域とする。   Specifically, the integration processing unit 42b obtains a distance between the extracted pixels, for example, a Euclidean distance or a city block distance, and if the distance is equal to or less than a predetermined threshold, the pixels are regarded as the same region and integrated. This is an area.

なお、統合化処理部42bは、例えば、以下のようにして統合化領域を定めるようにしてもよい。
(1)抽出した画素を、例えばラベリング処理を使用することによって連結画素群ごとに分け、連結画素群ごとに外接矩形を求め、その外接矩形を所定サイズだけ拡張(膨張)する。そして、拡張した外接矩形同士が重なる場合に、その連結画素群同士を同一領域と見なして統合化領域とする。
(2)修正前画像の二値画像に対してラベリング処理を行う。そして、抽出した画素が含まれている(属している)ラベル(連結画素群)を判断し、同一ラベルに属している抽出画素は同一領域と見なして統合化領域とする。なお、抽出画素を含むラベル(連結画素群)を統合化領域としてもよい。
For example, the integration processing unit 42b may determine the integration region as follows.
(1) The extracted pixels are divided into connected pixel groups by using, for example, a labeling process, a circumscribed rectangle is obtained for each connected pixel group, and the circumscribed rectangle is expanded (expanded) by a predetermined size. Then, when the extended circumscribed rectangles overlap, the connected pixel groups are regarded as the same region and are set as an integrated region.
(2) A labeling process is performed on the binary image of the pre-correction image. Then, a label (concatenated pixel group) including (belonging to) the extracted pixel is determined, and the extracted pixel belonging to the same label is regarded as the same area and is defined as an integrated area. In addition, it is good also considering the label (concatenated pixel group) containing an extraction pixel as an integrated area | region.

統合化処理部42bによって統合化領域が定められると、第2分割領域算出部42c、第1分割領域算出部42d、第2画像分割部42e、第1画像分割部42fによって、修正前画像の二値画像と修正後画像の二値画像とが領域分割される。以下、これら各部について説明する。   When the integrated region is determined by the integration processing unit 42b, the second divided region calculating unit 42c, the first divided region calculating unit 42d, the second image dividing unit 42e, and the first image dividing unit 42f obtain the second image before correction. The value image and the binary image of the corrected image are divided into regions. Hereinafter, each of these parts will be described.

(第2分割領域算出部42c)
第2分割領域算出部42cは、統合化処理部42bで統合化された統合化領域を含む所定領域を修正後画像についての第2分割領域とする。具体的には、第2分割領域算出部42cは、統合化領域(画素群)の外接矩形を所定サイズだけ拡張(膨張)して第2分割領域とする。ただし、拡張サイズは0でもよい。
(Second divided region calculation unit 42c)
The second divided region calculation unit 42c sets the predetermined region including the integrated region integrated by the integration processing unit 42b as the second divided region for the corrected image. Specifically, the second divided region calculation unit 42c expands (expands) the circumscribed rectangle of the integrated region (pixel group) by a predetermined size to form the second divided region. However, the extension size may be zero.

なお、第2分割領域算出部42cは、統合化領域の画素群に対し凸包を作成し、その凸包を所定サイズだけ拡張(膨張)して第2分割領域とするようにしてもよい。この場合においても、拡張サイズは0でもよい。ここで、凸包とは、点集合を含む最小の凸多角形を言い、複数の点を囲む最短の閉路とも言える。   Note that the second divided region calculation unit 42c may create a convex hull for the pixel group of the integrated region, and expand (expand) the convex hull by a predetermined size to form the second divided region. Even in this case, the extension size may be zero. Here, the convex hull means the smallest convex polygon including a point set, and can be said to be the shortest cycle surrounding a plurality of points.

第1分割領域算出部42dは、第2分割領域算出部42cで算出された第2分割領域よりも所定サイズだけ膨張させた領域を修正前画像についての第1分割領域とする。   The first divided region calculation unit 42d sets a region expanded by a predetermined size from the second divided region calculated by the second divided region calculation unit 42c as the first divided region for the pre-correction image.

第2画像分割部42eは、第2分割領域算出部42cで算出された第2分割領域に基づいて、修正後画像の二値画像から第2分割領域に相当する画像を切り出して(分割して)第2画像とする。   The second image dividing unit 42e cuts out (divides) an image corresponding to the second divided region from the binary image of the corrected image based on the second divided region calculated by the second divided region calculating unit 42c. ) The second image.

第1画像分割部42fは、第1分割領域算出部42dで算出された第1分割領域に基づいて、修正前画像の二値画像から第1分割領域に相当する画像を切り出して第1画像とする。ここで、第1分割領域は第2分割領域を膨張させたものであるため、第1画像のサイズは第2画像のサイズよりも大きいものとなる。   The first image dividing unit 42f cuts out an image corresponding to the first divided region from the binary image of the pre-correction image based on the first divided region calculated by the first divided region calculating unit 42d, To do. Here, since the first divided area is an expansion of the second divided area, the size of the first image is larger than the size of the second image.

(分割画像位置・歪補正部42g)
分割画像位置・歪補正部42gは、修正前画像の二値画像と修正後画像の二値画像との位置合わせを局所的に行うものである。具体的には、分割画像位置・歪補正部42gは、第1画像内で第2画像の位置を変えつつ第2画像を第1画像に重畳する形でパターンマッチングを行い、マッチング度の大きい位置を補正位置として位置・歪補正を行う。
(Divided image position / distortion correction unit 42g)
The divided image position / distortion correction unit 42g locally aligns the binary image of the pre-correction image and the binary image of the post-correction image. Specifically, the divided image position / distortion correction unit 42g performs pattern matching in such a manner that the second image is superimposed on the first image while changing the position of the second image in the first image, and a position with a high degree of matching. Position / distortion correction is performed using as a correction position.

例えば、分割画像位置・歪補正部42gは、第1画像内全体で第2画像を1画素単位で上下左右方向に移動させつつ全位置でパターンマッチングを行い、最もマッチング度(マッチング度合い)の大きい位置を位置・歪補正の位置とする。ここでは、第1画像と第2画像のON画素位置が一致した画素の個数でマッチング度を表すものとする。   For example, the divided image position / distortion correction unit 42g performs pattern matching at all positions while moving the second image in the vertical and horizontal directions in units of one pixel in the entire first image, and has the highest matching degree (matching degree). The position is the position / distortion correction position. Here, the degree of matching is represented by the number of pixels in which the ON pixel positions of the first image and the second image match.

具体的には、図6に示すように、第1画像(A)が矩形のリング状画像を持ち、第2画像(B)が当該リング状画像に斜線を引いた画像を持つ場合、第1画像(A)に対して第2画像(B)を図の左上から右方向へ1画素単位で移動させ、次に1画素下に移動させて左側から右側へ移動させ、この処理を図の右下まで繰り返して実行する。   Specifically, as shown in FIG. 6, when the first image (A) has a rectangular ring-shaped image and the second image (B) has an image in which the ring-shaped image is hatched, the first image The second image (B) is moved by one pixel unit from the upper left to the right in the figure with respect to the image (A), and then moved downward by one pixel and moved from the left to the right. Repeat until the bottom.

ここでは、4つの位置(C)〜(F)のマッチング度を示している。位置(C)のマッチング度=12、位置(D)のマッチング度=12、位置(E)のマッチング度=52、位置(F)のマッチング度=31である。したがって、位置(E)が位置・歪補正の位置となる。   Here, the matching degrees of the four positions (C) to (F) are shown. The matching degree at position (C) = 12, the matching degree at position (D) = 12, the matching degree at position (E) = 52, and the matching degree at position (F) = 31. Therefore, the position (E) is the position / distortion correction position.

こうして、分割画像位置・歪補正部42gは、最もマッチング度が高い第1画像と第2画像との位置関係を求める。そして、当該位置関係を保持するように、修正前画像における第1画像に相当する領域の画像の位置を補正する。こうして、局所位置・歪補正部42は、修正前画像と修正後画像との位置を局所的に合わせる。   Thus, the divided image position / distortion correction unit 42g obtains the positional relationship between the first image and the second image having the highest matching degree. Then, the position of the image in the region corresponding to the first image in the pre-correction image is corrected so as to maintain the positional relationship. In this way, the local position / distortion correction unit 42 locally matches the positions of the pre-correction image and the post-correction image.

(修正部分抽出部44)
修正部分抽出部44は、制御部22を中心として実現され、全体的かつ、統合領域単位に局所的に位置合わせが行われた修正前画像(正確には、補正部34により特定されたパラメータセットの第1色補正パラメータP1で補正された修正前画像)と修正後画像(正確には、補正部34により特定されたパラメータセットの第2色補正パラメータP2で補正された修正後画像)とに基づいて、修正部分の領域を抽出する。具体的には、修正部分抽出部44は、修正後画像の二値画像から修正前画像の二値画像を引き算することにより差分情報を生成する。そして、差分情報に基づいて、修正部分を抽出する。なお、上記では、修正部分抽出部44は、修正後画像の二値画像から修正前画像の二値画像を引き算することによって差分情報を生成しているが、修正前画像の二値画像から修正後画像の二値画像を引き算することによって差分情報を生成してもよいし、両方法で差分情報を生成するようにしてもよい。また、修正部分抽出部44は、修正後画像そのものから修正前画像そのものを引き算することで差分情報を生成し、当該差分情報に基づいて、修正部分を抽出するようにしてもよい。
(Correction part extraction part 44)
The correction portion extraction unit 44 is realized with the control unit 22 as a center, and is an image before correction that has been locally and locally aligned in units of integrated regions (more precisely, the parameter set specified by the correction unit 34). Before-correction corrected with the first color correction parameter P1) and after-correction image (more precisely, the corrected image corrected with the second color correction parameter P2 of the parameter set specified by the correction unit 34). Based on this, the region of the corrected portion is extracted. Specifically, the corrected portion extraction unit 44 generates difference information by subtracting the binary image of the image before correction from the binary image of the image after correction. Then, the corrected part is extracted based on the difference information. In the above description, the corrected portion extraction unit 44 generates difference information by subtracting the binary image of the image before correction from the binary image of the image after correction, but the correction is extracted from the binary image of the image before correction. Difference information may be generated by subtracting a binary image of the subsequent image, or difference information may be generated by both methods. Further, the corrected portion extraction unit 44 may generate difference information by subtracting the pre-correction image itself from the corrected image itself, and extract the corrected portion based on the difference information.

以下、利用者が記憶部24に記憶される修正前画像と修正後画像とを指定して修正部分抽出指示を行った場合に、画像処理装置2が実行する処理の一例についてフローチャート図7を参照しながら説明する。   Hereinafter, referring to the flowchart of FIG. 7, an example of processing executed by the image processing apparatus 2 when the user designates a pre-correction image and a post-correction image stored in the storage unit 24 and issues a correction part extraction instruction. While explaining.

画像処理装置2は、修正抽出指示操作を受け付けると、修正前画像と修正後画像とを記憶部24から読み出し、比較領域を決定する処理(比較領域決定処理)を実行する(S101)。具体的には、画像処理装置2は、修正前画像及び修正後画像のレイアウトを解析し、解析の結果、文字/線/表などの画像領域や、文字/線/表などを多く含むページを比較領域とする。なお、画像処理装置2は、修正前画像を所定閾値で二値化した二値画像と修正後画像を所定閾値で二値化した二値画像との差分情報を生成し、差分抽出画素の数が最も少ない頁の画像を比較領域
とするようにしてもよい。
When receiving the correction extraction instruction operation, the image processing apparatus 2 reads the pre-correction image and the post-correction image from the storage unit 24, and executes a process of determining a comparison area (comparison area determination process) (S101). Specifically, the image processing apparatus 2 analyzes the layout of the pre-correction image and the post-correction image, and as a result of the analysis, the image area such as a character / line / table or a page containing a large number of characters / lines / tables. The comparison area. The image processing apparatus 2 generates difference information between a binary image obtained by binarizing the pre-correction image with a predetermined threshold and a binary image obtained by binarizing the post-correction image with the predetermined threshold, and the number of difference extraction pixels The image of the page with the least number may be used as the comparison area.

そして、画像処理装置2は、修正前画像の明度と修正後画像の明度とが概ね同一となるような第1色補正パラメータP1及び第2色補正パラメータP2のパラメータセットを決定すべく、パラメータセット特定処理を実行する(S102)。ここで、パラメータセット特定処理について図8を参照しながら説明する。   Then, the image processing apparatus 2 determines the parameter set of the first color correction parameter P1 and the second color correction parameter P2 so that the brightness of the image before correction and the brightness of the image after correction are approximately the same. A specific process is executed (S102). Here, the parameter set specifying process will be described with reference to FIG.

パラメータセット特定処理では、画像処理装置2は、相関係数Rの値が所定閾値TH以上になるまで、組み合わせ番号の小さいパラメータセットから順に、S201乃至S203のステップを実行することにより、相関係数Rの値が所定閾値TH以上となる1つのパラメータセットを特定する。   In the parameter set specifying process, the image processing apparatus 2 executes the steps of S201 to S203 in order from the parameter set having the smallest combination number until the value of the correlation coefficient R becomes equal to or greater than the predetermined threshold value TH. One parameter set in which the value of R is equal to or greater than a predetermined threshold value TH is specified.

すなわち、画像処理装置2は、着目しているパラメータセットの第1色補正パラメータP1と第2色補正パラメータP2の各々で修正前画像の比較領域における明度と修正後画像の比較領域における明度とを補正する処理(補正処理)を行う(S201)。   That is, the image processing apparatus 2 calculates the lightness in the comparison area of the image before correction and the lightness in the comparison area of the image after correction for each of the first color correction parameter P1 and the second color correction parameter P2 of the parameter set of interest. A correction process (correction process) is performed (S201).

ここで、画像処理装置2は、S201のステップにおいて、修正前画像と修正後画像の明度を補正するのではなく、R値、G値、B値をそれぞれ補正するようにしてもよい。この場合、第1色補正パラメータP1及び第2色補正パラメータP2には、それぞれ、R値のトーンカーブと、B値のトーンカーブと、G値のトーンカーブと、を含める。   Here, in step S201, the image processing apparatus 2 may correct the R value, the G value, and the B value instead of correcting the brightness of the pre-correction image and the post-correction image. In this case, the first color correction parameter P1 and the second color correction parameter P2 include an R value tone curve, a B value tone curve, and a G value tone curve, respectively.

そして、画像処理装置2は、修正後画像の比較領域における明度と、修正前画像の比較領域における明度と、を比較する処理(比較処理)を行う(S202)。ここでは、画像処理装置2は、修正後画像の比較領域における明度別画素数分布(第1明度ヒストグラム)と、修正前画像の比較領域における明度別画素数分布(第2明度ヒストグラム)と、の相関係数Rを算出する。   Then, the image processing apparatus 2 performs a process (comparison process) for comparing the lightness in the comparison area of the image after correction with the lightness in the comparison area of the image before correction (S202). Here, the image processing apparatus 2 calculates the pixel number distribution by brightness (first brightness histogram) in the comparison area of the image after correction and the pixel number distribution by brightness (second brightness histogram) in the comparison area of the image before correction. A correlation coefficient R is calculated.

そして、画像処理装置2は、相関係数Rが所定閾値TH以上であるか否かを判断する(S203)。そして、相関関数Rが所定閾値TH以上である場合(S203のY)、パラメータ決定処理を終了し、一方、相関関数Rが所定閾値よりも小さい場合(S203のN)、画像処理装置2は、次の組み合わせ番号のパラメータセットについて、S201乃至S203の処理を実行する。こうして、画像処理装置2は、相関係数Rが所定閾値TH以上となる1つのパラメータセットを特定する。なお、画像処理装置2は、S201乃至S203のステップをすべてのパラメータセットについて実行した上で、相関係数Rが所定閾値TH以上となるパラメータセットのうち相関係数Rの値が最大となる
パラメータセットを特定するようにしてもよい。
Then, the image processing apparatus 2 determines whether or not the correlation coefficient R is greater than or equal to a predetermined threshold value TH (S203). If the correlation function R is equal to or greater than the predetermined threshold value TH (Y in S203), the parameter determination process is terminated. On the other hand, if the correlation function R is smaller than the predetermined threshold value (N in S203), the image processing apparatus 2 The processing of S201 to S203 is executed for the parameter set of the next combination number. Thus, the image processing apparatus 2 specifies one parameter set in which the correlation coefficient R is equal to or greater than the predetermined threshold value TH. Note that the image processing apparatus 2 executes the steps S201 to S203 for all parameter sets, and then the parameter having the maximum correlation coefficient R among the parameter sets in which the correlation coefficient R is equal to or greater than the predetermined threshold TH. A set may be specified.

ここで、画像処理装置2は、比較処理(S202)において、修正前画像と修正後画像の比較領域における明度別画素数分布について相関係数を算出するのではなく、両画像の比較領域におけるRed,Green,Blueの各色プレーンの画素数分布について相関係数を算出するようにしてもよい。この場合、画像処理装置2は、S203のステップにおいて、算出した3つの相関係数、の少なくとも1つが所定閾値TH以上である場合に(S203のY)、パラメータセット特定処理を終了し、これら3つの相関係数のいずれもが所定閾値THよりも小さい場合に(S203のN)、次の組み合わせ番号のパラメータセットについて、S201乃至S203の処理を実行するようにしてもよい。   Here, in the comparison process (S202), the image processing apparatus 2 does not calculate the correlation coefficient for the pixel number distribution according to lightness in the comparison area between the pre-correction image and the post-correction image, but in the comparison area of both images. , Green, and Blue, the correlation coefficient may be calculated for the pixel number distribution of each color plane. In this case, when at least one of the calculated three correlation coefficients is greater than or equal to the predetermined threshold TH in step S203 (Y in S203), the image processing apparatus 2 ends the parameter set specifying process, and these 3 When any of the two correlation coefficients is smaller than the predetermined threshold value TH (N in S203), the processing of S201 to S203 may be executed for the parameter set of the next combination number.

また、画像処理装置2は、比較処理(S202)において、後述するラベル数Lを算出するようにしてもよい。すなわち、画像処理装置2は、S201のステップの後、修正後画像を所定閾値で二値化した二値画像から修正前画像を所定閾値で二値化した二値画像を引き算することにより差分情報を生成し、比較領域内の差分抽出画素の統合化領域を定める。ここで、画像処理装置2は、修正後画像の比較領域における二値画像から修正前画像の比較領域における二値画像を引き算することにより差分情報を生成してもよい。そして、画像処理装置2は、統合化領域の数、すなわちラベル数Lを求める。ところで、仮に比較領域に修正部分が含まれる場合、修正前画像の比較領域における明度と修正後画像の比較領域における明度との差が小さければ、修正部分の差分抽出画素だけが抽出されやすくなるので、統合化領域の数は小さくなる。また、比較領域に修正部分が含まれない場合も、修正前画像の比較領域における明度と修正後画像の比較領域における明度との差が小さければ、抽出される差分抽出画素の数が小さくなるので、統合化領域の数が小さくなる。これに鑑み、画像処理装置2は、S203のステップにおいて、ラベル数Lの値が所定閾値より大きい場合(S203のN)、次の組み合わせ番号に係るパラメータセットについてS201乃至S203の処理を実行し、一方、ラベル数Lの値が所定閾値以下である場合に(S203のY)、パラメータセット特定処理を終了するようにしてもよい。なお、上記Lは、修正後画像を所定閾値で二値化した二値画像から修正前画像を所定閾値で二値化した二値画像を引き算することにより得られた差分画像の差分抽出画素数であってもよい。   Further, the image processing apparatus 2 may calculate the number L of labels to be described later in the comparison process (S202). That is, after the step of S201, the image processing apparatus 2 subtracts a binary image obtained by binarizing the pre-correction image with the predetermined threshold from the binary image obtained by binarizing the post-correction image with the predetermined threshold. And an integrated region of difference extraction pixels in the comparison region is determined. Here, the image processing apparatus 2 may generate the difference information by subtracting the binary image in the comparison area of the image before correction from the binary image in the comparison area of the image after correction. Then, the image processing apparatus 2 obtains the number of integrated regions, that is, the label number L. By the way, if the comparison area includes a correction portion, if the difference between the lightness in the comparison area of the pre-correction image and the lightness in the comparison area of the post-correction image is small, only the difference extraction pixels in the correction portion are easily extracted. The number of integrated areas is reduced. Even when the comparison area does not include a correction portion, if the difference between the lightness in the comparison area of the pre-correction image and the lightness in the comparison area of the post-correction image is small, the number of difference extraction pixels to be extracted becomes small. The number of integrated areas is reduced. In view of this, when the value of the number L of labels is larger than the predetermined threshold value in step S203 (N in S203), the image processing apparatus 2 executes the processes in S201 to S203 for the parameter set related to the next combination number, On the other hand, when the value of the label number L is equal to or smaller than the predetermined threshold (Y in S203), the parameter set specifying process may be terminated. Note that L is the number of difference extraction pixels of the difference image obtained by subtracting the binary image obtained by binarizing the pre-correction image with the predetermined threshold from the binary image obtained by binarizing the corrected image with the predetermined threshold. It may be.

また、画像処理装置2は、比較処理(S202)において、後述する2つの分散値σX、σY、を算出するようにしてもよい。すなわち、画像処理装置2は、S201のステップの後、修正後画像を所定閾値で二値化した二値画像から修正前画像を所定閾値で二値化した二値画像を引き算することにより差分情報を生成する。ここで、画像処理装置2は、修正後画像の比較領域における二値画像から修正前画像の比較領域における二値画像を引き算することにより差分情報を生成してもよい。そして、画像処理装置2は、比較領域内の各差分抽出画素について射影演算を行い、比較領域の水平方向(X方向)と垂直方向(Y方向)の各々について、差分抽出画素の射影ヒストグラムを生成する。そして、画像処理装置2は、各射影ヒストグラムから、差分抽出画素のX方向の分散値σXと、Y方向の分散値σYと、を算出する。ところで、仮に比較領域に修正部分が含まれる場合、修正前画像の比較領域における明度と修正後画像の比較領域における明度との差が小さければ、修正部分の差分抽出画素だけが抽出されやすくなるので、差分抽出画素はまとまって存在しやすくなり、結果的に、σXとσYの値は小さくなる。また、比較領域に修正部分が含まれない場合も、修正前画像の比較領域における明度と修正後画像の比較領域における明度との差が小さければ、抽出される差分抽出画素の数が小さくなるので、σXとσYの値は小さくなる。これに鑑み、画像処理装置2は、S203のステップにおいて、σXとσYの値の少なくとも一方が所定閾値より大きい場合(S203のN)、次の組み合わせ番号に係るパラメータセットについてS201乃至S203の処理を実行し、一方、σX及びσYの値がともに所定閾値以下である場合(S203のY)、パラメータセット特定処理を終了するようにしてもよい。   Further, the image processing apparatus 2 may calculate two variance values σX and σY, which will be described later, in the comparison process (S202). That is, after the step of S201, the image processing apparatus 2 subtracts a binary image obtained by binarizing the pre-correction image with the predetermined threshold from the binary image obtained by binarizing the post-correction image with the predetermined threshold. Is generated. Here, the image processing apparatus 2 may generate the difference information by subtracting the binary image in the comparison area of the image before correction from the binary image in the comparison area of the image after correction. Then, the image processing apparatus 2 performs a projection operation for each difference extraction pixel in the comparison area, and generates a projection histogram of the difference extraction pixel for each of the horizontal direction (X direction) and the vertical direction (Y direction) of the comparison area. To do. Then, the image processing apparatus 2 calculates a variance value σX in the X direction and a variance value σY in the Y direction of the difference extraction pixel from each projection histogram. By the way, if the comparison area includes a correction portion, if the difference between the lightness in the comparison area of the pre-correction image and the lightness in the comparison area of the post-correction image is small, only the difference extraction pixels in the correction portion are easily extracted. The difference extraction pixels tend to exist together, and as a result, the values of σX and σY become smaller. Even when the comparison area does not include a correction portion, if the difference between the lightness in the comparison area of the pre-correction image and the lightness in the comparison area of the post-correction image is small, the number of difference extraction pixels to be extracted becomes small. , ΣX and σY become smaller. In view of this, if at least one of the values of σX and σY is larger than the predetermined threshold value in step S203 (N in S203), the image processing apparatus 2 performs the processing in S201 to S203 for the parameter set related to the next combination number. On the other hand, if both the values of σX and σY are equal to or smaller than the predetermined threshold (Y in S203), the parameter set specifying process may be terminated.

そして、画像処理装置2は、S102のステップで特定したパラメータセットを用いて修正前画像全体と修正後画像全体を補正する(S103)。そして、画像処理装置2は、全体位置・歪補正部40の機能により、修正前画像と修正後画像とを対象に、頁ごとの全体的な位置ズレや歪みを補正する処理(全体位置歪補正処理)を実行する(S104)。   Then, the image processing apparatus 2 corrects the entire image before correction and the entire image after correction using the parameter set specified in step S102 (S103). Then, the image processing apparatus 2 corrects the overall positional deviation and distortion for each page for the pre-correction image and the post-correction image by the function of the global position / distortion correction unit 40 (global positional distortion correction). Process) is executed (S104).

そして、画像処理装置2は、局所位置・歪補正部42の機能により、S104のステップで全体的な位置合わせがなされた修正前画像と、修正後画像と、の間にある局所的な位置ズレや歪みを補正する処理(局所位置歪補正処理)を実行する(S105)。例えば、図9に示すフローチャート図に示す処理を実行する。   Then, the image processing apparatus 2 uses the function of the local position / distortion correction unit 42 to detect a local positional deviation between the pre-correction image and the post-correction image that have been entirely aligned in step S104. And a process of correcting distortion (local position distortion correction process) is executed (S105). For example, the processing shown in the flowchart shown in FIG. 9 is executed.

すなわち、画像処理装置2は、修正前画像を所定閾値で二値化した二値画像と修正後画像を所定閾値で二値化した二値画像とを比較することによって差分情報を抽出する(S301)。例えば、画像処理装置2は、修正後画像の二値画像から修正前画像の二値画像のON画素を膨張した画像を引き算することによって差分情報を抽出する。   That is, the image processing apparatus 2 extracts difference information by comparing a binary image obtained by binarizing the pre-correction image with a predetermined threshold and a binary image obtained by binarizing the post-correction image using the predetermined threshold (S301). ). For example, the image processing apparatus 2 extracts difference information by subtracting an image obtained by expanding ON pixels of the binary image of the pre-correction image from the binary image of the post-correction image.

そして、画像処理装置2は、S301のステップで抽出された差分情報たる差分抽出画素に基づいて、同一領域と見なせる差分抽出画素同士を統合化して統合化領域(画素群)とする(S302)。   Then, the image processing apparatus 2 integrates the difference extraction pixels that can be regarded as the same region based on the difference extraction pixel that is the difference information extracted in the step of S301 to form an integrated region (pixel group) (S302).

そして、画像処理装置2は、S302のステップで定められた統合化領域のうちの1つ(以下、注目領域)を選択する(S303)。そして、制御部22は、当該注目領域を含む所定領域を修正後画像についての第2分割領域とする(S304)。そして、画像処理装置2は、第2分割領域よりも所定サイズだけ膨張させた領域を修正前画像についての第1分割領域とする(S305)。   Then, the image processing apparatus 2 selects one of the integrated areas determined in step S302 (hereinafter, attention area) (S303). And the control part 22 makes the predetermined area | region containing the said attention area | region the 2nd division area about a corrected image (S304). Then, the image processing apparatus 2 sets the area expanded by a predetermined size from the second divided area as the first divided area for the pre-correction image (S305).

そして、画像処理装置2は、修正後画像の二値画像から第2分割領域に相当する画像を切り出して第2画像とする(S306)。また、画像処理装置2は、修正前画像の二値画像から第1分割領域に相当する画像を切り出して第1画像とする(S307)。   Then, the image processing apparatus 2 cuts out an image corresponding to the second divided area from the binary image of the corrected image and sets it as the second image (S306). Further, the image processing apparatus 2 cuts out an image corresponding to the first divided area from the binary image of the pre-correction image and sets it as the first image (S307).

そして、画像処理装置2は、第1画像内で第2画像の位置を動かし、マッチング度が最も大きいときの第1画像と第2画像との位置関係を求める。そして、画像処理装置2は、当該位置関係となるように、修正前画像における第1画像に相当する領域の画像の位置を補正する(S308)。   Then, the image processing device 2 moves the position of the second image in the first image, and obtains the positional relationship between the first image and the second image when the degree of matching is the highest. Then, the image processing apparatus 2 corrects the position of the image in the region corresponding to the first image in the pre-correction image so that the positional relationship is satisfied (S308).

そして、画像処理装置2は、S304乃至S308のステップがまだ実行されていない統合化領域があれば(S309のNO)、S303のステップに戻り以降のステップを実行する。一方、画像処理装置2は、S304乃至S308のステップがすべての統合化領域について実行されていれば(S309のYES)、局所位置・歪補正処理を終了する。   Then, if there is an integrated area where the steps S304 to S308 have not been executed yet (NO in S309), the image processing apparatus 2 returns to the step S303 and executes the subsequent steps. On the other hand, if the steps from S304 to S308 have been executed for all the integrated regions (YES in S309), the image processing apparatus 2 ends the local position / distortion correction processing.

そして、画像処理装置2は、S104及びS105のステップをへて全体的にも局所的にも位置合わせが行われた修正後画像(正確には、S103で補正された修正後画像)の二値画像から、修正前画像(S103のステップで補正された修正前画像)の二値画像を引き算することにより差分情報を生成する差分生成処理を実行する(S106)。そして、画像処理装置は、差分情報に基づいて修正部分を抽出する(S107)。なお、上記では、修正後画像の二値画像から修正前画像の二値画像を引き算することによって差分情報を生成しているが、修正前画像の二値画像から修正後画像の二値画像を引き算することによって差分情報を生成してもよいし、両方法で差分情報を生成してもよい。また、画像処理装置2は、S106のステップにおいて、修正後画像そのものから修正前画像そのものを引き算することで差分情報を生成し、S107のステップにおいて、当該差分情報に基づいて修正部分を抽出するようにしてもよい。   Then, the image processing apparatus 2 performs binary processing of the corrected image (correctly corrected image corrected in S103) that has been subjected to the alignment both globally and locally through the steps of S104 and S105. A difference generation process for generating difference information is performed by subtracting the binary image of the pre-correction image (the pre-correction image corrected in step S103) from the image (S106). Then, the image processing apparatus extracts a correction portion based on the difference information (S107). In the above, difference information is generated by subtracting the binary image of the pre-correction image from the binary image of the post-correction image, but the binary image of the post-correction image is converted from the binary image of the pre-correction image. Difference information may be generated by subtraction, or difference information may be generated by both methods. Further, the image processing apparatus 2 generates difference information by subtracting the uncorrected image itself from the corrected image itself in step S106, and extracts a corrected portion based on the difference information in step S107. It may be.

以上が本発明の実施形態1に係る画像処理装置2が実行する処理の内容である。なお、S104のステップを、S101のステップの前におこなってもよい。この場合、比較領域を決定する前にあらかじめ画像全体の位置歪補正処理がおこなわれているため、修正前もしくは修正後の画像のいずれかで比較領域を決定するだけで、修正前後の両方の画像でほぼ同等の領域が比較領域として決定される。   The above is the content of the processing executed by the image processing apparatus 2 according to the first embodiment of the present invention. Note that step S104 may be performed before step S101. In this case, since the positional distortion correction processing of the entire image is performed in advance before the comparison area is determined, both the images before and after the correction are determined simply by determining the comparison area in either the image before or after the correction. Thus, a substantially equivalent area is determined as a comparison area.

例えば、図10(a)を見てもわかるように、修正前画像が「晴れ時々曇りでしょう。」の文言を含み、修正後画像が当該文言に加えて加筆部分(すなわち、横二重線と文字「後」)を含む場合、画像処理装置2により、加筆部分たる横二重線と文字「後」とが抽出される。また、例えば、図10(b)を見てもわかるように、修正後画像が修正前画像の一部を削除したものである場合、修正前画像から修正後画像を引き算すれば、画像処理装置2により削除部分が抽出される。   For example, as can be seen from FIG. 10 (a), the pre-correction image includes the wording “Sunny and cloudy.”, And the post-correction image includes the added portion (ie, horizontal double line). And the character “after”), the image processing device 2 extracts the horizontal double line as the added portion and the character “after”. Further, for example, as can be seen from FIG. 10B, if the post-correction image is obtained by deleting a part of the pre-correction image, the image processing apparatus can be obtained by subtracting the post-correction image from the pre-correction image. 2 deletes the deleted part.

以上のように、本発明に係る画像処理装置2は、修正前画像の明度と修正後画像の明度とが概ね同一となるよう補正した上で、両画像から差分情報を生成し、修正部分を抽出する。そのため、例えば、両画像を補正せずに差分情報を生成する場合に比べ、空白部分等の本来抽出されるべきでない部分が抽出されることを抑止することができる。すなわち、修正部分が正確に抽出されることとなる。   As described above, the image processing apparatus 2 according to the present invention corrects the brightness of the pre-correction image and the post-correction image to be substantially the same, generates difference information from both images, Extract. Therefore, for example, compared to the case where difference information is generated without correcting both images, it is possible to suppress extraction of a portion that should not be extracted such as a blank portion. That is, the corrected part is accurately extracted.

また、本発明に係る画像処理装置2は、修正前画像の明度と修正後画像の明度とが概ね同一となるよう補正した上で、両画像の位置合わせを行うので、両画像を補正せずに位置合わせを行う場合に比べ、位置合わせの精度が向上する。この点からも、修正部分が正確に抽出されることとなる。   In addition, the image processing apparatus 2 according to the present invention corrects the brightness of the image before correction and the brightness of the image after correction to be approximately the same, and then aligns both images, so that both images are not corrected. Compared with the case where alignment is performed, the alignment accuracy is improved. Also from this point, the corrected portion is extracted accurately.

また、本発明に係る画像処理装置2では、修正部分を含まない領域が比較領域となりやすくなる。従って、修正部分による影響を受けずに第1色補正パラメータ及び第2色補正パラメータが決定されやすくなり、結果的に、修正部分を含む領域が比較領域となる場合(例えば、画像全体を比較領域とする場合)よりも、明度の統一精度が向上する。従って、この点からも、修正部分が正確に抽出されることとなる。   Further, in the image processing apparatus 2 according to the present invention, a region that does not include a corrected portion is likely to be a comparison region. Therefore, the first color correction parameter and the second color correction parameter can be easily determined without being affected by the correction portion, and as a result, the region including the correction portion becomes the comparison region (for example, the entire image is compared with the comparison region). ), The unified accuracy of brightness is improved. Therefore, also from this point, the corrected portion is accurately extracted.

また、本発明に係る画像処理装置2では、補正処理を修正前画像と修正後画像の各々の一部(すなわち、比較領域)にのみ行うので、パラメータセットの決定に必要な処理が軽減される。   Further, in the image processing apparatus 2 according to the present invention, since the correction process is performed only on a part of each of the pre-correction image and the post-correction image (that is, the comparison region), the processing necessary for determining the parameter set is reduced. .

なお、画像処理装置2は、S101のステップで比較領域とする頁を決定した後、修正前画像の縮小画像と修正後画像の縮小画像とを対象としてパラメータセット特定処理(S102)を実行することにより、パラメータセットを特定するようにしてもよい。こうすれば、パラメータセットを特定するために必要な処理負荷を軽減することができる。   The image processing apparatus 2 executes the parameter set specifying process (S102) for the reduced image of the pre-correction image and the reduced image of the post-correction image after determining the page to be the comparison area in step S101. Thus, the parameter set may be specified. In this way, it is possible to reduce the processing load necessary for specifying the parameter set.

また、比較領域となる画像領域や頁は所定の画像領域や頁であってもよいし、利用者によって指定される画像領域や頁であってもよい。この場合、修正がなされにくい画像領域や頁を比較領域となるよう予め定めておいたり、修正がなされていない画像領域や頁を比較領域として利用者が指定したりすれば、適切なパラメータセットが特定されやすくなる。また、比較領域は、修正前画像と修正後画像の各々の全体領域であってもよい。   Further, the image area or page serving as the comparison area may be a predetermined image area or page, or may be an image area or page designated by the user. In this case, if an image area or page that is difficult to be corrected is determined in advance as a comparison area, or if the user specifies an image area or page that is not corrected as a comparison area, an appropriate parameter set can be obtained. It becomes easy to be identified. The comparison area may be the entire area of each of the pre-correction image and the post-correction image.

また、画像処理装置2は、S201の補正処理において、修正前画像全体を補正するとともに修正後画像全体を補正するようにしてもよい。この場合、画像処理装置2は、S103のステップを省略するようにしてもよい。   Further, the image processing apparatus 2 may correct the entire image before correction and the entire image after correction in the correction processing of S201. In this case, the image processing apparatus 2 may omit step S103.

また、画像処理装置2は、S201の補正処理において修正前画像全体を補正するとともに修正後画像全体を補正する場合、S202のステップの前に、頁ごとに修正前画像と修正後画像との位置を全体的に合わせておくようにしてもよい。この場合、画像処理装置2は、S103のステップだけでなく、S104のステップを省略してもよい。   Further, when correcting the entire image before correction and correcting the entire image after correction in the correction processing of S201, the image processing apparatus 2 positions the image before correction and the image after correction for each page before the step of S202. May be adjusted as a whole. In this case, the image processing apparatus 2 may omit not only the step of S103 but also the step of S104.

また、画像処理装置2は、S201の補正処理において修正前画像全体を補正するとともに修正後画像全体を補正する場合、S101のステップを省略し、補正処理がなされた修正前画像と修正後画像を対象に比較領域決定処理を実行して比較領域を決定するようにしてもよい。例えば、修正前画像と修正後画像とが一頁分の画像しか含まない場合を例に取り上げる。この場合、画像処理装置2は、S201のステップの後、修正前画像と修正後画像との位置を全体的に合わせる。そして、以下のようにして比較領域を決定する
Further, when correcting the entire image before correction and correcting the entire image after correction in the correction processing of S201, the image processing apparatus 2 omits the step of S101, and displays the image before correction and the image after correction subjected to the correction processing. The comparison area may be determined by executing a comparison area determination process on the target. For example, a case where the pre-correction image and the post-correction image include only an image for one page is taken as an example. In this case, after step S201, the image processing apparatus 2 aligns the positions of the pre-correction image and the post-correction image as a whole. Then, the comparison area is determined as follows.

例えば、画像処理装置2は、修正前画像を所定閾値で二値化した二値画像と修正後画像を所定閾値で二値化した二値画像とを引き算することにより、差分情報を生成し、差分抽出画素の統合化領域を定める。そして、画像処理装置2は、いずれの統合化領域とも抵触しない所定面積の矩形領域を比較領域と定める。そして、画像処理装置2は、S202のステップに進む
For example, the image processing apparatus 2 generates difference information by subtracting a binary image obtained by binarizing the pre-correction image with a predetermined threshold and a binary image obtained by binarizing the post-correction image with the predetermined threshold, An integrated region of difference extraction pixels is defined. Then, the image processing apparatus 2 determines a rectangular area having a predetermined area that does not conflict with any integrated area as a comparison area. Then, the image processing apparatus 2 proceeds to step S202.

また、例えば、画像処理装置2は、修正前画像と修正後画像の各々のレイアウトを解析し、修正前画像と修正後画像の各々について、文書領域、表領域、図領域等に分割する。そして、画像処理装置2は、これらの領域のうち、その位置・範囲が修正前画像と修正後画像とで最も類似する領域を比較領域と定める。そして、画像処理装置2は、S202のステップに進む。   For example, the image processing apparatus 2 analyzes the layout of each of the pre-correction image and the post-correction image, and divides each of the pre-correction image and the post-correction image into a document area, a table area, a figure area, and the like. Then, the image processing apparatus 2 determines, as a comparison area, an area where the position / range of the areas is most similar between the uncorrected image and the corrected image. Then, the image processing apparatus 2 proceeds to step S202.

次に本発明の実施形態2について図面を参照しながら説明する。   Next, Embodiment 2 of the present invention will be described with reference to the drawings.

実施形態2においても、本発明に係る画像処理装置2は、実施形態1と同様に、図1に示す修正抽出システム100を構成し、画像読取装置4と通信可能に接続される。そして、実施形態1と同様に、利用者は、修正前の紙原稿を画像読取装置4に読み取らせ、読取画像(以下、修正前画像)を画像処理装置2に登録する。また、修正前の紙原稿に加筆やホワイトペンによる削除等の修正を加えた、修正後の紙原稿を画像読取装置4に読み取らせ、読取画像(以下、修正後画像)を画像処理装置2に登録する。そして、利用者は、所定の修正部分抽出操作を行い、画像処理装置2に、修正前画像と修正後画像とを比較させ修正部分を抽出させる。画像読取装置4は、実施形態1と同様に、ADF等の自動給紙機構を備えた各種スキャナとして実現される。なお、紙原稿は複数の紙媒体を含む。   Also in the second embodiment, the image processing apparatus 2 according to the present invention constitutes the correction extraction system 100 shown in FIG. 1 and is connected to the image reading apparatus 4 so as to be communicable as in the first embodiment. As in the first embodiment, the user causes the image reading device 4 to read a paper document before correction, and registers a read image (hereinafter referred to as an image before correction) in the image processing device 2. In addition, the image reading device 4 is caused to read the corrected paper document in which correction such as addition or deletion with a white pen is performed on the uncorrected paper document, and the read image (hereinafter, corrected image) is read by the image processing device 2. sign up. Then, the user performs a predetermined correction portion extraction operation, and causes the image processing apparatus 2 to compare the uncorrected image with the corrected image and extract the corrected portion. As in the first embodiment, the image reading device 4 is realized as various scanners including an automatic paper feeding mechanism such as ADF. The paper document includes a plurality of paper media.

画像処理装置2は、例えば、パーソナルコンピュータやサーバとして実現される。画像処理装置2は、実施形態1と同様に、制御部22と、記憶部24と、画像入力部26と、操作部28と、その他図示しない各部を含んで構成される(図2参照)。記憶部24、画像入力部26、操作部28は、実施形態1で説明したものと同様のものである。   The image processing apparatus 2 is realized as a personal computer or a server, for example. As in the first embodiment, the image processing apparatus 2 includes a control unit 22, a storage unit 24, an image input unit 26, an operation unit 28, and other units not shown (see FIG. 2). The storage unit 24, the image input unit 26, and the operation unit 28 are the same as those described in the first embodiment.

制御部22は、CPU等であり、記憶部24に格納されているプログラムに従って動作する。具体的には、制御部22は、修正前画像と修正後画像とを比較して修正部分を抽出するための処理を実行する。制御部22が実行する処理については、後に具体的に説明する。   The control unit 22 is a CPU or the like and operates according to a program stored in the storage unit 24. Specifically, the control unit 22 compares the pre-correction image with the post-correction image and executes a process for extracting a correction part. The processing executed by the control unit 22 will be specifically described later.

図11は、制御部22が記憶部24に格納されるプログラムに従って動作することにより、画像処理装置2で実現される機能のブロック図である。同図に示すように、画像処理装置2は、比較領域決定部52と、二値化部54と、比較部56と、全体位置・歪補正部58と、局所位置・歪補正部60と、修正部分抽出部62と、を含む。以下、各部について説明する。なお、比較領域決定部52と、局所位置・歪補正部60と、修正部分抽出部62とは、それぞれ、実施形態1で説明した比較領域決定部32と、局所位置・歪補正部42と、修正部分抽出部44と同様の機能を有するので、ここでは説明を省略する。   FIG. 11 is a block diagram of functions realized by the image processing apparatus 2 when the control unit 22 operates in accordance with a program stored in the storage unit 24. As shown in the figure, the image processing apparatus 2 includes a comparison area determination unit 52, a binarization unit 54, a comparison unit 56, an overall position / distortion correction unit 58, a local position / distortion correction unit 60, A correction portion extraction unit 62. Hereinafter, each part will be described. The comparison region determination unit 52, the local position / distortion correction unit 60, and the corrected portion extraction unit 62 are respectively the comparison region determination unit 32, the local position / distortion correction unit 42 described in the first embodiment, Since it has the same function as the corrected portion extraction unit 44, the description thereof is omitted here.

(二値化部54)
二値化部54は、制御部22を中心として実現される、二値化部54は、二値化パラメータで画像を二値化する。本実施形態では、二値化部54は、第1二値化パラメータB1と第2二値化パラメータB2の少なくとも一方を変更しながら、第1二値化パラメータB1で修正前画像の比較領域のおける画像を二値化するとともに、第2二値パラメータB2で修正後画像の比較領域における画像を二値化することにより、第1二値化パラメータB1と第2二値化パラメータB2のパラメータセットを1つ特定する。ここでは、二値化部54は、比較部56によって算出される画素数差Dが所定閾値THon以下になるまで、第1二値化パラメータB1と第2二値化パラメータB2の少なくとも一方を変更しながら修正前画像の比較領域における画像と修正後画像の比較領域における画像を二値化し、画素数差Dが所定閾値THon以下となるパラメータセットを特定する。ここで、画素数差Dは、修正前画像の比較領域のおける二値画像のON画素数と、修正後画像の比較領域における二値画像のON画素数の差である。また、第1二値化パラメータB1は、修正前画像の比較領域における画像を二値化する際の明度閾値であり、第2二値化パラメータB2は、修正後画像の比較領域における画像を二値化する際の明度閾値である。
(Binarization unit 54)
The binarization unit 54 is realized with the control unit 22 as the center. The binarization unit 54 binarizes the image with binarization parameters. In the present embodiment, the binarization unit 54 changes at least one of the first binarization parameter B1 and the second binarization parameter B2, and uses the first binarization parameter B1 for the comparison region of the pre-correction image. The binarized image and the binarized image in the comparison region of the corrected image with the second binarized parameter B2, thereby setting the parameter set of the first binarized parameter B1 and the second binarized parameter B2. One is specified. Here, the binarization unit 54 changes at least one of the first binarization parameter B1 and the second binarization parameter B2 until the pixel number difference D calculated by the comparison unit 56 becomes equal to or less than the predetermined threshold THon. Then, the image in the comparison area of the pre-correction image and the image in the comparison area of the post-correction image are binarized, and a parameter set in which the pixel number difference D is equal to or less than the predetermined threshold THon is specified. Here, the pixel number difference D is a difference between the number of ON pixels of the binary image in the comparison area of the image before correction and the number of ON pixels of the binary image in the comparison area of the image after correction. The first binarization parameter B1 is a brightness threshold value when binarizing the image in the comparison area of the uncorrected image, and the second binarization parameter B2 is the binary image of the image in the comparison area of the corrected image. It is a lightness threshold value when it is converted into a value.

(比較部56)
比較部56は、制御部22を中心として実現される。比較部56は、2つの二値画像のON画素の数の差を算出する。本実施形態では、比較部56は、二値化部54が第1二値化パラメータB1と第2二値化パラメータB2の少なくとも一方を変更しながら修正前画像の比較領域における画像と修正前画像の比較領域における画像とを二値化するごとに、修正前画像の比較領域における二値画像と修正後画像の比較領域における二値画像と、ON画素の数の差(画素数差D)を算出する。
(Comparator 56)
The comparison unit 56 is realized centering on the control unit 22. The comparison unit 56 calculates the difference in the number of ON pixels of the two binary images. In the present embodiment, the comparison unit 56 is configured such that the binarization unit 54 changes the image in the comparison area of the image before correction and the image before correction while changing at least one of the first binarization parameter B1 and the second binarization parameter B2. Each time the image in the comparison area is binarized, the difference between the binary image in the comparison area of the pre-correction image and the binary image in the comparison area of the post-correction image and the number of ON pixels (pixel number difference D) is calculated. calculate.

(全体位置・歪補正部58)
全体位置・歪補正部58は、制御部22を中心として実現される。全体位置・歪補正部58は、対象となる2つの画像の全体的な位置合わせを行い、両画像間の位置ズレや歪みを補正する。本実施形態では、全体位置・歪補正部58は、実施形態1の全体位置・歪補正部40と同様に、周知の方法(特開2006−235785号公報に記載の方法)を用いることにより、頁ごとに、二値化部54により特定されたパラメータセットの第2二値化パラメータB2で二値化された修正後画像に合わせて、同パラメータセットの第1二値化パラメータB1で二値化された修正前画像の全体的な位置ズレや歪みを補正する。
(Overall position / distortion correction unit 58)
The overall position / distortion correction unit 58 is realized centering on the control unit 22. The overall position / distortion correction unit 58 performs overall alignment of two target images, and corrects misalignment and distortion between the two images. In the present embodiment, the overall position / distortion correction unit 58 uses a well-known method (the method described in JP-A-2006-235785), similarly to the overall position / distortion correction unit 40 of the first embodiment. For each page, in accordance with the corrected image binarized with the second binarization parameter B2 of the parameter set specified by the binarization unit 54, the binarization with the first binarization parameter B1 of the parameter set This corrects the overall positional deviation and distortion of the pre-correction image.

以下、利用者が記憶部24に記憶される修正前画像と修正後画像とを指定して修正部分抽出指示を行った場合に、画像処理装置2が実行する処理の一例についてフローチャート図12を参照しながら説明する。   Hereinafter, referring to the flowchart of FIG. 12, an example of processing executed by the image processing apparatus 2 when the user designates the pre-correction image and the post-correction image stored in the storage unit 24 and issues a correction part extraction instruction. While explaining.

画像処理装置2は、修正抽出指示操作を受け付けると、実施形態1と同様に、比較領域決定処理を実行し、比較領域を決定する(S401)。なお、比較領域は、所定領域であってもよいし、利用者によって指定される領域であってもよい。この場合、比較領域決定処理は省略されてもよい。   When receiving the correction extraction instruction operation, the image processing apparatus 2 executes the comparison area determination process and determines the comparison area as in the first embodiment (S401). The comparison area may be a predetermined area or an area designated by the user. In this case, the comparison area determination process may be omitted.

そして、画像処理装置2は、画素数差DがTHon以下となるパラメータセットを特定する処理(パラメータセット特定処理)を実行する(S402)。ここで、パラメータセット特定処理について図13を参照しながら説明する。   Then, the image processing apparatus 2 executes a process (parameter set specifying process) for specifying a parameter set in which the pixel number difference D is equal to or less than THon (S402). Here, the parameter set specifying process will be described with reference to FIG.

パラメータセット特定処理では、画像処理装置2は、修正前画像の比較領域における明度画素数分布(第1明度ヒストグラム)と、修正後画像の比較領域における明度画素数分布(第2明度ヒストグラム)と、を生成する。そして、第1二値化パラメータB1と第2二値化パラメータB2の初期値を決定する(S501)。例えば、画像処理装置2は、第1明度ヒストグラムと第2明度ヒストグラムのそれぞれに基づいて、公知の方法(例えば、P−タイル法、モード方法、大津の方法など)により、第1二値化パラメータB1と第2二値化パラメータB2の各々の初期値を決定する。   In the parameter set specifying process, the image processing apparatus 2 includes a lightness pixel number distribution (first lightness histogram) in the comparison area of the image before correction, a lightness pixel number distribution (second lightness histogram) in the comparison area of the image after correction, Is generated. Then, initial values of the first binarization parameter B1 and the second binarization parameter B2 are determined (S501). For example, the image processing apparatus 2 uses the known binarization method (eg, P-tile method, mode method, Otsu's method, etc.) based on the first lightness histogram and the second lightness histogram, respectively. The initial values of B1 and the second binarization parameter B2 are determined.

そして、画像処理装置2は、第1二値化パラメータB1と第2二値化パラメータB2の各々で修正前画像の比較領域における画像と修正後画像の比較領域における画像とを二値化する処理(二値化処理)を実行する(S502)。   Then, the image processing apparatus 2 binarizes the image in the comparison area of the uncorrected image and the image in the comparison area of the corrected image with each of the first binarization parameter B1 and the second binarization parameter B2. (Binarization processing) is executed (S502).

そして、画像処理装置2は、修正前画像の比較領域における二値画像と、修正後画像の比較領域における二値画像と、を比較する処理(比較処理)を実行する(S503)。ここでは、画像処理装置2は、修正前画像の比較領域における二値画像のON画素の数と、修正前画像の比較領域における二値画像のON画素の数と、を計数し、その画素数差Dを算出する。なお、画像処理装置2は、修正前画像の比較領域における二値画像のON画素数及び修正後画像の比較領域における二値画像のON画素数を、第1明度ヒストグラム
及び第2明度ヒストグラムに基づいて求めるようにしてよい。この場合、画像処理装置2は、S502のステップで二値化処理を実行しなくてもよい。
Then, the image processing apparatus 2 executes a process (comparison process) for comparing the binary image in the comparison area of the pre-correction image and the binary image in the comparison area of the post-correction image (S503). Here, the image processing apparatus 2 counts the number of ON pixels of the binary image in the comparison area of the image before correction and the number of ON pixels of the binary image in the comparison area of the image before correction, and the number of pixels. The difference D is calculated. The image processing apparatus 2 uses the first lightness histogram and the second lightness histogram to calculate the number of ON pixels of the binary image in the comparison area of the image before correction and the number of ON pixels of the binary image in the comparison area of the image after correction. You may ask for it. In this case, the image processing apparatus 2 does not have to execute the binarization process in step S502.

そして、画像処理装置2は、画素数差Dが所定閾値THonより大きい場合(S504のN)、画像処理装置2は、画素数差DがTHon以下になるように第1二値化パラメータB1と第2二値化パラメータB2を変更し、S502のステップに戻る。例えば、画像処理装置2は、修正前画像の比較領域における二値画像のON画素数が、修正後画像の比較領域におけるON画素数よりも小さい場合、第1二値化パラメータB1の値を所定値だけ下げたり、第2二値化パラメータB2の値を所定値だけ上げたりする。また、例えば、画像処理装置2は、修正前画像の比較領域における二値画像のON画素数が、修正後画像の比較領域におけるON画素数よりも大きい場合、第1二値化パラメータB1の値を所定値だけ上げたり、第2二値化パラメータB2の値を所定値だけ下げたりする。   Then, when the pixel number difference D is larger than the predetermined threshold THon (N in S504), the image processing device 2 determines that the first binarization parameter B1 is set so that the pixel number difference D is equal to or less than THon. The second binarization parameter B2 is changed, and the process returns to step S502. For example, when the number of ON pixels of the binary image in the comparison area of the pre-correction image is smaller than the number of ON pixels in the comparison area of the post-correction image, the image processing apparatus 2 sets the value of the first binarization parameter B1 to a predetermined value. Decrease the value or increase the value of the second binarization parameter B2 by a predetermined value. In addition, for example, when the number of ON pixels of the binary image in the comparison area of the image before correction is larger than the number of ON pixels in the comparison area of the image after correction, the image processing apparatus 2 sets the value of the first binarization parameter B1. Is increased by a predetermined value, or the value of the second binarization parameter B2 is decreased by a predetermined value.

一方、画像処理装置2は、画素数差DがTHon以下である場合(S504のY)、パラメータセット特定処理を終了する。こうして、画像処理装置2は、画素数差DがTHon以下となる第1二値化パラメータB1と第2二値化パラメータB2のパラメータセットを特定する。   On the other hand, when the pixel number difference D is equal to or less than THon (Y in S504), the image processing apparatus 2 ends the parameter set specifying process. In this way, the image processing apparatus 2 specifies a parameter set of the first binarization parameter B1 and the second binarization parameter B2 in which the pixel number difference D is equal to or less than THon.

ここで、画像処理装置2は、比較処理(S503)において、後述するラベル数Lを算出するようにしてもよい。すなわち、画像処理装置2は、修正後画像を第2二値化パラメータB2で二値化した二値画像から修正前画像を第1二値化パラメータB2で二値化した二値画像を引き算することにより差分情報を生成し、比較領域内の差分抽出画素の統合化領域を定める。ここで、画像処理装置2は、修正後画像の比較領域における二値画像から修正前画像の比較領域における二値画像を引き算することにより差分情報を生成してもよい。そして、画像処理装置2は、統合化領域の数、すなわちラベル数Lを求める。そして、画像処理装置2は、S504のステップにおいて、ラベル数Lの値が所定閾値より大きい場合(S504のN)、第1二値化パラメータB1と第2二値化パラメータB2の少なくとも一方を変更してS502乃至S504の処理を実行し、一方、ラベル数Lの値が所定閾値以下である場合に(S504のY)、パラメータセット特定処理を終了するようにしてもよい。   Here, the image processing apparatus 2 may calculate the number L of labels to be described later in the comparison process (S503). That is, the image processing apparatus 2 subtracts a binary image obtained by binarizing the pre-correction image using the first binarization parameter B2 from the binary image obtained by binarizing the post-correction image using the second binarization parameter B2. Thus, difference information is generated, and an integrated region of difference extraction pixels in the comparison region is determined. Here, the image processing apparatus 2 may generate the difference information by subtracting the binary image in the comparison area of the image before correction from the binary image in the comparison area of the image after correction. Then, the image processing apparatus 2 obtains the number of integrated regions, that is, the label number L. In step S504, when the value of the label number L is larger than the predetermined threshold (N in S504), the image processing apparatus 2 changes at least one of the first binarization parameter B1 and the second binarization parameter B2. Then, the processing from S502 to S504 may be executed. On the other hand, if the value of the label number L is equal to or smaller than the predetermined threshold (Y in S504), the parameter set specifying processing may be terminated.

また、画像処理装置2は、比較処理(S503)において、後述する2つの分散値σX、σY、を算出するようにしてもよい。すなわち、画像処理装置2は、修正後画像を第2二値化パラメータB2で二値化した二値画像から修正前画像を第1二値化パラメータB1で二値化した二値画像を引き算することにより差分情報を生成する。ここで、画像処理装置2は、修正後画像の比較領域における二値画像から修正前画像の比較領域における二値画像を引き算することにより差分情報を生成してもよい。そして、画像処理装置2は、比較領域内の各差分抽出画素について射影演算を行い、比較領域の水平方向(X方向)と垂直方向(Y方向)の各々について、差分抽出画素の射影ヒストグラムを生成する。そして、画像処理装置2は、各射影ヒストグラムから、差分抽出画素のX方向の分散値σXと、Y方向の分散値σYと、を算出する。そして、画像処理装置2は、S504のステップにおいて、σXとσYの値の少なくとも一方が所定閾値より大きい場合(S504のN)、第1二値化パラメータB1と第2二値化パラメータB2の少なくとも一方を変更してS502乃至S504の処理を実行し、一方、σX及びσYの値がともに所定閾値以下である場合(S504のY)、パラメータセット特定処理を終了するようにしてもよい。   Further, the image processing apparatus 2 may calculate two variance values σX and σY, which will be described later, in the comparison process (S503). That is, the image processing apparatus 2 subtracts a binary image obtained by binarizing the pre-correction image using the first binarization parameter B1 from the binary image obtained by binarizing the post-correction image using the second binarization parameter B2. Thus, difference information is generated. Here, the image processing apparatus 2 may generate the difference information by subtracting the binary image in the comparison area of the image before correction from the binary image in the comparison area of the image after correction. Then, the image processing apparatus 2 performs a projection operation for each difference extraction pixel in the comparison area, and generates a projection histogram of the difference extraction pixel for each of the horizontal direction (X direction) and the vertical direction (Y direction) of the comparison area. To do. Then, the image processing apparatus 2 calculates a variance value σX in the X direction and a variance value σY in the Y direction of the difference extraction pixel from each projection histogram. Then, in step S504, when at least one of the values of σX and σY is larger than the predetermined threshold (N in S504), the image processing apparatus 2 determines at least one of the first binarization parameter B1 and the second binarization parameter B2. On the other hand, the processing of S502 to S504 may be performed with one changed, and if the values of σX and σY are both equal to or smaller than a predetermined threshold (Y in S504), the parameter set specifying processing may be terminated.

そして、画像処理装置2は、S402のステップで特定したパラメータセットを用いて修正前画像全体と修正後画像全体とを二値化する(S403)。そして、画像処理装置2は、修正後画像の二値画像に合わせて修正前画像の二値画像の全体的な位置ズレや歪みを補正する処理(全体位置歪補正処理)を実行する(S404)。   Then, the image processing apparatus 2 binarizes the entire image before correction and the entire image after correction using the parameter set specified in step S402 (S403). Then, the image processing apparatus 2 executes a process for correcting the overall positional deviation and distortion of the binary image of the uncorrected image in accordance with the binary image of the corrected image (overall position distortion correcting process) (S404). .

そして、画像処理装置2は、S404のステップにより全体的な位置合わせがなされた修正前画像の二値画像と、修正後画像の二値画像と、の間にある局所的な位置ズレや歪みを補正する処理(局所位置歪補正処理)を実行する(S405)。具体的には、画像処理装置2は、実施形態1と同様に、図9に示すフローチャート図に示す処理を実行する。   Then, the image processing apparatus 2 detects a local positional deviation or distortion between the binary image of the pre-correction image and the binary image of the post-correction image that have been entirely aligned in step S404. A correction process (local position distortion correction process) is executed (S405). Specifically, the image processing apparatus 2 executes the process shown in the flowchart of FIG. 9 as in the first embodiment.

そして、画像処理装置2は、S404及びS405のステップをへて全体的にも局所的にも位置合わせが行われた修正後画像の二値画像からと修正前画像の二値画像を引き算することにより差分情報を生成する差分生成処理を実行する(S406)。そして、画像処理装置2は、差分情報に基づいて修正部分を抽出する(S407)。   Then, the image processing apparatus 2 subtracts the binary image of the pre-correction image from the binary image of the post-correction image that has been subjected to the alignment both globally and locally through the steps of S404 and S405. Thus, a difference generation process for generating difference information is executed (S406). Then, the image processing apparatus 2 extracts a correction portion based on the difference information (S407).

以上のように、本発明に係る画像処理装置2は、修正前画像の二値画像と修正後画像の二値画像とが概ね同一となるよう二値化した上で、両二値画像から差分情報を生成し、修正部分を抽出する。そのため、例えば、修正前画像と修正後画像とを同一閾値で二値化する場合に比べ、空白部分等の本来抽出されるべきでない部分が抽出されることを抑止することができる。すなわち、修正部分が正確に抽出される。   As described above, the image processing apparatus 2 according to the present invention binarizes so that the binary image of the pre-correction image and the binary image of the post-correction image are substantially the same, and then the difference from both binary images. Generate information and extract corrections. Therefore, for example, compared with the case where the pre-correction image and the post-correction image are binarized with the same threshold value, it is possible to suppress extraction of a portion that should not be extracted such as a blank portion. That is, the corrected part is accurately extracted.

また、本発明に係る画像処理装置2は、修正前画像の二値画像と修正後画像の二値画像とが概ね同一となるよう二値化した上で、両二値画像の位置合わせを行うので、位置合わせの精度が向上する。この点からも、修正部分が正確に抽出されることとなる。   Further, the image processing apparatus 2 according to the present invention binarizes the binary image of the pre-correction image and the binary image of the post-correction image so as to be substantially the same, and then aligns the binary images. Therefore, the alignment accuracy is improved. Also from this point, the corrected portion is extracted accurately.

また、本発明に係る画像処理装置2では、修正部分を含まない領域が比較領域となりやすくなる。   Further, in the image processing apparatus 2 according to the present invention, a region that does not include a corrected portion is likely to be a comparison region.

また、本発明に係る画像処理装置2では、二値化処理を修正前画像と修正後画像の各々の一部にのみ行うので、パラメータセットの決定に必要な処理が軽減される。   Further, in the image processing apparatus 2 according to the present invention, since the binarization process is performed only on a part of each of the pre-correction image and the post-correction image, processing necessary for determining the parameter set is reduced.

なお、画像処理装置2は、S401のステップで比較領域とする画像領域や頁を決定した後、修正前画像の縮小画像と修正後画像の縮小画像とを対象としてパラメータセット特定処理(S402)を実行することにより、パラメータセットを特定するようにしてもよい。こうすれば、パラメータセットを特定するために必要な処理負荷を軽減することができる。   The image processing apparatus 2 determines the image area or page to be the comparison area in step S401, and then performs parameter set specifying processing (S402) for the reduced image of the pre-correction image and the reduced image of the post-correction image. The parameter set may be specified by executing. In this way, it is possible to reduce the processing load necessary for specifying the parameter set.

また、画像処理装置2は、S403のステップで二値化した修正前画像と修正後画像との位置合わせを行わずに、差分情報生成処理(S406)に進むようにしてもよい。すなわち、画像処理装置2は、S404及びS405のステップを省略してもよい。   Further, the image processing apparatus 2 may proceed to the difference information generation process (S406) without performing alignment between the pre-correction image and the post-correction image binarized in step S403. That is, the image processing apparatus 2 may omit steps S404 and S405.

また、比較領域となる領域や頁は所定の画像領域や頁であってもよいし、利用者によって指定される画像領域や頁であってもよい。また、比較領域は、修正前画像と修正後画像の各々の全体領域であってもよい。   The comparison area and page may be a predetermined image area or page, or may be an image area or page designated by the user. The comparison area may be the entire area of each of the pre-correction image and the post-correction image.

また、画像処理装置2は、S502の二値化処理において、修正前画像全体を二値化するとともに修正後画像全体を二値化するようにしてもよい。この場合、画像処理装置2は、S403のステップを省略するようにしてもよい。   Further, the image processing apparatus 2 may binarize the entire image before correction and binarize the entire image after correction in the binarization processing of S502. In this case, the image processing apparatus 2 may omit step S403.

また、画像処理装置2は、S502の二値化処理において修正前画像全体を二値化するとともに修正後画像全体を二値化する場合、S503のステップの前に、頁ごとに修正前画像と修正後画像との位置を全体的に合わせておくようにしてもよい
。この場合、画像処理装置2は、S403のステップだけでなく、S404のステップを省略してもよい。
In addition, when the image processing apparatus 2 binarizes the entire image before correction and binarizes the entire image after correction in the binarization process of S502, the image processing apparatus 2 sets the image before correction for each page before the step of S503. You may make it match | combine the position with the image after correction entirely. In this case, the image processing apparatus 2 may omit not only step S403 but also step S404.

また、画像処理装置2は、S502の二値化処理において修正前画像全体を二値化するとともに修正後画像全体も二値化する場合、S401のステップを省略し、二値化処理がなされた修正前画像と修正後画像とを対象に比較領域決定処理を実行して比較領域を決定するようにしてもよい。例えば、修正前画像と修正後画像とが1頁分の画像しか含まない場合を例に取り上げる。この場合、画像処理装置2は、S502のステップの後、修正前画像の二値画像と修正後画像の二値画像とに基づいて、修正前画像と修正後画像との位置を全体的に合わせる。そして、以下のようにして比較領域を決定する。   Further, when the image processing apparatus 2 binarizes the entire image before correction and also binarizes the entire image after correction in the binarization process of S502, the step of S401 is omitted and the binarization process is performed. The comparison area may be determined by executing the comparison area determination process on the uncorrected image and the corrected image. For example, a case where the pre-correction image and the post-correction image include only an image for one page is taken as an example. In this case, after the step of S502, the image processing apparatus 2 aligns the positions of the pre-correction image and the post-correction image as a whole based on the binary image of the pre-correction image and the binary image of the post-correction image. . Then, the comparison area is determined as follows.

例えば、画像処理装置2は、修正前画像の二値画像と修正後画像の二値画像とを引き算することにより、差分情報を生成し、差分抽出画素の統合化領域を定める。そして、画像処理装置2は、いずれの統合化領域とも抵触しない所定面積の矩形領域を比較領域と定める。そして、画像処理装置2は、S503のステップに進む。   For example, the image processing device 2 generates difference information by subtracting the binary image of the pre-correction image and the binary image of the post-correction image, and determines the integrated region of the difference extraction pixels. Then, the image processing apparatus 2 determines a rectangular area having a predetermined area that does not conflict with any integrated area as a comparison area. Then, the image processing apparatus 2 proceeds to step S503.

また、例えば、画像処理装置2は、修正前画像と修正後画像の各々のレイアウトを解析し、修正前画像と修正後画像の各々について、文書領域、表領域、図領域等に分割する。そして、画像処理装置2は、これらの領域のうち、その位置・範囲が修正前画像と修正後画像とで最も類似する領域を比較領域と定める。そして、画像処理装置2は、S503のステップに進む。   For example, the image processing apparatus 2 analyzes the layout of each of the pre-correction image and the post-correction image, and divides each of the pre-correction image and the post-correction image into a document area, a table area, a figure area, and the like. Then, the image processing apparatus 2 determines, as a comparison area, an area where the position / range of the areas is most similar between the uncorrected image and the corrected image. Then, the image processing apparatus 2 proceeds to step S503.

なお、本発明は、上記実施形態1及び実施形態2だけに適用されるものではない。   In addition, this invention is not applied only to the said Embodiment 1 and Embodiment 2. FIG.

例えば、画像処理装置2と画像読取装置4とは、別体であってもよいし一体であってもよい。   For example, the image processing device 2 and the image reading device 4 may be separate or integrated.

また、修正前画像と修正後画像は、それぞれ異なる画像読取装置4によって読み取られた画像であってもよい。   The pre-correction image and the post-correction image may be images read by different image reading devices 4.

また、制御部22をここまで述べたように動作させるためのプログラムは、このプログラムを格納している情報記憶媒体(CD−ROM、DVD−ROMなど)から供給されるものであってもよいし、通信媒体(例えば、通信回線、通信システムのように、一時的または流動的にプログラムを保持する媒体)から供給されるものであってもよい。   The program for operating the control unit 22 as described above may be supplied from an information storage medium (CD-ROM, DVD-ROM, etc.) storing this program. It may be supplied from a communication medium (for example, a medium that temporarily or fluidly holds a program like a communication line or a communication system).

本発明の実施形態に係る修正抽出システムの構成の一例を表す図である。It is a figure showing an example of composition of a correction extraction system concerning an embodiment of the present invention. 本発明の実施形態に係る画像処理装置の構成の一例を表す図である。It is a figure showing an example of the composition of the image processing device concerning the embodiment of the present invention. 本発明の実施形態に係る画像処理装置の機能ブロックの一例を表す図である。It is a figure showing an example of the functional block of the image processing apparatus which concerns on embodiment of this invention. 本発明の実施形態に係る画像処理装置の機能ブロックの一例を表す図である。It is a figure showing an example of the functional block of the image processing apparatus which concerns on embodiment of this invention. パラメータセット記憶部の記憶内容の一例を表す図である。It is a figure showing an example of the memory content of a parameter set storage part. 局所的位置・歪補正の一例を表す図である。It is a figure showing an example of local position and distortion correction. 本発明の実施形態に係る画像処理装置で実行される処理の一例を表すフローチャート図である。It is a flowchart figure showing an example of processing performed with an image processing device concerning an embodiment of the present invention. 本発明の実施形態に係る画像処理装置で実行される処理の一例を表すフローチャート図である。It is a flowchart figure showing an example of processing performed with an image processing device concerning an embodiment of the present invention. 本発明の実施形態に係る画像処理装置で実行される処理の一例を表すフローチャート図である。It is a flowchart figure showing an example of processing performed with an image processing device concerning an embodiment of the present invention. 修正前画像と修正後画像とから修正部分が抽出される時の様子の一例を表す図である。It is a figure showing an example of a mode when a correction part is extracted from the image before correction, and the image after correction. 本発明の別の実施形態に係る画像処理装置の機能ブロックの一例を表す図である。It is a figure showing an example of the functional block of the image processing apparatus which concerns on another embodiment of this invention. 本発明の別の実施形態に係る画像処理装置で実行される処理の一例を表すフローチャート図である。It is a flowchart figure showing an example of the process performed with the image processing apparatus which concerns on another embodiment of this invention. 本発明の別の実施形態に係る画像処理装置で実行される処理の一例を表すフローチャート図である。It is a flowchart figure showing an example of the process performed with the image processing apparatus which concerns on another embodiment of this invention.

符号の説明Explanation of symbols

2 画像処理装置、4 画像読取装置、22 制御部、24 記憶部、26 画像入力部、28 操作部、32 比較領域決定部、34 補正部、36 比較部、38 パラメータセット記憶部、40 全体位置・歪補正部、42 局所位置・歪補正部、42a 差分抽出部、42b 統合化処理部、42c 第2分割領域算出部、42d 第1分割領域算出部、42e 第2画像分割部、42f 第1画像分割部、42g 分割画像位置・歪補正部、44 修正部分抽出部、52 比較領域決定部、54 二値化部、56 比較部、58 全体位置・歪補正部、60 局所位置・歪補正部、62 修正部分抽出部、100 修正抽出システム。   2 image processing device, 4 image reading device, 22 control unit, 24 storage unit, 26 image input unit, 28 operation unit, 32 comparison area determination unit, 34 correction unit, 36 comparison unit, 38 parameter set storage unit, 40 overall position Distortion correction unit, 42 local position / distortion correction unit, 42a difference extraction unit, 42b integration processing unit, 42c second divided region calculation unit, 42d first divided region calculation unit, 42e second image division unit, 42f first Image segmentation unit, 42g segmented image position / distortion correction unit, 44 correction portion extraction unit, 52 comparison area determination unit, 54 binarization unit, 56 comparison unit, 58 global position / distortion correction unit, 60 local position / distortion correction unit 62 Correction part extraction unit, 100 Correction extraction system.

Claims (23)

原稿から読取られた第1スキャン画像と、正後の前記紙原稿から読取られた第2スキャン画像と、を取得する画像取得手段と、
第1色補正パラメータと、前記第1色補正パラメータと同種の色補正パラメータである第2色補正パラメータと、の組み合わせを記憶してなる記憶手段に記憶される複数の前記組み合わせの各々について、該組み合わせに含まれる前記第1色補正パラメータに基づいて補正された、前記第1スキャン画像の比較領域における色合いと、該組み合わせに含まれる前記第2色補正パラメータに基づいて補正された、前記第2スキャン画像の前記比較領域における色合いと、の類似度を示す類似度情報を算出する算出手段と、
算出された類似度情報が予め定められた類似条件を満足するか否かを判定する判定手段と、
前記複数の組み合わせのうちの、前記類似条件を満足する類似度情報が得られる組み合わせ、に含まれる前記第1色補正パラメータに基づいて補正された前記第1スキャン画像と、該組み合わせに含まれる前記第2色補正パラメータに基づいて補正された前記第2スキャン画像と、に基づき修正部分を抽出する抽出手段と、
を含むことを特徴とする画像処理装置。
A first scan image read from a paper document, and a second scan image read from the paper document after positive Osamu, an image obtaining means for obtaining,
For each of the plurality of combinations stored in a storage unit that stores a combination of a first color correction parameter and a second color correction parameter that is the same type of color correction parameter as the first color correction parameter. The second color corrected based on the hue in the comparison area of the first scan image corrected based on the first color correction parameter included in the combination and the second color correction parameter included in the combination. Calculation means for calculating similarity information indicating the similarity between the hue in the comparison area of the scanned image;
Determination means for determining whether the calculated similarity information satisfies a predetermined similarity condition;
Of the plurality of combinations, the first scan image corrected based on the first color correction parameter included in the combination that obtains similarity information satisfying the similarity condition, and the combination included in the combination extraction means for extracting the corrected second scanned image, a correction area on the basis of on the basis of the second color correction parameters,
An image processing apparatus comprising:
前記算出手段は、
前記複数の組み合わせの各々について、該組み合わせに含まれる前記第1色補正パラメータに基づいて補正された、前記第1スキャン画像の前記比較領域における各画素値の出現頻度分布と、該組み合わせに含まれる前記第2色補正パラメータに基づいて補正された、前記第2スキャン画像の前記比較領域における各画素値の出現頻度分布と、の相関係数を前記類似度情報として算出し、
前記判定手段は、
算出された相関係数が所定値以上であるか否かを判定し、
前記抽出手段は、
前記複数の組み合わせのうちの、前記所定値以上の相関係数が得られる組み合わせ、に含まれる前記第1色補正パラメータに基づいて補正された前記第1スキャン画像と、該組み合わせに含まれる前記第2色補正パラメータに基づいて補正された前記第2スキャン画像と、に基づき前記修正部分を抽出する、
ことを特徴とする請求項1に記載の画像処理装置。
The calculating means includes
For each of the plurality of combinations, an appearance frequency distribution of each pixel value in the comparison area of the first scan image corrected based on the first color correction parameter included in the combination, and included in the combination Calculating the correlation coefficient between the appearance frequency distribution of each pixel value in the comparison area of the second scan image, corrected based on the second color correction parameter, as the similarity information;
The determination means includes
Determine whether the calculated correlation coefficient is greater than or equal to a predetermined value,
The extraction means includes
Of the plurality of combinations, the first scan image corrected based on the first color correction parameter included in the combination that obtains a correlation coefficient equal to or greater than the predetermined value, and the first scan image included in the combination. Extracting the corrected portion based on the second scan image corrected based on the two-color correction parameters ;
The image processing apparatus according to claim 1.
前記算出手段は、
前記複数の組み合わせの各々について、該組み合わせに含まれる前記第1色補正パラメータに基づいて補正された、前記第1スキャン画像の前記比較領域における画像と、該組み合わせに含まれる前記第2色補正パラメータに基づいて補正された、前記第2スキャン画像の前記比較領域における画像と、の差分情報に基づいて前記類似度情報を算出すること、
を特徴とする請求項1に記載の画像処理装置。
The calculating means includes
For each of the plurality of combinations, the image in the comparison area of the first scan image corrected based on the first color correction parameter included in the combination , and the second color correction parameter included in the combination be calculated is corrected, and the image in the comparison area of the second scan image, the similarity information based on the difference information on the basis of,
The image processing apparatus according to claim 1.
前記類似度情報は、差分抽出画素の数、又は差分抽出画素の分散度を示す数値であり、
前記判定手段は、
算出された類似度情報の値が所定値以下であるか否かを判定し、
前記抽出手段は、
前記複数の組み合わせのうちの、前記所定値以下の値の類似度情報が得られる組み合わせ、に含まれる前記第1色補正パラメータに基づいて補正された前記第1スキャン画像と、該組み合わせに含まれる前記第2色補正パラメータに基づいて補正された前記第2スキャン画像と、に基づき前記修正部分を抽出する、
ことを特徴とする請求項3に記載の画像処理装置。
The similarity information is a numerical value indicating the number of difference extraction pixels or the variance of difference extraction pixels,
The determination means includes
It is determined whether or not the calculated similarity information value is equal to or less than a predetermined value,
The extraction means includes
Of the plurality of combinations, the first scan image corrected based on the first color correction parameter included in the combination in which similarity information having a value equal to or less than the predetermined value is obtained, and included in the combination Extracting the corrected portion based on the second scan image corrected based on the second color correction parameter ;
The image processing apparatus according to claim 3.
前記複数の組み合わせに含まれる組み合わせの一つ一つを順番に選択する選択手段をさらに含み、
前記算出手段は、
前記選択手段により組み合わせが選択されるごとに、選択された組み合わせに含まれる前記第1色補正パラメータに基づいて補正された、前記第1スキャン画像の比較領域における色合いと、該選択された組み合わせに含まれる前記第2色補正パラメータに基づいて補正された、前記第2スキャン画像の前記比較領域における色合いと、の類似度を示す前記類似度情報を算出すること、
を特徴とする請求項1乃至4のいずれかに記載の画像処理装置。
A selection means for sequentially selecting each of the combinations included in the plurality of combinations;
The calculating means includes
Each time a combination is selected by the selection means, the hue in the comparison area of the first scan image corrected based on the first color correction parameter included in the selected combination, and the selected combination. Calculating the similarity information indicating the similarity between the second scan image and the hue in the comparison region, which is corrected based on the second color correction parameter included;
The image processing apparatus according to claim 1, wherein:
前記判定手段は、
前記選択手段により組み合わせが選択されるごとに、選択された組み合わせから得られた類似度情報が前記類似条件を満足するか否かを判定し、
前記抽出手段は、
選択された組み合わせから得られた類似度情報が前記類似条件を満足すると判定された場合に、該組み合わせに含まれる前記第1色補正パラメータに基づいて補正された前記第1スキャン画像と、該組み合わせに含まれる前記第2色補正パラメータに基づいて補正された前記第2スキャン画像と、に基づき前記修正部分を抽出し、
前記選択手段は、
選択した組み合わせから前記類似条件を満足しない類似度情報が得られた場合に次の組み合わせを選択し、選択した組み合わせから前記類似条件を満足する類似度情報が得られた場合に、次の組み合わせの選択を行わないこと、
を特徴とする請求項5に記載の画像処理装置。
The determination means includes
Each time a combination is selected by the selection means, it is determined whether the similarity information obtained from the selected combination satisfies the similarity condition,
The extraction means includes
When it is determined that the similarity information obtained from the selected combination satisfies the similarity condition, the first scan image corrected based on the first color correction parameter included in the combination, and the combination Extracting the correction portion based on the second scan image corrected based on the second color correction parameter included in
The selection means includes
When similarity information that does not satisfy the similarity condition is obtained from the selected combination, the next combination is selected, and when similarity information that satisfies the similarity condition is obtained from the selected combination, the next combination is selected. Not making a choice,
The image processing apparatus according to claim 5.
前記抽出手段は、前記類似条件を満足する類似度情報が得られた組み合わせのうちから、これらの組み合わせから得られた類似度情報に基づいて一の組み合わせを選択し、当該一の組み合わせに含まれる前記第1色補正パラメータに基づいて補正された前記第1スキャン画像と、当該一の組み合わせに含まれる前記第2色補正パラメータに基づいて補正された前記第2スキャン画像と、に基づき前記修正部分を抽出する、
ことを特徴とする請求項に記載の画像処理装置。
The extraction means selects one combination from combinations obtained from similarity information satisfying the similarity condition based on the similarity information obtained from these combinations, and is included in the one combination. said first color correction parameter corrected based on the first scanned image, and the second scan image corrected based on the second color correction parameter included in the combination of the one, the correction area on the basis of Extract,
The image processing apparatus according to claim 5 .
前記第1スキャン画像と、前記第2スキャン画像と、を縮小する縮小手段と、
前記縮小手段により縮小された前記第1スキャン画像を前記第1色補正パラメータに基づいて補正し、前記縮小手段により縮小された前記第2スキャン画像を前記第2色補正パラメータに基づいて補正する手段と、をさらに含むこと
特徴とする請求項1乃至のいずれかに記載の画像処理装置。
Reduction means for reducing the first scan image and the second scan image ;
The first scan images reduced by the reduction means corrects, based on the first color correction parameter, means for correcting, based an said second scan images reduced by the reduction means to the second color correction parameter And further including
The image processing apparatus according to any one of claims 1 to 7, characterized in.
前記第1色補正パラメータに基づいて前記第1スキャン画像のうちの前記比較領域の画像を補正するとともに、前記第2色補正パラメータに基づいて前記第2スキャン画像のうちの前記比較領域の画像を補正する手段をさらに含むこと、
特徴とする請求項1乃至のいずれかに記載の画像処理装置。
The comparison area image of the first scan image is corrected based on the first color correction parameter, and the comparison area image of the second scan image is corrected based on the second color correction parameter. Further comprising means for correcting,
The image processing apparatus according to any one of claims 1 to 7, characterized in.
原稿から読取られた第1スキャン画像と、修正後の前記紙原稿から読取られた第2スキャン画像と、を取得する画像取得手段と、
画像の二値化に用いる二値化パラメータの値2つの組み合わせを変更しながら、組み合わせに含まれる第1の値に基づいて二値化された、前記第1スキャン画像の比較領域における画像と、該組み合わせに含まれる第2の値に基づいて二値化された、前記第2スキャン画像の前記比較領域における画像と、の類似度を示す類似度情報を算出する算出手段と、
算出された類似度情報が予め定められた類似条件を満足するか否かを判定する判定手段と、
前記類似条件を満足する類似度情報が得られる組み合わせ、に含まれる前記第1の値に基づいて二値化された前記第1スキャン画像と、該組み合わせに含まれる前記第2の値に基づいて二値化された前記第2スキャン画像と、に基づいて修正部分を抽出する抽出手段と、
を含むことを特徴とする画像処理装置。
A first scan image read from a paper document, and a second scan image read from the paper document after positive Osamu, an image obtaining means for obtaining,
An image in the comparison region of the first scan image binarized based on the first value included in the combination while changing the combination of the two binarization parameter values used for the binarization of the image; Calculating means for calculating similarity information indicating similarity between the second scan image and the image in the comparison region binarized based on the second value included in the combination;
Determination means for determining whether the calculated similarity information satisfies a predetermined similarity condition;
Based on the first scan image binarized based on the first value included in the combination from which the similarity information satisfying the similarity condition is obtained, and on the second value included in the combination Extraction means for extracting a correction portion based on the binarized second scan image ;
An image processing apparatus comprising:
前記算出手段は、
前記組み合わせを変更しながら、組み合わせに含まれる前記第1の値に基づいて二値化された、前記第1スキャン画像の比較領域における有意な画素の数と、該組み合わせに含まれる前記第2の値に基づいて二値化された、前記第2スキャン画像の前記比較領域における有意な画素の数と、の差を前記類似度情報として算出し、
前記判定手段は、
算出された差が所定値以下であるか否かを判定し、
前記抽出手段は、
前記所定値以下の前記差が得られる組み合わせ、に含まれる前記第1の値に基づいて二値化された前記第1スキャン画像と、該組み合わせに含まれる前記第2の値に基づいて二値化された前記第2スキャン画像と、に基づき前記修正部分を抽出する、
ことを特徴とする請求項1に記載の画像処理装置。
The calculating means includes
While changing the combination, the number of significant pixels in the comparison region of the first scan image binarized based on the first value included in the combination, and the second number included in the combination A difference between the number of significant pixels in the comparison area of the second scan image, binarized based on the value, is calculated as the similarity information;
The determination means includes
Determine whether the calculated difference is less than or equal to a predetermined value,
The extraction means includes
The first scan image binarized based on the first value included in the combination that obtains the difference equal to or less than the predetermined value, and the binary based on the second value included in the combination Extracting the corrected portion based on the second scanned image obtained by
The image processing apparatus according to claim 1 0, characterized in that.
前記算出手段は、
前記組み合わせを変更しながら、組み合わせに含まれる前記第1の値に基づいて二値化された、前記第1スキャン画像の前記比較領域における画像と、該組み合わせに含まれる前記第2の値に基づいて二値化された、前記第2スキャン画像の前記比較領域における画像と、の差分情報に基づいて前記類似度情報を算出すること、
ことを特徴とする請求項1に記載の画像処理装置。
The calculating means includes
Based on the second value included in the combination and the image in the comparison area of the first scan image binarized based on the first value included in the combination while changing the combination Calculating the similarity information based on difference information between the second scanned image and the image in the comparison area , which is binarized
The image processing apparatus according to claim 1 0, characterized in that.
前記類似度情報は、差分抽出画素の数、又は差分抽出画素の分散度を示す数値であり、
前記判定手段は、
算出された類似度情報の値が所定値以下であるか否かを判定し、
前記抽出手段は、
前記所定値以下の値の類似度情報が得られる組み合わせ、に含まれる前記第1の値に基づいて二値化された前記第1スキャン画像と、該組み合わせに含まれる前記第2の値に基づいて二値化された前記第2スキャン画像と、に基づき前記修正部分を抽出する、
ことを特徴とする請求項1に記載の画像処理装置。
The similarity information is a numerical value indicating the number of difference extraction pixels or the variance of difference extraction pixels,
The determination means includes
It is determined whether or not the calculated similarity information value is equal to or less than a predetermined value,
The extraction means includes
Based on the first scan image binarized based on the first value included in the combination from which similarity information having a value equal to or less than the predetermined value is obtained, and the second value included in the combination And extracting the corrected portion based on the binarized second scan image ,
The image processing apparatus according to claim 1 2, characterized in that.
前記算出手段は、
前記組み合わせを変更するごとに、変更後の組み合わせに含まれる前記第1の値に基づいて二値化された、前記第1スキャン画像の前記比較領域における画像と、該変更後の組み合わせに含まれる前記第2の値に基づいて二値化された、前記第2スキャン画像の前記比較領域における画像と、の類似度を示す類似度情報を算出し、
前記算出手段は、
前記算出手段が前記組み合わせを変更するごとに、変更後の組み合わせから得られた類似度情報が前記類似条件を満足するか否かを判定し、
前記抽出手段は、
変更後の組み合わせから得られた類似度情報が前記類似条件を満足すると判定された場合に、該変更後の組み合わせに含まれる前記第1の値に基づいて二値化された前記第1スキャン画像と、該変更後の組み合わせに含まれる前記第2の値に基づいて二値化された前記第2スキャン画像と、に基づき前記修正部分を抽出し、
前記算出手段は、
変更後の組み合わせから前記類似条件を満足しない類似度情報が得られた場合に組み合わせを再度変更し、該変更後の組み合わせから前記類似条件を満足する類似度情報が得られた場合に、組み合わせの変更を行わないこと、
を特徴とする請求項10乃至13のいずれかに記載の画像処理装置。
The calculating means includes
Each time the combination is changed, the binarized image based on the first value included in the changed combination is included in the comparison region of the first scan image and the changed combination. Calculating similarity information indicating a similarity between the second scan image and the image in the comparison region binarized based on the second value;
The calculating means includes
Each time the calculation means changes the combination, it is determined whether the similarity information obtained from the changed combination satisfies the similarity condition,
The extraction means includes
The first scanned image binarized based on the first value included in the changed combination when it is determined that the similarity information obtained from the changed combination satisfies the similarity condition And the second scan image binarized based on the second value included in the combination after the change, and extracting the correction portion,
The calculating means includes
When similarity information that does not satisfy the similarity condition is obtained from the changed combination, the combination is changed again, and when similarity information that satisfies the similarity condition is obtained from the changed combination, Not make any changes,
The image processing apparatus according to any one of claims 10 to 13, characterized in.
前記第1スキャン画像と、前記第2スキャン画像と、を縮小する縮小手段
記縮小手段により縮小された前記第1スキャン画像を前記第1の値に基づいて二値化し、前記縮小手段により縮小された前記第2スキャン画像を前記第2の値に基づいて二値化する手段と、をさらに含むこと
特徴とする請求項1乃至1のいずれかに記載の画像処理装置。
And reduction means for reducing said first scanned image, and the second scanned image, and
The first scan images reduced by pre-Symbol reducing means binarizes based on said first value, the binarization on the basis the second scan images reduced by the reduction means to the second value And further comprising means for
The image processing apparatus according to any one of claims 1 0 to 1 4, characterized in.
前記第1の値に基づいて前記第1スキャン画像のうち前記比較領域の画像を二値化し、前記第2の値に基づいて前記第2スキャン画像のうち前記比較領域の画像を二値化する手段をさらに含むこと
を特徴とする請求項10乃至14のいずれかに記載の画像処理装置。
Binarized image of the comparison area in the previous SL first scanned image based on the first value, the two images of the comparison region of said second scan images based on the second value Further comprising means for valuating,
The image processing apparatus according to any one of claims 10 to 14, wherein the.
記比較領域は、前記第1スキャン画像と前記第2スキャン画像の各々の一部を占める領域である、
ことを特徴とする請求項1乃至1のいずれかに記載の画像処理装置。
Prior Symbol ratio較領zone is an area occupying a portion of each of the first scan image and the second scan image,
The image processing apparatus according to any one of claims 1 to 1 6, characterized in that.
前記所与の比較領域は、予め定められた領域である、
ことを特徴とする請求項1に記載の画像処理装置。
The given comparison area is a predetermined area;
The image processing apparatus according to claim 17 .
前記所与の比較領域は、利用者により指定される領域である、
ことを特徴とする請求項1に記載の画像処理装置。
The given comparison area is an area specified by the user;
The image processing apparatus according to claim 17 .
前記第1スキャン画像と前記第2スキャン画像のレイアウトを解析する解析手段と、
前記解析手段による解析の結果に基づいて前記比較領域を決定する決定手段と、
をさらに含むことを特徴とする請求項1に記載の画像処理装置。
Analyzing means for analyzing a layout of the first scan image and the second scan image;
Determining means for determining the pre-Symbol ratio較領region based on a result of analysis by the analysis means,
The image processing apparatus according to claim 17 , further comprising:
前記第1スキャン画像の二値画像と前記第2スキャン画像の二値画像との差分から差分抽出画素を統合化した統合化領域を特定し、特定した統合化領域と抵触しない領域を記比較領域として決定する決定手段をさらに含む、
ことを特徴とする請求項1に記載の画像処理装置。
Difference extracting pixels to identify the integrated area that integrates a specified integrated region and conflict region not pre Symbol ratio from the difference between the binary image of the binary image and the second scan image of the first scanned image further comprising determining means to determine as較領zone,
The image processing apparatus according to claim 17 .
原稿から読取られた第1スキャン画像と、正後の前記紙原稿から読取られた第2スキャン画像と、を取得する画像取得手段、
第1色補正パラメータと、前記第1色補正パラメータと同種の色補正パラメータである第2色補正パラメータと、の組み合わせを記憶してなる記憶手段に記憶される複数の前記組み合わせの各々について、該組み合わせに含まれる前記第1色補正パラメータに基づいて補正された、前記第1スキャン画像の比較領域における色合いと、該組み合わせに含まれる前記第2色補正パラメータに基づいて補正された、前記第2スキャン画像の前記比較領域における色合いと、の類似度を示す類似度情報を算出する算出手段、
算出された類似度情報が予め定められた類似条件を満足するか否かを判定する判定手段、
前記複数の組み合わせのうちの、前記類似条件を満足する類似度情報が得られる組み合わせ、に含まれる前記第1色補正パラメータに基づいて補正された前記第1スキャン画像と、該組み合わせに含まれる前記第2色補正パラメータに基づいて補正された前記第2スキャン画像と、に基づき修正部分を抽出する抽出手段、
としてコンピュータを機能させるプログラム。
Image obtaining means for obtaining a first scan image read from a paper document, and a second scan image read from the paper document after positive Osamu, a,
For each of the plurality of combinations stored in a storage unit that stores a combination of a first color correction parameter and a second color correction parameter that is the same type of color correction parameter as the first color correction parameter. The second color corrected based on the hue in the comparison area of the first scan image corrected based on the first color correction parameter included in the combination and the second color correction parameter included in the combination. Calculation means for calculating similarity information indicating the similarity between the color of the scanned image in the comparison area and
Determining means for determining whether the calculated similarity information satisfies a predetermined similarity condition;
Of the plurality of combinations, the first scan image corrected based on the first color correction parameter included in the combination that obtains similarity information satisfying the similarity condition, and the combination included in the combination extracting means for extracting a second scan image corrected based on the second color correction parameters, the correction area on the basis of,
As a program that allows the computer to function.
原稿から読取られた第1スキャン画像と、修正後の前記紙原稿から読取られた第2スキャン画像と、を取得する画像取得手段、
画像の二値化に用いる二値化パラメータの値2つの組み合わせを変更しながら、組み合わせに含まれる第1の値に基づいて二値化された、前記第1スキャン画像の比較領域における画像と、該組み合わせに含まれる第2の値に基づいて二値化された、前記第2スキャン画像の前記比較領域における画像と、の類似度を示す類似度情報を算出する算出手段、
算出された類似度情報が予め定められた類似条件を満足するか否かを判定する判定手段と、
前記類似条件を満足する類似度情報が得られる組み合わせ、に含まれる前記第1の値に基づいて二値化された前記第1スキャン画像と、該組み合わせに含まれる前記第2の値に基づいて二値化された、前記第2スキャン画像と、に基づいて修正部分を抽出する抽出手段、
としてコンピュータを機能させるプログラム。
Image obtaining means for obtaining a first scan image read from a paper document, and a second scan image read from the paper document after positive Osamu, a,
An image in the comparison region of the first scan image binarized based on the first value included in the combination while changing the combination of the two binarization parameter values used for the binarization of the image; Calculating means for calculating similarity information indicating similarity between the second scan image and the image in the comparison area, binarized based on the second value included in the combination;
Determination means for determining whether the calculated similarity information satisfies a predetermined similarity condition;
Based on the first scan image binarized based on the first value included in the combination from which the similarity information satisfying the similarity condition is obtained, and on the second value included in the combination Extraction means for extracting a correction portion based on the binarized second scan image ;
As a program that allows the computer to function.
JP2007243095A 2007-09-19 2007-09-19 Image processing apparatus and program Expired - Fee Related JP5109548B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007243095A JP5109548B2 (en) 2007-09-19 2007-09-19 Image processing apparatus and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007243095A JP5109548B2 (en) 2007-09-19 2007-09-19 Image processing apparatus and program

Publications (2)

Publication Number Publication Date
JP2009077086A JP2009077086A (en) 2009-04-09
JP5109548B2 true JP5109548B2 (en) 2012-12-26

Family

ID=40611655

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007243095A Expired - Fee Related JP5109548B2 (en) 2007-09-19 2007-09-19 Image processing apparatus and program

Country Status (1)

Country Link
JP (1) JP5109548B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5724311B2 (en) * 2010-11-15 2015-05-27 富士ゼロックス株式会社 Image processing apparatus, image processing system, and image processing program
KR101752701B1 (en) * 2012-12-14 2017-06-30 한국전자통신연구원 Method for recreating makeup on image

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10124661A (en) * 1996-10-24 1998-05-15 Matsushita Electric Ind Co Ltd Edge image processor
JP3830350B2 (en) * 2001-01-31 2006-10-04 株式会社リコー Color image processing method, color image processing apparatus, program, and recording medium
JP3993192B2 (en) * 2004-11-12 2007-10-17 株式会社野村総合研究所 Image processing system, image processing program, and image processing method
JP4765312B2 (en) * 2004-12-27 2011-09-07 富士ゼロックス株式会社 Image processing apparatus and image processing program
JP4339289B2 (en) * 2005-07-28 2009-10-07 Necシステムテクノロジー株式会社 Change determination device, change determination method, and change determination program
JP2007233888A (en) * 2006-03-03 2007-09-13 Fuji Xerox Co Ltd Image processor and image processing program
JP4623377B2 (en) * 2006-03-03 2011-02-02 富士ゼロックス株式会社 Image processing apparatus and image processing program

Also Published As

Publication number Publication date
JP2009077086A (en) 2009-04-09

Similar Documents

Publication Publication Date Title
JP4525787B2 (en) Image extraction apparatus and image extraction program
US6865290B2 (en) Method and apparatus for recognizing document image by use of color information
JP5387193B2 (en) Image processing system, image processing apparatus, and program
US20130250370A1 (en) Apparatus, system, and method of inspecting image, and recording medium storing image inspection control program
JP2011139366A (en) Image processing apparatus and method, and program
JP2007241356A (en) Image processor and image processing program
US9131193B2 (en) Image-processing device removing encircling lines for identifying sub-regions of image
JP5109548B2 (en) Image processing apparatus and program
JP2010074342A (en) Image processing apparatus, image forming apparatus, and program
JP5335581B2 (en) Image processing apparatus, image processing method, and program
US6968501B2 (en) Document format identification apparatus and method
JP2010079507A (en) Image processor and image processing program
JP2008287414A (en) Optical recognition code recognition system, method, and program
JP4208520B2 (en) Image processing apparatus, image processing method, program, and storage medium
JP3378439B2 (en) Form image creation device
US9158968B2 (en) Apparatus for extracting changed part of image, apparatus for displaying changed part of image, and computer readable medium
US8295602B2 (en) Image processing apparatus and image processing method
JP4910635B2 (en) Image processing apparatus and image processing program
JP4825888B2 (en) Document image processing apparatus and document image processing method
JP6055952B1 (en) Image inspection apparatus, image inspection method, and program
JP5003379B2 (en) Image processing apparatus and program
JP2008269131A (en) Image processor and image processing program
JP4803001B2 (en) Image processing apparatus and image processing program
JP4973603B2 (en) Image processing apparatus and image processing program
JP5146199B2 (en) Difference extraction apparatus and difference extraction program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100818

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120229

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120313

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120508

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120924

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20151019

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees