JP2016163142A - Program and image processing apparatus - Google Patents

Program and image processing apparatus Download PDF

Info

Publication number
JP2016163142A
JP2016163142A JP2015038801A JP2015038801A JP2016163142A JP 2016163142 A JP2016163142 A JP 2016163142A JP 2015038801 A JP2015038801 A JP 2015038801A JP 2015038801 A JP2015038801 A JP 2015038801A JP 2016163142 A JP2016163142 A JP 2016163142A
Authority
JP
Japan
Prior art keywords
image data
size
short side
data
document
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2015038801A
Other languages
Japanese (ja)
Other versions
JP6107851B2 (en
Inventor
雅幸 原
Masayuki Hara
雅幸 原
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.)
Brother Industries Ltd
Original Assignee
Brother Industries Ltd
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 Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP2015038801A priority Critical patent/JP6107851B2/en
Publication of JP2016163142A publication Critical patent/JP2016163142A/en
Application granted granted Critical
Publication of JP6107851B2 publication Critical patent/JP6107851B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Facsimiles In General (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Character Input (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a program and image processing apparatus for automatically executing image processing, in accordance with a shape of a document to be scanned while being folded into two and held between carrier sheets, upon image data corresponding to the document.SOLUTION: First image data and second image data corresponding to a first region and a second region of the document are acquired. A first size of a first side of the document with characters recorded thereon is longer than a second size of a second side and the document is folded into two and held between the carrier sheets. The first region of the document is a region to be a side of a first face of the carrier sheet, and the second region of the document is a region to be a side of a second face of the carrier sheet. A short-side size of the first image data corresponding to the second size is acquired. If the short-side size is smaller than a reference size, a rotation amount is determined in accordance with at least a recognition result of OCR processing upon the first image data and rotation processing is executed. If the short-side size is not smaller than the reference size, the processing is not executed.SELECTED DRAWING: Figure 1

Description

本発明は、二つ折りされた状態でキャリアシートに挟み込まれ、スキャナ装置によってスキャンされる原稿に対応する画像データを画像処理するプログラムと画像処理装置に関する。   The present invention relates to a program and an image processing apparatus that perform image processing on image data corresponding to a document that is sandwiched between carrier sheets and scanned by a scanner device.

キャリアシートと両面同時読み取りスキャナ装置を用いたスキャンが実用化されている。キャリアシートと両面同時読み取りスキャナ装置を用いたスキャンによって生成される画像データを対象とした画像処理に関する技術が提案されている。例えば、特許文献1には、原稿の表裏両面をスキャンし、表面画像データと裏面画像データを生成し、両画像データを合成する技術が開示されている。表面画像データと裏面画像データを合成する場合、原稿は、二つ折りにされてキャリアシートに挟み込まれる。キャリアシートには、合成指示マークが、二つ折りにされた原稿を挟む位置以外の位置に描かれる。画像処理部において、合成指示マークが検出された場合、表面画像データ及び裏面画像データの所定の位置から切り出した表面切出画像及び裏面切出画像が1枚の画像データに合成される。合成指示マークが検出されない場合、表面画像データ及び裏面画像データは、独立した1枚の画像データとされる。特許文献1の技術によれば、通常の両面原稿の読み取りモードと、二つ折りにして画像を読み取り合成するモードを区別するための設定操作が不要で、モードの切り替えを行う必要がなくなる。   Scanning using a carrier sheet and a double-sided simultaneous scanning scanner device has been put into practical use. Techniques relating to image processing for image data generated by scanning using a carrier sheet and a double-sided simultaneous reading scanner device have been proposed. For example, Patent Document 1 discloses a technique for scanning both front and back sides of a document, generating front surface image data and back surface image data, and synthesizing both image data. When combining the front surface image data and the back surface image data, the document is folded in half and sandwiched between carrier sheets. The compositing instruction mark is drawn on the carrier sheet at a position other than the position where the folded document is sandwiched. When the compositing instruction mark is detected in the image processing unit, the front cut-out image and the back cut-out image cut out from the predetermined positions of the front image data and the back image data are combined into one piece of image data. When the compositing instruction mark is not detected, the front surface image data and the back surface image data are independent image data. According to the technique of Patent Document 1, a setting operation for distinguishing between a normal double-sided original reading mode and a mode in which an image is read and synthesized by folding in half is unnecessary, and there is no need to switch modes.

特許文献2には、読取装置が開示されている。読取装置では、搬送中のキャリアシートに挟み込まれた原稿シート上の画像が読み取られる。原稿シートは、レシートのような長尺原稿である。読取装置では、キャリアシートの表面と裏面の画像からそれぞれ画像データが生成される。読取装置では、表面と裏面の画像データから、キャリアシートに挟み込まれたレシートに対応する部分が部分データとして検出される。レシートが折られた状態であるか否かが判断される。レシートが折られた状態である場合、表面の部分データと裏面の部分データが合成され、一つの画像データとされる。このとき、合成は、表面の部分データに対応するレシートの折り目の位置と、裏面の部分データに対応するレシートの折り目の位置が一致するようにして行われる。レシートが折られた状態でない場合、前述したような合成は実行されない。   Patent Document 2 discloses a reading device. In the reading device, an image on the document sheet sandwiched between the carrier sheets being conveyed is read. The document sheet is a long document such as a receipt. In the reading device, image data is generated from the images on the front and back surfaces of the carrier sheet. In the reading device, a part corresponding to the receipt sandwiched between the carrier sheets is detected as partial data from the image data of the front and back surfaces. It is determined whether or not the receipt is folded. When the receipt is folded, the partial data on the front surface and the partial data on the back surface are combined into one image data. At this time, the composition is performed such that the position of the crease in the receipt corresponding to the partial data on the front surface matches the position of the crease in the receipt corresponding to the partial data on the back surface. When the receipt is not folded, the above-described synthesis is not executed.

特開2005−260387号公報JP 2005-260387 A 特開2014−216998号公報JP 2014-216998 A

各種の原稿が、キャリアシートに挟み込まれ、キャリアシートの両面がスキャンされることがある。キャリアシートに挟み込まれる原稿は、二つ折りにされることもある。例えば、レシートのような長尺の原稿が二つ折りにされて挟み込まれることもあれば、A3サイズの原稿が二つ折りにされて挟み込まれることもある。従って、キャリアシートを用いたスキャンにおいては、キャリアシートに挟み込まれる原稿に応じた画像処理のモードを設ける必要がある。キャリアシートに挟み込まれる原稿に応じた画像処理のモードは、スキャンに合わせて自動的に設定されることが望ましい。換言すれば、ユーザが画像処理のモードの設定を手動で行う処理手順は、ユーザフレンドリーではない。   Various documents may be sandwiched between carrier sheets, and both sides of the carrier sheet may be scanned. An original document sandwiched between carrier sheets may be folded in half. For example, a long document such as a receipt may be folded in two, or an A3 size document may be folded in two. Therefore, in the scan using the carrier sheet, it is necessary to provide an image processing mode corresponding to the document sandwiched between the carrier sheets. It is desirable that the image processing mode corresponding to the document sandwiched between the carrier sheets is automatically set in accordance with the scan. In other words, the processing procedure in which the user manually sets the image processing mode is not user-friendly.

本発明は、二つ折りされた状態でキャリアシートに挟み込まれてスキャンされる原稿に対応する画像データに対する画像処理が、原稿の形状に応じて自動的に実行される、プログラム及び画像処理装置を提供することを目的とする。   The present invention provides a program and an image processing apparatus in which image processing for image data corresponding to a document to be scanned by being sandwiched between carrier sheets in a folded state is automatically executed according to the shape of the document. The purpose is to do.

本発明の一側面は、スキャナ装置によってスキャンされた原稿に対応する画像データを画像処理する画像処理装置を制御するコンピュータが実行可能なプログラムであって、前記コンピュータを、文字が記録され、第一辺の第一サイズが第二辺の第二サイズより長い長尺の前記原稿が、折り目が前記第二辺に沿った状態で二つ折りされて挟み込まれたキャリアシートの第一面の側となる、前記原稿の第一領域に対応する第一画像データと、前記キャリアシートの前記第一面と反対側の第二面の側となる、前記原稿の第二領域に対応する第二画像データと、を取得する第一取得手段と、前記原稿の前記第二サイズに対応し、且つ前記第一画像データの短辺に対応する短辺サイズを取得する第二取得手段と、前記第二取得手段によって取得された前記短辺サイズが、基準となる基準サイズより小さいかを判断する第一判断手段と、前記短辺サイズが前記基準サイズより小さい場合、少なくとも前記第一画像データに対するOCR処理の認識結果に従い、少なくとも前記第一画像データの回転量を決定する決定処理を実行し、少なくとも前記第一画像データに対して、前記決定処理によって決定された前記回転量に従った回転処理を実行し、前記短辺サイズが前記基準サイズより小さくない場合、前記決定処理と前記回転処理とを実行しない、変形手段と、して機能させるプログラムである。   One aspect of the present invention is a program that can be executed by a computer that controls an image processing apparatus that performs image processing on image data corresponding to a document scanned by a scanner apparatus. The long original document whose first side size is longer than the second size of the second side is the side of the first surface of the carrier sheet that is folded and sandwiched with the fold line along the second side. First image data corresponding to the first region of the document, and second image data corresponding to the second region of the document on the second surface side opposite to the first surface of the carrier sheet; , Second acquisition means for acquiring a short side size corresponding to the second size of the document and corresponding to a short side of the first image data, and the second acquisition means. Acquired by First determination means for determining whether the short side size is smaller than a reference size, and if the short side size is smaller than the reference size, at least according to the recognition result of the OCR processing for the first image data, Performing a determination process for determining a rotation amount of the first image data, performing a rotation process according to the rotation amount determined by the determination process on at least the first image data, and the short side size Is a program that functions as a deforming means that does not execute the determination process and the rotation process when it is not smaller than the reference size.

これによれば、第一画像データの短辺に対応する短辺サイズに応じて、決定処理及び回転処理の実行又は未実行を制御することができる。第一画像データの短辺に対応する短辺サイズが基準サイズより小さい場合、回転量を決定し、決定された回転量に従った回転処理を実行することができる。決定処理では、OCR処理の認識結果に従い、回転量を決定することができる。第一画像データの短辺に対応する短辺サイズが基準サイズより大きい場合、回転量は決定されない。従って、回転処理も実行されない。   According to this, execution or non-execution of the determination process and the rotation process can be controlled according to the short side size corresponding to the short side of the first image data. When the short side size corresponding to the short side of the first image data is smaller than the reference size, the rotation amount can be determined, and the rotation process according to the determined rotation amount can be executed. In the determination process, the rotation amount can be determined according to the recognition result of the OCR process. When the short side size corresponding to the short side of the first image data is larger than the reference size, the rotation amount is not determined. Therefore, the rotation process is not executed.

このプログラムは、前記コンピュータを、前記短辺サイズが前記基準サイズより小さい場合、前記原稿に対応させた状態で、前記第一画像データ及び前記第二画像データの各短辺で、前記第一画像データと前記第二画像データとを合成した第一合成データを生成し、前記短辺サイズが前記基準サイズより小さくない場合、前記原稿に対応させた状態で、前記第一画像データ及び前記第二画像データの各長辺で、前記第一画像データと前記第二画像データとを合成した第二合成データを生成する、合成手段として機能させる、ようにしてもよい。これによれば、第一画像データの短辺に対応する短辺サイズが基準サイズより小さくなる二つ折りされた原稿について、この原稿に対応する第一合成データを生成することができる。第一画像データの短辺に対応する短辺サイズが基準サイズより大きい二つ折りされた原稿について、この原稿に対応する第二合成データを生成することができる。   When the short side size is smaller than the reference size, the program causes the first image on each short side of the first image data and the second image data in a state corresponding to the original. When the first composite data is generated by combining the data and the second image data, and the short side size is not smaller than the reference size, the first image data and the second image data in a state corresponding to the document. You may make it function as a synthetic | combination means which produces | generates the 2nd synthetic | combination data which synthesize | combined said 1st image data and said 2nd image data in each long side of image data. According to this, the first composite data corresponding to the original can be generated for the folded document whose short side size corresponding to the short side of the first image data is smaller than the reference size. For a document folded in half with a short side size larger than the reference size corresponding to the short side of the first image data, second composite data corresponding to this document can be generated.

このプログラムにおいて、前記変形手段は、前記第一画像データと前記第二画像データとを含む前記第一合成データに対するOCR処理の認識結果に従い、前記第一画像データと前記第二画像データとを含む前記第一合成データの前記回転量を決定する前記決定処理を実行し、前記第一画像データと前記第二画像データとを含む前記第一合成データに対して、前記回転処理を実行する機能を含む、ようにしてもよい。これによれば、二つ折りされていない状態の原稿に対応する第一合成データを対象として、回転量を決定し、決定された回転量に従った回転処理を実行することができる。   In this program, the deformation means includes the first image data and the second image data according to the recognition result of the OCR process for the first composite data including the first image data and the second image data. A function of executing the determination process for determining the rotation amount of the first composite data, and executing the rotation process on the first composite data including the first image data and the second image data; May be included. According to this, it is possible to determine the rotation amount for the first composite data corresponding to the document that is not folded in half, and to execute the rotation process according to the determined rotation amount.

このプログラムにおいて、前記合成手段は、前記第二画像データが、文字を含む所定の情報を含まない領域に対応するデータである場合、前記第一画像データと前記第二画像データとを合成しない、機能を含み、前記変形手段は、前記短辺サイズが前記基準サイズより小さく、且つ前記第一画像データと前記第二画像データとが合成されない場合、前記第一画像データに対するOCR処理の認識結果に従い、前記第一画像データの前記回転量を決定する前記決定処理を実行し、前記第一画像データに対して、前記回転処理を実行する機能を含む、ようにしてもよい。これによれば、文字を含まない領域に対応する第二画像データが、第一画像データに合成された合成データが生成されることを防止することができる。第一画像データを対象として、回転量を決定し、決定された回転量に従った回転処理を実行することができる。   In this program, the combining means does not combine the first image data and the second image data when the second image data is data corresponding to a region not including predetermined information including characters. And when the short side size is smaller than the reference size and the first image data and the second image data are not combined, the deformation means follows the recognition result of the OCR process for the first image data. A function of executing the determination process for determining the rotation amount of the first image data and executing the rotation process on the first image data may be included. According to this, it is possible to prevent generation of combined data in which the second image data corresponding to the area not including characters is combined with the first image data. A rotation amount can be determined for the first image data, and a rotation process according to the determined rotation amount can be executed.

このプログラムにおいて、前記コンピュータを、前記短辺サイズが前記基準サイズより小さい場合、前記第二取得手段によって取得され、且つ前記判断手段の判断対象とされた前記短辺サイズが、前記スキャナ装置におけるスキャンの主走査方向に一致する、前記第一画像データの水平方向のサイズであるかを判断する第二判断手段として機能させ、前記変形手段は、前記短辺サイズが、前記第一画像データの水平方向のサイズである場合、前記決定処理において、前記回転量として、少なくとも前記第一画像データの鉛直方向における上下が逆となる量と、未回転と、を決定し、前記短辺サイズが、前記第一画像データの水平方向のサイズでない場合、前記決定処理において、前記回転量として、少なくとも前記第一画像データの水平方向が鉛直方向となる量を決定する、機能を含む、ようにしてもよい。これによれば、第一画像データの短辺に対応する短辺サイズの方向に応じて、回転量を適宜決定することができる。   In this program, when the short side size is smaller than the reference size, the short side size acquired by the second acquisition unit and used as the determination target of the determination unit is scanned in the scanner device. And the second determining means for determining whether the size of the first image data in the horizontal direction coincides with the main scanning direction of the first image data. In the case of the size of the direction, in the determination process, as the amount of rotation, at least an amount in which the first image data is vertically reversed in the vertical direction and unrotated are determined, and the short side size is When the size is not the horizontal size of the first image data, in the determination process, as the rotation amount, at least the horizontal direction of the first image data Determining an amount of the vertical direction, including functional, may be. According to this, the rotation amount can be appropriately determined according to the direction of the short side size corresponding to the short side of the first image data.

このプログラムにおいて、前記変形手段は、前記短辺サイズが、前記第一画像データの水平方向のサイズであり、前記主走査方向に直交する副走査方向に一致する、前記第一画像データの鉛直方向の下側から上側へのOCR処理の認識結果の信頼度を示す第一パラメータ値が、前記第一画像データの鉛直方向の上側から下側へのOCR処理の認識結果の信頼度を示す第二パラメータ値より大きい場合、前記回転量として、少なくとも前記第一画像データの鉛直方向における上下が逆となる量を決定し、前記短辺サイズが、前記第一画像データの水平方向のサイズであり、前記第一パラメータ値が前記第二パラメータ値より小さい場合、前記回転量として、未回転を決定し、前記短辺サイズが、前記第一画像データの水平方向のサイズではなく、前記第一画像データの前記水平方向の左側から右側へのOCR処理の認識結果の信頼度を示す第三パラメータ値が、前記第一画像データの水平方向の右側から左側へのOCR処理の認識結果の信頼度を示す第四パラメータ値より大きい場合、前記回転量として、少なくとも前記第一画像データの水平方向が鉛直方向となる右回りの量を決定し、前記短辺サイズが、前記第一画像データの前記水平方向のサイズではなく、前記第三パラメータ値が前記第四パラメータ値より小さい場合、前記回転量として、少なくとも前記第一画像データの水平方向が鉛直方向となる左回りの量を決定する、ようにしてもよい。これによれば、短辺サイズが水平方向のサイズである場合、第一パラメータ値と第二パラメータ値の大小関係に応じて、回転量を適宜決定することができる。短辺サイズが水平方向のサイズでない場合、第三パラメータ値と第四パラメータ値の大小関係に応じて、回転量を適宜決定することができる。OCR処理の認識結果の信頼度を示すパラメータとは、例えば、その高低を比較するためならば、認識できた文字数を用いることができる。   In this program, the deformation means has a vertical direction of the first image data in which the short side size is a horizontal size of the first image data and coincides with a sub-scanning direction orthogonal to the main scanning direction. The first parameter value indicating the reliability of the recognition result of the OCR process from the lower side to the upper side of the second indicates the reliability of the recognition result of the OCR process from the upper side to the lower side in the vertical direction of the first image data. When larger than a parameter value, as the amount of rotation, at least determine the amount that the vertical direction of the first image data is upside down, the short side size is the horizontal size of the first image data, When the first parameter value is smaller than the second parameter value, non-rotation is determined as the rotation amount, and the short side size is not the horizontal size of the first image data. The third parameter value indicating the reliability of the recognition result of the first image data from the left side to the right side in the horizontal direction is the recognition result of the first image data from the right side to the left side in the horizontal direction. When the rotation amount is larger than a fourth parameter value indicating a reliability of the first image data, at least a clockwise amount in which the horizontal direction of the first image data is a vertical direction is determined, and the short side size is the first image. If the third parameter value is smaller than the fourth parameter value instead of the horizontal size of the data, the amount of rotation is determined as a counterclockwise amount in which at least the horizontal direction of the first image data is the vertical direction. You may do it. According to this, when the short side size is the horizontal size, the rotation amount can be appropriately determined according to the magnitude relationship between the first parameter value and the second parameter value. When the short side size is not the horizontal size, the rotation amount can be appropriately determined according to the magnitude relationship between the third parameter value and the fourth parameter value. For example, the number of recognized characters can be used as the parameter indicating the reliability of the recognition result of the OCR processing in order to compare the levels.

本発明の他の側面は、スキャナ装置によってスキャンされた原稿に対応する画像データを画像処理する画像処理装置であって、文字が記録され、第一辺の第一サイズが第二辺の第二サイズより長い長尺の前記原稿が、折り目が前記第二辺に沿った状態で二つ折りされて挟み込まれたキャリアシートの第一面の側となる、前記原稿の第一領域に対応する第一画像データと、前記キャリアシートの前記第一面と反対側の第二面の側となる、前記原稿の第二領域に対応する第二画像データと、を取得する第一取得手段と、前記原稿の前記第二サイズに対応し、且つ前記第一画像データの短辺に対応する短辺サイズを取得する第二取得手段と、前記第二取得手段によって取得された前記短辺サイズが、基準となる基準サイズより小さいかを判断する第一判断手段と、前記短辺サイズが前記基準サイズより小さい場合、少なくとも前記第一画像データに対するOCR処理の認識結果に従い、少なくとも前記第一画像データの回転量を決定する決定処理を実行し、少なくとも前記第一画像データに対して、前記決定処理によって決定された前記回転量に従った回転処理を実行し、前記短辺サイズが前記基準サイズより小さくない場合、前記決定処理と前記回転処理とを実行しない、変形手段と、を備える画像処理装置である。   Another aspect of the present invention is an image processing device that performs image processing on image data corresponding to a document scanned by a scanner device, wherein characters are recorded and the first size of the first side is the second of the second side. The first document corresponding to the first region of the document, which is on the first surface side of the carrier sheet sandwiched by being folded in half with the fold line being along the second side, is longer than the size of the document. A first acquisition unit configured to acquire image data and second image data corresponding to a second region of the document on a second surface side opposite to the first surface of the carrier sheet; Second acquisition means for acquiring a short side size corresponding to the second size of the first image data and the short side size acquired by the second acquisition means is a reference. To determine whether it is smaller than the standard size When the short side size is smaller than the reference size, the determination unit executes a determination process for determining at least the rotation amount of the first image data according to at least a recognition result of the OCR process for the first image data, A rotation process according to the rotation amount determined by the determination process is performed on the first image data, and if the short side size is not smaller than the reference size, the determination process and the rotation process are performed. The image processing apparatus includes a deformation unit.

これによれば、上記の対応するプログラムと同様の作用が実現される。この画像処理装置は、上記のプログラムと同様、他の機能が実現される画像処理装置として特定することもできる。   According to this, the same operation as the corresponding program is realized. This image processing apparatus can also be specified as an image processing apparatus that realizes other functions in the same manner as the above-described program.

本発明によれば、二つ折りされた状態でキャリアシートに挟み込まれてスキャンされる原稿に対応する画像データに対する画像処理が、原稿の形状に応じて自動的に実行される、プログラム及び画像処理装置を得ることができる。   According to the present invention, a program and an image processing apparatus that automatically perform image processing on image data corresponding to a document that is sandwiched between carrier sheets and scanned in a folded state according to the shape of the document Can be obtained.

画像処理システムの一例を示す図である。1 is a diagram illustrating an example of an image processing system. 読取媒体の一例としてのレシートとキャリアシートに関する図である。上段はレシートをキャリアシートに挟み込む状態を示す。下段左側は、レシートが挟み込まれたキャリアシートの第一面を示す。下段右側は、レシートが挟み込まれたキャリアシートの第二面を示す。It is a figure regarding the receipt and carrier sheet as an example of a reading medium. The upper stage shows a state in which the receipt is sandwiched between carrier sheets. The lower left side shows the first surface of the carrier sheet in which the receipt is sandwiched. The lower right side shows the second surface of the carrier sheet with the receipt sandwiched therebetween. レシートが二つ折りされる状態を示す図である。It is a figure which shows the state by which a receipt is folded in half. 画像処理の第一部分のフローチャートである。It is a flowchart of the 1st part of image processing. 画像処理の第二部分のフローチャートである。It is a flowchart of the 2nd part of image processing. 画像処理の第三部分のフローチャートである。It is a flowchart of the 3rd part of image processing.

本発明を実施するための実施形態について、図面を用いて説明する。本発明は、以下に記載の構成に限定されるものではなく、同一の技術的思想において種々の構成を採用することができる。例えば、以下に示す構成の一部は、省略し又は他の構成等に置換してもよい。他の構成を含むようにしてもよい。   Embodiments for carrying out the present invention will be described with reference to the drawings. The present invention is not limited to the configurations described below, and various configurations can be employed in the same technical idea. For example, some of the configurations shown below may be omitted or replaced with other configurations. Other configurations may be included.

<画像処理システム>
画像処理システム10について、図1〜図3を参照して説明する。画像処理システム10は、画像処理装置20と、スキャナ装置30を含む。画像処理システム10において、画像処理装置20とスキャナ装置30は、通信ケーブル11によって接続される。画像処理装置20とスキャナ装置30の間では、通信ケーブル11を介してデータ通信が行われる。例えば、スキャナ装置30によって生成された画像データが、通信ケーブル11を介して画像処理装置20に送信される。画像データは、読取媒体の第一面又は第二面に対応するデータである。画像処理装置20では、スキャナ装置30から送信された前述の画像データが受信され、画像処理装置20は、これを取得する。
<Image processing system>
The image processing system 10 will be described with reference to FIGS. The image processing system 10 includes an image processing device 20 and a scanner device 30. In the image processing system 10, the image processing device 20 and the scanner device 30 are connected by a communication cable 11. Data communication is performed between the image processing apparatus 20 and the scanner apparatus 30 via the communication cable 11. For example, image data generated by the scanner device 30 is transmitted to the image processing device 20 via the communication cable 11. The image data is data corresponding to the first surface or the second surface of the reading medium. In the image processing device 20, the above-described image data transmitted from the scanner device 30 is received, and the image processing device 20 acquires this.

画像処理装置20では、取得された画像データに対する画像処理が実行される。画像処理装置20は、例えば、パーソナルコンピュータのような情報処理装置である。画像処理装置20で実行される画像処理については後述する。スキャナ装置30では、読取媒体がスキャンされ、スキャンされた読取媒体に対応する画像データが生成される。スキャナ装置30は、読取媒体の第一面及び第二面を、1回のスキャン動作で、まとめてスキャンすることができる。この場合、スキャナ装置30では、読取媒体の第一面に対応する画像データと、読取媒体の第二面に対応する画像データが生成される。   In the image processing device 20, image processing is executed on the acquired image data. The image processing apparatus 20 is an information processing apparatus such as a personal computer, for example. Image processing executed by the image processing apparatus 20 will be described later. In the scanner device 30, the reading medium is scanned, and image data corresponding to the scanned reading medium is generated. The scanner device 30 can collectively scan the first surface and the second surface of the reading medium by one scanning operation. In this case, the scanner device 30 generates image data corresponding to the first surface of the reading medium and image data corresponding to the second surface of the reading medium.

スキャナ装置30では、キャリアシート40を用いたスキャン動作を行うことができる。キャリアシート40には、図2に示すように、原稿が挟み込まれる。原稿には、各種の情報が記録されている。原稿に記録された情報には、少なくとも文字が含まれる。例えば、原稿としては、A3サイズの資料(不図示)と、レシートが挙げられる。レシートは、所定の物品を購入した際、又は所定のサービスを受けた際、精算時に店員等から渡される。レシートには、図3に示すように、例えば、購入物品名とその値段等の文字が記録されている。レシートにおいて文字は、短辺に沿って記録される。キャリアシート40に挟み込まれる原稿は、二つ折りにされることもある(図2及び図3参照)。実施形態では、読取媒体は、1枚又は複数枚の原稿が挟み込まれたキャリアシート40であるとする。図2に示すキャリアシート40は、簡易的な図示とされている。キャリアシート40を構成する2枚の透明シートの接続は、図2とは異なる構成であってもよい。キャリアシート40としては、公知のキャリアシートを採用することができる。   In the scanner device 30, a scanning operation using the carrier sheet 40 can be performed. As shown in FIG. 2, the document is sandwiched between the carrier sheets 40. Various information is recorded on the manuscript. The information recorded on the document includes at least characters. For example, examples of the manuscript include A3 size materials (not shown) and receipts. The receipt is delivered from a store clerk at the time of payment when a predetermined article is purchased or a predetermined service is received. As shown in FIG. 3, on the receipt, for example, characters such as a purchased article name and its price are recorded. In the receipt, the characters are recorded along the short side. The document sandwiched between the carrier sheets 40 may be folded in half (see FIGS. 2 and 3). In the embodiment, it is assumed that the reading medium is the carrier sheet 40 in which one or a plurality of documents are sandwiched. The carrier sheet 40 shown in FIG. 2 is simply illustrated. The connection between the two transparent sheets constituting the carrier sheet 40 may be different from that shown in FIG. As the carrier sheet 40, a known carrier sheet can be adopted.

<画像処理装置>
画像処理装置20は、図1に示すように、CPU21と、記憶装置22と、RAM23と、表示部24と、操作部25と、通信部26を備える。これら各部21〜26は、通信可能に接続される。CPU21は、演算処理を実行する。記憶装置22は、コンピュータが読み取り可能な記憶媒体によって構成される。例えば、記憶装置22は、ハードディスク及び/又はフラッシュメモリによって構成される。この他、記憶装置22は、ROMを含むものであってもよい。記憶装置22には、各種のプログラムが記憶される。例えば、記憶装置22には、OS(Operating System)と各種のアプリケーションが記憶される。記憶装置22に記憶されるアプリケーションには、後述する画像処理(図4〜図6参照)のプログラムと、この画像処理において実行される、ラベリング処理(図4のS15参照)、OCR処理(図5のS43又は図6のS51参照)、回転処理(図6のS59参照)及び傾き補正処理(図6のS61参照)の各プログラムが含まれる。
<Image processing device>
As shown in FIG. 1, the image processing apparatus 20 includes a CPU 21, a storage device 22, a RAM 23, a display unit 24, an operation unit 25, and a communication unit 26. These units 21 to 26 are communicably connected. CPU21 performs arithmetic processing. The storage device 22 is configured by a computer-readable storage medium. For example, the storage device 22 is configured by a hard disk and / or a flash memory. In addition, the storage device 22 may include a ROM. Various programs are stored in the storage device 22. For example, the storage device 22 stores an OS (Operating System) and various applications. The application stored in the storage device 22 includes a program for image processing (see FIGS. 4 to 6) described later, a labeling process (see S15 in FIG. 4), and an OCR process (see FIG. 5). , S43 of FIG. 6 or S51 of FIG. 6), rotation processing (see S59 of FIG. 6), and inclination correction processing (see S61 of FIG. 6).

例えば、アプリケーションは、記憶装置22に事前にインストールされる。事前のインストールは、例えば、半導体メモリ等のコンピュータが読み取り可能な記憶媒体に記憶されたプログラムが、画像処理装置20の読取部(不図示)によって読み取られることで行われる。画像処理装置20が、例えば、光学ドライブ(不図示)を備えている場合、事前のインストールは、光学メディアに記憶されたプログラムが、光学ドライブによって読み取られることで行われるようにしてもよい。この他、画像処理装置20がインターネットのようなネットワーク(不図示)に接続されている場合、事前のインストールは、このネットワークに接続されたサーバ装置のハードディスク等のコンピュータが読み取り可能な記憶媒体に記憶されたプログラムが、通信部26で伝送信号として受信されることで行われるようにしてもよい。何れの形態とするかは、諸事情を考慮して適宜決定される。コンピュータが読み取り可能な記憶媒体は、一時的な記憶媒体(例えば、伝送信号)を含まない、非一時的な記憶媒体であってもよい。非一時的な記憶媒体は、情報を記憶する期間に関わらず、情報を記憶可能な記憶媒体であればよい。   For example, the application is installed in the storage device 22 in advance. The prior installation is performed, for example, by reading a program stored in a computer-readable storage medium such as a semiconductor memory by a reading unit (not shown) of the image processing apparatus 20. For example, when the image processing apparatus 20 includes an optical drive (not shown), the prior installation may be performed by reading a program stored in the optical medium by the optical drive. In addition, when the image processing apparatus 20 is connected to a network (not shown) such as the Internet, the prior installation is stored in a computer-readable storage medium such as a hard disk of a server apparatus connected to the network. The programmed program may be received by the communication unit 26 as a transmission signal. Which form is used is appropriately determined in consideration of various circumstances. The computer-readable storage medium may be a non-transitory storage medium that does not include a temporary storage medium (for example, a transmission signal). The non-temporary storage medium may be any storage medium that can store information regardless of the period in which the information is stored.

RAM23は、CPU21が各種のプログラムを実行する際に利用される記憶領域となる。RAM23には、処理の実行途中に、処理で利用される所定のデータと情報が、所定の記憶領域に記憶される。画像処理装置20では、CPU21が、記憶装置22に記憶されたOS及び上述した各プログラム(図4〜図6参照)を実行する等して、画像処理装置20を制御する。これにより、画像処理装置20では、各種の機能手段が実現される。   The RAM 23 is a storage area used when the CPU 21 executes various programs. In the RAM 23, predetermined data and information used in the process are stored in a predetermined storage area during the execution of the process. In the image processing apparatus 20, the CPU 21 controls the image processing apparatus 20 by executing the OS stored in the storage device 22 and the above-described programs (see FIGS. 4 to 6). Thereby, in the image processing apparatus 20, various functional units are realized.

表示部24は、例えば、液晶ディスプレイである。表示部24には、各種の情報が表示される。例えば、表示部24には、図4〜図6に示す画像処理によって合成される第一合成データ又は第二合成データに対応する画像が表示される。操作部25は、画像処理装置20に対する各種の指示等の入力を受け付ける。例えば、操作部25は、スキャン動作の開始指示の入力を受け付ける。操作部25は、例えば、キーボード及びマウスを含む。詳細は省略するが、キーボード及びマウスへの各操作に対応する操作情報を生成する処理は、例えば、公知のパーソナルコンピュータで採用されている技術であり、画像処理装置20でも採用される。   The display unit 24 is, for example, a liquid crystal display. Various information is displayed on the display unit 24. For example, the display unit 24 displays an image corresponding to the first synthesized data or the second synthesized data synthesized by the image processing shown in FIGS. The operation unit 25 receives inputs such as various instructions for the image processing apparatus 20. For example, the operation unit 25 receives an input of a scan operation start instruction. The operation unit 25 includes, for example, a keyboard and a mouse. Although details are omitted, the process of generating operation information corresponding to each operation on the keyboard and mouse is, for example, a technique adopted in a known personal computer, and is also adopted in the image processing apparatus 20.

通信部26には、通信ケーブル11が接続される。通信部26は、通信ケーブル11を介したスキャナ装置30との間のデータ通信を行う。例えば、画像処理装置20では、通信部26を介してスキャナ装置30から送信される画像データが受信される。通信部26は、例えば、USB(Universal Serial Bus )規格又はイーサネット(登録商標)規格に適合するインターフェース回路である。通信部26がイーサネット(登録商標)規格に適合するインターフェース回路であるとする。この場合、スキャナ装置30との接続は、有線接続又は無線接続の何れであってもよい。   The communication cable 11 is connected to the communication unit 26. The communication unit 26 performs data communication with the scanner device 30 via the communication cable 11. For example, the image processing device 20 receives image data transmitted from the scanner device 30 via the communication unit 26. The communication unit 26 is an interface circuit that conforms to, for example, the USB (Universal Serial Bus) standard or the Ethernet (registered trademark) standard. It is assumed that the communication unit 26 is an interface circuit that conforms to the Ethernet (registered trademark) standard. In this case, the connection with the scanner device 30 may be either a wired connection or a wireless connection.

画像処理装置20は、図4〜図6に示す画像処理のプログラムが記憶装置22に記憶されている点が、公知の画像処理装置と相違する。但し、画像処理装置20は、ハードウェア的には、公知の画像処理装置と同様の情報処理装置である。従って、上記では説明を省略したが、画像処理装置20は、上述した各部21〜27の他、公知の画像処理装置が備える構成を備える。   The image processing apparatus 20 is different from a known image processing apparatus in that the image processing program shown in FIGS. 4 to 6 is stored in the storage device 22. However, the image processing apparatus 20 is an information processing apparatus similar to a known image processing apparatus in hardware. Therefore, although the description is omitted above, the image processing apparatus 20 includes a configuration included in a known image processing apparatus in addition to the above-described units 21 to 27.

<スキャナ装置>
スキャナ装置30は、図1に示すように、CPU31と、記憶装置32と、RAM33と、搬送部34と、第一イメージセンサ35と、第二イメージセンサ36と、通信部37を備える。これら各部31〜37は、通信可能に接続される。CPU31は、演算処理を実行する。記憶装置32は、コンピュータが読み取り可能な記憶媒体によって構成される。例えば、記憶装置32は、フラッシュメモリによって構成される。記憶装置32には、各種のプログラムが記憶される。例えば、記憶装置32に記憶されるプログラムには、スキャン動作に応じて、画像データを生成するプログラムが含まれる。
<Scanner device>
As shown in FIG. 1, the scanner device 30 includes a CPU 31, a storage device 32, a RAM 33, a transport unit 34, a first image sensor 35, a second image sensor 36, and a communication unit 37. These units 31 to 37 are communicably connected. CPU31 performs arithmetic processing. The storage device 32 is configured by a computer-readable storage medium. For example, the storage device 32 is configured by a flash memory. Various programs are stored in the storage device 32. For example, the program stored in the storage device 32 includes a program that generates image data in accordance with a scanning operation.

RAM33は、CPU31が各種のプログラムを実行する際に利用される記憶領域となる。RAM33には、処理の実行途中に、処理で利用される所定のデータが、所定の記憶領域に記憶される。例えば、RAM33には、生成された画像データが記憶される。スキャナ装置30では、CPU31が、記憶装置32に記憶されたプログラムを実行する等して、スキャナ装置30を制御する。これにより、スキャナ装置30では、各種の機能手段が実現される。   The RAM 33 is a storage area used when the CPU 31 executes various programs. In the RAM 33, predetermined data used in the processing is stored in a predetermined storage area during the execution of the processing. For example, the generated image data is stored in the RAM 33. In the scanner device 30, the CPU 31 controls the scanner device 30 by executing a program stored in the storage device 32. Thereby, various functional means are realized in the scanner device 30.

搬送部34は、スキャナ装置30にセットされた読取媒体を搬送する。読取媒体としては、上述したように、例えば、1枚又は複数枚の原稿が挟み込まれたキャリアシート40が含まれる。読取媒体は、原稿そのものであることもある。第一イメージセンサ35及び第二イメージセンサ36は、CIS方式のイメージセンサである。但し、第一イメージセンサ35及び第二イメージセンサ36は、CCD方式のイメージセンサであってもよい。スキャナ装置30では、互いに対向する2個の第一イメージセンサ35及び第二イメージセンサ36によって、1回のスキャン動作における両面スキャンが実現される。実施形態では、第一イメージセンサ35によってスキャンされるキャリアシート40の面を、「第一面」という。第二イメージセンサ36によってスキャンされるキャリアシート40の面を、「第二面」という。   The transport unit 34 transports the reading medium set in the scanner device 30. As described above, the reading medium includes, for example, the carrier sheet 40 in which one or more originals are sandwiched. The reading medium may be a document itself. The first image sensor 35 and the second image sensor 36 are CIS type image sensors. However, the first image sensor 35 and the second image sensor 36 may be CCD image sensors. In the scanner device 30, the two first image sensors 35 and the second image sensor 36 facing each other realize double-sided scanning in one scanning operation. In the embodiment, the surface of the carrier sheet 40 scanned by the first image sensor 35 is referred to as a “first surface”. The surface of the carrier sheet 40 scanned by the second image sensor 36 is referred to as a “second surface”.

スキャナ装置30でスキャンできるサイズが、A4縦サイズに設定された場合を例に挙げる。A4縦サイズは、297mmである。この場合、第一イメージセンサ35及び第二イメージセンサ36では、主走査方向における最大スキャンサイズは、210mmとなる。スキャナ装置30では、A4サイズに対応したサイズのキャリアシート40が用いられる。スキャナ装置30では、キャリアシート40は、キャリアシート40の長手方向に沿って搬送される。キャリアシート40の長手方向は、A4サイズの縦方向に一致する。通信部37は、通信ケーブル11が接続される。通信部37は、通信ケーブル11を介した画像処理装置20との間のデータ通信を行う。例えば、スキャナ装置30では、通信部37から画像データが画像処理装置20に送信される。通信部37は、通信部26と同様の構成である。従って、通信部37に関するこの他の説明は省略する。   A case where the size that can be scanned by the scanner device 30 is set to A4 vertical size will be described as an example. The A4 vertical size is 297 mm. In this case, in the first image sensor 35 and the second image sensor 36, the maximum scan size in the main scanning direction is 210 mm. In the scanner device 30, a carrier sheet 40 having a size corresponding to the A4 size is used. In the scanner device 30, the carrier sheet 40 is conveyed along the longitudinal direction of the carrier sheet 40. The longitudinal direction of the carrier sheet 40 coincides with the vertical direction of A4 size. The communication unit 37 is connected to the communication cable 11. The communication unit 37 performs data communication with the image processing apparatus 20 via the communication cable 11. For example, in the scanner device 30, image data is transmitted from the communication unit 37 to the image processing device 20. The communication unit 37 has the same configuration as that of the communication unit 26. Therefore, the other description regarding the communication part 37 is abbreviate | omitted.

スキャナ装置30は、ハードウェア的には、公知のスキャナ装置である。従って、上記では説明を省略したが、スキャナ装置30は、上述した各部31〜37の他、公知のスキャナ装置が備える構成を備える。   The scanner device 30 is a known scanner device in terms of hardware. Therefore, although the description is omitted above, the scanner device 30 includes a configuration included in a known scanner device in addition to the above-described units 31 to 37.

<画像処理>
画像処理装置20で実行される画像処理について、図4〜図6を参照して説明する。画像処理の説明において、キャリアシート40に挟み込まれる原稿は、レシートと、葉書と、二つ折りされたA3サイズの資料であるとする。レシートは、長辺の第一サイズが短辺の第二サイズより長い長尺の原稿である。レシートは、長辺のサイズが短辺のサイズの2倍より長いものを対象とする(図3参照)。レシートは、二つ折りにされず、そのままの状態でキャリアシート40に挟み込まれることもある。画像処理は、この処理の開始指示が操作部25で受け付けられ、CPU21が、この開始指示を操作部25から取得した場合に開始される。ユーザは、開始指示の入力に際し、原稿が挟み込まれたキャリアシート40を、スキャナ装置30にセットする。このとき、キャリアシート40に挟み込まれる原稿の枚数は、1枚又は複数枚とされる。スキャナ装置30にセットされるキャリアシート40の枚数は、1枚であるとする。
<Image processing>
Image processing executed by the image processing apparatus 20 will be described with reference to FIGS. In the description of the image processing, it is assumed that the document sandwiched between the carrier sheets 40 is a receipt, a postcard, and an A3 size document folded in half. The receipt is a long document in which the first size on the long side is longer than the second size on the short side. Receipts are intended for those whose long side is longer than twice the size of the short side (see FIG. 3). The receipt may be sandwiched between the carrier sheets 40 without being folded in half. The image processing is started when an instruction to start the process is received by the operation unit 25 and the CPU 21 acquires the start instruction from the operation unit 25. When inputting the start instruction, the user sets the carrier sheet 40 with the document sandwiched in the scanner device 30. At this time, the number of documents sandwiched between the carrier sheets 40 is one or more. It is assumed that the number of carrier sheets 40 set in the scanner device 30 is one.

開始指示を取得したCPU21は、カウンタを「0」に初期化する(S10)。カウンタは、S19〜S63(図6参照)の処理が実行された回数をカウントする。カウンタによってカウントされるカウント数は、RAM23に記憶される。続けて、CPU21は、開始指示の送信を制御する(S11)。即ち、CPU21は、開始指示の送信指令を通信部26に出力する。開始指示の送信先は、スキャナ装置30である。これに伴い、開始指示が、通信部26からスキャナ装置30に送信される。   The CPU 21 that has acquired the start instruction initializes the counter to “0” (S10). The counter counts the number of times processing of S19 to S63 (see FIG. 6) has been executed. The count number counted by the counter is stored in the RAM 23. Subsequently, the CPU 21 controls transmission of a start instruction (S11). That is, the CPU 21 outputs a start instruction transmission command to the communication unit 26. The transmission destination of the start instruction is the scanner device 30. Accordingly, a start instruction is transmitted from the communication unit 26 to the scanner device 30.

スキャナ装置30では、CPU31が、通信部37を介して開始指示を取得し、スキャン動作を開始させる。これに伴い、搬送部34が駆動し、スキャナ装置30にセットされたキャリアシート40が搬送される。スキャナ装置30では、スキャン動作に応じて、画像データが生成される。1回のスキャン動作において、スキャナ装置30で生成される画像データは、第一面データと、第二面データである。第一面データは、第一イメージセンサ35によってスキャンされたキャリアシート40の第一面に対応する画像データである。第二面データは、第二イメージセンサ36によってスキャンされたキャリアシート40の第二面に対応する画像データである。スキャナ装置30では、生成された画像データが、通信部37からスキャナ装置30に送信される。   In the scanner device 30, the CPU 31 acquires a start instruction via the communication unit 37 and starts a scanning operation. Accordingly, the conveyance unit 34 is driven, and the carrier sheet 40 set in the scanner device 30 is conveyed. In the scanner device 30, image data is generated according to the scanning operation. In one scan operation, the image data generated by the scanner device 30 is first surface data and second surface data. The first surface data is image data corresponding to the first surface of the carrier sheet 40 scanned by the first image sensor 35. The second surface data is image data corresponding to the second surface of the carrier sheet 40 scanned by the second image sensor 36. In the scanner device 30, the generated image data is transmitted from the communication unit 37 to the scanner device 30.

画像処理装置20では、スキャナ装置30からの第一面データ及び第二面データが、通信部26で受信される。CPU21は、通信部26を介して第一面データ及び第二面データを取得する(S13)。取得された第一面データ及び第二面データは、RAM23に記憶される。続けて、CPU21は、ラベリング処理を実行する(S15)。ラベリング処理は、第一面データ及び第二面データを対象として実行される。ラベリング処理では、第一画像データと第二画像データとラベル数が取得される。ラベル数は、キャリアシート40に挟み込まれた原稿の枚数に対応する。   In the image processing device 20, the first surface data and the second surface data from the scanner device 30 are received by the communication unit 26. CPU21 acquires 1st surface data and 2nd surface data via the communication part 26 (S13). The acquired first surface data and second surface data are stored in the RAM 23. Subsequently, the CPU 21 executes a labeling process (S15). The labeling process is executed on the first surface data and the second surface data. In the labeling process, the first image data, the second image data, and the number of labels are acquired. The number of labels corresponds to the number of documents sandwiched between the carrier sheets 40.

第一面データを対象としたラベリング処理では、第一画像データが取得される。第一画像データは、キャリアシート40に挟み込まれた各原稿において、キャリアシート40の第一面の側となる原稿の第一領域に対応する画像データである。例えば、1枚のレシートが、図3に示すように、二つ折りにされた状態で、キャリアシート40に挟み込まれていたとする(図2参照)。この場合、第一画像データは、キャリアシート40に挟み込まれたレシートの印字面の全領域(図3の「<折り曲げ前(レシートの全体)>」参照)のうち、図2下段に示すように、キャリアシート40の第一面の側となるレシートの第一領域(図3の「<第一領域>」参照)に対応する画像データである。   In the labeling process for the first surface data, the first image data is acquired. The first image data is image data corresponding to the first region of the document on the first surface side of the carrier sheet 40 in each document sandwiched between the carrier sheets 40. For example, it is assumed that one receipt is sandwiched between carrier sheets 40 in a folded state as shown in FIG. 3 (see FIG. 2). In this case, as shown in the lower part of FIG. 2, the first image data is the entire area of the print surface of the receipt sandwiched between the carrier sheets 40 (see “<Before Bending (Whole Receipt)>” in FIG. 3). The image data corresponding to the first region of the receipt on the first surface side of the carrier sheet 40 (see “<First region>” in FIG. 3).

第二面データを対象としたラベリング処理では、第二画像データが取得される。第二画像データは、キャリアシート40に挟み込まれた各原稿において、キャリアシート40の第二面の側となる原稿の第二領域に対応する画像データである。例えば、1枚のレシートが、図3に示すように、二つ折りにされた状態で、キャリアシート40に挟み込まれていたとする(図2参照)。この場合、第二画像データは、キャリアシート40に挟み込まれたレシートの印字面の全領域のうち、図2下段に示すように、キャリアシート40の第二面の側となるレシートの第二領域(図3の「<第二領域>」参照)に対応する画像データである。図3に示す、レシートの第二領域について、この図は、レシートを、短辺に沿った折り目Lで二つ折りにした状態を基準として図示されている。   In the labeling process for the second surface data, second image data is acquired. The second image data is image data corresponding to the second region of the document on the second surface side of the carrier sheet 40 in each document sandwiched between the carrier sheets 40. For example, it is assumed that one receipt is sandwiched between carrier sheets 40 in a folded state as shown in FIG. 3 (see FIG. 2). In this case, the second image data is the second region of the receipt on the second surface side of the carrier sheet 40 as shown in the lower part of FIG. 2 among the entire region of the printing surface of the receipt sandwiched between the carrier sheets 40. (Refer to “<second region>” in FIG. 3). The second region of the receipt shown in FIG. 3 is illustrated with reference to a state in which the receipt is folded in half at a crease L along the short side.

ラベリング処理で取得される第一画像データ及び第二画像データは、RAM23に記憶される。第一画像データ及び第二画像データは、水平方向及び鉛直方向の各サイズが所定値となる矩形の画像データである。ラベリング処理では、処理が適切に実行された場合、キャリアシート40に挟み込まれた原稿の枚数に対応する組数の第一画像データ及び第二画像データが取得される。例えば、1枚のレシートが、キャリアシート40に挟み込まれていたとする(図2参照)。ラベリング処理では、1組の第一画像データ及び第二画像データが取得される。この場合、CPU21は、ラベル数「1」を取得する。   The first image data and the second image data acquired by the labeling process are stored in the RAM 23. The first image data and the second image data are rectangular image data in which the horizontal and vertical sizes have predetermined values. In the labeling process, when the process is appropriately executed, a set number of first image data and second image data corresponding to the number of documents sandwiched between the carrier sheets 40 are acquired. For example, assume that one receipt is sandwiched between carrier sheets 40 (see FIG. 2). In the labeling process, a set of first image data and second image data is acquired. In this case, the CPU 21 acquires the number of labels “1”.

上述した例とは異なり、2枚のレシートが、キャリアシート40に挟み込まれていたとする。ラベリング処理では、2組の第一画像データ及び第二画像データが取得される。この場合、CPU21は、ラベル数「2」を取得する。更に、1枚のレシートと1枚の葉書が、キャリアシート40に挟み込まれていたとする。ラベリング処理では、2組の第一画像データ及び第二画像データが取得される。この場合、CPU21は、ラベル数「2」を取得する。葉書は、短辺の第二サイズがレシートの短辺の第二サイズより大きい原稿である。例えば、レシートの短辺の最大サイズは、80mmで、葉書の短辺は、100mmである。更に、2枚の葉書が、キャリアシート40に挟み込まれていたとする。ラベリング処理では、2組の第一画像データ及び第二画像データが取得される。この場合、CPU21は、ラベル数「2」を取得する。   Unlike the example described above, it is assumed that two receipts are sandwiched between carrier sheets 40. In the labeling process, two sets of first image data and second image data are acquired. In this case, the CPU 21 acquires the label number “2”. Furthermore, it is assumed that one receipt and one postcard are sandwiched between carrier sheets 40. In the labeling process, two sets of first image data and second image data are acquired. In this case, the CPU 21 acquires the label number “2”. A postcard is a document in which the second size on the short side is larger than the second size on the short side of the receipt. For example, the maximum size of the short side of the receipt is 80 mm, and the short side of the postcard is 100 mm. Furthermore, it is assumed that two postcards are sandwiched between the carrier sheets 40. In the labeling process, two sets of first image data and second image data are acquired. In this case, the CPU 21 acquires the label number “2”.

この他、A3サイズの資料が、二つ折りにされた状態で、キャリアシート40に挟み込まれていたとする。ラベリング処理では、1組の第一画像データ及び第二画像データが取得される。この場合、CPU21は、ラベル数「1」を取得する。即ち、CPU21は、ラベル処理によって取得された第一画像データ及び第二画像データの組数に一致する数を、ラベル数とする。ラベリング処理が適切に実行されず、第一画像データのみが取得されたとする。この場合、CPU21は、取得された第一画像データの数を、ラベル数とする。S15で実行されるラベリング処理は、公知の処理である。S15では、公知のラベリング処理技術を採用することができる。従って、ラベリング処理の詳細については省略する。   In addition, it is assumed that the A3 size material is sandwiched between the carrier sheets 40 in a folded state. In the labeling process, a set of first image data and second image data is acquired. In this case, the CPU 21 acquires the number of labels “1”. That is, the CPU 21 sets the number that matches the number of sets of the first image data and the second image data acquired by the label processing as the number of labels. It is assumed that the labeling process is not properly executed and only the first image data is acquired. In this case, the CPU 21 sets the number of acquired first image data as the number of labels. The labeling process executed in S15 is a known process. In S15, a known labeling processing technique can be employed. Therefore, the details of the labeling process are omitted.

S15を実行した後、CPU21は、取得されたラベル数を繰返数に設定する(S17)。繰返数は、S19〜S67(図6参照)の処理を繰り返す数である。画像処理では、同一の原稿に対応する1組の第一画像データ及び第二画像データは、まとめて取り扱われる。但し、第一面データを対象としたラベリング処理、又は第二面データを対象としたラベリング処理の何れか一方が適切に実行されないこともある。このような場合、画像処理では、適切に行われたラベリング処理により取得された画像データが、単独で取り扱われる。実施形態では、適切に実行されないことがあるラベリング処理は、第二面データを対象としたラベリング処理であるとする。   After executing S15, the CPU 21 sets the acquired number of labels as the number of repetitions (S17). The number of repetitions is a number for repeating the processing of S19 to S67 (see FIG. 6). In image processing, a set of first image data and second image data corresponding to the same document are handled together. However, either the labeling process for the first surface data or the labeling process for the second surface data may not be executed properly. In such a case, in the image processing, the image data acquired by the appropriately performed labeling processing is handled alone. In the embodiment, it is assumed that the labeling process that may not be performed properly is a labeling process for the second surface data.

CPU21は、S15におけるラベリング処理によって取得された第一画像データのうち、未処理の第一画像データを処理対象として選択する(S19)。このとき、CPU21は、カウンタを1アップする。続けて、CPU21は、処理対象として選択された第一画像データの短辺の短辺サイズを取得する(S21)。ラベリング処理で、1組の第一画像データ及び第二画像データが取得されていたとする。1組の第一画像データ及び第二画像データは、1枚の原稿に対応する画像データである。そのため、1組の第一画像データ及び第二画像データでは、各短辺の短辺サイズは同一となる。   CPU21 selects unprocessed 1st image data as a process target among the 1st image data acquired by the labeling process in S15 (S19). At this time, the CPU 21 increases the counter by one. Subsequently, the CPU 21 acquires the short side size of the short side of the first image data selected as the processing target (S21). It is assumed that a set of first image data and second image data has been acquired in the labeling process. One set of first image data and second image data is image data corresponding to one original. Therefore, the short side size of each short side is the same in one set of first image data and second image data.

次に、CPU21は、S19で取得された短辺サイズが基準サイズ以下であるかを判断する(S23)。S23は、キャリアシート40に挟み込まれた原稿が、レシートであることを特定しようとする処理である。従って、基準サイズは、市販等されている公知のレシートの短辺のサイズを考慮して予め設定される。ここで、公知のレシートでは、その短辺のサイズは、定型化されている。従って、基準サイズとしては、例えば、公知のレシートにおいて定型化された幅の最大寸法が設定される。例えば、基準サイズは、80mmに設定される。基準サイズは、キャリアシート40が主走査方向に対して傾いた状態で搬送される場合があること、及び/又はキャリアシート40にレシートが傾いた状態(図2下段の「角度θ」参照)で挟み込まれる場合があること等を考慮し、前述した最大寸法より大きな寸法に設定するようにしてもよい。但し、この場合、基準サイズは、例えば、葉書等と区別可能で、レシートを特定できるサイズとされる。基準サイズは、画像処理のプログラムに登録されている。短辺サイズが基準サイズ以下である場合(S23:Yes)、CPU21は、処理を図5のS31に移行する。実施形態では、S23が肯定(S23:Yes参照)される原稿は、レシートである。   Next, the CPU 21 determines whether or not the short side size acquired in S19 is equal to or smaller than the reference size (S23). S23 is a process for specifying that the document sandwiched between the carrier sheets 40 is a receipt. Accordingly, the reference size is set in advance in consideration of the size of the short side of a known receipt that is commercially available. Here, in the known receipt, the size of the short side is standardized. Therefore, as the reference size, for example, the maximum dimension of the width standardized in a known receipt is set. For example, the reference size is set to 80 mm. The reference size may be that the carrier sheet 40 may be transported in an inclined state with respect to the main scanning direction and / or the receipt is inclined to the carrier sheet 40 (see “angle θ” in the lower part of FIG. 2). Considering the possibility of being caught, the dimension may be set larger than the maximum dimension described above. However, in this case, the reference size is, for example, a size that can be distinguished from a postcard or the like and can specify a receipt. The reference size is registered in the image processing program. When the short side size is equal to or smaller than the reference size (S23: Yes), the CPU 21 proceeds to S31 in FIG. In the embodiment, the document on which S23 is affirmed (see S23: Yes) is a receipt.

短辺サイズが基準サイズ以下でない場合(S23:No)、CPU21は、繰返数が「1」に設定されているかを判断する(S25)。例えば、キャリアシート40に2枚の葉書が挟み込まれていたとする。この場合、ラベル数は2枚の葉書に対応して「2」となり、S17では、繰返数「2」が設定されている。この他、キャリアシート40に1枚のレシートと1枚の葉書が挟み込まれており、S19で葉書に対応する第一画像データが処理対象として選択されているとする。この場合、ラベル数は「2」となり、S17では、繰返数「2」が設定されている。CPU21は、繰返数が「1」でない場合(S25:No)、処理を図6のS63に移行する。   When the short side size is not equal to or smaller than the reference size (S23: No), the CPU 21 determines whether the number of repetitions is set to “1” (S25). For example, assume that two postcards are sandwiched between carrier sheets 40. In this case, the number of labels is “2” corresponding to two postcards, and the number of repetitions “2” is set in S17. In addition, it is assumed that one receipt and one postcard are sandwiched in the carrier sheet 40, and the first image data corresponding to the postcard is selected as a processing target in S19. In this case, the number of labels is “2”, and the number of repetitions “2” is set in S17. If the number of repetitions is not “1” (S25: No), the CPU 21 proceeds to S63 in FIG.

読取媒体が二つ折りにされたA3サイズの原稿が挟み込まれたキャリアシート40であったとする。この場合、ラベル数は「1」となり、S17では、繰返数「1」が設定されている。繰返数が「1」に設定されている場合(S25:Yes)、CPU21は、合成位置として、第一画像データ及び第二画像データの各長辺を決定する(S27)。合成位置として決定される第一画像データ及び第二画像データの各長辺は、A3の原稿を二つ折りしたときの折り目に一致する。   Suppose that the reading medium is a carrier sheet 40 in which an A3 size original folded in two is sandwiched. In this case, the number of labels is “1”, and the number of repetitions “1” is set in S17. When the number of repetitions is set to “1” (S25: Yes), the CPU 21 determines the long sides of the first image data and the second image data as the synthesis position (S27). The long sides of the first image data and the second image data determined as the synthesis position coincide with the fold when the A3 document is folded in half.

続けて、CPU21は、第二合成データを生成する(S29)。第二合成データは、S27で決定された第一画像データ及び第二画像データの各長辺を一致させた状態で、第一画像データと第二画像データを合成した画像データである。第二合成データは、RAM23に記憶される。S27とS29では、キャリアシート40を用いたスキャンにおいて既に実用化されている合成処理技術を採用することができる。従って、S27とS29に関するこの他の説明は省略する。第二画像データが白紙データである場合、後述する図5のS33が否定(S33:No参照)されると、図5のS37が未実行とされる処理手順と同様、S29は省略するようにしてもよい。白紙データについては後述する。その後、CPU21は、処理を図6のS63に移行する。   Subsequently, the CPU 21 generates second composite data (S29). The second composite data is image data obtained by combining the first image data and the second image data in a state where the long sides of the first image data and the second image data determined in S27 are matched. The second composite data is stored in the RAM 23. In S27 and S29, a composition processing technique that has already been put into practical use in scanning using the carrier sheet 40 can be employed. Therefore, the other description regarding S27 and S29 is abbreviate | omitted. When the second image data is blank paper data, if S33 in FIG. 5 described later is negative (see S33: No), S29 in FIG. 5 is omitted as in the processing procedure in which S37 is not executed. May be. The blank data will be described later. Thereafter, the CPU 21 shifts the processing to S63 in FIG.

図5のS31でCPU21は、第二画像データがRAM23に記憶されているかを判断する。第二画像データは、図3のS19で処理対象として選択された第一画像データに対応する画像データである。この判断は、S15で、第二面データを対象としたラベリング処理が適切に実行されておらず、第二画像データがRAM23に記憶されていない場合に対応する処理である。第二画像データが記憶されていない場合(S31:No)、CPU21は、処理をS39に移行する。第二画像データが記憶されている場合(S33:Yes)、CPU21は、第二画像データが白紙データであるかを判断する(S33)。白紙データは、各画素の色情報に基づき、文字を含む所定の情報を含まない白紙領域であると判断されるデータである。例えば、キャリアシート40に挟み込まれたレシートにおいて、キャリアシート40の第二面の側となったレシートの第二領域には、何も記録されていないとする。このような場合、第二画像データは、白紙データとなる。レシートが二つ折りにされておらず、キャリアシート40の第二面の側となるレシートの面が白紙である場合も、第二画像データは、白紙データとなる。第二画像データが白紙データである場合(S33:Yes)、CPU21は、処理をS39に移行する。   In S <b> 31 of FIG. 5, the CPU 21 determines whether the second image data is stored in the RAM 23. The second image data is image data corresponding to the first image data selected as a processing target in S19 of FIG. This determination is a process corresponding to the case where the labeling process for the second surface data is not properly executed and the second image data is not stored in the RAM 23 in S15. When the second image data is not stored (S31: No), the CPU 21 proceeds to S39. When the second image data is stored (S33: Yes), the CPU 21 determines whether the second image data is blank paper data (S33). The blank page data is data that is determined to be a blank page area that does not include predetermined information including characters based on the color information of each pixel. For example, in the receipt sandwiched between the carrier sheets 40, it is assumed that nothing is recorded in the second area of the receipt on the second surface side of the carrier sheet 40. In such a case, the second image data is blank paper data. Even when the receipt is not folded in half and the side of the receipt on the second side of the carrier sheet 40 is a blank sheet, the second image data is blank sheet data. If the second image data is blank paper data (S33: Yes), the CPU 21 proceeds to S39.

第二画像データが白紙データでない場合(S33:No)、CPU21は、合成位置として、第一画像データ及び第二画像データの各短辺を決定する(S35)。合成位置として決定される第一画像データ及び第二画像データの各短辺は、レシートを二つ折りしたときの折り目Lに一致する。図3に示す符号「P」を付した破線は、レシートに記録された情報ではなく、前述したレシートの折り目Lとなる位置を明示するものである。続けて、CPU21は、第一合成データを生成する(S37)。第一合成データは、S35で決定された第一画像データ及び第二画像データの各短辺を一致させた状態で、第一画像データと第二画像データを合成した画像データである。第一合成データは、RAM23に記憶される。S37では、公知の合成処理技術を採用することができる。従って、合成処理の詳細については省略する。その後、CPU21は、処理をS39に移行する。   When the second image data is not blank paper data (S33: No), the CPU 21 determines each short side of the first image data and the second image data as the synthesis position (S35). Each short side of the first image data and the second image data determined as the synthesis position coincides with the crease L when the receipt is folded in half. The broken line with the symbol “P” shown in FIG. 3 clearly indicates the position of the receipt fold L, not the information recorded on the receipt. Subsequently, the CPU 21 generates first composite data (S37). The first combined data is image data obtained by combining the first image data and the second image data in a state where the short sides of the first image data and the second image data determined in S35 are matched. The first composite data is stored in the RAM 23. In S37, a known synthesis processing technique can be employed. Therefore, the details of the synthesis process are omitted. Thereafter, the CPU 21 shifts the processing to S39.

S39でCPU21は、第一画像データ又は第一合成データの短辺サイズを取得する。CPU21は、S31が否定された場合(S31:No参照)、又はS33が肯定された場合(S33:Yes参照)、第一画像データの短辺サイズを取得する。CPU21は、S37が実行された場合、第一合成データの短辺サイズを取得する。第一合成データの短辺サイズは、合成前の第一画像データの短辺サイズに一致する。従って、第一合成データの短辺サイズは、実質的には、合成前の第一画像データの短辺サイズということもできる。続けて、CPU21は、取得された短辺サイズが、第一画像データ又は第一合成データの水平方向のサイズであるかを判断する(S41)。第一画像データ又は第一合成データの水平方向は、スキャナ装置30におけるスキャンの主走査方向(図2参照)に一致する。   In S39, the CPU 21 acquires the short side size of the first image data or the first composite data. When S31 is denied (see S31: No) or when S33 is affirmed (see S33: Yes), the CPU 21 acquires the short side size of the first image data. When S37 is executed, the CPU 21 acquires the short side size of the first composite data. The short side size of the first composite data matches the short side size of the first image data before composition. Therefore, the short side size of the first composite data can be substantially referred to as the short side size of the first image data before the composition. Subsequently, the CPU 21 determines whether the acquired short side size is the horizontal size of the first image data or the first composite data (S41). The horizontal direction of the first image data or the first composite data coincides with the main scanning direction of scanning in the scanner device 30 (see FIG. 2).

短辺サイズが水平方向のサイズでない場合(S41:No)、CPU21は、処理を図6のS51に移行する。短辺サイズが水平方向のサイズである場合(S41:Yes)、CPU21は、読取パターンが鉛直方向に設定されたOCR処理を実行する(S43)。読取パターンが鉛直方向に設定されたOCR処理では、第一画像データ又は第一合成データが、鉛直方向の下側から上側にOCR処理され、更に、鉛直方向の上側から下側にOCR処理される。鉛直方向の下側から上側にOCR処理することは、第一画像データ又は第一合成データを180°回転した後に、鉛直方向の上側から下側にOCR処理を行うことに等価である。第一画像データ又は第一合成データの鉛直方向は、副走査方向に一致する。副走査方向は、主走査方向に直交する方向であって、搬送部34によってキャリアシート40が搬送される方向に対応する。CPU21は、S43におけるOCR処理のプロセスから、第一パラメータ値と第二パラメータ値を取得する。第一パラメータ値は、読取パターンを鉛直方向の下側から上側とした場合の認識結果の信頼度を示すパラメータの値である。第二パラメータ値は、読取パターンを鉛直方向の上側から下側とした場合の認識結果の信頼度を示すパラメータの値である。OCR処理は、公知の処理であり、S43及び後述する図6のS51では、公知のOCR処理技術が採用される。従って、OCR処理の詳細については省略する。   If the short side size is not the horizontal size (S41: No), the CPU 21 proceeds to S51 in FIG. When the short side size is the horizontal size (S41: Yes), the CPU 21 executes the OCR process in which the reading pattern is set in the vertical direction (S43). In the OCR process in which the reading pattern is set in the vertical direction, the first image data or the first composite data is subjected to the OCR process from the lower side to the upper side in the vertical direction, and further, the OCR process is performed from the upper side to the lower side in the vertical direction. . Performing OCR processing from the lower side to the upper side in the vertical direction is equivalent to performing OCR processing from the upper side to the lower side in the vertical direction after rotating the first image data or the first composite data by 180 °. The vertical direction of the first image data or the first composite data matches the sub-scanning direction. The sub-scanning direction is a direction orthogonal to the main scanning direction and corresponds to the direction in which the carrier sheet 40 is conveyed by the conveyance unit 34. The CPU 21 acquires the first parameter value and the second parameter value from the OCR process in S43. The first parameter value is a parameter value indicating the reliability of the recognition result when the reading pattern is from the lower side to the upper side in the vertical direction. The second parameter value is a parameter value indicating the reliability of the recognition result when the reading pattern is changed from the upper side to the lower side in the vertical direction. The OCR process is a known process, and a known OCR process technique is employed in S43 and S51 in FIG. Therefore, the details of the OCR process are omitted.

続けて、CPU21は、第一パラメータ値が第二パラメータ値より大きいかを判断する(S45)。第一パラメータ値が第二パラメータ値より大きい場合(S45:Yes)、CPU21は、回転量として上下回転を決定する(S47)。第一パラメータ値が第二パラメータ値より大きくない、即ち、第一パラメータ値が第二パラメータ値以下である場合(S45:No)、CPU21は、回転量として未回転を決定する(S49)。S47又はS49を実行した後、CPU21は、処理を図6のS59に移行する。   Subsequently, the CPU 21 determines whether the first parameter value is larger than the second parameter value (S45). When the first parameter value is larger than the second parameter value (S45: Yes), the CPU 21 determines vertical rotation as the rotation amount (S47). When the first parameter value is not larger than the second parameter value, that is, when the first parameter value is equal to or smaller than the second parameter value (S45: No), the CPU 21 determines non-rotation as the rotation amount (S49). After executing S47 or S49, the CPU 21 shifts the processing to S59 of FIG.

図6のS51でCPU21は、読取パターンが水平方向に設定されたOCR処理を実行する。読取パターンが水平方向に設定されたOCR処理では、第一画像データ又は第一合成データが、水平方向の左側から右側にOCR処理され、更に、水平方向の右側から左側にOCR処理される。水平方向の左側から右側にOCR処理することは、第一画像データ又は第一合成データを右回りに90°回転した後に、鉛直方向の上側から下側にOCR処理を行うことに等価である。水平方向の右側から左側にOCR処理することは、第一画像データ又は第一合成データを左回りに90°回転した後に、鉛直方向の上側から下側にOCR処理を行うことに等価である。CPU21は、S51におけるOCR処理のプロセスから、第三パラメータ値と第四パラメータ値を取得する。第三パラメータ値は、読取パターンを水平方向の左側から右側とした場合の認識結果の信頼度を示すパラメータの値である。第四パラメータ値は、読取パターンを水平方向の右側から左側とした場合の認識結果の信頼度を示すパラメータの値である。   In S51 of FIG. 6, the CPU 21 executes an OCR process in which the reading pattern is set in the horizontal direction. In the OCR process in which the reading pattern is set in the horizontal direction, the first image data or the first composite data is subjected to the OCR process from the left side in the horizontal direction to the right side, and further, the OCR process is performed from the right side in the horizontal direction to the left side. Performing OCR processing from the left side to the right side in the horizontal direction is equivalent to performing OCR processing from the upper side to the lower side in the vertical direction after the first image data or the first composite data is rotated 90 ° clockwise. Performing OCR processing from the right side to the left side in the horizontal direction is equivalent to performing OCR processing from the upper side to the lower side in the vertical direction after rotating the first image data or the first composite data by 90 ° counterclockwise. The CPU 21 acquires the third parameter value and the fourth parameter value from the OCR process in S51. The third parameter value is a parameter value indicating the reliability of the recognition result when the reading pattern is changed from the left side to the right side in the horizontal direction. The fourth parameter value is a parameter value indicating the reliability of the recognition result when the reading pattern is changed from the right side to the left side in the horizontal direction.

続けて、CPU21は、第三パラメータ値が第四パラメータ値より大きいかを判断する(S53)。第三パラメータ値が第四パラメータ値より大きい場合(S53:Yes)、CPU21は、回転量として、水平方向が鉛直方向となる右回りの量を決定する(S55)。第三パラメータ値が第四パラメータ値より大きくない、即ち、第三パラメータ値が第四パラメータ以下である場合(S53:No)、CPU21は、回転量として、水平方向が鉛直方向となる左回りの量を決定する(S57)。S55又はS57を実行した後、CPU21は、処理をS59に移行する。   Subsequently, the CPU 21 determines whether the third parameter value is larger than the fourth parameter value (S53). When the third parameter value is larger than the fourth parameter value (S53: Yes), the CPU 21 determines a clockwise amount in which the horizontal direction is the vertical direction as the rotation amount (S55). When the third parameter value is not larger than the fourth parameter value, that is, when the third parameter value is equal to or smaller than the fourth parameter (S53: No), the CPU 21 sets the rotation amount in the counterclockwise direction in which the horizontal direction is the vertical direction. The amount is determined (S57). After executing S55 or S57, the CPU 21 shifts the processing to S59.

S59でCPU21は、第一画像データ又は第一合成データを対象とした回転処理を実行する。図5のS47で回転量として、上下回転が決定されていたとする。この場合、CPU21は、第一画像データ又は第一合成データの上下を回転(例えば、180°回転)させた画像データを新たに生成する。図5のS49で回転量として、未回転が決定されていたとする。この場合、CPU21は、回転処理を実行しない。S55で回転量として、水平方向が鉛直方向となる右回りの量が決定されていたとする。この場合、CPU21は、第一画像データ又は第一合成データの水平方向が鉛直方向となる量だけ、第一画像データ又は第一合成データを右回りに回転(例えば、右回りに90°回転)させた画像データを新たに生成する。S57で回転量として、水平方向が鉛直方向となる左回りの量が決定されていたとする。この場合、CPU21は、第一画像データ又は第一合成データの水平方向が鉛直方向となる量だけ、第一画像データ又は第一合成データを左回りに回転(例えば、左回りに90°回転)させた画像データを新たに生成する。S59で実行される回転処理は、公知の処理である。S59では、公知の回転処理技術を採用することができる。従って、回転処理の詳細については省略する。その後、CPU21は、処理をS61に移行する。図5のS49で回転量が未回転に決定されていた場合、CPU21は、実質的には、S59を未実行とし、或いは、第一画像データ又は第一合成データを、回転処理を適用することなくそのままコピーした画像データを新たに生成し、処理をS61に移行する。即ち、CPU21は、図5のS49を実行した後、処理をS61に移行する。   In S59, the CPU 21 executes a rotation process for the first image data or the first composite data. It is assumed that vertical rotation is determined as the rotation amount in S47 of FIG. In this case, the CPU 21 newly generates image data obtained by rotating the top and bottom of the first image data or the first composite data (for example, 180 ° rotation). Assume that non-rotation is determined as the rotation amount in S49 of FIG. In this case, the CPU 21 does not execute the rotation process. It is assumed that a clockwise amount in which the horizontal direction is the vertical direction is determined as the rotation amount in S55. In this case, the CPU 21 rotates the first image data or the first combined data clockwise by an amount such that the horizontal direction of the first image data or the first combined data is the vertical direction (for example, rotated 90 ° clockwise). The generated image data is newly generated. It is assumed that a counterclockwise amount in which the horizontal direction is the vertical direction is determined as the rotation amount in S57. In this case, the CPU 21 rotates the first image data or the first combined data counterclockwise by an amount in which the horizontal direction of the first image data or the first combined data is the vertical direction (for example, rotated 90 ° counterclockwise). The generated image data is newly generated. The rotation process executed in S59 is a known process. In S59, a known rotation processing technique can be employed. Therefore, the details of the rotation process are omitted. Thereafter, the CPU 21 shifts the processing to S61. When the rotation amount is determined to be non-rotated in S49 of FIG. 5, the CPU 21 substantially does not execute S59, or applies the rotation process to the first image data or the first composite data. Instead, image data copied as it is is newly generated, and the process proceeds to S61. That is, after executing S49 of FIG. 5, the CPU 21 shifts the process to S61.

S61でCPU21は、傾き補正処理を実行する。傾き補正処理の対象となる傾きは、スキャナ装置30でのスキャンの際に生じる。即ち、この傾きは、例えば、キャリアシート40が主走査方向に対して傾いた状態で搬送されることで生じる。この他、原稿が主走査方向に対して傾いた状態でキャリアシート40に挟み込まれることで生じる。図2下段では、原稿としてのレシートが、主走査方向に対して角度θだけ傾いた状態でキャリアシート40に挟み込まれている状態が図示されている。   In S61, the CPU 21 executes an inclination correction process. The tilt that is the target of the tilt correction process is generated when the scanner device 30 scans. In other words, this inclination occurs, for example, when the carrier sheet 40 is conveyed while being inclined with respect to the main scanning direction. In addition, this occurs when the document is sandwiched between the carrier sheets 40 while being inclined with respect to the main scanning direction. The lower part of FIG. 2 shows a state in which a receipt as a document is sandwiched between carrier sheets 40 in an inclined state with respect to the main scanning direction by an angle θ.

図5のS41とS45が共に肯定されていた場合(S41,S45:Yes参照)、傾き補正処理は、S59で上下が回転された第一画像データ又は第一合成データを対象として実行される。図5のS41が否定されていた場合(S41:No参照)、傾き補正処理は、S59で右回り又は左回りに所定量だけ回転された第一画像データ又は第一合成データを対象として実行される。例えば、第一合成データに対応するレシートの画像に含まれる文字が、水平方向に対して傾いていたとする。傾き補正処理によれば、第一合成データを、前述した文字が水平方向に配置された状態の画像データに補正することができる。   If both S41 and S45 in FIG. 5 are affirmed (see S41, S45: Yes), the inclination correction process is executed on the first image data or the first composite data whose upper and lower sides are rotated in S59. If S41 in FIG. 5 is negative (see S41: No), the inclination correction process is executed on the first image data or the first composite data rotated by a predetermined amount clockwise or counterclockwise in S59. The For example, it is assumed that characters included in the receipt image corresponding to the first composite data are inclined with respect to the horizontal direction. According to the inclination correction process, the first composite data can be corrected to image data in a state where the above-described characters are arranged in the horizontal direction.

第一画像データ又は第一合成データが傾きが発生していない状態である、又は第一画像データ又は第一合成データに発生している傾きが所定値以下であることもある。この場合、傾き補正処理の前後において、これら画像データに変化は生じず、又は画像データの変化量は極僅かである。従って、第一画像データ又は第一合成データが傾きが発生していない状態である、又は第一画像データ又は第一合成データに発生している傾きが所定値以下であることが特定された場合、S61は、省略するようにしてもよい。S61で実行される傾き補正処理は、公知の処理である。S61では、公知の傾き補正処理技術を採用することができる。従って、傾き補正処理の詳細については省略する。   The first image data or the first composite data may be in a state where no tilt occurs, or the tilt generated in the first image data or the first composite data may be a predetermined value or less. In this case, there is no change in the image data before and after the inclination correction process, or the change amount of the image data is very small. Therefore, when it is specified that the first image data or the first combined data is in a state where no inclination occurs, or the inclination generated in the first image data or the first combined data is equal to or less than a predetermined value. , S61 may be omitted. The tilt correction process executed in S61 is a known process. In S61, a known tilt correction processing technique can be employed. Therefore, the details of the inclination correction process are omitted.

実施形態では、S59で回転処理が実行され、且つS61で傾き補正処理が実行された後の画像データ、又はS61で傾き補正処理が実行された後の画像データの名称は、各処理の対象とされた画像データの名称のままとする。即ち、第一画像データを対象として、S59で回転処理が実行され、且つS61で傾き補正処理が実行され、又はS59で回転処理が実行されずに、S61で傾き補正処理が実行されていたとする。この場合、傾き補正処理後の画像データは、処理前と同じく、「第一画像データ」という。第一合成データを対象として、S59で回転処理が実行され、且つS61で傾き補正処理が実行され、又はS59で回転処理が実行されずに、S61で傾き補正処理が実行されていたとする。この場合、傾き補正処理後の画像データは、処理前と同じく、「第一合成データ」という。   In the embodiment, the name of the image data after the rotation process is executed in S59 and the inclination correction process is executed in S61 or the image data after the inclination correction process is executed in S61 is the target of each process. The name of the processed image data is used. That is, for the first image data, the rotation process is executed in S59 and the inclination correction process is executed in S61, or the rotation correction process is not executed in S59 and the inclination correction process is executed in S61. . In this case, the image data after the inclination correction process is referred to as “first image data” as before the process. It is assumed that the rotation process is executed in S59 and the inclination correction process is executed in S61 or the inclination correction process is executed in S61 without executing the rotation process in S59 for the first composite data. In this case, the image data after the inclination correction process is referred to as “first composite data” as before the process.

次に、CPU21は、第二合成データ、第一画像データ又は第一合成データの表示を制御する(S63)。即ち、CPU21は、第二合成データ、第一画像データ又は第一合成データの表示指令を表示部24に出力する。これに伴い、表示部24では、第二合成データ、第一画像データ又は第一合成データに対応する画像が表示される。例えば、図2下段に示すような状態のキャリアシート40が、スキャナ装置30でスキャンされていたとする。この場合、表示部24では、図3に示すようなレシートの全体(図3の「<折り曲げ前(レシート全体)>」参照)が表示される。   Next, the CPU 21 controls display of the second composite data, the first image data, or the first composite data (S63). That is, the CPU 21 outputs a display command for the second composite data, the first image data, or the first composite data to the display unit 24. Accordingly, the display unit 24 displays an image corresponding to the second composite data, the first image data, or the first composite data. For example, it is assumed that the carrier sheet 40 in the state shown in the lower part of FIG. In this case, the display unit 24 displays the entire receipt as shown in FIG. 3 (refer to “<Before folding (the entire receipt)>” in FIG. 3).

続けて、CPU21は、カウンタのカウント数と図4のS17で設定された繰返数が一致するかを判断する(S65)。カウント数と繰返数が一致しない場合(S65:No)、CPU21は、処理を図4のS19に戻す。その後、CPU21は、S19以降の処理を繰り返して実行する。カウント数と繰返数が一致する場合(S65:Yes)、CPU21は、画像処理を終了する。   Subsequently, the CPU 21 determines whether or not the count number of the counter matches the repetition number set in S17 of FIG. 4 (S65). When the count number does not match the repeat number (S65: No), the CPU 21 returns the process to S19 of FIG. Thereafter, the CPU 21 repeatedly executes the processes after S19. When the count number and the repetition number match (S65: Yes), the CPU 21 ends the image processing.

<実施形態の効果>
上述した実施形態によれば、次のような効果を得ることができる。
<Effect of embodiment>
According to the embodiment described above, the following effects can be obtained.

(1)図4〜図6に示す画像処理では、ラベリング処理が実行される(図4のS15参照)。ラベリング処理では、キャリアシート40の第一面に対応する第一面データから第一画像データが取得され、キャリアシート40の第二面に対応する第二面データから第二画像データが取得される。その後、第一画像データの短辺サイズが基準サイズ以下であるかが判断される(図4のS23参照)。第一画像データの短辺サイズが基準サイズ以下である場合(図4のS23:Yes参照)、第一画像データと第二画像データが各画像データの短辺で合成され、第一合成データが生成される(図5のS37参照)。第一合成データは、OCR処理の対象とされる(図5のS43又は図6のS51参照)。画像処理では、OCR処理の認識結果の信頼度を示すパラメータ値に応じて、第一合成データの回転量が適宜決定され(図5のS47、又は図6のS55若しくはS57参照)、回転処理が実行される(図6のS59参照)。これに対して、第一画像データの短辺サイズが基準サイズより大きい場合(図4のS23:Yes参照)、第一画像データと第二画像データが各画像データの長辺で合成され、第二合成データが生成される(図4のS29参照)。この場合、第二合成データは、OCR処理の対象とはされず、回転量も決定されない(図5のS31〜図6のS57未実行参照)。その結果、回転処理も実行されない(図6のS59未実行参照)。   (1) In the image processing shown in FIGS. 4 to 6, a labeling process is executed (see S15 in FIG. 4). In the labeling process, first image data is acquired from the first surface data corresponding to the first surface of the carrier sheet 40, and second image data is acquired from the second surface data corresponding to the second surface of the carrier sheet 40. . Thereafter, it is determined whether the short side size of the first image data is equal to or smaller than the reference size (see S23 of FIG. 4). When the short side size of the first image data is equal to or smaller than the reference size (see S23 in FIG. 4: Yes), the first image data and the second image data are combined at the short side of each image data, and the first combined data is Is generated (see S37 in FIG. 5). The first composite data is subjected to OCR processing (see S43 in FIG. 5 or S51 in FIG. 6). In the image processing, the rotation amount of the first composite data is appropriately determined according to the parameter value indicating the reliability of the recognition result of the OCR processing (see S47 in FIG. 5 or S55 or S57 in FIG. 6), and the rotation processing is performed. This is executed (see S59 in FIG. 6). On the other hand, when the short side size of the first image data is larger than the reference size (see S23 in FIG. 4: Yes), the first image data and the second image data are combined on the long side of each image data, Two-composition data is generated (see S29 in FIG. 4). In this case, the second composite data is not subjected to OCR processing, and the rotation amount is not determined (see S31 in FIG. 5 to S57 not executed in FIG. 6). As a result, the rotation process is not executed (see S59 not executed in FIG. 6).

そのため、画像処理装置20において、キャリアシート40に二つ折りにされて挟み込まれた原稿のタイプを自動的に判断し、各原稿のタイプに応じた合成を実行することができる。例えば、レシートとA3サイズの資料があり、何れかの原稿がキャリアシート40に二つ折りにされた状態で挟み込まれることがあるとする。このような場合、画像処理装置20の側で、キャリアシート40に挟み込まれた原稿が、レシートであるか、A3サイズの資料であるかが自動的に判断され、レシートに応じた合成と、A3サイズの資料に応じた合成を自動的に実行することができる。OCR処理の認識結果の信頼度を示すパラメータ値に応じて、回転量を決定することで、レシートに対応する第一合成データにおいて、文字の向きを正しい向きとすることができる。第一合成データにおいて、水平方向及び鉛直方向の向きを、実際のレシートの正しい向きに一致させることができる。画像処理装置20の操作性を向上させることができる。画像処理装置20では、ユーザフレンドリーな画像処理の手順が実現される。   For this reason, the image processing apparatus 20 can automatically determine the type of the document that is folded in half and sandwiched between the carrier sheets 40, and can perform composition according to the type of each document. For example, it is assumed that there is a receipt and an A3 size document, and one of the documents is sandwiched between the carrier sheet 40 in a folded state. In such a case, the image processing apparatus 20 automatically determines whether the original document sandwiched between the carrier sheets 40 is a receipt or an A3 size document. Synthesis according to the size data can be automatically executed. By determining the rotation amount according to the parameter value indicating the reliability of the recognition result of the OCR process, the character direction can be set to the correct direction in the first composite data corresponding to the receipt. In the first composite data, the horizontal direction and the vertical direction can be matched with the correct direction of the actual receipt. The operability of the image processing apparatus 20 can be improved. In the image processing apparatus 20, a user-friendly image processing procedure is realized.

(2)画像処理では、第一画像データの短辺サイズが基準サイズ以下であっても(図4のS23:Yes参照)、第二画像データが白紙データである場合(図5のS33:Yes参照)、第一画像データと第二画像データは、合成されない(図5のS37未実行参照)。この場合、第一画像データがOCR処理の対象とされる(図5のS43又は図6のS51参照)。画像処理では、OCR処理の認識結果の信頼度を示すパラメータ値に応じて、第一画像データの回転量が適宜決定され(図5のS47、又は図6のS55若しくはS57参照)、回転処理が実行される(図6のS59参照)。そのため、白紙データを含む第一合成データが生成されることを抑制することができる。   (2) In the image processing, even if the short side size of the first image data is equal to or less than the reference size (see S23 in FIG. 4), the second image data is blank paper data (S33 in FIG. 5: Yes). The first image data and the second image data are not combined (see S37 not executed in FIG. 5). In this case, the first image data is the target of OCR processing (see S43 in FIG. 5 or S51 in FIG. 6). In the image processing, the rotation amount of the first image data is appropriately determined according to the parameter value indicating the reliability of the recognition result of the OCR processing (see S47 in FIG. 5 or S55 or S57 in FIG. 6), and the rotation processing is performed. This is executed (see S59 in FIG. 6). For this reason, it is possible to suppress the generation of the first composite data including blank paper data.

<変形例>
上述した実施形態は、次のようにすることもできる。以下に示す変形例のうちの幾つかの構成は、適宜組み合わせて採用することもできる。以下では、上記とは異なる点を説明することとし、同様の点についての説明は適宜省略する。
<Modification>
The embodiment described above can also be performed as follows. Some configurations of the modifications shown below can be appropriately combined and employed. Hereinafter, points different from the above will be described, and description of similar points will be omitted as appropriate.

(1)上記では、スキャナ装置30は、第一イメージセンサ35と、第二イメージセンサ36を備える。スキャナ装置30では、キャリアシート40の第一面が第一イメージセンサ35によってスキャンされ、キャリアシート40の第二面が第二イメージセンサ36によってスキャンされる。スキャナ装置が備えるイメージセンサは、1個とするようにしてもよい。この場合、スキャナ装置の搬送部は、公知のスキャナ装置に設けられた反転機構を備える。キャリアシート40は、第一面がスキャンされた後、搬送部において搬送経路を適宜搬送され、反転される。その後、スキャナ装置では、キャリアシート40の第二面が、第一面をスキャンしたイメージセンサによって再度スキャンされる。スキャナ装置では、このようにして、上述した第一面データと第二面データが生成される。   (1) In the above, the scanner device 30 includes the first image sensor 35 and the second image sensor 36. In the scanner device 30, the first surface of the carrier sheet 40 is scanned by the first image sensor 35, and the second surface of the carrier sheet 40 is scanned by the second image sensor 36. The scanner device may include one image sensor. In this case, the transport unit of the scanner device includes a reversing mechanism provided in a known scanner device. After the first surface is scanned, the carrier sheet 40 is appropriately transported along the transport path in the transport unit and reversed. Thereafter, in the scanner device, the second surface of the carrier sheet 40 is scanned again by the image sensor that scanned the first surface. In the scanner device, the first surface data and the second surface data described above are generated in this way.

(2)上記では、図4〜図6に示す画像処理は、スキャナ装置30と通信ケーブル11で接続された画像処理装置20で実行される。画像処理は、スキャナ装置30で実行するようにしてもよい。この場合、ユーザは、スキャナ装置30に、上記同様、キャリアシート40をセットする。その後、ユーザは、スキャナ装置30に設けられた不図示の操作部を操作し、開始指示を入力する。スキャナ装置30の操作部では、開始指示が受け付けられ、CPU31は、これを取得する。開始指示を取得したCPU31は、スキャン動作を開始させ、第一面データ及び第二面データを取得する。第一面データ及び第二面データは、RAM33に記憶される。これ以降、CPU31は、図4のS15以降の各処理に対応する処理を、上記同様に実行する。CPU31は、図4のS19に対応する処理の実行前の所定のタイミングで、カウンタを「0」に初期化する。   (2) In the above, the image processing shown in FIGS. 4 to 6 is executed by the image processing device 20 connected to the scanner device 30 by the communication cable 11. The image processing may be executed by the scanner device 30. In this case, the user sets the carrier sheet 40 in the scanner device 30 as described above. Thereafter, the user operates an operation unit (not shown) provided in the scanner device 30 and inputs a start instruction. The operation unit of the scanner device 30 receives a start instruction, and the CPU 31 acquires it. The CPU 31 having acquired the start instruction starts the scanning operation and acquires the first surface data and the second surface data. The first surface data and the second surface data are stored in the RAM 33. Thereafter, the CPU 31 executes processes corresponding to the processes after S15 in FIG. 4 in the same manner as described above. The CPU 31 initializes the counter to “0” at a predetermined timing before the execution of the process corresponding to S19 of FIG.

CPU31は、図6のS63に対応する処理において、第二合成データ、第一画像データ又は第一合成データの表示を制御する。これに伴い、スキャナ装置30では、第二合成データ、第一画像データ又は第一合成データに対応する画像が、スキャナ装置30に設けられた不図示の表示部に表示される。スキャナ装置30がメモリカードへの書き込み機能を備える場合、第二合成データ、第一画像データ又は第一合成データをメモリカードに記憶するようにしてもよい。   The CPU 31 controls the display of the second composite data, the first image data, or the first composite data in the process corresponding to S63 in FIG. Accordingly, in the scanner device 30, the second composite data, the first image data, or an image corresponding to the first composite data is displayed on a display unit (not shown) provided in the scanner device 30. When the scanner device 30 has a function of writing to a memory card, the second composite data, the first image data, or the first composite data may be stored in the memory card.

(3)上記では、白紙データを、文字を含む所定の情報を含まない白紙領域に対応する画像データとして定義した。この場合、文字を含む所定の情報を含まない白紙領域は、文字を含む所定の情報を含まない無地の領域を含む。無地は、全体が1色の領域である。無地は、無模様を含む。   (3) In the above description, the blank page data is defined as image data corresponding to a blank page area that does not include predetermined information including characters. In this case, the blank area that does not include the predetermined information including characters includes a plain area that does not include the predetermined information including characters. The plain is an area of one color as a whole. The plain includes a pattern.

(4)上記では、画像処理のS35及びS37(図5参照)で、合成位置として短辺が決定され、第一画像データと第二画像データが合成され、第一合成データが生成される。S35及びS37に対応する各処理は、例えば、図6のS61の傾き補正処理を実行した後、実行するようにしてもよい。この場合、図5のS39〜図6のS61は、第一画像データ及び第二画像データのそれぞれを対象として実行される。傾き補正処理が実行された後の第一画像データ及び第二画像データを対象として、上記同様、合成位置としての各短辺が決定される。続けて、決定された第一画像データ及び第二画像データの各短辺を一致させた状態で、第一画像データと第二画像データが合成され、第一合成データが生成される。   (4) In the above, in S35 and S37 (see FIG. 5) of the image processing, the short side is determined as the combining position, the first image data and the second image data are combined, and the first combined data is generated. Each process corresponding to S35 and S37 may be executed after the inclination correction process of S61 in FIG. 6 is executed, for example. In this case, S39 in FIG. 5 to S61 in FIG. 6 are executed for each of the first image data and the second image data. For the first image data and the second image data after the inclination correction process is executed, each short side as the synthesis position is determined as described above. Subsequently, the first image data and the second image data are synthesized in a state where the determined short sides of the first image data and the second image data coincide with each other, thereby generating first synthesized data.

(5)上記では、画像処理のS45(図5参照)の判断条件を「第一パラメータ値>第二パラメータ値」とした。この判断条件は、「第一パラメータ値<第二パラメータ値」としてもよい。CPU21は、この判断が否定される場合、処理をS47に移行し、この判断が肯定される場合、処理をS49に移行する。画像処理のS53(図6参照)の判断条件を「第三パラメータ値>第四パラメータ値」とした。この判断条件は、「第三パラメータ値<第四パラメータ値」としてもよい。CPU21は、この判断が否定される場合、処理をS55に移行し、この判断が肯定される場合、処理をS57に移行する。図5のS45又は図6のS53では、比較対象の両パラメータが等しい場合、各判断を肯定するようにしてもよい。   (5) In the above description, the determination condition in S45 of image processing (see FIG. 5) is “first parameter value> second parameter value”. This determination condition may be “first parameter value <second parameter value”. If this determination is negative, the CPU 21 proceeds to S47, and if this determination is affirmed, the CPU 21 proceeds to S49. The judgment condition of S53 (see FIG. 6) of the image processing is “third parameter value> fourth parameter value”. This determination condition may be “third parameter value <fourth parameter value”. If this determination is negative, the CPU 21 proceeds to S55, and if this determination is affirmed, the CPU 21 proceeds to S57. In S45 of FIG. 5 or S53 of FIG. 6, when both parameters to be compared are equal, each determination may be affirmed.

10 画像処理システム
11 通信ケーブル
20 画像処理装置
21 CPU
22 記憶装置
23 RAM
24 表示部
25 操作部
26 通信部
30 スキャナ装置
31 CPU
32 記憶装置
33 RAM
34 搬送部
35 第一イメージセンサ
36 第二イメージセンサ
37 通信部
40 キャリアシート
L 折り目
DESCRIPTION OF SYMBOLS 10 Image processing system 11 Communication cable 20 Image processing apparatus 21 CPU
22 storage device 23 RAM
24 display unit 25 operation unit 26 communication unit 30 scanner device 31 CPU
32 storage device 33 RAM
34 Conveying section 35 First image sensor 36 Second image sensor 37 Communication section 40 Carrier sheet L Fold

Claims (7)

スキャナ装置によってスキャンされた原稿に対応する画像データを画像処理する画像処理装置を制御するコンピュータが実行可能なプログラムであって、
前記コンピュータを、
文字が記録され、第一辺の第一サイズが第二辺の第二サイズより長い長尺の前記原稿が、折り目が前記第二辺に沿った状態で二つ折りされて挟み込まれたキャリアシートの第一面の側となる、前記原稿の第一領域に対応する第一画像データと、前記キャリアシートの前記第一面と反対側の第二面の側となる、前記原稿の第二領域に対応する第二画像データと、を取得する第一取得手段と、
前記原稿の前記第二サイズに対応し、且つ前記第一画像データの短辺に対応する短辺サイズを取得する第二取得手段と、
前記第二取得手段によって取得された前記短辺サイズが、基準となる基準サイズより小さいかを判断する第一判断手段と、
前記短辺サイズが前記基準サイズより小さい場合、少なくとも前記第一画像データに対するOCR処理の認識結果に従い、少なくとも前記第一画像データの回転量を決定する決定処理を実行し、少なくとも前記第一画像データに対して、前記決定処理によって決定された前記回転量に従った回転処理を実行し、前記短辺サイズが前記基準サイズより小さくない場合、前記決定処理と前記回転処理とを実行しない、変形手段と、して機能させるプログラム。
A computer-executable program for controlling an image processing device that performs image processing on image data corresponding to a document scanned by a scanner device,
The computer,
A carrier sheet in which characters are recorded, and the original having a long first length longer than the second size of the second side is folded and sandwiched with the fold line along the second side. The first image data corresponding to the first area of the document on the first surface side and the second area of the document on the second surface side opposite to the first surface of the carrier sheet. Corresponding first image data; first acquisition means for acquiring;
Second acquisition means for acquiring a short side size corresponding to the second size of the document and corresponding to the short side of the first image data;
First determination means for determining whether the short side size acquired by the second acquisition means is smaller than a reference size serving as a reference;
When the short side size is smaller than the reference size, at least a determination process for determining a rotation amount of the first image data is executed according to at least a recognition result of the OCR process for the first image data, and at least the first image data On the other hand, a deforming unit that executes a rotation process according to the rotation amount determined by the determination process and does not execute the determination process and the rotation process when the short side size is not smaller than the reference size. And a program to make it function.
前記コンピュータを、前記短辺サイズが前記基準サイズより小さい場合、前記原稿に対応させた状態で、前記第一画像データ及び前記第二画像データの各短辺で、前記第一画像データと前記第二画像データとを合成した第一合成データを生成し、前記短辺サイズが前記基準サイズより小さくない場合、前記原稿に対応させた状態で、前記第一画像データ及び前記第二画像データの各長辺で、前記第一画像データと前記第二画像データとを合成した第二合成データを生成する、合成手段として機能させる、請求項1に記載のプログラム。   When the short side size is smaller than the reference size, the computer is configured to correspond to the original, and the first image data and the first image data on each short side of the first image data and the second image data. When first composite data is generated by combining two image data, and the short side size is not smaller than the reference size, each of the first image data and the second image data in a state corresponding to the original. The program according to claim 1, wherein the program functions as a synthesizing unit that generates second synthesized data obtained by synthesizing the first image data and the second image data on a long side. 前記変形手段は、前記第一画像データと前記第二画像データとを含む前記第一合成データに対するOCR処理の認識結果に従い、前記第一画像データと前記第二画像データとを含む前記第一合成データの前記回転量を決定する前記決定処理を実行し、前記第一画像データと前記第二画像データとを含む前記第一合成データに対して、前記回転処理を実行する機能を含む、請求項2に記載のプログラム。   The deformation means includes the first composition including the first image data and the second image data in accordance with a recognition result of the OCR process on the first composition data including the first image data and the second image data. A function of executing the determination process for determining the rotation amount of data and executing the rotation process on the first composite data including the first image data and the second image data. 2. The program according to 2. 前記合成手段は、前記第二画像データが、文字を含む所定の情報を含まない領域に対応するデータである場合、前記第一画像データと前記第二画像データとを合成しない、機能を含み、
前記変形手段は、前記短辺サイズが前記基準サイズより小さく、且つ前記第一画像データと前記第二画像データとが合成されない場合、前記第一画像データに対するOCR処理の認識結果に従い、前記第一画像データの前記回転量を決定する前記決定処理を実行し、前記第一画像データに対して、前記回転処理を実行する機能を含む、請求項2又は請求項3に記載のプログラム。
The synthesizing means includes a function of not synthesizing the first image data and the second image data when the second image data is data corresponding to an area not including predetermined information including characters,
In the case where the short side size is smaller than the reference size and the first image data and the second image data are not combined, the deforming unit is configured to perform the first image data according to the recognition result of the OCR process on the first image data. The program according to claim 2 or 3, further comprising a function of executing the determination process for determining the rotation amount of image data and executing the rotation process on the first image data.
前記コンピュータを、前記短辺サイズが前記基準サイズより小さい場合、前記第二取得手段によって取得され、且つ前記判断手段の判断対象とされた前記短辺サイズが、前記スキャナ装置におけるスキャンの主走査方向に一致する、前記第一画像データの水平方向のサイズであるかを判断する第二判断手段として機能させ、
前記変形手段は、
前記短辺サイズが、前記第一画像データの水平方向のサイズである場合、前記決定処理において、前記回転量として、少なくとも前記第一画像データの鉛直方向における上下が逆となる量と、未回転と、を決定し、
前記短辺サイズが、前記第一画像データの水平方向のサイズでない場合、前記決定処理において、前記回転量として、少なくとも前記第一画像データの水平方向が鉛直方向となる量を決定する、機能を含む、請求項1から請求項4の何れか1項に記載のプログラム。
When the short side size is smaller than the reference size, the short side size acquired by the second acquisition unit and used as the determination target of the determination unit is the main scanning direction of scanning in the scanner device. Which functions as a second determination means for determining whether the size of the first image data is in the horizontal direction,
The deformation means includes
When the short side size is the size of the first image data in the horizontal direction, in the determination process, as the rotation amount, at least an amount that is vertically reversed in the vertical direction of the first image data and unrotated And decide
When the short side size is not the horizontal size of the first image data, the determining process determines, as the rotation amount, at least an amount in which the horizontal direction of the first image data is a vertical direction. The program according to any one of claims 1 to 4, further comprising:
前記変形手段は、
前記短辺サイズが、前記第一画像データの水平方向のサイズであり、前記主走査方向に直交する副走査方向に一致する、前記第一画像データの鉛直方向の下側から上側へのOCR処理の認識結果の信頼度を示す第一パラメータ値が、前記第一画像データの鉛直方向の上側から下側へのOCR処理の認識結果の信頼度を示す第二パラメータ値より大きい場合、前記回転量として、少なくとも前記第一画像データの鉛直方向における上下が逆となる量を決定し、
前記短辺サイズが、前記第一画像データの水平方向のサイズであり、前記第一パラメータ値が前記第二パラメータ値より小さい場合、前記回転量として、未回転を決定し、
前記短辺サイズが、前記第一画像データの水平方向のサイズではなく、前記第一画像データの前記水平方向の左側から右側へのOCR処理の認識結果の信頼度を示す第三パラメータ値が、前記第一画像データの水平方向の右側から左側へのOCR処理の認識結果の信頼度を示す第四パラメータ値より大きい場合、前記回転量として、少なくとも前記第一画像データの水平方向が鉛直方向となる右回りの量を決定し、
前記短辺サイズが、前記第一画像データの前記水平方向のサイズではなく、前記第三パラメータ値が前記第四パラメータ値より小さい場合、前記回転量として、少なくとも前記第一画像データの水平方向が鉛直方向となる左回りの量を決定する、請求項5に記載のプログラム。
The deformation means includes
The OCR process from the lower side to the upper side of the vertical direction of the first image data, wherein the short side size is the horizontal size of the first image data and coincides with the sub-scanning direction orthogonal to the main scanning direction. If the first parameter value indicating the reliability of the recognition result of the first image data is greater than the second parameter value indicating the reliability of the recognition result of the OCR process from the upper side to the lower side in the vertical direction of the first image data, the rotation amount And determining at least the amount that the first image data is upside down in the vertical direction,
When the short side size is the horizontal size of the first image data and the first parameter value is smaller than the second parameter value, the rotation amount is determined as non-rotated,
The short side size is not the horizontal size of the first image data, but the third parameter value indicating the reliability of the recognition result of the OCR processing from the left side to the right side of the first image data is When the fourth parameter value indicating the reliability of the recognition result of the OCR process from the right side to the left side in the horizontal direction of the first image data is larger than the fourth parameter value, at least the horizontal direction of the first image data is the vertical direction. Determine the amount of clockwise rotation
When the short side size is not the horizontal size of the first image data and the third parameter value is smaller than the fourth parameter value, at least the horizontal direction of the first image data is the rotation amount. The program according to claim 5, wherein the amount of counterclockwise rotation in the vertical direction is determined.
スキャナ装置によってスキャンされた原稿に対応する画像データを画像処理する画像処理装置であって、
文字が記録され、第一辺の第一サイズが第二辺の第二サイズより長い長尺の前記原稿が、折り目が前記第二辺に沿った状態で二つ折りされて挟み込まれたキャリアシートの第一面の側となる、前記原稿の第一領域に対応する第一画像データと、前記キャリアシートの前記第一面と反対側の第二面の側となる、前記原稿の第二領域に対応する第二画像データと、を取得する第一取得手段と、
前記原稿の前記第二サイズに対応し、且つ前記第一画像データの短辺に対応する短辺サイズを取得する第二取得手段と、
前記第二取得手段によって取得された前記短辺サイズが、基準となる基準サイズより小さいかを判断する第一判断手段と、
前記短辺サイズが前記基準サイズより小さい場合、少なくとも前記第一画像データに対するOCR処理の認識結果に従い、少なくとも前記第一画像データの回転量を決定する決定処理を実行し、少なくとも前記第一画像データに対して、前記決定処理によって決定された前記回転量に従った回転処理を実行し、前記短辺サイズが前記基準サイズより小さくない場合、前記決定処理と前記回転処理とを実行しない、変形手段と、を備える画像処理装置。
An image processing device that performs image processing on image data corresponding to a document scanned by a scanner device,
A carrier sheet in which characters are recorded, and the original having a long first length longer than the second size of the second side is folded and sandwiched with the fold line along the second side. The first image data corresponding to the first area of the document on the first surface side and the second area of the document on the second surface side opposite to the first surface of the carrier sheet. Corresponding first image data; first acquisition means for acquiring;
Second acquisition means for acquiring a short side size corresponding to the second size of the document and corresponding to the short side of the first image data;
First determination means for determining whether the short side size acquired by the second acquisition means is smaller than a reference size serving as a reference;
When the short side size is smaller than the reference size, at least a determination process for determining a rotation amount of the first image data is executed according to at least a recognition result of the OCR process for the first image data, and at least the first image data On the other hand, a deforming unit that executes a rotation process according to the rotation amount determined by the determination process and does not execute the determination process and the rotation process when the short side size is not smaller than the reference size. And an image processing apparatus.
JP2015038801A 2015-02-27 2015-02-27 Program and image processing apparatus Active JP6107851B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015038801A JP6107851B2 (en) 2015-02-27 2015-02-27 Program and image processing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015038801A JP6107851B2 (en) 2015-02-27 2015-02-27 Program and image processing apparatus

Publications (2)

Publication Number Publication Date
JP2016163142A true JP2016163142A (en) 2016-09-05
JP6107851B2 JP6107851B2 (en) 2017-04-05

Family

ID=56845587

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015038801A Active JP6107851B2 (en) 2015-02-27 2015-02-27 Program and image processing apparatus

Country Status (1)

Country Link
JP (1) JP6107851B2 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001338263A (en) * 2000-05-29 2001-12-07 Canon Inc Device and method for image processing, and storage medium
JP2005260387A (en) * 2004-03-10 2005-09-22 Pfu Ltd Image processor and processing method, and carrier sheet
JP2014216998A (en) * 2013-04-30 2014-11-17 ブラザー工業株式会社 Reading apparatus
JP2014230264A (en) * 2013-05-27 2014-12-08 株式会社Pfu Image reading apparatus, compression rate determination method, and computer program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001338263A (en) * 2000-05-29 2001-12-07 Canon Inc Device and method for image processing, and storage medium
JP2005260387A (en) * 2004-03-10 2005-09-22 Pfu Ltd Image processor and processing method, and carrier sheet
JP2014216998A (en) * 2013-04-30 2014-11-17 ブラザー工業株式会社 Reading apparatus
JP2014230264A (en) * 2013-05-27 2014-12-08 株式会社Pfu Image reading apparatus, compression rate determination method, and computer program

Also Published As

Publication number Publication date
JP6107851B2 (en) 2017-04-05

Similar Documents

Publication Publication Date Title
JP6772493B2 (en) Image processing equipment, image processing methods and programs
JP6238598B2 (en) Print control apparatus, print control method, and program
US9185252B1 (en) Electronic device for displaying a print preview
US20200177736A1 (en) System and method for alignment of scan documents
US20190132471A1 (en) Image processing apparatus
CN109479081B (en) Document reading apparatus
JP6238599B2 (en) Print control apparatus, print control method, and program
CN113472963B (en) Image reading apparatus, image reading method, image reading system, and storage medium
US20180091671A1 (en) Image Reading Apparatus and Image Reading Method That Simply Detect Document Direction in Reading of Book Document, and Recording Medium Therefor
JP6467845B2 (en) Image reading device
JP2006211002A (en) Image forming apparatus
US10244144B1 (en) System and method for de-skew of scanned images
JP6107851B2 (en) Program and image processing apparatus
JP6895271B2 (en) Image processing device and image processing method
JP6128994B2 (en) Print control apparatus, print control method, and program
JP2011166591A (en) Image forming apparatus and image forming program
JP2017038346A (en) Image processing apparatus, image processing method and program
JP5477568B2 (en) Perforation detection method, image forming method, and image forming apparatus
JP4339764B2 (en) Facsimile machine
JP5460136B2 (en) Image processing apparatus, control method therefor, and program
JP2010251834A (en) Device and method for reading image, and program
JP2017228922A (en) Image reader, image reading method, and image reading program
JP6604314B2 (en) Image reading apparatus, image forming apparatus, and image reading method
EP3179708B1 (en) Scanner capable of reading double sides of sheet once
JP2020102745A (en) Control program, information processor and scan system

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20161115

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170113

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170220

R150 Certificate of patent or registration of utility model

Ref document number: 6107851

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150