JP2017011523A - Image processing device and computer program - Google Patents

Image processing device and computer program Download PDF

Info

Publication number
JP2017011523A
JP2017011523A JP2015125597A JP2015125597A JP2017011523A JP 2017011523 A JP2017011523 A JP 2017011523A JP 2015125597 A JP2015125597 A JP 2015125597A JP 2015125597 A JP2015125597 A JP 2015125597A JP 2017011523 A JP2017011523 A JP 2017011523A
Authority
JP
Japan
Prior art keywords
image
target image
target
search process
along
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
JP2015125597A
Other languages
Japanese (ja)
Other versions
JP6558094B2 (en
Inventor
長谷川 智彦
Tomohiko Hasegawa
智彦 長谷川
卓也 嶋橋
Takuya Shimahashi
卓也 嶋橋
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 JP2015125597A priority Critical patent/JP6558094B2/en
Publication of JP2017011523A publication Critical patent/JP2017011523A/en
Application granted granted Critical
Publication of JP6558094B2 publication Critical patent/JP6558094B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To reduce the processing time when arranged image data representing one object by a first object image and a second object image are generated.SOLUTION: An image processing device determines whether or not the number of first pixels contained between an end in a first direction of a first target image and an end in a first direction of a first image containing the first target image is equal to or more than a reference, determines whether or not the number of second pixels contained between an end in a second direction of the first target image and an end in a second direction of the first image is equal to or more than the reference, and executes first search processing for searching a first type arrangement position where an end image along one end of the first target image overlaps with an end image along one end of the second target image, thereby determining arrangement positions of the two target images. When the number of the first pixels is less than the reference, the first search processing is executed using the end image along the end in the first direction of the first target image and at least one of the end images along the first and second directions of the second target image.SELECTED DRAWING: Figure 9

Description

本明細書は、第1の対象画像と第2の対象画像とが配置され、第1の対象画像と第2の対象画像とで1個の対象物を示す配置済画像を表す配置済画像データを生成する技術に関する。   In this specification, the first target image and the second target image are arranged, and the arranged image data representing the arranged image showing one object by the first target image and the second target image. It relates to the technology to generate.

特許文献1には、繋ぎ合わせ処理を行う複数枚の原稿を順次にスキャンして得られる原稿データを用いて、スキャンされた複数個の原稿を繋ぎ合わせた画像を表す画像データを生成する技術が開示されている。この技術では、各原稿を繋ぎ合わせ得る複数個の辺の組み合わせについて、繋ぎ合わせ処理を実行して、特徴が一致した辺で原稿を繋ぎ合わせている。あるいは、この技術では、ユーザが原稿の繋ぎ合わせの手順を入力している場合には、その手順に従って、原稿の繋ぎ合わせを実行している。   Patent Document 1 discloses a technique for generating image data representing an image obtained by joining a plurality of scanned originals using original data obtained by sequentially scanning a plurality of originals to be joined. It is disclosed. In this technique, a combination process is executed for a combination of a plurality of sides that can connect the originals, and the originals are connected at the sides having the same characteristics. Alternatively, in this technique, when a user inputs a procedure for joining documents, the joining of documents is executed according to the procedure.

特開平6−164894号公報JP-A-6-164894

しかしながら、上記技術では、例えば、原稿の繋ぎ合わせの手順が入力されない場合には、繋ぎ合わせ得る複数個の辺の組み合わせについて、それぞれ、繋ぎ合わせ処理を実行するので、画像データを生成するための処理時間が過度に長くなる可能性があった。   However, in the above technique, for example, when a document joining procedure is not input, a joining process is performed for each of combinations of a plurality of sides that can be joined. Therefore, a process for generating image data is performed. The time could be excessively long.

本明細書は、第1の画像と第2の画像とが配置され、第1の対象画像と第2の対象画像とで1個の対象物を示す配置済画像を表す画像データを生成する際の処理時間を低減できる新たな技術を開示する。   In the present specification, when the first image and the second image are arranged, and the first target image and the second target image are used to generate image data representing an arranged image indicating one target object. Disclosed is a new technology that can reduce the processing time.

本明細書に開示された技術は、以下の適用例として実現することが可能である。   The technology disclosed in this specification can be implemented as the following application examples.

[適用例1]第1の対象画像を含む第1の画像を表す第1の画像データと、第2の対象画像を含む第2の画像を表す第2の画像データと、を取得する画像取得部と、前記第1の対象画像の第1方向の端と前記第1の画像の前記第1方向の端との間に含まれる第1の画素の個数が基準以上であるか否かを判断する第1の判断部と、前記第1の対象画像の前記第1方向と反対の第2方向の端と前記第1の画像の前記第2方向の端との間に含まれる連続する第2の画素の個数が基準以上であるか否かを判断する第2の判断部と、前記第1の対象画像の前記第1方向と前記第2方向のうちの一方の端に沿う端部画像と、前記第2の対象画像の前記第1方向と前記第2方向のうちの一方の端に沿う端部画像と、が重なる第1種の配置位置を探索する第1の探索処理を実行することによって、前記第1の対象画像と前記第2の対象画像との相対的な配置位置を決定する第1の位置決定部と、決定済の前記配置位置に前記第1の対象画像と前記第2の対象画像とが配置され、第1の対象画像と第2の対象画像とで1個の対象物を示す配置済画像を表す配置済画像データを生成する画像生成部と、を備え、前記第1の位置決定部は、前記第1の画素の個数が基準未満である場合には、前記第1の対象画像の前記第1方向の端に沿う端部画像と、前記第2の対象画像の前記第1方向の端に沿う端部画像と前記第2の対象画像の前記第2方向の端に沿う端部画像とのうちの少なくとも一方と、を用いて前記第1の探索処理を実行し、前記第1の画素の個数が基準以上である場合には、前記第1の対象画像の前記第1方向の端に沿う端部画像を用いずに前記第1の探索処理を実行し、前記第2の画素の個数が基準未満である場合には、前記第1の対象画像の前記第2方向の端に沿う端部画像と、前記第2の対象画像の前記第1方向の端に沿う端部画像と前記第2の対象画像の前記第2方向の端に沿う端部画像とのうちの少なくとも一方と、を用いて前記第1の探索処理を実行し、前記第2の画素の個数が基準以上である場合には、前記第1の対象画像の前記第2方向の端に沿う端部画像を用いずに前記第1の探索処理を実行する、画像処理装置。 Application Example 1 Image acquisition for acquiring first image data representing a first image including a first target image and second image data representing a second image including a second target image A first pixel included in the first direction of the first target image and the end of the first image in the first direction is greater than or equal to a reference. A second determination unit that is included between the first determination unit that performs the second determination and the second direction end opposite to the first direction of the first target image and the second direction end of the first image. A second determination unit that determines whether or not the number of pixels is equal to or greater than a reference, and an end image along one end of the first direction and the second direction of the first target image; A first search is made for a first type arrangement position where the first image of the second target image and an end image along one end of the second direction overlap. By executing a search process, a first position determination unit that determines a relative arrangement position between the first target image and the second target image, and the first position determination unit at the determined arrangement position An image generation unit configured to generate arranged image data representing a arranged image in which a target image and the second target image are arranged, and the first target image and the second target image represent one target object; The first position determination unit, when the number of the first pixels is less than a reference, the end image along the end in the first direction of the first target image, Using at least one of an end image along an end in the first direction of the second target image and an end image along an end in the second direction of the second target image; And when the number of the first pixels is equal to or greater than a reference, the first target image When the first search process is executed without using the end image along the end in the first direction, and the number of the second pixels is less than the reference, the first of the first target image An end image along the end in two directions, an end image along the end in the first direction of the second target image, and an end image along the end in the second direction of the second target image. When the first search process is executed using at least one of the two and the number of the second pixels is equal to or larger than a reference, the first target image is along the end in the second direction. An image processing apparatus that executes the first search process without using an end image.

上記構成によれば、第1の画素の個数が基準以上である場合には、第1の対象画像の第1方向の端に沿う端部画像を用いずに第1の探索処理が実行され、第2の画素の個数が基準以上である場合には、第1の対象画像の第2方向の端に沿う端部画像を用いずに第1の探索処理が実行される。この結果、第1の探索処理の処理時間を低減できる。したがって、配置済画像を表す画像データを生成する際の処理時間を低減できる。   According to the above configuration, when the number of first pixels is greater than or equal to the reference, the first search process is executed without using the end image along the end in the first direction of the first target image, When the number of the second pixels is equal to or larger than the reference, the first search process is executed without using the edge image along the edge in the second direction of the first target image. As a result, the processing time of the first search process can be reduced. Therefore, it is possible to reduce the processing time when generating image data representing the arranged image.

[適用例2]第1の対象画像を含む第1の画像を表す第1の画像データと、第2の対象画像を含む第2の画像を表す第2の画像データと、を取得する画像取得部と、前記第1の対象画像の複数個の端のうちのいずれかの端と、前記第2の対象画像の複数個の端のうちのいずれかの端と、の複数個の組み合わせのそれぞれについて、組み合わせを構成する2個の端に沿う2個の端部画像のヒストグラムを生成するヒストグラム生成部と、前記ヒストグラムを用いて、前記2個の端部画像のヒストグラムの類似度が比較的高い組み合わせに対する探索処理の順序が、前記2個の端部画像のヒストグラムの類似度が比較的低い組み合わせに対する前記探索処理の順序より先になるように、前記複数個の組み合わせの順序を決定する順序決定部であって、前記探索処理は、前記第1の対象画像のいずれかの端に沿う端部画像と前記第2の対象画像のいずれかの端に沿う端部画像とを対応付ける位置を探索する処理である、前記順序決定部と、前記探索処理を実行することによって、前記第1の対象画像と前記第2の対象画像との相対的な配置位置を決定する位置決定部と、決定済の前記配置位置に前記第1の対象画像と前記第2の対象画像とが配置され、第1の対象画像と第2の対象画像とで1個の対象物を示す配置済画像を表す配置済画像データを生成する画像生成部と、
を備え、前記位置決定部は、前記決定済の順序に従って、前記複数個の組み合わせについて、前記探索処理を実行し、前記複数個の組み合わせのうち、特定の組み合わせについて、前記配置位置を決定した場合に、前記複数個の組み合わせのうち、前記特定の組み合わせより前記決定済の順序が後の組み合わせについて、前記探索処理を実行しない、画像処理装置。
Application Example 2 Image acquisition for acquiring first image data representing a first image including a first target image and second image data representing a second image including a second target image Each of a plurality of combinations of a portion, any one of a plurality of ends of the first target image, and any one of a plurality of ends of the second target image A histogram generation unit that generates a histogram of two end images along two ends constituting a combination, and the histogram is used to relatively high the similarity of the histograms of the two end images. Order determination for determining the order of the plurality of combinations such that the order of the search processing for the combinations precedes the order of the search processing for the combinations having a relatively low similarity between the histograms of the two end images. Part The search process is a process of searching for a position that associates an end image along one end of the first target image with an end image along one end of the second target image. The order determination unit, a position determination unit that determines a relative arrangement position of the first target image and the second target image by executing the search process, and the determined arrangement position The first target image and the second target image are arranged, and arranged image data representing a arranged image showing one object is generated by the first target image and the second target image. An image generator;
The position determination unit executes the search process for the plurality of combinations according to the determined order, and determines the arrangement position for a specific combination among the plurality of combinations. In addition, the image processing apparatus does not execute the search process for a combination after the determined order after the specific combination among the plurality of combinations.

上記構成によれば、2個の端部画像のヒストグラムの類似度が高い組み合わせに対する探索処理の順序が先になるように決定された順序に従って、探索処理が実行され、特定の組み合わせについて配置位置が決定された場合に、複数個の組み合わせのうち、特定の組み合わせより決定済の順序が後の組み合わせについて、探索処理が実行されないので、第1の探索処理の処理時間を低減できる。したがって、配置済画像を表す画像データを生成する際の処理時間を低減できる。   According to the above configuration, the search process is executed according to the order determined so that the order of the search process with respect to the combination having a high degree of similarity between the histograms of the two edge images is first, and the arrangement position of the specific combination is determined. When it is determined, the search process is not executed for the combination whose order determined after the specific combination is a plurality of combinations, so that the processing time of the first search process can be reduced. Therefore, it is possible to reduce the processing time when generating image data representing the arranged image.

なお、本発明は、種々の形態で実現することが可能であり、例えば、画像処理方法および画像処理装置、それらの方法または装置の機能を実現するためのコンピュータプログラム、そのコンピュータプログラムを記録した記録媒体(例えば、一時的ではない記録媒体)、等の形態で実現することができる。   The present invention can be realized in various forms, for example, an image processing method and an image processing apparatus, a computer program for realizing the function of the method or apparatus, and a recording in which the computer program is recorded. It can be realized in the form of a medium (for example, a recording medium that is not temporary).

画像処理システムの構成を示すブロック図である。It is a block diagram which shows the structure of an image processing system. 画像処理システム1000の動作を示すシーケンス図である。FIG. 11 is a sequence diagram showing an operation of the image processing system 1000. 原稿の一例を示す図である。It is a figure which shows an example of a manuscript. スキャンパターンAの第1の説明図である。6 is a first explanatory diagram of a scan pattern A. FIG. スキャンパターンAの第2の説明図である。FIG. 10 is a second explanatory diagram of a scan pattern A. スキャン画像の一例を示す図である。It is a figure which shows an example of a scanned image. 配置済画像の一例を示す図である。It is a figure which shows an example of the arranged image. 余白量判定処理のフローチャートである。It is a flowchart of a margin amount determination process. 第1実施例の処理対象決定処理のフローチャートである。It is a flowchart of the process target determination process of 1st Example. 第1実施例の配置位置決定処理のフローチャートである。It is a flowchart of the arrangement position determination process of 1st Example. 第1の探索処理のフローチャートである。It is a flowchart of a 1st search process. 第1の探索処理の説明図である。It is explanatory drawing of a 1st search process. スキャンパターンBの説明図である。6 is an explanatory diagram of a scan pattern B. FIG. スキャンパターンBで生成されるスキャン画像の一例を示す図である。6 is a diagram illustrating an example of a scan image generated with a scan pattern B. FIG. 第2の探索処理のフローチャートである。It is a flowchart of the 2nd search process. 第2の探索処理の説明図である。It is explanatory drawing of a 2nd search process. 画素復元処理のフローチャートである。It is a flowchart of a pixel restoration process. 図16(A)の参照範囲REb近傍の拡大図である。FIG. 17 is an enlarged view near the reference range REb in FIG. 第2実施例の処理対象決定処理のフローチャートである。It is a flowchart of the process target determination process of 2nd Example. 第2実施例の配置位置決定処理のフローチャートである。It is a flowchart of the arrangement position determination process of 2nd Example. 第3実施例の配置位置決定処理のフローチャートである。It is a flowchart of the arrangement position determination process of 3rd Example. 第3実施例の処理順序決定処理のフローチャートである。It is a flowchart of the process order determination process of 3rd Example. 2個の端部画像のR成分のヒストグラムの一例を示す図である。It is a figure which shows an example of the histogram of R component of two edge part images. 第4実施例の配置順序決定処理のフローチャートである。It is a flowchart of the arrangement | positioning order determination process of 4th Example.

A.第1実施例:
A−1:画像処理システム1000の構成
図1は、画像処理システムの構成を示すブロック図である。画像処理システム1000は、画像処理装置としてのサーバ400と、複合機200と、を備えている。サーバ400は、インターネット70に接続されており、複合機200は、LAN(Local Area Networkの略称)80を介して、インターネット70に接続されている。この結果、サーバ400と複合機200は、LAN80とインターネット70とを介して、通信可能である。また、LAN80には、ユーザの端末装置であるパーソナルコンピュータ500が接続されていても良い。
A. First embodiment:
A-1: Configuration of Image Processing System 1000 FIG. 1 is a block diagram showing the configuration of the image processing system. The image processing system 1000 includes a server 400 as an image processing apparatus and a multifunction device 200. The server 400 is connected to the Internet 70, and the multifunction device 200 is connected to the Internet 70 via a LAN (abbreviation of local area network) 80. As a result, the server 400 and the multifunction device 200 can communicate with each other via the LAN 80 and the Internet 70. The personal computer 500 which is a user terminal device may be connected to the LAN 80.

サーバ400は、サーバ400のコントローラの一例としてのCPU410と、DRAMなどの揮発性記憶装置420と、ハードディスクドライブやフラッシュメモリなどの不揮発性記憶装置430と、インターネット70などのネットワークに接続するためのインタフェースを含む通信部480と、を備えている。揮発性記憶装置420には、CPU410が処理を行う際に生成される種々の中間データを一時的に格納するバッファ領域421が設けられている。不揮発性記憶装置430には、コンピュータプログラム431と、UIデータ群433と、が格納されている。   The server 400 includes a CPU 410 as an example of a controller of the server 400, a volatile storage device 420 such as a DRAM, a nonvolatile storage device 430 such as a hard disk drive and a flash memory, and an interface for connecting to a network such as the Internet 70. Including a communication unit 480. The volatile storage device 420 is provided with a buffer area 421 for temporarily storing various intermediate data generated when the CPU 410 performs processing. The nonvolatile storage device 430 stores a computer program 431 and a UI data group 433.

コンピュータプログラム431、および、UIデータ群433は、例えば、サーバ400の管理者によって、インターネット70を介してサーバ400にアップロードされることにより、サーバ400にインストールされる。または、コンピュータプログラム431、および、UIデータ群433は、例えば、DVD−ROMなどに格納された形態で提供され、サーバ400の管理者によって、サーバ400にインストールされても良い。CPU410は、コンピュータプログラム431を実行することにより、後述する画像処理を実現する。   The computer program 431 and the UI data group 433 are installed in the server 400 by being uploaded to the server 400 via the Internet 70 by an administrator of the server 400, for example. Alternatively, the computer program 431 and the UI data group 433 may be provided in a form stored in, for example, a DVD-ROM, and may be installed in the server 400 by the administrator of the server 400. The CPU 410 implements image processing to be described later by executing the computer program 431.

複合機200は、複合機200のコントローラの一例としてのCPU210と、DRAMなどの揮発性記憶装置220と、フラッシュメモリやハードディスクドライブなどの不揮発性記憶装置230と、プリンタ部240と、スキャナ部250と、タッチパネルやボタンなどの操作部260と、液晶ディスプレイなどの表示部270と、外部機器と通信を行う通信部280と、を備えている。例えば、通信部280は、LAN80などのネットワークに接続するためのインタフェースや、USBメモリなどの外部記憶装置と接続するためのインタフェースを含んでいる。   The multifunction device 200 includes a CPU 210 as an example of a controller of the multifunction device 200, a volatile storage device 220 such as a DRAM, a nonvolatile storage device 230 such as a flash memory and a hard disk drive, a printer unit 240, and a scanner unit 250. , An operation unit 260 such as a touch panel and buttons, a display unit 270 such as a liquid crystal display, and a communication unit 280 that communicates with an external device. For example, the communication unit 280 includes an interface for connecting to a network such as the LAN 80 and an interface for connecting to an external storage device such as a USB memory.

揮発性記憶装置220には、CPU210が処理を行う際に生成される種々のデータを一時的に格納するバッファ領域221が設けられている。不揮発性記憶装置230には、制御プログラム231が格納されている。制御プログラム231は、複合機200の製造時に不揮発性記憶装置230に予め格納されて提供され得る。これに代えて、制御プログラム231は、例えば、インターネットを介して接続されたサーバからダウンロードされる形態、あるいは、CD−ROMなどに記録された形態で提供され得る。   The volatile storage device 220 is provided with a buffer area 221 for temporarily storing various data generated when the CPU 210 performs processing. A control program 231 is stored in the non-volatile storage device 230. The control program 231 may be provided by being stored in advance in the non-volatile storage device 230 at the time of manufacture of the multifunction device 200. Instead, the control program 231 can be provided, for example, in a form downloaded from a server connected via the Internet, or in a form recorded on a CD-ROM or the like.

プリンタ部240は、インクジェット方式やレーザー方式などの印刷方式を用いて印刷を実行する。スキャナ部250は、CCDやCMOSなどの光電変換素子を用いて光学的に原稿を読み取ることによってカラー画像やグレー画像を表すスキャンデータを生成する。スキャナ部250は、いわゆるフラットベッド式の後述する原稿台255を備えている。   The printer unit 240 executes printing using a printing method such as an inkjet method or a laser method. The scanner unit 250 generates scan data representing a color image or a gray image by optically reading a document using a photoelectric conversion element such as a CCD or a CMOS. The scanner unit 250 includes a so-called flatbed type document table 255 described later.

CPU210は、制御プログラム231を実行することにより、複合機200の制御を実行する。例えば、CPU210は、プリンタ部240やスキャナ部250を制御して、コピー処理、印刷処理、スキャン処理などを実行する。さらに、CPU210は、サーバ400にアクセスして、サーバ400が提供するサービスを利用することができる。   The CPU 210 executes control of the multifunction device 200 by executing the control program 231. For example, the CPU 210 controls the printer unit 240 and the scanner unit 250 to execute a copy process, a print process, a scan process, and the like. Further, the CPU 210 can access the server 400 and use a service provided by the server 400.

A−2:画像処理システム1000の動作
図2は、画像処理システム1000の動作を示すシーケンス図である。このシーケンス図の処理は、複合機200が、サーバ400が提供する画像生成サービスの利用指示を、ユーザから受け付けた場合に開始される。この画像生成サービスは、詳細は後述するが、複数個のスキャンデータによって表される複数個の画像が配置され、複数個の画像で1個の対象物(具体的には、後述する原稿10)を示す配置済画像を表す配置済画像データを生成するサービスである。複数個のスキャンデータは、詳細は後述するが、例えば、1回で読み取り可能なサイズより大きなサイズの原稿を、複数回に分けて読み取ることによって生成される。
A-2: Operation of Image Processing System 1000 FIG. 2 is a sequence diagram showing the operation of the image processing system 1000. The processing in the sequence diagram is started when the multifunction device 200 receives an instruction to use an image generation service provided by the server 400 from a user. Although this image generation service will be described in detail later, a plurality of images represented by a plurality of scan data are arranged, and one object (specifically, a manuscript 10 described later) is composed of a plurality of images. This is a service for generating arranged image data representing an arranged image indicating the above. The details of the plurality of scan data are described later. For example, the plurality of scan data are generated by reading a document having a size larger than the size that can be read at one time in a plurality of times.

処理が開始されると、S5では、複合機200のCPU210は、サービス開始要求を、サーバ400に対して送信する。サーバ400のCPU410は、サービス開始要求を受信すると、図1に示されるUIデータ群433から画像生成サービスの提供に必要なUIデータを選択し、S10にて、該UIデータを複合機200に対して送信する。UIデータは、具体的には、ユーザインタフェース画面(以下、UI画面とも呼ぶ)を表す画面データと、制御データと、を含む。この制御データは、例えば、UI画面を利用して複合機200が後述するS15のスキャン処理などの所定の処理を行うために必要な各種のデータを含む。例えば、制御データは、複合機200が実行すべき処理を行うために必要な情報、例えば、画像ファイルの送信先アドレスなどを含む。複合機200が実行すべき処理は、例えば、後述するS20にて画像ファイルをサーバ400へ送信する処理を含む。   When the process is started, in S5, the CPU 210 of the multifunction device 200 transmits a service start request to the server 400. Upon receiving the service start request, the CPU 410 of the server 400 selects UI data necessary for providing the image generation service from the UI data group 433 shown in FIG. 1, and the UI data is sent to the multifunction device 200 in S10. To send. Specifically, the UI data includes screen data representing a user interface screen (hereinafter also referred to as UI screen) and control data. This control data includes, for example, various data necessary for the MFP 200 to perform predetermined processing such as the scan processing in S15 described later using the UI screen. For example, the control data includes information necessary for performing processing to be executed by the multifunction device 200, for example, a transmission destination address of an image file. The process to be executed by the multifunction device 200 includes, for example, a process of transmitting an image file to the server 400 in S20 described later.

S15では、CPU210は、受信したUIデータに基づいて、複数個のスキャンデータを生成するスキャン処理を実行する。スキャン処理では、CPU210は、ユーザが用意した原稿を2回に分けて読み取ることによって、2個のスキャンデータを生成する。本実施例のスキャンデータは、例えば、0〜255の256階調の値で表されるRGBの各成分の成分値を画素ごとに含むRGB画像データである。   In S15, the CPU 210 executes a scan process for generating a plurality of scan data based on the received UI data. In the scan process, the CPU 210 generates two pieces of scan data by reading the document prepared by the user in two steps. The scan data of this embodiment is, for example, RGB image data including component values of RGB components represented by 256 gradation values from 0 to 255 for each pixel.

図3は、原稿の一例を示す図である。この原稿10のサイズは、本実施例では、A3サイズである。線CLは、A3サイズの原稿10の長手方向の中央部に位置し、原稿10の短辺と平行な線である。左領域10Lは、原稿10の左側の半分の領域、すなわち、線CLより左側の領域である。右領域10Rは、原稿10の右側の半分の領域、すなわち、原稿10の線CLより右側の領域である。左領域10Lのサイズ、および、右領域10Rのサイズは、A4サイズである。なお、A3サイズ、および、A4サイズは、ISO(International Organization for Standardizationの略)216で定められている紙の寸法である。   FIG. 3 is a diagram illustrating an example of a document. The size of the document 10 is A3 size in this embodiment. The line CL is a line that is located in the center of the A3 size original 10 in the longitudinal direction and is parallel to the short side of the original 10. The left area 10L is a left half area of the document 10, that is, an area on the left side of the line CL. The right region 10R is a half region on the right side of the document 10, that is, a region on the right side of the line CL of the document 10. The size of the left region 10L and the size of the right region 10R are A4 size. The A3 size and the A4 size are paper dimensions defined by ISO (abbreviation of International Organization for Standardization) 216.

図3の符号10L、10Rが付された矢印は、領域10L、10Rの位置と向きを示す。すなわち、これらの矢印が配置された位置、および、これらの矢印が示す向きに、これらの領域10L、10Rが配置されていることを意味している。後述する図(例えば、図4)では、領域10L、10R内の画像の図示を省略して、符号付きの矢印のみで、これらの領域10L、10Rの位置および向きを図示する場合がある。   The arrows with the reference numerals 10L and 10R in FIG. 3 indicate the positions and orientations of the regions 10L and 10R. That is, it means that these regions 10L and 10R are arranged at the positions where these arrows are arranged and in the directions indicated by these arrows. In the figure (for example, FIG. 4) mentioned later, illustration of the image in area | region 10L, 10R is abbreviate | omitted, and the position and orientation of these area | regions 10L, 10R may be illustrated only with a signed arrow.

図4、図5は、スキャンパターンAの説明図である。スキャナ部250の原稿台255(図4(A)、図4(B))の長手方向の長さは、A4サイズの長手方向の長さである297mmより少しだけ(例えば、数センチ)長い。そして、原稿台の短手方向の長さは、ANSI/ASME(American National Standards Institute/American Society of Mechanical Engineersの略)Y14.1で定められている紙の寸法であるレターサイズの短手方向の長さである215.9mmより少しだけ(例えば、数センチ)長い。すなわち、本実施例では、1回で読み取ることができる原稿の最大サイズは、A4サイズより大きくA3サイズより小さいサイズである。このために、本実施例では、2回に分けてA3サイズの原稿10を読み取る。   4 and 5 are explanatory diagrams of the scan pattern A. FIG. The length in the longitudinal direction of the document table 255 (FIGS. 4A and 4B) of the scanner unit 250 is slightly longer (for example, several centimeters) than 297 mm, which is the length in the longitudinal direction of the A4 size. The length of the manuscript table in the short-side direction is the length of the letter-size short-side direction, which is the paper size defined by ANSI / ASME (Abbreviation of American National Standards Institute / American Society of Mechanical Engineers) Y14.1. It is slightly longer (for example, several centimeters) than the length 215.9 mm. That is, in this embodiment, the maximum size of a document that can be read at one time is larger than the A4 size and smaller than the A3 size. Therefore, in this embodiment, the A3 size original 10 is read in two steps.

第1実施例のスキャン処理は、図4、図5のスキャンパターンAの方法で、2回の読み取りが実行されて、2個のスキャンデータが生成される。   In the scanning process of the first embodiment, the scanning pattern A in FIGS. 4 and 5 is used to perform two readings to generate two pieces of scan data.

(スキャンパターンA)
スキャンパターンAでは、原稿10は、折り曲げられることなく、原稿台255に配置される。スキャンパターンAの2回の読み取りの一方では、図4に示すように、左領域10Lと、右領域10Rのうちの左領域10Lと接する部分領域CARと、を含む領域内の画像(以下、左側原稿画像AILとも呼ぶ)が読み取られて、左側原稿画像AILを示す左側スキャンデータが生成される。スキャンパターンAの2回の読み取りの他方では、図5に示すように、右領域10Rと、左領域10Lのうちの右領域10Rと接する部分領域CALと、を含む領域内の画像(以下、右側原稿画像AIRとも呼ぶ)が読み取られて、右側原稿画像AIRを示す右側スキャンデータが生成される。左側原稿画像AILと、右側原稿画像AIRと、のうちのいずれが先に読み取られるかは、ユーザ次第であり、複合機200やサーバ400は、いずれが先に読み取られたかを認識できない。
(Scan Pattern A)
In the scan pattern A, the document 10 is placed on the document table 255 without being bent. On the other hand, as shown in FIG. 4, the scan pattern A is read twice, and an image in an area including the left area 10L and a partial area CAR in contact with the left area 10L in the right area 10R (hereinafter, left side). (Also referred to as a document image AIL) is read, and left scan data indicating the left document image AIL is generated. On the other side of the two scan pattern A readings, as shown in FIG. 5, an image in an area including the right area 10R and a partial area CAL in contact with the right area 10R in the left area 10L (hereinafter, right side) (Also referred to as a document image AIR) is read, and right scan data indicating the right document image AIR is generated. Which of the left original image AIL and the right original image AIR is read first depends on the user, and the multi-function device 200 and the server 400 cannot recognize which was read first.

左側原稿画像AILの読み取りには、図4(A)、(B)に示す2種類の態様がある。いずれの態様が用いられるかは、ユーザ次第であり、複合機200やサーバ400は、用いられた態様を認識できない。態様1では、ユーザは、図4(A)に示すように、原稿10の画像が配置された原稿面が原稿台255側を向き、かつ、原稿面の左領域10Lが奥側(図4(A)の上側)に、原稿面の右領域10Rが手前側(図4(A)の下側)に位置するように、原稿10を原稿台255上に配置する。このとき、原稿台255上に、左領域10Lの全体が、原稿台255上に位置するように、原稿10が配置されるので、右領域10Rの少なくとも一部は、原稿台255より手前側にはみ出す。   There are two types of modes shown in FIGS. 4A and 4B for reading the left original image AIL. Which mode is used depends on the user, and the multifunction device 200 and the server 400 cannot recognize the used mode. In aspect 1, as shown in FIG. 4A, the user faces the document surface on which the image of the document 10 is placed facing the document table 255 side, and the left area 10L of the document surface is the back side (FIG. The document 10 is placed on the document table 255 so that the right area 10R of the document surface is positioned on the near side (lower side in FIG. 4A) on the upper side of A). At this time, since the document 10 is arranged on the document table 255 so that the entire left region 10L is positioned on the document table 255, at least a part of the right region 10R is on the front side of the document table 255. Stick out.

態様2では、ユーザは、図4(B)に示すように、原稿10の画像が配置された原稿面が原稿台255側を向き、かつ、原稿面の左領域10Lが手前側(図4(B)の下側)に、原稿面の右領域10Rが奥側(図4(B)の上側)に位置するように、原稿10を原稿台255上に配置する。このとき、原稿台255上に、左領域10Lの全体が、原稿台255上に位置するように、原稿10が配置されるので、右領域10Rの少なくとも一部は、原稿台255より奥側にはみ出す。   In mode 2, as shown in FIG. 4 (B), the user faces the document table 255 on which the image of the document 10 is placed, and the left area 10L of the document surface is on the near side (FIG. 4 (B). The document 10 is placed on the document table 255 so that the right area 10R of the document surface is located on the back side (upper side in FIG. 4B). At this time, since the document 10 is arranged on the document table 255 so that the entire left region 10L is positioned on the document table 255, at least a part of the right region 10R is located behind the document table 255. Stick out.

図4(C)〜(F)には、左側原稿画像AILの読み取りの態様1、2で生成される左側スキャンデータによって表される左側スキャン画像の一例が示されている。これらの左側スキャン画像ALa〜ALdや、後述する右側スキャン画像ARa〜ARbは、原稿台255の形状に対応する矩形を有している。これらのスキャン画像は、原稿台255の長辺に沿った方向を縦方向とし、原稿台255の図4(A)、(B)における左方向を上方向として、原稿台255上に配置された画像を表す。態様1における原稿台255に対する原稿10の上方向(図4(A)の矢印の方向)と、態様2における原稿台255に対する原稿10の上方向(図4(B)の矢印の方向)とは、逆向きになる。このために、態様1で生成される左側スキャン画像ALa、ALb(図4(C)、(D))内の左側原稿画像AILと、態様2で生成される左側スキャン画像ALc、ALd(図4(E)、(F))内の左側原稿画像AILとは、上下方向が逆になっている。   FIGS. 4C to 4F show an example of the left side scan image represented by the left side scan data generated in the reading modes 1 and 2 of the left side original image AIL. These left-side scan images ALa to ALd and right-side scan images ARa to ARb described later have a rectangle corresponding to the shape of the document table 255. These scanned images are arranged on the document table 255 with the direction along the long side of the document table 255 as the vertical direction and the left direction of the document table 255 in FIGS. 4A and 4B as the upper direction. Represents an image. The upward direction of the document 10 with respect to the document table 255 in the mode 1 (the direction of the arrow in FIG. 4A) and the upward direction of the document 10 with respect to the document table 255 in the mode 2 (the direction of the arrow in FIG. 4B). , Reverse. Therefore, the left original image AIL in the left scan images ALa and ALb (FIGS. 4C and 4D) generated in the mode 1 and the left scan images ALc and ALd generated in the mode 2 (FIG. 4). The left and right original images AIL in (E) and (F)) are upside down.

これらの左側スキャン画像ALa〜ALdでは、左右の端のうち、少なくとも原稿10の中央近傍の部分領域CARに対応する端に、余白MGが現れない。これは、図4(A)、(B)を参照して説明したように、読み取りの際に、原稿10の右領域10Rは、原稿台255の片側にはみ出すからである。   In these left-side scan images ALa to ALd, the margin MG does not appear at least at the end corresponding to the partial area CAR near the center of the document 10 among the left and right ends. This is because, as described with reference to FIGS. 4A and 4B, the right region 10 </ b> R of the document 10 protrudes to one side of the document table 255 during reading.

左側スキャン画像ALa〜ALdでは、左右の端のうち、原稿10の左端に対応する端に、余白MGが現れる場合と、余白MGが現れない場合と、がある。例えば、態様1(図4(A))では、原稿10の左端(図4(A)の上端)と、原稿台255の対応する端(図4(A)の上端)と、の間に、隙間がない場合には、図4(C)の左側スキャン画像ALaのように、原稿10の左端に対応する端に余白MGが現れない。一方、当該隙間がある場合には、図4(D)の左側スキャン画像ALbのように、原稿10の左端に対応する端に余白MGが現れる。態様2(図4(B))でも、図4(E)、(F)に示すように、同様である。   In the left-side scan images ALa to ALd, there are cases where a margin MG appears at the end corresponding to the left end of the document 10 among the left and right ends, and when the margin MG does not appear. For example, in aspect 1 (FIG. 4A), between the left end of the document 10 (the upper end of FIG. 4A) and the corresponding end of the document table 255 (the upper end of FIG. 4A), When there is no gap, the margin MG does not appear at the end corresponding to the left end of the document 10 as in the left-side scan image ALa in FIG. On the other hand, when there is a gap, a margin MG appears at the end corresponding to the left end of the document 10 as in the left-side scan image ALb in FIG. The same applies to aspect 2 (FIG. 4B) as shown in FIGS. 4E and 4F.

右側原稿画像AIRの読み取りには、左側原稿画像AILと同様に、図5(A)、(B)に示す2種類の態様がある。いずれの態様が用いられるかは、ユーザ次第であり、複合機200やサーバ400は、用いられた態様を認識できない。右側原稿画像AIRの態様1では、図5(A)に示すように、左側原稿画像AILの態様1(図4(A))と同様の向きで、原稿10が原稿台255上に配置される。このとき、原稿台255上に、右領域10Rの全体が、原稿台255上に位置するように、原稿10が配置されるので、左領域10Lの少なくとも一部は、原稿台255より奥側にはみ出す。   As with the left original image AIL, there are two types of modes shown in FIGS. 5A and 5B for reading the right original image AIR. Which mode is used depends on the user, and the multifunction device 200 and the server 400 cannot recognize the used mode. In aspect 1 of the right original image AIR, as shown in FIG. 5A, the original 10 is arranged on the original table 255 in the same direction as in aspect 1 of the left original image AIL (FIG. 4A). . At this time, since the document 10 is arranged on the document table 255 so that the entire right region 10R is positioned on the document table 255, at least a part of the left region 10L is located behind the document table 255. Stick out.

右側原稿画像AIRの態様2では、右側原稿画像AIRの態様2では、図5(B)に示すように、左側原稿画像AILの態様2(図4(B))と同様の向きで、原稿10が原稿台255上に配置される。このとき、原稿台255上に、右領域10Rの全体が、原稿台255上に位置するように、原稿10が配置されるので、左領域10Lの少なくとも一部は、原稿台255より手前側にはみ出す。   In aspect 2 of the right original image AIR, in aspect 2 of the right original image AIR, as shown in FIG. 5B, the original 10 is oriented in the same direction as in aspect 2 of the left original image AIL (FIG. 4B). Is placed on the document table 255. At this time, since the document 10 is arranged on the document table 255 so that the entire right region 10R is positioned on the document table 255, at least a part of the left region 10L is on the front side of the document table 255. Stick out.

図5(C)〜(F)には、右側原稿画像AIRの読み取りの態様1、2で生成される右側スキャンデータによって表される右側スキャン画像の一例が示されている。上述した左側スキャン画像ALa〜ALdと同様に、態様1で生成される右側スキャン画像ARa、ARb(図5(C)、(D))内の右側原稿画像AIRと、態様2で生成される右側スキャン画像ARc、ARd(図5(E)、(F))内の右側原稿画像AIRとは、上下方向が逆になっている。また、上述した左側スキャン画像ALa〜ALdと同様に、右側スキャン画像ARa〜ARdでは、左右の端のうち、少なくとも原稿10の中央近傍の部分領域CALに対応する端に、余白MGが現れず、原稿10の右端に対応する端に、余白MGが現れる場合と、余白MGが現れない場合と、がある。   FIGS. 5C to 5F show an example of the right side scan image represented by the right side scan data generated in the modes 1 and 2 for reading the right side original image AIR. Similarly to the left-side scan images ALa to ALd described above, the right-side original image AIR in the right-side scan images ARa and ARb (FIGS. 5C and 5D) generated in the mode 1 and the right-side generated in the mode 2 The right and left original image AIR in the scanned images ARc and ARd (FIGS. 5E and 5F) is upside down. Similarly to the left-side scan images ALa to ALd described above, in the right-side scan images ARa to ARd, the margin MG does not appear at least at the end corresponding to the partial area CAL near the center of the document 10, There are cases where a margin MG appears at the end corresponding to the right end of the document 10 and cases where no margin MG appears.

以上の説明から解るように、スキャンパターンAで生成されるスキャン画像(左側スキャン画像AL、または、右側スキャン画像AR)は、左右の両端に余白がない両側余白無画像(例えば、図4(C)、(E)の画像ALa、ALc、および、図5(C)、(E)の画像ARa、ARc)と、左右の端のうちの一方の端に余白MGがなく、他方の端に余白MGがある片側余白有画像(例えば、図4(D)、(F)の画像ALb、ALd、および、図5(D)、(F)の画像ARb、ARd)と、のいずれかである。   As can be seen from the above description, the scan image (left scan image AL or right scan image AR) generated by the scan pattern A is a double-sided marginless image (for example, FIG. ), (E) images ALa and ALc, and images ARa and ARc in FIGS. 5C and 5E), and there is no margin MG at one of the left and right ends, and a margin at the other end. One side marginal image with MG (for example, images ALb and ALd in FIGS. 4D and 4F and images ARb and ARd in FIGS. 5D and 5F).

図2のS15で1回目の読み取りで生成されるスキャンデータを第1スキャンデータと呼び、2回目の読み取りで生成されるスキャンデータを第2スキャンデータである。上記説明から解るように、第1スキャンデータは、左側スキャンデータと右側スキャンデータとのうちの一方であり、第2スキャンデータは、左側スキャンデータと右側スキャンデータとのうちの他方である。S15のスキャン処理において、第1スキャンデータ、および、第2スキャンデータは、それぞれ、所定のフォーマットのファイル、例えば、JPEG(Joint Photographic Experts Groupの略)フォーマットの画像ファイルに変換される。   The scan data generated by the first reading in S15 of FIG. 2 is referred to as first scan data, and the scan data generated by the second reading is second scan data. As can be seen from the above description, the first scan data is one of the left scan data and the right scan data, and the second scan data is the other of the left scan data and the right scan data. In the scan process of S15, the first scan data and the second scan data are each converted into a file of a predetermined format, for example, an image file of JPEG (Joint Photographic Experts Group) format.

図2のS20では、CPU210は、第1スキャンデータの画像ファイル(第1画像ファイルとも呼ぶ)と、第2スキャンデータの画像ファイル(第2画像ファイルとも呼ぶ)と、をサーバ400に対して送信する。この結果、S25にて、サーバ400のCPU410は、これらの2個の画像ファイルを取得する。CPU410は、これらの画像ファイルから第1スキャンデータおよび第2スキャンデータ取得して、バッファ領域421に格納する。例えば、JPEG形式の画像ファイルが用いられる場合には、画像ファイルから、所定の変換処理によって、RGB画像データに変換されたスキャンデータが取得されて、バッファ領域421に格納される。   In S <b> 20 of FIG. 2, the CPU 210 transmits the image file of the first scan data (also referred to as the first image file) and the image file of the second scan data (also referred to as the second image file) to the server 400. To do. As a result, in S25, the CPU 410 of the server 400 acquires these two image files. The CPU 410 acquires first scan data and second scan data from these image files and stores them in the buffer area 421. For example, when an image file in JPEG format is used, scan data converted into RGB image data is acquired from the image file by a predetermined conversion process and stored in the buffer area 421.

図6は、取得される第1、第2スキャンデータによって表される第1、第2スキャン画像の一例を示す図である。この例では、図6(A)の第1スキャン画像I11は、図4(A)の態様1によって生成された左側スキャン画像であり、図6(B)の第2スキャン画像I21は、図5(B)の態様2によって生成された右側スキャン画像である。したがって、第1スキャン画像I11は、左側原稿画像AILと、左側原稿画像AILより外側の余白MGと、を含む。第2スキャン画像I21は、右側原稿画像AIRと、右側原稿画像AIRより外側の余白MGと、を含む。余白MGは、原稿台255を読み取った領域であるので、原稿台255の色を示す値(RGB値)有している。余白MGの色は、本実施例では、白色であるが、黒色であっても良いし、グレーであっても良い。スキャン画像I11、I21において、原稿画像AIL、AIRが傾いているのは、スキャンデータの生成時に、原稿台255に配置された原稿10が傾いていたためである。   FIG. 6 is a diagram illustrating an example of first and second scan images represented by acquired first and second scan data. In this example, the first scan image I11 in FIG. 6A is a left-side scan image generated by the aspect 1 in FIG. 4A, and the second scan image I21 in FIG. It is a right side scan image produced | generated by the aspect 2 of (B). Therefore, the first scan image I11 includes the left original image AIL and the margin MG outside the left original image AIL. The second scanned image I21 includes a right original image AIR and a margin MG outside the right original image AIR. Since the margin MG is an area obtained by reading the document table 255, it has a value (RGB value) indicating the color of the document table 255. The color of the margin MG is white in this embodiment, but may be black or gray. In the scan images I11 and I21, the document images AIL and AIR are inclined because the document 10 placed on the document table 255 is inclined when the scan data is generated.

S30では、CPU410は、第1スキャンデータと第2スキャンデータとに対して、それぞれ、傾き補正処理を実行する。具体的には、CPU410は、処理対象のスキャンデータに対してハフ変換やエッジ検出処理などの公知の処理を実行して、スキャン画像(I11またはI21)内の原稿画像(AILまたはAIR)の上端を検出する。CPU410は、原稿画像(AILまたはAIR)の上端と、スキャン画像(I11またはI21)の上端と、が、平行になるように、スキャン画像(I11またはI21)を回転して、補正済のスキャン画像を表す補正済のスキャンデータを生成する。ここで、検出すべき原稿画像の端は、上端に代えて、下端でも良いが、右端や左端でないことが好ましい。これは、スキャン画像(I11またはI12)内の原稿画像(AILまたはAIR)の左右の端の一方は、原稿10の端を表していないからである。   In S30, the CPU 410 performs an inclination correction process on the first scan data and the second scan data, respectively. Specifically, the CPU 410 performs known processing such as Hough transform and edge detection processing on the scan data to be processed, and the upper end of the document image (AIL or AIR) in the scan image (I11 or I21). Is detected. The CPU 410 rotates the scan image (I11 or I21) so that the upper end of the original image (AIL or AIR) and the upper end of the scan image (I11 or I21) are parallel to each other, and the corrected scan image is corrected. The corrected scan data representing is generated. Here, the end of the document image to be detected may be the lower end instead of the upper end, but is preferably not the right end or the left end. This is because one of the left and right edges of the document image (AIL or AIR) in the scanned image (I11 or I12) does not represent the edge of the document 10.

後述する余白量判定処理では、縦方向のラインごとに余白ラインを判断するので、このように予め傾き補正を実行することによって、処理対象のスキャン画像内で原稿画像が傾いている場合であっても、後の余白量判定処理によって、余白量が基準量以上であるか否かを精度良く判断することができる。   In the margin amount determination process to be described later, since a margin line is determined for each vertical line, the original image is inclined in the scan image to be processed by executing the inclination correction in advance as described above. In addition, it is possible to accurately determine whether the margin amount is equal to or larger than the reference amount by the subsequent margin amount determination process.

図6(B)には、補正済の第1スキャン画像I12および第2スキャン画像I22が示されている。補正済のスキャン画像I12、I22には、原稿画像(AILまたはAIR)および余白MGの外側に、追加画素によって構成される追加領域AAが追加されている。これは、処理の便宜上、補正済のスキャン画像I12、I22を、上下の端が横方向と平行で、かつ、左右の端が上下方向と平行な矩形の画像として扱うためである。CPU410は、追加領域AAを、他の領域と区別して特定できるように、追加領域AA内の画素と、他の領域内の画素と、を二値化したマスク画像(図示省略)を生成して、バッファ領域421に保存する。以下では、傾き補正処理済の第1、第2スキャンデータを、単に、第1スキャンデータ、第2スキャンデータとも呼ぶ。   FIG. 6B shows corrected first scan image I12 and second scan image I22. In the corrected scanned images I12 and I22, an additional area AA constituted by additional pixels is added outside the original image (AIL or AIR) and the margin MG. This is because, for convenience of processing, the corrected scanned images I12 and I22 are handled as rectangular images whose upper and lower ends are parallel to the horizontal direction and whose left and right ends are parallel to the vertical direction. The CPU 410 generates a mask image (not shown) in which the pixels in the additional area AA and the pixels in the other area are binarized so that the additional area AA can be identified separately from the other areas. And stored in the buffer area 421. Hereinafter, the first and second scan data that have been subjected to the tilt correction processing are also simply referred to as first scan data and second scan data.

図2のS35では、CPU410は、第1スキャン画像I12の右端の余白量判定処理を実行する。S40では、CPU410は、第1スキャン画像I12の左端の余白量判定処理を実行する。S45では、CPU410は、第2スキャン画像I22の右端の余白量判定処理を実行する。S50では、CPU410は、第2スキャン画像I22の左端の余白量判定処理を実行する。これらの余白量判定処理は、処理対象のスキャン画像の処理対象の端の余白量(右端または左端の余白量)が基準以上であるか否かを判定する処理である。具体的には、図6(B)のスキャン画像I12、I22のうちの処理対象のスキャン画像内の原稿画像(AILまたはAIR)の処理対象の端(右端または左端)から該スキャン画像の処理対象の端までの間の余白量が基準以上であるか否かが所定の判定条件に基づいて判定される。余白量判定処理については、後述する。   In S35 of FIG. 2, the CPU 410 executes a margin amount determination process at the right end of the first scan image I12. In S40, the CPU 410 executes a margin amount determination process at the left end of the first scan image I12. In S45, the CPU 410 executes a margin amount determination process at the right end of the second scan image I22. In S50, the CPU 410 executes a margin amount determination process at the left end of the second scan image I22. These margin amount determination processes are processes for determining whether or not the margin amount (the margin amount at the right end or the left end) at the processing target end of the scan image to be processed is greater than or equal to the reference. Specifically, the processing target of the scanned image from the processing target end (right end or left end) of the original image (AIL or AIR) in the processing target scanning image of the scanned images I12 and I22 in FIG. 6B. It is determined based on a predetermined determination condition whether or not the amount of blank space up to the edge is equal to or greater than a reference. The margin amount determination process will be described later.

図2のS55では、CPU210は、処理対象決定処理を実行する。処理対象決定処理は、第1スキャン画像I12の内の原稿画像の左端LT1と右端RT1とから選択される第1端と、第2スキャン画像I22内の原稿画像の左端LT2と右端RT2とから選択される第2端と、の複数個の組み合わせのうち、続くS65の配置位置決定処理において配置位置を決定するための探索処理(後述)の処理対象とすべき2端の組み合わせを、決定する処理である。図6(B)のスキャン画像I12、I22の例では、第1スキャン画像I12内の原稿画像の右端RT1と、第2スキャン画像I22内の原稿画像の左端LT2と、を接合することで、原稿10を再現できることは明らかである。しかしながら、実際には、第1スキャン画像I12と第2スキャン画像I22との一方は、図4(C)〜(F)の左側スキャン画像ALa〜ALdのいずれかである可能性があり、他方は、図5(C)〜(F)の右側スキャン画像ARa〜ARdのいずれかである可能性がある。したがって、第1スキャン画像I12内の原稿画像の左端LT1と右端RT1とのうちのいずれの端と、第2スキャン画像I22内の原稿画像の左端LT2と右端RT2とのうちのいずれの端と、の組み合わせで、端部を接合することが、原稿10を再現するために適切であるかを、CPU410は、この段階では、認識できない。処理対象決定処理では、S35〜S50の余白量判定処理の結果を用いて、処理対象とすべき2端の組み合わせを、決定する。処理対象決定処理については、後述する。   In S55 of FIG. 2, the CPU 210 executes a process target determination process. The processing target determination process is selected from the first end selected from the left end LT1 and the right end RT1 of the document image in the first scan image I12, and the left end LT2 and the right end RT2 of the document image in the second scan image I22. Of determining a combination of two ends to be processed in a search process (described later) for determining an arrangement position in the arrangement position determination process of S65, among a plurality of combinations of the second end to be performed It is. In the example of the scan images I12 and I22 in FIG. 6B, the right end RT1 of the document image in the first scan image I12 and the left end LT2 of the document image in the second scan image I22 are joined to each other. It is clear that 10 can be reproduced. However, in reality, one of the first scan image I12 and the second scan image I22 may be one of the left-side scan images ALa to ALd in FIGS. There is a possibility that any of the right-side scan images ARa to ARd in FIGS. Therefore, any one of the left end LT1 and the right end RT1 of the document image in the first scan image I12, and any one of the left end LT2 and the right end RT2 of the document image in the second scan image I22; In this stage, the CPU 410 cannot recognize whether it is appropriate to join the end portions in order to reproduce the document 10. In the process target determination process, a combination of two ends to be processed is determined using the result of the blank amount determination process in S35 to S50. The process target determination process will be described later.

S65では、CPU410は、配置位置決定処理を実行する。配置位置決定処理は、第1種の配置位置を決定するための第1の探索処理(後述)を実行して、原稿10を適切に表すことができる2個の原稿画像AIL、AIRの相対的な位置を決定する処理である。第1種の配置位置は、左側原稿画像AILの一部と、右側原稿画像BIRの一部と、が重なる相対的な位置である。配置位置決定処理は、処理対象決定処理の結果を用いて実行される。配置位置決定処理については、後述する。   In S65, the CPU 410 executes an arrangement position determination process. In the arrangement position determination process, a first search process (described later) for determining the first type arrangement position is executed, and the two original images AIL and AIR that can appropriately represent the original 10 are relative to each other. This is a process for determining the correct position. The first type arrangement position is a relative position where a part of the left original image AIL and a part of the right original image BIR overlap. The arrangement position determination process is executed using the result of the process target determination process. The arrangement position determination process will be described later.

S70では、CPU410は、配置済画像生成処理を実行する。配置済画像生成処理では、第1スキャンデータと第2スキャンデータとを用いて、左側原稿画像AILと、右側原稿画像AIRと、が配置された配置済画像を表す配置済画像データが生成される。配置済画像において、右側原稿画像AIRと左側原稿画像AILは、配置位置決定処理にて決定済の相対的な位置に配置される。この結果、2個の原稿画像AIL、AIRで、図3の原稿10を示す1個の配置済画像を表す配置済画像データが生成される。   In S70, the CPU 410 executes a placed image generation process. In the arranged image generation process, arranged image data representing the arranged image in which the left original image AIL and the right original image AIR are arranged is generated using the first scan data and the second scan data. . In the arranged image, the right original image AIR and the left original image AIL are arranged at the relative positions determined in the arrangement position determining process. As a result, arranged image data representing one arranged image representing the document 10 in FIG. 3 is generated by the two document images AIL and AIR.

図7は、配置済画像の一例を示す図である。図7の配置済画像OIAでは、配置位置決定処理によって決定される上述した第1種の配置位置に、スキャン画像I12、I22内の原稿画像AIL、AIRが配置される。   FIG. 7 is a diagram illustrating an example of the arranged image. In the arranged image OIA of FIG. 7, the document images AIL and AIR in the scan images I12 and I22 are arranged at the first type arrangement position determined by the arrangement position determination process.

配置済画像OIAにおいて、左側原稿画像AILと右側原稿画像AIRとが互いに重なり合う領域内の画素の値(すなわち、RGB値)には、一方の原稿画像、例えば、右側原稿画像AIR内の画素の値が優先的に採用される。配置済画像OIAにおいて原稿10を表す領域内に、スキャン画像I12、I22の追加領域AA内の追加画素が配置されないように、追加画素は、配置済画像生成処理において適宜に削除される。   In the arranged image OIA, the pixel value (that is, the RGB value) in the area where the left original image AIL and the right original image AIR overlap with each other is the value of one original image, for example, the pixel in the right original image AIR. Is preferentially adopted. The additional pixels are appropriately deleted in the arranged image generation process so that the additional pixels in the additional area AA of the scanned images I12 and I22 are not arranged in the area representing the document 10 in the arranged image OIA.

なお、CPU410は、生成された配置済画像データを所定の形式の画像ファイルに変換することによって、配置済画像を表す配置済画像ファイルを生成する。例えば、RGB画像データである配置済画像データが、JPEG圧縮されることによって、JPEG形式の配置済画像ファイルが生成される。なお、変形例では、配置済画像データから、PDF形式の配置済画像ファイルが生成されてもよい。   The CPU 410 generates a placed image file representing the placed image by converting the created placed image data into an image file of a predetermined format. For example, the arranged image data that is RGB image data is JPEG-compressed to generate a arranged image file in the JPEG format. In the modified example, a placed image file in PDF format may be generated from the placed image data.

図2のS75では、CPU410は、生成された配置済画像ファイルを複合機200に対して送信する。複合機200のCPU210は、配置済画像ファイルを受信すると、受信した配置済画像ファイルを不揮発性記憶装置230に格納するとともに、ユーザに配置済画像ファイルを受信したことを通知する。配置済画像ファイルは、ユーザの利用に供される。例えば、複合機200は、ユーザの指示に基づいて、配置済画像ファイルを用いて、配置済画像OIAを印刷することができる。   In S <b> 75 of FIG. 2, the CPU 410 transmits the generated arranged image file to the multifunction device 200. When receiving the arranged image file, the CPU 210 of the multifunction device 200 stores the received arranged image file in the nonvolatile storage device 230 and notifies the user that the arranged image file has been received. The arranged image file is provided for use by the user. For example, the multifunction device 200 can print the arranged image OIA using the arranged image file based on a user instruction.

なお、図2に破線で示すS60の処理順序決定処理は、第1実施例では、実行されない。理順序決定処理は、第3、第4実施例にて実行されるので、第3、第4実施例にて説明する。   Note that the processing order determination process of S60 indicated by a broken line in FIG. 2 is not executed in the first embodiment. The physical order determination process is executed in the third and fourth embodiments, and will be described in the third and fourth embodiments.

A−3.余白量判定処理:
S35〜S50の4個の余白量判定処理について説明する。4個の余白量判定処理は、処理対象のスキャン画像と、処理対象の端と、が異なることを除いて、同一の処理である。
A-3. Margin amount judgment processing:
The four margin amount determination processes in S35 to S50 will be described. The four margin amount determination processes are the same process except that the scan image to be processed is different from the end of the process target.

図8は、余白量判定処理のフローチャートである。S100では、CPU410は、処理開始位置STPを決定する。処理開始位置STPは、処理対象のスキャン画像の横方向の特定の位置である。処理開始位置STPは、処理対象のスキャン画像の処理対象の端の近傍、本実施例では、図6(B)のスキャン画像I12、I22の右端や左端の近傍に決定される。具体的には、処理対象のスキャン画像が第1スキャン画像I12であり、処理対象の端が右端である場合には、処理開始位置STPは、図6(B)に示すように、傾き補正前のスキャン画像I11の右上および右下の頂点のうち、傾き補正済の第1スキャン画像I12の右端から離れている頂点の横方向の位置に決定される。また、処理対象のスキャン画像が第2スキャン画像I22であり、処理対象の端が左端である場合には、処理開始位置STPは、図6(B)に示すように、傾き補正前のスキャン画像I21の左上および左下の頂点のうち、傾き補正済の第2スキャン画像I22の左端から離れている頂点の横方向の位置に決定される。   FIG. 8 is a flowchart of margin amount determination processing. In S100, the CPU 410 determines a processing start position STP. The process start position STP is a specific position in the horizontal direction of the scan image to be processed. The processing start position STP is determined in the vicinity of the processing target end of the processing target scan image, in the present embodiment, in the vicinity of the right end and the left end of the scan images I12 and I22 in FIG. Specifically, when the scan image to be processed is the first scan image I12 and the end of the process target is the right end, the process start position STP is set to a value before tilt correction as shown in FIG. Among the upper right and lower right vertices of the scan image I11, the vertex in the horizontal direction is determined to be away from the right end of the first corrected scan image I12. When the scan image to be processed is the second scan image I22 and the end of the process target is the left end, the process start position STP is a scan image before tilt correction as shown in FIG. Among the upper left and lower left vertices of I21, the position is determined to be the horizontal position of the vertex that is away from the left end of the second scanned image I22 that has been tilt corrected.

S105では、CPU410は、スキャン画像内の複数本の縦方向の画素のラインの中から、1本の注目ラインを選択する。複数本の縦方向の画素のラインは、横方向の位置が互いに等しく、縦方向に沿って並ぶ複数個の画素をそれぞれ含む。最初の注目ラインは、処理開始位置STPの画素のラインである。注目ラインは、処理開始位置STPから、スキャン画像の処理対象の端から離れる方向、すなわち、処理対象の端が右端である場合には左方向に向かって、処理対象の端が左端である場合には右方向に向かって順次に選択される。   In S105, the CPU 410 selects one line of interest from among a plurality of vertical pixel lines in the scan image. The lines of the plurality of vertical pixels each include a plurality of pixels that are equal in the horizontal direction and arranged along the vertical direction. The first attention line is a pixel line at the processing start position STP. The line of interest is a direction away from the processing target end of the scanned image from the processing start position STP, that is, when the processing target end is the right end, the left direction, and when the processing target end is the left end. Are selected sequentially in the right direction.

S110では、CPU410は、注目ラインに含まれる複数個の画素から、1個の注目画素を選択する。注目画素は、注目ラインの上端から下端に向かって1個ずつ順次に選択される。   In S110, the CPU 410 selects one target pixel from a plurality of pixels included in the target line. The target pixel is sequentially selected one by one from the upper end to the lower end of the target line.

S115では、CPU410は、注目画素が、余白が有するべき特定色を有する特定色画素であるか否かを判断する。余白が有するべき特定色は、原稿台255の色であり、本実施例では、白である。CPU410は、注目画素が、特定色を示す所定範囲内の画素の値(RGB値)を有する場合には、注目画素が特定色画素であると判断し、特定色を示す範囲外の画素の値を有する場合には、注目画素が特定色とは異なる色を有する非特定色画素であると判断する。   In S115, the CPU 410 determines whether or not the target pixel is a specific color pixel having a specific color that should be included in the margin. The specific color that the margin should have is the color of the document table 255, which is white in this embodiment. When the target pixel has a pixel value (RGB value) within a predetermined range indicating a specific color, the CPU 410 determines that the target pixel is a specific color pixel, and the value of the pixel outside the range indicating the specific color If the pixel of interest is a non-specific color pixel having a color different from the specific color.

注目画素が特定色画素である場合には(S115:YES)、CPU410は、S120にて、画素カウンタWCに1を加算する。画素カウンタWCは、縦方向に連続する特定色画素の個数をカウントするためのカウンタである。S125では、CPU410は、ノイズカウンタNCを初期化する、すなわち、初期値「0」にする。ノイズカウンタNCは、縦方向に連続する非特定色画素の個数をカウントするためのカウンタである。   If the target pixel is a specific color pixel (S115: YES), the CPU 410 adds 1 to the pixel counter WC in S120. The pixel counter WC is a counter for counting the number of specific color pixels continuous in the vertical direction. In S125, the CPU 410 initializes the noise counter NC, that is, sets the initial value to “0”. The noise counter NC is a counter for counting the number of non-specific color pixels continuous in the vertical direction.

注目画素が非特定色画素である場合には(S115:NO)、CPU410は、S130にて、ノイズカウンタNCに1を加算する。S135では、CPU410は、ノイズカウンタNCが所定の閾値THn以上であるか否かを判断する。閾値THnは、例えば、2〜5個である。   When the target pixel is a non-specific color pixel (S115: NO), the CPU 410 adds 1 to the noise counter NC in S130. In S135, the CPU 410 determines whether or not the noise counter NC is greater than or equal to a predetermined threshold value THn. The threshold value THn is, for example, 2 to 5.

ノイズカウンタNCが所定の閾値THn以上である場合には(S135:YES)、CPU410は、S140にて、現在の画素カウンタWCが、現在の最大連続数WCmより大きいか否かを判断する。画素カウンタWCが、最大連続数WCmより大きい場合には(S140:YES)、CPU410は、S145にて、最大連続数WCmの値を、画素カウンタWCの値に更新して、S150に処理を進める。画素カウンタWCが、最大連続数WCm未満である場合には(S140:NO)、CPU410は、S145をスキップして、S150に処理を進める。S150では、CPU410は、画素カウンタWCの値を初期化する。   If the noise counter NC is greater than or equal to the predetermined threshold value THn (S135: YES), the CPU 410 determines in S140 whether or not the current pixel counter WC is greater than the current maximum continuous number WCm. When the pixel counter WC is larger than the maximum continuous number WCm (S140: YES), the CPU 410 updates the value of the maximum continuous number WCm to the value of the pixel counter WC in S145, and proceeds to S150. . When the pixel counter WC is less than the maximum continuous number WCm (S140: NO), the CPU 410 skips S145 and proceeds to S150. In S150, the CPU 410 initializes the value of the pixel counter WC.

ノイズカウンタNCが所定の閾値THn未満である場合には(S135:NO)、CPU410は、上述のS140〜S150をスキップして、S155に処理を進める。   When the noise counter NC is less than the predetermined threshold value THn (S135: NO), the CPU 410 skips the above-described S140 to S150 and proceeds to S155.

S155では、注目ラインの全ての画素を注目画素として処理したか否かを判断する。未処理の画素がある場合には(S155:NO)、CPU410は、S110に戻って、未処理の画素を注目画素として選択する。全ての画素が処理された場合には(S155:YES)、CPU410は、上述したS140、S145と同様の処理を実行する。すなわち、S160にて、現在の画素カウンタWCが、現在の最大連続数WCmより大きいか否かが判断され、画素カウンタWCが最大連続数WCmより大きい場合には(S160:YES)、S165にて、最大連続数WCmの値が画素カウンタWCの値に更新される。そして、画素カウンタWCが最大連続数WCm未満である場合には(S160:NO)、S165はスキップされる。   In S155, it is determined whether or not all the pixels in the target line have been processed as the target pixel. When there is an unprocessed pixel (S155: NO), the CPU 410 returns to S110 and selects an unprocessed pixel as a target pixel. When all the pixels have been processed (S155: YES), the CPU 410 executes the same processing as S140 and S145 described above. That is, in S160, it is determined whether or not the current pixel counter WC is larger than the current maximum continuous number WCm. If the pixel counter WC is larger than the maximum continuous number WCm (S160: YES), in S165. The value of the maximum continuous number WCm is updated to the value of the pixel counter WC. When the pixel counter WC is less than the maximum continuous number WCm (S160: NO), S165 is skipped.

S170に処理が進んだ時点での最大連続数WCmは、注目ラインにおいて、縦方向に連続する特定色画素の個数の最大値を示している。なお、上述の説明から解るように、一の特定色画素と他の特定色画素とが実際に縦方向に連続している場合だけでなく、一の特定色画素と他の特定色画素との間に、閾値THn未満の非特定色画素が存在する場合であっても、当該一の特定色画素と他の特定色画素とは縦方向に連続していると判断される。これは、スキャン画像の余白部分には、様々な原因、例えば、スキャナ部250のイメージセンサの特性や原稿台255の汚れなどに起因して、非特定色画素が、ノイズとして含まれ得るからである。換言すれば、本実施例では、一の特定色画素と他の特定色画素との間に閾値THn以上の非特定色画素が存在しないことが、注目ライン内の一の特定色画素と他の特定色画素とが縦方向に連続すると判断するための連続条件である、と言うことができる。変形例としては、連続条件は、特定色画素が実際に縦方向に連続していることであっても良い。   The maximum continuous number WCm at the time when the process proceeds to S170 indicates the maximum value of the number of specific color pixels continuous in the vertical direction in the target line. As will be understood from the above description, not only when one specific color pixel and another specific color pixel are actually continuous in the vertical direction, but also between one specific color pixel and another specific color pixel. Even if there is a non-specific color pixel below the threshold THn, it is determined that the one specific color pixel and the other specific color pixel are continuous in the vertical direction. This is because the non-specific color pixels can be included as noise in the margin portion of the scanned image due to various causes, for example, the characteristics of the image sensor of the scanner unit 250 and dirt on the document table 255. is there. In other words, in this embodiment, the fact that there is no non-specific color pixel equal to or greater than the threshold THn between one specific color pixel and another specific color pixel is that It can be said that it is a continuous condition for determining that the specific color pixel is continuous in the vertical direction. As a modification, the continuous condition may be that the specific color pixels are actually continuous in the vertical direction.

S170では、CPU410は、最大連続数WCmが閾値THm以上であるか否かを判断する。閾値THmは、例えば、処理対象のスキャン画像の縦方向の画素数の50%の値に設定される。最大連続数WCmが閾値THm以上である場合には、注目ラインは余白を構成する余白ラインであると、判断することができる。このために、最大連続数WCmが閾値THm以上である場合には(S170:YES)、CPU410は、S175にて、余白ラインの本数をカウントするための余白カウンタWLに1を加算する。   In S170, CPU 410 determines whether or not maximum continuous number WCm is equal to or greater than threshold value THm. The threshold value THm is set to, for example, a value that is 50% of the number of pixels in the vertical direction of the scan image to be processed. When the maximum continuous number WCm is equal to or greater than the threshold value THm, it can be determined that the target line is a blank line constituting the blank. Therefore, when the maximum continuous number WCm is greater than or equal to the threshold value THm (S170: YES), the CPU 410 adds 1 to the margin counter WL for counting the number of margin lines in S175.

最大連続数WCmが閾値THm未満である場合には、注目ラインは余白を構成する余白ラインではなく、原稿画像の右端を構成するラインであると、判断することができる。このために、最大連続数WCmが閾値THm未満である場合には(S170:NO)、CPU410は、S190にて、現在の余白カウンタWLの値を、処理対象のスキャン画像の余白ライン数WLNとして決定して、S195に処理を進める。余白ライン数WLNは、スキャン画像の右側の余白の横方向の長さを示す指標値である。   When the maximum continuous number WCm is less than the threshold value THm, it can be determined that the target line is not a margin line constituting a margin but a line constituting the right end of the document image. Therefore, when the maximum continuous number WCm is less than the threshold value THm (S170: NO), the CPU 410 sets the current margin counter WL value as the margin line number WLN of the scan image to be processed in S190. Then, the process proceeds to S195. The margin line number WLN is an index value indicating the horizontal length of the right margin of the scanned image.

S180では、CPU410は、処理対象のスキャン画像内の全てのラインを注目ラインとして処理したか否かを判断する。通常は、注目ラインが原稿画像の右端に達した時点で、上述したS190を経由して余白量判定処理は終了される。したがって、全てのラインが処理されることは、例えば、処理対象のスキャン画像に原稿画像が含まれていない場合などのイレギュラーな場合を除いて、発生しない。スキャン画像内に未処理のラインがある場合には(S180:NO)、CPU410は、S185にて、画素カウンタWC、ノイズカウンタNC、最大連続数WCmを初期化した後に、S105に戻って、現在の注目ラインの次の注目ラインを選択する。次の注目ラインは、処理対象の端が右端である場合には、現在の注目ラインの左側に隣接するラインであり、処理対象の端が左端である場合には、現在の注目ラインの右側に隣接するラインである。スキャン画像内の全てのラインを処理した場合には(S180:YES)、CPU410は、S190にて、現在の余白カウンタWLの値を、処理対象のスキャン画像の余白ライン数WLNとして決定して、S195に処理を進める。   In S180, the CPU 410 determines whether all lines in the scan image to be processed have been processed as the target line. Normally, when the target line reaches the right end of the document image, the margin amount determination process is terminated via S190 described above. Accordingly, the processing of all the lines does not occur except in an irregular case where, for example, a scanned image to be processed does not include a document image. If there is an unprocessed line in the scanned image (S180: NO), the CPU 410 initializes the pixel counter WC, the noise counter NC, and the maximum continuous number WCm in S185, and then returns to S105 to The next attention line of the attention line of is selected. The next target line is the line adjacent to the left side of the current target line when the end of the processing target is the right end, and the right side of the current target line when the end of the processing target is the left end. Adjacent line. When all the lines in the scan image have been processed (S180: YES), the CPU 410 determines the value of the current margin counter WL as the number of margin lines WLN of the scan image to be processed in S190, The process proceeds to S195.

S195では、CPU410は、余白ライン数WLNが閾値THw以上であるか否かを判断する。余白ライン数WLNが閾値THw以上である場合に(S195:YES)、CPU410は、S197にて、処理対象のスキャン画像の余白量は基準以上であると判定して、余白量判定処理を終了する。余白ライン数WLNが閾値THw未満である場合に(S195:NO)、CPU410は、S198にて、処理対象のスキャン画像の余白量は基準未満であると判定して、余白量判定処理を終了する。閾値THwは、例えば、処理対象のスキャン画像の横方向の解像度が300dpiである場合に、20本である。   In S195, the CPU 410 determines whether or not the number of blank lines WLN is greater than or equal to the threshold value THw. When the number of margin lines WLN is equal to or greater than the threshold value THw (S195: YES), the CPU 410 determines in S197 that the margin amount of the scan image to be processed is greater than or equal to the reference, and ends the margin amount determination processing. . When the number of margin lines WLN is less than the threshold value THw (S195: NO), the CPU 410 determines in S198 that the margin amount of the scan image to be processed is less than the reference, and ends the margin amount determination processing. . The threshold value THw is, for example, 20 when the horizontal resolution of the scan image to be processed is 300 dpi.

以上説明した余白量判定処理によれば、CPU410は、画素の値が特定の判定条件を満たす画素、具体的には、画素の値が特定色を示す所定範囲内にある画素を、特定色画素であると判定し(S115)、縦方向に特定色画素が連続することを示す連続条件を満たす特定色画素の個数、すなわち、最大連続数WCmを、算出する(S120〜S165)。そして、CPU410は、最大連続数WCmを用いて、余白量が基準以上であるか否かを判断する(S170〜S198)。この結果、余白量が基準以上であるか否かを適切に判断できる。余白は、連続する特定色画素によって構成されると考えられるからである。   According to the margin amount determination process described above, the CPU 410 determines that a pixel whose pixel value satisfies a specific determination condition, specifically, a pixel whose pixel value is within a predetermined range indicating a specific color. (S115), the number of specific color pixels satisfying the continuous condition indicating that the specific color pixels continue in the vertical direction, that is, the maximum continuous number WCm is calculated (S120 to S165). Then, CPU 410 determines whether or not the margin amount is equal to or greater than the reference using maximum continuous number WCm (S170 to S198). As a result, it is possible to appropriately determine whether or not the margin amount is greater than or equal to the reference. This is because the margin is considered to be composed of continuous specific color pixels.

具体的には、CPU410は、縦方向の複数個のラインのうち、最大連続数WCmが閾値THm以上であり、かつ、処理対象のスキャン画像内の原稿画像の処理対象の端(右端または左端)と、該スキャン画像の処理対象の端と、の間に位置する余白ラインの本数を示す余白ライン数WLNを算出し(S170〜S190)、余白ライン数WLNを用いて、余白量が基準以上であるか否かを判断する。   Specifically, the CPU 410 has a maximum continuous number WCm of a plurality of vertical lines that is equal to or greater than a threshold value THm, and the processing target end (right end or left end) of the document image in the processing target scan image. And a margin line number WLN indicating the number of margin lines positioned between the scan image processing end and the edge of the scanned image (S170 to S190), and using the margin line number WLN, the margin amount is equal to or greater than the reference. Judge whether there is.

以上のように、本実施例の余白量判定処理では、縦方向に連続する比較的多くの特定色画素を含む余白ラインが横方向に連続する本数である余白ライン数WLNが閾値THw以上であるか否かを判定条件として、余白量が基準以上であることを判断している。この判定条件は、原稿画像の右端と該スキャン画像の右端との間に含まれる縦方向や横方向に連続する複数個の特定色画素の個数が基準以上であることを示す条件である、と言うことができる。   As described above, in the margin amount determination process of the present embodiment, the number of blank lines WLN, which is the number of blank lines including a relatively large number of specific color pixels continuous in the vertical direction, is equal to or greater than the threshold value THw. Whether or not the margin amount is equal to or greater than the reference. This determination condition is a condition indicating that the number of a plurality of specific color pixels that are continuous between the right end of the document image and the right end of the scanned image in the vertical direction or the horizontal direction is equal to or greater than a reference. I can say that.

処理対象のスキャン画像が、両側余白無画像(例えば、図4(C)、(E)の画像ALa、ALc、および、図5(C)、(E)の画像ARa、ARc)である場合には、該スキャン画像の左端の余白量と右端の余白量とは、いずれも基準未満であると判断される。処理対象のスキャン画像が、片側余白無画像(例えば、図4(D)、(F)の画像ALb、ALd、および、図5(D)、(F)の画像ARb、ARd)である場合には、該スキャン画像の左右の端のうち一端は、余白量が基準未満であると判断され、他端は、余白量が基準以上であると判断される。   When the scanned image to be processed is a blank image with no margins (for example, images ALa and ALc in FIGS. 4C and 4E and images ARa and ARc in FIGS. 5C and 5E). Is determined that both the left margin amount and the right margin amount of the scanned image are less than the reference. When the scan image to be processed is a single-side marginless image (for example, images ALb and ALd in FIGS. 4D and 4F and images ARb and ARd in FIGS. 5D and 5F). Is determined that the margin amount at one end of the left and right ends of the scanned image is less than the reference, and the other end is determined that the margin amount is greater than or equal to the reference.

A−4.処理対象決定処理:
図2のS55の処理対象決定処理について説明する。図9は、第1実施例の処理対象決定処理のフローチャートである。S205では、CPU410は、以下の(1)〜(4)の4個の2端の組み合わせの中から、注目する2端の組み合わせを選択する。
(1)第1スキャン画像I12内の原稿画像の左端LT1と、第2スキャン画像I22内の原稿画像の左端LT2
(2)第1スキャン画像I12内の原稿画像の左端LT1と、第2スキャン画像I22内の原稿画像の右端RT2
(3)第1スキャン画像I12内の原稿画像の右端RT1と、第2スキャン画像I22内の原稿画像の左端LT2
(4)第1スキャン画像I12内の原稿画像の右端RT1と、第2スキャン画像I22内の原稿画像の右端RT2
これらの2端の組み合わせのいずれ1個を構成する2端で、2個のスキャン画像I12、I22を接合することで、原稿10を適切に再現することができる。
A-4. Processing target decision processing:
The process target determination process in S55 of FIG. 2 will be described. FIG. 9 is a flowchart of the processing target determination process according to the first embodiment. In S205, the CPU 410 selects a two-end combination of interest from the following two two-end combinations (1) to (4).
(1) The left end LT1 of the document image in the first scan image I12 and the left end LT2 of the document image in the second scan image I22
(2) The left end LT1 of the document image in the first scan image I12 and the right end RT2 of the document image in the second scan image I22
(3) The right end RT1 of the document image in the first scan image I12 and the left end LT2 of the document image in the second scan image I22
(4) The right end RT1 of the document image in the first scan image I12 and the right end RT2 of the document image in the second scan image I22
By joining two scanned images I12 and I22 at two ends constituting any one of these two end combinations, the document 10 can be appropriately reproduced.

S210では、CPU410は、注目する2端の組み合わせを構成する2端の余白量は、両方とも基準未満であるか否かを判断する。2端の余白量が基準以上であるか、基準未満であるかは、図2のS35〜S50の余白量判定処理にて決定済である。   In S210, the CPU 410 determines whether or not the margin amounts at the two ends constituting the combination of the two ends to be noticed are less than the reference. Whether the margin amount at the two ends is equal to or greater than the reference or less than the reference has been determined in the margin amount determination processing in S35 to S50 in FIG.

2端の余白量が両方とも基準未満である場合には(S210:YES)、S215にて、CPU410は、注目する2端の組み合わせは、第1の探索処理の処理対象であると決定する。第1の探索処理については、後述するが、処理対象の2端の組み合わせを構成する第1スキャン画像I12の一端に沿う端部画像と、処理対象の2端の組み合わせを構成する第2スキャン画像I22の一端に沿う端部画像と、が重なる第1種の配置位置を探索する処理である。原稿10を適切に再現するために接合すべき端は、図3の原稿10の中央部CA、すなわち、部分領域CALまたは部分領域CARに対応する端であるので、スキャン画像I12、I22において余白がほとんどない端であるからである。   If both margins at the two ends are less than the reference (S210: YES), in S215, the CPU 410 determines that the combination of the two ends to be noted is the processing target of the first search process. The first search process will be described later, but an end image along one end of the first scan image I12 constituting a combination of two ends to be processed and a second scan image constituting a combination of the two ends to be processed. This is a process of searching for a first type arrangement position where an end image along one end of I22 overlaps. Since the edges to be joined in order to properly reproduce the document 10 are the center CA of the document 10 in FIG. 3, that is, the edge corresponding to the partial area CAL or the partial area CAR, the margins in the scanned images I12 and I22 are present. Because there is almost no end.

2端の余白量のうち、少なくとも一方が基準以上である場合には(S210:NO)、S220にて、CPU410は、注目する2端の組み合わせは、第1の探索処理の処理対象でないと、決定する。スキャン画像I12、I22においてある程度の余白が存在する端は、原稿10を適切に再現するために接合すべき端ではないからである。   If at least one of the margins at the two ends is equal to or greater than the reference (S210: NO), in S220, the CPU 410 determines that the combination of the two ends to be noticed is not the target of the first search process. decide. This is because the edge where a certain amount of margin exists in the scanned images I12 and I22 is not the edge to be joined in order to appropriately reproduce the document 10.

S225では、全ての2端の組み合わせを注目する2端の組み合わせとして選択したか否かを判断する。未選択の2端の組み合わせがある場合には(S225:NO)、CPU410は、S205に戻って、当該2端の組み合わせを、注目する2端の組み合わせとして選択する。全ての2端の組み合わせが選択済である場合には(S225:YES)、処理対象決定処理を終了する。   In S225, it is determined whether or not all the two-end combinations are selected as the two-end combinations to be noticed. When there is an unselected two-end combination (S225: NO), the CPU 410 returns to S205 and selects the two-end combination as a focused two-end combination. When all the combinations at the two ends have been selected (S225: YES), the processing target determination process ends.

以上説明した処理対象決定処理では、第1スキャン画像I12と第2スキャン画像I22との両方が、両側余白無画像である場合には、上述した(1)〜(4)の全ての2端の組み合わせが第1の探索処理の処理対象であると決定される。   In the processing target determination process described above, when both the first scan image I12 and the second scan image I22 are both-side marginless images, all the two end points (1) to (4) described above are used. It is determined that the combination is a processing target of the first search process.

第1スキャン画像I12と第2スキャン画像I22とのうちの一方が、片側余白無画像であり、他方が両側余白無画像である場合には、片側余白無画像の左右の端のうち、余白量が基準未満である端を含む2端の組み合わせが、第1の探索処理の処理対象であると決定され、余白量が基準以上である端を含む2端の組み合わせが、第1の探索処理の処理対象でないと決定される。例えば、第1スキャン画像I12が、図4(F)の片側余白無画像ALdであり、第2スキャン画像I22が、図5(C)の両側余白無画像ARaである場合には、上述した(1)、(2)の2端の組み合わせが、第1の探索処理の処理対象であると決定され、(2)、(4)の2端の組み合わせが、第1の探索処理の処理対象でないと決定される。   If one of the first scan image I12 and the second scan image I22 is a one-sided marginless image and the other is a two-sided marginless image, the amount of margin among the left and right edges of the one-sided marginless image It is determined that the combination of the two ends including the end of which is less than the reference is the processing target of the first search process, and the combination of the two ends including the end of which the margin amount is equal to or greater than the reference is the first search process. Determined not to be processed. For example, when the first scan image I12 is the one-sided marginless image ALd in FIG. 4F and the second scan image I22 is the two-sided marginless image ARa in FIG. The combination of the two ends of 1) and (2) is determined to be the target of the first search process, and the combination of the two ends of (2) and (4) is not the target of the first search process Is determined.

第1スキャン画像I12と第2スキャン画像I22との両方が、片側余白無画像である場合には、一方の片側余白無画像の余白量が基準未満である端と、他方の片側余白無画像の余白量が基準未満である端と、から構成される2端の組み合わせが、第1の探索処理の処理対象であると決定され、それ以外の2端の組み合わせが、第1の探索処理の処理対象でないと決定される。例えば、第1スキャン画像I12が、図4(F)の片側余白無画像ALdであり、第2スキャン画像I22が、図5(D)の片側余白無画像ARbである場合には、上述した(1)の2端の組み合わせが、第1の探索処理の処理対象であると決定され、(2)〜(4)の2端の組み合わせが、第1の探索処理の処理対象でないと決定される。   When both the first scan image I12 and the second scan image I22 are single-sided marginless images, the edge where the margin amount of one one-sided marginless image is less than the reference and the other one-sided marginless image It is determined that a combination of two ends composed of an end having a margin amount less than the reference and a target of the first search process is determined as a combination of two ends, and a combination of the other two ends is a process of the first search process. It is determined that it is not the target. For example, when the first scan image I12 is the one-sided marginless image ALd in FIG. 4F and the second scan image I22 is the one-sided marginless image ARb in FIG. The combination of the two ends of 1) is determined to be the processing target of the first search process, and the combination of the two ends of (2) to (4) is determined not to be the processing target of the first search process. .

A−5.配置位置決定処理:
図2のS65の配置位置決定処理について説明する。図10は、第1実施例の配置位置決定処理のフローチャートである。S230では、CPU410は、上述した(1)〜(4)の2端の組み合わせのうち、処理対象決定処理にて第1の探索処理の処理対象であると決定された1個以上の2端の組み合わせの中から、1個の組み合わせを選択する。S235では、CPU410は、選択された2端の組み合わせについて第1の探索処理を実行する。
A-5. Arrangement position determination processing:
The arrangement position determination process in S65 of FIG. 2 will be described. FIG. 10 is a flowchart of the arrangement position determination process of the first embodiment. In S230, the CPU 410, among the combinations of the two ends of (1) to (4) described above, has one or more two-ends determined to be processing targets of the first search processing in the processing target determination processing. One combination is selected from the combinations. In S235, the CPU 410 executes a first search process for the selected combination of the two ends.

図11は、第1の探索処理のフローチャートである。図12は、第1の探索処理の説明図である。図12では、図6(B)の第1スキャン画像I12内の原稿画像の右端RT1と、第2スキャン画像I22内の原稿画像の右端RT2と、の組み合わせが、処理対象の2端の組み合わせである場合を例として図示されている。以下、処理対象の2端の組み合わせを構成する端(例えば、図12の第1スキャン画像I12内の原稿画像の右端RT1や、第2スキャン画像I22内の原稿画像の右端RT2)を各スキャン画像の処理対象の端とも呼ぶ。   FIG. 11 is a flowchart of the first search process. FIG. 12 is an explanatory diagram of the first search process. In FIG. 12, the combination of the right end RT1 of the original image in the first scan image I12 and the right end RT2 of the original image in the second scan image I22 in FIG. 6B is a combination of two ends to be processed. A case is shown as an example. Hereinafter, the ends constituting the combination of the two ends to be processed (for example, the right end RT1 of the document image in the first scan image I12 in FIG. 12 and the right end RT2 of the document image in the second scan image I22) are each scanned image. It is also called the end of the processing target.

S300では、CPU410は、スキャン画像I12、I22に対して、余白の削除と回転を実行する。具体的には、各スキャン画像の処理対象の端の余白が除去される。具体的には、処理対象の端の余白量判定処理にて、余白ラインであると判断されたラインと、余白ラインより外側の部分(すなわち、処理開始位置STPより外側の部分)と、をスキャン画像I12、I22から削除する。また、第1スキャン画像I12と第2スキャン画像I22とを左右に並べた場合に、第1スキャン画像I12の処理対象の端と、第2スキャン画像I22の処理対象の端と、が互いに対向するように、スキャン画像を回転させる。例えば、図12の例では、第1スキャン画像I12内の右端と、第2スキャン画像I22内の右端と、の余白が削除され、これらの2端が対向するように、第2スキャン画像I22が180度回転されている。処理対象の端の余白量は、基準以下であり、実質的に余白はないので、実質的には、処理開始位置STP(図6(B))より右側の僅かな部分だけが削除されるだけである。図12では、原稿画像AIL、AIRの内部の図示は省略し、符号付きの矢印のみを図示する。   In S300, the CPU 410 executes blank deletion and rotation on the scanned images I12 and I22. Specifically, the margin at the end of the processing target of each scanned image is removed. Specifically, the line determined to be a margin line in the margin amount determination process at the edge to be processed and the portion outside the margin line (that is, the portion outside the processing start position STP) are scanned. Delete from the images I12 and I22. Further, when the first scan image I12 and the second scan image I22 are arranged side by side, the processing target end of the first scan image I12 and the processing target end of the second scan image I22 face each other. Rotate the scanned image so that For example, in the example of FIG. 12, the margin of the right end in the first scan image I12 and the right end in the second scan image I22 is deleted, and the second scan image I22 is such that these two ends face each other. It has been rotated 180 degrees. The margin amount at the end of the processing target is less than the reference, and there is substantially no margin. Therefore, only a slight portion on the right side of the processing start position STP (FIG. 6B) is substantially deleted. It is. In FIG. 12, illustration of the inside of the document images AIL and AIR is omitted, and only a signed arrow is shown.

S302では、CPU410は、第2スキャン画像I22内に、第2スキャン画像I22の一部の領域である基準領域SPaを決定する。図12に示すように、基準領域SPaは、第2スキャン画像I22内の所定の位置に配置された所定のサイズの矩形領域に決定される。また、基準領域SPaは、第2スキャン画像I22の処理対象の端の近傍に、当該処理対象の端に沿って配置される。例えば、基準領域SPaの横方向の長さは、例えば、50画素〜150画素であり、基準領域SPaの縦方向の長さは、第2スキャン画像I22の縦方向の長さの1/4〜1/2である。   In S302, the CPU 410 determines a reference area SPa that is a partial area of the second scan image I22 in the second scan image I22. As shown in FIG. 12, the reference area SPa is determined to be a rectangular area having a predetermined size arranged at a predetermined position in the second scan image I22. The reference area SPa is arranged in the vicinity of the processing target end of the second scan image I22 along the processing target end. For example, the horizontal length of the reference area SPa is, for example, 50 to 150 pixels, and the vertical length of the reference area SPa is ¼ to the vertical length of the second scan image I22. 1/2.

S305では、CPU410は、候補領域を決定するための所定の参照範囲REaに基づいて決定される複数個の候補領域の中から、1個の注目候補領域を決定する。参照範囲REaは、例えば、図12に示すように、第1スキャン画像I12の処理対象の端の近傍部分に破線で示す範囲である。参照範囲REaは、縦M1画素×横N1画素分の矩形の範囲である(M1、N1は、2以上の整数)。N1は、例えば、数100であり、M1は、例えば、数十から数百である。参照範囲REaの右端は、例えば、第1スキャン画像I12の右端と一致している。参照範囲REaの横方向の幅は、例えば、原稿10における中央部CAの幅に相当する長さを有している。第1スキャン画像I12における参照範囲REaの縦方向の中心の位置は、第2スキャン画像I22における基準領域SPaの上端と同じである。   In S305, the CPU 410 determines one candidate region of interest from among a plurality of candidate regions determined based on a predetermined reference range REa for determining a candidate region. For example, as illustrated in FIG. 12, the reference range REa is a range indicated by a broken line in the vicinity of the processing target end of the first scan image I12. The reference range REa is a rectangular range of M1 vertical pixels × N1 horizontal pixels (M1 and N1 are integers of 2 or more). N1 is several hundreds, for example, and M1 is several tens to several hundreds, for example. For example, the right end of the reference range REa matches the right end of the first scan image I12. The horizontal width of the reference range REa has a length corresponding to the width of the central portion CA in the document 10, for example. The position of the center in the vertical direction of the reference range REa in the first scan image I12 is the same as the upper end of the reference region SPa in the second scan image I22.

CPU410は、参照範囲REa内の(M1×N1)個の画素位置から、1個の注目画素位置を選択する。CPU410は、当該注目画素位置に、基準領域SPaの左上の画素Pd(図12)が位置するように、基準領域SPaを配置した場合に、基準領域SPaと重なる第1スキャン画像I12内の領域が注目候補領域として特定される。候補領域が設定され得る領域である探索領域SAaは、図12に示すように、第1スキャン画像I12の処理対象の端に沿う領域である。   The CPU 410 selects one target pixel position from (M1 × N1) pixel positions within the reference range REa. When the reference area SPa is arranged such that the upper left pixel Pd (FIG. 12) of the reference area SPa is positioned at the target pixel position, the CPU 410 has an area in the first scan image I12 that overlaps the reference area SPa. It is specified as the attention candidate area. The search area SAa, which is an area where the candidate area can be set, is an area along the processing target end of the first scan image I12 as shown in FIG.

1個の注目候補領域が特定されると、S310では、CPU410は、注目候補領域の類似率(SC/Nt)を算出する。注目候補領域の類似率(SC/Nt)は、注目候補領域と、基準領域SPaとが類似している程度を示す指標値である。   When one attention candidate area is specified, in S310, the CPU 410 calculates a similarity ratio (SC / Nt) of the attention candidate area. The similarity rate (SC / Nt) of the attention candidate area is an index value indicating the degree of similarity between the attention candidate area and the reference area SPa.

類似率(SC/Nt)の算出方法は、以下のとおりである。先ず、CPU410は、注目候補領域内の複数個の画素を1個ずつ注目画素として選択して、注目画素が、類似画素であるか非類似画素であるかを判断する。具体的には、CPU410は、注目候補領域内の注目画素の成分値と、当該注目画素に対応する基準領域SPa内の画素の成分値と、の差ΔVPを算出する。注目画素に対応する基準領域SPa内の画素は、注目候補領域と基準領域SPaとを重ねた場合に、注目画素と重なる基準領域SPa内の画素である。差ΔVPを算出すべき2個の画素の成分値を、(R1、G1、B1)と(R2、G2、B2)とする。差ΔVPは、例えば、3種類の成分値間の差分の絶対値の和で表される。すなわち、差ΔVPは、(R1−R2)の絶対値と、(G1−G2)の絶対値と、(B1−B2)の絶対値と、の合計値で表される。   The calculation method of the similarity ratio (SC / Nt) is as follows. First, the CPU 410 selects a plurality of pixels in the target candidate region one by one as the target pixel, and determines whether the target pixel is a similar pixel or a dissimilar pixel. Specifically, the CPU 410 calculates a difference ΔVP between the component value of the target pixel in the target candidate region and the component value of the pixel in the reference region SPa corresponding to the target pixel. A pixel in the reference region SPa corresponding to the target pixel is a pixel in the reference region SPa that overlaps the target pixel when the target candidate region and the reference region SPa are overlapped. The component values of the two pixels for which the difference ΔVP is to be calculated are (R1, G1, B1) and (R2, G2, B2). The difference ΔVP is represented by, for example, the sum of absolute values of differences between three types of component values. That is, the difference ΔVP is represented by the sum of the absolute value of (R1−R2), the absolute value of (G1−G2), and the absolute value of (B1−B2).

CPU410は、算出された差ΔVPが、所定の基準値TH1以下である場合には、注目画素が類似画素であると判断し、算出された差ΔVPが、所定の基準値TH1より大きい場合には、注目画素が非類似画素であると判断する。差ΔVPが、所定の基準値TH1以下である場合には、注目候補領域内の注目画素の色と、当該注目画素に対応する基準領域SPa内の画素の色とは、類似すると判断できるからである。   The CPU 410 determines that the target pixel is a similar pixel when the calculated difference ΔVP is equal to or smaller than the predetermined reference value TH1, and when the calculated difference ΔVP is larger than the predetermined reference value TH1. , It is determined that the target pixel is a dissimilar pixel. When the difference ΔVP is equal to or smaller than the predetermined reference value TH1, it can be determined that the color of the target pixel in the target candidate region and the color of the pixel in the reference region SPa corresponding to the target pixel are similar. is there.

CPU410は、注目候補領域内の類似画素の個数SCを、注目候補領域内の画素の総数Ntで除することによって、注目候補領域の類似率(SC/Nt)を算出する。類似率(SC/Nt)は、注目候補領域内の画素の総数Ntに対する類似画素の個数SCの割合である。類似率(SC/Nt)が大きいほど、基準領域SPaと、注目候補領域とは、類似している。   The CPU 410 calculates the similarity ratio (SC / Nt) of the target candidate region by dividing the number SC of similar pixels in the target candidate region by the total number Nt of pixels in the target candidate region. The similarity ratio (SC / Nt) is a ratio of the number SC of similar pixels to the total number Nt of pixels in the target candidate region. The larger the similarity ratio (SC / Nt), the more similar the reference area SPa and the attention candidate area.

S315は、CPU410は、類似率(SC/Nt)が、閾値TH2以上であるか否かを判断する。即ち、CPU410は、現在の注目候補領域が基準領域SPaに類似しているか否かを判断する。   In S315, the CPU 410 determines whether or not the similarity ratio (SC / Nt) is equal to or higher than a threshold value TH2. That is, the CPU 410 determines whether or not the current candidate region for attention is similar to the reference region SPa.

類似率(SC/Nt)が、閾値TH2以上である場合、即ち、現在の注目候補領域が基準領域SPaに類似していると判断する場合には(S315:YES)、CPU410は、S320にて、現在の注目候補領域を、基準領域SPaに類似する類似領域として記憶して、S325に処理を進める。   When the similarity ratio (SC / Nt) is equal to or greater than the threshold value TH2, that is, when it is determined that the current candidate region of interest is similar to the reference region SPa (S315: YES), the CPU 410 proceeds to S320. The current candidate region for attention is stored as a similar region similar to the reference region SPa, and the process proceeds to S325.

類似率(SC/Nt)が、閾値TH2未満である場合には(S315:NO)、CPU410は、S320をスキップして、S325に処理を進める。   When the similarity ratio (SC / Nt) is less than the threshold value TH2 (S315: NO), the CPU 410 skips S320 and proceeds to S325.

S325では、CPU410は、参照範囲REa内の(M1×N1)個の画素位置に対応する(M1×N1)個の候補領域の全てを注目候補領域として処理したか否かを判断する。未処理の候補領域がある場合には(S325:NO)、CPU410は、S305に戻って、未処理の候補領域を注目候補領域として特定する。全ての候補領域が処理された場合には(S325:YES)、CPU410は、S330に処理を進める。   In S325, the CPU 410 determines whether or not all (M1 × N1) candidate areas corresponding to the (M1 × N1) pixel positions in the reference range REa have been processed as the target candidate areas. When there is an unprocessed candidate area (S325: NO), the CPU 410 returns to S305 and identifies the unprocessed candidate area as the attention candidate area. If all candidate areas have been processed (S325: YES), the CPU 410 advances the process to S330.

S330では、CPU410は、(M1×N1)個の候補領域の中に1個以上の類似領域があるか否かを判断する。すなわち、S320にて類似領域として記憶された候補領域が1個以上あるか否かが判断される。1個以上の類似領域がある場合には(S330:YES)、S335にて、CPU410は、1個以上の類似領域の中から、S310にて算出された類似率(SC/Nt)が最も高い1個の類似領域CPaを、現在の処理対象の2端の組み合わせにおける最終的な1個の類似領域CPaとして決定する。1個の類似領域CPaが決定されると、第1の探索処理は、終了される。   In S330, the CPU 410 determines whether or not there are one or more similar regions in the (M1 × N1) candidate regions. That is, it is determined whether there are one or more candidate areas stored as similar areas in S320. If there is one or more similar areas (S330: YES), in S335, the CPU 410 has the highest similarity ratio (SC / Nt) calculated in S310 among the one or more similar areas. One similar area CPa is determined as the final one similar area CPa in the combination of the two ends to be processed. When one similar region CPa is determined, the first search process is terminated.

1個以上の類似領域がない場合には(S330:NO)、CPU410は、S335をスキップして、第1の探索処理を終了する。したがって、この場合には、類似領域CPaは決定されない。   If there is no one or more similar regions (S330: NO), the CPU 410 skips S335 and ends the first search process. Therefore, in this case, the similar region CPa is not determined.

第1の探索処理が終了すると、図10のS240では、第1の探索処理の処理対象であると決定された2端の組み合わせを全て選択したか否かを判断する。未選択の2端の組み合わせがある場合には(S240:NO)、CPU410は、S230に戻って、当該2端の組み合わせを選択する。全ての処理対象の2端の組み合わせが選択済である場合には(S240:YES)、CPU410は、S245に処理を進める。   When the first search process is completed, it is determined in S240 of FIG. 10 whether or not all the combinations of the two ends determined to be the target of the first search process have been selected. If there is an unselected two-end combination (S240: NO), the CPU 410 returns to S230 and selects the two-end combination. When all the combinations of the two ends to be processed have been selected (S240: YES), the CPU 410 advances the process to S245.

S245では、CPU410は、処理対象の2端の組み合わせの中に、図11の第1の探索処理のS335にて、類似領域CPaが決定された2端の組み合わせがあるか否かを判断する。通常は、互いを接合することで原稿10を正しく再現できる2端の組み合わせが処理対象である場合には、第1の探索処理にて類似領域CPaが決定される可能性が高く、原稿10を正しく再現できる2端の組み合わせが処理対象でない場合には、第1の探索処理にて類似領域CPaが決定されない可能性が高い。   In S245, the CPU 410 determines whether there is a combination of two ends for which the similar area CPa is determined in S335 of the first search process in FIG. 11 among the combinations of the two ends to be processed. Usually, when a combination of two ends that can correctly reproduce the document 10 by joining them together is a processing target, it is highly likely that the similar region CPa is determined in the first search process, and the document 10 is When a combination of two ends that can be correctly reproduced is not a processing target, there is a high possibility that the similar region CPa is not determined in the first search process.

類似領域CPaが決定された2端の組み合わせが1個以上ある場合には(S245:YES)、S250にて、CPU410は、当該1個以上の2端の組み合わせのうち、類似率(SC/Nt)が最も高い類似領域CPaが決定された2端の組み合わせにて、第1種の配置位置を決定する。すなわち、その2端の組み合わせについての第1の探索処理で用いられた基準領域SPaと、決定された類似領域CPaと、が重なるように、第1スキャン画像I11と第1スキャン画像I12との相対的な配置位置(すなわち、左側原稿画像AILと右側原稿画像AIRとの相対的な配置位置)が、決定される。例えば、上述した図7の配置済画像OIAの例では、図6(B)の第1スキャン画像I12内の原稿画像の右端RT1と、第2スキャン画像I22内の原稿画像の右端RT2と、の組み合わせが、配置位置を決定すべき2端の組み合わせである。この配置済画像OIAでは、第1スキャン画像I12内の原稿画像の右端RT1に沿う類似領域CPaと、第2スキャン画像I22内の原稿画像の右端RT2に沿う基準領域SPbと、が重なるように、配置位置が決定される。   If there are one or more two-end combinations for which the similar region CPa is determined (S245: YES), in S250, the CPU 410 determines the similarity ratio (SC / Nt) among the one or more two-end combinations. The arrangement position of the first type is determined by the combination of the two ends where the similar region CPa having the highest) is determined. That is, the relative relationship between the first scan image I11 and the first scan image I12 is such that the reference region SPa used in the first search process for the combination of the two ends overlaps the determined similar region CPa. Is determined (that is, a relative arrangement position between the left original image AIL and the right original image AIR). For example, in the example of the arranged image OIA in FIG. 7 described above, the right end RT1 of the document image in the first scan image I12 in FIG. 6B and the right end RT2 of the document image in the second scan image I22. The combination is a two-end combination whose arrangement position is to be determined. In this arranged image OIA, the similar region CPa along the right end RT1 of the document image in the first scan image I12 and the reference region SPb along the right end RT2 of the document image in the second scan image I22 overlap. An arrangement position is determined.

類似領域CPaが決定された2端の組み合わせがない場合には(S245:NO)、S255にて、CPU410は、2個のスキャン画像I12、I22(2個の原稿画像AIL、AIR)の相対的な配置位置をデフォルトの位置に決定する。デフォルトの位置は、例えば、単純に第1スキャン画像I12の右端と第2スキャン画像I22の左端とが、全長において接する位置である。   If there is no combination of the two ends for which the similar area CPa is determined (S245: NO), in S255, the CPU 410 compares the two scanned images I12 and I22 (two original images AIL and AIR) with each other. The default position is determined. The default position is, for example, a position where the right end of the first scan image I12 and the left end of the second scan image I22 are in contact with each other over the entire length.

以上説明した第1実施例によれば、原稿画像(AILまたはAIR)を含む第1スキャン画像I12を表す第1のスキャンデータと、原稿画像(AILまたはAIR)を含む第2スキャン画像I22を表す第2の画像データと、が取得される(図2のS25、S30)。そして、第1スキャン画像I12の左右の両端の余白量が基準以上であるか否かがそれぞれ判断される(図2のS35、40)。そして、第1スキャン画像I12の左右の両端の余白量が基準以上であるか否かを用いて、図9に示すように、処理対象の2端の組み合わせが決定され、図10に示すように、処理対象に決定された2端の組み合わせについて第1の探索処理が実行されることによって、2個の原稿画像AIL、AIRの第1種の配置位置が決定される。   According to the first embodiment described above, the first scan data representing the first scan image I12 including the document image (AIL or AIR) and the second scan image I22 including the document image (AIL or AIR) are represented. Second image data is acquired (S25 and S30 in FIG. 2). Then, it is determined whether or not the margin amounts at the left and right ends of the first scan image I12 are greater than or equal to the reference (S35 and S40 in FIG. 2). Then, the combination of the two ends to be processed is determined as shown in FIG. 9 using whether or not the margins at the left and right ends of the first scan image I12 are greater than or equal to the reference, and as shown in FIG. The first search process is executed for the combination of the two ends determined as the processing target, whereby the first type arrangement position of the two document images AIL and AIR is determined.

例えば、第1スキャン画像I12の右端の余白量が基準未満である場合には、図9の処理対象決定処理では、第1スキャン画像I12内の原稿画像の右端RT1と第2スキャン画像I22内の原稿画像の右端RT2との組み合わせと、第1スキャン画像I12内の原稿画像の右端RT1と第2スキャン画像I22内の原稿画像の左端LT2との組み合わせと、の少なくとも一方が、処理対象の2端の組み合わせとして決定される。したがって、この場合には、図10の配置位置決定処理では、右端RT1に沿う端部画像と、右端RT2に沿う端部画像と左端LT2に沿う端部画像とのうちの少なくとも一方を用いて、第1の探索処理(図10のS235)が実行される。   For example, when the amount of margin at the right end of the first scan image I12 is less than the reference, in the processing target determination process of FIG. 9, the right end RT1 of the document image in the first scan image I12 and the second scan image I22 At least one of a combination with the right end RT2 of the original image and a combination of the right end RT1 of the original image in the first scan image I12 and the left end LT2 of the original image in the second scan image I22 is two ends to be processed. Determined as a combination. Therefore, in this case, in the arrangement position determination process of FIG. 10, at least one of an end image along the right end RT1, an end image along the right end RT2, and an end image along the left end LT2 is used. The first search process (S235 in FIG. 10) is executed.

逆に、第1スキャン画像I12の右端の余白量が基準以上である場合には、図9の処理対象決定処理では、第1スキャン画像I12内の原稿画像の右端RT1を含む2端の組み合わせは、処理対象の2端の組み合わせに決定されない。したがって、この場合には、図10の配置位置決定処理では、右端RT1に沿う端部画像を用いずに、第1の探索処理(図10のS235)が実行される。   Conversely, if the amount of margin at the right end of the first scan image I12 is greater than or equal to the reference, the combination of the two ends including the right end RT1 of the document image in the first scan image I12 is determined in the process target determination process of FIG. The combination of the two ends to be processed is not determined. Therefore, in this case, in the arrangement position determination process in FIG. 10, the first search process (S235 in FIG. 10) is executed without using the end image along the right end RT1.

そして、例えば、第1スキャン画像I12の左端の余白量が基準未満である場合には、図9の処理対象決定処理では、第1スキャン画像I12内の原稿画像の左端LT1と第2スキャン画像I22内の原稿画像の右端RT2との組み合わせと、第1スキャン画像I12内の原稿画像の左端LT1と第2スキャン画像I22内の原稿画像の左端LT2との組み合わせと、の少なくとも一方が、処理対象の2端の組み合わせとして決定される。したがって、この場合には、図10の配置位置決定処理では、左端LT1に沿う端部画像と、右端RT2に沿う端部画像と左端LT2に沿う端部画像とのうちの少なくとも一方を用いて、第1の探索処理(図10のS235)が実行される。   For example, when the amount of margin at the left end of the first scan image I12 is less than the reference, in the processing target determination process of FIG. 9, the left end LT1 of the document image in the first scan image I12 and the second scan image I22. At least one of the combination with the right end RT2 of the original image in the image and the combination of the left end LT1 of the original image in the first scan image I12 and the left end LT2 of the original image in the second scan image I22 Determined as a two-end combination. Therefore, in this case, in the arrangement position determination process in FIG. 10, at least one of the end image along the left end LT1, the end image along the right end RT2, and the end image along the left end LT2 is used. The first search process (S235 in FIG. 10) is executed.

逆に、第1スキャン画像I12の左端の余白量が基準以上である場合には、図9の処理対象決定処理では、第1スキャン画像I12内の原稿画像の左端LT1を含む2端の組み合わせは、処理対象の2端の組み合わせに決定されない。したがって、この場合には、図10の配置位置決定処理では、左端LT1に沿う端部画像を用いずに、第1の探索処理(図10のS235)が実行される。   On the other hand, when the amount of margin at the left end of the first scan image I12 is greater than or equal to the reference, the combination of the two ends including the left end LT1 of the document image in the first scan image I12 is determined in the processing target determination process of FIG. The combination of the two ends to be processed is not determined. Therefore, in this case, in the arrangement position determination process in FIG. 10, the first search process (S235 in FIG. 10) is executed without using the end image along the left end LT1.

この結果、第1スキャン画像I12内の原稿画像のうち、余白量が基準以上である端に沿う端部画像を用いずに第1の探索処理が実行されるので、適切な配置位置の決定に寄与しない第1の探索処理が実行されることを抑制できる。この結果、第1の探索処理の処理時間を低減できる。したがって、配置済画像を表す画像データを生成する際の処理時間を低減できる。   As a result, the first search process is executed without using the edge image along the edge whose margin amount is greater than or equal to the reference among the document images in the first scan image I12. Execution of the first search process that does not contribute can be suppressed. As a result, the processing time of the first search process can be reduced. Therefore, it is possible to reduce the processing time when generating image data representing the arranged image.

さらに、第1実施例では、第2スキャン画像I22の左右の両端の余白量が基準以上であるか否かがそれぞれ判断される(図2のS45、40)。そして、第2スキャン画像I22の左右の両端の余白量が基準以上であるか否かを用いて、図9に示すように、処理対象の2端の組み合わせが決定され、図10に示すように、処理対象に決定された2端の組み合わせについて第1の探索処理が実行されることによって、2個の原稿画像AIL、AIRの第1種の配置位置が決定される。   Furthermore, in the first embodiment, it is determined whether or not the margin amounts at the left and right ends of the second scan image I22 are greater than or equal to the reference (S45 and S40 in FIG. 2). Then, the combination of the two ends to be processed is determined as shown in FIG. 9 using whether or not the margins at the left and right ends of the second scan image I22 are greater than or equal to the reference, and as shown in FIG. The first search process is executed for the combination of the two ends determined as the processing target, whereby the first type arrangement position of the two document images AIL and AIR is determined.

例えば、第2スキャン画像I22の右端の余白量が基準未満である場合には、図9の処理対象決定処理では、第2スキャン画像I22内の原稿画像の右端RT2と第1スキャン画像I12内の原稿画像の右端RT1との組み合わせと、第2スキャン画像I22内の原稿画像の右端RT2と第1スキャン画像I12内の原稿画像の左端LT1との組み合わせと、の少なくとも一方が、処理対象の2端の組み合わせとして決定される。したがって、この場合には、図10の配置位置決定処理では、右端RT2に沿う端部画像と、右端RT1に沿う端部画像と左端LT1に沿う端部画像とのうちの少なくとも一方を用いて、第1の探索処理(図10のS235)が実行される。   For example, when the amount of margin at the right end of the second scan image I22 is less than the reference, in the processing target determination process of FIG. 9, the right end RT2 of the document image in the second scan image I22 and the first scan image I12 At least one of the combination with the right end RT1 of the document image and the combination of the right end RT2 of the document image in the second scan image I22 and the left end LT1 of the document image in the first scan image I12 is two ends to be processed. Determined as a combination. Therefore, in this case, in the arrangement position determination process of FIG. 10, at least one of the end image along the right end RT2, the end image along the right end RT1, and the end image along the left end LT1 is used. The first search process (S235 in FIG. 10) is executed.

逆に、第2スキャン画像I22の右端の余白量が基準以上である場合には、図9の処理対象決定処理では、第2スキャン画像I22内の原稿画像の右端RT2を含む2端の組み合わせは、処理対象の2端の組み合わせに決定されない。したがって、この場合には、図10の配置位置決定処理では、右端RT2に沿う端部画像を用いずに、第1の探索処理(図10のS235)が実行される。   Conversely, if the amount of margin at the right end of the second scan image I22 is greater than or equal to the reference, the combination of the two ends including the right end RT2 of the document image in the second scan image I22 is determined in the processing target determination process of FIG. The combination of the two ends to be processed is not determined. Therefore, in this case, in the arrangement position determination process in FIG. 10, the first search process (S235 in FIG. 10) is executed without using the end image along the right end RT2.

そして、例えば、第2スキャン画像I22の左端の余白量が基準未満である場合には、図9の処理対象決定処理では、第2スキャン画像I22内の原稿画像の左端LT2と第1スキャン画像I12内の原稿画像の右端RT1との組み合わせと、第2スキャン画像I22内の原稿画像の左端LT2と第1スキャン画像I12内の原稿画像の左端LT1との組み合わせと、の少なくとも一方が、処理対象の2端の組み合わせとして決定される。したがって、この場合には、図10の配置位置決定処理では、左端LT2に沿う端部画像と、右端RT1に沿う端部画像と左端LT1に沿う端部画像とのうちの少なくとも一方を用いて、第1の探索処理(図10のS235)が実行される。   For example, when the amount of margin at the left end of the second scan image I22 is less than the reference, in the processing target determination process of FIG. 9, the left end LT2 of the document image in the second scan image I22 and the first scan image I12. At least one of a combination with the right end RT1 of the original image in the image and a combination of the left end LT2 of the original image in the second scan image I22 and the left end LT1 of the original image in the first scan image I12 Determined as a two-end combination. Therefore, in this case, in the arrangement position determination process in FIG. 10, at least one of the end image along the left end LT2, the end image along the right end RT1, and the end image along the left end LT1 is used. The first search process (S235 in FIG. 10) is executed.

逆に、第2スキャン画像I22の左端の余白量が基準以上である場合には、図9の処理対象決定処理では、第2スキャン画像I22内の原稿画像の左端LT2を含む2端の組み合わせは、処理対象の2端の組み合わせに決定されない。したがって、この場合には、図10の配置位置決定処理では、左端LT2に沿う端部画像を用いずに、第1の探索処理(図10のS235)が実行される。   On the contrary, if the margin amount at the left end of the second scan image I22 is greater than or equal to the reference, the combination of the two ends including the left end LT2 of the document image in the second scan image I22 is determined in the processing target determination process of FIG. The combination of the two ends to be processed is not determined. Therefore, in this case, in the arrangement position determination process of FIG. 10, the first search process (S235 of FIG. 10) is executed without using the end image along the left end LT2.

この結果、第2スキャン画像I22内の原稿画像のうち、余白量が基準以上である端に沿う端部画像を用いずに第1の探索処理が実行されるので、適切な配置位置の決定に寄与しない第1の探索処理が実行されることをさらに抑制できる。この結果、第1の探索処理の処理時間をさらに低減できる。したがって、配置済画像を表す画像データを生成する際の処理時間をさらに低減できる。   As a result, the first search process is executed without using the edge image along the edge whose margin amount is greater than or equal to the reference among the document images in the second scan image I22. Execution of the first search process that does not contribute can be further suppressed. As a result, the processing time of the first search process can be further reduced. Therefore, it is possible to further reduce the processing time when generating image data representing the arranged image.

より具体的には、第1スキャン画像I12の右端の余白量が基準未満であり、かつ、第1スキャン画像I12の左端の余白量が基準以上であり、かつ、第2スキャン画像I22の右端の余白量が基準未満であり、かつ、第2スキャン画像I22の左端の余白量が基準以上である場合には、第1スキャン画像I12内の原稿画像の右端RT1と、第2スキャン画像I22内の原稿画像の右端RT2と、の組み合わせが、処理対象の2端の組み合わせに決定され、それ以外の2端の組み合わせは処理対象の2端の組み合わせに決定されない。したがって、この場合には、第1スキャン画像I12内の原稿画像の左端LT1に沿う端部画像と、第2スキャン画像I22内の原稿画像の左端LT2に沿う端部画像と、を用いずに、第1スキャン画像I12内の原稿画像の右端RT1に沿う端部画像と、第2スキャン画像I22内の原稿画像の右端RT2に沿う端部画像と、を用いて、第1の探索処理が実行される。したがって、余白量が基準以上であるかに基づいて、必要な端部画像のみを用いて第1の探索処理が実行されるので、配置済画像を表す画像データを生成する際の処理時間をさらに低減できる   More specifically, the margin amount at the right end of the first scan image I12 is less than the reference, the margin amount at the left end of the first scan image I12 is greater than or equal to the reference, and the margin amount at the right end of the second scan image I22. When the margin amount is less than the reference and the margin amount at the left end of the second scan image I22 is greater than or equal to the reference, the right end RT1 of the document image in the first scan image I12 and the second scan image I22 The combination with the right end RT2 of the document image is determined to be a combination of two ends to be processed, and the other two ends are not determined to be a combination of two ends to be processed. Therefore, in this case, without using the end image along the left end LT1 of the document image in the first scan image I12 and the end image along the left end LT2 of the document image in the second scan image I22, The first search process is executed using the end image along the right end RT1 of the document image in the first scan image I12 and the end image along the right end RT2 of the document image in the second scan image I22. The Therefore, since the first search process is executed using only the necessary edge image based on whether the margin amount is equal to or larger than the reference, the processing time for generating the image data representing the arranged image is further increased. Can be reduced

以上の説明から解るように、第1スキャン画像I12内の原稿画像が、第1の対象画像の例であり、第2スキャン画像I22内の原稿画像が、第2の対象画像の例である。また、右端は、第1方向の端の例であり、左端は、第2方向の端の例である。また、特定色画素は、第1〜第4の画素の例である。   As can be understood from the above description, the document image in the first scan image I12 is an example of the first target image, and the document image in the second scan image I22 is an example of the second target image. The right end is an example of an end in the first direction, and the left end is an example of an end in the second direction. The specific color pixel is an example of first to fourth pixels.

B.第2実施例:
B−1.スキャンパターンB
第2実施例では、図4、図5のスキャンパターンAの方法に加えて、以下に説明するスキャンパターンBの方法で、2回の読み取りが実行されて、2個のスキャンデータが生成される可能性がある。
B. Second embodiment:
B-1. Scan pattern B
In the second embodiment, in addition to the method of scan pattern A shown in FIGS. 4 and 5, the scan pattern B described below is used to perform two readings to generate two scan data. there is a possibility.

図13は、スキャンパターンBの説明図である。スキャンパターンBでは、図13(A)に示すように、原稿10は、折れ線VLで二つ折りにされた状態で、スキャナ部250によって読み取られる。折れ線VLは、図3の線CLと同じ位置の線である。従って、二つ折りにされた状態の原稿10のサイズは、A4サイズである。二つ折りにされた状態の原稿10の一方の面には右領域10Rが位置し、他方の面には、左領域10Lが位置する。   FIG. 13 is an explanatory diagram of the scan pattern B. In the scan pattern B, as shown in FIG. 13A, the document 10 is read by the scanner unit 250 in a state where the document 10 is folded in half along a broken line VL. The broken line VL is a line at the same position as the line CL in FIG. Accordingly, the size of the document 10 in a folded state is A4 size. The right area 10R is located on one side of the document 10 in a folded state, and the left area 10L is located on the other side.

スキャンパターンBの2回の読み取りの一方では、図13(B)、(C)に示すように、左領域10Lを含み、右領域10Rを含まない画像(以下、左側原稿画像BILとも呼ぶ)が読み取られて、左側原稿画像BILを示す左側スキャンデータが生成される。スキャンパターンBの2回の読み取りの他方では、図13(D)、(E)に示すように、右領域10Rを含み、左領域10Lを含まない画像(以下、右側原稿画像BIRとも呼ぶ)が読み取られて、右側原稿画像BIRを示す右側スキャンデータが生成される。左側原稿画像BILと、右側原稿画像BIRと、のうちのいずれが先に読み取られるかは、ユーザ次第であり、複合機200やサーバ400は、いずれが先に読み取られたかを認識できない。   On the other hand, as shown in FIGS. 13B and 13C, an image including the left region 10L and not including the right region 10R (hereinafter, also referred to as a left original image BIL) is obtained while scanning pattern B is read twice. The left side scan data indicating the left side original image BIL is generated by being read. As shown in FIGS. 13D and 13E, on the other side of the two scanning patterns B, an image including the right region 10R and not including the left region 10L (hereinafter also referred to as a right original image BIR) is obtained. The right side scan data indicating the right side original image BIR is generated by being read. Which of the left original image BIL and the right original image BIR is read first depends on the user, and the multifunction device 200 and the server 400 cannot recognize which was read first.

左側原稿画像BILの読み取りには、図13(B)、(C)に示す2種類の態様がある。態様1、2ではともに、図13(B)、(C)に示すように、左領域10Lが原稿台255側を向き、右領域10Rが原稿台255の反対側を向いている。態様1では、図13(B)に示すように、原稿10の折れ線VLを原稿台255の手前側(図13(B)の下側)に向けて、原稿10が原稿台255上に配置される。態様2では、図13(C)に示すように、原稿10の折れ線VLを原稿台255の奥側(図13(C)の上側)に向けて、原稿10が原稿台255上に配置される。   There are two types of modes shown in FIGS. 13B and 13C for reading the left original image BIL. In both modes 1 and 2, as shown in FIGS. 13B and 13C, the left region 10L faces the original plate 255 side, and the right region 10R faces the opposite side of the original plate 255. In Mode 1, as shown in FIG. 13B, the document 10 is arranged on the document table 255 with the broken line VL of the document 10 facing the front side of the document table 255 (the lower side in FIG. 13B). The In Mode 2, as shown in FIG. 13C, the document 10 is arranged on the document table 255 with the polygonal line VL of the document 10 facing the back side of the document table 255 (upper side in FIG. 13C). .

右側原稿画像BIRの読み取りには、図13(D)、(E)に示す2種類の態様がある。態様1、2ではともに、図13(D)、(E)に示すように、右領域10Rが原稿台255側を向き、左領域10Lが原稿台255の反対側を向いている。態様1では、図13(D)に示すように、原稿10の折れ線VLを原稿台255の手前側(図13(D)の下側)に向けて、原稿10が原稿台255上に配置される。態様2では、図13(E)に示すように、原稿10の折れ線VLを原稿台255の奥側(図13(E)の上側)に向けて、原稿10が原稿台255上に配置される。   There are two types of modes shown in FIGS. 13D and 13E for reading the right original image BIR. In both modes 1 and 2, as shown in FIGS. 13D and 13E, the right area 10R faces the original plate 255 side, and the left area 10L faces the opposite side of the original plate 255. In Mode 1, as shown in FIG. 13D, the document 10 is placed on the document table 255 with the broken line VL of the document 10 facing the front side of the document table 255 (the lower side of FIG. 13D). The In Mode 2, as shown in FIG. 13E, the document 10 is placed on the document table 255 with the polygonal line VL of the document 10 facing the back side of the document table 255 (the upper side of FIG. 13E). .

いずれの原稿画像BIL、BIRの読み取りにおいても、いずれの態様が用いられるかは、ユーザ次第であり、複合機200やサーバ400は、用いられた態様を認識できない。   Which mode is used for reading any document image BIL or BIR depends on the user, and the multifunction device 200 and the server 400 cannot recognize the used mode.

図14は、スキャンパターンBで生成されるスキャンデータによって表されるスキャン画像の一例を示す図である。図14(A)、(B)の左側スキャン画像BLa、BLbは、左側原稿画像BILの読み取りの態様1、2で生成される左側スキャン画像の一例である。図14(C)、(D)の右側スキャン画像BRa、BRbは、右側原稿画像BIRの読み取りの態様1、2で生成される右側スキャン画像の一例である。2つ折りにされた状態の原稿10の短手方向の長さWB(図13(A))は、原稿台255の短手方向の長さWT(図13(B))より短い。このために、スキャンパターンBが用いられる場合には、左側スキャン画像および右側スキャン画像において、左右の端の少なくとも一方には、ある程度の余白ができ、他方には、余白ができる場合とできない場合とがある(図14(A)〜(D))。   FIG. 14 is a diagram illustrating an example of a scan image represented by scan data generated by the scan pattern B. The left-side scan images BLa and BLb in FIGS. 14A and 14B are examples of left-side scan images generated in the first and second reading modes 1 and 2 of the left original image BIL. The right-side scan images BRa and BRb in FIGS. 14C and 14D are examples of right-side scan images generated in the first and second modes of reading the right-side original image BIR. The length WB (FIG. 13A) in the short direction of the document 10 in a folded state is shorter than the length WT in the short direction of the document table 255 (FIG. 13B). For this reason, when the scan pattern B is used, in the left-side scan image and the right-side scan image, at least one of the left and right ends has a certain margin, and the other has a margin and a margin that cannot be. (FIGS. 14A to 14D).

以上の説明から解るように、スキャンパターンBで生成されるスキャン画像(左側スキャン画像BL、または、右側スキャン画像BR)は、左右の両端に余白がある両側余白有画像(例えば、図14(B)、(D)の画像BLb、BRb)と、左右の端のうちの一方の端に余白MGがなく、他方の端に余白MGがある片側余白有画像(例えば、図14(A)、(C)の画像BLa、BRa)と、のいずれかである。   As can be understood from the above description, the scan image (left scan image BL or right scan image BR) generated by the scan pattern B is a double-sided marginal image (for example, FIG. ), (D) images BLb, BRb), and one-sided marginal images with no margin MG at one end of the left and right ends and margin MG at the other end (for example, FIG. 14 (A), ( C) image BLa, BRa).

第2実施例では、図2のS55の処理対象決定処理と、S65の配置位置決定処理とが、第1実施例と異なっている。他の処理は、第1実施例と同じである。   In the second embodiment, the process target determining process in S55 of FIG. 2 and the arrangement position determining process in S65 are different from those in the first embodiment. Other processes are the same as those in the first embodiment.

B−2.第2の探索処理:
第2実施例の後述する配置位置決定処理では、第1実施例で説明した図11の第1の探索処理とともに、第2の探索処理が併用される。第2の探索処理は、スキャン画像I12、I22が、スキャンパターンBを用いて生成される場合に適した探索処理である。第2の探索処理は、第1スキャン画像I12内の原稿画像と、第2スキャン画像I22内の原稿画像と、の相対的な配置位置として、2個の原稿画像が重ならない第2種の配置位置を決定する処理である。説明の便宜上、第2の探索処理について、先に説明する。
B-2. Second search process:
In the arrangement position determination process described later in the second embodiment, the second search process is used together with the first search process of FIG. 11 described in the first embodiment. The second search process is a search process suitable for the case where the scan images I12 and I22 are generated using the scan pattern B. The second search process is a second type of arrangement in which the two original images do not overlap as a relative arrangement position of the original image in the first scan image I12 and the original image in the second scan image I22. This is a process for determining the position. For convenience of explanation, the second search process will be described first.

図15は、第2の探索処理のフローチャートである。図16は、第2の探索処理の説明図である。第1の探索処理と同様に、処理対象の2端の組み合わせを構成する第1スキャン画像I12の一端に沿う端部画像と、処理対象の2端の組み合わせを構成する第2スキャン画像I22の一端に沿う端部画像と、を用いて実行される。ここでは、スキャンパターンBを用いて生成される2個のスキャンデータによって表される図16(A)に示す2個のスキャン画像I12b、I22bを例として、第2の探索処理を説明する。図16(A)の第1スキャン画像I12bは、左側原稿画像BILを含み、第2スキャン画像I22bは、右側原稿画像BIRを含む。ここでは、第1スキャン画像I12b内の原稿画像BILの右端RT1bと、第2スキャン画像I22b内の原稿画像BIRの左端LT2bと、の組み合わせが、処理対象の2端の組み合わせである場合を例として説明する。   FIG. 15 is a flowchart of the second search process. FIG. 16 is an explanatory diagram of the second search process. Similarly to the first search process, an end image along one end of the first scan image I12 constituting a combination of two ends to be processed and one end of the second scan image I22 constituting a combination of the two ends to be processed. And an end image along the line. Here, the second search process will be described by taking two scan images I12b and I22b shown in FIG. 16A represented by two scan data generated using the scan pattern B as an example. The first scan image I12b in FIG. 16A includes a left original image BIL, and the second scan image I22b includes a right original image BIR. Here, as an example, the combination of the right end RT1b of the document image BIL in the first scan image I12b and the left end LT2b of the document image BIR in the second scan image I22b is a combination of the two ends to be processed. explain.

S400では、CPU410は、図11のS300と同様に、スキャン画像I12b、I22bに対して、余白の削除と回転を実行する。図16(A)のスキャン画像I12b、I22bは、S400の処理後の画像であるので、第1スキャン画像I12bの右端に余白はなく、第2スキャン画像I22bの左端に余白はない。   In S400, the CPU 410 executes margin deletion and rotation on the scanned images I12b and I22b, as in S300 of FIG. Since the scan images I12b and I22b in FIG. 16A are images after the processing of S400, there is no margin at the right end of the first scan image I12b and there is no margin at the left end of the second scan image I22b.

S401では、CPU410は、スキャン画像I12b、I22内の原稿画像BIL、BIRにおいて欠損している画素を復元する画素復元処理を実行する。図16(A)には、画素復元処理によって復元される複数個の画素が位置する復元領域AD1、AD2が図示されている。上述したように、スキャンパターンBでは、二つ折りにされた原稿10が読み取られる。このために、原稿10の折れ線VL上に位置するごく細い線状の領域の画像は、スキャンパターンBを用いて生成されるスキャン画像I12b、I22b内の原稿画像BIL、BIRのいずれにも表れておらず、欠損している。図16(A)の復元領域AD1、AD2は、原稿10の折れ線VL上に位置するごく細い線状の領域に対応している。   In S401, the CPU 410 executes a pixel restoration process for restoring the missing pixels in the original images BIL and BIR in the scanned images I12b and I22. FIG. 16A shows restoration areas AD1 and AD2 in which a plurality of pixels restored by the pixel restoration process are located. As described above, in the scan pattern B, the document 10 folded in half is read. For this reason, an image of a very thin linear region positioned on the polygonal line VL of the document 10 appears in both the document images BIL and BIR in the scan images I12b and I22b generated using the scan pattern B. It is missing. The restoration areas AD1 and AD2 in FIG. 16A correspond to very thin linear areas located on the polygonal line VL of the document 10.

第2の探索処理では、第1スキャン画像I12、I22内の原稿画像の処理対象の端を、原稿の折れ線VLに対応する端であると想定する。このために、第1復元領域AD1は、スキャン画像I12内の原稿画像の処理対象の端の外側に隣接して設けられ、第2復元領域AD2は、第2スキャン画像I22内の原稿画像の処理対象の端の外側に隣接して設けられる。図16(A)の例では、第1復元領域AD1は、第1スキャン画像I12b内の左側原稿画像BILの右端RT1bの外側に隣接し、第2復元領域AD2は、第2スキャン画像I22b内の右側原稿画像BIRの左端LT2bの外側に隣接している。復元領域AD1、AD2は、隣接する原稿画像の縦方向の全長に亘って上端から下端まで延びるごく細い線状の領域である。復元領域AD1、AD2の隣接する端と垂直な方向の幅、すなわち、図16(A)の横方向の幅ΔWは、実験的に予め決められた値である。本実施例では、幅ΔWは、スキャン画像I12b、I22bの横方向の解像度が、300dpiである場合に、3画素である。   In the second search process, it is assumed that the processing target edge of the document image in the first scan images I12 and I22 is an edge corresponding to the document line VL. For this purpose, the first restoration area AD1 is provided adjacent to the outside of the processing target end of the document image in the scanned image I12, and the second restoration area AD2 is processed for the document image in the second scanned image I22. Adjacent to the outside of the subject's end. In the example of FIG. 16A, the first restoration area AD1 is adjacent to the outside of the right end RT1b of the left original image BIL in the first scan image I12b, and the second restoration area AD2 is in the second scan image I22b. It is adjacent to the outside of the left end LT2b of the right original image BIR. The restoration areas AD1 and AD2 are very thin linear areas extending from the upper end to the lower end over the entire length of adjacent document images in the vertical direction. The width in the direction perpendicular to the adjacent ends of the restoration regions AD1 and AD2, that is, the width ΔW in the horizontal direction in FIG. 16A is a value experimentally determined in advance. In this embodiment, the width ΔW is 3 pixels when the horizontal resolution of the scanned images I12b and I22b is 300 dpi.

図17は、画素復元処理のフローチャートである。S500では、CPU410は、スキャン画像I12b、I22bから、注目画像を選択する。S505では、CPU410は、注目画像内の原稿画像の処理対象の端に沿って、上述した復元領域を設定する。例えば、第1スキャン画像I12bが注目画像である場合には、第1スキャン画像I12b内の左側原稿画像BILの右端RT1bに沿って第1復元領域AD1が設定される。   FIG. 17 is a flowchart of pixel restoration processing. In S500, the CPU 410 selects a target image from the scanned images I12b and I22b. In step S <b> 505, the CPU 410 sets the above-described restoration area along the processing target end of the document image in the target image. For example, when the first scan image I12b is the target image, the first restoration area AD1 is set along the right end RT1b of the left original image BIL in the first scan image I12b.

S510では、CPU410は、復元領域内の注目ラインを選択する。例えば、本実施例では、復元領域の横方向の幅ΔWは3画素であるので、上下方向に延びる3本の画素のラインを含んでいる。CPU410は、3本の画素のラインの中から、1本の注目ラインを、注目画像に近い側から順に選択する。例えば、図17の右側に示すように、第1復元領域AD1は、3本のラインL1〜L3を含んでいる。したがって、第1スキャン画像I12bが注目画像である場合には、最初にラインL1が、注目ラインとして選択され、次にラインL2が注目ラインとして選択される。   In S510, the CPU 410 selects a target line in the restoration area. For example, in this embodiment, the horizontal width ΔW of the restoration area is 3 pixels, and thus includes a line of 3 pixels extending in the vertical direction. The CPU 410 selects one target line from the three pixel lines in order from the side close to the target image. For example, as shown on the right side of FIG. 17, the first restoration area AD1 includes three lines L1 to L3. Therefore, when the first scan image I12b is the target image, the line L1 is first selected as the target line, and then the line L2 is selected as the target line.

S515では、CPU410は、注目ラインに含まれる複数個の画素から1個の注目画素を選択する。例えば、注目ラインに含まれる複数個の画素から、上側から下側に向かって順次に注目画素が選択される。   In S515, the CPU 410 selects one target pixel from a plurality of pixels included in the target line. For example, the target pixel is sequentially selected from a plurality of pixels included in the target line from the upper side to the lower side.

S520では、CPU410は、注目画素の複数個の近傍画素の値を用いて、注目画素の値(本実施例では、RGB値)を決定する。例えば、図16(A)のスキャン画像I12bが注目画像である場合には、注目画素の値は、注目画素より左側に位置する4個の近傍画素の値を用いて決定される。例えば、図16の右側に示すラインL1の画素Xが注目画素である場合には、4個の近傍画素は、ラインL1の左側に隣接するラインLaの3個の画素A、B、Cと、ラインLaの左側に隣接するラインLbの1個の画素Dである。画素Aは、注目画素より左側に位置する画素のうち、注目画素に最も近い第1近傍画素であり、画素B、Cは、注目画素に2番目に近い第2近傍画素であり、画素Dは、注目画素に3番目に近い第3近傍画素である。画素Xの特定の成分値(例えば、R成分の値)Vxは、画素A〜Dの特定の成分値Va〜Vdを用いて、以下の式(a)によって算出される。   In S520, the CPU 410 determines the value of the target pixel (RGB value in this embodiment) using the values of a plurality of neighboring pixels of the target pixel. For example, when the scanned image I12b in FIG. 16A is a target image, the value of the target pixel is determined using the values of four neighboring pixels located on the left side of the target pixel. For example, when the pixel X of the line L1 shown on the right side of FIG. 16 is the target pixel, the four neighboring pixels are the three pixels A, B, and C of the line La adjacent to the left side of the line L1, and One pixel D of the line Lb adjacent to the left side of the line La. Pixel A is a first neighboring pixel closest to the pixel of interest among pixels located on the left side of the pixel of interest, pixels B and C are second neighboring pixels closest to the pixel of interest, and pixel D is The third neighboring pixel that is the third closest to the target pixel. A specific component value (for example, R component value) Vx of the pixel X is calculated by the following equation (a) using the specific component values Va to Vd of the pixels A to D.

Vx=Ka×Va+Kb×Vb+Kc×Vc+Kd×Vd ...(a)
ここで、Ka〜Kdは、画素A〜Dとのそれぞれと画素Xとの距離に応じて予め決定された係数である。係数Ka〜Kdは、Ka〜Kdの合計値が1であり、かつ、画素Xとの距離が短いほど大きな値となるように、決定されている。本実施例では、Ka=0.5、Kb=Kc=0.2、Kd=0.1である。
Vx = Ka * Va + Kb * Vb + Kc * Vc + Kd * Vd (a)
Here, Ka to Kd are coefficients determined in advance according to the distance between each of the pixels A to D and the pixel X. The coefficients Ka to Kd are determined so that the total value of Ka to Kd is 1 and becomes larger as the distance from the pixel X is shorter. In this embodiment, Ka = 0.5, Kb = Kc = 0.2, and Kd = 0.1.

CPU410は、式(a)を用いて、注目画素のRGBの3個の成分の値をそれぞれ算出することによって、注目画素のRGB値を決定する。   The CPU 410 determines the RGB value of the pixel of interest by calculating the values of the three RGB components of the pixel of interest using equation (a).

なお、図示は省略するが、図16(A)の第2スキャン画像I22bが注目画像である場合には、注目画素の値は、注目画素より右側に位置する4個の近傍画素の値を用いて決定される。   Although illustration is omitted, when the second scan image I22b in FIG. 16A is the target image, the value of the target pixel is the value of four neighboring pixels located on the right side of the target pixel. Determined.

S525では、CPU410は、注目ラインの全ての画素を注目画素として処理したか否かを判断する。未処理の画素がある場合には(S525:NO)、CPU410は、S515に戻って、未処理の画素を注目画素として選択する。全ての画素が処理された場合には(S525:YES)、CPU410は、S530にて、注目画像について設定された復元領域の全てのラインを注目ラインとして処理したか否かを判断する。未処理のラインがある場合には(S530:NO)、CPU410は、S510に戻って、未処理のラインを注目ラインとして選択する。全てのラインが処理された場合には(S530:YES)、CPU410は、S535に処理を進める。   In S525, the CPU 410 determines whether or not all the pixels on the target line have been processed as the target pixel. When there is an unprocessed pixel (S525: NO), the CPU 410 returns to S515 and selects the unprocessed pixel as a target pixel. If all the pixels have been processed (S525: YES), the CPU 410 determines in S530 whether or not all the lines in the restoration area set for the target image have been processed as the target line. When there is an unprocessed line (S530: NO), the CPU 410 returns to S510 and selects an unprocessed line as a target line. If all lines have been processed (S530: YES), the CPU 410 advances the process to S535.

S535では、CPU410は、スキャン画像I12、I22の両方を処理したか否かを判断する。CPU410は、両方のスキャン画像を処理していない場合には(S535:NO)、S500に戻って未処理のスキャン画像を注目画像として選択する。CPU410は、両方のスキャン画像を処理済である場合には(S535:YES)、画素復元処理を終了する。   In S535, the CPU 410 determines whether both scanned images I12 and I22 have been processed. If both scan images have not been processed (S535: NO), the CPU 410 returns to S500 and selects an unprocessed scan image as a target image. If the CPU 410 has processed both scanned images (S535: YES), the pixel restoration process is terminated.

処理対象の2端の組み合わせが、原稿10を正しく再現できる組み合わせである場合には、第1復元領域AD1内の複数個の第1復元画素によって構成される線状の画像と、第2復元領域AD2内の複数個の右側復元画素によって構成される線状の画像は、ともに、原稿10の折れ線VL上に位置する線状の画像を表す画像になる。したがって、この場合には、第1復元領域AD1内の画像と、第2復元領域AD2内の画像とは、互いに類似する部分を含むと考えられる。   When the combination of the two ends to be processed is a combination that can correctly reproduce the document 10, a linear image composed of a plurality of first restoration pixels in the first restoration area AD1 and the second restoration area Both of the linear images constituted by the plurality of right-side restored pixels in AD 2 are images representing the linear images located on the polygonal line VL of the document 10. Therefore, in this case, it is considered that the image in the first restoration area AD1 and the image in the second restoration area AD2 include portions that are similar to each other.

画素復元処理が終了すると、図15のS402では、CPU410は、基準領域SPbを決定する。本実施例では、第2復元領域AD2の全体が、基準領域SPbとして決定される。これに代えて、第2復元領域AD2の一部分や、第2復元領域AD2と、第2復元領域AD2と隣接する原稿画像の一部によって構成される領域が、基準領域SPbとして決定されても良い。   When the pixel restoration process ends, the CPU 410 determines the reference area SPb in S402 of FIG. In the present embodiment, the entire second restoration area AD2 is determined as the reference area SPb. Instead, a part of the second restoration area AD2, or an area constituted by the second restoration area AD2 and a part of the document image adjacent to the second restoration area AD2, may be determined as the reference area SPb. .

S405では、CPU410は、候補領域を決定するための所定の参照範囲REbに基づいて決定される複数個の候補領域の中から、1個の注目候補領域を決定する。参照範囲REbは、例えば、図16(A)に示すように、第1スキャン画像I12bの右上部分に破線で示す範囲である。   In S405, the CPU 410 determines one candidate region of interest from among a plurality of candidate regions determined based on a predetermined reference range REb for determining a candidate region. For example, as illustrated in FIG. 16A, the reference range REb is a range indicated by a broken line in the upper right portion of the first scan image I12b.

図18は、図16(A)の参照範囲REb近傍の拡大図である。参照範囲REbは、縦M2画素×横N2画素分の矩形の範囲である(M2、N2は、2以上の整数)。N2は、例えば、約10であり、M2は、例えば、数十から数百である。参照範囲REbの右端は、第1スキャン画像I12bの右側の第1復元領域AD1の右端と一致している。参照範囲REbの縦方向の中心は、第1スキャン画像I12bの上端に位置している。   FIG. 18 is an enlarged view in the vicinity of the reference range REb in FIG. The reference range REb is a rectangular range of vertical M2 pixels × horizontal N2 pixels (M2 and N2 are integers of 2 or more). N2 is about 10, for example, and M2 is, for example, several tens to several hundreds. The right end of the reference range REb coincides with the right end of the first restoration area AD1 on the right side of the first scan image I12b. The center in the vertical direction of the reference range REb is located at the upper end of the first scan image I12b.

CPU410は、参照範囲REb内の(M2×N2)個の画素位置から、1個の注目画素位置を選択する。CPU410は、当該注目画素位置に、基準領域SPbの左上の画素Pc(図16(A))が位置するように、基準領域SPbを配置した場合に、基準領域SPbと重なる第1スキャン画像I12bまたは復元領域AD1内の領域を注目候補領域として特定する。このように、参照範囲REb内の(M2×N2)個の画素位置が、(M2×N2)個の候補領域と1対1で対応している。例えば、図18のハッチングで示す候補領域NT1は、参照範囲REb内の右上の画素位置Pt1が注目画素位置である場合に特定される。図18のハッチングで示す候補領域NT2は、参照範囲REb内の左下の画素位置Pt2が注目画素位置である場合に特定される。候補領域が設定され得る領域である探索領域SAbは、図18に示すように、参照範囲REbの左端の位置LPより右側に位置する領域である。第1配置位置決定処理の探索領域SAbは、第1復元領域AD1と、第1スキャン画像I12bの一部分の領域と、を含む。   The CPU 410 selects one target pixel position from (M2 × N2) pixel positions in the reference range REb. When the reference region SPb is arranged such that the upper left pixel Pc (FIG. 16A) of the reference region SPb is positioned at the target pixel position, the CPU 410 overlaps the first scan image I12b or the reference region SPb. An area in the restoration area AD1 is specified as a candidate area for attention. In this way, (M2 × N2) pixel positions in the reference range REb have a one-to-one correspondence with (M2 × N2) candidate regions. For example, the candidate area NT1 indicated by hatching in FIG. 18 is specified when the upper right pixel position Pt1 in the reference range REb is the target pixel position. The candidate area NT2 indicated by hatching in FIG. 18 is specified when the lower left pixel position Pt2 in the reference range REb is the target pixel position. As shown in FIG. 18, the search area SAb, which is an area where a candidate area can be set, is an area located on the right side of the position LP at the left end of the reference range REb. The search area SAb for the first arrangement position determination process includes a first restoration area AD1 and a partial area of the first scan image I12b.

例えば、最初の注目候補領域は、図14の候補領域NT1である。そして、注目候補領域NT1を特定するための参照範囲REb内の画素位置を、候補領域NT1を特定する際の位置から縦方向や横方向に1画素刻みで移動させることで、(M2×N2)個の候補領域から1個の注目候補領域が順次に特定される。   For example, the first attention candidate area is the candidate area NT1 in FIG. Then, by moving the pixel position in the reference range REb for specifying the candidate region of interest NT1 in increments of one pixel from the position for specifying the candidate region NT1 in the vertical and horizontal directions (M2 × N2) One candidate region of interest is sequentially identified from the candidate regions.

S410〜S435の処理は、図11のS310〜S335の処理と同一である。すなわち、すなわち、S410〜S435の処理で、探索領域SAb内に設定される(M2×N2)個の注目領域の中に、1個以上の類似領域CPbが存在する場合には、基準領域SPbとの類似率が最も高い1個の類似領域CPbが、処理対象の2端の組み合わせにおける類似領域CPbとして決定されて、第2の探索処理が終了される。(M2×N2)個の注目領域の中に、1個も類似領域CPbが存在しない場合には、類似領域CPbが決定されることなく、第2の探索処理が終了される。   The processing of S410 to S435 is the same as the processing of S310 to S335 of FIG. That is, in other words, when one or more similar regions CPb exist in the (M2 × N2) attention regions set in the search region SAb in the processing of S410 to S435, the reference region SPb The one similar region CPb having the highest similarity rate is determined as the similar region CPb in the combination of the two ends to be processed, and the second search process is ended. If no similar region CPb exists in the (M2 × N2) attention regions, the second search process ends without determining the similar region CPb.

B−3.処理対象決定処理:
次に、第2実施例の処理対象決定処理について説明する。第2実施例の処理対象決定処理では、第1の探索処理の処理対象である2端の組み合わせに加えて、第2の探索処理の処理対象である2端の組み合わせが決定される。
B-3. Processing target decision processing:
Next, the processing target determination process of the second embodiment will be described. In the processing target determination process of the second embodiment, in addition to the two-end combination that is the processing target of the first search process, the two-end combination that is the processing target of the second search process is determined.

図19は、第2実施例の処理対象決定処理のフローチャートである。S605では、CPU410は、第1スキャン画像I12の左右の両端の余白量が、基準値未満であるか否かを判断する。第1スキャン画像I12の両端の余白量が基準値未満である場合には(S605:YES)、S610にて、CPU410は、第1スキャン画像I12を、両側余白無画像として決定する。第1スキャン画像I12の左右の少なくとも一方の端の余白量が基準値以上である場合には(S605:NO)、S615にて、CPU410は、第1スキャン画像I12を、余白有画像として決定する。余白有画像は、上述した片側余白有画像と、両側余白有画像と、を含む概念である。   FIG. 19 is a flowchart of a processing target determination process according to the second embodiment. In step S605, the CPU 410 determines whether the margin amounts at the left and right ends of the first scan image I12 are less than the reference value. When the margin amount at both ends of the first scan image I12 is less than the reference value (S605: YES), in S610, the CPU 410 determines the first scan image I12 as an image with no margins on both sides. If the margin amount at least one of the left and right ends of the first scan image I12 is greater than or equal to the reference value (S605: NO), the CPU 410 determines the first scan image I12 as a margin image in S615. . The margin image is a concept including the above-described one-side margin image and both-side margin image.

S620では、CPU410は、第2スキャン画像I22の左右の両端の余白量が、基準値未満であるか否かを判断する。第2スキャン画像I22の両端の余白量が基準値未満である場合には(S620:YES)、S625にて、CPU410は、第2スキャン画像I22を、両側余白無画像として決定する。第2スキャン画像I22の左右の少なくとも一方の端の余白量が基準値以上である場合には(S620:NO)、S630にて、CPU410は、第2スキャン画像I22を、余白有画像として決定する。   In S620, the CPU 410 determines whether or not the margin amounts at the left and right ends of the second scan image I22 are less than the reference value. When the margin amount at both ends of the second scan image I22 is less than the reference value (S620: YES), the CPU 410 determines the second scan image I22 as a blank image with no margins at S625. If the margin amount at least one of the left and right ends of the second scan image I22 is greater than or equal to the reference value (S620: NO), in S630, the CPU 410 determines the second scan image I22 as a margin image. .

S635では、CPU410は、スキャン画像I12、I22の両方が両側余白無画像であるか否かを判断する。スキャン画像I12、I22の両方が両側余白無画像である場合には(S635:YES)、S645に処理を進める。スキャン画像I12、I22の少なくとも一方が余白有画像である場合には(S635:NO)、S640にて、CPU410は、スキャン画像I12、I22の一方が両側余白無画像であるか否かを判断する。スキャン画像I12、I22の一方が両側余白無画像である場合には(S640:YES)、スキャン画像I12、I22の一方が両側余白無画像であり、他方が余白有画像である。この場合には、CPU410は、S655に処理を進める。スキャン画像I12、I22の一方が両側余白無画像でない場合には(S640:NO)、スキャン画像I12、I22の両方が余白有画像である。この場合には、CPU410は、S665に処理を進める。   In S635, the CPU 410 determines whether or not both of the scanned images I12 and I22 are both-side marginless images. If both the scanned images I12 and I22 are both side marginless images (S635: YES), the process proceeds to S645. If at least one of the scanned images I12 and I22 is a marginal image (S635: NO), in S640, the CPU 410 determines whether one of the scanned images I12 and I22 is a blank marginless image. . When one of the scanned images I12 and I22 is a double-sided marginless image (S640: YES), one of the scanned images I12 and I22 is a double-sided marginless image and the other is a blanked image. In this case, the CPU 410 advances the process to S655. When one of the scanned images I12 and I22 is not an image with no margins on both sides (S640: NO), both of the scanned images I12 and I22 are marginal images. In this case, the CPU 410 advances the process to S665.

スキャン画像I12、I22の両方が両側余白無画像である場合には、先ず、S645では、CPU410は、全ての2端の組み合わせ、すなわち、上述した(1)〜(4)の2端の組み合わせを、第1の探索処理の処理対象であると決定する。この場合には、スキャンパターンAが用いられたと考えられ、(1)〜(4)の2端の組み合わせの全てについて、原稿10を正しく再現できる組み合わせである可能性があるからである。   When both the scanned images I12 and I22 are both-side marginless images, first, in S645, the CPU 410 selects all the two end combinations, that is, the above-described two end combinations (1) to (4). Then, it is determined that it is a processing target of the first search process. In this case, it is considered that the scan pattern A was used, and there is a possibility that the original 10 can be correctly reproduced for all the combinations at the two ends (1) to (4).

そして、S650では、CPU410は、全ての2端の組み合わせを、第2の探索処理の処理対象でないと決定する。すなわち、この場合には、後述する配置位置決定処理において、第2の探索処理は実行されない。スキャンパターンBでは、両側余白無画像がスキャン画像として生成されることはないので、少なくとも一方のスキャン画像が、両側余白無画像である場合には、スキャンパターンAが用いられたと考えられるからである。この結果、不要な第2の探索処理が実行されることを抑制して、配置位置決定処理の処理時間を低減することができる。   In step S650, the CPU 410 determines that all combinations of the two ends are not processing targets of the second search process. That is, in this case, the second search process is not executed in the arrangement position determination process described later. This is because, in scan pattern B, no marginal image on both sides is not generated as a scan image, so it is considered that scan pattern A is used when at least one scan image is a no marginal image on both sides. . As a result, it is possible to suppress the execution of the unnecessary second search process and reduce the processing time of the arrangement position determination process.

スキャン画像I12、I22の一方が両側余白無画像であり、他方が余白有画像である場合には、先ず、S655では、CPU410は、図9のS205〜S225を実行して、第1の探索処理の処理対象とする2端の組み合わせと、第1の探索処理の処理対象としない2端の組み合わせと、を決定する。この結果、第1実施例と同様に、原稿10を正しく再現できる可能性がある2端の組み合わせのみが、第1の探索処理の処理対象とされるので、配置位置決定処理の処理時間を低減することができる。なお、この場合には、スキャン画像I12、I22の一方が両側余白無画像である時点で、スキャンパターンAが用いられたと考えられる。上述したように、スキャンパターンBでは、両側余白無画像がスキャン画像として生成されることはないからである。したがって、この場合には、スキャン画像I12、I22の他方の余白有画像は、片側余白有画像である、と考えられる。両側余白有画像は、スキャンパターンBでは生成され得るが、スキャンパターンAでは生成され得ないからである。   When one of the scanned images I12 and I22 is a blank image with no margins and the other is a margined image, first, in S655, the CPU 410 executes S205 to S225 in FIG. The combination of the two ends to be processed and the combination of the two ends not to be processed in the first search process are determined. As a result, as in the first embodiment, only the two-end combination that can correctly reproduce the document 10 is the processing target of the first search process, so that the processing time of the arrangement position determination process is reduced. can do. In this case, it is considered that the scan pattern A is used when one of the scan images I12 and I22 is an image with no margins on both sides. As described above, in the scan pattern B, a blank image with no margins is not generated as a scan image. Therefore, in this case, the other marginal image of the scanned images I12 and I22 is considered to be a one-sided marginal image. This is because an image with margins on both sides can be generated with the scan pattern B but cannot be generated with the scan pattern A.

そして、S660では、S650と同様に、CPU410は、全ての2端の組み合わせを、第2の探索処理の処理対象でないと決定する。上述したように、スキャンパターンBでは、両側余白無画像がスキャン画像として生成されることはないからである。この結果、不要な第2の探索処理が実行されることを抑制して、配置位置決定処理の処理時間を低減することができる。   In S660, as in S650, the CPU 410 determines that all combinations of the two ends are not processing targets of the second search process. As described above, in the scan pattern B, a blank image with no margins is not generated as a scan image. As a result, it is possible to suppress the execution of the unnecessary second search process and reduce the processing time of the arrangement position determination process.

スキャン画像I12、I22の両方が余白有画像である場合には、先ず、S665では、S655と同様に、CPU410は、図9のS205〜S225を実行して、第1の探索処理の処理対象とする2端の組み合わせと、第1の探索処理の処理対象としない2端の組み合わせと、を決定する。この処理により、スキャン画像I12、I22の両方が片側余白有画像である場合には、第1スキャン画像I12の余白量が基準未満である端と、第2スキャン画像I22の余白量が基準未満である端と、の組み合わせが、第1の探索処理の処理対象であると決定される。そして、他の3個の2端の組み合わせが、第1の探索処理の処理対象でないと決定される。また、スキャン画像I12、I22の少なくとも一方が両側余白有画像である場合には、全ての2端の組み合わせが、第1の探索処理の処理対象でないと決定される。スキャンパターンAが用いられる場合には、両側余白有画像がスキャン画像として生成されることはないからである。この結果、スキャンパターンAが用いられた可能性がある場合に、原稿10を正しく再現できる可能性がある2端の組み合わせのみが、第1の探索処理の処理対象であるとされ、スキャンパターンAが用いられた可能性がない場合には、全ての2端の組み合わせが第1の探索処理の処理対象でないとされる。したがって、配置位置決定処理の処理時間を低減することができる。   When both the scanned images I12 and I22 are marginal images, first, in S665, as in S655, the CPU 410 executes S205 to S225 in FIG. The combination of the two ends to be determined and the combination of the two ends not to be processed in the first search process are determined. As a result of this processing, when both of the scan images I12 and I22 are single-sided marginal images, the margin of the first scan image I12 is less than the reference and the margin of the second scan image I22 is less than the reference. A combination with a certain end is determined to be a target of the first search process. Then, it is determined that the other three two-end combinations are not processing targets of the first search process. When at least one of the scanned images I12 and I22 is a double-sided marginal image, it is determined that all the combinations of the two ends are not processing targets of the first search process. This is because when the scan pattern A is used, a double-sided marginal image is not generated as a scan image. As a result, when there is a possibility that the scan pattern A is used, only the two-end combination that may be able to reproduce the original 10 correctly is regarded as the processing target of the first search process. If there is no possibility of being used, it is determined that all combinations of two ends are not processing targets of the first search process. Therefore, the processing time of the arrangement position determination process can be reduced.

そして、S670では、CPU410は、4個の2端の組み合わせの全てを、第2の探索処理の処理対象であると決定する。この場合には、スキャンパターンBが用いられた可能性があり、スキャンパターンBが用いられた場合には、(1)〜(4)の2端の組み合わせの全てについて、原稿10を正しく再現できる組み合わせである可能性があるからである。   In S670, the CPU 410 determines that all of the four two-end combinations are processing targets of the second search process. In this case, there is a possibility that the scan pattern B is used. When the scan pattern B is used, the document 10 can be correctly reproduced for all the combinations of the two ends (1) to (4). This is because it may be a combination.

このように、第1の探索処理と第2の探索処理のそれぞれについて、処理対象とする2端の組み合わせと、処理対処としない2端の組み合わせと、が決定されると、処理対象決定処理は、終了される。   Thus, for each of the first search process and the second search process, when the combination of two ends to be processed and the combination of two ends not to be processed are determined, the process target determination process is Is terminated.

以上説明した処理対象決定処理によれば、スキャン画像I12、I22の左右の端の余白量が基準以上であるか否かに基づいて、第1の探索処理と第2の探索処理のそれぞれについて、処理対象とする2端の組み合わせと、処理対処としない2端の組み合わせと、を適切に決定できる。この結果、不要な第1の探索処理や、第2の探索処理が実行されることを抑制して、配置位置決定処理の処理時間を低減することができる。   According to the processing target determination process described above, each of the first search process and the second search process is based on whether the margin amounts at the left and right ends of the scanned images I12 and I22 are greater than or equal to the reference. It is possible to appropriately determine a combination of two ends to be processed and a combination of two ends that are not treated. As a result, it is possible to suppress the unnecessary first search process and second search process from being executed, and to reduce the processing time of the arrangement position determination process.

B−4:配置位置決定処理:
次に、第2実施例の配置位置決定処理について説明する。図20は、第2実施例の配置位置決定処理のフローチャートである。S705では、CPU410は、上述した配置位処理対象決定処理にて、第1の探索処理の処理対象であると決定された1個以上の2端の組み合わせがあるか否かを判断する。
B-4: Arrangement position determination processing:
Next, the arrangement position determination process of the second embodiment will be described. FIG. 20 is a flowchart of the arrangement position determination process according to the second embodiment. In step S <b> 705, the CPU 410 determines whether or not there is one or more two-end combinations determined to be processing targets of the first search processing in the above-described placement position processing target determination processing.

第1の探索処理の処理対象であると決定された1個以上の2端の組み合わせがある場合には(S705:YES)、S710にて、CPU410は、該1個以上の2端の組み合わせから、1個の処理対象の2端の組み合わせを選択する。S715では、選択済の処理対象の2端の組み合わせについて、第1の探索処理を実行する。S720では、CPU410は、第1の探索処理の処理対象であると決定された上述の1個以上の2端の組み合わせの全てについて、処理したか否かを判断する。未処理の2端の組み合わせがある場合には(S720:NO)、S710に戻って、該2端の組み合わせを選択する。上述の1個以上の2端の組み合わせの全てについて、処理した場合には(S720:YES)、CPU410は、S725に処理を進める。   When there is one or more two-end combinations determined to be the processing target of the first search process (S705: YES), in S710, the CPU 410 determines from the one or more two-end combinations. One combination of two ends to be processed is selected. In S715, the first search process is executed for the two combinations of processing targets that have been selected. In S720, the CPU 410 determines whether or not all of the one or more two-end combinations described above that have been determined to be the target of the first search process have been processed. If there is an unprocessed two-end combination (S720: NO), the process returns to S710 to select the two-end combination. If all of the one or more two-end combinations described above have been processed (S720: YES), the CPU 410 advances the process to S725.

第1の探索処理の処理対象であると決定された2端の組み合わせがない場合には(S705:NO)、CPU410は、S710〜S720をスキップして、S725に処理を進める。   If there is no two-end combination determined to be the processing target of the first search process (S705: NO), the CPU 410 skips S710 to S720 and advances the process to S725.

S725では、CPU410は、上述した配置位処理対象決定処理にて、第2の探索処理の処理対象であると決定された1個以上の2端の組み合わせがあるか否かを判断する。   In S725, the CPU 410 determines whether or not there is one or more two-end combinations determined to be processing targets of the second search process in the above-described placement position processing target determination processing.

第2の探索処理の処理対象であると決定された1個以上の2端の組み合わせがある場合には(S725:YES)、S730にて、CPU410は、該1個以上の2端の組み合わせから、1個の処理対象の2端の組み合わせを選択する。S735では、選択済の処理対象の2端の組み合わせについて、第2の探索処理を実行する。S740では、CPU410は、第2の探索処理の処理対象であると決定された上述の1個以上の2端の組み合わせの全てについて、処理したか否かを判断する。未処理の2端の組み合わせがある場合には(S740:NO)、S730に戻って、該2端の組み合わせを選択する。上述の1個以上の2端の組み合わせの全てについて、処理した場合には(S740:YES)、CPU410は、S745に処理を進める。   When there is one or more two-end combinations determined to be the processing target of the second search process (S725: YES), in S730, the CPU 410 determines from the one or more two-end combinations. One combination of two ends to be processed is selected. In S735, the second search process is executed for the two combinations of processing targets that have been selected. In S740, the CPU 410 determines whether or not all of the one or more combinations of the two ends determined to be processing targets of the second search process have been processed. If there is an unprocessed two-end combination (S740: NO), the process returns to S730 to select the two-end combination. If all of the one or more two-end combinations described above have been processed (S740: YES), the CPU 410 advances the process to S745.

第2の探索処理の処理対象であると決定された2端の組み合わせがない場合には(S725:NO)、CPU410は、S730〜S740をスキップして、S745に処理を進める。   If there is no combination of the two ends determined to be the processing target of the second search process (S725: NO), the CPU 410 skips S730 to S740 and proceeds to S745.

S745では、CPU410は、処理対象の2端の組み合わせの中に、S715の第1の探索処理またはS735の第2の探索処理にて、類似領域が決定された2端の組み合わせがあるか否かを判断する。通常は、スキャンパターンAが用いられた場合には、互いを接合することで原稿10を正しく再現できる2端の組み合わせについての第1の探索処理にて類似領域CPaが決定される可能性が高い。また、スキャンパターンBが用いられた場合には、互いを接合することで原稿10を正しく再現できる2端の組み合わせについての第2の探索処理にて類似領域CPbが決定される可能性が高い。   In S745, the CPU 410 determines whether there is a combination of two ends for which a similar region is determined in the first search process of S715 or the second search process of S735 among the two combinations of processing targets. Judging. Normally, when the scan pattern A is used, there is a high possibility that the similar region CPa is determined in the first search process for a combination of two ends that can correctly reproduce the document 10 by joining the two. . Further, when the scan pattern B is used, there is a high possibility that the similar region CPb is determined in the second search process for a combination of two ends that can correctly reproduce the original 10 by joining the two.

類似領域が決定された2端の組み合わせが1個以上ある場合には(S745:YES)、S755にて、CPU410は、当該1個以上の2端の組み合わせのうち、類似率が最も高い類似領域が決定された2端の組み合わせにて、配置位置を決定する。   When there are one or more two-end combinations for which similar regions have been determined (S745: YES), in S755, the CPU 410 determines that the similar region has the highest similarity among the one or more two-end combinations. The arrangement position is determined by the combination of the two ends determined.

類似率が最も高い類似領域が、S715の第1の探索処理にて決定された場合には、第1実施例と同様に、その2端の組み合わせについての第1の探索処理で用いられた基準領域SPaと、決定された類似領域CPaと、が重なるように、2個のスキャン画像I11、I12の第1種の配置位置(すなわち、2個の原稿画像の第1種の配置位置)が、決定される(図7参照)。   When the similar region with the highest similarity rate is determined in the first search process of S715, the reference used in the first search process for the combination of the two ends is the same as in the first example. The first-type arrangement positions of the two scanned images I11 and I12 (that is, the first-type arrangement positions of the two document images) so that the area SPa and the determined similar area CPa overlap. Is determined (see FIG. 7).

一方、類似率が最も高い類似領域が、S735の第2の探索処理にて決定された場合には、第2の探索処理にて決定された類似率が最も高い類似領域CPbの位置に基づいて、2個のスキャン画像I11、I12の第2種の配置位置(すなわち、2個の原稿画像の第2種の配置位置)が、決定される。図16(B)の例を参照して説明する。図16(B)の例では、類似率が最も高い類似領域CPbが決定された2端の組み合わせは、第1スキャン画像I12b内の原稿画像の右端RT1bと、第2スキャン画像I22b内の原稿画像の左端LT2bと、の組み合わせである。この例に示すように、類似率が最も高い類似領域CPbが決定された2端の組み合わせを構成する2端が、所定の隙間ΔITを開けて対向するように、横方向の相対的な配置位置が決定される。そして、類似率が最も高い類似領域CPbに対応する参照範囲REb内の画素位置Psが特定される。例えば、類似率が最も高い類似領域CPbが、図18の候補領域NT1である場合には、参照範囲REbの画素位置Pt1が、該類似領域CPbに対応する参照範囲REb内の画素位置Psである。そして、図16(B)に示すように、特定された参照範囲REb内の画素位置Psの縦方向の位置が、第2スキャン画像I22の上端の縦方向の位置として決定される。なお、図16(B)では、図の煩雑を避けるために、スキャン画像I12b、I22b内の余白と追加領域の図示を省略している。参照範囲REbは、第1スキャン画像I12bに対して設定されているので、これによって、スキャン画像I12b、I22bの相対的な縦方向の位置が決定される。   On the other hand, when the similar region with the highest similarity is determined in the second search process of S735, based on the position of the similar region CPb with the highest similarity determined in the second search process. A second type arrangement position of the two scanned images I11 and I12 (that is, a second type arrangement position of the two document images) is determined. This will be described with reference to the example of FIG. In the example of FIG. 16B, the combination of the two ends where the similarity region CPb having the highest similarity is determined is the right end RT1b of the document image in the first scan image I12b and the document image in the second scan image I22b. And the left end LT2b. As shown in this example, the relative positions in the horizontal direction are set so that the two ends constituting the combination of the two ends where the similar region CPb having the highest similarity rate is determined face each other with a predetermined gap ΔIT therebetween. Is determined. Then, the pixel position Ps within the reference range REb corresponding to the similar region CPb having the highest similarity is specified. For example, when the similar region CPb having the highest similarity is the candidate region NT1 in FIG. 18, the pixel position Pt1 of the reference range REb is the pixel position Ps in the reference range REb corresponding to the similar region CPb. . Then, as shown in FIG. 16B, the vertical position of the pixel position Ps within the specified reference range REb is determined as the vertical position of the upper end of the second scan image I22. In FIG. 16B, in order to avoid complication of the drawing, the margins and additional regions in the scan images I12b and I22b are not shown. Since the reference range REb is set for the first scan image I12b, the relative vertical positions of the scan images I12b and I22b are thereby determined.

類似領域が決定された2端の組み合わせがない場合には(S745:NO)、S750にて、CPU410は、2個のスキャン画像I12、I22(2個の原稿画像AIL、AIR)の相対的な配置位置をデフォルトの位置に決定する。デフォルトの位置は、例えば、第1実施例のデフォルトの位置と同じである。   If there is no combination of two ends for which similar regions have been determined (S745: NO), in S750, the CPU 410 compares the two scanned images I12 and I22 (two original images AIL and AIR) with each other. The placement position is determined as the default position. The default position is the same as the default position of the first embodiment, for example.

以上説明した第2実施例によれば、第1スキャン画像I12の右端の余白量が基準以上である場合には、図19の処理対象決定処理にて、第1スキャン画像I12内の原稿画像の右端を含む2端の組み合わせは、第1の探索処理の処理対象に決定されない。したがって、この場合には、第1スキャン画像I12内の原稿画像の右端に沿う端部画像を用いて、第1の探索処理が実行されない。また、この場合には、図19の処理対象決定処理にて、第1スキャン画像I12内の原稿画像の右端を含む2端の組み合わせは、第2の探索処理の処理対象に決定され得る。したがって、この場合には、この結果、第1スキャン画像I12内の原稿画像の右端に沿う端部画像を用いて、第2の探索処理が実行される。   According to the second embodiment described above, when the amount of margin at the right end of the first scan image I12 is greater than or equal to the reference, the processing target determination process in FIG. 19 determines the document image in the first scan image I12. The combination of the two ends including the right end is not determined as the processing target of the first search process. Therefore, in this case, the first search process is not executed using the edge image along the right edge of the document image in the first scan image I12. In this case, in the processing target determination process of FIG. 19, the combination of the two ends including the right end of the document image in the first scan image I12 can be determined as the processing target of the second search process. Therefore, in this case, as a result, the second search process is executed using the edge image along the right edge of the document image in the first scan image I12.

以上のように、第1スキャン画像I12の右端の余白量が基準以上である場合に、第1スキャン画像I12内の原稿画像の右端に沿う端部画像を用いて実行されるべき第2の探索処理が実行され、実行される必要がない第1の探索処理が実行されない。この結果、探索処理に要する処理時間を低減することができる。また、誤った種類の探索処理が用いられることによって、誤った配置位置が決定される可能性を低減することができる。   As described above, when the amount of margin at the right end of the first scan image I12 is equal to or larger than the reference, the second search to be executed using the end image along the right end of the document image in the first scan image I12. The process is executed, and the first search process that does not need to be executed is not executed. As a result, the processing time required for the search process can be reduced. Moreover, the possibility that an incorrect arrangement position is determined can be reduced by using an incorrect type of search processing.

さらに、第1スキャン画像I12が両側余白有画像である場合、すなわち、第1スキャン画像I12の右端の余白量が基準以上であり、かつ、第1スキャン画像I12の左端の余白量が基準以上である場合には、スキャンパターンAが用いられた可能性が低く、スキャンパターンBが用いられたと考えられる。この場合には、図19の処理対象決定処理のS665にて、全ての2端の組み合わせは、第1の探索処理の処理対象に決定されない(図9のS205〜S225参照)。そして、この場合には、全ての2端の組み合わせが、第2の探索処理の処理対象に決定される(図19のS670)。このように、この場合には、CPU410は、第1の探索処理を実行せず、第2の探索処理を実行する。したがって、不要な第1の探索処理を実行することなく、第2の探索処理だけが実行されるので、適切な配置位置を決定することができるとともに、処理時間を低減することができる。   Furthermore, when the first scan image I12 is a double-sided margin image, that is, the right margin amount of the first scan image I12 is greater than or equal to the reference, and the left margin amount of the first scan image I12 is greater than or equal to the reference. In some cases, it is unlikely that scan pattern A was used, and scan pattern B may be used. In this case, in S665 of the process target determination process of FIG. 19, all the combinations of the two ends are not determined as the process targets of the first search process (see S205 to S225 of FIG. 9). In this case, all the combinations of the two ends are determined as the processing targets of the second search process (S670 in FIG. 19). Thus, in this case, the CPU 410 executes the second search process without executing the first search process. Therefore, since only the second search process is executed without executing the unnecessary first search process, an appropriate arrangement position can be determined and the processing time can be reduced.

さらに、第1スキャン画像I12が両側余白無画像である場合、すなわち、第1スキャン画像I12の右端の余白量が基準未満であり、かつ、第1スキャン画像I12の左端の余白量が基準未満である場合には、スキャンパターンBが用いられた可能性が低く、スキャンパターンAが用いられたと考えられる。この場合には、図19の処理対象決定処理のS645またはS655にて、少なくとも1個の2端の組み合わせが、第1の探索処理の処理対象に決定される。そして、この場合には、全ての2端の組み合わせは、第2の探索処理の処理対象に決定されない(図19のS650またはS660)。このように、この場合には、CPU410は、第1の探索処理を実行し、第2の探索処理を実行しない。したがって、不要な第2の探索処理を実行することなく、第1の探索処理だけが実行されるので、適切な配置位置を決定することができるとともに、処理時間を低減することができる。   Further, when the first scan image I12 is an image with no margins on both sides, that is, the margin amount at the right end of the first scan image I12 is less than the reference, and the margin amount at the left end of the first scan image I12 is less than the reference. In some cases, it is unlikely that the scan pattern B was used, and it is considered that the scan pattern A was used. In this case, in S645 or S655 of the processing target determination process of FIG. 19, at least one two-end combination is determined as the processing target of the first search process. In this case, all combinations of the two ends are not determined as the processing target of the second search process (S650 or S660 in FIG. 19). Thus, in this case, the CPU 410 executes the first search process and does not execute the second search process. Therefore, only the first search process is executed without executing the unnecessary second search process, so that an appropriate arrangement position can be determined and the processing time can be reduced.

さらに、2個のスキャン画像I12、I22の両方が、余白有画像(両側余白有画像または片側余白有画像)である場合、すなわち、第1スキャン画像I12の左右のうちの一方の端の余白量が基準以上であり、かつ、第2スキャン画像I22の左右のうちの少なくとも一方の端の余白量が基準以上である場合には、図19のS670が実行されて、全ての2端の組み合わせが、第2の探索処理の処理対象であると決定される。したがって、この場合には、CPU410は、第1スキャン画像I12の左右のうちの他方の端の余白量、および、第2スキャン画像I22の左右のうちの他方の端の余白量に拘わらずに、全ての2端の組み合わせについて、第2の探索処理を実行する。   Further, when both of the two scanned images I12 and I22 are marginal images (both side marginal images or one side marginal images), that is, the margin amount at one of the left and right sides of the first scan image I12. 19 is equal to or greater than the reference, and the margin amount at least one of the left and right ends of the second scan image I22 is equal to or greater than the reference, S670 in FIG. 19 is executed, and all the combinations of the two ends are determined. , It is determined that it is a processing target of the second search process. Therefore, in this case, the CPU 410, regardless of the margin amount at the other left and right edges of the first scan image I12 and the margin amount at the other left and right edges of the second scan image I22, The second search process is executed for all combinations of two ends.

スキャンパターンBが用いられる場合には、各スキャン画像の左右の少なくとも一方の端に余白ができる(図14)。そして、この場合には、余白量だけでは、第2の探索処理の処理対象とすべき2端の組み合わせと、第2の探索処理の処理対象とすべきでない2端の組み合わせと、を分離できない。本実施例では、このような場合に、全ての2端の組み合わせについての第2の探索処理が実行されるので、適切な配置位置を決定することができる。   When the scan pattern B is used, a margin is formed at at least one of the left and right ends of each scan image (FIG. 14). In this case, the marginal amount alone cannot separate the two-end combination that should be the target of the second search process and the two-end combination that should not be the target of the second search process. . In the present embodiment, in such a case, the second search process for all combinations of two ends is executed, so that an appropriate arrangement position can be determined.

ところで、スキャンパターンAが用いられる場合には、図3の原稿10の中央部CAは、図6(A)に示すように、第1スキャン画像I12内の原稿画像と、第2スキャン画像I22内の原稿画像と、の両方に現れる。このために、このために、これらの2個の原稿画像が重なる第1種の配置位置を決定することが適切である。一方、スキャンパターンBが用いられる場合には、原稿10の折れ線VL上に位置する線状の画像は、第1スキャン画像I12内の原稿画像と、第2スキャン画像I22内の原稿画像と、のいずれにも表れない。また、これらの2個の原稿画像の両方に表れる原稿10上の領域は存在しない。このために、これらの2個の原稿画像が重ならない第2種の配置位置を決定することが適切である。本実施例によれば、用いられたスキャンパターンに応じた適切な探索処理を実行することによって、適切な配置位置が決定される。この結果、原稿10を適切に再現できる処理済画像を表す処理済画像データを生成するこができる。   By the way, when the scan pattern A is used, the central portion CA of the document 10 in FIG. 3 is located in the document image in the first scan image I12 and in the second scan image I22 as shown in FIG. Appears both in the original image. For this reason, it is appropriate to determine the first type arrangement position where these two document images overlap. On the other hand, when the scan pattern B is used, the linear image positioned on the polygonal line VL of the document 10 is an original image in the first scan image I12 and an original image in the second scan image I22. Neither appears. Further, there is no area on the document 10 that appears in both of these two document images. For this reason, it is appropriate to determine the second type of arrangement position where these two document images do not overlap. According to the present embodiment, an appropriate arrangement position is determined by executing an appropriate search process corresponding to the used scan pattern. As a result, processed image data representing a processed image that can appropriately reproduce the document 10 can be generated.

C.第3実施例:
第3実施例では、図2のS65の配置位置決定処理が、第1実施例と異なっている。また、第3実施例では、図2のS55の処理対象決定処理と、S65の配置位置決定処理と、の間に、図2に破線で示す処理順序決定処理が行われる。第3実施例のその他の処理は、第1実施例と同じである。また、第3実施例では、第1実施例と同様に、スキャンパターンAが用いられることが想定されており、スキャンパターンBが用いられることは、想定されていない。
C. Third embodiment:
In the third embodiment, the arrangement position determining process in S65 of FIG. 2 is different from the first embodiment. Further, in the third embodiment, a processing order determination process indicated by a broken line in FIG. 2 is performed between the processing target determination process in S55 of FIG. 2 and the arrangement position determination process in S65. Other processes in the third embodiment are the same as those in the first embodiment. Further, in the third embodiment, it is assumed that the scan pattern A is used as in the first embodiment, and it is not assumed that the scan pattern B is used.

C−1.配置位置決定処理:
図21は、第3実施例の配置位置決定処理のフローチャートである。S260では、図10のS230と同様に、CPU410は、処理対象決定処理にて第1の探索処理の処理対象であると決定された1個以上の2端の組み合わせの中から、1個の組み合わせを選択する。S265では、図10のS235と同様に、CPU410は、選択された2端の組み合わせについて第1の探索処理を実行する。
C-1. Arrangement position determination processing:
FIG. 21 is a flowchart of the arrangement position determination process according to the third embodiment. In S260, as in S230 of FIG. 10, the CPU 410 selects one combination from one or more two-end combinations determined to be the processing target of the first search process in the processing target determination process. Select. In S265, as in S235 of FIG. 10, the CPU 410 executes the first search process for the selected combination of the two ends.

S270では、CPU410は、S265の第1の探索処理にて、選択された2端の組み合わせについて、類似領域CPaが決定されたか否かを判断する。類似領域CPaが決定された場合には(S270:YES)、S275にて、CPU410は、現在の処理対象の2端の組み合わせにて、第1種の配置位置を決定して、配置位置決定処理を終了する。すなわち、現在の処理対象の2端の組み合わせについての第1の探索処理で用いられた基準領域SPaと、決定された類似領域CPaと、が重なるように、第1スキャン画像I11と第2スキャン画像I22との相対的な配置位置が、決定される。   In S270, the CPU 410 determines whether or not a similar area CPa has been determined for the selected combination of the two ends in the first search process in S265. When the similar region CPa is determined (S270: YES), in S275, the CPU 410 determines the first type arrangement position by the combination of the two ends to be processed, and the arrangement position determination process. Exit. That is, the first scan image I11 and the second scan image are overlapped so that the reference region SPa used in the first search process for the two end combinations of the current processing target overlaps the determined similar region CPa. A placement position relative to I22 is determined.

類似領域CPaが決定されなかった場合には(S270:NO)、S280にて、CPU410は、第1の探索処理の処理対象であると決定された2端の組み合わせを全て選択したか否かを判断する。未選択の2端の組み合わせがある場合には(S280:NO)、CPU410は、S260に戻って、当該2端の組み合わせを選択する。全ての処理対象の2端の組み合わせが選択済である場合には(S280:YES)、S285にて、CPU410は、2個のスキャン画像I12、I22の相対的な配置位置をデフォルトの位置に決定して、配置位置決定処理を終了する。   If the similar region CPa has not been determined (S270: NO), in S280, the CPU 410 determines whether or not all the combinations of the two ends that have been determined to be subject to the first search process have been selected. to decide. When there is an unselected combination of two ends (S280: NO), the CPU 410 returns to S260 and selects the combination of the two ends. If all the combinations of the two ends to be processed have been selected (S280: YES), in S285, the CPU 410 determines the relative arrangement position of the two scan images I12 and I22 as a default position. Then, the arrangement position determination process ends.

以上の説明から解るように、第3実施例では、第1の探索処理の処理対象であると決定された2端の組み合わせが複数ある場合において、第1の組み合わせについての第1の探索処理にて、類似領域CPaが決定された場合には、第1の組み合わせより処理順序が後の第2の組み合わせについて、第1の探索処理は、実行されない。この点が、処理対象決定処理にて処理対象であると決定された2端の組み合わせの全てについて、必ず第1の探索処理が実行される第1実施例と異なる。   As can be understood from the above description, in the third embodiment, when there are a plurality of combinations of two ends determined to be processing targets of the first search process, the first search process for the first combination is performed. When the similar region CPa is determined, the first search process is not executed for the second combination whose processing order is later than the first combination. This is different from the first embodiment in which the first search process is always executed for all the combinations of the two ends determined as the process targets in the process target determination process.

このために、第3実施例では、第1の探索処理の処理対象であると決定された2端の組み合わせが複数ある場合には、これらの2端の組み合わせについて、第1の探索処理を行う処理順序を、原稿10を正しく再現できる可能性が高い順から先に処理されるように決定することで、全体の処理時間を低減することができる。そこで、本実施例では、図2のS60の処理順序決定処理が追加されている。   For this reason, in the third embodiment, when there are a plurality of combinations of two ends determined to be processing targets of the first search process, the first search process is performed for these combinations of two ends. The overall processing time can be reduced by determining the processing order so that the document 10 is processed first in the order that the possibility of correctly reproducing the document 10 is high. Therefore, in this embodiment, the processing order determination process in S60 of FIG. 2 is added.

C−2.処理順序決定処理:
図22は、第3実施例の処理順序決定処理のフローチャートである。S800では、CPU410は、処理対象決定処理にて第1の探索処理の処理対象であると決定された2端の組み合わせが複数個あるか否かを判断する。第1の探索処理の処理対象であると決定された2端の組み合わせが1個である場合には(S800:NO)、処理順序を決める必要がないので、CPU410は、処理を終了する。
C-2. Processing order determination processing:
FIG. 22 is a flowchart of the processing order determination process according to the third embodiment. In S800, the CPU 410 determines whether there are a plurality of combinations of two ends determined to be processing targets of the first search processing in the processing target determination processing. If the number of combinations at the two ends determined to be the processing target of the first search process is one (S800: NO), the CPU 410 ends the process because it is not necessary to determine the processing order.

第1の探索処理の処理対象であると決定された2端の組み合わせが複数個ある場合には(S800:YES)、S805にて、CPU410は、該複数個の2端の組み合わせの中から、1個の組み合わせを選択する。S810では、CPU410は、選択された2端の組み合わせを構成する第1スキャン画像I12内の原稿画像の端に沿う第1の端部画像TI1と、選択された2端の組み合わせを構成する第2スキャン画像I22内の原稿画像の端に沿う第2の端部画像TI2と、のヒストグラムをそれぞれ生成する。   If there are a plurality of combinations of two ends determined to be the processing target of the first search process (S800: YES), in S805, the CPU 410 selects from the plurality of combinations of two ends. Select one combination. In S810, the CPU 410 makes a combination of the first end image TI1 along the edge of the original image in the first scan image I12 constituting the selected combination of the two ends and the second combination of the selected two ends. Histograms of the second end image TI2 along the edge of the document image in the scan image I22 are generated.

具体例として、図6(B)には、選択された2端の組み合わせを構成する2端が、第1スキャン画像I12内の原稿画像の右端RT1と、第2スキャン画像I22内の原稿画像の右端RT2と、である場合の、第1の端部画像TI1および第2の端部画像TI2が図示されている。この例に示すように、端部画像TI1、TI2は、スキャン画像I12、I22の処理対象の端(図6(B)ではいずれも右端)に沿って、当該処理対象の端の全長に亘って延びる部分画像である。端部画像TI1、TI2の横方向の幅Wpは、例えば、原稿10の中央部CA(図3)の幅Wca、すなわち、2個のスキャン画像I12、I22の両方に表現され得る領域の幅Wcaに基づいて、予め定められた値である。幅Wcaの最大値は、例えば、想定される原稿10の特定方向の幅WS(図3の例では、A3の長手方向の幅)と、該原稿10の読み取り時に原稿10の特定方向に対応する原稿台255の方向の幅WT(図4の例では、原稿台255の短手方向の幅)と、に基づいて定まる値(2×WT−WS)である。幅Wpは、例えば、幅Wcaの最大値の70%〜100%の値に設定される。   As a specific example, in FIG. 6B, two ends constituting the selected combination of the two ends are the right end RT1 of the document image in the first scan image I12 and the document image in the second scan image I22. The first end image TI1 and the second end image TI2 in the case of the right end RT2 are illustrated. As shown in this example, the end images TI1 and TI2 extend over the entire length of the processing target end along the processing target end of the scan images I12 and I22 (both are right ends in FIG. 6B). It is a partial image extending. The width Wp in the horizontal direction of the end images TI1 and TI2 is, for example, the width Wca of the central portion CA (FIG. 3) of the document 10, that is, the width Wca of the region that can be expressed in both of the two scan images I12 and I22. Is a value determined in advance. The maximum value of the width Wca corresponds to, for example, the assumed width WS in the specific direction of the original 10 (in the example of FIG. 3, the width in the longitudinal direction of A3) and the specific direction of the original 10 when the original 10 is read. A value (2 × WT−WS) determined based on the width WT in the direction of the document table 255 (in the example of FIG. 4, the width in the short direction of the document table 255). For example, the width Wp is set to a value of 70% to 100% of the maximum value of the width Wca.

CPU410は、第1の端部画像TI1のRGBの各成分値のヒストグラムと、第2の端部画像TI2のRGBの各成分のヒストグラムと、をそれぞれ生成する。例えば、R成分のヒストグラムは、対象の端部画像内の各画素を、各画素が有するR成分値に応じて、複数のクラスに分類することによって生成される。本実施例では、R成分値が取り得る256階調の階調値のそれぞれを、1個のクラスとして、ヒストグラムデータが生成される。他の成分値のヒストグラムについても同様である。   The CPU 410 generates a histogram of each RGB component value of the first end image TI1 and a histogram of each RGB component of the second end image TI2. For example, the histogram of the R component is generated by classifying each pixel in the target end image into a plurality of classes according to the R component value of each pixel. In this embodiment, histogram data is generated with each of the 256 gradation values that the R component value can take as one class. The same applies to histograms of other component values.

なお、ヒストグラムは、端部画像TI1、TI2内の全ての画素について生成されなくても良く、端部画像TI1、TI2内の一部の画素について生成されても良い。例えば、端部画像TI1、TI2内に均一に分散するように選択された一部の画素、例えば、数画素おきに選択された一部の画素について、ヒストグラムが生成されても良い。また、ヒストグラムは、RGBの各成分のヒストグラムに限らず、例えば、輝度、彩度、色相のうちの全部または一部のヒストグラムであっても良い。   The histogram may not be generated for all the pixels in the end images TI1 and TI2, but may be generated for some of the pixels in the end images TI1 and TI2. For example, a histogram may be generated for some pixels selected to be uniformly distributed in the end images TI1 and TI2, for example, some pixels selected every several pixels. In addition, the histogram is not limited to the histogram of each component of RGB, and may be a histogram of all or part of luminance, saturation, and hue, for example.

図23は、端部画像TI1、TI2のR成分のヒストグラムの一例を示す図である。破線は、第1の端部画像TI1のヒストグラムであり、実線は、第2の端部画像TI2のヒストグラムである。   FIG. 23 is a diagram illustrating an example of an R component histogram of the end images TI1 and TI2. The broken line is a histogram of the first end image TI1, and the solid line is a histogram of the second end image TI2.

S815では、CPU410は、第1の端部画像TI1のヒストグラムと、第2の端部画像TI2のヒストグラムと、の重複面積Sovを算出する。図23には、R成分の重複面積が、ハッチングで図示されている。例えば、CPU410は、R成分のヒストグラムの256個のクラスのそれぞれについて、第1の端部画像TI1のヒストグラムの画素数(度数)と、第2の端部画像TI2のヒストグラムの画素数(度数)と、のうちの小さい方の値を特定する。そして、CPU410は、256個のクラスのそれぞれについて特定された該小さい方の値の合計値を、R成分の重複面積として算出する。CPU410は、G成分、B成分についても同様に重複面積を算出し、RGBの3個の成分の重複面積の合計値を、重複面積Sovとして算出する。重複面積Sovは、2個の端部画像TI1、TI2のヒストグラムの類似度を示す特徴値である。重複面積Sovが大きいほど、2個の端部画像TI1、TI2のヒストグラムが類似していることを示す。変形例では、RGBの3個の成分のいずれか一つの重複面積を重複面積Sovとして算出してもよい。また、特に、ヒストグラムとして、輝度を生成する場合は、輝度のみを用いて重複面積Sovを算出してもよい。   In S815, the CPU 410 calculates an overlapping area Sov between the histogram of the first end image TI1 and the histogram of the second end image TI2. In FIG. 23, the overlapping area of the R component is shown by hatching. For example, for each of the 256 classes of R component histograms, the CPU 410 counts the number of pixels (frequency) of the histogram of the first end image TI1 and the number of pixels (frequency) of the histogram of the second end image TI2. And the smaller of the two values is specified. Then, the CPU 410 calculates the total value of the smaller values specified for each of the 256 classes as an overlapping area of R components. The CPU 410 similarly calculates the overlapping area for the G component and the B component, and calculates the total value of the overlapping areas of the three RGB components as the overlapping area Sov. The overlapping area Sov is a feature value indicating the similarity between the histograms of the two end images TI1 and TI2. A larger overlap area Sov indicates that the histograms of the two end images TI1 and TI2 are more similar. In the modification, the overlapping area of any one of the three components of RGB may be calculated as the overlapping area Sov. In particular, when the luminance is generated as a histogram, the overlapping area Sov may be calculated using only the luminance.

S820では、処理対象であると決定された2端の組み合わせを全て選択したか否かを判断する。未選択の2端の組み合わせがある場合には(S820:NO)、CPU410は、S805に戻って、当該2端の組み合わせを選択する。全ての処理対象の2端の組み合わせが選択済である場合には(S820:YES)、CPU410は、S825に処理を進める。S825に処理が進んだ時点では、処理対象であると決定された2端の組み合わせの全てについて、重複面積Sovが算出されている。   In S820, it is determined whether all combinations of two ends determined to be processing targets have been selected. If there is an unselected combination of two ends (S820: NO), the CPU 410 returns to S805 and selects the combination of the two ends. When all the combinations of the two ends to be processed have been selected (S820: YES), the CPU 410 advances the process to S825. At the time when the process proceeds to S825, the overlap area Sov is calculated for all combinations of two ends determined to be processing targets.

S825では、CPU410は、重複面積Sovが大きい順に、処理対象であると決定された複数個の2端の組み合わせの処理順序を決定して、処理順序決定処理を終了する。   In S825, the CPU 410 determines the processing order of a plurality of combinations of two ends determined to be processing targets in descending order of the overlapping area Sov, and ends the processing order determination process.

以上説明した第3実施例によれば、複数個の2端の組み合わせのそれぞれについて第1の探索処理を実行する場合に、複数個の2端の組み合わせのそれぞれについて、組み合わせを構成する2個の端に沿う2個の端部画像TI1、TI2のヒストグラムを生成される(S810)。そして、該ヒストグラムを用いて、2個の端部画像TI1、TI2のヒストグラムの類似度が比較的高い組み合わせに対する第1の探索処理の順序が、2個の端部画像TI1、TI2のヒストグラムの類似度が比較的低い組み合わせに対する第1の探索処理の順序より先になるように、複数個の2端の組み合わせの処理順序が決定される(S815、S825)。この結果、2個の端部画像TI1、TI2のヒストグラムの類似度が高い組み合わせに対する第1の探索処理の順序が先になるように決定された処理順序に従って、第1の探索処理が実行され、特定の組み合わせについて配置位置が決定された場合に、複数個の組み合わせのうち、特定の組み合わせより決定済の順序が後の組み合わせについて、第1の探索処理が実行されないので、第1の探索処理の処理時間をより低減できる。原稿10を再現できる組み合わせを構成する2端の端部画像TI1、TI2は、他の組み合わせを構成する2端の端部画像TI1、TI2より類似した画像であると考えられるからである。そして、第1の探索処理と比較して、ヒストグラムの生成処理に要する処理時間は、大幅に短いので、処理順序決定処理を追加することによる処理時間の増加よりも、第1の探索処理の処理時間をより低減できる期待値の方が大きい。   According to the third embodiment described above, when the first search process is executed for each of a plurality of two-end combinations, two of the plurality of two-end combinations are included in the combination. A histogram of two edge images TI1 and TI2 along the edge is generated (S810). Then, using the histogram, the order of the first search processing for a combination having a relatively high similarity between the histograms of the two end images TI1 and TI2 is similar to the histogram of the two end images TI1 and TI2. The processing order of a plurality of two-end combinations is determined so as to precede the order of the first search processing for the combination having a relatively low degree (S815, S825). As a result, the first search processing is executed according to the processing order determined so that the order of the first search processing for the combination having the high similarity of the histograms of the two end images TI1 and TI2 is first, When the arrangement position is determined for a specific combination, the first search process is not executed for a combination whose order is determined after the specific combination among a plurality of combinations. Processing time can be further reduced. This is because the two end images TI1 and TI2 constituting the combination that can reproduce the document 10 are considered to be similar to the two end images TI1 and TI2 constituting the other combinations. Since the processing time required for the histogram generation process is significantly shorter than that of the first search process, the process of the first search process is more than the increase of the process time by adding the process order determination process. The expected value that can reduce the time is larger.

D.第4実施例:
第4実施例は、配置順序決定処理が、第3実施例と異なる。第4実施例の他の処理は、第3実施例と同じである。図24は、第4実施例の配置順序決定処理のフローチャートである。図24のS900〜S915の処理は、図22のS800〜S815の処理と同じである。
D. Fourth embodiment:
The fourth embodiment differs from the third embodiment in the arrangement order determination process. Other processes in the fourth embodiment are the same as those in the third embodiment. FIG. 24 is a flowchart of the arrangement order determination process according to the fourth embodiment. The processes in S900 to S915 in FIG. 24 are the same as the processes in S800 to S815 in FIG.

S920では、CPU410は、選択された2端の組み合わせについて算出された重複面積Sovは、閾値THs以上であるか否かを判断する。閾値THsは、2個の端部画像TI1、TI2が、ある程度類似していることを示す重複面積Sovの値に実験的に予め決定される値である。例えば、閾値THsは、第1の端部画像TI1のヒストグラムの面積の30〜60%の値である。   In S920, the CPU 410 determines whether or not the overlapping area Sov calculated for the selected combination of the two ends is equal to or greater than the threshold value THs. The threshold value THs is a value that is experimentally predetermined as a value of the overlapping area Sov indicating that the two end images TI1 and TI2 are somewhat similar. For example, the threshold value THs is a value that is 30 to 60% of the area of the histogram of the first end image TI1.

重複面積Sovが閾値THs以上である場合には(S920:YES)、CPU410は、S930にて、選択された2端の組み合わせを優先対象に決定する。重複面積Sovが閾値THs未満である場合には(S920:NO)、CPU410は、S935にて、選択された2端の組み合わせを非優先対象に決定する。   When the overlapping area Sov is equal to or greater than the threshold value THs (S920: YES), the CPU 410 determines the selected combination of the two ends as a priority target in S930. When the overlapping area Sov is less than the threshold value THs (S920: NO), the CPU 410 determines the selected combination of the two ends as a non-priority target in S935.

S940では、CPU410は、2個の端部画像TI1、TI2のヒストグラムのダイナミックレンジDRを算出する。例えば、第1の端部画像TI1のR成分のヒストグラムの画素数(度数)が、最小値(0)のクラスから最小値より大きな成分値のクラスに向かって順次に加算される。そして、当該加算値が第1の端部画像TI1の画素数の所定割合(本実施例では5%)を超えた時点におけるクラスのR成分値が、下限値R1に決定される。さらに、第1の端部画像TI1のR成分のヒストグラムの画素数(度数)が、最大値(255)のクラスからから最大値より小さな成分値のクラスに向かって順次に加算される。そして、当該加算値が、上記所定割合(本実施例では5%)を超えた時点におけるクラスのR成分値が、上限値R2に決定される。第1の端部画像TI1のR成分値のダイナミックレンジDR1_Rは、(R2−R1)に決定される。同様にして、第2の端部画像TI2のR成分値のダイナミックレンジDR2_Rが決定され、2個の端部画像TI1、TI2のR成分値のダイナミックレンジの和(DR1_R+DR2_R)が、R成分のダイナミックレンジDR_Rとして算出される。同様にして、G成分、および、B成分のダイナミックレンジDR_G、DR_Bが算出され、3個の成分のダイナミックレンジの和が、算出すべきダイナミックレンジDRとして算出される(DR=DR_R+DR_G+DR_B)。   In S940, the CPU 410 calculates the dynamic range DR of the histograms of the two end images TI1 and TI2. For example, the number of pixels (frequency) in the histogram of the R component of the first end image TI1 is sequentially added from the class of the minimum value (0) toward the class of the component value larger than the minimum value. Then, the R component value of the class when the added value exceeds a predetermined ratio (5% in this embodiment) of the number of pixels of the first end image TI1 is determined as the lower limit value R1. Further, the number of pixels (frequency) in the histogram of the R component of the first end image TI1 is sequentially added from the class of the maximum value (255) toward the class of the component value smaller than the maximum value. Then, the R component value of the class when the added value exceeds the predetermined ratio (5% in this embodiment) is determined as the upper limit value R2. The dynamic range DR1_R of the R component value of the first end image TI1 is determined as (R2-R1). Similarly, the dynamic range DR2_R of the R component value of the second end image TI2 is determined, and the sum of the dynamic ranges of the R component values of the two end images TI1 and TI2 (DR1_R + DR2_R) is the dynamic value of the R component. Calculated as the range DR_R. Similarly, the dynamic ranges DR_G and DR_B of the G component and the B component are calculated, and the sum of the dynamic ranges of the three components is calculated as the dynamic range DR to be calculated (DR = DR_R + DR_G + DR_B).

ダイナミックレンジDRは、2個の端部画像TI1、TI2の複雑さを示す特徴値である。例えば、2個の端部画像TI1、TI2が、原稿10の背景などのベタ領域などの比較的単純な画像を表す場合には、該2個の端部画像TI1、TI2のダイナミックレンジDRは、比較的小さくなる。2個の端部画像TI1、TI2が、原稿10内のオブジェクトなどの比較的複雑な画像を表す場合には、該2個の端部画像TI1、TI2のダイナミックレンジDRは、比較的大きくなる。   The dynamic range DR is a feature value indicating the complexity of the two end images TI1 and TI2. For example, when the two end images TI1 and TI2 represent a relatively simple image such as a solid region such as the background of the document 10, the dynamic range DR of the two end images TI1 and TI2 is: Relatively small. When the two end images TI1 and TI2 represent a relatively complicated image such as an object in the document 10, the dynamic range DR of the two end images TI1 and TI2 becomes relatively large.

S945では、処理対象であると決定された2端の組み合わせを全て選択したか否かを判断する。未選択の2端の組み合わせがある場合には(S945:NO)、CPU410は、S905に戻って、当該2端の組み合わせを選択する。全ての処理対象の2端の組み合わせが選択済である場合には(S945:YES)、CPU410は、S950に処理を進める。S950に処理が進んだ時点では、処理対象であると決定された2端の組み合わせの全てについて、2個の端部画像TI1、TI2のダイナミックレンジDRが算出されるとともに、当該2端の組み合わせの全てが、優先対象か非優先対象のいずれかに決定されている。   In S945, it is determined whether or not all combinations of two ends determined to be processing targets have been selected. If there is an unselected combination of two ends (S945: NO), the CPU 410 returns to S905 and selects the combination of the two ends. When all the combinations of the two ends to be processed have been selected (S945: YES), the CPU 410 advances the process to S950. At the time when the process proceeds to S950, the dynamic range DR of the two end images TI1 and TI2 is calculated for all combinations of two ends determined to be processed, and the combination of the two ends is determined. All are determined to be either priority objects or non-priority objects.

S950では、CPU410は、優先対象に決定された1個以上の2端の組み合わせについて、ダイナミックレンジDRが大きい順に、処理順序を決定する。   In S950, the CPU 410 determines the processing order in the descending order of the dynamic range DR for one or more two-end combinations determined as priority targets.

S955では、CPU410は、非優先対象に決定された1個以上の2端の組み合わせについて、ダイナミックレンジDRが大きい順に、処理順序を決定する。ただし、非優先対象に決定された1個以上の2端の組み合わせの処理順序は、優先対象に決定された1個以上の2端の組み合わせより後の順序に決定される。   In S955, the CPU 410 determines the processing order of the one or more combinations of two ends determined as non-priority targets in descending order of the dynamic range DR. However, the processing order of one or more two-end combinations determined as non-priority objects is determined to be an order after the one or more two-end combinations determined as priority objects.

以上説明した第4実施例によれば、複数個の2端の組み合わせのそれぞれについて第1の探索処理を実行する場合に、複数個の2端の組み合わせのそれぞれについて、2個の端部画像TI1、TI2の複雑さを示す特徴値(具体的には、ダイナミックレンジDR)が算出される(S940)。そして、2個の端部画像TI1、TI2の複雑さが比較的高い2端の組み合わせの処理順序が、2個の端部画像TI1、TI2の複雑さが比較的低い2端の組み合わせの処理順序より先になるように、複数個の2端の組み合わせの処理順序が決定される。   According to the fourth embodiment described above, when the first search process is executed for each of a plurality of two-end combinations, two end images TI1 for each of the plurality of two-end combinations. , A feature value (specifically, dynamic range DR) indicating the complexity of TI2 is calculated (S940). Then, the processing order of the combination of two ends with relatively high complexity of the two end images TI1, TI2 is the processing order of the combination of two ends with relatively low complexity of the two end images TI1, TI2. The processing order of a plurality of two-end combinations is determined so as to come further.

原稿10を正しく再現できる組み合わせを構成する2端の端部画像TI1、TI2は、原稿10の中央部CAを示す画像であるので、原稿10の主要なオブジェクトを含む可能性が高い。このために、原稿10を正しく再現できる組み合わせを構成する2端の端部画像TI1、TI2は、比較的複雑な画像である可能性が高い。一方、その他の組み合わせを構成する2端の端部画像TI1、TI2は、原稿10の端部の領域を示す画像を含む。例えば、原稿10の端部の領域は、背景などの単純な画像を含む場合があるので、中央部CAと比較して単純な画像である場合がある。このために、上述のように、2個の端部画像TI1、TI2が複雑である2端の組み合わせを優先するように決定された処理順序に従って、第1の探索処理が実行することで、第1の探索処理の処理時間をより低減できる。さらに、原稿10を正しく再現できない2端の組み合わせで、誤って配置位置が決定される可能性を低減することができる。   Since the two end images TI1 and TI2 constituting a combination that can correctly reproduce the document 10 are images showing the central portion CA of the document 10, there is a high possibility that the main object of the document 10 is included. For this reason, there is a high possibility that the two end images TI1 and TI2 constituting a combination capable of correctly reproducing the document 10 are relatively complicated images. On the other hand, the two end image TI <b> 1 and TI <b> 2 constituting another combination include an image showing an end region of the document 10. For example, the edge area of the document 10 may include a simple image such as a background, and thus may be a simple image as compared to the central portion CA. For this reason, as described above, the first search process is executed in accordance with the processing order determined so as to prioritize the combination of the two ends where the two end images TI1 and TI2 are complicated. The processing time of one search process can be further reduced. Furthermore, it is possible to reduce the possibility that the placement position is erroneously determined by a combination of two ends where the document 10 cannot be reproduced correctly.

D.変形例:
(1)上記第3、第4実施例のように図2のS60の処理順序決定処理が実行される場合には、図2のS55の処理対象決定処理は、省略されても良い。この場合には、図2のS60にて、全ての2端の組み合わせについて、処理順序を決定すれば良い。この場合において、例えば、スキャンパターンBのみが用いられることが想定される場合には、第1の探索処理に代えて、第2の探索処理が行われても良い。すなわち、第3、第4実施例で決定される配置位置は、2個の対象画像が重なる配置位置であっても重ならない配置位置であっても良く、一般的には、一方の対象画像のいずれかの端に沿う端部画像と他方の対象画像のいずれかの端に沿う端部画像とを対応付ける配置位置であれば良い。
D. Variations:
(1) When the processing order determination process of S60 of FIG. 2 is executed as in the third and fourth embodiments, the processing target determination process of S55 of FIG. 2 may be omitted. In this case, the processing order may be determined for all combinations of two ends in S60 of FIG. In this case, for example, when it is assumed that only the scan pattern B is used, the second search process may be performed instead of the first search process. That is, the arrangement position determined in the third and fourth embodiments may be an arrangement position where two target images overlap or may not be overlapped. Any arrangement position may be used as long as the end image along one of the ends and the end image along one of the other target images are associated with each other.

(2)第2実施例において、図2のS35およびS40にて、第1スキャン画像I12の両端の余白量が基準未満であると判断された場合には、スキャンパターンAが用いられ、スキャンパターンBが用いられていない、と考えられる。この場合には、CPU410は、図2のS45、S50の第2スキャン画像I22の余白量判定処理を省略しても良い。そして、S55の処理対象決定処理では、CPU410は、全ての2端の組み合わせを第1の探索処理の処理対象であると決定し、全ての2端の組み合わせを第2の探索処理の処理対象でないと決定しても良い。 (2) In the second embodiment, when it is determined in S35 and S40 of FIG. 2 that the margin amount at both ends of the first scan image I12 is less than the reference, the scan pattern A is used, and the scan pattern It is considered that B is not used. In this case, the CPU 410 may omit the margin amount determination process of the second scan image I22 in S45 and S50 of FIG. In the processing target determination process of S55, the CPU 410 determines that all the two end combinations are processing targets for the first search process, and all the two end combinations are not processing targets for the second search process. It may be determined.

(3)第2実施例において、図2のS35およびS40にて、第1スキャン画像I12の両端の余白量が基準以上であると判断された場合には、スキャンパターンBが用いられ、スキャンパターンAが用いられていない、と考えられる。この場合には、CPU410は、図2のS45、S50の第2スキャン画像I22の余白量判定処理を省略しても良い。そして、S55の処理対象決定処理では、CPU410は、全ての2端の組み合わせを第2の探索処理の処理対象であると決定し、全ての2端の組み合わせを第1の探索処理の処理対象でないと決定しても良い。 (3) In the second embodiment, when it is determined in S35 and S40 of FIG. 2 that the margin amount at both ends of the first scan image I12 is equal to or larger than the reference, the scan pattern B is used, and the scan pattern It is thought that A is not used. In this case, the CPU 410 may omit the margin amount determination process of the second scan image I22 in S45 and S50 of FIG. In the processing target determination process of S55, the CPU 410 determines that all the two end combinations are the processing targets of the second search process, and does not set all the two end combinations as the processing targets of the first search process. It may be determined.

(4)第3実施例にて算出される2個のヒストグラムの重複面積Sovは、2個のヒストグラムの類似度を示す特徴値の一例であり、これに限られない。2個のヒストグラムの類似度を示す特徴値は、例えば、2個のヒストグラムの複数個のピーク位置の一致度などの他の特徴であっても良い。また、第3実施例に算出される2個のヒストグラムのダイナミックレンジは、2個の端部画像TI1、TI2の複雑さを示す特徴値の一例であり、これに限られない。2個の端部画像TI1、TI2の複雑さを示す特徴値は、例えば、2個のヒストグラムの分散値や、2個の端部画像TI1、TI2のエッジ量などの他の特徴値であっても良い。 (4) The overlapping area Sov of the two histograms calculated in the third embodiment is an example of a feature value indicating the similarity between the two histograms, and is not limited thereto. The feature value indicating the similarity between the two histograms may be another feature such as the degree of coincidence of a plurality of peak positions of the two histograms. The dynamic range of the two histograms calculated in the third embodiment is an example of a feature value indicating the complexity of the two end images TI1 and TI2, and is not limited thereto. The feature values indicating the complexity of the two end images TI1 and TI2 are, for example, other feature values such as the variance values of the two histograms and the edge amounts of the two end images TI1 and TI2. Also good.

(5)第1実施例において、図2のS45、S50の処理は、省略されても良い。すなわち、第1スキャン画像I12の両端の余白量判定処理が実行され、第2スキャン画像I22の余白量推定処理が省略されても良い。この場合には、例えば、第1スキャン画像I12の左右の端のうちの一方の余白量のみが基準値未満である場合には、第1スキャン画像I12の左右の端のうちの余白量のみが基準値未満である端を含む2個の組み合わせを、第1の探索処理の処理対象であると決定し、残りの2個の組み合わせを、第1の探索処理の処理対象でないと決定すれば良い。また、第1スキャン画像I12の左右の両端の余白量が基準値未満である場合には、全ての組み合わせを、第1の探索処理の処理対象であると決定すれば良い。 (5) In the first embodiment, the processes of S45 and S50 in FIG. 2 may be omitted. That is, the margin amount determination process at both ends of the first scan image I12 may be executed, and the margin amount estimation process of the second scan image I22 may be omitted. In this case, for example, when only one margin amount of the left and right ends of the first scan image I12 is less than the reference value, only the margin amount of the left and right ends of the first scan image I12 is obtained. It is only necessary to determine two combinations including an end that is less than the reference value as processing targets of the first search process and determine that the remaining two combinations are not processing targets of the first search process. . Further, when the margin amounts at the left and right ends of the first scan image I12 are less than the reference value, all combinations may be determined to be processing targets of the first search process.

(6)スキャンパターンBでは、折れ線VLで二つ折りにされた原稿10の両面を読み取ることによって、2個の原稿画像BIL、BIRをそれぞれ含む画像を表すスキャンデータが生成されている(図2のS15)。これに代えて、折れ線VLで切断されて物理的に2つに分離された原稿10を、2回に分けて読み取ることによって、2個の原稿画像BIL、BIRをそれぞれ含む画像を表すスキャンデータが生成されてもよい。 (6) In the scan pattern B, scan data representing images each including two document images BIL and BIR is generated by reading both sides of the document 10 folded in half by the broken line VL (FIG. 2). S15). Instead of this, scan data representing images each including two document images BIL and BIR is obtained by reading the document 10 which is cut by the broken line VL and physically separated into two parts in two steps. May be generated.

(7)上記実施例の余白量判定処理では、基本的には、スキャン画像の端と、原稿画像の端と、の間の領域が余白とされるが、原稿の端部(背景)が白であり、かつ、原稿台の色が白である場合には、原稿画像の端が判断できずに、スキャン画像の端と、原稿画像のオブジェクトの端と、の間が余白とされる可能性がある。この場合であっても、問題なく適切に配置済画像が生成される。具体的には、原稿の中央部(接続されるべき端)には、オブジェクトがあると想定されるので、スキャン画像の原稿の中央部に対応する端では、余白が正しく判断される。したがって、第1、第3実施例では、スキャン画像の両端のうち、原稿の中央部に対応する端では余白量が基準値未満となり、原稿の端部に対応する端では余白量が基準値以上となる。このために、結果的に原稿の中央部に対応する端が、配置済画像の中央部に位置するように、配置済画像が生成されることになる。また、第2および第4実施例では、必ず、原稿の中央部に対応する端を含む2端の組み合わせも、原稿の端部に対応する端を含む2端の組み合わせも探索処理の対象とされることになる。したがって、第1〜第4実施例のいずれでも、問題なく適切に配置済画像が生成される。 (7) In the margin amount determination processing of the above embodiment, basically, an area between the edge of the scanned image and the edge of the document image is a blank, but the edge (background) of the document is white. If the color of the platen is white, the edge of the original image cannot be determined, and there is a possibility that a margin is left between the edge of the scanned image and the edge of the object of the original image. There is. Even in this case, the arranged image is generated appropriately without any problem. Specifically, since it is assumed that there is an object at the central portion (end to be connected) of the original, the margin is correctly determined at the end corresponding to the central portion of the original of the scanned image. Therefore, in the first and third embodiments, the margin amount is less than the reference value at the end corresponding to the central portion of the document among the both ends of the scanned image, and the margin amount is greater than the reference value at the end corresponding to the end portion of the document. It becomes. For this reason, as a result, the arranged image is generated so that the end corresponding to the central portion of the document is located in the central portion of the arranged image. In the second and fourth embodiments, the combination of two ends including the end corresponding to the center portion of the document and the combination of two ends including the end corresponding to the end portion of the document are always subjected to the search process. Will be. Therefore, in any of the first to fourth embodiments, the arranged image is generated appropriately without any problem.

(8)上記実施例では、2個のスキャン画像I12、I22内の2個の原稿画像が横方向に並んで配置される配置済画像を表す配置済画像データが生成される。これに代えて、一の原稿画像と、他の原稿画像と、が縦方向に並んで配置される配置済画像を表す配置済画像データが生成されても良い。この場合には、例えば、一の原稿画像を含むスキャン画像の下端の余白量と、他の原稿画像を含むスキャン画像の上端の余白量と、がそれぞれ基準以上であるか否かが判断される。そして、図2のS55の処理対象決定処理では、当該判断結果に基づいて、2個の原稿画像の下端と上端との組み合わせについて、探索処理の処理対象とするか否かが決定されれば良い。また、図2のS60の配置順序決定処理では、2個の原稿画像の下端と上端との組み合わせについて、処理順序が決定されれば良い。 (8) In the above embodiment, arranged image data representing an arranged image in which two document images in the two scanned images I12 and I22 are arranged in the horizontal direction is generated. Instead of this, arranged image data representing an arranged image in which one original image and another original image are arranged in the vertical direction may be generated. In this case, for example, it is determined whether or not the margin amount at the lower end of the scan image including one original image and the margin amount at the upper end of the scan image including another original image are equal to or greater than a reference, respectively. . In the processing target determination process in S55 of FIG. 2, it is only necessary to determine whether or not the combination of the lower end and the upper end of the two document images is to be a search processing target based on the determination result. . Further, in the arrangement order determination processing in S60 of FIG. 2, the processing order may be determined for the combination of the lower end and the upper end of the two document images.

(9)上記実施例においてサーバ400のCPU410によって実行される処理(例えば、図2のS25〜S70の処理)は、例えば、複合機200のCPU210によって実行されても良い。この場合には、サーバ400は不要であり、複合機200が単体で図2の処理を実行すればよい。また、サーバ400のCPU410によって実行される処理は、複合機200と接続されたパーソナルコンピュータ500(図1)のCPU(図示省略)によって実行されても良い。例えば、パーソナルコンピュータ500のCPUは、パーソナルコンピュータ500にインストールされたスキャナドライバプログラムを実行することによって、これらの処理を実行しても良い。また、サーバ400は、本実施例のように1つの計算機で構成されても良く、互いに通信可能な複数個の計算機を含む計算システムによって構成されていても良い。 (9) The processing executed by the CPU 410 of the server 400 in the above embodiment (for example, the processing of S25 to S70 in FIG. 2) may be executed by the CPU 210 of the multifunction device 200, for example. In this case, the server 400 is unnecessary, and the multi-function device 200 may execute the processing of FIG. 2 alone. Further, the processing executed by the CPU 410 of the server 400 may be executed by the CPU (not shown) of the personal computer 500 (FIG. 1) connected to the multifunction device 200. For example, the CPU of the personal computer 500 may execute these processes by executing a scanner driver program installed in the personal computer 500. Further, the server 400 may be configured by one computer as in the present embodiment, or may be configured by a computer system including a plurality of computers that can communicate with each other.

(10)上記実施例では、サーバ400は、図2のS25にて、スキャンデータを画像ファイルの形式で取得し、図2のS75にて、配置済画像データを画像ファイルの形式で出力(送信)している。これに代えて、例えば、上記変形例のように、複合機200のCPU210がS25〜S45の処理を実行する場合には、CPU210は、スキャナ部250を用いて生成されたスキャンデータを画像ファイルに変換することなく、そのまま取得しても良い。また、CPU210は、配置済画像データを画像ファイルに変換することなく、そのまま配置済画像データを用いて用紙に印刷することによって、配置済画像データを出力しても良い。 (10) In the above embodiment, the server 400 acquires the scan data in the image file format in S25 of FIG. 2, and outputs (transmits) the arranged image data in the image file format in S75 of FIG. )doing. Instead, for example, when the CPU 210 of the multi-function peripheral 200 executes the processes of S25 to S45 as in the above modification, the CPU 210 converts the scan data generated using the scanner unit 250 into an image file. You may acquire as it is, without converting. Further, the CPU 210 may output the arranged image data by printing the arranged image data on the paper as it is without converting the arranged image data into an image file.

(11)上記実施例では、2個の画像データを用いて、2個の原稿画像が配置された配置済画像を表す配置済像データが生成されている。これに限らず、任意の個数の画像データを用いて、1個の配置済画像が生成されても良い。例えば、4個の画像データを用いて、4個の原稿画像が配置された配置済画像を表す配置済画像データが生成されてもよい。 (11) In the above embodiment, arranged image data representing an arranged image in which two document images are arranged is generated using two image data. However, the present invention is not limited to this, and one arranged image may be generated using an arbitrary number of image data. For example, arranged image data representing an arranged image in which four document images are arranged may be generated using four image data.

(12)上記実施例では、配置済画像データの生成に用いられる2個の画像データは、複合機200のスキャナ部250によって生成される。これに限らず、光学的に読み取られた画像を表す種々の画像データを採用可能である。例えば、デジタルカメラによる撮影によって二つ折りにされた原稿10の両面がそれぞれ光学的に読み取られることによって、2個の画像データが生成されても良い。あるいは、デジタルカメラによる撮影によって、原稿10の左領域10Lと部分領域CARと、該原稿10の右領域10Rと部分領域CALと、がそれぞれ光学的に読み取られることによって、2個の画像データが生成されても良い。また、これらの画像データは、読取装置(スキャナやデジタル)によって生成された画像データに限らず、描画作成や文書作成などのアプリケーションプログラムを用いて作成された画像データであっても良い。 (12) In the above embodiment, the two pieces of image data used for generating the arranged image data are generated by the scanner unit 250 of the multifunction device 200. The present invention is not limited to this, and various image data representing an optically read image can be employed. For example, two pieces of image data may be generated by optically reading both sides of the document 10 folded in half by photographing with a digital camera. Alternatively, two image data are generated by optically reading the left area 10L and the partial area CAR of the document 10 and the right area 10R and the partial area CAL of the document 10 by photographing with the digital camera. May be. Further, these image data are not limited to image data generated by a reading device (scanner or digital), but may be image data generated using an application program such as drawing creation or document creation.

(13)上記実施例において、ハードウェアによって実現されていた構成の一部をソフトウェアに置き換えるようにしてもよく、逆に、ソフトウェアによって実現されていた構成の一部をハードウェアに置き換えるようにしてもよい。 (13) In the above embodiment, a part of the configuration realized by hardware may be replaced with software, and conversely, a part of the configuration realized by software may be replaced with hardware. Also good.

以上、実施例、変形例に基づき本発明について説明してきたが、上記した発明の実施の形態は、本発明の理解を容易にするためのものであり、本発明を限定するものではない。本発明は、その趣旨並びに特許請求の範囲を逸脱することなく、変更、改良され得ると共に、本発明にはその等価物が含まれる。   As mentioned above, although this invention was demonstrated based on the Example and the modification, Embodiment mentioned above is for making an understanding of this invention easy, and does not limit this invention. The present invention can be changed and improved without departing from the spirit and scope of the claims, and equivalents thereof are included in the present invention.

200...複合機、210...CPU、220...揮発性記憶装置、221...バッファ領域、230...不揮発性記憶装置、231...制御プログラム、240...プリンタ部、250...スキャナ部、255...原稿台、260...操作部、270...表示部、280...通信部、400...サーバ、410...CPU、420...揮発性記憶装置、421...バッファ領域、430...不揮発性記憶装置、431...コンピュータプログラム、433...UIデータ群、480...通信部、500...パーソナルコンピュータ、1000...画像処理システム   200 ... multifunction device, 210 ... CPU, 220 ... volatile storage device, 221 ... buffer area, 230 ... nonvolatile storage device, 231 ... control program, 240 ... printer , 250 ... scanner unit, 255 ... manuscript table, 260 ... operation unit, 270 ... display unit, 280 ... communication unit, 400 ... server, 410 ... CPU, 420 ... volatile storage device, 421 ... buffer area, 430 ... nonvolatile storage device, 431 ... computer program, 433 ... UI data group, 480 ... communication unit, 500 ... Personal computer, 1000 ... Image processing system

Claims (12)

第1の対象画像を含む第1の画像を表す第1の画像データと、第2の対象画像を含む第2の画像を表す第2の画像データと、を取得する画像取得部と、
前記第1の対象画像の第1方向の端と前記第1の画像の前記第1方向の端との間に含まれる第1の画素の個数が基準以上であるか否かを判断する第1の判断部と、
前記第1の対象画像の前記第1方向と反対の第2方向の端と前記第1の画像の前記第2方向の端との間に含まれる連続する第2の画素の個数が基準以上であるか否かを判断する第2の判断部と、
前記第1の対象画像の前記第1方向と前記第2方向のうちの一方の端に沿う端部画像と、前記第2の対象画像の前記第1方向と前記第2方向のうちの一方の端に沿う端部画像と、が重なる第1種の配置位置を探索する第1の探索処理を実行することによって、前記第1の対象画像と前記第2の対象画像との相対的な配置位置を決定する第1の位置決定部と、
決定済の前記配置位置に前記第1の対象画像と前記第2の対象画像とが配置され、第1の対象画像と第2の対象画像とで1個の対象物を示す配置済画像を表す配置済画像データを生成する画像生成部と、
を備え
前記第1の位置決定部は、
前記第1の画素の個数が基準未満である場合には、前記第1の対象画像の前記第1方向の端に沿う端部画像と、前記第2の対象画像の前記第1方向の端に沿う端部画像と前記第2の対象画像の前記第2方向の端に沿う端部画像とのうちの少なくとも一方と、を用いて前記第1の探索処理を実行し、
前記第1の画素の個数が基準以上である場合には、前記第1の対象画像の前記第1方向の端に沿う端部画像を用いずに前記第1の探索処理を実行し、
前記第2の画素の個数が基準未満である場合には、前記第1の対象画像の前記第2方向の端に沿う端部画像と、前記第2の対象画像の前記第1方向の端に沿う端部画像と前記第2の対象画像の前記第2方向の端に沿う端部画像とのうちの少なくとも一方と、を用いて前記第1の探索処理を実行し、
前記第2の画素の個数が基準以上である場合には、前記第1の対象画像の前記第2方向の端に沿う端部画像を用いずに前記第1の探索処理を実行する、画像処理装置。
An image acquisition unit that acquires first image data representing a first image including a first target image and second image data representing a second image including a second target image;
Determining whether or not the number of first pixels included between an end in the first direction of the first target image and an end in the first direction of the first image is equal to or greater than a reference; The determination part of
The number of continuous second pixels included between an end in the second direction opposite to the first direction of the first target image and an end in the second direction of the first image is greater than or equal to a reference. A second determination unit for determining whether there is,
An end image along one end of the first target image and the second direction of the first target image, and one of the first direction and the second direction of the second target image. Relative arrangement positions of the first target image and the second target image by executing a first search process for searching for a first type arrangement position where the end image along the edge overlaps. A first position determining unit for determining
The first target image and the second target image are arranged at the determined arrangement position, and the first target image and the second target image represent a arranged image indicating one object. An image generation unit for generating arranged image data;
The first position determination unit includes:
When the number of the first pixels is less than the reference, an end image along the end in the first direction of the first target image and an end in the first direction of the second target image Performing the first search process using at least one of an end image along the end image along the end in the second direction of the second target image,
When the number of the first pixels is equal to or greater than a reference, the first search process is executed without using an end image along the end in the first direction of the first target image,
When the number of the second pixels is less than the reference, an end image along the end in the second direction of the first target image and an end in the first direction of the second target image Performing the first search process using at least one of an end image along the end image along the end in the second direction of the second target image,
When the number of the second pixels is equal to or greater than a reference, the first search process is executed without using the end image along the end in the second direction of the first target image. apparatus.
請求項1に記載の画像処理装置であって、さらに、
前記第2の対象画像の第1方向の端と前記第2の画像の前記第1方向の端との間に含まれる第3の画素の個数が基準以上であるか否かを判断する第3の判断部と、
前記第2の対象画像の前記第2方向の端と前記第2の画像の前記第2方向の端との間に含まれる第4の画素の個数が基準以上であるか否かを判断する第4の判断部と、
を備え、
前記第1の位置決定部は、
前記第3の画素の個数が基準未満である場合には、前記第2の対象画像の前記第1方向の端に沿う端部画像と、前記第1の対象画像の前記第1方向の端に沿う端部画像と前記第1の対象画像の前記第2方向の端に沿う端部画像とのうちの少なくとも一方と、を用いて前記第1の探索処理を実行し、
前記第3の画素の個数が基準以上である場合には、前記第2の対象画像の前記第1方向の端に沿う端部画像を用いずに前記第1の探索処理を実行し、
前記第4の画素の個数が基準未満である場合には、前記第2の対象画像の前記第2方向の端に沿う端部画像と、前記第1の対象画像の前記第1方向の端に沿う端部画像と前記第1の対象画像の前記第2方向の端に沿う端部画像とのうちの少なくとも一方と、を用いて前記第1の探索処理を実行し、
前記第4の画素の個数が基準以上である場合には、前記第2の対象画像の前記第2方向の端に沿う端部画像を用いずに前記第1の探索処理を実行する、画像処理装置。
The image processing apparatus according to claim 1, further comprising:
Determining whether or not the number of third pixels included between an end in the first direction of the second target image and an end in the first direction of the second image is greater than or equal to a reference; The determination part of
Determining whether or not the number of fourth pixels included between the second direction end of the second target image and the second direction end of the second image is greater than or equal to a reference; 4 determination units;
With
The first position determination unit includes:
When the number of the third pixels is less than the reference, an end image along the end in the first direction of the second target image and an end in the first direction of the first target image Performing the first search process using at least one of an end image along the end image along the end in the second direction of the first target image,
When the number of the third pixels is equal to or greater than a reference, the first search process is performed without using an end image along the end in the first direction of the second target image,
When the number of the fourth pixels is less than the reference, an end image along the end in the second direction of the second target image and an end in the first direction of the first target image Performing the first search process using at least one of an end image along the end image along the end in the second direction of the first target image,
When the number of the fourth pixels is equal to or greater than a reference, the first search process is executed without using an end image along the end in the second direction of the second target image. apparatus.
請求項2に記載の画像処理装置であって、
前記第1の位置決定部は、
前記第1の画素の個数が基準未満であり、かつ、前記第2の画素の個数が基準以上であり、かつ、前記第3の画素が基準未満であり、かつ、前記第4の画素の個数が基準以上である場合には、前記第1の対象画像の前記第2方向の端に沿う端部画像と前記第2の対象画像の前記第2方向の端に沿う端部画像とを用いずに、前記第1の対象画像の前記第1方向の端に沿う端部画像と前記第2の対象画像の前記第1方向の端に沿う端部画像とを用いて、前記第1の探索処理を実行する、画像処理装置。
The image processing apparatus according to claim 2,
The first position determination unit includes:
The number of the first pixels is less than the reference, the number of the second pixels is more than the reference, the third pixel is less than the reference, and the number of the fourth pixels Is equal to or greater than the reference, the end image along the end in the second direction of the first target image and the end image along the end in the second direction of the second target image are not used. In addition, the first search process is performed using an end image along the end in the first direction of the first target image and an end image along the end in the first direction of the second target image. An image processing apparatus that executes
請求項1から請求項3のいずれかに記載の画像処理装置であって、さらに、
前記第1の対象画像の前記第1方向と前記第2方向のうちの一方の端に沿う端部画像と、前記第2の対象画像の前記第1方向と前記第2方向のうちの一方の端に沿う端部画像と、が重ならない第2種の配置位置を探索する第2の探索処理を実行することによって、前記第1の対象画像と前記第2の対象画像との相対的な配置位置を決定する第2の位置決定部を備え、
前記第1の位置決定部は、前記第1の画素の個数が基準以上である場合には、前記第1の対象画像の前記第1方向の端に沿う端部画像を用いて、前記第1の探索処理を実行せず、
前記第2の位置決定部は、前記第1の画素の個数が基準以上である場合には、前記第1の対象画像の前記第1方向の端に沿う端部画像を用いて、前記第2の探索処理を実行する、画像処理装置。
The image processing apparatus according to any one of claims 1 to 3, further comprising:
An end image along one end of the first target image and the second direction of the first target image, and one of the first direction and the second direction of the second target image. Relative arrangement of the first target image and the second target image by executing a second search process for searching for a second type of arrangement position that does not overlap the end image along the end. A second position determining unit for determining a position;
When the number of the first pixels is greater than or equal to a reference, the first position determination unit uses the end image along the end in the first direction of the first target image, and The search process of
When the number of the first pixels is greater than or equal to a reference, the second position determination unit uses the end image along the end in the first direction of the first target image, and An image processing apparatus that executes the search process.
請求項4に記載の画像処理装置であって、
前記第1の位置決定部は、前記第1の画素の個数が基準以上であり、かつ、前記第2の画素の個数が基準以上である場合には、前記第1の探索処理を実行せず、
前記第2の位置決定部は、前記第1の画素の個数が基準以上であり、かつ、前記第2の画素の個数が基準以上である場合には、前記第2の探索処理を実行する、画像処理装置。
The image processing apparatus according to claim 4,
The first position determination unit does not execute the first search process when the number of the first pixels is equal to or larger than the reference and the number of the second pixels is equal to or larger than the reference. ,
The second position determination unit executes the second search process when the number of the first pixels is equal to or larger than the reference and the number of the second pixels is equal to or larger than the reference. Image processing device.
請求項4または請求項5に記載の画像処理装置であって、
前記第1の位置決定部は、前記第1の画素の個数が基準未満であり、かつ、前記第2の画素の個数が基準未満である場合には、前記第1の探索処理を実行し、
前記第2の位置決定部は、前記第1の画素の個数が基準未満であり、かつ、前記第2の画素の個数が基準未満である場合には、前記第2の探索処理を実行しない、画像処理装置。
The image processing apparatus according to claim 4 or 5, wherein
The first position determination unit executes the first search process when the number of the first pixels is less than a reference and the number of the second pixels is less than a reference.
The second position determination unit does not execute the second search process when the number of the first pixels is less than the reference and the number of the second pixels is less than the reference. Image processing device.
請求項2または請求項3に記載の画像処理装置であって、さらに、
前記第1の対象画像の前記第1方向と前記第2方向のうちの一方の端に沿う端部画像と、前記第2の対象画像の前記第1方向と前記第2方向のうちの一方の端に沿う端部画像と、が重ならない第2種の配置位置を探索する第2の探索処理を実行することによって、前記第1の対象画像と前記第2の対象画像との相対的な配置位置を決定する第2の位置決定部を備え、
前記第2の位置決定部は、前記第1の画素と前記第2の画素とのうちの一方の個数が基準以上であり、かつ、前記第3の画素と前記第4の画素とのうちの一方の個数が基準以上である場合には、前記第1の画素と前記第2の画素とのうちの他方の個数、および、前記第3の画素と前記第4の画素とのうちの他方の個数に拘わらずに、前記第1の対象画像の前記第1方向と前記第2方向のうちのいずれかの端と、前記第2の対象画像の前記第1方向と前記第2方向のうちのいずれかの端と、の全ての組み合わせについて、前記第2の探索処理を実行する、画像処理装置。
The image processing apparatus according to claim 2 or 3, further comprising:
An end image along one end of the first target image and the second direction of the first target image, and one of the first direction and the second direction of the second target image. Relative arrangement of the first target image and the second target image by executing a second search process for searching for a second type of arrangement position that does not overlap the end image along the end. A second position determining unit for determining a position;
In the second position determination unit, the number of one of the first pixel and the second pixel is equal to or more than a reference, and the second position determination unit includes the third pixel and the fourth pixel. When the number of one is equal to or more than a reference, the number of the other of the first pixel and the second pixel and the other of the third pixel and the fourth pixel Regardless of the number, any one of the first direction and the second direction of the first target image, and the first direction and the second direction of the second target image. An image processing apparatus that executes the second search process for all combinations with any one of the ends.
請求項1から請求項7のいずれかに記載の画像処理装置であって、さらに、
前記第1の対象画像の前記第1方向と前記第2方向のうちのいずれかの端と、前記第2の対象画像の前記第1方向と前記第2方向のうちのいずれかの端と、の複数個の組み合わせのそれぞれについて前記第1の探索処理を実行する場合に、前記複数個の組み合わせのそれぞれについて、組み合わせを構成する2個の端に沿う2個の端部画像のヒストグラムを生成するヒストグラム生成部と、
前記ヒストグラムを用いて、前記2個の端部画像のヒストグラムの類似度が比較的高い組み合わせに対する前記第1の探索処理の順序が、前記2個の端部画像のヒストグラムの類似度が比較的低い組み合わせに対する前記第1の探索処理の順序より先になるように、前記複数個の組み合わせの順序を決定する順序決定部と、
を備え、
前記第1の位置決定部は、
前記決定済の順序に従って、前記複数個の組み合わせについて、前記第1の探索処理を実行し、
前記複数個の組み合わせのうち、特定の組み合わせについて、前記第1種の配置位置を決定した場合に、前記複数個の組み合わせのうち、前記特定の組み合わせより前記決定済の順序が後の組み合わせについて、前記第1の探索処理を実行しない、画像処理装置。
The image processing apparatus according to claim 1, further comprising:
Any one of the first direction and the second direction of the first target image, one of the first direction and the second direction of the second target image, and When the first search process is executed for each of the plurality of combinations, a histogram of two edge images along two edges constituting the combination is generated for each of the plurality of combinations. A histogram generator;
Using the histogram, the order of the first search processing for a combination having a relatively high similarity between the histograms of the two end images is relatively low. An order determining unit that determines the order of the plurality of combinations so as to precede the order of the first search processing for combinations;
With
The first position determination unit includes:
Performing the first search process for the plurality of combinations according to the determined order;
Among the plurality of combinations, when the first type arrangement position is determined for a specific combination, among the plurality of combinations, the combination whose determined order is later than the specific combination, An image processing apparatus that does not execute the first search process.
第1の対象画像を含む第1の画像を表す第1の画像データと、第2の対象画像を含む第2の画像を表す第2の画像データと、を取得する画像取得部と、
前記第1の対象画像の複数個の端のうちのいずれかの端と、前記第2の対象画像の複数個の端のうちのいずれかの端と、の複数個の組み合わせのそれぞれについて、組み合わせを構成する2個の端に沿う2個の端部画像のヒストグラムを生成するヒストグラム生成部と、
前記ヒストグラムを用いて、前記2個の端部画像のヒストグラムの類似度が比較的高い組み合わせに対する探索処理の順序が、前記2個の端部画像のヒストグラムの類似度が比較的低い組み合わせに対する前記探索処理の順序より先になるように、前記複数個の組み合わせの順序を決定する順序決定部であって、前記探索処理は、前記第1の対象画像のいずれかの端に沿う端部画像と前記第2の対象画像のいずれかの端に沿う端部画像とを対応付ける位置を探索する処理である、前記順序決定部と、
前記探索処理を実行することによって、前記第1の対象画像と前記第2の対象画像との相対的な配置位置を決定する位置決定部と、
決定済の前記配置位置に前記第1の対象画像と前記第2の対象画像とが配置され、第1の対象画像と第2の対象画像とで1個の対象物を示す配置済画像を表す配置済画像データを生成する画像生成部と、
を備え、
前記位置決定部は、
前記決定済の順序に従って、前記複数個の組み合わせについて、前記探索処理を実行し、
前記複数個の組み合わせのうち、特定の組み合わせについて、前記配置位置を決定した場合に、前記複数個の組み合わせのうち、前記特定の組み合わせより前記決定済の順序が後の組み合わせについて、前記探索処理を実行しない、画像処理装置。
An image acquisition unit that acquires first image data representing a first image including a first target image and second image data representing a second image including a second target image;
For each of a plurality of combinations of any one of the plurality of ends of the first target image and any one of the plurality of ends of the second target image. A histogram generator for generating a histogram of two edge images along two edges constituting
Using the histogram, the search processing order for a combination with a relatively high degree of similarity between the two edge images is the search for a combination with a relatively low degree of similarity between the two edge images. An order determining unit that determines the order of the plurality of combinations so as to precede the processing order, wherein the search processing includes an end image along one end of the first target image, and the end image The order determination unit, which is a process of searching for a position that associates an end image along one of the ends of the second target image;
A position determination unit that determines a relative arrangement position of the first target image and the second target image by executing the search process;
The first target image and the second target image are arranged at the determined arrangement position, and the first target image and the second target image represent a arranged image indicating one object. An image generation unit for generating arranged image data;
With
The position determination unit
Performing the search process for the plurality of combinations according to the determined order;
When the arrangement position is determined for a specific combination among the plurality of combinations, the search process is performed for a combination after the determined order after the specific combination among the plurality of combinations. An image processing device that does not execute.
請求項9に記載の画像処理装置であって、さらに、
前記複数個の組み合わせのそれぞれについて、組み合わせを構成する2個の端に沿う2個の端部画像の複雑さを示す特徴値を算出する算出部を備え、
前記順序決定部は、前記特徴値を用いて、前記2個の端部画像の複雑さが比較的高い組み合わせが、前記2個の端部画像の複雑さが比較的低い組み合わせの順序より先になるように、前記複数個の組み合わせの順序を決定する、画像処理装置。
The image processing apparatus according to claim 9, further comprising:
For each of the plurality of combinations, a calculation unit that calculates a feature value indicating the complexity of two end images along two ends constituting the combination,
The order determination unit uses the feature value to determine that the combination of the two end images has a relatively high complexity before the combination of the two end images has a relatively low complexity. An image processing apparatus that determines the order of the plurality of combinations.
第1の対象画像を含む第1の画像を表す第1の画像データと、第2の対象画像を含む第2の画像を表す第2の画像データと、を取得する画像取得機能と、
前記第1の対象画像の第1方向の端と前記第1の画像の前記第1方向の端との間に含まれる第1の画素の個数が基準以上であるか否かを判断する第1の判断機能と、
前記第1の対象画像の前記第1方向と反対の第2方向の端と前記第1の画像の前記第2方向の端との間に含まれる連続する第2の画素の個数が基準以上であるか否かを判断する第2の判断機能と、
前記第1の対象画像の前記第1方向と前記第2方向のうちの一方の端に沿う端部画像と、前記第2の対象画像の前記第1方向と前記第2方向のうちの一方の端に沿う端部画像と、が重なる第1種の配置位置を探索する第1の探索処理を実行することによって、前記第1の対象画像と前記第2の対象画像との相対的な配置位置を決定する第1の位置決定機能と、
決定済の前記配置位置に前記第1の対象画像と前記第2の対象画像とが配置され、第1の対象画像と第2の対象画像とで1個の対象物を示す配置済画像を表す配置済画像データを生成する画像生成機能と、
をコンピュータに実現させ、
前記第1の位置決定機能は、
前記第1の画素の個数が基準未満である場合には、前記第1の対象画像の前記第1方向の端に沿う端部画像と、前記第2の対象画像の前記第1方向の端に沿う端部画像と前記第2の対象画像の前記第2方向の端に沿う端部画像とのうちの少なくとも一方と、を用いて前記第1の探索処理を実行し、
前記第1の画素の個数が基準以上である場合には、前記第1の対象画像の前記第1方向の端に沿う端部画像を用いずに前記第1の探索処理を実行し、
前記第2の画素の個数が基準未満である場合には、前記第1の対象画像の前記第2方向の端に沿う端部画像と、前記第2の対象画像の前記第1方向の端に沿う端部画像と前記第2の対象画像の前記第2方向の端に沿う端部画像とのうちの少なくとも一方と、を用いて前記第1の探索処理を実行し、
前記第2の画素の個数が基準以上である場合には、前記第1の対象画像の前記第2方向の端に沿う端部画像を用いずに前記第1の探索処理を実行する、コンピュータプログラム。
An image acquisition function for acquiring first image data representing a first image including a first target image and second image data representing a second image including a second target image;
Determining whether or not the number of first pixels included between an end in the first direction of the first target image and an end in the first direction of the first image is equal to or greater than a reference; Judgment function,
The number of continuous second pixels included between an end in the second direction opposite to the first direction of the first target image and an end in the second direction of the first image is greater than or equal to a reference. A second determination function for determining whether there is,
An end image along one end of the first target image and the second direction of the first target image, and one of the first direction and the second direction of the second target image. Relative arrangement positions of the first target image and the second target image by executing a first search process for searching for a first type arrangement position where the end image along the edge overlaps. A first position determining function for determining
The first target image and the second target image are arranged at the determined arrangement position, and the first target image and the second target image represent a arranged image indicating one object. An image generation function for generating arranged image data;
Is realized on a computer,
The first position determination function includes:
When the number of the first pixels is less than the reference, an end image along the end in the first direction of the first target image and an end in the first direction of the second target image Performing the first search process using at least one of an end image along the end image along the end in the second direction of the second target image,
When the number of the first pixels is equal to or greater than a reference, the first search process is executed without using an end image along the end in the first direction of the first target image,
When the number of the second pixels is less than the reference, an end image along the end in the second direction of the first target image and an end in the first direction of the second target image Performing the first search process using at least one of an end image along the end image along the end in the second direction of the second target image,
A computer program that executes the first search process without using an end image along an end in the second direction of the first target image when the number of the second pixels is equal to or larger than a reference. .
第1の対象画像を含む第1の画像を表す第1の画像データと、第2の対象画像を含む第2の画像を表す第2の画像データと、を取得する画像取得機能と、
前記第1の対象画像の複数個の端のうちのいずれかの端と、前記第2の対象画像の複数個の端のうちのいずれかの端と、の複数個の組み合わせのそれぞれについて、組み合わせを構成する2個の端に沿う2個の端部画像のヒストグラムを生成するヒストグラム生成機能と、
前記ヒストグラムを用いて、前記2個の端部画像のヒストグラムの類似度が比較的高い組み合わせに対する探索処理の順序が、前記2個の端部画像のヒストグラムの類似度が比較的低い組み合わせに対する前記探索処理の順序より先になるように、前記複数個の組み合わせの順序を決定する順序決定機能であって、前記探索処理は、前記第1の対象画像のいずれかの端に沿う端部画像と前記第2の対象画像のいずれかの端に沿う端部画像とを対応付ける位置を探索する処理である、前記順序決定機能と、
前記探索処理を実行することによって、前記第1の対象画像と前記第2の対象画像との相対的な配置位置を決定する位置決定機能と、
決定済の前記配置位置に前記第1の対象画像と前記第2の対象画像とが配置され、第1の対象画像と第2の対象画像とで1個の対象物を示す配置済画像を表す配置済画像データを生成する画像生成機能と、
をコンピュータに実現させ、
前記位置決定機能は、
前記決定済の順序に従って、前記複数個の組み合わせについて、前記探索処理を実行し、
前記複数個の組み合わせのうち、特定の組み合わせについて、前記配置位置を決定した場合に、前記複数個の組み合わせのうち、前記特定の組み合わせより前記決定済の順序が後の組み合わせについて、前記探索処理を実行しない、コンピュータプログラム。
An image acquisition function for acquiring first image data representing a first image including a first target image and second image data representing a second image including a second target image;
For each of a plurality of combinations of any one of the plurality of ends of the first target image and any one of the plurality of ends of the second target image. A histogram generation function for generating histograms of two edge images along two edges constituting
Using the histogram, the search processing order for a combination with a relatively high degree of similarity between the two edge images is the search for a combination with a relatively low degree of similarity between the two edge images. An order determination function for determining the order of the plurality of combinations so as to precede the processing order, wherein the search processing includes an end image along one end of the first target image and the end image The order determination function, which is a process of searching for a position that associates an end image along one of the ends of the second target image;
A position determination function for determining a relative arrangement position of the first target image and the second target image by executing the search process;
The first target image and the second target image are arranged at the determined arrangement position, and the first target image and the second target image represent a arranged image indicating one object. An image generation function for generating arranged image data;
Is realized on a computer,
The position determination function is:
Performing the search process for the plurality of combinations according to the determined order;
When the arrangement position is determined for a specific combination among the plurality of combinations, the search process is performed for a combination after the determined order after the specific combination among the plurality of combinations. A computer program that does not run.
JP2015125597A 2015-06-23 2015-06-23 Image processing apparatus and computer program Active JP6558094B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015125597A JP6558094B2 (en) 2015-06-23 2015-06-23 Image processing apparatus and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015125597A JP6558094B2 (en) 2015-06-23 2015-06-23 Image processing apparatus and computer program

Publications (2)

Publication Number Publication Date
JP2017011523A true JP2017011523A (en) 2017-01-12
JP6558094B2 JP6558094B2 (en) 2019-08-14

Family

ID=57764436

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015125597A Active JP6558094B2 (en) 2015-06-23 2015-06-23 Image processing apparatus and computer program

Country Status (1)

Country Link
JP (1) JP6558094B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111524653A (en) * 2020-04-30 2020-08-11 中国科学院电工研究所 Connecting method of second-generation high-temperature superconducting tapes and superconducting wire
WO2022130498A1 (en) * 2020-12-15 2022-06-23 三菱電機株式会社 Similarity calculation device, similarity calculation method, and similarity calculation program

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111524653A (en) * 2020-04-30 2020-08-11 中国科学院电工研究所 Connecting method of second-generation high-temperature superconducting tapes and superconducting wire
WO2022130498A1 (en) * 2020-12-15 2022-06-23 三菱電機株式会社 Similarity calculation device, similarity calculation method, and similarity calculation program
JPWO2022130498A1 (en) * 2020-12-15 2022-06-23

Also Published As

Publication number Publication date
JP6558094B2 (en) 2019-08-14

Similar Documents

Publication Publication Date Title
JP5299225B2 (en) Information processing apparatus, information processing method, and program
JP4358193B2 (en) Automatic image cropping method
JP6344064B2 (en) Image processing apparatus and computer program
CN110557515B (en) Image processing apparatus, image processing method, and storage medium
JP2006270266A (en) Image processor and image processing method
JP6575273B2 (en) Image processing apparatus and computer program
JP6558094B2 (en) Image processing apparatus and computer program
JP2023144065A (en) Image processing apparatus and image processing method
JP2007318520A (en) Image processor, image processing method and image processing program
JP2010004383A (en) Image processing apparatus, and color document determining method
JP2007266921A (en) Image forming apparatus, and image forming method and program
JP6256206B2 (en) Image processing apparatus and computer program
JP5648409B2 (en) Image processing apparatus, image processing method, and program
JP6398812B2 (en) Image processing apparatus and computer program
JP6354619B2 (en) Image processing apparatus and computer program
JP2008283441A (en) Image processing system, image reader, and control program
JP6152818B2 (en) Image processing apparatus and computer program
JP2016178367A (en) Image processing device and computer program
JP2015159427A (en) Image reader, control method and control program of image reader
JP6394060B2 (en) Image processing apparatus and computer program
JP2007082010A (en) Image reader, image read method and program
JP4165599B2 (en) Image processing device
JP2009225274A (en) Image processing unit
JP4954835B2 (en) Image processing apparatus and image forming apparatus
JP5413297B2 (en) Image processing apparatus, image processing method, program, and recording medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180605

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190329

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190409

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190604

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190701

R150 Certificate of patent or registration of utility model

Ref document number: 6558094

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150