JP6330458B2 - Image processing apparatus and computer program - Google Patents
Image processing apparatus and computer program Download PDFInfo
- Publication number
- JP6330458B2 JP6330458B2 JP2014095447A JP2014095447A JP6330458B2 JP 6330458 B2 JP6330458 B2 JP 6330458B2 JP 2014095447 A JP2014095447 A JP 2014095447A JP 2014095447 A JP2014095447 A JP 2014095447A JP 6330458 B2 JP6330458 B2 JP 6330458B2
- Authority
- JP
- Japan
- Prior art keywords
- area
- image
- search
- region
- processing apparatus
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000004590 computer program Methods 0.000 title claims description 10
- 239000002131 composite material Substances 0.000 claims description 50
- 230000002194 synthesizing effect Effects 0.000 claims description 3
- 238000000034 method Methods 0.000 description 76
- 230000008569 process Effects 0.000 description 66
- 239000013256 coordination polymer Substances 0.000 description 30
- 238000010586 diagram Methods 0.000 description 16
- 238000004891 communication Methods 0.000 description 5
- 230000012447 hatching Effects 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 2
- 239000000203 mixture Substances 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 230000008901 benefit Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 238000006073 displacement reaction Methods 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
Images
Landscapes
- Image Processing (AREA)
- Editing Of Facsimile Originals (AREA)
Description
本発明は、第1の画像内の参照領域に類似する第2の画像内の対象領域を決定する技術に関する。 The present invention relates to a technique for determining a target area in a second image similar to a reference area in the first image.
第1の画像と第2の画像とが合成された画像を表す出力画像データを生成する技術が知られている。例えば、特許文献1に開示された技術では、一度には読み取れない大きさの原稿を、スキャナを用いて2回に分けて読み取ることによって、第1の画像を表すスキャンデータと、第2の画像を表すスキャンデータと、が取得される。そして、2個のスキャンデータを用いて、第1の画像と第2の画像とが合成された合成画像を表す合成画像データが生成される。第1の画像と第2の画像とを合成する位置は、パターンマッチングを用いて決定される。パターンマッチングは、第1の画像内の一部の領域と類似する領域を第2の画像内において探索する処理である。
A technique for generating output image data representing an image obtained by combining a first image and a second image is known. For example, in the technique disclosed in
しかしながら、上記技術では、パターンマッチングにおいて探索対象とされる第2の画像内の範囲が十分に適正化されているとは言えなかった。このために、第1の画像内の参照領域に類似する第2の画像内の対象領域を決定するための処理時間が長くなる可能性があった。 However, in the above technique, it cannot be said that the range in the second image to be searched for pattern matching is sufficiently optimized. For this reason, there is a possibility that the processing time for determining the target area in the second image similar to the reference area in the first image becomes long.
本発明は、第1の画像内の参照領域に類似する第2の画像内の対象領域を決定するための処理時間を低減することができる新たな技術を提供することを目的とする。 An object of the present invention is to provide a new technique capable of reducing a processing time for determining a target area in a second image similar to a reference area in the first image.
本発明は、上述の課題の少なくとも一部を解決するためになされたものであり、以下の適用例として実現することが可能である。 SUMMARY An advantage of some aspects of the invention is to solve at least a part of the problems described above, and the invention can be implemented as the following application examples.
[適用例1]画像処理装置であって、第1の画像を表す第1の画像データと、第2の画像を表す第2の画像データと、を取得する取得部と、前記第1の画像データを用いて、前記第1の画像内の一部の領域である参照領域を決定する参照領域決定部と、前記第2の画像データと、前記参照領域の位置を示す位置情報と、前記参照領域の外形に関する外形情報と、を用いて、前記第2の画像内の一部の領域である探索領域を決定する探索領域決定部と、前記参照領域に類似する前記第2の画像内の対応領域を、前記第2の画像の前記探索領域内から決定する対応領域決定部と、前記第1の画像データと前記第2の画像データとを用いて、前記参照領域と前記対応領域とが重なるように、前記第1の画像と前記第2の画像とが合成された合成画像を表す合成画像データを生成する生成部と、を備える、画像処理装置。 Application Example 1 An image processing apparatus, an acquisition unit that acquires first image data representing a first image and second image data representing a second image, and the first image A reference area determining unit that determines a reference area, which is a partial area in the first image, using the data; the second image data; position information indicating a position of the reference area; and the reference A search region determination unit that determines a search region that is a partial region in the second image using external shape information regarding the external shape of the region, and a correspondence in the second image that is similar to the reference region The reference area and the corresponding area overlap using a corresponding area determining unit that determines an area from within the search area of the second image, the first image data, and the second image data. As described above, the synthesized image obtained by synthesizing the first image and the second image. And a generation unit for generating a composite image data representing the image processing apparatus.
上記構成によれば、参照領域の位置情報と外形情報とを用いて、適切な位置に配置され適切なサイズを有する探索領域が決定されため、第2の画像内の一部の領域である探索領域を用い、効率良く対応領域を決定することができる。したがって、第1の画像内の参照領域に類似する第2の画像内の対象領域を決定するための処理時間を低減することができる。
[適用例2]
適用例1に記載の画像処理装置であって、
前記探索領域決定部は、
前記第1の画像の基準の位置である第1の基準位置を示す情報と、前記第2の画像の基準の位置である第2の基準位置を示す情報と、を取得し、
前記参照領域の位置と前記第1の基準位置との関係と、前記第2の基準位置と、に基づいて、前記探索領域の位置を決定する、画像処理装置。
[適用例3]
適用例2に記載の画像処理装置であって、
前記第1の基準位置は、前記参照領域の基準の位置を示す情報であり、
前記第2の基準位置は、前記探索領域の基準の位置を示す情報であり、
前記第1の基準位置を示す情報と、前記第2の基準位置を示す情報とは、それぞれに、第1の方向の位置を示す情報と、第1の方向と垂直な第2の方向の位置を示す情報と、を含み、
前記第1の方向は、前記合成画像において前記第1の画像と前記第2の画像とが並ぶ方向であり、
前記探索領域決定部は、前記参照領域の位置が前記第1の基準位置に対して前記第1の方向にずれている場合には、前記探索領域の位置が前記第2の基準位置に対して前記第1の方向にずれ、かつ、前記参照領域の位置が前記第1の基準位置に対して前記第2の方向にずれている場合には、前記探索領域の位置が前記第2の基準位置に対して前記第2の方向にずれるように、前記探索領域の位置を決定する、画像処理装置。
[適用例4]
適用例1〜3のいずれかに記載の画像処理装置であって、
前記探索領域決定部は、
前記参照領域の基準となる第1の基準領域の外形を示す情報と、前記探索領域の基準となる第2の基準領域の外形を示す情報とを、取得し、
前記参照領域の外形と前記第1の基準領域の外形との関係と、前記第2の基準領域の外形と、に基づいて、前記探索領域の外形を決定する、画像処理装置。
[適用例5]
適用例4に記載の画像処理装置であって、
前記探索領域決定部は、
前記参照領域の第1の方向の長さと前記第1の基準領域の前記第1の方向の長さとの比率を用いて、前記探索領域の前記第1の方向の長さを決定する、画像処理装置。
[適用例6]
適用例5に記載の画像処理装置であって、
前記第1の方向は、生成されるべき前記合成画像において前記第1の画像と前記第2の画像とが並ぶ方向であり、
前記探索領域決定部は、
前記探索領域の前記第1の方向と垂直な第2の方向の長さを、前記参照領域の前記第2の方向の長さに決定する、画像処理装置。
[適用例7]
適用例5または6に記載の画像処理装置であって、
前記探索領域決定部は、前記探索領域の前記第1の方向の長さを、前記第2の基準領域の前記第1の方向の長さより小さな値に決定する、画像処理装置。
[適用例8]
適用例4〜7のいずれかに記載の画像処理装置であって、
前記探索領域決定部は、前記参照領域の外形と前記第1の基準領域の外形との関係と、前記第2の基準領域の外形と、に基づいて決定された前記探索領域が、前記第2の画像より外側の領域を含む場合には、修正後の前記探索領域が前記第2の画像内に含まれるように、前記探索領域を修正する、画像処理装置。
[適用例9]
適用例4〜8のいずれかに記載の画像処理装置であって、
前記第2の基準領域は、前記第2の画像の第1の方向の端に沿って配置され、
前記第1の基準領域は、前記第1の画像の前記第1の方向とは反対方向の端に沿って配置され、
前記第1の方向は、生成されるべき前記合成画像において前記第1の画像と前記第2の画像とが並ぶ方向である、画像処理装置。
[適用例10]
適用例1〜9のいずれかに記載の画像処理装置であって、
前記探索領域決定部は、
前記参照領域の第1の方向の長さが長いほど、前記探索領域の前記第1の方向の長さを長く決定する、画像処理装置。
[適用例11]
適用例1〜10のいずれかに記載の画像処理装置であって、
前記位置情報は、前記参照領域の位置を特定する座標を含み、
前記外形情報は、前記参照領域のサイズを示す第1の方向の長さと、前記第1の方向と垂直な第2の方向の長さと、を含む。
[適用例12]
適用例1〜11のいずれかに記載の画像処理装置であって、
前記参照領域決定部は、前記第1の画像内の複数個の画素の値のばらつきに基づいて、前記参照領域を決定し、
前記探索領域決定部は、ばらつきに基づいて決定された前記参照領域に応じて、前記探索領域を決定する、画像処理装置。
[適用例13]
適用例1〜12のいずれかに記載の画像処理装置であって、
前記第1の画像データは、原稿の第1の領域を光学的に読み取ることによって得られる画像データであり、
前記第2の画像データは、前記原稿の第2の領域を光学的に読み取ることによって得られる画像データである、画像処理装置。
According to the above configuration, a search area that is arranged at an appropriate position and has an appropriate size is determined using the position information and the external shape information of the reference area, and thus a search that is a partial area in the second image. Using the region, the corresponding region can be determined efficiently. Therefore, it is possible to reduce the processing time for determining the target area in the second image similar to the reference area in the first image.
[Application Example 2]
An image processing apparatus according to Application Example 1,
The search area determination unit
Obtaining information indicating a first reference position, which is a reference position of the first image, and information indicating a second reference position, which is a reference position of the second image;
An image processing apparatus that determines a position of the search area based on a relationship between a position of the reference area and the first reference position and the second reference position.
[Application Example 3]
An image processing apparatus according to Application Example 2,
The first reference position is information indicating a reference position of the reference area,
The second reference position is information indicating a reference position of the search area,
The information indicating the first reference position and the information indicating the second reference position are respectively information indicating the position in the first direction and a position in the second direction perpendicular to the first direction. Including information indicating
The first direction is a direction in which the first image and the second image are arranged in the composite image,
When the position of the reference area is shifted in the first direction with respect to the first reference position, the search area determining unit determines that the position of the search area is relative to the second reference position. When the position of the reference area is shifted in the second direction with respect to the first reference position, the position of the search area is shifted to the second reference position. An image processing apparatus that determines a position of the search region so as to be shifted in the second direction with respect to the image.
[Application Example 4]
The image processing apparatus according to any one of Application Examples 1 to 3,
The search area determination unit
Obtaining information indicating the outer shape of the first reference area serving as the reference area of the reference area and information indicating the outer shape of the second reference area serving as the reference of the search area;
An image processing apparatus that determines an outer shape of the search region based on a relationship between an outer shape of the reference region and an outer shape of the first reference region and an outer shape of the second reference region.
[Application Example 5]
An image processing apparatus according to Application Example 4,
The search area determination unit
Image processing for determining a length of the search region in the first direction using a ratio between a length of the reference region in the first direction and a length of the first reference region in the first direction apparatus.
[Application Example 6]
An image processing apparatus according to Application Example 5,
The first direction is a direction in which the first image and the second image are arranged in the composite image to be generated;
The search area determination unit
An image processing apparatus that determines a length of the search region in a second direction perpendicular to the first direction as a length of the reference region in the second direction.
[Application Example 7]
The image processing apparatus according to Application Example 5 or 6,
The search region determination unit is an image processing device that determines the length of the search region in the first direction to a value smaller than the length of the second reference region in the first direction.
[Application Example 8]
The image processing apparatus according to any one of Application Examples 4 to 7,
The search region determination unit is configured to determine whether the search region determined based on a relationship between an outer shape of the reference region and an outer shape of the first reference region and an outer shape of the second reference region is the second shape. An image processing device that corrects the search area so that the corrected search area is included in the second image when an area outside the first image is included.
[Application Example 9]
An image processing apparatus according to any one of Application Examples 4 to 8,
The second reference region is disposed along an edge in a first direction of the second image;
The first reference region is disposed along an end of the first image in a direction opposite to the first direction;
The image processing apparatus, wherein the first direction is a direction in which the first image and the second image are arranged in the composite image to be generated.
[Application Example 10]
The image processing apparatus according to any one of Application Examples 1 to 9,
The search area determination unit
An image processing apparatus that determines the length of the search region in the first direction to be longer as the length of the reference region in the first direction is longer.
[Application Example 11]
The image processing apparatus according to any one of Application Examples 1 to 10,
The position information includes coordinates that specify the position of the reference region,
The external shape information includes a length in a first direction indicating the size of the reference region and a length in a second direction perpendicular to the first direction.
[Application Example 12]
An image processing apparatus according to any one of Application Examples 1 to 11,
The reference area determining unit determines the reference area based on a variation in values of a plurality of pixels in the first image;
The image processing apparatus, wherein the search area determination unit determines the search area according to the reference area determined based on variation.
[Application Example 13]
An image processing apparatus according to any one of Application Examples 1 to 12,
The first image data is image data obtained by optically reading a first area of a document,
The image processing apparatus, wherein the second image data is image data obtained by optically reading a second area of the document.
なお、本発明は、種々の形態で実現することが可能であり、例えば、画像読取装置、画像処理装置や画像読取装置の制御方法、これらの装置または方法を実現するためのコンピュータプ口グラム、そのコンピュータプログラムを記録した記録媒体、等の形態で実現することができる。 The present invention can be realized in various forms, for example, an image reading apparatus, an image processing apparatus, a method for controlling the image reading apparatus, a computer program for realizing these apparatuses or methods, and the like. It can be realized in the form of a recording medium on which a computer program is recorded.
A.実施例:
A−1:画像処理システム1000の構成
図1は、実施例における画像処理システムの構成を示すブロック図である。画像処理システム1000は、画像処理装置としてのサーバ400と、複合機200と、を備えている。サーバ400は、インターネット70に接続されており、複合機200は、LAN(Local Area Network)80を介して、インターネット70に接続されている。この結果、サーバ400と複合機200は、LAN80とインターネット70とを介して、通信可能である。また、LAN80には、複合機200のユーザのパーソナルコンピュータ500が接続されていても良い。
A. Example:
A-1: Configuration of
サーバ400は、CPU410と、DRAMなどの揮発性記憶装置420と、ハードディスクドライブやフラッシュメモリなどの不揮発性記憶装置430と、インターネット70などのネットワークに接続するためのインタフェースを含む通信部480と、を備えている。揮発性記憶装置420には、CPU410が処理を行う際に生成される種々の中間データを一時的に格納するバッファ領域421が設けられている。不揮発性記憶装置430には、コンピュータプログラム431と、UIデータ群433と、が格納されている。
The
コンピュータプログラム431、および、UIデータ群433は、例えば、サーバ400の管理者によって、インターネット70を介してサーバ400にアップロードされることにより、サーバ400にインストールされる。または、コンピュータプログラム431、および、UIデータ群433は、例えば、DVD−ROMなどに格納された形態で提供され、サーバ400の管理者によって、サーバ400にインストールされても良い。CPU410は、コンピュータプログラム431を実行することにより、後述する画像処理を実現する。
The
複合機200は、CPU210と、DRAMなどの揮発性記憶装置220と、フラッシュメモリやハードディスクドライブなどの不揮発性記憶装置230と、プリンタ部240と、スキャナ部250と、タッチパネルやボタンなどの操作部260と、液晶ディスプレイなどの表示部270と、外部機器と通信を行う通信部280と、を備えている。例えば、通信部280は、LAN80などのネットワークに接続するためのインタフェースや、外部記憶装置(例えば、USBメモリ)と接続するためのインタフェースを含んでいる。
The
揮発性記憶装置220には、CPU210が処理を行う際に生成される種々のデータを一時的に格納するバッファ領域221が設けられている。不揮発性記憶装置230には、制御プログラム231が格納されている。
The
プリンタ部240は、インクジェット方式やレーザー方式などの印刷方式を用いて印刷を実行する。スキャナ部250は、光電変換素子(例えば、CCD、CMOS)を用いて光学的に原稿を読み取ることによってカラー画像やグレー画像を表すスキャンデータを生成する。スキャナ部250は、いわゆるフラットベッド式の原稿台を備えている。なお、原稿台の長手方向のサイズは、ISO(International Organization for Standardizationの略称)216で定められている紙の寸法を規定するA4サイズの長手方向の長さである297mmより少しだけ(例えば、数センチ)長いサイズである。そして、原稿台の短手方向のサイズは、ANSI/ASME(American National Standards Institute/American Society of Mechanical Engineersの略称)Y14.1で定められている紙の寸法を規定するレターサイズの短手方向の長さである215.9mmより少しだけ(例えば、数センチ)長いサイズである。本実施例では、1回で読み取ることができる原稿の最大サイズは、A4サイズより大きくA3サイズ(ISOで定められている紙の寸法)より小さいサイズである。具体的には、スキャナ部250は、長手方向の長さがA4サイズの長手方向の長さより少しだけ長く、かつ、短手方向の長さがレターサイズの短手方向の長さより少しだけ長い原稿を読み取り、当該原稿のサイズの画像を表す画像データを生成する。このために、後述するように、A3サイズの原稿の長手方向の中央付近が重複するように、A3サイズの原稿を2回に分けて読み取ることができる。
The
CPU210は、制御プログラム231を実行することにより、複合機200の制御を実行する。例えば、CPU210は、プリンタ部240やスキャナ部250を制御して、コピー処理、印刷処理、スキャン処理などを実行する。さらに、CPU210は、サーバ400にアクセスして、サーバ400が提供するサービスを利用するサービス利用処理を、実行することができる。
The
A−2:画像処理システム1000の動作
図2は、画像処理システム1000の動作を示すシーケンス図である。このシーケンス図の処理は、複合機200が、サーバ400が提供する画像生成サービスの利用指示を、ユーザから受け付けた場合に開始される。この画像生成サービスは、詳細は後述するが、複数個のスキャンデータによって表される複数個のスキャン画像を合成するサービスである。複数個のスキャンデータは、詳細は後述するが、例えば、1回で読み取り可能なサイズより大きなサイズの原稿を、複数回に分けて読み取ることによって生成される。
A-2: Operation of
処理が開始されると、S5では、複合機200のCPU210は、サービス開始要求を、サーバ400に対して送信する。サーバ400のCPU410は、サービス開始要求を受信すると、UIデータ群433(図1)から画像生成サービスの提供に必要なUIデータを選択し、該UIデータを複合機200に対して送信する(S10)。UIデータは、具体的には、ユーザインタフェース画面(以下、UI画面)を表す画面データと、制御データと、を含む。この制御データは、例えば、UI画面を利用して複合機200が所定の処理(具体的には、後述するS15のスキャン処理)を行うために必要な各種のデータを含む。例えば、制御データは、UI画面(例えば、図4)を介して受け付けたユーザの指示に基づいて、複合機200が実行すべき処理(例えば、サーバ400へのスキャンデータの送信)を行うために必要な情報(例えば、スキャンデータの送信先アドレス)を含む。
When the process is started, in S5, the
S15では、CPU210は、受信したUIデータに基づいて、複数個のスキャンデータを生成するスキャン処理を実行する。スキャン処理では、CPU210は、ユーザが用意した原稿を2回に分けて読み取ることによって、2個のスキャンデータを生成する。本実施例のスキャンデータは、RGBの各成分の値(例えば、0〜255の256階調の値)を画素ごとに含むRGB画像データである。
In S15, the
図3は、本実施例で用いられる原稿の一例を示す図である。図3の原稿10のサイズは、スキャナ部250が1回で読み取り可能なサイズ(本実施例では、A4サイズより少し大きなサイズ)の約2倍のサイズ(本実施例では、A3サイズ)である。
FIG. 3 is a diagram illustrating an example of a document used in this embodiment. The size of the original 10 in FIG. 3 is about twice the size (A3 size in this embodiment) that is readable by the
図4は、UI画面の一例を示す図である。先ず、CPU210は、図4のUI画面UG1を表示部270に表示する。例えば、UI画面UG1は、原稿台への原稿10の適切な設置を促すメッセージMS1と、スキャンボタンSBと、キャンセルボタンCBと、を含んでいる。ユーザは、UI画面UG1に従って、原稿10の左側の約半分の領域10L(図3)を読み取ることができるように、原稿10を原稿台に設置し、スキャンボタンSBを押下する。スキャンボタンSBの押下に応じて、CPU210は、スキャナ部250を制御して原稿を読み取ることによって、左側スキャンデータを生成する。
FIG. 4 is a diagram illustrating an example of a UI screen. First, the
図5は、スキャン画像の一例を示す図である。図5(A)には、左側スキャンデータによって表される左側スキャン画像20Lが示されている。左側スキャン画像20Lは、原稿10の左側の約半分の領域10L(図3)を示す左側原稿画像HILと、余白WBLと、を含んでいる。
FIG. 5 is a diagram illustrating an example of a scanned image. FIG. 5A shows a
次に、CPU210は、所定のUI画面(図示省略)を表示部270に表示する。このUI画面は、UI画面UG1と同様に、原稿台への原稿10の適切な設置を促すメッセージと、スキャンボタンと、キャンセルボタンと、を含んでいる。ユーザは、UI画面に従って、原稿10の右側の約半分の領域10R(図3)を読み取ることができるように、原稿10を原稿台に設置し、スキャンボタンを押下する。CPU210は、スキャンボタンの押下に応じて、スキャナ部250を制御して原稿を読み取ることによって、右側スキャンデータを生成する。
Next, the
図5(B)には、右側スキャンデータによって表される右側スキャン画像20Rが示されている。右側スキャン画像20Rは、原稿10の右側の約半分の領域10R(図3)を示す右側原稿画像HIRと、余白WBRと、を含んでいる。
FIG. 5B shows a
ここで、図3の原稿10の横方向の中央部CAを表す画像は、左側スキャン画像20Lの右端に沿った領域と、右側スキャン画像20Rの左端に沿った領域と、の両方に含まれている。すなわち、図5にハッチングで示すように、左側スキャン画像20Lは、原稿10の中央部CAを表す画像CILを含み、右側スキャン画像20Rは、原稿10の中央部CAを表す画像CIRを含んでいる。これは、例えば、UI画面や複合機200の説明書などによって、原稿10の中央部CAが、右側スキャンデータの生成時と左側スキャンデータの生成時との両方で読み取られるように、原稿10を原稿台に設置するように、ユーザに指示することによって、実現される。なお、左側スキャン画像20L内の画像CILと、右側スキャン画像20R内の画像CIRとは、ともに原稿10の中央部CAを表しているが、ユーザによって原稿台に設置された原稿10の位置、スキャナ部250の光電変換素子の特性などによって、面積や色などに多少の差は、生じ得る。
Here, the image representing the lateral center CA of the
図2のS20では、CPU210は、右側スキャン画像20Rを表す右側スキャンデータと、左側スキャン画像20Lを表す左側スキャンデータと、をサーバ400に対して送信する。この結果、S25にて、サーバ400のCPU410は、右側スキャンデータと、左側スキャンデータと、取得して、バッファ領域421に格納する。
In S20 of FIG. 2, the
S30では、CPU410は、右側スキャンデータを用いて、参照領域決定処理を実行する。参照領域決定処理は、右側スキャンデータによって表される右側スキャン画像20Rの一部の領域である参照領域RA1を決定する処理である。なお、参照領域決定処理の詳細は、後述する。
In S30, the
S32では、CPU410は、探索領域決定処理を実行する。探索領域決定処理は、左側スキャンデータを用いて、左側スキャン画像20L内の一部の領域である探索領域SA1を決定する処理である。なお、探索領域決定処理の詳細は、後述する。
In S32, the
S35では、CPU410は、対応領域決定処理を実行する。対応領域決定処理は、右側スキャン画像20R内の参照領域RA1に対応する左側スキャン画像20L内の対応領域CPを決定する処理である。参照領域RA1に対応する対応領域CPは、次のように定義できる。右側スキャン画像20R内の参照領域RA1(図5(B))内に表されている原稿10の一部分を特定部分SPT(図3)とする。参照領域RA1に対応する対応領域CPは、左側スキャン画像20Lにおいて、原稿10の特定部分SPTを表す領域である。対応領域CPは、S32の探索領域決定処理によって左側スキャン画像20L内に決定された探索領域SA1内から決定される。なお、対応領域処理の詳細は、後述する。
In S35, the
S40では、CPU410は、合成処理を実行する。合成処理では、右側スキャンデータと左側スキャンデータとを用いて、右側スキャン画像20R内の右側原稿画像HIRと、左側スキャン画像20L内の左側原稿画像HILとが合成された合成画像30を表す合成画像データが生成される。
In S40, the
図6は、合成画像30の一例を示す図である。図6に示すように、合成画像30において、右側原稿画像HIRと左側原稿画像HILとは、右側原稿画像HIR内の参照領域RA1と、左側原稿画像HIL内の対応領域CPと、が重なるように、合成される。合成画像30において、右側原稿画像HIRと左側原稿画像HILとが互いに重なり合う領域内の画素の値には、例えば、右側原稿画像HIR(右側スキャン画像20R)内の画素の値が優先的に採用される。これによって、右側原稿画像HIRと左側原稿画像HILとが合成されて、図3の原稿10を表す合成画像30が生成される。
FIG. 6 is a diagram illustrating an example of the
なお、後述する対応領域決定処理において、参照領域RA1に対応する対応領域CPを決定できなかった場合には、例えば、機械的に、左側スキャン画像20Lの右端の辺と、右側スキャン画像20Rの左端の辺と、が接するように、2個のスキャン画像が合成された合成画像を表す合成画像データが生成される(図示省略)。
If the corresponding area CP corresponding to the reference area RA1 cannot be determined in the corresponding area determination process described later, for example, the right edge of the left scanned
図2のS45では、CPU410は、生成された合成画像データを複合機200に対して送信する。複合機200のCPU210は、合成画像データを受信すると、受信した合成画像データを不揮発性記憶装置230に格納するとともに、ユーザに合成画像データを受信したことを通知する。合成画像データは、ユーザの利用に供される。例えば、複合機200は、ユーザの指示に基づいて、合成画像データを用いて、合成画像30を印刷することができる。
In S <b> 45 of FIG. 2, the
以上説明した画像処理システム1000によれば、一の原稿10(図3)からそれぞれ別の領域を読み取ることによって得られる複数個の画像データ(具体的には、右側スキャンデータと左側スキャンデータ)を用いて、一の原稿10を表す合成画像データを生成することができる。
According to the
次に、図2のS30で示した参照領域決定処理を説明する。図7は、参照領域決定処理のフローチャートである。図8は、参照領域決定処理の説明図である。S105では、CPU410は、CPU410は、右側スキャン画像20R内に、配置範囲FAを決定する。決定された配置範囲FAの内側に、参照領域決定処理によって、参照領域RA1が決定される。配置範囲FAの位置、形状、サイズ(すなわち、縦方向および横方向の画素数)は、予め定められている。
Next, the reference area determination process shown in S30 of FIG. 2 will be described. FIG. 7 is a flowchart of the reference area determination process. FIG. 8 is an explanatory diagram of the reference area determination process. In S105, the
具体的には、配置範囲FAは、図5(B)に示すように、右側スキャン画像20Rの4つの端のうち、原稿10の中央部CAを表す画像CIRが位置している端、本実施例では、右側スキャン画像20Rの左端に沿って配置される。
Specifically, as shown in FIG. 5B, the arrangement range FA is the end where the image CIR representing the central portion CA of the
配置範囲FAの横方向の長さ(すなわち、短手方向の長さ)は、右側スキャン画像20Rにおいて、原稿10の中央部CAを表す画像CIRの横方向の幅より狭いことが好ましい。配置範囲FAの縦方向の長さ(すなわち、長手方向の長さ)は、右側スキャン画像20Rの縦方向の長さと等しい。
The lateral length of the arrangement range FA (that is, the lateral length) is preferably narrower than the lateral width of the image CIR representing the central portion CA of the
S110では、CPU410は、配置範囲FAに配置する単位領域のサイズを決定する。本実施例では、単位領域のサイズは、予め定められた値に決定される。例えば、1個の単位領域の横方向のサイズは、例えば、1〜2画素程度であり、1個の単位領域の縦方向のサイズは、右側スキャン画像20Rの縦方向の画素数の1/6〜1/3程度である。
In S110, the
S115では、CPU410は、配置範囲FA内の複数個の単位領域の中から、1個の注目単位領域を選択する。図8(A)には、配置範囲FA内の複数個の単位領域が示されている。説明のために、配置範囲FA内の画素の座標を、右方向を正方向とするX軸と下方向を正方向とするY軸とを有し、配置範囲FAの左上の画素を(1、1)とする2次元座標系を用いて表す。
In S115, the
図8(A)には、4つの単位領域UAa〜UAdが示されている。単位領域UAaの上端および左端は、配置範囲FAの上端および左端と一致する。単位領域UAbの下端および左端は、配置範囲FAの下端および左端と一致する。単位領域UAcの上端および右端は、配置範囲FAの上端および右端と一致する。単位領域UAdの下端および右端は、配置範囲FAの下端および右端と一致する。 FIG. 8A shows four unit areas UAa to UAd. The upper end and the left end of the unit area UAa coincide with the upper end and the left end of the arrangement range FA. The lower end and the left end of the unit area UAb coincide with the lower end and the left end of the arrangement range FA. The upper end and right end of the unit area UAc coincide with the upper end and right end of the arrangement range FA. The lower end and the right end of the unit area UAd coincide with the lower end and the right end of the arrangement range FA.
先ず、左上の端の単位領域UAaが最初の注目単位領域として選択される。そして、図8(A)に矢印で示すように、1画素ずつ下方向に位置がずれた単位領域が、順次に選択される。そして、左下の端の単位領域UAbが選択されると、左上の端の単位領域UAaの位置から1画素だけ右方向にずれた部分画像が選択される。その後は、再び1画素ずつ下方向に位置がずれた部分画像が、順次に選択される。最後に選択される部分画像は、右下の端の単位領域UAdである。 First, the unit area UAa at the upper left end is selected as the first target unit area. Then, as indicated by arrows in FIG. 8A, unit regions whose positions are shifted downward by one pixel are sequentially selected. When the lower left end unit area UAb is selected, a partial image shifted rightward by one pixel from the position of the upper left end unit area UAa is selected. Thereafter, partial images whose positions are shifted downward by one pixel are sequentially selected. The partial image selected last is the unit area UAd at the lower right end.
1個の注目単位領域が選択されると、S120では、CPU410は、注目単位領域内の複数個の画素を、ばらつき画素と、非ばらつき画素と、に分類し、ばらつき画素の個数(ばらつき画素数)VCuを算出する。
When one target unit region is selected, in S120, the
図9は、ばらつき画素と非ばらつき画素とを説明する図である。CPU410は、注目単位領域内の複数個の画素を1個ずつ注目画素TPとして選択して、注目画素TPを中心とする横3画素×3画素分の領域FL内の画素を用いて、注目画素TPのばらつき値Vを算出する。まず、図9の式に示すように、CPU410は、注目画素TPの値(R0、G0、B0)と、周囲の8個の画素の値(Rn、Gn、Bn)のそれぞれと、の差分ΔVnを算出する。nは、注目画素TPの周囲の8個の画素を識別する1〜8までの番号であり、図9の領域FL内の各画素に付された番号である。CPU410は、図9に式で示すように、算出された8個の差分ΔVnの合計値を、注目画素TPのばらつき値Vとして算出する。注目画素TPのばらつき値Vが、所定の閾値Vth以上である場合には、注目画素TPは、ばらつき画素に分類され、所定の閾値Vth未満である場合には、注目画素TPは、非ばらつき画素に分類される。
FIG. 9 is a diagram for explaining a variation pixel and a non-variation pixel. The
S125では、CPU410は、注目単位領域のばらつき画素数VCuと、所定の閾値VCthと、を比較する。注目単位領域のばらつき画素数VCuが、閾値VCth以上である場合には(S130:YES)、S135において、CPU410は、注目単位領域の左上の画素の座標UP(X1、Y1)を、内部の画素の値のばらつきが比較的大きい単位領域(以下、ばらつき単位領域とも呼ぶ)を示す情報として記憶する。注目単位領域のばらつき画素数VCuが、閾値VCth未満である場合には(S130:NO)、CPU410は、S135をスキップして、S140に処理を進める。
In S125, the
S140では、CPU410は、配置範囲FA内の全ての単位領域(図8(A))を注目単位領域として処理したか否かを判断する。未処理の単位画像がある場合には(S140:NO)、CPU410は、S115に戻る。全ての単位領域が処理された場合には(S140:YES)、S145において、CPU410は、上述したS135にて1個以上の単位領域の座標P(X1、Y1)が記憶されているか否かを判断する。
In S140, the
単位領域の座標UP(X1、Y1)が記憶されていない場合には(S145:NO)、S150において、CPU410は、基準参照領域RA0(デフォルトの領域)を、参照領域RA1として決定する。基準参照領域RA0については後述する。単位領域の座標UP(X1、Y1)が記憶されている場合には(S145:YES)、S155において、CPU410は、参照領域配置処理を実行する。
If the unit area coordinates UP (X1, Y1) are not stored (S145: NO), in S150, the
図10は、参照領域配置処理のフローチャートである。先ず、図10の参照領域配置処理が開始される時点で、配置範囲FA内には、複数個のばらつき単位領域が特定されている(図8(B))。図8(B)において、黒い丸は、特定されたばらつき単位領域の左上の画素(領域特定画素とも呼ぶ)の位置を示している。 FIG. 10 is a flowchart of the reference area arrangement process. First, when the reference area arrangement process in FIG. 10 is started, a plurality of variation unit areas are specified in the arrangement area FA (FIG. 8B). In FIG. 8B, the black circle indicates the position of the upper left pixel (also referred to as region specifying pixel) of the specified variation unit region.
S205では、CPU410は、特定された複数個のばらつき単位領域の中から、互いに近接している1個以上のばらつき単位領域(以下、近接ばらつき単位領域群と呼ぶ)を選択する。具体的には、CPU410は、所定の大きさの判定枠JH(図8(B))を用いて配置範囲FA内を走査して、内部に含まれる領域特定画素の個数が最大である判定枠JHの位置を決定する。
In S205, the
図8(B)には、内部に含まれる領域特定画素の個数が最大である判定枠JHが示されている。図8(B)に示す判定枠JHには、5個の領域特定画素UP1〜UP5が含まれている。CPU410は、さらに、これらの5個の領域特定画素UP1〜UP5との距離が、基準距離Dthより近い領域特定画素を特定する。図8(B)の例では、領域特定画素UP1〜UP5との距離が、基準距離Dthより近い2個の領域特定画素P6、P7が特定される。この結果、図8(B)の例では、7個の領域特定画素UP1〜UP7に対応する7個のばらつき単位領域が、近接ばらつき単位領域群として選択される。
FIG. 8B shows a determination frame JH in which the number of area specifying pixels included therein is the maximum. The determination frame JH shown in FIG. 8B includes five area specifying pixels UP1 to UP5. Further, the
S210では、CPU410は、近接ばらつき単位領域群によって規定される領域VA(以下、ばらつき領域VAとも呼ぶ)内の画素数PCを算出する。図8(C)には、近接ばらつき単位領域群によって規定されるばらつき領域VAの一例を示す図である。ばらつき領域VAは、近接ばらつき単位領域群に含まれる1個以上のばらつき単位領域のうちの少なくとも一個の単位領域に含まれる複数個の画素によって構成される。
In S210, the
S215〜S240では、CPU410は、算出された画素数PCと、3個の画素数閾値PCth1〜PCth3(PCth1<PCth2<PCth3)と、を比較することによって、参照領域RA1を決定する。
In S215 to S240, the
先ず、S215では、CPU410は、画素数PCが、第1の画素数閾値PCth1未満であるか否かを判断する。画素数PCが、第1の画素数閾値PCth1未満である場合には(S215:YES)、S230において、CPU410は、基準参照領域RA0(後述)のサイズ(デフォルトのサイズ)の領域を、参照領域RA1として決定する。この場合には、ばらつき領域VAが過度に小さいので、参照領域RA1が過度に小さくならないように、ばらつき領域VAの重心位置を中心とするデフォルトのサイズの領域が、参照領域RA1として決定される。
First, in S215, the
画素数PCが、第1の画素数閾値PCth1以上である場合には(S215:NO)、S220において、CPU410は、画素数PCが、第2の画素数閾値PCth2未満であるか否かを判断する。画素数PCが、第2の画素数閾値PCth2未満である場合には(S220:YES)、S240において、CPU410は、ばらつき領域VAの外接矩形を、参照領域RA1として決定する。図11は、ばらつき領域VAに基づいて決定される参照領域RA1の一例を示す図である。図11(A)には、特定のばらつき領域VA1の外接矩形が、特定の参照領域RA11として決定される例が示されている。
When the pixel number PC is greater than or equal to the first pixel number threshold PCth1 (S215: NO), in S220, the
画素数PCが、第2の画素数閾値PCth2以上である場合には(S220:NO)、S225において、CPU410は、画素数PCが、第3の画素数閾値PCth3未満であるか否かを判断する。画素数PCが、第3の画素数閾値PCth3未満である場合には(S225:YES)、S235において、CPU410は、ばらつき領域VAの内接矩形を、参照領域RA1として決定する。図11(B)には、特定のばらつき領域VA2の内接矩形が、特定の参照領域RA12として決定される例が示されている。
When the pixel number PC is equal to or larger than the second pixel number threshold PCth2 (S220: NO), in S225, the
画素数PCが、第3の画素数閾値PCth3以上である場合には(S225:NO)、S230において、CPU410は、デフォルトのサイズの領域を、参照領域RA1として決定する。この場合は、ばらつき領域VAが過度に大きいので、参照領域RA1が過度に大きくならないように、デフォルトサイズの領域が、参照領域RA1として決定される。参照領域RA1が決定されると、参照領域決定処理は終了される。以上の説明から解るように、本実施例の参照領域決定処理では、配置範囲FA内の比較的ばらつきが大きな部分画像の領域が、参照領域RA1として決定される。図5(B)には、右側スキャン画像20Rの配置範囲FA内に決定された参照領域RA1の一例が図示されている。
When the pixel number PC is equal to or greater than the third pixel number threshold value PCth3 (S225: NO), in S230, the
次に図2のS32の探索領域決定処理について説明する。図12は、探索領域決定処理のフローチャートである。図13は、探索領域決定処理の説明図である。図13(A)には、探索領域SA1の基準となる領域である基準探索領域SA0の例が示されている。図13(B)には、参照領域RA1の基準となる領域である基準参照領域RA0の例が示されている。図13(C)には、探索領域決定処理によって決定されるべき探索領域SA1の例が示されている。図13(D)には、上述した参照領域決定処理(図7)によって決定された参照領域RA1の例が示されている。 Next, the search area determination process in S32 of FIG. 2 will be described. FIG. 12 is a flowchart of search area determination processing. FIG. 13 is an explanatory diagram of the search area determination process. FIG. 13A shows an example of a reference search area SA0 that is an area serving as a reference for the search area SA1. FIG. 13B shows an example of a reference reference area RA0 that is a reference area of the reference area RA1. FIG. 13C shows an example of the search area SA1 to be determined by the search area determination process. FIG. 13D shows an example of the reference area RA1 determined by the above-described reference area determination process (FIG. 7).
図12のS305では、CPU410は、図7の参照領域決定処理によって決定された参照領域RA1の位置情報と外形情報とを取得する。上述したように参照領域RA1は、右側スキャン画像20R内に決定される領域である。参照領域RA1の位置情報は、具体的には、参照領域RA1の左上の画素の位置を示す左上座標(Rx1、Ry1)である(図13(D))。参照領域RA1の外形情報は、具体的には、参照領域RA1の幅Rw1と高さRh1である(図13(D))。幅は、横方向の長さを意味し、高さは、縦方向の長さを意味する。
In S305 of FIG. 12, the
図13(D)に示すように、参照領域RA1の左上座標(Rx1、Ry1)は、右方向を正方向とするX軸と下方向を正方向とするY軸とを有し、右側スキャン画像20Rの左上の画素の座標を(0、0)とする2次元座標系を用いて表される。また、参照領域RA1の幅Rw1と高さRh1は、画素数で表される。 As shown in FIG. 13D, the upper left coordinates (Rx1, Ry1) of the reference area RA1 have an X axis with the right direction as the positive direction and a Y axis with the lower direction as the positive direction. It is expressed using a two-dimensional coordinate system in which the coordinates of the upper left pixel of 20R are (0, 0). Further, the width Rw1 and the height Rh1 of the reference region RA1 are represented by the number of pixels.
S310では、CPU410は、基準参照領域RA0の位置情報と外形情報、具体的には、基準参照領域RA0の左上の画素の位置を示す左上座標(Rx0、Ry0)と、幅Rw0と、高さRh0と、を取得する(図13(B))。基準参照領域RA0の左上座標(Rx0、Ry0)は、参照領域RA1の左上座標(Rx1、Ry1)と同じ座標系を用いて表される。基準参照領域RA0の幅Rw0と高さRh0は、画素数で表される。
In S310, the
基準参照領域RA0は、右側スキャン画像20R上に予め規定された領域であり、これらの位置情報と外形情報は、予め定められた値が取得される。本実施例では、基準参照領域RA0は、右側スキャン画像20Rの左端と上端とに接する矩形の領域である。したがって、基準参照領域RA0の左上座標は、右側スキャン画像20Rの左上座標と一致している。すなわち、左上座標(Rx0、Ry0)=(0、0)である。
The reference reference area RA0 is an area defined in advance on the right-
また、基準参照領域RA0の幅Rw0は、例えば、5画素〜20画素である。基準参照領域RA0の高さRh0は、右側スキャン画像20Rの高さの1/4〜1/2である。
Further, the width Rw0 of the standard reference region RA0 is, for example, 5 to 20 pixels. The height Rh0 of the reference reference area RA0 is 1/4 to 1/2 of the height of the right-
S315では、CPU410は、基準探索領域SA0の位置情報と外形情報、具体的には、基準探索領域SA0の右上の画素の位置を示す右上座標(Sx0、Sy0)と、幅Sw0と、高さSh0と、を取得する(図13(A))。基準探索領域SA0の右上座標(Sx0、Sy0)は、右方向を正方向とするX軸と下方向を正方向とするY軸とを有し、左側スキャン画像20Lの左上の画素の座標を(0、0)とする2次元座標系を用いて表される。
In S315, the
基準探索領域SA0は、左側スキャン画像20L上に予め規定された領域であり、これらの位置情報と外形情報は、予め定められた値が取得される。本実施例では、基準探索領域SA0は、左側スキャン画像20Lの右端と上端とに接する矩形の領域である。したがって、基準探索領域SA0の右上座標は、右側スキャン画像20Rの右上座標と一致している。
The reference search area SA0 is an area defined in advance on the left-
また、基準探索領域SA0の幅Sw0は、例えば、左側スキャン画像20Lの幅の1/4〜1/2である。基準探索領域SA0の高さは、上述した基準参照領域RA0の高さと同じである。すなわち、基準探索領域SA0の高さは、左側スキャン画像20Lの高さの1/4〜1/2である。
Further, the width Sw0 of the reference search area SA0 is, for example, ¼ to ½ of the width of the
S320〜S360の処理によって、決定すべき探索領域SA1が決定される。具体的には、図13(C)に示すように、探索領域SA1は、左側スキャン画像20L上に配置される矩形の領域である。探索領域SA1は、探索領域SA1の右上の画素の位置を示す右上座標(Sx1、Sy1)と、探索領域SA1の幅Sw1と、探索領域SA1の高さSh1と、によって定義される。したがって、S320〜S360の処理によって、右上座標(Sx1、Sy1)と、幅Sw1と、高さSh1と、が決定されることによって、探索領域SA1が決定される。
The search area SA1 to be determined is determined by the processes of S320 to S360. Specifically, as shown in FIG. 13C, the search area SA1 is a rectangular area arranged on the
S320では、CPU410は、探索領域SA1の右上座標(Sx1、Sy1)のY座標Sy1を決定する。具体的には、右上座標(Sx1、Sy1)のY座標Sy1は、参照領域RA1の左上座標(Rx1、Ry1)のY座標Ry1と同じ値に決定される(Sy1=Ry1)。
In S320, the
S325では、CPU410は、探索領域SA1の右上座標(Sx1、Sy1)のX座標Sx1を決定する。具体的には、右上座標(Sx1、Sy1)のX座標Sx1は、基準探索領域SA0の右上座標(Sx0、Sy0)のX座標Sx0に、(Rx1−Rx0)を加算した値に決定される(Sx1=Sx0+(Rx1−Rx0))。(Rx1−Rx0)は、基準参照領域RA0から見て参照領域RA1が右方向にずれている量(以下、参照領域RA1の横ずれ量と呼ぶ。)を表している。したがって、探索領域SA1の右上座標(Sx1、Sy1)のX座標Sx1は、基準探索領域SA0の右上座標(Sx0、Sy0)のX座標Sx0を、参照領域RA1の横ずれ量(Rx1−Rx0)分だけ、同じ方向にずらした位置に決定される。
In S325, the
S335では、CPU410は、探索領域SA1の高さSh1を決定する。具体的には、探索領域SA1の高さSh1は、参照領域RA1の高さRh1と同じ値に決定される(Sh1=Rh1)。
In S335, the
S340では、CPU410は、探索領域SA1の幅Sw1を決定する。具体的には、探索領域SA1の幅Sw1は、基準参照領域RA0の幅Rw0に対する参照領域RA1の幅Rw1の比率(Rw1/Rw0)を、基準探索領域SA0の幅Sw0に乗じた値に決定される(Sw1=(Rw1/Rw0)×Sw0)。
In S340, the
S345では、CPU410は、S340で決定された探索領域SA1の幅Sw1が、所定の条件を満たすか否かを判断する。所定の条件は、Sw1<(Sw0+Sx1−Sx0)、かつ、(Sx1−Sx0)>0である。この条件は、基準探索領域SA0の左端のX座標(Sx0−Sw0)より、探索領域SA1の左端のX座標(Sx1−Sw1)が右側にある場合に、すなわち、((Sx0−Sw0)<(Sx1−Sw1))である場合に、満たされる。換言すれば、この条件が満たされない場合は、探索領域SA1の左端が、基準探索領域SA0の左端より左側に位置しており、探索領域SA1が過度に左側に拡がっていることを意味している。
In S345, the
上記の所定の条件が満たされない場合には(S345:NO)、S350において、CPU410は、探索領域SA1の幅Sw1を修正する。具体的には、基準探索領域SA0の左端のX座標(Sx0−Sw0)と、探索領域SA1の左端のX座標(Sx1−Sw1)とが同じになるように、すなわち、(Sx0−Sw0)=(Sx1−Sw1)となるように、幅Sw1の値を修正する(Sw1=Sw0+Sx1−Sx0)。
When the predetermined condition is not satisfied (S345: NO), in S350, the
上記の所定の条件が満たされる場合には(S345:YES)、CPU410は、S350をスキップして、処理をS355に進める。
If the predetermined condition is satisfied (S345: YES), the
S355では、CPU410は、探索領域SA1の右上座標(Sx1、Sy1)のX座標Sx1が、左側スキャン画像20L内に位置しているか否かを判断する。具体的には、探索領域SA1の右上座標(Sx1、Sy1)のX座標Sx1が、左側スキャン画像20Lの右上座標のX座標より大きいか否かを判断する。なお、本実施例では、左側スキャン画像20Lの右上座標は、基準探索領域SA0の右上座標(Sx0、Sy0)と一致している。CPU410は、Sx1が、左側スキャン画像20Lの右端のX座標(本実施例ではSx0)より大きい場合には、Sx1が、左側スキャン画像20L内に位置していないと判断する。
In S355, the
探索領域SA1の右上座標(Sx1、Sy1)のX座標Sx1が、左側スキャン画像20L内に位置していない場合には(S355:NO)、S360において、CPU410は、Sx1の値を左側スキャン画像20Lの右端のX座標(本実施例では、基準探索領域SA0の右上座標(Sx0、Sy0)のX座標Sx0)に修正して、探索領域決定処理を終了する。図13(C)には、修正後の右上座標(Sx1a、Sy1)が図示されている(Sx1a=Sx0)。
When the X coordinate Sx1 of the upper right coordinate (Sx1, Sy1) of the search area SA1 is not located in the
探索領域SA1の右上座標(Sx1、Sy1)のX座標Sx1が、左側スキャン画像20L内に位置している場合には(S355:YES)、CPU410は、S360をスキップして、探索領域決定処理を終了する。図13(C)の例では、ハッチングされた領域が最終的に探索領域SA1として決定される。
When the X coordinate Sx1 of the upper right coordinate (Sx1, Sy1) of the search area SA1 is located in the
次に、図2のS35の対応領域決定処理について説明する。図14は、対応領域決定処理のフローチャートである。S410では、CPU410は、探索領域SA1内に特定されるべき複数個の候補領域の中から、1個の注目候補領域を特定する。
Next, the corresponding area determination process in S35 of FIG. 2 will be described. FIG. 14 is a flowchart of the corresponding area determination process. In S410, the
図15は、探索領域SA1内に特定されるべき複数個の候補領域について説明する図である。候補領域の形状およびサイズは、図7の参照領域決定処理によって右側スキャン画像20R内に決定された参照領域RA1(図5(B))に応じて決定される。まず、参照領域RA1と同じ形状およびサイズを有する枠NPが、探索領域SA1の少なくとも一部とが重なるように、探索領域SA1に対して配置される。そして、枠NP内の領域のうち、探索領域SA1と重なる領域が注目候補領域として特定される。
FIG. 15 is a diagram for explaining a plurality of candidate areas to be specified in the search area SA1. The shape and size of the candidate area are determined according to the reference area RA1 (FIG. 5B) determined in the right-
図15(A)の枠NPaは、最も右側かつ上側に配置される枠である。この枠NPaの左上の画素Paの座標を(k、1)とする。なお、画素Paの座標を(k、1)は、参照領域決定処理の説明の便宜のために用いる座標であり、上述した探索領域決定処理において探索領域SA1を定義するために用いられた座標系の座標とは無関係である。後述する画素Pb〜Pdの座標についても同様である。画素Paの横方向(X軸方向)の位置は、探索領域SA1の右端の画素の横方向の位置と同じである。画素Paの縦方向(Y軸方向)の位置は、探索領域SA1の上端の画素より所定長(具体的には、50〜100画素分の長さ)だけ上方に位置している。したがって、図15(A)においてハッチングで示すように、枠NPa内の領域のうち、左端の1本の画素のライン上に位置する複数個の画素の下側の一部分の領域が、探索領域SA1と重なっている。 A frame NPa in FIG. 15A is a frame arranged on the rightmost side and on the upper side. The coordinates of the upper left pixel Pa of the frame NPa are (k, 1). Note that the coordinates (k, 1) of the pixel Pa are coordinates used for convenience of the description of the reference area determination process, and the coordinate system used to define the search area SA1 in the search area determination process described above. It has nothing to do with the coordinates. The same applies to the coordinates of pixels Pb to Pd described later. The position in the horizontal direction (X-axis direction) of the pixel Pa is the same as the horizontal position of the rightmost pixel in the search area SA1. The position of the pixel Pa in the vertical direction (Y-axis direction) is positioned above the uppermost pixel of the search area SA1 by a predetermined length (specifically, a length corresponding to 50 to 100 pixels). Accordingly, as indicated by hatching in FIG. 15A, a partial area below a plurality of pixels located on the line of one pixel at the left end of the area within the frame NPa is a search area SA1. It overlaps with.
図15(B)の枠NPbは、最も右側かつ下側に配置される枠である。この枠NPbの左上の画素Pbの座標を(k、m)とする。画素Pbの横方向の位置は、探索領域SA1の右端の画素の横方向の位置と同じである。画素Pbの縦方向の位置は、探索領域SA1の下端の画素より所定長だけ下方に位置している。したがって、図15(B)においてハッチングで示すように、枠NPb内の領域のうち、左端の1本の画素のライン上に位置する複数個の画素の上側の一部分の領域が、探索領域SA1と重なっている。 A frame NPb in FIG. 15B is a frame arranged on the rightmost side and the lower side. The coordinates of the upper left pixel Pb of the frame NPb are (k, m). The horizontal position of the pixel Pb is the same as the horizontal position of the rightmost pixel in the search area SA1. The vertical position of the pixel Pb is located below the lower end pixel of the search area SA1 by a predetermined length. Therefore, as shown by hatching in FIG. 15B, among the regions in the frame NPb, the upper partial region of the plurality of pixels located on the leftmost pixel line is the search region SA1. overlapping.
図15(C)の枠NPcは、最も左側かつ上側に配置される枠である。この枠NPcの左上の画素Pcの座標を(1、1)とする。画素Pcの横方向の位置は、探索領域SA1の左端の画素の横方向の位置と同じである。画素Pcの縦方向の位置は、探索領域SA1の上端の画素より所定長だけ上方に位置している。したがって、図15(C)においてハッチングで示すように、枠NPc内の領域のうち、下側の一部分の領域が探索領域SA1と重なっている。 A frame NPc in FIG. 15C is a frame arranged on the leftmost side and the upper side. The coordinates of the upper left pixel Pc of the frame NPc are (1, 1). The horizontal position of the pixel Pc is the same as the horizontal position of the leftmost pixel in the search area SA1. The vertical position of the pixel Pc is located above the upper end pixel of the search area SA1 by a predetermined length. Therefore, as indicated by hatching in FIG. 15C, a partial region on the lower side of the region in the frame NPc overlaps the search region SA1.
図15(D)の枠NPdは、最も左側かつ下側に配置される枠である。この枠NPdの左上の画素Pdの座標を(1、m)とする。画素Pdの横方向の位置は、探索領域SA1の左端の画素の横方向の位置と同じである。画素Pcの縦方向の位置は、探索領域SA1の下端の画素より所定長だけ下方に位置している。したがって、図15(D)においてハッチングで示すように、枠NPc内の領域のうち、上側の一部分の領域が探索領域SA1と重なっている。 A frame NPd in FIG. 15D is a frame arranged on the leftmost side and the lower side. The coordinates of the upper left pixel Pd of the frame NPd are (1, m). The horizontal position of the pixel Pd is the same as the horizontal position of the leftmost pixel in the search area SA1. The vertical position of the pixel Pc is located below the lower end pixel of the search area SA1 by a predetermined length. Therefore, as indicated by hatching in FIG. 15D, an upper partial region of the region in the frame NPc overlaps the search region SA1.
複数個の候補領域を特定するために配置される枠NPの左上の画素の座標は、(p、q)で表される(k×m)個の座標の中から、順次に選択される。ここで、pは、1以上k以下の任意の整数であり、qは、1以上m以下の任意の整数である。したがって、探索領域SA1には、(k×m)個の枠NPが配置可能である。換言すれば、探索領域SA1内には、(k×m)個の候補領域が特定可能である。 The coordinates of the upper left pixel of the frame NP arranged to specify a plurality of candidate areas are sequentially selected from (k × m) coordinates represented by (p, q). Here, p is an arbitrary integer from 1 to k, and q is an arbitrary integer from 1 to m. Accordingly, (k × m) frames NP can be arranged in the search area SA1. In other words, (k × m) candidate areas can be specified in the search area SA1.
図15(A)〜図15(C)に矢印で示すように、これらの(k×m)個の枠NPの中から、右上の端の枠NPa(図15(A))が配置されるべき枠NPとして最初に選択される。そして、次回の注目候補領域が特定されるときに、1画素ずつ下方向に位置がずれた枠NPが、順次に選択される。そして、右下の端の枠NPb(図15(B))が選択されると、右上の端の枠NPaの位置から1画素だけ左方向にずれた枠NPが選択される。その後は、再び1画素ずつ下方向に位置がずれた枠NPが、順次に選択される。最後に選択される枠NPは、左下の端の枠NPd(図15(D))である。 As indicated by arrows in FIGS. 15A to 15C, the upper right end frame NPa (FIG. 15A) is arranged from among these (k × m) frames NP. It is first selected as the power frame NP. Then, when the next candidate region of interest is specified, the frames NP whose positions are shifted downward by one pixel are sequentially selected. When the lower right end frame NPb (FIG. 15B) is selected, a frame NP that is shifted leftward by one pixel from the position of the upper right end frame NPa is selected. Thereafter, the frames NP whose positions are shifted downward one pixel at a time are sequentially selected. The frame NP selected last is the frame NPd at the lower left end (FIG. 15D).
図15(A)〜図15(D)の枠NPa〜NPdのように、ほとんどの場合に枠NPの一部が探索領域SA1より外側に位置するので、注目候補領域の大きさは、図5(B)の参照領域RA1より小さくなる。 As in the frames NPa to NPd in FIGS. 15A to 15D, in most cases, a part of the frame NP is located outside the search area SA1, and therefore the size of the attention candidate area is as shown in FIG. It becomes smaller than the reference area RA1 in (B).
1個の注目候補領域が特定されると、S415では、CPU410は、注目候補領域内の全ての画素のうち、1個の画素を注目画素として選択する。
When one attention candidate area is specified, in S415, the
S420では、CPU410は、注目候補領域内の注目画素の値と、当該注目画素に対応する参照領域RA1内の画素の値と、の差ΔVPを算出する。注目画素に対応する参照領域RA1内の画素は、注目候補領域内の画像と参照領域RA1内の画像とを、注目候補領域を特定する際に用いた枠NPと、参照領域RA1の外縁とが一致するように重ねた場合に、注目画素と重なる参照領域RA1内の画素である。差ΔVPを算出すべき2個の画素の値を、(R1、G1、B1)と(R2、G2、B2)とする。差ΔVPは、3種類の成分値間の差分の絶対値の和で表される。すなわち、差ΔVPは、(R1−R2)の絶対値と、(G1−G2)の絶対値と、(B1−B2)の絶対値と、の合計値で表される。
In S420, the
続くS425では、CPU410は、算出された差ΔVPが、所定の基準値TH1以下であるか否かを判断する。差ΔVPが、所定の基準値TH1以下である場合には(S425:YES)、S430において、CPU410は、類似画素数SCをカウントアップする。差ΔVPが、所定の基準値TH1以下である場合には、注目候補領域内の注目画素と、当該注目画素に対応する参照領域RA1内の画素とは、類似する画素であると判断できるからである。
In subsequent S425,
差ΔVPが、所定の基準値TH1より大きい場合には(S425:NO)、CPU410は、S430をスキップして、処理をS435に進める。基準値TH1は、例えば、10〜40とされる。
When the difference ΔVP is larger than the predetermined reference value TH1 (S425: NO), the
S435では、CPU410は、注目候補領域内の全ての画素を注目画素として処理したか否かを判断する。未処理の画素がある場合には(S435:NO)、CPU410は、S415に戻って、未処理の画素を注目画素として選択する。全ての画素が処理された場合には(S435:YES)、CPU410は、S440に処理を進める。
In S435, the
S440では、CPU410は、参照領域RA1と、注目候補領域と、の類似度(SC/Nt)を算出する。類似度(SC/Nt)は、注目候補領域内の画素の総数Ntに対する類似画素数SCの割合である。類似度(SC/Nt)が大きいほど、参照領域RA1と、注目候補領域とは、類似している。
In S440, the
S445では、CPU410は、類似度(SC/Nt)が、閾値TH2以上であるか否かを判断する。即ち、CPU410は、現在の注目候補領域が参照領域RA1に類似しているか否かを判断する。
In S445,
類似度(SC/Nt)が、閾値TH2以上である場合、即ち、現在の注目候補領域が参照領域RA1に類似していると判断する場合には(S445:YES)、S450において、CPU410は、現在の注目候補領域を、参照領域RA1に類似する対応領域CPとして決定して、対応領域決定処理を終了する。
When the similarity (SC / Nt) is equal to or higher than the threshold value TH2, that is, when it is determined that the current candidate region of interest is similar to the reference region RA1 (S445: YES), in S450, the
類似度(SC/Nt)が、閾値TH2未満である場合には(S445:NO)、S455において、CPU410は、探索領域SA1内の全ての候補領域(図15)を注目候補領域として処理したか否かを判断する。未処理の候補領域がある場合には(S455:NO)、CPU410は、S460において、類似画素数SCを初期化したうえで、S410に戻って、未処理の候補領域を注目候補領域として選択する。全ての候補領域が処理された場合には(S455:YES)、CPU410は、参照領域RA1に対応する対応領域CPを決定できないまま、対応領域決定処理を終了する。
If the similarity (SC / Nt) is less than the threshold value TH2 (S445: NO), in S455, has the
図5(A)には、左側スキャン画像20L内に、決定された対応領域CPが図示されている。
FIG. 5A shows the determined corresponding region CP in the
以上説明した実施例によれば、探索領域決定処理において、参照領域RA1の位置を示す位置情報(具体的には、図13(D)の左上座標(Rx1、Ry1))と、参照領域RA1の外形に関する外形情報(具体的には、図13(D)の幅Rw1、高さRh1)と、を用いて、探索領域SA1が決定される(図12のS320〜S340)。そして、対応領域決定処理(図14、図15)では、決定された探索領域SA1内から対応領域CPが決定される。この結果、効率良く対応領域CPを決定することができる。したがって、合成画像データを生成するための処理時間を低減することができる。 According to the embodiment described above, in the search area determination process, the position information indicating the position of the reference area RA1 (specifically, the upper left coordinates (Rx1, Ry1) in FIG. 13D) and the reference area RA1 The search area SA1 is determined using the external shape information (specifically, the width Rw1 and the height Rh1 in FIG. 13D) (S320 to S340 in FIG. 12). In the corresponding area determining process (FIGS. 14 and 15), the corresponding area CP is determined from the determined search area SA1. As a result, the corresponding region CP can be determined efficiently. Therefore, it is possible to reduce the processing time for generating the composite image data.
より詳しく説明すると、例えば、複合機200のスキャナ部250の仕様などによって、左側スキャン画像20L内の左側原稿画像HILに対して、右側スキャン画像20R内の右側原稿画像HIRの位置が縦方向にずれる量は、所定の想定範囲内に収まる。したがって、参照領域RA1の高さRh1に対して、探索領域SA1の高さSh1が過度に大きいと、探索領域SA1のうち、対応領域CPが存在しない領域が過度に大きくなる。そうすると、対応領域CPとはなり得ない候補領域を注目候補領域として、対応領域CPを探索する処理(図14の対応領域決定処理のS415〜S445)が実行される頻度が高くなる。そうすると、合成画像データを生成するための処理時間が必要以上に長くなる可能性がある。また、左側スキャン画像20Lと右側スキャン画像20Rにおいて、共通に含まれる原稿10の中央部CAの横方向の幅は、所定の想定範囲内に収まるので、参照領域RA1の幅Rw1に対して、探索領域SA1の幅Sw1が過度に大きくても、同様に、処理時間が必要以上に長くなる可能性がある。また、参照領域RA1の位置に対して、探索領域SA1の位置が適切な位置にない場合には、探索領域SA1内に、探索すべき対応領域CPが確実に含まれるようにするために、探索領域SA1のサイズ(幅および高さ)を大きくせざるを得なくなるので、処理時間が必要以上に長くなる可能性がある。上記実施例によれば、参照領域RA1の位置情報と外形情報とを用いて、適切な位置に配置され、適切なサイズを有する探索領域SA1が決定されるので、このような不都合を避けて、合成画像データを生成するための処理時間を低減することができる。
More specifically, the position of the right original image HIR in the
また、参照領域RA1の位置に対して、探索領域SA1の位置が適切な位置にない場合には、探索領域SA1内に探索すべき対応領域CPが含まれない可能性が高くなる。この結果、参照領域RA1に対応する対応領域CPを探索することができずに、2個の画像が精度良く結合された合成画像を表す合成画像データを生成することができない可能性がある。本実施例によれば、参照領域RA1の位置情報と外形情報とを用いて、適切な位置に配置され、適切なサイズを有する探索領域SA1が決定されるので、探索すべき対応領域CPが含まれるように、適切な探索領域SA1を決定することができる。この結果、2個の画像が精度良く結合された合成画像を表す合成画像データを生成することができる。 Further, when the position of the search area SA1 is not an appropriate position with respect to the position of the reference area RA1, there is a high possibility that the corresponding area CP to be searched is not included in the search area SA1. As a result, the corresponding area CP corresponding to the reference area RA1 cannot be searched, and there is a possibility that composite image data representing a composite image in which two images are combined with high accuracy cannot be generated. According to the present embodiment, the search area SA1 that is arranged at an appropriate position and has an appropriate size is determined using the position information and the outer shape information of the reference area RA1, and therefore the corresponding area CP to be searched is included. Thus, an appropriate search area SA1 can be determined. As a result, it is possible to generate composite image data representing a composite image in which two images are combined with high accuracy.
さらに、上記実施例の探索領域決定処理では、参照領域RA1の基準の位置である第1の基準位置を示す情報として、基準参照領域RA0の左上座標(Rx0、Ry0)が取得される(S310)。また、探索領域SA1の基準の位置である第2の基準位置を示す情報として基準探索領域SA0の右上座標(Sx0、Sy0)が取得される(S315)。そして、参照領域RA1の位置と第1の基準位置との関係と、第2の基準位置と、に基づいて、探索領域SA1の位置が決定される。この結果、参照領域RA1の位置と、基準参照領域RA0および基準探索領域SA0の位置とに応じて、適切な探索領域を決定することができる。 Further, in the search area determination process of the above embodiment, the upper left coordinates (Rx0, Ry0) of the standard reference area RA0 are acquired as information indicating the first standard position, which is the standard position of the reference area RA1 (S310). . Also, the upper right coordinates (Sx0, Sy0) of the reference search area SA0 are acquired as information indicating the second reference position, which is the reference position of the search area SA1 (S315). Then, the position of the search area SA1 is determined based on the relationship between the position of the reference area RA1 and the first reference position and the second reference position. As a result, an appropriate search area can be determined according to the position of the reference area RA1 and the positions of the standard reference area RA0 and the standard search area SA0.
具体的には、探索領域SA1の位置を規定する座標(Sx1、Sy1)は、図13(A)〜(D)に示すように、参照領域RA1の位置が第1の基準位置(すなわち、基準参照領域RA0の位置)に対して右方向にずれている場合には、探索領域SA1の位置が第2の基準位置(すなわち、基準探索領域SA0の位置)に対して右方向にずれ、かつ、参照領域RA1の位置が第1の基準位置に対して上方向にずれている場合には、探索領域SA1の位置が第2の基準位置に対して上方向にずれるように、探索領域SA1の位置が決定される。これは、参照領域RA1が右側スキャン画像20Rの左端から比較的離れた位置、すなわち、基準参照領域RA0の位置から右側にずれた位置に決定された場合には、対応領域CPは、左側スキャン画像20L内においてより右端に近い位置に存在する可能性が高いからである。参照領域RA1が右側スキャン画像20R内の比較的上側に決定された場合には、対応領域CPは、左側スキャン画像20L内の比較的上側に存在する可能性が高いからである。この結果、参照領域RA1の位置と基準参照領域RA0の位置との間の縦方向および横方向の関係に応じて、適切な探索領域SA1を決定することができる。
Specifically, the coordinates (Sx1, Sy1) defining the position of the search area SA1 are set such that the position of the reference area RA1 is the first reference position (ie, the reference position) as shown in FIGS. The position of the search area SA1 is shifted to the right with respect to the second reference position (that is, the position of the reference search area SA0), and When the position of the reference area RA1 is shifted upward with respect to the first reference position, the position of the search area SA1 is set so that the position of the search area SA1 is shifted upward with respect to the second reference position. Is determined. This is because when the reference area RA1 is determined at a position relatively distant from the left end of the
さらに、上記実施例の探索領域決定処理では、基準参照領域RA0の外形を示す情報(具体的には、幅Rw0と高さRh0)と、基準探索領域SA0の外形を示す情報(具体的には、幅Sw0と高さSh0)とが、取得される(S310、S315)。そして、参照領域RA1の外形と基準参照領域RA0の外形との関係と、基準探索領域SA0の外形と、に基づいて、探索領域SA1の外形が決定される。具体的には、図13(A)〜(D)に示すように、参照領域RA1の幅Rw1が基準参照領域RA0の幅Rw0より長いほど、探索領域SA1の幅Sw1は、基準探索領域SA0の幅Sw0より長くされる。そして、参照領域RA1の高さRh1が基準参照領域RA0の高さRh0より大きいほど、探索領域SA1の高さSh1は、基準探索領域SA0の高さSh0より大きくされる。この結果、参照領域RA1の外形と、基準参照領域RA0の外形と、基準探索領域SA0の外形とに応じて、適切な探索領域SA1の外形を決定することができる。 Furthermore, in the search area determination process of the above embodiment, information (specifically, width Rw0 and height Rh0) indicating the outer shape of the reference reference area RA0 and information (specifically, information indicating the outer shape of the reference search area SA0). , Width Sw0 and height Sh0) are acquired (S310, S315). Then, the outline of the search area SA1 is determined based on the relationship between the outline of the reference area RA1 and the outline of the standard reference area RA0 and the outline of the standard search area SA0. Specifically, as shown in FIGS. 13A to 13D, as the width Rw1 of the reference region RA1 is longer than the width Rw0 of the reference reference region RA0, the width Sw1 of the search region SA1 is larger than that of the reference search region SA0. The width is longer than Sw0. Then, as the height Rh1 of the reference area RA1 is larger than the height Rh0 of the standard reference area RA0, the height Sh1 of the search area SA1 is made larger than the height Sh0 of the standard search area SA0. As a result, an appropriate outer shape of the search region SA1 can be determined according to the outer shape of the reference region RA1, the outer shape of the standard reference region RA0, and the outer shape of the standard search region SA0.
より具体的には、探索領域SA1の幅Sw1は、参照領域RA1の幅Rw1と基準参照領域RA0の幅Rw0との比率(Rw1/Rw0)を用いて、決定される(S340)。この結果、参照領域RA1と基準参照領域RA0との間の幅の関係に応じて、適切な探索領域SA1の幅を決定することができる。また、探索領域SA1の高さSh1は、参照領域RA1の高さRh1に決定される(S335)。この結果、探索領域SA1の高さSh1を参照領域RA1の高さRh1に応じて適切に決定することができる。換言すれば、探索領域SA1の高さSh1や幅Sh1が、参照領域RA1に対して過度に大きくなることや、過度に小さくなることを抑制して、合成画像データを生成するための処理時間の低減や、合成画像における2個の画像の結合精度の向上を実現することができる。 More specifically, the width Sw1 of the search area SA1 is determined using a ratio (Rw1 / Rw0) between the width Rw1 of the reference area RA1 and the width Rw0 of the reference reference area RA0 (S340). As a result, an appropriate width of the search area SA1 can be determined in accordance with the width relationship between the reference area RA1 and the reference reference area RA0. Further, the height Sh1 of the search area SA1 is determined as the height Rh1 of the reference area RA1 (S335). As a result, the height Sh1 of the search area SA1 can be appropriately determined according to the height Rh1 of the reference area RA1. In other words, the processing time for generating the composite image data while suppressing the height Sh1 and the width Sh1 of the search area SA1 from becoming excessively large or excessively small with respect to the reference area RA1. Reduction and improvement in the accuracy of combining two images in a composite image can be realized.
さらに、探索領域SA1の左端が、基準探索領域SA0の左端より左側に位置しないように、探索領域SA1の幅Sw1が修正される(図3のS345、S350)。換言すれば、探索領域SA1の幅Sw1は、基準探索領域SA0の幅Sw0より小さな値に決定される。この結果、探索領域SA1の幅Sw1が過度に長くなることを抑制して、合成画像データを生成するための処理時間が過度に長くなることを抑制することができる。 Further, the width Sw1 of the search area SA1 is corrected so that the left end of the search area SA1 is not positioned to the left of the left end of the reference search area SA0 (S345 and S350 in FIG. 3). In other words, the width Sw1 of the search area SA1 is determined to be smaller than the width Sw0 of the reference search area SA0. As a result, the width Sw1 of the search area SA1 can be suppressed from becoming excessively long, and the processing time for generating the composite image data can be suppressed from becoming excessively long.
さらに、参照領域RA1の外形と基準参照領域RA0の外形との関係と、基準探索領域SA0の外形と、に基づいて決定された探索領域SA1が、左側スキャン画像20Lより外側の領域を含む場合には、修正後の探索領域SA1が左側スキャン画像20Lに含まれるように、探索領域SA1が修正される(図3のS355、S360)。この結果、左側スキャン画像20Lに含まれる適切な探索領域SA1を決定することができる。
Further, when the search area SA1 determined based on the relationship between the outer shape of the reference area RA1 and the outer shape of the standard reference area RA0 and the outer shape of the standard search area SA0 includes an area outside the
また、図13(B)に示すように、基準参照領域RA0は、右側スキャン画像20Rの左方向(X軸方向の反対方向)の端に沿って配置されている。そして、図13(A)に示すように、基準探索領域SA0は、左側スキャン画像20Lの右方向の端に沿って配置されている。ここで、X軸方向は、本実施例において、生成されるべき合成画像において左側スキャン画像20Lと右側スキャン画像20Rとが並ぶ方向と言うことができる。上記構成によれば、適切な基準領域を用いて、合成画像データを生成するための対応領域を決定するために適切な探索領域SA1を決定することができる。
Further, as shown in FIG. 13B, the reference reference area RA0 is arranged along the left end (the opposite direction to the X-axis direction) of the right-
さらに、参照領域決定処理(図7〜図9)では、右側スキャン画像20R内の複数個の画素の値のばらつきに基づいて参照領域RA1が決定される。例えば、参照領域RA1の位置、大きさ、サイズは、それぞれ、右側スキャン画像20Rの配置範囲FA内の複数個の画素の値に基づいて決定されている。具体的には、画素の値のばらつきが比較的大きい単位領域を含むように、参照領域RA1が決定される(図8など)。そして、対応領域決定処理(図14)では、ばらつきに基づいて決定された参照領域に応じて、複数個の候補領域が特定される。この結果、参照領域RA1に対応する適切な対応領域CPが容易に決定される。
Further, in the reference area determination process (FIGS. 7 to 9), the reference area RA1 is determined based on the variation in the values of the plurality of pixels in the right-
より具体的に説明すると、画素の値のばらつきが比較的小さい領域は、特徴が乏しい。このために、画素の値のばらつきが比較的小さい領域が参照領域RA1に決定されると、左側スキャン画像20L内の対応領域CPを決定することが困難になる可能性がある。例えば、左側スキャン画像20L内の誤った領域が、対応領域CPに決定されやすい。画素のばらつきが比較的小さい領域には、例えば、背景を示す領域や、オブジェクトの内部の色の変化が乏しい領域などが含まれる。
More specifically, an area where the variation in pixel values is relatively small has poor characteristics. For this reason, when the region where the variation in pixel values is relatively small is determined as the reference region RA1, it may be difficult to determine the corresponding region CP in the left-
これに対して、画素の値のばらつきが比較的大きな領域は、エッジなどを比較的多く含むので、特徴的な部分を含む可能性が高い。このために、画素の値のばらつきが比較的大きな領域が参照領域RA1に決定されると、左側スキャン画像20L内の対応領域CPを容易に決定できる。換言すれば、ばらつきが比較的小さい領域を基準にするよりも、ばらつきが比較的大きい領域を基準にするほうが、対応領域CPに対応する対応領域CPを精度良く決定できる。あるいは、ばらつきが比較的小さい領域を基準にするよりも、ばらつきが比較的大きい領域を基準にするほうが、対応領域CPのサイズが小さくても適切な対応領域CPを決定できるので、処理時間が短くなる。
On the other hand, a region having a relatively large variation in pixel values includes a relatively large number of edges and the like, and thus is likely to include a characteristic portion. For this reason, when a region having a relatively large variation in pixel values is determined as the reference region RA1, the corresponding region CP in the left-
B.変形例
(1)上記実施例では、参照領域RA1の位置情報として、左上座標(Rx1、Ry1)が用いられ、参照領域RA1の外形情報として、幅Rw1と高さRh1が用いられている。これに代えて、参照領域RA1の位置情報と外形情報とを兼ねる情報として、参照領域RA1の対角を形成する2つの頂点に位置する2つの画素の座標が用いられても良い。具体的には、左上の画素を表す左上座標と、右下の画素を表す右下座標と、の組み合わせが用いられても良い。また、参照領域RA1の位置情報と外形情報とを兼ねる情報として、参照領域RA1の4つの頂点に位置する4つの画素の座標が用いられても良い。上述したいずれの位置情報であっても、参照領域RA1の右側スキャン画像20R上の位置を特定することができる。また、上述したいずれの外形情報であっても、参照領域RA1のサイズを示す幅と高さとを特定することができる。
B. Modification (1) In the above embodiment, the upper left coordinates (Rx1, Ry1) are used as the position information of the reference area RA1, and the width Rw1 and the height Rh1 are used as the outer shape information of the reference area RA1. Instead, the coordinates of two pixels located at the two vertices forming the diagonal of the reference area RA1 may be used as information that serves as both position information and outer shape information of the reference area RA1. Specifically, a combination of an upper left coordinate representing the upper left pixel and a lower right coordinate representing the lower right pixel may be used. Further, the coordinates of the four pixels located at the four vertices of the reference area RA1 may be used as information that serves as both position information and outer shape information of the reference area RA1. Any position information described above can identify the position of the reference area RA1 on the right-
なお、基準参照領域RA0の位置情報および外形情報、基準探索領域SA0の位置情報および外形情報も、参照領域RA1の位置情報および外形情報と同様に、矩形の対角を形成する2つの頂点に位置する2つの画素の座標や、矩形の4つの頂点に位置する4つの画素の座標が用いられても良い。 Note that the position information and outline information of the reference reference area RA0 and the position information and outline information of the reference search area SA0 are also located at the two vertices forming the diagonal of the rectangle, similar to the position information and outline information of the reference area RA1. Alternatively, the coordinates of two pixels or four pixels located at four vertices of a rectangle may be used.
(2)上記実施例では、探索領域SA1を決定するために、参照領域RA1の位置情報と外形情報に加えて、基準参照領域RA0や基準探索領域SA0の位置情報や外形情報が用いられている。これに代えて、CPU410は、基準参照領域RA0や基準探索領域SA0の位置情報や外形情報を用いることなく、参照領域RA1の位置情報と外形情報のみを用いて、参照領域RA1を決定しても良い。例えば、CPU410は、探索領域SA1の高さを、参照領域RA1の高さと同じ高さに決定する。そして、CPU410は、探索領域SA1の幅を、参照領域RA1の幅の所定数倍(例えば、20倍)に決定する。そして、CPU410は、探索領域SA1の縦方向の位置を、参照領域RA1の縦方向の位置と同じ位置に決定する。そして、CPU410は、探索領域SA1の横方向の位置を、探索領域SA1の右端の位置が、左側スキャン画像20Lの右端と同じ位置となるように、決定する。
(2) In the above embodiment, in order to determine the search area SA1, in addition to the position information and the outline information of the reference area RA1, the position information and the outline information of the standard reference area RA0 and the reference search area SA0 are used. . Instead, the
(3)上記実施例では、探索領域SA1を決定するために、基準参照領域RA0の位置と参照領域RA1の位置との関係と、基準探索領域SA0の位置と、を用いている。これに代えて、CPU410は、右側スキャン画像20Rの基準の位置(例えば、右側スキャン画像20Rの左上の画素の位置)と、参照領域RA1の位置と、の関係と、左側スキャン画像20Lの基準の位置(例えば、左側スキャン画像20Lの右上の画素の位置)と、を用いて、探索領域SA1を決定しても良い。例えば、CPU410は、右側スキャン画像20Rの左上の画素の位置に対する参照領域RA1の左上の画素の位置と、左側スキャン画像20Lの右上の画素の位置に対する探索領域SA1の右上の画素の位置とが、鏡像の関係になるように、探索領域SA1を決定しても良い。
(3) In the above embodiment, in order to determine the search area SA1, the relationship between the position of the standard reference area RA0 and the position of the reference area RA1 and the position of the standard search area SA0 are used. Instead, the
(4)2個のスキャンデータによって表される2個の画像を、第1の画像と、第2の画像とする。上記実施例では、第1の画像(具体的には、右側スキャン画像20R)の左端近傍と、第2の画像(具体的には、左側スキャン画像20L)の右端近傍と、が結合されるように、合成画像が生成されている。これに代えて、例えば、2個のスキャンデータの生成に用いられる一つの原稿に応じて、第1の画像の右端近傍と、第2の画像の左端近傍とが、結合されるように、合成画像が生成されてもよい。あるいは、第1の画像の下端近傍と、第2の画像の上端近傍とが、結合されるように、合成画像が生成されても良く、第1の画像の上端近傍と、第2の画像の下端近傍と、が結合されるように、合成画像が生成されてもよい。
(4) Let two images represented by two scan data be a first image and a second image. In the above embodiment, the vicinity of the left end of the first image (specifically, the
そして、このような第1の画像と第2の画像との結合の態様は、予め決められていても良いし、上述した4個の結合の態様の全てについて、それぞれ、参照領域RA1の決定と、対応領域CPの決定と、を実行しても良い。後者の場合には、参照領域RA1と対応領域CPとの類似度が最も高い結合の態様で、第1の画像と第2の画像とが結合された合成画像を表す合成画像データが生成されてもよい。 Then, such a combination mode of the first image and the second image may be determined in advance, and for each of the four combination modes described above, the determination of the reference region RA1 is performed. The determination of the corresponding area CP may be executed. In the latter case, combined image data representing a combined image in which the first image and the second image are combined is generated in a combination mode in which the similarity between the reference region RA1 and the corresponding region CP is the highest. Also good.
4個の結合の態様によって、決定される参照領域RA1や探索領域SA1は異なる。また、4個の結合の態様によって、用いられる基準参照領域RA0や基準探索領域SA0は異なる。例えば、第1の画像の下端近傍と、第2の画像の上端近傍とが、結合されるように、合成画像が生成される場合を考える。この場合には、例えば、第1の画像の下端近傍に参照領域RA1が決定され、第2の画像の上端近傍に、探索領域SA1が決定される。例えば、基準参照領域RA0は、第1の画像の下端に沿って配置され、基準探索領域SA0は、第2の画像の上端に沿って配置される。そして、例えば、探索領域SA1の幅は、参照領域RA1の幅と同じに決定され、探索領域SA1の高さは、参照領域RA1の高さと基準参照領域RA0の高さとの比率に、基準探索領域SA0の高さを乗じた値に決定される。 The reference area RA1 and the search area SA1 to be determined differ depending on the mode of the four combinations. Further, the standard reference area RA0 and the standard search area SA0 to be used are different depending on the four coupling modes. For example, consider a case where a composite image is generated such that the vicinity of the lower end of the first image and the vicinity of the upper end of the second image are combined. In this case, for example, the reference area RA1 is determined near the lower end of the first image, and the search area SA1 is determined near the upper end of the second image. For example, the standard reference area RA0 is arranged along the lower end of the first image, and the standard search area SA0 is arranged along the upper end of the second image. For example, the width of the search area SA1 is determined to be the same as the width of the reference area RA1, and the height of the search area SA1 is equal to the ratio between the height of the reference area RA1 and the height of the standard reference area RA0. The value is determined by multiplying the height of SA0.
(5)上記実施例では、探索領域SA1の高さSh1は、参照領域RA1の高さRh1と同じにされる(図12のS335)。これは、上記実施例では、右側スキャン画像20R内の右側原稿画像HIRと、左側スキャン画像20L内の左側原稿画像HILとの、縦方向のずれ量が比較的小さいことを想定して、基準探索領域SA0の高さSh0と、基準参照領域RA0の高さRh0と、が等しい値とされているからである(Sh0=Rh0(図13))。例えば、右側スキャン画像20R内の右側原稿画像HIRと、左側スキャン画像20L内の左側原稿画像HILとの、縦方向のずれ量が比較的大きいことを想定される場合には、基準探索領域SA0の高さSh0が、基準参照領域RA0の高さRh0より大きくされ得る(Sh0>Rh0)。
(5) In the above embodiment, the height Sh1 of the search area SA1 is made the same as the height Rh1 of the reference area RA1 (S335 in FIG. 12). In the above-described embodiment, this is based on the assumption that the amount of vertical deviation between the right original image HIR in the
この場合には、探索領域SA1の高さSh1は、参照領域RA1と基準参照領域RA0との高さの比率(Rh1/Rh0)に、基準探索領域SA0の高さSh0を乗じた値に決定されても良い(Sh1=(Rh1/Rh0)×Sh0)。あるいは、探索領域SA1の高さSh1は、参照領域RA1の高さRh1に、想定される縦方向のずれ量を考慮して決定された所定長Mのマージンを加算した値に決定されても良い(Sh1=Sh0+M)。一般的には、探索領域SA1の高さSh1は、参照領域RA1の高さRh1が大きいほど大きくなるように決定されることが好ましい。 In this case, the height Sh1 of the search area SA1 is determined to be a value obtained by multiplying the height ratio (Rh1 / Rh0) between the reference area RA1 and the standard reference area RA0 by the height Sh0 of the standard search area SA0. (Sh1 = (Rh1 / Rh0) × Sh0). Alternatively, the height Sh1 of the search area SA1 may be determined to be a value obtained by adding a margin of a predetermined length M determined in consideration of an assumed vertical shift amount to the height Rh1 of the reference area RA1. (Sh1 = Sh0 + M). In general, the height Sh1 of the search area SA1 is preferably determined so as to increase as the height Rh1 of the reference area RA1 increases.
(6)参照領域RA1の位置情報は、座標とは異なる情報であっても良い。例えば、参照領域RA1の位置情報は、参照領域RA1の縦方向の位置を3段階(具体的には、上、中、下)で表す情報であっても良い。参照領域RA1の外形情報は、幅と高さとは異なる情報であっても良い。例えば、参照領域RA1の外形情報は、参照領域RA1のサイズを3段階(具体的には、大、中、小)で表す情報であっても良い。この場合には、例えば、参照領域決定処理では、CPU410は、右側スキャン画像20R内の複数個の画素の値のばらつきに基づいて、3段階の位置情報と3段階の外形情報とを組み合わせて得られる9種類のパターンに対応する9種類の参照領域の中から、1個の参照領域RA1を決定する。そして、CPU410は、決定された参照領域RA1に対応する9種類のパターンに対応する9種類の探索領域の中から、1個の探索領域SA1を決定しても良い。
(6) The position information of the reference area RA1 may be information different from the coordinates. For example, the position information of the reference area RA1 may be information representing the vertical position of the reference area RA1 in three stages (specifically, upper, middle, and lower). The external shape information of the reference area RA1 may be information different from the width and the height. For example, the outer shape information of the reference area RA1 may be information representing the size of the reference area RA1 in three levels (specifically, large, medium, and small). In this case, for example, in the reference area determination process, the
(7)上記実施例では、2個のスキャンデータを用いて、2個のスキャン画像が合成された合成画像を表す合成画像データが生成されている。これに限らず、任意の個数のスキャンデータを用いて合成画像データが生成されても良い。例えば、4個のスキャン画像データを用いて、4個のスキャン画像が合成された合成画像を表す合成画像データが生成されてもよい。 (7) In the above-described embodiment, composite image data representing a composite image obtained by combining two scan images is generated using two scan data. The present invention is not limited to this, and the composite image data may be generated using an arbitrary number of scan data. For example, composite image data representing a composite image obtained by combining four scan images may be generated using the four scan image data.
(8)上記実施例では、合成画像データの生成に用いられる2個の画像データは、複合機200のスキャナ部250によって原稿が読み取られることによって生成される2個のスキャンデータである。これに代えて、2個の画像データは、デジタルカメラによって原稿の複数個の領域を撮影することによって、2個の画像データが生成されても良い。
(8) In the above embodiment, the two pieces of image data used for generating the composite image data are two pieces of scan data generated by reading a document by the
(9)上記実施例では、合成画像データの生成に用いられる2個のスキャンデータは、1つの原稿10を読み取って得られる右側スキャンデータと左側スキャンデータである。これに代えて、2個のスキャンデータは、2個の原稿をそれぞれ読み取って得られる2個のスキャンデータであっても良い。
(9) In the above embodiment, the two scan data used for generating the composite image data are the right side scan data and the left side scan data obtained by reading one
(10)上記実施例においてサーバ400のCPU410によって実行される処理(例えば、図2のS25〜S40の処理)は、例えば、複合機200のCPU210によって実行されても良い。この場合には、サーバ400は不要であり、複合機200が単体で図2の処理を実行すればよい。また、サーバ400のCPU410によって実行される処理は、複合機200と接続されたパーソナルコンピュータ500(図1)のCPU(図示省略)によって実行されても良い。例えば、パーソナルコンピュータ500のCPUは、パーソナルコンピュータ500にインストールされたスキャナドライバプログラムを実行することによって、これらの処理を実行しても良い。また、サーバ400は、本実施例のように1つの計算機で構成されても良く、複数個の計算機を含む計算システムによって構成されていても良い。
(10) The processing (for example, the processing of S25 to S40 in FIG. 2) executed by the
(11)上記実施例において、ハードウェアによって実現されていた構成の一部をソフトウェアに置き換えるようにしてもよく、逆に、ソフトウェアによって実現されていた構成の一部をハードウェアに置き換えるようにしてもよい。 (11) 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.
200...複合機、210...CPU、220...揮発性記憶装置、221...バッファ領域、230...不揮発性記憶装置、231...制御プログラム、240...プリンタ部、250...スキャナ部、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, 260 ... operation unit, 270 ... display unit, 280 ... communication unit, 400 ... server, 410 ... CPU, 420 ...
Claims (13)
第1の画像を表す第1の画像データと、第2の画像を表す第2の画像データと、を取得する取得部と、
前記第1の画像データを用いて、前記第1の画像内の一部の領域である参照領域を決定する参照領域決定部と、
前記第2の画像データと、前記参照領域の位置を示す位置情報と、前記参照領域の外形に関する外形情報と、を用いて、前記第2の画像内の一部の領域である探索領域を決定する探索領域決定部と、
前記参照領域に類似する前記第2の画像内の対応領域を、前記第2の画像の前記探索領域内から決定する対応領域決定部と、
前記第1の画像データと前記第2の画像データとを用いて、前記参照領域と前記対応領域とが重なるように、前記第1の画像と前記第2の画像とが合成された合成画像を表す合成画像データを生成する生成部と、
を備え、
前記探索領域決定部は、
前記参照領域の基準となる第1の基準領域の外形を示す情報と、前記探索領域の基準となる第2の基準領域の外形を示す情報とを、取得し、
前記参照領域の外形と前記第1の基準領域の外形との関係と、前記第2の基準領域の外形と、に基づいて、前記探索領域の外形を決定する、画像処理装置。 An image processing apparatus,
An acquisition unit that acquires first image data representing a first image and second image data representing a second image;
A reference area determining unit that determines a reference area, which is a partial area in the first image, using the first image data;
A search area, which is a partial area in the second image, is determined using the second image data, position information indicating the position of the reference area, and outline information regarding the outline of the reference area. A search area determination unit to perform,
A corresponding area determining unit that determines a corresponding area in the second image similar to the reference area from within the search area of the second image;
Using the first image data and the second image data, a synthesized image obtained by synthesizing the first image and the second image so that the reference area and the corresponding area overlap with each other is obtained. A generating unit that generates composite image data to be represented;
Equipped with a,
The search area determination unit
Obtaining information indicating the outer shape of the first reference area serving as the reference area of the reference area and information indicating the outer shape of the second reference area serving as the reference of the search area;
And the relationship between the contour of the outer shape and the first reference region of the reference region, and the outer shape of the second reference area, based on, that determine the outer shape of the search area, the image processing apparatus.
前記探索領域決定部は、
前記第1の画像の基準の位置である第1の基準位置を示す情報と、前記第2の画像の基準の位置である第2の基準位置を示す情報と、を取得し、
前記参照領域の位置と前記第1の基準位置との関係と、前記第2の基準位置と、に基づいて、前記探索領域の位置を決定する、画像処理装置。 The image processing apparatus according to claim 1,
The search area determination unit
Obtaining information indicating a first reference position, which is a reference position of the first image, and information indicating a second reference position, which is a reference position of the second image;
An image processing apparatus that determines a position of the search area based on a relationship between a position of the reference area and the first reference position and the second reference position.
前記第1の基準位置は、前記参照領域の基準の位置を示す情報であり、
前記第2の基準位置は、前記探索領域の基準の位置を示す情報であり、
前記第1の基準位置を示す情報と、前記第2の基準位置を示す情報とは、それぞれに、第1の方向の位置を示す情報と、第1の方向と垂直な第2の方向の位置を示す情報と、を含み、
前記第1の方向は、前記合成画像において前記第1の画像と前記第2の画像とが並ぶ方向であり、
前記探索領域決定部は、前記参照領域の位置が前記第1の基準位置に対して前記第1の方向にずれている場合には、前記探索領域の位置が前記第2の基準位置に対して前記第1の方向にずれ、かつ、前記参照領域の位置が前記第1の基準位置に対して前記第2の方向にずれている場合には、前記探索領域の位置が前記第2の基準位置に対して前記第2の方向にずれるように、前記探索領域の位置を決定する、画像処理装置。 The image processing apparatus according to claim 2,
The first reference position is information indicating a reference position of the reference area,
The second reference position is information indicating a reference position of the search area,
The information indicating the first reference position and the information indicating the second reference position are respectively information indicating the position in the first direction and a position in the second direction perpendicular to the first direction. Including information indicating
The first direction is a direction in which the first image and the second image are arranged in the composite image,
When the position of the reference area is shifted in the first direction with respect to the first reference position, the search area determining unit determines that the position of the search area is relative to the second reference position. When the position of the reference area is shifted in the second direction with respect to the first reference position, the position of the search area is shifted to the second reference position. An image processing apparatus that determines a position of the search region so as to be shifted in the second direction with respect to the image.
前記探索領域決定部は、
前記参照領域の第1の方向の長さと前記第1の基準領域の前記第1の方向の長さとの比率を用いて、前記探索領域の前記第1の方向の長さを決定する、画像処理装置。 The image processing apparatus according to any one of claims 1 to 3 ,
The search area determination unit
Image processing for determining a length of the search region in the first direction using a ratio between a length of the reference region in the first direction and a length of the first reference region in the first direction apparatus.
前記第1の方向は、生成されるべき前記合成画像において前記第1の画像と前記第2の画像とが並ぶ方向であり、
前記探索領域決定部は、
前記探索領域の前記第1の方向と垂直な第2の方向の長さを、前記参照領域の前記第2の方向の長さに決定する、画像処理装置。 The image processing apparatus according to claim 4 ,
The first direction is a direction in which the first image and the second image are arranged in the composite image to be generated;
The search area determination unit
An image processing apparatus that determines a length of the search region in a second direction perpendicular to the first direction as a length of the reference region in the second direction.
前記探索領域決定部は、前記探索領域の前記第1の方向の長さを、前記第2の基準領域の前記第1の方向の長さより小さな値に決定する、画像処理装置。 The image processing apparatus according to claim 4 or 5 , wherein
The search region determination unit is an image processing device that determines the length of the search region in the first direction to a value smaller than the length of the second reference region in the first direction.
前記探索領域決定部は、前記参照領域の外形と前記第1の基準領域の外形との関係と、前記第2の基準領域の外形と、に基づいて決定された前記探索領域が、前記第2の画像より外側の領域を含む場合には、修正後の前記探索領域が前記第2の画像内に含まれるように、前記探索領域を修正する、画像処理装置。 An image processing apparatus according to any one of claims 1 to 6,
The search region determination unit is configured to determine whether the search region determined based on a relationship between an outer shape of the reference region and an outer shape of the first reference region and an outer shape of the second reference region is the second shape. if from the image including the outer regions, so that the search region after correction is included in the second image, modifying the search area, the image processing apparatus.
前記第2の基準領域は、前記第2の画像の第1の方向の端に沿って配置され、
前記第1の基準領域は、前記第1の画像の前記第1の方向とは反対方向の端に沿って配置され、
前記第1の方向は、生成されるべき前記合成画像において前記第1の画像と前記第2の画像とが並ぶ方向である、画像処理装置。 An image processing apparatus according to any one of claims 1 to 7,
The second reference region is disposed along an edge in a first direction of the second image;
The first reference region is disposed along an end of the first image in a direction opposite to the first direction;
The image processing apparatus, wherein the first direction is a direction in which the first image and the second image are arranged in the composite image to be generated.
前記探索領域決定部は、
前記参照領域の第1の方向の長さが長いほど、前記探索領域の前記第1の方向の長さを長く決定する、画像処理装置。 An image processing apparatus according to any one of claims 1-8,
The search area determination unit
An image processing apparatus that determines the length of the search region in the first direction to be longer as the length of the reference region in the first direction is longer.
前記位置情報は、前記参照領域の位置を特定する座標を含み、
前記外形情報は、前記参照領域のサイズを示す第1の方向の長さと、前記第1の方向と垂直な第2の方向の長さと、を含む。 An image processing apparatus according to any one of claims 1 to 9 ,
The position information includes coordinates that specify the position of the reference region,
The external shape information includes a length in a first direction indicating the size of the reference region and a length in a second direction perpendicular to the first direction.
前記参照領域決定部は、前記第1の画像内の複数個の画素の値のばらつきに基づいて、前記参照領域を決定し、
前記探索領域決定部は、ばらつきに基づいて決定された前記参照領域に応じて、前記探索領域を決定する、画像処理装置。 The image processing apparatus according to any one of claims 1 to 10 ,
The reference area determining unit determines the reference area based on a variation in values of a plurality of pixels in the first image;
The image processing apparatus, wherein the search area determination unit determines the search area according to the reference area determined based on variation.
前記第1の画像データは、原稿の第1の領域を光学的に読み取ることによって得られる画像データであり、
前記第2の画像データは、前記原稿の第2の領域を光学的に読み取ることによって得られる画像データである、画像処理装置。 An image processing apparatus according to any one of claims 1 to 1 1,
The first image data is image data obtained by optically reading a first area of a document,
The image processing apparatus, wherein the second image data is image data obtained by optically reading a second area of the document.
第1の画像を表す第1の画像データと、第2の画像を表す第2の画像データと、を取得する取得機能と、
前記第1の画像データを用いて、前記第1の画像内の一部の領域である参照領域を決定する参照領域決定機能と、
前記第2の画像データと、前記参照領域の位置を示す位置情報と、前記参照領域の外形に関する外形情報と、を用いて、前記第2の画像内の一部の領域である探索領域を決定する探索領域決定機能と、
前記参照領域に類似する前記第2の画像内の対応領域を、前記第2の画像の前記探索領域内から決定する対応領域決定機能と、
前記第1の画像データと前記第2の画像データとを用いて、前記参照領域と前記対応領域とが重なるように、前記第1の画像と前記第2の画像とが合成された合成画像を表す合成画像データを生成する生成機能と、
をコンピュータに実現させ、
前記探索領域決定機能は、
前記参照領域の基準となる第1の基準領域の外形を示す情報と、前記探索領域の基準となる第2の基準領域の外形を示す情報とを、取得し、
前記参照領域の外形と前記第1の基準領域の外形との関係と、前記第2の基準領域の外形と、に基づいて、前記探索領域の外形を決定するコンピュータプログラム。 A computer program,
An acquisition function for acquiring first image data representing a first image and second image data representing a second image;
A reference area determination function for determining a reference area, which is a partial area in the first image, using the first image data;
A search area, which is a partial area in the second image, is determined using the second image data, position information indicating the position of the reference area, and outline information regarding the outline of the reference area. A search area determination function to
A corresponding area determination function for determining a corresponding area in the second image similar to the reference area from within the search area of the second image;
Using the first image data and the second image data, a synthesized image obtained by synthesizing the first image and the second image so that the reference area and the corresponding area overlap with each other is obtained. A generating function for generating composite image data to be represented;
Is realized on a computer ,
The search area determination function is:
Obtaining information indicating the outer shape of the first reference area serving as the reference area of the reference area and information indicating the outer shape of the second reference area serving as the reference of the search area;
And the relationship between the contour of the outer shape of the reference region of the first reference area, said the outer shape of the second reference area, based on a computer program that determines the outer shape of the search area.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2014095447A JP6330458B2 (en) | 2014-05-02 | 2014-05-02 | Image processing apparatus and computer program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2014095447A JP6330458B2 (en) | 2014-05-02 | 2014-05-02 | Image processing apparatus and computer program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2015213253A JP2015213253A (en) | 2015-11-26 |
| JP6330458B2 true JP6330458B2 (en) | 2018-05-30 |
Family
ID=54697297
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2014095447A Active JP6330458B2 (en) | 2014-05-02 | 2014-05-02 | Image processing apparatus and computer program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP6330458B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP7171295B2 (en) | 2018-08-01 | 2022-11-15 | キヤノン株式会社 | Reading control device, control method, and program |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP4301137B2 (en) * | 2004-10-20 | 2009-07-22 | 富士ゼロックス株式会社 | Image composition apparatus, image composition method, image composition program, and recording medium |
| JP2009136421A (en) * | 2007-12-05 | 2009-06-25 | Toshiba Corp | X-ray diagnostic apparatus, X-ray image processing method, and storage medium |
-
2014
- 2014-05-02 JP JP2014095447A patent/JP6330458B2/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| JP2015213253A (en) | 2015-11-26 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP2010226252A (en) | Image processing apparatus and image forming apparatus control method | |
| JP6344064B2 (en) | Image processing apparatus and computer program | |
| US20160100075A1 (en) | Dual-mode scanning device and scanning method thereof | |
| US7684617B2 (en) | Apparatus and methods for processing images | |
| JP6256206B2 (en) | Image processing apparatus and computer program | |
| JP6330458B2 (en) | Image processing apparatus and computer program | |
| JP6152818B2 (en) | Image processing apparatus and computer program | |
| JP6108220B2 (en) | Image processing apparatus and image processing program | |
| US9886648B2 (en) | Image processing device generating arranged image data representing arranged image in which images are arranged according to determined relative position | |
| JP6409460B2 (en) | Image processing apparatus and computer program | |
| US9811877B2 (en) | Image processing device selecting arrangement method for generating arranged image data | |
| JP6149782B2 (en) | Image processing apparatus and computer program | |
| JP6314633B2 (en) | Image processing apparatus and computer program | |
| JP6322923B2 (en) | Information processing apparatus, information processing program, storage medium, information processing system, and information processing method | |
| JP6064390B2 (en) | Image reading apparatus, image reading system, image reading program, and portable terminal program | |
| US8416469B2 (en) | Image processing apparatus, image processing method and computer program | |
| JP6394060B2 (en) | Image processing apparatus and computer program | |
| JP4561433B2 (en) | Image reading device | |
| JP6372397B2 (en) | Image processing apparatus and computer program | |
| JP2016178367A (en) | Image processing apparatus and computer program | |
| JP2024119157A (en) | Computer program, server, and system | |
| JP2017143464A (en) | Image processing system, image processing apparatus, image processing method, and program | |
| JP5359713B2 (en) | Image processing apparatus and image forming apparatus | |
| EP3122028A1 (en) | Image processing apparatus and processing method | |
| JP2017028424A (en) | Image processing apparatus, image forming apparatus, and image forming method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20170425 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20171027 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20171107 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20180103 |
|
| 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: 20180327 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20180409 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 6330458 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |