JP6090004B2 - Reading apparatus, reading method and reading program - Google Patents

Reading apparatus, reading method and reading program Download PDF

Info

Publication number
JP6090004B2
JP6090004B2 JP2013131925A JP2013131925A JP6090004B2 JP 6090004 B2 JP6090004 B2 JP 6090004B2 JP 2013131925 A JP2013131925 A JP 2013131925A JP 2013131925 A JP2013131925 A JP 2013131925A JP 6090004 B2 JP6090004 B2 JP 6090004B2
Authority
JP
Japan
Prior art keywords
image
line
pixels
fragment
reading
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2013131925A
Other languages
Japanese (ja)
Other versions
JP2015008350A (en
Inventor
勇作 藤井
勇作 藤井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2013131925A priority Critical patent/JP6090004B2/en
Publication of JP2015008350A publication Critical patent/JP2015008350A/en
Application granted granted Critical
Publication of JP6090004B2 publication Critical patent/JP6090004B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)

Description

本発明は、読み取り装置、読み取り方法及び読み取りプログラムに関する。   The present invention relates to a reading device, a reading method, and a reading program.

イメージスキャナなどの読み取り装置により、サイズの大きい原稿を読み取る際に、原稿を読み取りが可能な大きさの複数の断片に分割し、各断片を読み取り装置で読み取って得られた画像を結合することで、元の原稿に対応する画像を取得する技術がある。   When reading a large document with an image scanner or other reading device, the document is divided into a plurality of fragments that can be read, and the images obtained by reading each fragment with the reading device are combined. There is a technique for acquiring an image corresponding to an original document.

例えば、原稿を半分に折り曲げ、両面を同時に読み取ることで得られた2つの画像から、原稿を二つ折りした辺を示すエッジを検出し、検出したエッジにおいて2つの画像を結合することで、元の画像を復元する技術が提案されている(例えば、特許文献1参照)。   For example, from two images obtained by folding a document in half and reading both sides at the same time, an edge indicating a side where the document is folded in half is detected, and the two images are combined at the detected edge. A technique for restoring an image has been proposed (see, for example, Patent Document 1).

特許第3604755号Japanese Patent No. 3604755

従来技術では、2つの断片を読み取って得られた画像において、原稿を切断した辺が明確なエッジとして検出されることを前提とし、検出したエッジを2つの画像を結合する際の境界線として用いている。   In the prior art, in an image obtained by reading two fragments, it is assumed that a side obtained by cutting a document is detected as a clear edge, and the detected edge is used as a boundary line when two images are combined. ing.

しかしながら、原稿である紙に折り目をつけて折り目の部分をペーパーナイフなどで切った場合や、折り目に沿って手で引き裂いた場合などには、紙の切断面が紙の表面に対して斜めに傾いてしまう場合がある。そして、紙の表面に対して傾いた切断面で分割された2つの断片を読み取ることで取得した画像について、上述の従来技術によって画像を結合すると、結合部分で画像が乱れる場合がある。なぜなら、表面に対して傾いた切断面で分割された2つの断片を読み取った場合には、斜めに傾いた切断面を示す領域が個々の断片に対応する画像に含まれるため、それぞれの画像にて、原稿を切断した辺を示す明確なエッジを検出することが困難だからである。   However, when the original paper is creased and the crease is cut with a paper knife, or when the paper is torn along the crease by hand, the cut surface of the paper is oblique to the surface of the paper. It may tilt. Then, when an image obtained by reading two pieces divided by a cutting plane inclined with respect to the surface of the paper is combined by the above-described conventional technique, the image may be disturbed at the combined portion. This is because, when reading two pieces divided by a cutting plane inclined with respect to the surface, an area indicating the cutting plane inclined obliquely is included in the image corresponding to each piece. This is because it is difficult to detect a clear edge indicating the side where the document is cut.

本件開示の読み取り装置、読み取り方法及び読み取りプログラムは、原稿を切断した断片を読み取ることで得られる画像を従来よりも高精度に結合可能な技術を提供することを目的とする。   An object of the reading device, reading method, and reading program of the present disclosure is to provide a technique capable of combining images obtained by reading a fragment obtained by cutting a document with higher accuracy than before.

一つの観点によれば、読み取り装置は、原稿を第1方向に切断して得られる第1断片と第2断片とのそれぞれを読み取ることで、第1画像と第2画像とを生成する読み取り部と、第1画像と第2画像とのそれぞれにおいて、第1方向と交差する第2方向に並び、原稿の切断された部分である切断部を含み、第1方向の位置が同じ複数の画素の特徴値に基づいて、第1画像に属する複数の画素の並びの少なくとも一部と第2画像に属する複数の画素の並びの少なくとも一部とを結合する第2方向の位置を検出する検出部と、検出部により検出された位置で、第1画像と第2画像とを結合する結合部とを有する。   According to one aspect, the reading device reads each of the first fragment and the second fragment obtained by cutting the document in the first direction, thereby generating a first image and a second image. In each of the first image and the second image, a plurality of pixels that are arranged in a second direction intersecting the first direction and that include a cutting portion that is a cut portion of the document and that have the same position in the first direction. A detection unit configured to detect a position in a second direction that combines at least a part of the arrangement of the plurality of pixels belonging to the first image and at least a part of the arrangement of the plurality of pixels belonging to the second image based on the feature value; And a coupling unit that couples the first image and the second image at the position detected by the detection unit.

また、別の観点によれば、読み取り方法は、原稿を第1方向に切断して得られる第1断片と第2断片とのそれぞれを読み取ることで、第1画像と第2画像とを生成し、第1画像と第2画像とのそれぞれにおいて、第1方向と交差する第2方向に並び、原稿の切断された部分である切断部を含み、第1方向の位置が同じ複数の画素の特徴値に基づいて、第1画像に属する複数の画素の並びの少なくとも一部と第2画像に属する複数の画素の並びの少なくとも一部とを結合する第2方向の位置を検出し、検出された位置で、第1画像と第2画像とを結合する。   According to another aspect, the reading method generates the first image and the second image by reading each of the first fragment and the second fragment obtained by cutting the document in the first direction. Each of the first image and the second image is characterized by a plurality of pixels arranged in a second direction intersecting the first direction and including a cut portion that is a cut portion of the document and having the same position in the first direction. Based on the value, a position in the second direction that combines at least a part of the arrangement of the plurality of pixels belonging to the first image and at least a part of the arrangement of the plurality of pixels belonging to the second image is detected and detected. At the position, the first image and the second image are combined.

また、別の観点による読み取りプログラムは、原稿を第1方向に切断して得られる第1断片と第2断片とのそれぞれを読み取ることで、第1画像と第2画像とを生成し、第1画像と第2画像とのそれぞれにおいて、第1方向と交差する第2方向に並び、原稿の切断された部分である切断部を含み、第1方向の位置が同じ複数の画素の特徴値に基づいて、第1画像に属する複数の画素の並びの少なくとも一部と第2画像に属する複数の画素の並びの少なくとも一部とを結合する第2方向の位置を検出し、検出された位置で、第1画像と第2画像とを結合する、処理をコンピュータに実行させる。   Further, a reading program according to another aspect generates a first image and a second image by reading each of a first fragment and a second fragment obtained by cutting a document in a first direction. Each of the image and the second image is based on feature values of a plurality of pixels that are arranged in a second direction intersecting the first direction and include a cutting portion that is a cut portion of the document, and the positions in the first direction are the same. Detecting a position in the second direction that combines at least a part of the arrangement of the plurality of pixels belonging to the first image and at least a part of the arrangement of the plurality of pixels belonging to the second image, and at the detected position, A computer is caused to execute a process of combining the first image and the second image.

本件開示の読み取り装置、読み取り方法及び読み取りプログラムは、原稿を分割した断片を読み取ることで得られる画像を従来よりも高精度に結合することができる。   The reading device, the reading method, and the reading program of the present disclosure can combine images obtained by reading fragments obtained by dividing a document with higher accuracy than before.

読み取り装置の一実施形態を示す図である。It is a figure which shows one Embodiment of a reader. 図1に示した読み取り部で得られる第1画像及び第2画像の例を示す図である。It is a figure which shows the example of the 1st image obtained by the reading part shown in FIG. 1, and a 2nd image. エッジの検出誤差の例を示す図である。It is a figure which shows the example of the detection error of an edge. 図1に示した結合部13による第1ラインL1と第2ラインL2との結合の例を示す図である。It is a figure which shows the example of the coupling | bonding of the 1st line L1 and the 2nd line L2 by the coupling | bond part 13 shown in FIG. 図2に示した第1画像と第2画像との結合例を示す図である。It is a figure which shows the example of a coupling | bonding of the 1st image shown in FIG. 2, and a 2nd image. 図1に示した読み取り装置の動作を示す図である。It is a figure which shows operation | movement of the reading apparatus shown in FIG. 読み取り装置の別実施形態を示す図である。It is a figure which shows another embodiment of a reader. 図7に示した検出部による検出例を示す図である。It is a figure which shows the example of a detection by the detection part shown in FIG. 読み取り装置の別実施形態を示す図である。It is a figure which shows another embodiment of a reader. 図9に示した評価部によって算出される評価値の例を示す図である。It is a figure which shows the example of the evaluation value calculated by the evaluation part shown in FIG. 読み取り装置のハードウェア構成の一例を示す図である。It is a figure which shows an example of the hardware constitutions of a reader. 図11に示した読み取り装置の動作を示す図である。It is a figure which shows operation | movement of the reading apparatus shown in FIG. 相対位置を決定する手法の別例を示す図である。It is a figure which shows another example of the method of determining a relative position. 評価値を算出する処理の例を示す図である。It is a figure which shows the example of the process which calculates an evaluation value. 評価値を算出する処理の別例を示す図である。It is a figure which shows another example of the process which calculates an evaluation value.

以下、図面に基づいて、実施形態を説明する。   Hereinafter, embodiments will be described with reference to the drawings.

図1は、読み取り装置の一実施形態を示す。   FIG. 1 shows an embodiment of a reading device.

図1に示した読み取り装置10は、読み取り部11と、検出部12と、結合部13とを含んでいる。   The reading device 10 illustrated in FIG. 1 includes a reading unit 11, a detection unit 12, and a coupling unit 13.

読み取り部11は、ライン型のイメージセンサ111を含む。イメージセンサ111は、例えば、JIS(Japanese Industrial Standards)による規格の用紙サイズであるA4判に相当する矩形の短辺の長さに所定のマージンを加えた幅を有し、複数の画素111aを含む。また、読み取り部11は、イメージセンサ111における画素111aの並び方向d2と直交する方向d1に読み取りの対象となる原稿を搬送させつつ読み取りを行うことで、原稿の画像を生成する。なお、読み取り部11は、イメージセンサ111を画素111aの並び方向d2と直交する方向d1に移動させながら読み取りを行うことで、原稿の画像を生成してもよい。   The reading unit 11 includes a line type image sensor 111. The image sensor 111 has, for example, a width obtained by adding a predetermined margin to the length of a rectangular short side corresponding to A4 size, which is a standard paper size according to JIS (Japanese Industrial Standards), and includes a plurality of pixels 111a. . Further, the reading unit 11 generates an image of a document by performing reading while conveying a document to be read in a direction d1 orthogonal to the arrangement direction d2 of the pixels 111a in the image sensor 111. Note that the reading unit 11 may generate an image of a document by performing reading while moving the image sensor 111 in a direction d1 orthogonal to the arrangement direction d2 of the pixels 111a.

以下の説明は、例えば、A3判の原稿MSを長手方向でほぼ2等分に切断することで得られる2つの断片P1,P2のそれぞれを読み取り部11によって読み取ることで得られる情報から、切断前の原稿MSに相当する画像を生成する場合を示す。なお、A3判の原稿MSは、A4判の原稿の2倍の面積を有し、半分に折ることでA4判の原稿のサイズになる。また、図1に示した断片P1は、原稿MSを第1方向d1に切断することで得られる第1断片の一例であり、断片P2は、原稿MSを第1方向d1に切断することで得られる第2断片の一例である。   In the following description, for example, from the information obtained by reading each of the two fragments P1 and P2 obtained by cutting the A3-size original MS into approximately two equal parts in the longitudinal direction by the reading unit 11, before cutting. A case where an image corresponding to the original MS is generated is shown. The A3-size original MS has an area twice that of the A4-size original, and is folded in half to be the size of an A4-size original. The fragment P1 shown in FIG. 1 is an example of a first fragment obtained by cutting the document MS in the first direction d1, and the fragment P2 is obtained by cutting the document MS in the first direction d1. It is an example of the 2nd fragment | piece produced.

図1の例では、断片P1は、原稿MSを切断した部分である切断部から見て左側の断片であり、断片P2は、切断部から見て右側の断片である。また、読み取り部11は、断片P1,P2のそれぞれの切断部の方向である第1方向と用紙が搬送される方向d1とを概ね一致させて読み取る。即ち、図1に示した方向d1は第1方向の一例であり、読み取り部11に含まれるイメージセンサ111における画素111aの並び方向である方向d2は、第1方向に交差する第2方向の一例である。   In the example of FIG. 1, the fragment P1 is a fragment on the left side as viewed from the cutting portion that is a portion obtained by cutting the document MS, and the fragment P2 is a fragment on the right side as viewed from the cutting portion. Further, the reading unit 11 reads the first direction, which is the direction of the cutting unit of each of the pieces P1 and P2, and the direction d1 in which the sheet is conveyed substantially coincide with each other. That is, the direction d1 illustrated in FIG. 1 is an example of the first direction, and the direction d2 that is the arrangement direction of the pixels 111a in the image sensor 111 included in the reading unit 11 is an example of the second direction that intersects the first direction. It is.

読み取り部11は、2つの断片P1,P2のそれぞれを読み取る際にイメージセンサ111から取得した情報から、第1画像と第2画像とを生成する。読み取り部11で得られる第1画像及び第2画像は、断片P1,P2の周囲にそれぞれ数十画素〜数百画素程度の背景を含んでいる場合がある。なお、第1画像及び第2画像において、断片P1,P2の周囲の背景に含まれる各画素は、例えば、読み取り部11による読み取りの際に、イメージセンサ111のうち原稿で覆われなかった部分に含まれる各画素111aの出力信号で示される特徴値を持つ。   The reading unit 11 generates a first image and a second image from information acquired from the image sensor 111 when reading each of the two fragments P1 and P2. The first image and the second image obtained by the reading unit 11 may include a background of about several tens to several hundreds of pixels around the fragments P1 and P2, respectively. Note that, in the first image and the second image, each pixel included in the background around the fragments P1 and P2 is, for example, in a portion of the image sensor 111 that is not covered with the original when the reading unit 11 reads. It has a feature value indicated by the output signal of each pixel 111a included.

図2は、図1に示した読み取り部11で得られる第1画像IMG1及び第2画像IMG2の例を示す。なお、図2に示した要素のうち、図1に示した要素と同等のものについては同一の符号で示す。   FIG. 2 shows an example of the first image IMG1 and the second image IMG2 obtained by the reading unit 11 shown in FIG. 2 that are equivalent to the elements shown in FIG. 1 are denoted by the same reference numerals.

図2に示した第1画像IMG1及び第2画像IMG2は、図1に示した断片P1、P2の画像をそれぞれ含む。   The first image IMG1 and the second image IMG2 illustrated in FIG. 2 include the images of the fragments P1 and P2 illustrated in FIG.

図1に示した読み取り部11は、例えば、図2に示した第1画像IMG1に含まれる断片P1の画像及び第2画像IMG2に含まれる断片P2の画像に基づいて、断片P1の画像と断片P2の画像とを共通の座標系において表すための相対位置を求める。   The reading unit 11 illustrated in FIG. 1, for example, based on the image of the fragment P1 included in the first image IMG1 and the image of the fragment P2 included in the second image IMG2 illustrated in FIG. A relative position for representing the image of P2 in a common coordinate system is obtained.

読み取り部11は、例えば、第1画像IMG1から断片P1と背景との境界を近似する4つの線分Le1T,Le1L,Le1B,Le1Rを求める。ここで、線分Le1Tは、断片P1の上側の辺に相当し、線分Le1Lは、断片P1の左側の辺に相当し、また、線分Le1Bは、断片P1の下側の辺に相当する。一方、線分Le1Rは、断片P1の切断部と背景との境界E1を近似した線分に相当する。同様に、読み取り部11は、第2画像IMG2から断片P2の画像と背景との境界を近似する4つの線分Le2T,Le2L,Le2B,Le2Rを求める。ここで、線分Le2Tは、断片P2の上側の辺に相当し、線分Le2Rは、断片P2の右側の辺に相当し、また、線分Le2Bは、断片P2の下側の辺に相当する。一方、線分Le2Lは、断片P2の切断部と背景との境界E2を近似した線分に相当する。そして、読み取り部11は、2つの線分Le1R,Le2Lを重ね合わせる位置を、断片P1の画像と断片P2の画像とを共通の座標系において表すための相対位置として求める。   For example, the reading unit 11 obtains four line segments Le1T, Le1L, Le1B, and Le1R that approximate the boundary between the fragment P1 and the background from the first image IMG1. Here, the line segment Le1T corresponds to the upper side of the fragment P1, the line segment Le1L corresponds to the left side of the fragment P1, and the line segment Le1B corresponds to the lower side of the fragment P1. . On the other hand, the line segment Le1R corresponds to a line segment that approximates the boundary E1 between the cut portion of the fragment P1 and the background. Similarly, the reading unit 11 obtains four line segments Le2T, Le2L, Le2B, and Le2R that approximate the boundary between the image of the fragment P2 and the background from the second image IMG2. Here, the line segment Le2T corresponds to the upper side of the fragment P2, the line segment Le2R corresponds to the right side of the fragment P2, and the line segment Le2B corresponds to the lower side of the fragment P2. . On the other hand, the line segment Le2L corresponds to a line segment that approximates the boundary E2 between the cut portion of the fragment P2 and the background. Then, the reading unit 11 obtains a position where the two line segments Le1R and Le2L are overlapped as a relative position for representing the image of the fragment P1 and the image of the fragment P2 in a common coordinate system.

また、読み取り部11は、第1画像IMG1及び第2画像IMG2とともに、求めた相対位置を示す情報を図1に示した検出部12に渡すことが望ましい。なお、読み取り部11において、断片P1の画像と断片P2の画像とを共通の座標系において表すための相対位置を求める手法は、図2に示した線分Le1R,Le2Lを用いる手法に限られない。例えば、読み取り部11は、図2に示した断片P1の頂点A1と断片P2の頂点A2との距離が、切断される前の原稿MSの対角線の長さに相当することを利用して、断片P1の画像と断片P2の画像とを共通の座標系において表すための相対位置を求めてもよい。   Further, it is desirable that the reading unit 11 passes information indicating the obtained relative position to the detection unit 12 illustrated in FIG. 1 together with the first image IMG1 and the second image IMG2. The method for obtaining the relative position for representing the image of the fragment P1 and the image of the fragment P2 in the common coordinate system in the reading unit 11 is not limited to the method using the line segments Le1R and Le2L shown in FIG. . For example, the reading unit 11 uses the fact that the distance between the vertex A1 of the fragment P1 and the vertex A2 of the fragment P2 shown in FIG. 2 corresponds to the length of the diagonal line of the document MS before being cut. You may obtain | require the relative position for expressing the image of P1 and the image of the fragment | piece P2 in a common coordinate system.

図1に示した検出部12は、読み取り部11から、第1画像及び第2画像とともに、第1画像および第2画像にそれぞれ含まれる断片P1の画像と断片P2の画像とを共通の座標系において表すための相対位置を示す情報を受ける。また、検出部12は、相対位置を示す情報に基づいて、第1画像及び第2画像から、2つの断片P1,P2において第1方向d1の同じ位置にあり、第2方向d2に延びる帯状の領域に対応する画像である第1ラインと第2ラインとを取得する。   The detection unit 12 shown in FIG. 1 uses the common coordinate system to transmit the image of the fragment P1 and the image of the fragment P2 included in the first image and the second image, respectively, together with the first image and the second image from the reading unit 11. Receive information indicating the relative position to represent in. Further, the detection unit 12 is based on the information indicating the relative position, and from the first image and the second image, the two fragments P1 and P2 are in the same position in the first direction d1 and extend in the second direction d2. The first line and the second line, which are images corresponding to the region, are acquired.

例えば、検出部12は、図2に示した線分Le1T,Le2Tから第1方向d1に距離D離れた位置に対応して第1画像IMG1および第2画像IMG2にそれぞれ含まれる帯状の領域L1、L2の画像を取得する。以下では、帯状の領域L1,L2の画像は、第1ラインL1および第2ラインL2とも称される。   For example, the detection unit 12 corresponds to the positions separated from the line segments Le1T and Le2T shown in FIG. 2 by the distance D in the first direction d1, and the band-like regions L1 included in the first image IMG1 and the second image IMG2, respectively. The image of L2 is acquired. Hereinafter, the images of the band-like regions L1 and L2 are also referred to as a first line L1 and a second line L2.

ここで、図2に示した帯状の領域L1,L2の画像、すなわち第1ラインL1及び第2ラインL2の双方は、原稿MSを切断したことによって断片P1と断片P2とに分割された切断部の情報を共通に含んでいる。しかしながら、第1ラインL1と第2ラインL2とのそれぞれにおいて、断片P1と背景との境界を示すエッジと断片P2と背景との境界を示すエッジとを検出した場合に、検出したエッジの位置が誤差を含んでいる場合がある。そして、検出したエッジの位置に含まれる誤差のために、2つのエッジを示す相対位置は、上述の共通の座標系において互いに一致しない場合がある。例えば、第1ラインL1から検出されたエッジと第2ラインから検出されたエッジとの誤差は、原稿MSが手で引き裂くなどの方法で断片P1,P2に分割された場合のように、断片P1と断片P2とを分割した切断部が、原稿MSである紙の表裏の面に対して斜めに傾いている場合などに発生する。   Here, the images of the band-like regions L1 and L2 shown in FIG. 2, that is, both the first line L1 and the second line L2, are cut portions that are divided into the fragment P1 and the fragment P2 by cutting the document MS. Information in common. However, when the edge indicating the boundary between the fragment P1 and the background and the edge indicating the boundary between the fragment P2 and the background are detected in each of the first line L1 and the second line L2, the position of the detected edge is There may be an error. Then, due to an error included in the detected edge position, the relative positions indicating the two edges may not match each other in the above-described common coordinate system. For example, the error between the edge detected from the first line L1 and the edge detected from the second line is the fragment P1 as in the case where the document MS is divided into fragments P1 and P2 by a method such as tearing by hand. This occurs when the cutting portion that divides the frame P2 and the fragment P2 is inclined with respect to the front and back surfaces of the paper that is the original MS.

図3は、エッジの検出誤差の例を示す。なお、図3に示した要素のうち、図1、図2に示した要素と同等のものについては、同一の符号を付して示す。   FIG. 3 shows an example of edge detection error. 3 that are equivalent to the elements shown in FIGS. 1 and 2 are denoted by the same reference numerals.

図3(A)は、図1及び図2に示した断片P2と、原稿MSを切断した際に、紙の厚みが斜めにそがれることで現れた切断面C2とを示す。   FIG. 3A shows the fragment P2 shown in FIGS. 1 and 2, and the cut surface C2 that appears when the thickness of the paper is slanted when the document MS is cut.

図3(B)は、図3(A)に示した帯状の領域L2の位置における断片P2の断面を示す。図3(B)において、図3(A)に示した帯状の領域L2に含まれる文字の一部を示すインクの部分を黒く塗りつぶした矩形St2で示した。また、図3(A)に示した紙の切断面C2は、図3(B)において、断片P2の断面の表裏の面を示す辺Ss,Srの端点Eu、Edとを斜めに結ぶ線分に相当する。   FIG. 3B shows a cross section of the fragment P2 at the position of the band-like region L2 shown in FIG. In FIG. 3B, the ink portion indicating a part of the characters included in the belt-like region L2 shown in FIG. 3A is indicated by a black rectangle St2. 3A is a line segment that obliquely connects the end points Eu and Ed of the sides Ss and Sr indicating the front and back surfaces of the cross section of the fragment P2 in FIG. 3B. It corresponds to.

図3(C)は、図3(A)に示した帯状の領域L2に対応する第2ラインL2に含まれる各画素の明度値の例を示す。図3(C)において、横軸Xは、図1に示した読み取り部11に含まれるイメージセンサ111における画素の並び方向、即ち、第2ラインL2に含まれる各画素の第2方向d2における位置を示す。また、縦軸Bは、各画素の特徴値の一つである明るさを示す明度値の大きさを示す。また、縦軸Bにおいて、明度値Bwは、画像において白色を示す明るさを示し、明度値Bsは、画像において背景の色を示す明るさを示す。   FIG. 3C shows an example of the brightness value of each pixel included in the second line L2 corresponding to the band-like region L2 shown in FIG. 3C, the horizontal axis X represents the pixel arrangement direction in the image sensor 111 included in the reading unit 11 illustrated in FIG. 1, that is, the position of each pixel included in the second line L2 in the second direction d2. Indicates. The vertical axis B indicates the magnitude of the brightness value indicating brightness, which is one of the feature values of each pixel. On the vertical axis B, the lightness value Bw indicates the brightness indicating white in the image, and the lightness value Bs indicates the brightness indicating the background color in the image.

図3(C)において、第2ラインL2に含まれる各画素の明度値を示す折れ線G2は、図3(B)に示した端点Euと端点Edとに対応する区間で、明度値が白色を示す明度値Bwまで一旦増大した後に、背景の色を示す明度値Bsへと緩やかに変化することを示す。   In FIG. 3C, a polygonal line G2 indicating the brightness value of each pixel included in the second line L2 is a section corresponding to the end point Eu and the end point Ed shown in FIG. It shows that the lightness value Bw once increases to the lightness value Bw and then gradually changes to the lightness value Bs indicating the background color.

このため、例えば、明度値Bsから所定値以上異なる明度値を持つ画素のうち、横軸Xの原点に最も近い画素を断片P2の切断部を示すとすれば、図3(B)に示した端点Edに対応する位置がエッジとして検出される。一方、明度値Bwとの差分が所定値以下となる明度値を持つ画素のうち、横軸Xの原点に最も近い画素を断片P2の切断部を示すとすれば、図3(B)に示した端点Eu,Edの中間に対応する位置がエッジとして検出される。つまり、折れ線G2で示される明度値の変化に基づいて、紙の切断面Cを示すエッジを検出する場合の誤差は、図3(B)に示した端点Eu,Edを両端とする区間と同程度まで大きくなる可能性がある。   Therefore, for example, if the pixel closest to the origin of the horizontal axis X among the pixels having a brightness value different from the brightness value Bs by a predetermined value or more is shown as the cut portion of the fragment P2, it is shown in FIG. A position corresponding to the end point Ed is detected as an edge. On the other hand, if the pixel closest to the origin of the horizontal axis X among the pixels having the lightness value whose difference from the lightness value Bw is equal to or smaller than a predetermined value is shown as the cut portion of the fragment P2, it is shown in FIG. A position corresponding to the middle of the end points Eu and Ed is detected as an edge. That is, the error in detecting the edge indicating the cut surface C of the paper based on the change in the lightness value indicated by the polygonal line G2 is the same as the section having the end points Eu and Ed shown in FIG. Can grow to a degree.

すなわち、図3(A)に示したように、帯状の領域L2に紙の切断面Cの一部が含まれている場合に、帯状の領域L2に対応する第2ラインL2から検出したエッジの位置を画像の結合に用いると元の原稿MSが再現されない場合がある。例えば、図3(B)に示した端点Edにおいて、第2ラインL2と第1ラインL1とを結合すると、結合後の画像は、図3(A)に示した切断面Cの一部を含むことになり、図2に示した断片P1,P2に分割された文字を示すパターンの一部が欠けてしまう。また、画像のボケにより背景と断片の境界が不明瞭になった場合にもエッジの検出に誤差が発生し、その結果、紙の切断面が斜めに傾いている場合と同様に、結合後の画像において文字のパターンの一部が欠けてしまう場合がある。   That is, as shown in FIG. 3A, when a part of the cut surface C of the paper is included in the belt-like region L2, the edge detected from the second line L2 corresponding to the belt-like region L2 is detected. If the position is used for combining images, the original document MS may not be reproduced. For example, when the second line L2 and the first line L1 are combined at the end point Ed illustrated in FIG. 3B, the combined image includes a part of the cut surface C illustrated in FIG. As a result, a part of the pattern indicating the characters divided into the fragments P1 and P2 shown in FIG. 2 is missing. In addition, when the boundary between the background and the fragment becomes unclear due to the blurring of the image, an error occurs in edge detection, and as a result, as in the case where the cut surface of the paper is inclined obliquely, A part of the character pattern may be missing in the image.

そこで、図1に示した検出部12は、第1ラインL1と第2ラインL2とにそれぞれ含まれる複数の画素の特徴値に基づいて、第1ラインL1の少なくとも一部と第2ラインL2の少なくとも一部とを結合する位置を検出する。なお、第1ラインL1及び第2ラインL2は、第1画像IMG1と第2画像IMG2とのそれぞれにおいて、第1方向d1と交差する第2方向d2に並び、原稿MSの切断された部分である切断部を含み、第1方向d1の位置が同じ複数の画素の一例である。   Therefore, the detection unit 12 illustrated in FIG. 1 determines at least a part of the first line L1 and the second line L2 based on feature values of a plurality of pixels included in the first line L1 and the second line L2, respectively. A position where at least a part is combined is detected. Note that the first line L1 and the second line L2 are portions of the first image IMG1 and the second image IMG2 that are aligned in the second direction d2 intersecting the first direction d1 and cut from the document MS. It is an example of a plurality of pixels including a cut portion and having the same position in the first direction d1.

検出部12は、例えば、読み取り部11から受けた相対位置を示す情報により、第2方向d2の同一の範囲に対応付けられた第1ラインL1と第2ラインL2の部分の各画素の特徴値を互いに比較する。また、検出部12は、比較結果により、特徴値の差の絶対値が他の特徴値の差の絶対値よりも小さくなることが示された位置を、第1ラインと第2ラインとを結合した場合に、他の位置よりも特徴値の連続性が高くなる位置として検出する。そして、検出部12は、検出した位置を、第1ラインと第2ラインとを結合する位置として出力する。   For example, the detection unit 12 uses the information indicating the relative position received from the reading unit 11, and the feature value of each pixel in the first line L1 and the second line L2 corresponding to the same range in the second direction d2. Are compared with each other. In addition, the detection unit 12 combines the first line and the second line at a position indicated by the comparison result that the absolute value of the difference between the feature values is smaller than the absolute value of the difference between the other feature values. In this case, the position is detected as a position where the continuity of the feature value is higher than other positions. And the detection part 12 outputs the detected position as a position which couple | bonds a 1st line and a 2nd line.

また、結合部13は、検出部12により検出された位置で、第1ラインL1と第2ラインL2とを結合する。   The combining unit 13 combines the first line L1 and the second line L2 at the position detected by the detecting unit 12.

図4は、図1に示した結合部13による第1ラインL1と第2ラインL2との結合の例を示す。図4(A),(B)において、横軸Xは、図1に示した読み取り部11に含まれるイメージセンサ111における画素の並び方向、即ち、第1ラインL1および第2ラインL2に含まれる各画素の第2方向d2における位置を示す。また、縦軸Bは、各画素の特徴値の一つである明るさを示す明度値の大きさを示す。また、縦軸Bにおいて、明度値Bwは、画像において白色を示す明るさを示し、明度値Bbは、画像において黒色を示す明るさを示す。また、縦軸Bにおいて、明度値Bsは、画像において背景の色を示す明るさを示す。   FIG. 4 shows an example of coupling of the first line L1 and the second line L2 by the coupling unit 13 shown in FIG. 4A and 4B, the horizontal axis X is included in the pixel arrangement direction in the image sensor 111 included in the reading unit 11 illustrated in FIG. 1, that is, the first line L1 and the second line L2. The position of each pixel in the second direction d2 is shown. The vertical axis B indicates the magnitude of the brightness value indicating brightness, which is one of the feature values of each pixel. On the vertical axis B, the lightness value Bw indicates the brightness indicating white in the image, and the lightness value Bb indicates the brightness indicating black in the image. On the vertical axis B, the lightness value Bs indicates the brightness indicating the background color in the image.

図4(A)は、図2に示した第1ラインL1および第2ラインL2に含まれる各画素の明度値をそれぞれ実線の折れ線G1と点線の折れ線G2とで示す。図4(A)においては、第1ラインL1及び第2ラインL2に沿って、第1ラインL1及び第2ラインL2に含まれる各画素の位置を、原稿MSの端に対応する第1画像IMG1の端を基準として横軸Xで示した。また、図4(A)において、折れ線G1とG2とが重なり合う範囲Rは、図1に示した原稿MSを断片P1と断片P2とに分割した、幅を持つ切断部と背景を示している。すなわち、図4(A)に示した範囲Rは、第1画像IMG1と第2画像IMG2とのそれぞれにおいて、第1方向d1と交差する第2方向d2に並び、原稿MSの切断された部分である切断部を含み、第1方向d1の位置が同じ複数の画素の一例である。   FIG. 4A shows the brightness values of the pixels included in the first line L1 and the second line L2 shown in FIG. 2 by a solid line G1 and a dotted line G2, respectively. In FIG. 4A, along the first line L1 and the second line L2, the position of each pixel included in the first line L1 and the second line L2 is set to the first image IMG1 corresponding to the edge of the document MS. The horizontal axis X is shown with reference to the end of. In FIG. 4A, a range R in which the polygonal lines G1 and G2 overlap each other indicates a cut portion having a width and the background obtained by dividing the document MS shown in FIG. 1 into a fragment P1 and a fragment P2. That is, the range R shown in FIG. 4A is a portion of the first image IMG1 and the second image IMG2 that are aligned in the second direction d2 intersecting the first direction d1 and cut off the document MS. It is an example of a plurality of pixels including a certain cut portion and having the same position in the first direction d1.

図1に示した検出部12は、第1ラインL1及び第2ラインL2のそれぞれに含まれる各画素のうち、図4(A)に示した範囲Rに含まれる複数の画素の特徴値を互いに比較することで、第1ラインL1と第2ラインL2とを結合する位置を検出することが望ましい。   The detection unit 12 illustrated in FIG. 1 uses the feature values of a plurality of pixels included in the range R illustrated in FIG. 4A among the pixels included in each of the first line L1 and the second line L2. By comparing, it is desirable to detect a position where the first line L1 and the second line L2 are joined.

図4(A)の例では、第1ラインL1を示す折れ線G1と第2ラインL2を示す折れ線G2とは、上述の範囲Rに含まれる点Qにおいて交差している。つまり、点Qで示される位置で示される第1ラインL1の画素の明度値と、同じく点Qの位置で示される第2ラインL2の画素の明度値との差の絶対値は零となり、他の明度値の差の絶対値に比べて小さくなる。したがって、図1に示した検出部12は、図4(A)に示した第1ラインL1及び第2ラインL2に基づいて、点Qで示される位置を、第1ラインと第2ラインとを結合する位置として検出する。   In the example of FIG. 4A, the polygonal line G1 indicating the first line L1 and the polygonal line G2 indicating the second line L2 intersect at the point Q included in the range R described above. That is, the absolute value of the difference between the brightness value of the pixel on the first line L1 indicated by the position indicated by the point Q and the brightness value of the pixel on the second line L2 indicated by the position of the point Q is zero. It becomes smaller than the absolute value of the difference in brightness value. Therefore, the detection unit 12 illustrated in FIG. 1 determines the position indicated by the point Q based on the first line L1 and the second line L2 illustrated in FIG. It detects as a position to combine.

また、図4(B)は、図1に示した結合部13により、検出部12によって検出された位置で、図4(A)に示した第1ラインと第2ラインとを結合することで得られる画像に含まれる各画素の明度値の例を示す。   Further, FIG. 4B is obtained by combining the first line and the second line shown in FIG. 4A at the position detected by the detecting unit 12 by the combining unit 13 shown in FIG. The example of the brightness value of each pixel contained in the obtained image is shown.

図4(B)の例では、図1に示した結合部13により、図4(A)に折れ線G1で示した第1ラインL1の一部である区間L1’と、折れ線G2で示した第2ラインL2の一部である区間L2’とが結合されている。なお、図4(B)において、区間L1’は、第1ラインL1の端のうち横軸Xの原点に近い端から点Qで示される画素までの部分である。また、区間L2’は、第2ラインL2において点Qで示される画素から横軸Xの原点から遠い端までの部分である。   In the example of FIG. 4B, the coupling portion 13 shown in FIG. 1 causes the section L1 ′ that is a part of the first line L1 indicated by the broken line G1 in FIG. 4A and the first portion indicated by the broken line G2. The section L2 ′ which is a part of the two lines L2 is coupled. In FIG. 4B, a section L1 'is a portion from the end near the origin of the horizontal axis X to the pixel indicated by the point Q among the ends of the first line L1. The section L2 'is a portion from the pixel indicated by the point Q on the second line L2 to the end far from the origin of the horizontal axis X.

ここで、図4(B)に示した区間L1’は、図1に示した断片P1,P2に分割される前の原稿MSにおいて上端から距離Dで示される帯状の領域に含まれる情報のうち、断片P1に含まれる情報を漏れなく含んでいる。同様に、図4(B)に示した区間L2’は、同じく、分割される前の原稿MSにおいて上端から距離Dで示される帯状の領域に含まれる情報のうち、断片P2に含まれる情報を漏れなく含んでいる。   Here, the section L1 ′ shown in FIG. 4B is the information included in the band-shaped area indicated by the distance D from the upper end in the document MS before being divided into the fragments P1 and P2 shown in FIG. The information contained in the fragment P1 is included without omission. Similarly, in the section L2 ′ shown in FIG. 4B, the information included in the fragment P2 among the information included in the band-shaped area indicated by the distance D from the upper end in the document MS before being divided is similarly displayed. Contains without omission.

したがって、結合部13が図4(A),(B)に示した区間L1’と区間L2’とを結合することで、図2に示した断片P1と断片P2とに分割された原稿MSの情報を欠けることなく含み、明度値の変化が滑らかに連続する画像を生成することができる。   Therefore, the combining unit 13 combines the sections L1 ′ and L2 ′ shown in FIGS. 4A and 4B, so that the original MS divided into the fragments P1 and P2 shown in FIG. It is possible to generate an image that includes information without loss and has a continuous change in brightness value.

図5は、図2に示した第1画像IMG1と第2画像IMG2との結合例を示す。なお、図5に示した要素のうち、図2、図3及び図4に示した要素と同等のものについては、同一の符号を付して示し、その説明は省略する。   FIG. 5 shows an example of combining the first image IMG1 and the second image IMG2 shown in FIG. Note that among the elements shown in FIG. 5, elements equivalent to those shown in FIGS. 2, 3, and 4 are denoted by the same reference numerals and description thereof is omitted.

図5(A)は、図2に示した帯状の領域L1,L2における断片P1,P2のそれぞれの断面を示す。図5(A)において、断片P1と断片P2とは、図1に示した読み取り部11において求められた相対位置に基づいて、原稿MSにおける第2方向d2についての位置関係を再現する位置に示されている。つまり、断片P1および断片P2は、断片P1の切断部と反対側の端と断片P2の切断部と反対側の端との距離が、原稿MSの長手方向の幅W0に一致する相対位置で、切断部を重ね合わせて配置されている。   FIG. 5A shows cross sections of the fragments P1 and P2 in the band-like regions L1 and L2 shown in FIG. In FIG. 5A, the fragment P1 and the fragment P2 are shown at positions that reproduce the positional relationship in the second direction d2 on the document MS based on the relative position obtained by the reading unit 11 shown in FIG. Has been. That is, the fragment P1 and the fragment P2 are at relative positions where the distance between the end opposite to the cut portion of the fragment P1 and the end opposite to the cut portion of the fragment P2 coincides with the width W0 in the longitudinal direction of the document MS. The cut portions are arranged so as to overlap each other.

また、図5(A)に示した断片P1は、断片P2に含まれる切断面C2に対応する切断面C1を含んでいる。また、図2に示した断片P1に表示された文字の一部を示すインクの部分を黒く塗りつぶした矩形St1で示した。図5(A)に示した断片P1に含まれるインクの部分St1の幅W1は、図4(A)に示した第1ラインL1において黒色を示す明度値が連続している部分の幅W1と同等である。同様に、図5(A)に示した断片P2に含まれるインクの部分St2の幅W2は、図4(A)に示した第2ラインL2において黒色を示す明度値が連続している部分の幅W2と同等である。   Further, the fragment P1 shown in FIG. 5A includes a cut surface C1 corresponding to the cut surface C2 included in the fragment P2. Further, the ink portion indicating a part of the character displayed in the fragment P1 shown in FIG. The width W1 of the ink portion St1 included in the fragment P1 shown in FIG. 5A is equal to the width W1 of the portion where the lightness value indicating black is continuous in the first line L1 shown in FIG. It is equivalent. Similarly, the width W2 of the ink portion St2 included in the fragment P2 illustrated in FIG. 5A is the portion where the lightness value indicating black is continuous in the second line L2 illustrated in FIG. It is equivalent to the width W2.

図5(A)に示した断片P1において、図4(A),(B)に示した区間L1’は、断片P2との切断部と反対側の端から切断部側の端までの範囲に相当している。また、図5(A)に示した断片P2において、図4(A),(B)に示した区間L2’は、断片P1との切断部と反対側の端から切断部側の端のインクの部分St2までの範囲に相当している。   In the fragment P1 shown in FIG. 5 (A), the section L1 ′ shown in FIGS. 4 (A) and 4 (B) is in the range from the end opposite to the cut portion to the fragment P2 to the end on the cut portion side. It corresponds. Further, in the fragment P2 shown in FIG. 5A, the section L2 ′ shown in FIGS. 4A and 4B is the ink from the end opposite to the cut portion to the fragment P1 to the end on the cut portion side. Corresponds to the range up to the portion St2.

図5(B)は、図5(A)に示した区間L1’と区間L2’とを図4(A),(B)に示した点Qにおいて結合した例を示す。図5(B)の例では、図5(A)に示した断片P1に含まれるインクの部分St1と断片P2に含まれるインクの部分St2とが切れ目なく結合され、幅Wtを持つインクの部分St0となっている。   FIG. 5B shows an example in which the section L1 'and the section L2' shown in FIG. 5A are combined at the point Q shown in FIGS. 4A and 4B. In the example of FIG. 5B, the ink portion St1 included in the fragment P1 shown in FIG. 5A and the ink portion St2 included in the fragment P2 are joined seamlessly, and the ink portion has a width Wt. St0.

図5(C)は、図2に示した第1画像IMG1及び第2画像IMG2にそれぞれに含まれる断片P1の画像と断片P2の画像との結合例を示す。   FIG. 5C shows an example of combining the image of the fragment P1 and the image of the fragment P2 included in each of the first image IMG1 and the second image IMG2 shown in FIG.

図5(C)において、図5(B)に示したインクの部分St0は、図2に示した断片P1,P2に分割される前の原稿MSに表示された情報のうち、図5(A)に示した区間L1’と区間L2’とを結合することで得られた帯状の領域に含まれる部分に相当する。   In FIG. 5C, the ink portion St0 shown in FIG. 5B is the portion of the information displayed on the document MS before being divided into the fragments P1 and P2 shown in FIG. This corresponds to the portion included in the band-like region obtained by combining the section L1 ′ and the section L2 ′ shown in FIG.

すなわち、図1に示した結合部13は、検出部12によって検出された位置において、図2に示した第1ラインL1と第2ラインL2とを結合することで、分割前の原稿MSにおいて第1ラインL1,第2ラインL2に対応する部分の画像を再現することができる。   In other words, the combining unit 13 shown in FIG. 1 combines the first line L1 and the second line L2 shown in FIG. Images of portions corresponding to the first line L1 and the second line L2 can be reproduced.

したがって、図2に示した線分Le1T,Le2Tからの距離Dが異なる第1ラインL1,第2ラインL2との対のそれぞれを、結合部13が、検出部12により検出した位置で結合することで、分割前の原稿MSを再現する画像IMGが得られる。   Therefore, each pair of the first line L1 and the second line L2 having different distances D from the line segments Le1T and Le2T shown in FIG. 2 is combined at the position detected by the detection unit 12 by the combining unit 13. Thus, an image IMG that reproduces the original MS before division is obtained.

すなわち、図1に示した読み取り装置10は、原稿MSを切断した切断部Ctが図5(C)に示したように不規則な形状である場合にも、断片P1,P2を読み取って得られた第1画像IMG1と第2画像IMG2とを従来よりも高い精度で結合することができる。つまり、図1に示した読み取り装置10は、原稿MSを2つの断片P1,P2に分割して読み取ることで得られた第1画像IMG1と第2画像IMG2とに基づいて、分割前の原稿MSを従来よりも高い精度で再現する画像IMGを生成することができる。   That is, the reading apparatus 10 shown in FIG. 1 is obtained by reading the fragments P1 and P2 even when the cut portion Ct obtained by cutting the document MS has an irregular shape as shown in FIG. The first image IMG1 and the second image IMG2 can be combined with higher accuracy than in the past. That is, the reading apparatus 10 shown in FIG. 1 reads the original MS before division based on the first image IMG1 and the second image IMG2 obtained by dividing the original MS into two pieces P1 and P2. Can be generated with higher accuracy than in the past.

図4を用いて説明したように、図1に示した読み取り装置10は、図4(A)に示した点Qのように、第2方向d2において同じ位置で示される画素の明度値が第1ラインL1と第2ラインL2とで同等となる箇所を結合に用いる。したがって、図5(A)に示したように、断片P1,P2のそれぞれが斜めに傾いた切断面C1、C2を含む場合でも、第1ラインL1と第2ラインL2との結合は、インクの部分St1,St2を切れ目なく連続させる位置で行われる。   As described with reference to FIG. 4, the reading device 10 illustrated in FIG. 1 has the brightness values of the pixels indicated at the same position in the second direction d2 as the point Q illustrated in FIG. Locations that are equivalent between the first line L1 and the second line L2 are used for coupling. Therefore, as shown in FIG. 5A, even when each of the fragments P1 and P2 includes the obliquely inclined cutting surfaces C1 and C2, the connection between the first line L1 and the second line L2 is This is performed at a position where the portions St1 and St2 are continuously connected.

これにより、図1に示した読み取り装置10は、原稿MSを2つの断片P1,P2に切断した際の切断面が斜めに傾いている場合にも、2つの断片P1,P2の画像を高い精度で結合できる。したがって、図1に示した読み取り装置10は、例えば、オフィスや家庭などでA3判などの大きな原稿をペーパーナイフや手などで分割した場合でも、分割で得られた2つの断片を読み取って得られる画像から元の原稿を再現する画像を生成できる。すなわち、図1に示した読み取り装置10は、精密な切断が可能な設備を持たないオフィスや家庭においても、読み取り部11の読み取り範囲を超える大判の原稿を読み取る用途での利用を可能とできる点でも有用である。   Accordingly, the reading apparatus 10 shown in FIG. 1 can accurately display the images of the two pieces P1 and P2 even when the cut surface when the original MS is cut into the two pieces P1 and P2 is inclined. Can be combined. Therefore, the reading device 10 shown in FIG. 1 can be obtained by reading two pieces obtained by division even when a large original such as A3 size is divided by a paper knife or a hand in an office or home. An image that reproduces the original document can be generated from the image. That is, the reading device 10 shown in FIG. 1 can be used for reading a large document exceeding the reading range of the reading unit 11 even in an office or home that does not have equipment capable of precise cutting. But useful.

なお、検出部12が、第1ラインL1と第2ラインL2とを結合する位置の検出のために各画素について比較する特徴値は、明度値に限らず、読み取り部11によって第1ラインL1と第2ラインL2に含まれる各画素について得られる特徴値であればよい。例えば、検出部12は、画素の色を示す色成分のそれぞれの値や、画素の色を色度空間において示す色度座標などを比較することで、第1ラインL1と第2ラインL2とを結合する位置を検出してもよい。   Note that the feature value that the detection unit 12 compares for each pixel to detect the position where the first line L1 and the second line L2 are combined is not limited to the lightness value, and the first unit L1 and the feature value are compared with each other. Any feature value obtained for each pixel included in the second line L2 may be used. For example, the detection unit 12 compares the first line L1 and the second line L2 by comparing each value of the color component indicating the color of the pixel, chromaticity coordinates indicating the color of the pixel in the chromaticity space, and the like. The binding position may be detected.

また、図1に示した検出部12及び結合部13は、読み取り装置10に搭載されたプロセッサなどの制御部により、プログラムを実行することで実現されてもよい。   Further, the detection unit 12 and the coupling unit 13 illustrated in FIG. 1 may be realized by executing a program by a control unit such as a processor mounted on the reading device 10.

図6は、図1に示した読み取り装置10による読み取り処理の例を示す。図6に示したステップS301〜ステップS306の処理は、図1に示した読み取り装置10の動作を示すとともに、読み取り方法および読み取りプログラムの例を示す。例えば、図6に示す処理は、読み取り装置10に搭載されたプロセッサが読み取りプログラムを実行することで実現される。なお、図6に示す処理は、読み取り装置10に搭載されるハードウェアによって実行されてもよい。すなわち、図6は、読み取り方法及び読み取りプログラムの一実施形態を示す。   FIG. 6 shows an example of reading processing by the reading device 10 shown in FIG. The processing of step S301 to step S306 shown in FIG. 6 shows the operation of the reading device 10 shown in FIG. 1, and shows an example of a reading method and a reading program. For example, the processing illustrated in FIG. 6 is realized by a processor installed in the reading device 10 executing a reading program. Note that the processing illustrated in FIG. 6 may be executed by hardware mounted on the reading device 10. That is, FIG. 6 shows an embodiment of a reading method and a reading program.

ステップS301において、図1に示した読み取り部11は、原稿MSを切断することで得られた断片P1,P2をそれぞれ読み取ることで、第1画像IMG1と第2画像IMG2とを生成する。   In step S301, the reading unit 11 illustrated in FIG. 1 generates the first image IMG1 and the second image IMG2 by reading the fragments P1 and P2 obtained by cutting the document MS, respectively.

ステップS302において、読み取り部11は、例えば、図2を用いて説明したようにして、第1画像IMG1及び第2画像IMG2に含まれる情報に基づいて、第1画像IMG1と第2画像IMG2との相対位置を決定する。   In step S302, for example, as described with reference to FIG. 2, the reading unit 11 determines whether the first image IMG1 and the second image IMG2 are based on the information included in the first image IMG1 and the second image IMG2. Determine the relative position.

ステップS303において、検出部12は、得られた相対位置を示す情報に基づいて、第1画像IMG1と第2画像IMG2とのそれぞれから第1方向d1において同じ位置で示される第1ラインL1及び第2ラインL2を取得する。検出部12は、例えば、図2に示した線分Le1T,Le2Tを基準とする第1方向d1の距離Dを画素単位でずらしながら、断片P1,P2の画像に含まれる各ラインを第1ラインL1及び第2ラインL2として取得することが望ましい。   In step S303, the detection unit 12 determines the first line L1 and the first line L1 indicated at the same position in the first direction d1 from the first image IMG1 and the second image IMG2 based on the obtained information indicating the relative position. Two lines L2 are acquired. For example, the detecting unit 12 shifts each line included in the image of the fragments P1 and P2 to the first line while shifting the distance D in the first direction d1 with reference to the line segments Le1T and Le2T illustrated in FIG. It is desirable to acquire as L1 and the 2nd line L2.

ステップS304において、検出部12は、取得した第1ラインL1及び第2ラインL2に含まれる画素のそれぞれの特徴値を互いに比較することで、第1ラインL1の少なくとも一部と第2ラインL2の少なくとも一部とを結合する位置を検出する。例えば、検出部12は、図4(A)に示したように、相対位置に基づいて第1ラインL1と第2ラインL2とを配置したことで互いに重なり合わせられた範囲Rに含まれる各画素の特徴値を互いに比較する。また、検出部12は、例えば、比較結果により、特徴値の差の絶対値が、他の特徴値の差の絶対値よりも小さくない画素の位置として、第1ラインL1と第2ラインL2とを結合する位置を検出する。   In step S304, the detection unit 12 compares the acquired feature values of the pixels included in the first line L1 and the second line L2 with each other, thereby at least part of the first line L1 and the second line L2. A position where at least a part is combined is detected. For example, as illustrated in FIG. 4A, the detection unit 12 includes each pixel included in a range R that overlaps each other by arranging the first line L1 and the second line L2 based on the relative position. The feature values of are compared with each other. For example, the detection unit 12 may detect the first line L1 and the second line L2 as pixel positions where the absolute value of the difference between the feature values is not smaller than the absolute value of the difference between the other feature values based on the comparison result. Detect the position to join.

ステップS305において、結合部13は、検出部12によって検出された位置で第1ラインL1と第2ラインL2とを結合する。これにより、結合部13は、図1に示した断片P1,P2に分割される前の原稿MSにおいて、第1ラインL1及び第2ラインL2と同じ第1方向d1の位置で示される帯状の領域に対応する画像を生成する
ステップS306において、読み取り装置10に搭載されたプロセッサは、第1画像IMG1及び第2画像IMG2に含まれる断片P1,P2の画像の部分に含まれる全てのラインを結合したか否かを判定する。
In step S305, the combining unit 13 combines the first line L1 and the second line L2 at the position detected by the detection unit 12. As a result, the connecting portion 13 is a band-shaped region indicated at the same position in the first direction d1 as the first line L1 and the second line L2 in the document MS before being divided into the fragments P1 and P2 shown in FIG. In step S306, the processor mounted on the reading device 10 combines all lines included in the image portions of the fragments P1 and P2 included in the first image IMG1 and the second image IMG2. It is determined whether or not.

まだ結合されていないラインの画像が残っている場合に(ステップS306の否定判定(NO))、読み取り装置10のプロセッサは、ステップS303の処理に戻り、検出部12に、新たな第1ラインL1及び第2ラインL2を取得させる。   If there is still an image of a line that has not yet been combined (No at Step S306 (NO)), the processor of the reading apparatus 10 returns to the process at Step S303, and the detection unit 12 receives a new first line L1. And the second line L2 is acquired.

ステップS303〜ステップS305の処理を繰り返して実行することにより、断片P1,P2の画像に含まれる全てのラインが結合された場合に(ステップS306の肯定判定(YES))、読み取り装置10は、読み取り処理を終了する。   When all the lines included in the images of the fragments P1 and P2 are combined by repeating and executing the processing of step S303 to step S305 (Yes determination in step S306 (YES)), the reading device 10 reads The process ends.

以上に説明した読み取り方法を読み取り装置10が実行する過程で、第1画像IMG1及び第2画像IMG2に含まれる断片P1,P2の画像の各ラインに対応する第1ラインL1,第2ラインL2が結合される。これにより、読み取り装置10は、分割前の原稿MSに相当する画像IMGを生成することができる。   In the process in which the reading apparatus 10 executes the reading method described above, the first line L1 and the second line L2 corresponding to the lines of the images of the fragments P1 and P2 included in the first image IMG1 and the second image IMG2 are obtained. Combined. Thereby, the reading apparatus 10 can generate an image IMG corresponding to the original MS before the division.

ところで、図1に示した読み取り部11は、断片P1,P2の背景を黒色より白色に近い色の領域として読み取る。このため、断片P1と断片P2とが原稿MSの余白部分で分割された場合などに、第1ラインと第2ラインとが重なり合う範囲に含まれるほぼ全ての画素において、特徴値の差の絶対値が零に近い値となる場合がある。そして、このような場合には、図1に示した検出部12により、第1ラインと第2ラインとを結合する箇所を1箇所に特定することが困難になる。   By the way, the reading unit 11 shown in FIG. 1 reads the background of the fragments P1 and P2 as a color region closer to white than black. For this reason, when the fragment P1 and the fragment P2 are divided at the margin portion of the document MS, the absolute value of the difference between the feature values in almost all the pixels included in the overlapping range of the first line and the second line. May be close to zero. In such a case, it is difficult for the detection unit 12 illustrated in FIG. 1 to specify the location where the first line and the second line are combined as one location.

しかしながら、断片P1と断片P2とが原稿MSの余白部分で分割された場合に、第1ラインと第2ラインとを結合して得られたラインに背景の色を示す部分が含まれたとしても、余白部分と背景の色とはほぼ同等であるので、画質はほとんど劣化しない。   However, even when the fragment P1 and the fragment P2 are divided at the margin of the original MS, even if the line obtained by combining the first line and the second line includes a portion indicating the background color. Since the margin portion and the background color are almost the same, the image quality hardly deteriorates.

すなわち、図1に示した読み取り装置10は、断片P1と断片P2とが原稿MSの余白部分で分割された場合でも、検出部12によって検出された位置で第1画像IMG1と第2画像IMG2とを結合することで、高い画質を持つ画像IMGを生成することができる。   That is, the reading apparatus 10 shown in FIG. 1 has the first image IMG1 and the second image IMG2 at the position detected by the detection unit 12 even when the fragment P1 and the fragment P2 are divided at the margin of the document MS. Can be combined to generate an image IMG with high image quality.

一方、検出部12は、第1ラインL1と第2ラインL2とからそれぞれ断片P1,P2の切断部を示すエッジの位置を推定し、推定した位置に基づいて、第1ラインL1と第2ラインL2とを結合する位置の検出精度を向上することもできる。   On the other hand, the detection unit 12 estimates the positions of the edges indicating the cut portions of the fragments P1 and P2 from the first line L1 and the second line L2, respectively, and based on the estimated positions, the first line L1 and the second line It is also possible to improve the detection accuracy of the position where L2 is coupled.

図7は、読み取り装置10の別実施形態を示す。なお、図7に示した構成要素のうち、図1に示した構成要素と同等のものについては、同一の符号を付して示し、その説明は省略する。なお、図7に示した第1方向d1は、読み取り部11による読み取りの際に、読み取りの対象となる原稿が搬送される方向を示し、第2方向d2は、図1に示した読み取り部11に含まれるイメージセンサ111において画素111aが並んでいる方向を示す。なお、第1方向d1は、断片P1,P2が読み取り部11によって読み取られる際に、断片P1,P2を切断した箇所である切断部の方向が概ね一致する方向でもある。   FIG. 7 shows another embodiment of the reading device 10. 7 that are the same as those shown in FIG. 1 are given the same reference numerals, and descriptions thereof are omitted. A first direction d1 shown in FIG. 7 indicates a direction in which a document to be read is conveyed when reading by the reading unit 11, and a second direction d2 indicates the reading unit 11 shown in FIG. Indicates the direction in which the pixels 111 a are arranged in the image sensor 111 included in the image sensor 111. Note that the first direction d1 is also a direction in which the directions of the cutting portions, which are portions where the fragments P1 and P2 are cut, when the fragments P1 and P2 are read by the reading unit 11 are substantially the same.

図7に示した検出部12は、評価部121と、推定部122と、選択部123とを含んでいる。   The detection unit 12 illustrated in FIG. 7 includes an evaluation unit 121, an estimation unit 122, and a selection unit 123.

評価部121は、図2を用いて説明したようにして取得した第1ラインL1及び第2ラインL2において、断片P1、P2を切断した箇所である切断部を含む、第2方向d2の所定の範囲に含まれる複数の画素である抽出画素の特徴値を互いに比較する。第1ラインL1および第2ラインL2は、図2に示した第1画像IMG1と第2画像IMG2とのそれぞれに含まれる、第2方向d2に並ぶ所定数の画素をそれぞれ含む複数のラインのうち、第1方向d1の位置が同じラインの一例である。   The evaluation unit 121 includes a cutting unit that is a portion of the first line L1 and the second line L2 acquired as described with reference to FIG. The feature values of the extracted pixels that are a plurality of pixels included in the range are compared with each other. The first line L1 and the second line L2 are included in the first image IMG1 and the second image IMG2 illustrated in FIG. 2 and are included in a plurality of lines each including a predetermined number of pixels arranged in the second direction d2. , Is an example of a line having the same position in the first direction d1.

また、評価部121は、図4に示したように、読み取り部11によって推定された相対位置に基づいて、第1ラインL1と第2ラインL2とを配置することで重ね合わせられた範囲Rに含まれる各画素を抽出画素とすることが望ましい。更に、評価部121は、相対位置に基づいて第1ラインL1と第2ラインL2とが重ね合わせられた範囲Rにおいて互いに同じ位置で示される第1ラインL1の抽出画素と第2ラインL2の抽出画素について、互いの特徴値を比較することが望ましい。また、評価部121は、比較結果に基づいて、抽出画素のそれぞれの位置が、第2方向d2における切断部の位置である可能性の高さを示す評価値をそれぞれ求める。   Further, as shown in FIG. 4, the evaluation unit 121 arranges the first line L1 and the second line L2 on the overlapped range R based on the relative position estimated by the reading unit 11. It is desirable that each pixel included is an extraction pixel. Further, the evaluation unit 121 extracts the extraction pixel of the first line L1 and the extraction of the second line L2 that are indicated at the same position in the range R in which the first line L1 and the second line L2 are overlapped based on the relative position. It is desirable to compare the feature values of the pixels. Further, the evaluation unit 121 obtains an evaluation value indicating the high possibility that each position of the extracted pixel is the position of the cut part in the second direction d2 based on the comparison result.

評価部121は、例えば、図4(A)に示した範囲Rにおいて互いに同じ位置で示される第1ラインL1の抽出画素の明度値と第2ラインL2の抽出画素の明度値との類似性の高さを、評価値として求めてもよい。例えば、評価部121は、範囲Rにおいて互いに同じ位置で示される第1ラインL1の抽出画素の明度値と第2ラインL2の抽出画素の明度値との差の絶対値を求め、求めた値を、値が小さいほど可能性が高いことを示す評価値としてもよい。   For example, the evaluation unit 121 determines the similarity between the lightness value of the extracted pixels of the first line L1 and the lightness value of the extracted pixels of the second line L2 shown at the same position in the range R shown in FIG. The height may be obtained as an evaluation value. For example, the evaluation unit 121 obtains the absolute value of the difference between the lightness value of the extraction pixel of the first line L1 and the lightness value of the extraction pixel of the second line L2 indicated at the same position in the range R, and calculates the obtained value. It is good also as an evaluation value which shows that possibility is so high that a value is small.

推定部122は、第1画像IMG1から取得した第1ラインL1に含まれる各画素の特徴値に基づいて、第1ラインL1において切断部を示す第1位置を推定する。同様に、推定部122は、第1画像IMG1から取得した第2ラインL2に含まれる各画素の特徴値に基づいて、第2ラインL2において切断部を示す第2位置を推定する。   The estimation unit 122 estimates the first position indicating the cut portion in the first line L1 based on the feature value of each pixel included in the first line L1 acquired from the first image IMG1. Similarly, the estimation unit 122 estimates the second position indicating the cut portion in the second line L2 based on the feature value of each pixel included in the second line L2 acquired from the first image IMG1.

推定部122は、例えば、第1ラインL1の切断部側の端に相当する画素から順に、明度値を背景の色を示す明度値Bsと比較し、明度値Bsと閾値以上に異なる画素として最初に発見した画素の位置を第1位置とする。同様に、推定部122は、第2ラインL2の切断部側の端に相当する画素から順に、明度値を背景の色を示す特徴値Bsと比較し、明度値Bsと閾値以上に異なる画素として最初に発見した画素の位置を第2位置とする。   For example, the estimation unit 122 compares the lightness value with the lightness value Bs indicating the background color in order from the pixel corresponding to the end of the first line L1 on the cut portion side, and first sets the lightness value Bs as a pixel different from the threshold value. Let the position of the pixel found in step 1 be the first position. Similarly, the estimation unit 122 compares the brightness value with the feature value Bs indicating the background color in order from the pixel corresponding to the end of the second line L2 on the cut portion side, and sets the brightness value Bs as a pixel different from the threshold value. The position of the pixel found first is defined as the second position.

また、選択部123は、評価部121から、図4(A)に示した範囲Rに含まれる各抽出画素について評価部121によって算出された評価値を受ける。また、選択部123は、範囲Rに含まれる複数の抽出画素の中に、評価部121により所定値以上に高い可能性を示す評価値が得られた抽出画素である候補画素が複数含まれるか否かを判定する。また、選択部123は、候補画素が複数個含まれると判定した場合に、複数の候補画素の中で、他の候補画素よりも第1位置と第2位置との中点に近い候補画素の位置を、第1ラインL1と第2ラインL2とを結合する第2方向d2の位置として選択する。   Further, the selection unit 123 receives an evaluation value calculated by the evaluation unit 121 for each extracted pixel included in the range R illustrated in FIG. Whether the selection unit 123 includes a plurality of extraction pixels included in the range R as a plurality of candidate pixels that are extraction pixels from which an evaluation value indicating a possibility of being higher than a predetermined value is obtained by the evaluation unit 121. Determine whether or not. In addition, when the selection unit 123 determines that a plurality of candidate pixels are included, the selection unit 123 selects candidate pixels closer to the midpoint between the first position and the second position than the other candidate pixels. The position is selected as the position in the second direction d2 that joins the first line L1 and the second line L2.

そして、選択部123は、選択した候補画素の位置を、第1ラインL1と第2ラインL2と結合する位置を示す検出結果として結合部13に渡す。   Then, the selection unit 123 passes the position of the selected candidate pixel to the combining unit 13 as a detection result indicating the position where the first line L1 and the second line L2 are combined.

図8は、図7に示した検出部12による検出例を示す。なお、図8に示した要素のうち、図4に示した要素と同等のものについては、同一の符号を付して示し、その説明は省略する。   FIG. 8 shows an example of detection by the detection unit 12 shown in FIG. Of the elements shown in FIG. 8, the same elements as those shown in FIG. 4 are designated by the same reference numerals, and the description thereof is omitted.

図8(A)は、図7に示した検出部12が取得する第1ラインL1および第2ラインL2に含まれる各画素の明度値の例をそれぞれ折れ線G1,G2で示す。   FIG. 8A illustrates examples of brightness values of the pixels included in the first line L1 and the second line L2 acquired by the detection unit 12 illustrated in FIG. 7 by polygonal lines G1 and G2, respectively.

また、図8(B)は、図7に示した選択部123によって選択された位置で、図8(A)に示した第1ラインL1と第2ラインL2とを結合することで得られる画像に含まれる各画素の明度値を折れ線G3で示す。   8B shows an image obtained by combining the first line L1 and the second line L2 shown in FIG. 8A at the position selected by the selection unit 123 shown in FIG. The brightness value of each pixel included in is indicated by a polygonal line G3.

図8(A)の例では、第1ラインL1において範囲Rに含まれる抽出画素のうち、それぞれ丸で囲んで示した点Q1,Q2,Q3で示す抽出画素の明度値が、第2ラインL2の対応する抽出画素の明度値と一致している。また、図8(A)の例では、3つの点Q1,Q2,Q3で示す候補画素のうち、候補画素Q1は、図7に示した推定部122によって推定された第1位置Xe1よりも横軸Xの原点に近い位置にある。一方、候補画素Q3は、第2位置Xe2よりも横軸Xの原点から遠い位置にある。これに対して、図8(A)に示した候補画素Q2は、第1位置Xe1と第2位置Xe2とで示される範囲の内側にあり、他の2つの候補画素Q1,Q3に比べて、第1位置Xe1と第2位置Xe2との中点Xcに近い位置にある。   In the example of FIG. 8A, among the extracted pixels included in the range R in the first line L1, the brightness values of the extracted pixels indicated by points Q1, Q2, and Q3 surrounded by circles are the second line L2. Corresponds to the brightness value of the corresponding extracted pixel. In the example of FIG. 8A, among the candidate pixels indicated by the three points Q1, Q2, and Q3, the candidate pixel Q1 is lateral to the first position Xe1 estimated by the estimation unit 122 shown in FIG. It is close to the origin of axis X. On the other hand, the candidate pixel Q3 is located farther from the origin of the horizontal axis X than the second position Xe2. On the other hand, the candidate pixel Q2 shown in FIG. 8A is inside the range indicated by the first position Xe1 and the second position Xe2, and compared to the other two candidate pixels Q1 and Q3, The position is close to the midpoint Xc between the first position Xe1 and the second position Xe2.

ここで、図7に示した推定部122により、第1ラインL1、第2ラインL2に基づいて推定された第1位置Xe1及び第2位置Xe2に含まれる推定誤差が大きい場合でも、切断部は第1位置Xe1と第2位置Xe2の中間に含まれる可能性が高い。したがって、上述の中点Xcに最も近い候補画素Q2は、第1位置Xe1および第2位置Xe2との位置関係の観点でも、第1ラインL1と第2ラインL2とを結合する箇所としての尤度が高い。つまり、選択部123により、中点Xcに最も近い候補画素Q2の位置を選択することで、他の候補画素Q1,Q3の位置に比べて、第1位置Xe1および第2位置Xe2との位置関係の観点でも高い尤度を示す位置を検出結果として結合部13に渡すことができる。   Here, even when the estimation error included in the first position Xe1 and the second position Xe2 estimated based on the first line L1 and the second line L2 by the estimation unit 122 illustrated in FIG. The possibility of being included between the first position Xe1 and the second position Xe2 is high. Therefore, the likelihood of the candidate pixel Q2 closest to the above-described midpoint Xc as a location where the first line L1 and the second line L2 are combined also from the viewpoint of the positional relationship between the first position Xe1 and the second position Xe2. Is expensive. That is, by selecting the position of the candidate pixel Q2 closest to the midpoint Xc by the selection unit 123, the positional relationship between the first position Xe1 and the second position Xe2 as compared to the positions of the other candidate pixels Q1 and Q3. From this point of view, a position showing a high likelihood can be passed to the combining unit 13 as a detection result.

そして、結合部13により、図8(A)に示した第1ラインL1の一部である区間L1’と、第2ラインL2の一部である区間L2’とを結合することで、図8(B)に折れ線G3で示したように、明度値の変化が滑らかに連続する画像を生成することができる。なお、図8(B)において、区間L1’は、第1ラインL1のうち、横軸Xの原点に近い方の第1ラインL1の端から候補画素Q2までの部分である。また、区間L2’は、第2ラインL2のうち、候補画素Q2から横軸Xの原点から遠い端までの部分である。   Then, by combining the section L1 ′ that is a part of the first line L1 and the section L2 ′ that is a part of the second line L2 shown in FIG. As indicated by the broken line G3 in (B), it is possible to generate an image in which the brightness value changes smoothly and continuously. In FIG. 8B, a section L1 'is a portion from the end of the first line L1 closer to the origin of the horizontal axis X to the candidate pixel Q2 in the first line L1. The section L2 'is a portion of the second line L2 from the candidate pixel Q2 to the end far from the origin of the horizontal axis X.

なお、図7に示した評価部121によって算出する評価値は、取得した第1ラインL1及び第2ラインL2において、図8(A)に示した範囲Rに含まれる抽出画素の特徴値の類似性の高さを示す値に限られない。   Note that the evaluation values calculated by the evaluation unit 121 illustrated in FIG. 7 are similar to the feature values of the extracted pixels included in the range R illustrated in FIG. 8A in the acquired first line L1 and second line L2. It is not limited to a value indicating high sex.

例えば、評価部121は、範囲Rに含まれる第1ラインL1の抽出画素の特徴値と第2ラインL2の抽出画素の特徴値の双方が背景の色を示す特徴値と異なっている度合いを、第2方向d2における切断部の位置である可能性の高さを示す評価値として求めてもよい。   For example, the evaluation unit 121 determines the degree to which both the feature value of the extracted pixel of the first line L1 and the feature value of the extracted pixel of the second line L2 included in the range R are different from the feature value indicating the background color. You may obtain | require as an evaluation value which shows the high possibility of being the position of the cutting part in the 2nd direction d2.

図9は、読み取り装置10の別実施形態を示す。なお、図9に示した構成要素のうち、図1に示した構成要素と同等のものについては、同一の符号を付して示し、その説明は省略する。   FIG. 9 shows another embodiment of the reading device 10. 9 that are the same as those shown in FIG. 1 are given the same reference numerals, and descriptions thereof are omitted.

図9に示した検出部12は、評価部121と、選択部123とを含む。また、図9に示した読み取り装置10は、読み取り部11と検出部12と結合部13とに加えて、推定部14と、設定部15とを含んでいる。   The detection unit 12 illustrated in FIG. 9 includes an evaluation unit 121 and a selection unit 123. Further, the reading device 10 illustrated in FIG. 9 includes an estimation unit 14 and a setting unit 15 in addition to the reading unit 11, the detection unit 12, and the coupling unit 13.

推定部14は、読み取り部11によって生成された第1画像IMG1及び第2画像IMG2から、読み取り部11から検出部12に渡される第1ラインL1及び第2ラインL2と同じ第1ラインL1及び第2ラインL2を取得する。また、推定部14は、図7に示した推定部122と同様に、取得した第1ラインL1及び第2ラインL2において、切断部の位置を示す第1位置Xe1及び第2位置Xe2をそれぞれ推定する。   The estimation unit 14 uses the first line L1 and the second line L2 that are the same as the first line L1 and the second line L2 passed from the reading unit 11 to the detection unit 12 from the first image IMG1 and the second image IMG2 generated by the reading unit 11. Two lines L2 are acquired. Moreover, the estimation part 14 estimates the 1st position Xe1 and the 2nd position Xe2 which respectively show the position of a cutting part in the acquired 1st line L1 and 2nd line L2, similarly to the estimation part 122 shown in FIG. To do.

設定部15は、推定部14によって推定された第1位置Xe1及び第2位置Xe2に基づいて、評価部121により評価値を算出する抽出画素が含まれる第2方向d2における範囲である注目範囲を設定する。設定部15は、例えば、読み取り部11によって推定された相対位置に基づいて、第1ラインL1と第2ラインL2とを配置することで重ね合わせられた範囲Rのうち、第1位置Xe1と第2位置Xe2とを含む範囲である注目範囲を設定することが望ましい。設定部15は、設定した注目範囲を示す情報を生成し、生成した情報を評価部121に渡す。   Based on the first position Xe1 and the second position Xe2 estimated by the estimation unit 14, the setting unit 15 selects an attention range that is a range in the second direction d2 including the extraction pixel for which the evaluation value is calculated by the evaluation unit 121. Set. The setting unit 15, for example, based on the relative position estimated by the reading unit 11, the first position Xe1 and the first position in the range R overlapped by arranging the first line L1 and the second line L2. It is desirable to set an attention range that is a range including two positions Xe2. The setting unit 15 generates information indicating the set attention range, and passes the generated information to the evaluation unit 121.

また、設定部15は、図2を用いて説明したようにして断片P1、P2の位置関係を再現する位置が推定された際の推定誤差を示す情報を読み取り部11から受け、受けた情報で示される推定誤差が大きいほど広い幅を持つ注目範囲を設定してもよい。例えば、設定部15は、推定部14から受けた第1位置Xe1と第2位置Xe2との中点Xcを中心とし、第1位置Xe1と第2位置Xe2との間の距離に推定誤差に対応する所定値を加えた幅を持つ範囲として注目範囲を設定してもよい。なお、設定部15は、想定される推定誤差の大きさを区分した複数の段階ごとに、注目範囲の設定の際に加える所定値をそれぞれ設定しておいてもよい。   Further, the setting unit 15 receives information indicating an estimation error when the position that reproduces the positional relationship between the fragments P1 and P2 is estimated from the reading unit 11 as described with reference to FIG. An attention range having a wider width may be set as the estimated error shown is larger. For example, the setting unit 15 corresponds to the estimation error in the distance between the first position Xe1 and the second position Xe2 with the center point Xc between the first position Xe1 and the second position Xe2 received from the estimation unit 14 as the center. The attention range may be set as a range having a width obtained by adding a predetermined value. Note that the setting unit 15 may set a predetermined value to be added when setting the attention range for each of a plurality of stages in which the size of the estimated estimation error is divided.

評価部121は、設定部15から渡された情報で示される注目範囲において、互いに同じ位置で示される第1ラインL1の抽出画素と第2ラインL2の抽出画素との双方の特徴値が、背景の色を示す明度値Bsと異なっている度合いを示す値を算出する。また、評価部121は、各抽出画素について算出した度合いを示す値を、各抽出画素の位置が切断部の位置である可能性の高さを示す評価値として出力する。   In the range of interest indicated by the information passed from the setting unit 15, the evaluation unit 121 determines that the feature values of both the extracted pixels of the first line L1 and the extracted pixels of the second line L2 that are indicated at the same position are the background. A value indicating the degree of difference from the lightness value Bs indicating the color of is calculated. Further, the evaluation unit 121 outputs a value indicating the degree calculated for each extraction pixel as an evaluation value indicating the high possibility that the position of each extraction pixel is the position of the cutting unit.

評価部121は、例えば、読み取り部11で生成される第1画像IMG1及び第2画像IMG2に断片P1,P2の背景として含まれる領域の明るさを示す明度値Bsなどの特徴値を予め取得し、内部に保持しておくことが望ましい。また、評価部121は、例えば、注目範囲において、互いに同じ位置で示される第1ラインL1の抽出画素の明度値と第2ラインL2の抽出画素の明度値とのそれぞれと背景の明るさを示す明度値Bsとの差の絶対値の和を評価値として求める。   For example, the evaluation unit 121 obtains in advance a feature value such as a brightness value Bs indicating the brightness of an area included as the background of the fragments P1 and P2 in the first image IMG1 and the second image IMG2 generated by the reading unit 11. It is desirable to keep it inside. In addition, for example, the evaluation unit 121 indicates the brightness of the background and the brightness value of the extracted pixel of the first line L1 and the brightness value of the extracted pixel of the second line L2 that are indicated at the same position in the attention range. The sum of absolute values of differences from the brightness value Bs is obtained as an evaluation value.

図10は、図9に示した評価部121によって算出される評価値の例を示す。なお、図10に示した要素のうち、図4及び図8に示した要素と同等のものについては、同一の符号を付して示し、その説明は省略する。   FIG. 10 shows an example of evaluation values calculated by the evaluation unit 121 shown in FIG. Note that among the elements shown in FIG. 10, elements equivalent to those shown in FIGS. 4 and 8 are denoted by the same reference numerals and description thereof is omitted.

図10(A)は、図9に示した検出部12が取得する第1ラインL1および第2ラインL2に含まれる各画素の明度値の例をそれぞれ折れ線G1,G2で示す。   FIG. 10A shows examples of brightness values of the pixels included in the first line L1 and the second line L2 acquired by the detection unit 12 shown in FIG. 9 by polygonal lines G1 and G2, respectively.

図10(A)に示した注目範囲Rsは、図9に示した推定部14によって推定された第1位置Xe1と第2位値Xe2との中点を中心とし、第1位置Xe1と第2位置Xe2との距離分の幅を持つ範囲の両側に、所定値αで示される幅を持つ範囲を加えた範囲である。   The attention range Rs shown in FIG. 10A is centered on the midpoint between the first position Xe1 and the second value Xe2 estimated by the estimation unit 14 shown in FIG. This is a range obtained by adding a range having a width indicated by a predetermined value α to both sides of a range having a width corresponding to the position Xe2.

また、図10(B)は、注目範囲Rsに含まれる各抽出画素の位置について、評価部121によって算出された評価値の例を示す。なお、図10(B)において、縦軸Hは、評価値の大きさを示す。   FIG. 10B shows an example of evaluation values calculated by the evaluation unit 121 for the positions of the extracted pixels included in the attention range Rs. In FIG. 10B, the vertical axis H indicates the magnitude of the evaluation value.

図10(B)の例では、横軸Xにおいて座標Xpで示される抽出画素で、第1ラインL1と第2ラインL2との双方の画素の明度値と明度値Bsとの差が他の注目画素に比べて大きくなることから、抽出画素Xpについて算出した評価値が他の評価値よりも大きい。   In the example of FIG. 10B, in the extracted pixel indicated by the coordinate Xp on the horizontal axis X, the difference between the lightness value and the lightness value Bs of both the first line L1 and the second line L2 is another attention. Since it is larger than the pixel, the evaluation value calculated for the extracted pixel Xp is larger than the other evaluation values.

ここで、図4(A)及び図5(A)から分かるように、第1ラインL1と第2ラインL2とが重なり合う範囲Rでは、第1ラインL1において断片P1の画像を示す部分は、第2ラインL2において背景を示す部分に対応付けられている。同様に、第1ラインL1において背景を示す部分は、第2ラインL2において断片P2を示す部分に対応付けられる。そして、第1ラインL1において断片P1の画像を示す部分と背景を示す部分との境界の位置及び第2ラインL2において断片P2の画像を示す部分と背景を示す部分との境界の位置は、原稿MSを分割した切断部を示す。つまり、図9に示した評価部121は、原稿MSを分割した切断部が、第1ラインL1と第2ラインL2との双方において、背景とは異なる特徴値を持つ画素となることに着目し、各抽出画素の位置が切断部の位置である可能性の高さを評価する。   Here, as can be seen from FIGS. 4A and 5A, in the range R where the first line L1 and the second line L2 overlap, the portion showing the image of the fragment P1 in the first line L1 is The two lines L2 are associated with portions indicating the background. Similarly, the portion indicating the background in the first line L1 is associated with the portion indicating the fragment P2 in the second line L2. The position of the boundary between the portion indicating the image of the fragment P1 and the portion indicating the background in the first line L1 and the position of the boundary between the portion indicating the image of the fragment P2 and the portion indicating the background in the second line L2 The cut part which divided | segmented MS is shown. That is, the evaluation unit 121 shown in FIG. 9 pays attention to that the cutting unit obtained by dividing the document MS becomes a pixel having a characteristic value different from the background in both the first line L1 and the second line L2. The height of the possibility that the position of each extraction pixel is the position of the cut portion is evaluated.

また、評価部121は、注目範囲に含まれる各抽出画素の位置について求めた評価値を、図9に示した選択部123に渡す。   In addition, the evaluation unit 121 passes the evaluation value obtained for the position of each extracted pixel included in the attention range to the selection unit 123 illustrated in FIG.

選択部123は、注目範囲に含まれる各抽出画素について評価部121によって求められた評価値を互いに比較する。また、選択部123は、比較結果により、他の抽出画素よりも切断部である可能性が高いことを示す評価値が得られた抽出画素の位置を、第2方向d2において第1ラインL1と第2ラインL2とを結合する位置として選択する。   The selection unit 123 compares the evaluation values obtained by the evaluation unit 121 for each extracted pixel included in the attention range. Further, the selection unit 123 determines the position of the extracted pixel from which the evaluation value indicating that there is a higher possibility of being a cut part than the other extracted pixels as a result of the comparison as the first line L1 in the second direction d2. The position to be coupled with the second line L2 is selected.

図9に示した評価部121によって求められる評価値は、第1ラインL1と第2ラインL2との双方において、各画素が背景を示す部分に含まれていない可能性の高さを示している。   The evaluation value obtained by the evaluation unit 121 illustrated in FIG. 9 indicates the high possibility that each pixel is not included in the portion indicating the background in both the first line L1 and the second line L2. .

したがって、上述の評価値が他の画素よりも大きくなる画素の位置で第1ラインL1と第2ラインL2とを結合すれば、他の画素の位置で結合した場合に比べて、結合後の画像に背景を示す部分が残っている可能性を小さくすることができる。すなわち、図9に示した評価部121で得られた評価値に基づけば、結合後の画像における背景を示す部分を小さくするという観点において、他の位置よりも高い尤度を示す位置を検出することができる。   Therefore, if the first line L1 and the second line L2 are combined at the pixel position where the above-described evaluation value is larger than that of the other pixels, the combined image is compared with the case of combining at the position of the other pixels. It is possible to reduce the possibility that the background part is left. That is, based on the evaluation value obtained by the evaluation unit 121 shown in FIG. 9, a position having a higher likelihood than other positions is detected from the viewpoint of reducing the portion indicating the background in the combined image. be able to.

なお、図10(B)の例では、設定部15により、上述の中点Xcを中心とし、第1位置Xe1と第2位置Xe2との距離と、第1位置Xe1,第2位置Xe2の推定誤差に対応する所定の幅αを加えた範囲Rsが設定された場合を示した。   In the example of FIG. 10B, the setting unit 15 estimates the distance between the first position Xe1 and the second position Xe2 and the first position Xe1 and the second position Xe2 with the center point Xc described above as the center. The case where the range Rs to which the predetermined width α corresponding to the error is added is set is shown.

また、図9に示した設定部15により、相対位置の推定誤差を考慮した注目範囲Rsを設定することにより、評価部121は、第1位置Xe1,第2位置Xe2で示される範囲よりも広い範囲に含まれる抽出画素について評価値を求めることになる。これにより、図9に示した検出部12は、相対位置の推定誤差が大きい場合でも、結合後の画像において背景を示す部分が可能な限り小さくなる位置を、第1ラインL1と第2ラインL2とを結合する位置として検出することができる。   Further, by setting the attention range Rs in consideration of the relative position estimation error by the setting unit 15 illustrated in FIG. 9, the evaluation unit 121 is wider than the range indicated by the first position Xe1 and the second position Xe2. An evaluation value is obtained for the extracted pixels included in the range. Thereby, even when the estimation error of the relative position is large, the detection unit 12 illustrated in FIG. 9 sets the position where the portion indicating the background becomes as small as possible in the combined image as the first line L1 and the second line L2. And can be detected as a position where they are combined.

以上に説明した本件開示の読み取り装置10は、例えば、イメージスキャナやスキャナ機能と印刷機能との双方を含む複合機などの装置に搭載されたプロセッサやメモリなどのハードウェアを用いて実現することができる。   The reading device 10 of the present disclosure described above can be realized using hardware such as an image scanner or a processor or a memory mounted on a device such as a multifunction peripheral including both a scanner function and a printing function. it can.

図11は、読み取り装置10のハードウェア構成の一例を示す。なお、図11に示した構成要素のうち、図1に示した構成要素と同等のものについては、同一の符号を付して示し、その説明は省略する。   FIG. 11 shows an example of a hardware configuration of the reading device 10. 11 that are the same as those shown in FIG. 1 are given the same reference numerals, and descriptions thereof are omitted.

イメージスキャナ20は、プロセッサ21と、メモリ22と、ハードディスク装置23と、表示制御部24と、表示部25と、入力装置26と、光学ドライブ装置27と、読み取り部11とを含んでいる。図11に示したプロセッサ21と、メモリ22と、ハードディスク装置23と、表示制御部24と、入力装置26と、光学ドライブ装置27と、読み取り部11とは、バスを介して互いに接続されている。   The image scanner 20 includes a processor 21, a memory 22, a hard disk device 23, a display control unit 24, a display unit 25, an input device 26, an optical drive device 27, and a reading unit 11. The processor 21, the memory 22, the hard disk device 23, the display control unit 24, the input device 26, the optical drive device 27, and the reading unit 11 shown in FIG. 11 are connected to each other via a bus. .

また、プロセッサ21と、メモリ22と、ハードディスク装置23と、読み取り部11とは、読み取り装置10に含まれている。   Further, the processor 21, the memory 22, the hard disk device 23, and the reading unit 11 are included in the reading device 10.

図11に示した読み取り部11は、イメージセンサ111とともに画像生成部112を含んでいる。画像生成部112は、イメージセンサ111が断片P1,P2をそれぞれ読み取ることで取得した情報から、断片P1,P2の画像をそれぞれ含む第1画像IMG1及び第2画像IMG2を生成する。また、画像生成部112は、生成した第1画像IMG1及び第2画像IMG2を、バスを介してメモリ22あるいはハードディスク装置23に送ることで、第1画像IMG1及び第2画像IMG2をメモリ22あるいはハードディスク装置23に格納させる。   The reading unit 11 illustrated in FIG. 11 includes an image generation unit 112 along with the image sensor 111. The image generation unit 112 generates a first image IMG1 and a second image IMG2 including images of the fragments P1 and P2 from information acquired by the image sensor 111 reading the fragments P1 and P2, respectively. Further, the image generation unit 112 sends the generated first image IMG1 and second image IMG2 to the memory 22 or the hard disk device 23 via the bus, so that the first image IMG1 and the second image IMG2 are stored in the memory 22 or the hard disk. It is stored in the device 23.

また、光学ドライブ装置27は、光ディスクなどのリムーバブルディスク28を装着可能であり、装着したリムーバブルディスク28に記録された情報の読出および記録を行う。   The optical drive device 27 can be loaded with a removable disk 28 such as an optical disk, and reads and records information recorded on the mounted removable disk 28.

また、入力装置25は、例えば、操作パネルなどである。イメージスキャナ20の操作者は、入力装置25を操作することにより、読み取り装置10に対して、例えば、断片P1,P2の読み取りを開始させるための指示などを入力することができる。   The input device 25 is an operation panel, for example. The operator of the image scanner 20 can input, for example, an instruction for starting reading of the fragments P1 and P2 to the reading device 10 by operating the input device 25.

図11に示したメモリ22は、イメージスキャナ20のオペレーティングシステムとともに、プロセッサ21が第1画像と第2画像とを結合する処理を実行するためのアプリケーションプログラムを格納している。なお、第1画像と第2画像とを結合する処理を実行するためのアプリケーションプログラムは、例えば、光ディスクなどのリムーバブルディスク28に記録して頒布することができる。そして、このリムーバブルディスク28を光学ドライブ装置27に装着して読み込み処理を行うことにより、第1画像と第2画像とを結合する処理を実行するためのアプリケーションプログラムを、メモリ22およびハードディスク装置23に格納させてもよい。また、インターネットなどのネットワークに接続する通信装置(図示せず)を介して、第1画像と第2画像とを結合する処理を実行するためのアプリケーションプログラムをダウンロードしてもよい。   The memory 22 shown in FIG. 11 stores an application program for the processor 21 to execute a process of combining the first image and the second image together with the operating system of the image scanner 20. Note that an application program for executing processing for combining the first image and the second image can be recorded and distributed on a removable disk 28 such as an optical disk, for example. An application program for executing processing for combining the first image and the second image by loading the removable disk 28 in the optical drive device 27 and performing reading processing is stored in the memory 22 and the hard disk device 23. It may be stored. In addition, an application program for executing processing for combining the first image and the second image may be downloaded via a communication device (not shown) connected to a network such as the Internet.

また、プロセッサ21は、メモリ22あるいはハードディスク装置23に格納されたアプリケーションプログラムを実行することにより、図1に示した検出部12及び結合部13の機能を果たしてもよい。   The processor 21 may perform the functions of the detection unit 12 and the coupling unit 13 illustrated in FIG. 1 by executing an application program stored in the memory 22 or the hard disk device 23.

図12は、図11に示した読み取り装置10の動作を示す。なお、図12に示したステップのうち、図6に示したステップと同等のものについては、同一の符号を付して示し、その説明は省略する。また、図12に示したステップS301〜ステップS306とステップS310〜ステップS316の各処理は、第1画像と第2画像とを結合する処理のためにプロセッサ21が実行するアプリケーションプログラムの一例を示している。   FIG. 12 shows the operation of the reading device 10 shown in FIG. Of the steps shown in FIG. 12, the same steps as those shown in FIG. 6 are designated by the same reference numerals, and the description thereof is omitted. Further, each of the processes in steps S301 to S306 and steps S310 to S316 shown in FIG. 12 shows an example of an application program executed by the processor 21 for the process of combining the first image and the second image. Yes.

ステップS301において、プロセッサ21は、断片P1,P2のそれぞれを読み取り部11に読み取らせることで、断片P1,P2のそれぞれの画像を含む第1画像IMG1及び第2画像IMG2を取得する。例えば、プロセッサ21は、イメージスキャナ20の利用者からの指示を図11に示した入力装置26を介して受け、受けた指示に基づいて、画像を読み取る動作を開始させる指示を読み取り部11に送出することで、断片P1,P2のそれぞれを読み取らせる。また、プロセッサ21からの指示に応じて、読み取り部11に含まれる画像生成部112は、イメージセンサ111の出力信号から第1画像IMG1と第2画像IMG2とをそれぞれ生成し、メモリ22またはハードディスク装置23に格納する。そして、プロセッサ21は、メモリ22またはハードディスク装置23を介して、上述の第1画像IMG1及び第2画像IMG2を取得する。   In step S301, the processor 21 causes the reading unit 11 to read the fragments P1 and P2, thereby acquiring the first image IMG1 and the second image IMG2 including the images of the fragments P1 and P2. For example, the processor 21 receives an instruction from the user of the image scanner 20 via the input device 26 illustrated in FIG. 11, and sends an instruction to start an image reading operation to the reading unit 11 based on the received instruction. Thus, each of the fragments P1 and P2 is read. In response to an instruction from the processor 21, the image generation unit 112 included in the reading unit 11 generates a first image IMG1 and a second image IMG2 from the output signal of the image sensor 111, and the memory 22 or the hard disk device. 23. Then, the processor 21 acquires the first image IMG1 and the second image IMG2 described above via the memory 22 or the hard disk device 23.

ステップS302において、プロセッサ21は、取得した第1画像IMG1と第2画像IMG2とに基づいて、第1画像IMG1に含まれる断片P1の画像と第2画像IMG2に含まれる断片P2の画像との相対位置を決定する。プロセッサ21は、例えば、図13に示すように、イメージスキャナ20に搭載されたグラフィカルユーザインタフェース機能を利用した手法により、第1画像IMG1と第2画像IMG2との相対位置を決定してもよい。   In step S302, the processor 21 compares the image of the fragment P1 included in the first image IMG1 and the image of the fragment P2 included in the second image IMG2 based on the acquired first image IMG1 and second image IMG2. Determine the position. For example, as illustrated in FIG. 13, the processor 21 may determine the relative position between the first image IMG <b> 1 and the second image IMG <b> 2 by a method using a graphical user interface function mounted on the image scanner 20.

図13は、相対位置を決定する手法の別例を示す。なお、図13に示した要素のうち、図2に示した要素と同等のものについては、同一の符号を付して示し、その説明は省略する。   FIG. 13 shows another example of a method for determining the relative position. Note that among the elements shown in FIG. 13, elements equivalent to those shown in FIG. 2 are denoted by the same reference numerals, and description thereof is omitted.

図11に示したプロセッサ21は、表示制御部24を介して第1画像IMG1及び第2画像IMG2を示す情報を表示部25に渡すことで、図13に示すように、表示部25の表示画面に、第1画像IMG1及び第2画像IMG2を並べて表示させる。また、プロセッサ21は、例えば、表示部25に予め設定したメッセージを表示させることで、図13に示した第1画像IMG1及び第2画像IMG2において互いに対応する箇所を結ぶ矢印Ar1,Ar2の入力を利用者に対して促す。次いで、プロセッサ21は、利用者が入力した矢印Ar1,Ar2のそれぞれの始点Pt1,Pt3及び終点Pt2,Pt4の座標を取得し、取得した座標に基づき、始点Pt1,Pt3を結ぶ直線Lt1とともに、終点Pt2,Pt4を結ぶ直線Lt2を生成する。そして、プロセッサ21は、生成した直線Lt1と直線Lt2とを重ね合わせる位置として、第1画像IMG1と第2画像とを原稿MSにおける断片P1,P2の位置関係を再現する位置に配置するための相対位置を決定する。また、プロセッサ21は、決定した相対位置を、図12に示したステップS302の処理結果として、ステップS303以降の処理に利用する。   The processor 21 shown in FIG. 11 passes the information indicating the first image IMG1 and the second image IMG2 to the display unit 25 via the display control unit 24, so that the display screen of the display unit 25 is displayed as shown in FIG. The first image IMG1 and the second image IMG2 are displayed side by side. In addition, the processor 21 displays, for example, a preset message on the display unit 25, thereby inputting the arrows Ar1 and Ar2 that connect locations corresponding to each other in the first image IMG1 and the second image IMG2 illustrated in FIG. Encourage users. Next, the processor 21 acquires the coordinates of the start points Pt1 and Pt3 and the end points Pt2 and Pt4 of the arrows Ar1 and Ar2 input by the user, and based on the acquired coordinates, along with the line Lt1 connecting the start points Pt1 and Pt3, the end point A straight line Lt2 connecting Pt2 and Pt4 is generated. Then, the processor 21 sets the first image IMG1 and the second image as positions where the generated straight line Lt1 and the straight line Lt2 are overlapped, and a relative position for reproducing the positional relationship between the fragments P1 and P2 in the document MS. Determine the position. Further, the processor 21 uses the determined relative position for the processing after step S303 as the processing result of step S302 shown in FIG.

ステップS303において、プロセッサ21は、ステップS302の処理で得られた相対位置に基づいて、メモリ22などに格納された第1画像IMG1及び第2画像IMG2から、第1ラインL1および第2ラインL2を取得する。例えば、プロセッサ21は、相対位置に基づいて配置された断片P1、P2の画像にて、断片P1,P2の上側の辺EG1,EG2を示す第1方向d1の座標Y1から座標Ynで示されるnラインのそれぞれを順次に第1ラインL1及び第2ラインL2として取得する。なお、nは、正の整数を示し、また、座標Ynは、図13に示した断片P1,P2の下側の辺EG3,EG4を示す第1方向d2の座標である。   In step S303, the processor 21 extracts the first line L1 and the second line L2 from the first image IMG1 and the second image IMG2 stored in the memory 22 or the like based on the relative position obtained in the process of step S302. get. For example, the processor 21 uses the images of the fragments P1 and P2 arranged based on the relative positions to indicate the upper sides EG1 and EG2 of the fragments P1 and P2 from the coordinates Y1 to the coordinates Yn in the first direction d1. Each of the lines is sequentially acquired as a first line L1 and a second line L2. Note that n represents a positive integer, and the coordinate Yn is a coordinate in the first direction d2 indicating the lower sides EG3 and EG4 of the fragments P1 and P2 illustrated in FIG.

ステップS310において、プロセッサ21は、ステップS303の処理で取得した第1ラインL1及び第2ラインL2に含まれる各画素の特徴値に基づいて、図8を用いて説明した第1位置Xe1と第2位置Xe2を推定する。   In step S310, the processor 21 determines the first position Xe1 and the second position described with reference to FIG. 8 based on the feature values of the pixels included in the first line L1 and the second line L2 acquired in the process of step S303. The position Xe2 is estimated.

ステップS311において、プロセッサ21は、ステップS310の処理で推定された第1位置Xe1及び第2位置Xe2に基づいて、後述するステップS312の処理で評価値を求める注目範囲Rsを設定する。プロセッサ21は、図9、図10を用いて説明したように、第1位置Xe1と第2位置Xe2との中点Xcを中心とし、第1位置Xe1と第2位置Xe2との距離で示される幅よりも広い幅を持つ注目範囲を設定することが望ましい。なお、プロセッサ21は、ステップS302の処理で決定した相対位置に含まれる誤差の大きさに基づいて、上述した範囲の幅を調整してもよい。例えば、プロセッサ21は、図13に示した直線Lt1と直線Lt2とを重ね合わせた際の誤差の大きさが大きいほど大きい値を設定した所定値αを用いて、図10に示した注目範囲Rsを求める。   In step S311, the processor 21 sets an attention range Rs for obtaining an evaluation value in a process of step S312 described later based on the first position Xe1 and the second position Xe2 estimated in the process of step S310. As described with reference to FIGS. 9 and 10, the processor 21 is indicated by the distance between the first position Xe1 and the second position Xe2 with the midpoint Xc between the first position Xe1 and the second position Xe2 as the center. It is desirable to set an attention range having a width wider than the width. Note that the processor 21 may adjust the width of the above-described range based on the magnitude of the error included in the relative position determined in step S302. For example, the processor 21 uses the predetermined value α in which a larger value is set as the error magnitude when the straight line Lt1 and the straight line Lt2 shown in FIG. Ask for.

ステップS312において、プロセッサ21は、ステップS311で設定された注目範囲Rsに含まれる第1ラインL1及び第2ラインL2の各画素の特徴値に基づいて、各画素の位置が原稿MSを分割した切断部の位置を示す可能性の高さを示す評価値を求める。プロセッサ21は、図14および図15を用いて後述する各処理を実行することで、注目範囲Rsに含まれる各画素についての評価値を算出することが望ましい。   In step S312, the processor 21 cuts the original MS by dividing each pixel position based on the feature values of the pixels of the first line L1 and the second line L2 included in the attention range Rs set in step S311. An evaluation value indicating the high possibility of indicating the position of the part is obtained. It is desirable that the processor 21 calculates an evaluation value for each pixel included in the attention range Rs by executing each process described later with reference to FIGS. 14 and 15.

ステップS313において、プロセッサ21は、ステップS312の処理により、所定の閾値以上に高い可能性を示す評価値が得られた画素について、イメージセンサ111における画素の並び方向に相当する第2方向d2での分布を調べる。   In step S313, the processor 21 obtains an evaluation value indicating a possibility of being higher than a predetermined threshold by the process in step S312 in the second direction d2 corresponding to the pixel arrangement direction in the image sensor 111. Examine the distribution.

ステップS314において、プロセッサ21は、ステップS313の処理で調べた結果に基づいて、所定の閾値以上に高い可能性を示す評価値が得られた画素が、第2方向d2において複数の箇所に分かれて分布しているか否かを判定する。   In step S314, the processor 21 divides the pixels for which an evaluation value indicating a possibility of being higher than a predetermined threshold value is obtained in a plurality of locations in the second direction d2 based on the result of the check in step S313. It is determined whether or not it is distributed.

所定の閾値以上に高い可能性を示す評価値が得られた画素が一箇所に集中している場合に(ステップS314の否定判定(NO))、プロセッサ21は、ステップS315の処理に進む。   When the pixels for which the evaluation value indicating the possibility of being higher than the predetermined threshold is concentrated in one place (No determination in step S314 (NO)), the processor 21 proceeds to the process of step S315.

ステップS315において、プロセッサ21は、所定の閾値以上に高い可能性を示す評価値が得られた画素の中で、最も高い評価値が得られた画素の位置を特定する。また、プロセッサ21は、第1ラインと第2ラインとを結合する位置の検出結果として、特定した画素の位置を出力する。   In step S315, the processor 21 specifies the position of the pixel from which the highest evaluation value is obtained among the pixels from which the evaluation value indicating the possibility of being higher than a predetermined threshold is obtained. Further, the processor 21 outputs the position of the specified pixel as a detection result of the position where the first line and the second line are combined.

一方、所定の閾値以上に高い可能性を示す評価値が得られた画素が複数の箇所に分散して分布している場合に(ステップS314の肯定判定(YES))、プロセッサ21は、ステップS316の処理に進む。   On the other hand, when the pixels for which the evaluation value indicating the possibility of being higher than the predetermined threshold is obtained are distributed and distributed in a plurality of locations (Yes in step S314 (YES)), the processor 21 performs step S316. Proceed to the process.

ステップS316において、プロセッサ21は、所定の閾値以上に高い可能性を示す評価値が得られた画素が分布している複数の箇所のうち、注目範囲Rsの中心に最も近い箇所に分布している画素の集合を選択する。   In step S316, the processor 21 distributes at a location closest to the center of the attention range Rs among a plurality of locations where pixels from which an evaluation value indicating a possibility of being higher than a predetermined threshold is obtained are distributed. Select a set of pixels.

ステップS316の処理の終了後に、プロセッサ21は、ステップS315の処理に進み、ステップS316の処理で選択した画素の集合の中で、最も高い評価値が得られた画素の位置を特定し、特定した位置を検出結果として出力する。   After the process of step S316 is completed, the processor 21 proceeds to the process of step S315, and identifies and identifies the position of the pixel having the highest evaluation value in the set of pixels selected in the process of step S316. The position is output as a detection result.

ステップS305において、プロセッサ21は、ステップS315の処理で検出した位置で、第1ラインL1と第2ラインL2とを結合する。また、プロセッサ21は、第1ラインL1と第2ラインL2とを結合することで生成した画像を、第1ラインL1及び第2ラインL2の第1方向d1における位置を示す座標値に対応してメモリ22あるいはハードディスク装置23に格納する。   In step S305, the processor 21 combines the first line L1 and the second line L2 at the position detected in the process of step S315. Further, the processor 21 corresponds to the coordinate value indicating the position of the first line L1 and the second line L2 in the first direction d1 with respect to the image generated by combining the first line L1 and the second line L2. It is stored in the memory 22 or the hard disk device 23.

ステップS306において、プロセッサ21は、第1画像IMG1及び第2画像IMG2にそれぞれ含まれる断片P1,P2の画像が有する全てのラインの結合が完了したか否かを判定する。例えば、プロセッサ21は、ステップS305の処理で結合した第1ラインL1及び第2ラインL2の第1方向d1における位置を示す座標値と、座標値の最大値である座標値Ynとが一致するか否かを判定することで、ステップS306の処理を行ってもよい。   In step S306, the processor 21 determines whether or not the combination of all the lines included in the images of the fragments P1 and P2 included in the first image IMG1 and the second image IMG2 has been completed. For example, the processor 21 determines whether the coordinate value indicating the position in the first direction d1 of the first line L1 and the second line L2 combined in the process of step S305 matches the coordinate value Yn that is the maximum value of the coordinate values. By determining whether or not, the process in step S306 may be performed.

ステップS305の処理で結合した第1ラインL1及び第2ラインL2の第1方向d1における位置を示す座標値と座標値Ynとが一致しない場合に(ステップS316の否定判定(NO))、プロセッサ21は、ステップS303の処理に戻る。そして、プロセッサ21は、新たな座標値で示される第1ラインL1及び第2ラインL2を取得し、ステップS310〜ステップS316及びステップS305,S306の処理を繰り返す。   When the coordinate value indicating the position in the first direction d1 of the first line L1 and the second line L2 combined in the process of step S305 does not match the coordinate value Yn (negative determination in step S316 (NO)), the processor 21 Returns to the process of step S303. Then, the processor 21 acquires the first line L1 and the second line L2 indicated by the new coordinate values, and repeats the processes of steps S310 to S316 and steps S305 and S306.

上述の処理を繰り返すことにより、断片P1,P2の画像が有する全てのラインの結合が完了した場合に(ステップS306の肯定判定(YES))、プロセッサ21は、第1画像IMG1と第2画像IMG2とを結合する処理を終了する。   By repeating the above-described processing, when the combination of all the lines included in the images of the fragments P1 and P2 is completed (Yes in step S306 (YES)), the processor 21 determines that the first image IMG1 and the second image IMG2 The process of combining and is terminated.

以上に説明したように、プロセッサ21が、図12に示した各処理を実行することにより、断片P1,P2の画像をライン単位で結合し、分割前の原稿MSを従来に比べて高い精度で再現する画像IMGを生成することができる。   As described above, the processor 21 executes the processes shown in FIG. 12 to combine the images of the fragments P1 and P2 in units of lines, so that the original MS before division can be made with higher accuracy than before. An image IMG to be reproduced can be generated.

次に、図12に示したステップS312の処理の例について、図14及び図15を用いて説明する。   Next, an example of the process of step S312 illustrated in FIG. 12 will be described with reference to FIGS.

図14は、評価値を算出する処理の例を示す。図14に示したステップS321〜ステップS326の処理は、図12に示したステップS312の処理の一例である。なお、ステップS321〜ステップS326の処理は、図11に示したプロセッサ21によって実行される。   FIG. 14 shows an example of processing for calculating an evaluation value. The process of step S321 to step S326 illustrated in FIG. 14 is an example of the process of step S312 illustrated in FIG. Note that the processing of steps S321 to S326 is executed by the processor 21 shown in FIG.

ステップS321において、プロセッサ21は、第1ライン及び第2ラインにおいて第2方向d2における位置を示す座標Xj(jは正の整数)に、図12に示したステップS311の処理で設定された注目範囲Rsの下限を示す初期値Xminを設定する。   In step S321, the processor 21 sets the attention range set in the process of step S311 shown in FIG. 12 to the coordinates Xj (j is a positive integer) indicating the position in the second direction d2 in the first line and the second line. An initial value Xmin indicating the lower limit of Rs is set.

ステップS322において、プロセッサ21は、第1ラインL1及び第2ラインL2のそれぞれにおいて、上述の座標Xjで示される画素の特徴値をそれぞれ取得する。プロセッサ21は、例えば、第1ラインの座標Xjの画素の特徴値として明度値B1(Xj)を取得し、第2ラインの座標Xjの画素の特徴値として明度値B2(Xj)を取得する。   In step S322, the processor 21 acquires the feature value of the pixel indicated by the above-described coordinate Xj in each of the first line L1 and the second line L2. For example, the processor 21 acquires the brightness value B1 (Xj) as the feature value of the pixel at the coordinate Xj of the first line, and acquires the brightness value B2 (Xj) as the feature value of the pixel at the coordinate Xj of the second line.

ステップS323において、プロセッサ21は、座標Xjで示される画素の位置における評価値として、ステップS322で取得した特徴値の差分の絶対値を算出する。例えば、プロセッサ21は、上述の明度値B1(Xj)から明度値B2(Xj)を差し引いて得られた差分の絶対値を求め、求めた値を座標Xjで示される画素の位置における評価値とする。   In step S323, the processor 21 calculates the absolute value of the difference between the feature values acquired in step S322 as the evaluation value at the pixel position indicated by the coordinate Xj. For example, the processor 21 obtains the absolute value of the difference obtained by subtracting the lightness value B2 (Xj) from the lightness value B1 (Xj) described above, and uses the obtained value as the evaluation value at the pixel position indicated by the coordinate Xj. To do.

ステップS324において、プロセッサ21は、上述したステップS311の処理で設定された範囲に含まれる全ての画素で示される位置について評価値を算出したか否かを判定する。例えば、プロセッサ21は、座標Xjが上述の範囲の上限を示す座標Xmaxと一致するか否かにより、ステップS324の判定を行ってもよい。   In step S324, the processor 21 determines whether or not evaluation values have been calculated for the positions indicated by all the pixels included in the range set in the processing of step S311 described above. For example, the processor 21 may perform the determination in step S324 depending on whether or not the coordinate Xj matches the coordinate Xmax indicating the upper limit of the above-described range.

座標Xjと上述の座標Xmaxとがまだ一致しない場合に(ステップS324の否定判定(NO))、プロセッサ21は、ステップS325の処理に進む。   When the coordinate Xj and the above-mentioned coordinate Xmax do not match yet (No at Step S324 (NO)), the processor 21 proceeds to the process at Step S325.

ステップS325において、プロセッサ21は、座標Xjを更新することで、例えば、第2方向d2において注目範囲Rsの下限Xminから上限Xmaxに向かう方向に1画素ずらした位置を更新後の座標値Xjに示させる。   In step S325, the processor 21 updates the coordinate Xj so that, for example, a position shifted by one pixel in the direction from the lower limit Xmin to the upper limit Xmax of the attention range Rs in the second direction d2 is indicated in the updated coordinate value Xj. Let

ステップS325の処理の終了後に、プロセッサ21は、ステップS322の処理に戻り、更新された座標Xjで示される画素の位置について、ステップS322〜ステップS325の処理を繰り返す。   After the process of step S325 is completed, the processor 21 returns to the process of step S322, and repeats the processes of steps S322 to S325 for the pixel position indicated by the updated coordinate Xj.

上述した処理をプロセッサ21が繰り返し実行することで、座標Xmaxまでの各画素についての評価値の算出が終了した場合に(ステップS324の肯定判定(YES))、プロセッサ21は、ステップS326の処理に進む。   When the processor 21 repeatedly executes the above-described processing to complete the calculation of the evaluation value for each pixel up to the coordinate Xmax (Yes in step S324 (YES)), the processor 21 performs the processing in step S326. move on.

ステップS326において、プロセッサ21は、上述の処理を繰り返し実行したことで各画素について得られた評価値を出力する。   In step S326, the processor 21 outputs an evaluation value obtained for each pixel by repeatedly executing the above-described processing.

ステップS326の処理の終了後に、プロセッサ21は、評価値を算出する処理を終了し、図12に示したステップS313の処理に進む。   After the process of step S326 ends, the processor 21 ends the process of calculating the evaluation value, and proceeds to the process of step S313 illustrated in FIG.

プロセッサ21は、以上に説明した処理を実行することにより、注目範囲Rsにおいて同じ位置で示される第1ラインL1の画素と第2ラインL2の画素の特徴値の類似性の高さとして、原稿MSを分割した切断部の位置を示す可能性の高さを示す評価値を求める。   By executing the processing described above, the processor 21 determines the high degree of similarity between the feature values of the pixels of the first line L1 and the pixels of the second line L2 indicated at the same position in the attention range Rs. An evaluation value indicating the high possibility of indicating the position of the cut portion obtained by dividing.

プロセッサ21は、図14に示したステップS321〜ステップS325の処理の代わりに、図15に示す流れ図で示される各処理を実行することで、評価値を算出してもよい。   The processor 21 may calculate the evaluation value by executing each process shown in the flowchart shown in FIG. 15 instead of the process in steps S321 to S325 shown in FIG.

図15は、評価値を算出する処理の別例を示す。なお、図15に示したステップのうち、図14に示したステップと同等のものについては、同一の符号を付して示し、その説明は省略する。図15に示したステップS321及びステップS322、ステップS324〜ステップS326及びステップS331〜ステップS334の処理は、図12に示したステップS312の処理の別例を示す。また、上述のステップS321及びステップS322、ステップS324〜ステップS326及びステップS331〜ステップS334の処理は、図11に示したプロセッサ21によって実行される。   FIG. 15 shows another example of processing for calculating an evaluation value. Of the steps shown in FIG. 15, the same steps as those shown in FIG. 14 are denoted by the same reference numerals, and description thereof is omitted. The process of step S321 and step S322, step S324 to step S326, and step S331 to step S334 shown in FIG. 15 is another example of the process of step S312 shown in FIG. In addition, the processing of steps S321 and S322, steps S324 to S326, and steps S331 to S334 described above is executed by the processor 21 illustrated in FIG.

図15に示した流れ図では、プロセッサ21は、ステップS321の処理とともに、ステップS331の処理を実行する。なお、プロセッサ21は、ステップS321の処理とステップS331の処理とを逆の順序で実行してもよいし、また、並行して実行してもよい。   In the flowchart shown in FIG. 15, the processor 21 executes the process of step S331 together with the process of step S321. The processor 21 may execute the process of step S321 and the process of step S331 in the reverse order, or may execute them in parallel.

ステップS331において、プロセッサ21は、第1画像IMG1および第2画像IMG2において、断片P1,P2の背景の領域の色を示す特徴値を取得する。例えば、プロセッサ21は、図11に示した読み取り部11から、読み取り部11によって断片P1、P2を原稿として読み取る際に、原稿で覆われなかったイメージセンサ111の画素111aの出力信号で示される明るさを示す明度値Bsを取得する。なお、プロセッサ21は、背景の明るさを示す明度値Bsを予め取得しておき、図11に示したメモリ22などの保持させておいてもよい。   In step S331, the processor 21 acquires a feature value indicating the color of the background region of the fragments P1 and P2 in the first image IMG1 and the second image IMG2. For example, when the processor 21 reads the fragments P1 and P2 as a document from the reading unit 11 illustrated in FIG. 11, the brightness indicated by the output signal of the pixel 111a of the image sensor 111 that is not covered with the document. The brightness value Bs indicating the brightness is acquired. Note that the processor 21 may acquire the brightness value Bs indicating the brightness of the background in advance and store it in the memory 22 shown in FIG.

ステップS332において、プロセッサ21は、ステップS322の処理で取得した第1ラインL1の座標Xjの画素の明度値と明度値Bsとの差を算出する。   In step S332, the processor 21 calculates the difference between the brightness value and the brightness value Bs of the pixel at the coordinate Xj of the first line L1 obtained in the process of step S322.

ステップS333において、プロセッサ21は、ステップS322の処理で取得した第2ラインL2の座標Xjの画素の明度値と明度値Bsとの差を算出する。   In step S333, the processor 21 calculates the difference between the brightness value and the brightness value Bs of the pixel at the coordinate Xj of the second line L2 acquired in the process of step S322.

ステップS334において、プロセッサ21は、ステップS332で算出した差の絶対値と、ステップS333で算出した差の絶対値との和を算出し、算出結果を座標Xjの画素に対応する評価値とする。   In step S334, the processor 21 calculates the sum of the absolute value of the difference calculated in step S332 and the absolute value of the difference calculated in step S333, and sets the calculation result as an evaluation value corresponding to the pixel of the coordinate Xj.

以上に説明した処理により、プロセッサ21は、注目範囲Rsにて同じ位置で示される第1ラインL1の画素と第2ラインL2の画素との双方の特徴値が背景の色を示す特徴値と異なっている度合いを、切断部の位置を示す可能性の高さを示す評価値として求める。   Through the processing described above, the processor 21 makes the feature values of the pixels of the first line L1 and the pixels of the second line L2 indicated at the same position in the attention range Rs different from the feature values indicating the background color. Is determined as an evaluation value indicating the high possibility of indicating the position of the cut portion.

なお、プロセッサ21が各画素に対応する評価値を求めるために実行する処理は、図14あるいは図15に示した処理に限られない。例えば、プロセッサ21は、図14に示した処理で算出される評価値と図15に示した処理で算出した評価値とを組み合わせた評価値を求めてもよい。すなわち、プロセッサ21は、注目範囲Rsにて同じ位置で示される第1ラインL1の画素と第2ラインL2の画素との双方の特徴値が背景の色を示す特徴値と異なり、2つの特徴値の類似度が高い場合に、可能性が高いことを示す評価値を求めてもよい。   Note that the processing executed by the processor 21 to obtain the evaluation value corresponding to each pixel is not limited to the processing shown in FIG. 14 or FIG. For example, the processor 21 may obtain an evaluation value obtained by combining the evaluation value calculated by the process shown in FIG. 14 and the evaluation value calculated by the process shown in FIG. That is, the processor 21 differs from the feature value indicating the background color in the feature values of the pixels of the first line L1 and the pixels of the second line L2 indicated at the same position in the attention range Rs. When the degree of similarity is high, an evaluation value indicating high possibility may be obtained.

以上の詳細な説明により、実施形態の特徴点及び利点は明らかになるであろう。これは、特許請求の範囲が、その精神および権利範囲を逸脱しない範囲で、前述のような実施形態の特徴点および利点にまで及ぶことを意図するものである。また、当該技術分野において通常の知識を有する者であれば、あらゆる改良および変更を容易に想到できるはずである。したがって、発明性を有する実施形態の範囲を前述したものに限定する意図はなく、実施形態に開示された範囲に含まれる適当な改良物および均等物に拠ることも可能である。   From the above detailed description, features and advantages of the embodiment will become apparent. It is intended that the scope of the claims extend to the features and advantages of the embodiments as described above without departing from the spirit and scope of the right. Any person having ordinary knowledge in the technical field should be able to easily come up with any improvements and changes. Therefore, there is no intention to limit the scope of the inventive embodiments to those described above, and appropriate modifications and equivalents included in the scope disclosed in the embodiments can be used.

以上の説明に関して、更に、以下の各項を開示する。
(付記1)
原稿を第1方向に切断して得られる第1断片と第2断片とのそれぞれを読み取ることで、第1画像と第2画像とを生成する読み取り部と、
前記第1画像と前記第2画像とのそれぞれにおいて、前記第1方向と交差する第2方向に並び、前記原稿の切断された部分である切断部を含み、前記第1方向の位置が同じ複数の画素の特徴値に基づいて、前記第1画像に属する前記複数の画素の並びの少なくとも一部と前記第2画像に属する前記複数の画素の並びの少なくとも一部とを結合する前記第2方向の位置を検出する検出部と、
前記検出部により検出された位置で、前記第1画像と前記第2画像とを結合する結合部と
を備えたことを特徴とする読み取り装置。
(付記2)
請求項1に記載の読み取り装置において、
前記検出部は、
前記第1画像と前記第2画像とのそれぞれに含まれる、前記第2方向に並ぶ所定数の画素をそれぞれ含む複数のラインのうち、前記第1方向の位置が同じラインであり、前記第1画像に属する第1ラインと前記第2画像に属する第2ラインとのそれぞれの前記切断部を含む所定の範囲に含まれる複数の画素である抽出画素の特徴値を互いに比較することで、前記抽出画素のそれぞれの位置が前記切断部の前記第2方向の位置である可能性の高さを示す評価値をそれぞれ求める評価部と、
前記抽出画素の中で、前記評価部により、他の画素よりも前記切断部である可能性が高いことを示す評価値が得られた画素の位置を、前記第1ラインと前記第2ラインとを結合する前記第2方向の位置として選択する選択部とを有する
ことを特徴とする読み取り装置。
(付記3)
請求項1に記載の読み取り装置において、
前記検出部は、
前記第1画像と前記第2画像とのそれぞれに含まれる、前記第2方向に並ぶ所定数の画素をそれぞれ含む複数のラインのうち、前記第1方向の位置が同じラインであり、前記第1画像に属する第1ラインと前記第2画像に属する第2ラインとのそれぞれの前記切断部を含む所定の範囲に含まれる複数の画素である抽出画素の特徴値を互いに比較することで、前記抽出画素のそれぞれの位置が前記切断部の前記第2方向の位置である可能性の高さを示す評価値をそれぞれ求める評価部と、
前記第1ラインに含まれる複数の画素の特徴値に基づいて、前記第1ラインにおいて前記切断部を示す第1位置を推定するとともに、前記第2ラインに含まれる複数の画素の特徴値に基づいて、前記第2ラインにおいて前記切断部を示す第2位置を推定する推定部と、
前記抽出画素の中に、前記評価部により所定値以上に高い可能性を示す評価値が得られた抽出画素である候補画素が複数含まれる場合に、前記複数の候補画素の中で、他の候補画素よりも前記第1位置と前記第2位置との中点に近い候補画素の位置を、前記第1ラインと前記第2ラインとを結合する前記第2方向の位置として選択する選択部とを有する
ことを特徴とする読み取り装置。
(付記4)
付記2または付記3に記載の読み取り装置において、
前記評価部は、前記第1画像に含まれる前記第1断片の画像と前記第2画像に含まれる前記第2断片の画像とを、切断前の前記原稿における前記第1断片及び前記第2断片の位置関係を再現する位置に配置することで重ね合わせられた範囲に含まれる前記第1ライン及び前記第2ラインの各画素を前記抽出画素とし、前記重ね合わせられた範囲において互いに同じ位置で示される前記第1ラインの抽出画素と前記第2ラインの抽出画素との間の特徴値の類似性の高さを示す値を前記評価値として求める
ことを特徴とする読み取り装置。
(付記5)
付記2または付記3に記載の読み取り装置において、
前記評価部は、前記第1画像に含まれる前記第1断片の画像と前記第2画像に含まれる前記第2断片の画像とを、切断前の前記原稿における前記第1断片及び前記第2断片の位置関係を再現する位置に配置することで重ね合わせられた範囲に含まれる前記第1ライン及び前記第2ラインの各画素を前記抽出画素とし、前記重ね合わせられた範囲において互いに同じ位置で示される前記第1ラインの抽出画素と前記第2ラインの抽出画素との双方の特徴値が、前記原稿を用いずに前記読み取り部で読み取ることで生成される背景の画像の特徴値と異なっている度合いを示す値を前記評価値として求める
ことを特徴とする読み取り装置。
(付記6)
付記4または付記5に記載の読み取り装置において、
更に、
前記第1ラインに含まれる複数の画素の特徴値に基づいて、前記第1ラインにおいて前記切断部を示す第1位置を推定するとともに、前記第2ラインに含まれる複数の画素の特徴値に基づいて、前記第2ラインにおいて前記切断部を示す第2位置を推定する推定部と、
前記第1画像に含まれる前記第1断片の画像と前記第2画像に含まれる前記第2断片の画像とを、切断前の前記原稿における前記第1断片及び前記第2断片の位置関係を再現する位置に配置することで重ね合わせられた範囲のうち、前記推定部によって推定された前記第1位置と前記第2位置とを含む範囲である注目範囲を設定し、前記注目範囲に含まれる各画素を抽出画素として、前記評価部に評価値の算出を実行させる設定部とを有する
ことを特徴とする読み取り装置。
(付記7)
付記6に記載の読み取り装置において、
前記設定部は、前記第1断片及び前記第2断片の位置関係を再現する位置が推定された際の推定誤差を示す情報を受け、前記推定誤差が大きいほど広い幅を持つ注目範囲を設定する
ことを特徴とする読み取り装置。
(付記8)
原稿を第1方向に切断して得られる第1断片と第2断片とのそれぞれを読み取ることで、第1画像と第2画像とを生成し、
前記第1画像と前記第2画像とのそれぞれにおいて、前記第1方向と交差する第2方向に並び、前記原稿の切断された部分である切断部を含み、前記第1方向の位置が同じ複数の画素の特徴値に基づいて、前記第1画像に属する前記複数の画素の並びの少なくとも一部と前記第2画像に属する前記複数の画素の並びの少なくとも一部とを結合する前記第2方向の位置を検出し、
検出された位置で、前記第1画像と前記第2画像とを結合する
ことを特徴とする読み取り方法。
(付記9)
原稿を第1方向に切断して得られる第1断片と第2断片とのそれぞれを読み取ることで、第1画像と第2画像とを生成し、
前記第1画像と前記第2画像とのそれぞれにおいて、前記第1方向と交差する第2方向に並び、前記原稿の切断された部分である切断部を含み、前記第1方向の位置が同じ複数の画素の特徴値に基づいて、前記第1画像に属する前記複数の画素の並びの少なくとも一部と前記第2画像に属する前記複数の画素の並びの少なくとも一部とを結合する前記第2方向の位置を検出し、
検出された位置で、前記第1画像と前記第2画像とを結合する、
処理をコンピュータに実行させる読み取りプログラム。
Regarding the above description, the following items are further disclosed.
(Appendix 1)
A reading unit that generates the first image and the second image by reading each of the first fragment and the second fragment obtained by cutting the document in the first direction;
Each of the first image and the second image includes a cutting portion that is arranged in a second direction intersecting the first direction and that is a cut portion of the document, and has the same position in the first direction. The second direction combining at least a part of the arrangement of the plurality of pixels belonging to the first image and at least a part of the arrangement of the plurality of pixels belonging to the second image based on a feature value of the pixel of A detection unit for detecting the position of
A reading apparatus comprising: a combining unit that combines the first image and the second image at a position detected by the detection unit.
(Appendix 2)
The reading device according to claim 1,
The detector is
Among the plurality of lines included in each of the first image and the second image and including a predetermined number of pixels arranged in the second direction, the positions in the first direction are the same line, and the first The extraction is performed by comparing feature values of extracted pixels that are a plurality of pixels included in a predetermined range including the cut portions of the first line belonging to the image and the second line belonging to the second image. An evaluation unit that obtains an evaluation value indicating a high possibility that each position of the pixel is a position in the second direction of the cutting unit;
Among the extracted pixels, the evaluation unit obtains the position of the pixel from which an evaluation value indicating that there is a higher possibility of being the cut part than the other pixels, and the first line and the second line. And a selection unit that selects the second position as the position in the second direction.
(Appendix 3)
The reading device according to claim 1,
The detector is
Among the plurality of lines included in each of the first image and the second image and including a predetermined number of pixels arranged in the second direction, the positions in the first direction are the same line, and the first The extraction is performed by comparing feature values of extracted pixels that are a plurality of pixels included in a predetermined range including the cut portions of the first line belonging to the image and the second line belonging to the second image. An evaluation unit that obtains an evaluation value indicating a high possibility that each position of the pixel is a position in the second direction of the cutting unit;
Based on feature values of a plurality of pixels included in the first line, a first position indicating the cut portion in the first line is estimated, and based on feature values of a plurality of pixels included in the second line. An estimation unit for estimating a second position indicating the cut portion in the second line;
When the extracted pixel includes a plurality of candidate pixels that are extracted pixels for which an evaluation value indicating a higher possibility than the predetermined value is obtained by the evaluation unit, among the plurality of candidate pixels, A selection unit that selects a position of the candidate pixel closer to a midpoint between the first position and the second position than the candidate pixel as a position in the second direction that combines the first line and the second line; A reading device comprising:
(Appendix 4)
In the reading device according to appendix 2 or appendix 3,
The evaluation unit uses the first fragment and the second fragment in the original document before cutting the image of the first fragment included in the first image and the image of the second fragment included in the second image. The pixels of the first line and the second line included in the overlapped range by arranging them at positions that reproduce the positional relationship are used as the extraction pixels, and are shown at the same positions in the overlapped range. A value indicating a high similarity of feature values between the extracted pixels of the first line and the extracted pixels of the second line is obtained as the evaluation value.
(Appendix 5)
In the reading device according to appendix 2 or appendix 3,
The evaluation unit uses the first fragment and the second fragment in the original document before cutting the image of the first fragment included in the first image and the image of the second fragment included in the second image. The pixels of the first line and the second line included in the overlapped range by arranging them at positions that reproduce the positional relationship are used as the extraction pixels, and are shown at the same positions in the overlapped range. The feature values of both the extracted pixels of the first line and the extracted pixels of the second line are different from the feature values of the background image generated by reading by the reading unit without using the original. A reading device characterized in that a value indicating a degree is obtained as the evaluation value.
(Appendix 6)
In the reading device according to appendix 4 or appendix 5,
Furthermore,
Based on feature values of a plurality of pixels included in the first line, a first position indicating the cut portion in the first line is estimated, and based on feature values of a plurality of pixels included in the second line. An estimation unit for estimating a second position indicating the cut portion in the second line;
The positional relationship between the first fragment and the second fragment in the document before cutting is reproduced using the image of the first fragment included in the first image and the image of the second fragment included in the second image. A range of attention that is the range including the first position and the second position estimated by the estimation unit among the ranges that are overlapped by being arranged at the position to be, and each included in the range of interest And a setting unit that causes the evaluation unit to calculate an evaluation value using the pixel as an extraction pixel.
(Appendix 7)
In the reading device according to attachment 6,
The setting unit receives information indicating an estimation error when a position that reproduces the positional relationship between the first fragment and the second fragment is estimated, and sets an attention range having a wider width as the estimation error is larger. A reading device.
(Appendix 8)
By reading each of the first fragment and the second fragment obtained by cutting the document in the first direction, a first image and a second image are generated,
Each of the first image and the second image includes a cutting portion that is arranged in a second direction intersecting the first direction and that is a cut portion of the document, and has the same position in the first direction. The second direction combining at least a part of the arrangement of the plurality of pixels belonging to the first image and at least a part of the arrangement of the plurality of pixels belonging to the second image based on a feature value of the pixel of Detects the position of
A reading method comprising combining the first image and the second image at a detected position.
(Appendix 9)
By reading each of the first fragment and the second fragment obtained by cutting the document in the first direction, a first image and a second image are generated,
Each of the first image and the second image includes a cutting portion that is arranged in a second direction intersecting the first direction and that is a cut portion of the document, and has the same position in the first direction. The second direction combining at least a part of the arrangement of the plurality of pixels belonging to the first image and at least a part of the arrangement of the plurality of pixels belonging to the second image based on a feature value of the pixel of Detects the position of
Combining the first image and the second image at a detected position;
A reading program that causes a computer to execute processing.

10…読み取り装置;11…読み取り部;12…検出部;13…結合部;14,122…推定部;15…設定部;111…イメージセンサ;112…画像生成部;121…評価部;123…選択部;20…イメージスキャナ;21…プロセッサ;22…メモリ;23…ハードディスク装置(HDD);24…表示制御部;25…表示分;26…入力装置;27…光学ドライブ装置;28…リムーバブルディスク;MS…原稿;P1,P2…断片;IMG1…第1画像;IMG2…第2画像 DESCRIPTION OF SYMBOLS 10 ... Reading apparatus; 11 ... Reading part; 12 ... Detection part; 13 ... Coupling part; 14, 122 ... Estimation part; 15 ... Setting part; 111 ... Image sensor; 112 ... Image generation part; Selection unit; 20 ... Image scanner; 21 ... Processor; 22 ... Memory; 23 ... Hard disk device (HDD); 24 ... Display control unit; 25 ... Display part; 26 ... Input device; 27 ... Optical drive device; MS ... manuscript; P1, P2 ... fragment; IMG1 ... first image; IMG2 ... second image

Claims (7)

原稿を第1方向に切断して得られる第1断片と第2断片とのそれぞれを読み取ることで、第1画像と第2画像とを生成する読み取り部と、
前記第1画像と前記第2画像とのそれぞれにおいて、前記第1方向と交差する第2方向に並び、前記原稿の切断された部分である切断部を含み、前記第1方向の位置が同じ複数の画素の特徴値に基づいて、前記第1画像に属する前記複数の画素の並びの少なくとも一部と前記第2画像に属する前記複数の画素の並びの少なくとも一部とを結合する前記第2方向の位置を検出する検出部と、
前記検出部により検出された位置で、前記第1画像と前記第2画像とを結合する結合部と
を備えたことを特徴とする読み取り装置。
A reading unit that generates the first image and the second image by reading each of the first fragment and the second fragment obtained by cutting the document in the first direction;
Each of the first image and the second image includes a cutting portion that is arranged in a second direction intersecting the first direction and that is a cut portion of the document, and has the same position in the first direction. The second direction combining at least a part of the arrangement of the plurality of pixels belonging to the first image and at least a part of the arrangement of the plurality of pixels belonging to the second image based on a feature value of the pixel of A detection unit for detecting the position of
A reading apparatus comprising: a combining unit that combines the first image and the second image at a position detected by the detection unit.
請求項1に記載の読み取り装置において、
前記検出部は、
前記第1画像と前記第2画像とのそれぞれに含まれる、前記第2方向に並ぶ所定数の画素をそれぞれ含む複数のラインのうち、前記第1方向の位置が同じラインであり、前記第1画像に属する第1ラインと前記第2画像に属する第2ラインとのそれぞれの前記切断部を含む所定の範囲に含まれる複数の画素である抽出画素の特徴値を互いに比較することで、前記抽出画素のそれぞれの位置が前記切断部の前記第2方向の位置である可能性の高さを示す評価値をそれぞれ求める評価部と、
前記抽出画素の中で、前記評価部により、他の画素よりも前記切断部である可能性が高いことを示す評価値が得られた画素の位置を、前記第1ラインと前記第2ラインとを結合する前記第2方向の位置として選択する選択部とを有する
ことを特徴とする読み取り装置。
The reading device according to claim 1,
The detector is
Among the plurality of lines included in each of the first image and the second image and including a predetermined number of pixels arranged in the second direction, the positions in the first direction are the same line, and the first The extraction is performed by comparing feature values of extracted pixels that are a plurality of pixels included in a predetermined range including the cut portions of the first line belonging to the image and the second line belonging to the second image. An evaluation unit that obtains an evaluation value indicating a high possibility that each position of the pixel is a position in the second direction of the cutting unit;
Among the extracted pixels, the evaluation unit obtains the position of the pixel from which an evaluation value indicating that there is a higher possibility of being the cut part than the other pixels, and the first line and the second line. And a selection unit that selects the second position as the position in the second direction.
請求項1に記載の読み取り装置において、
前記検出部は、
前記第1画像と前記第2画像とのそれぞれに含まれる、前記第2方向に並ぶ所定数の画素をそれぞれ含む複数のラインのうち、前記第1方向の位置が同じラインであり、前記第1画像に属する第1ラインと前記第2画像に属する第2ラインとのそれぞれの前記切断部を含む所定の範囲に含まれる複数の画素である抽出画素の特徴値を互いに比較することで、前記抽出画素のそれぞれの位置が前記切断部の前記第2方向の位置である可能性の高さを示す評価値をそれぞれ求める評価部と、
前記第1ラインに含まれる複数の画素の特徴値に基づいて、前記第1ラインにおいて前記切断部を示す第1位置を推定するとともに、前記第2ラインに含まれる複数の画素の特徴値に基づいて、前記第2ラインにおいて前記切断部を示す第2位置を推定する推定部と、
前記抽出画素の中に、前記評価部により所定値以上に高い可能性を示す評価値が得られた抽出画素である候補画素が複数含まれる場合に、前記複数の候補画素の中で、他の候補画素よりも前記第1位置と前記第2位置との中点に近い候補画素の位置を、前記第1ラインと前記第2ラインとを結合する前記第2方向の位置として選択する選択部とを有する
ことを特徴とする読み取り装置。
The reading device according to claim 1,
The detector is
Among the plurality of lines included in each of the first image and the second image and including a predetermined number of pixels arranged in the second direction, the positions in the first direction are the same line, and the first The extraction is performed by comparing feature values of extracted pixels that are a plurality of pixels included in a predetermined range including the cut portions of the first line belonging to the image and the second line belonging to the second image. An evaluation unit for obtaining an evaluation value indicating a high possibility that each position of the pixel is a position in the second direction of the cutting unit;
Based on feature values of a plurality of pixels included in the first line, a first position indicating the cut portion in the first line is estimated, and based on feature values of a plurality of pixels included in the second line. An estimation unit for estimating a second position indicating the cut portion in the second line;
When the extracted pixel includes a plurality of candidate pixels that are extracted pixels for which an evaluation value indicating a higher possibility than the predetermined value is obtained by the evaluation unit, among the plurality of candidate pixels, A selection unit that selects a position of the candidate pixel closer to a midpoint between the first position and the second position than the candidate pixel as a position in the second direction that combines the first line and the second line; A reading device comprising:
請求項2または請求項3に記載の読み取り装置において、
前記評価部は、前記第1画像に含まれる前記第1断片の画像と前記第2画像に含まれる前記第2断片の画像とを、切断前の前記原稿における前記第1断片及び前記第2断片の位置関係を再現する位置に配置することで重ね合わせられた範囲に含まれる前記第1ライン及び前記第2ラインの各画素を前記抽出画素とし、前記重ね合わせられた範囲において互いに同じ位置で示される前記第1ラインの抽出画素と前記第2ラインの抽出画素との間の特徴値の類似性の高さを示す値を前記評価値として求める
ことを特徴とする読み取り装置。
The reading device according to claim 2 or claim 3,
The evaluation unit uses the first fragment and the second fragment in the original document before cutting the image of the first fragment included in the first image and the image of the second fragment included in the second image. The pixels of the first line and the second line included in the overlapped range by arranging them at positions that reproduce the positional relationship are used as the extraction pixels, and are shown at the same positions in the overlapped range. A value indicating a high similarity of feature values between the extracted pixels of the first line and the extracted pixels of the second line is obtained as the evaluation value.
請求項2または請求項3に記載の読み取り装置において、
前記評価部は、前記第1画像に含まれる前記第1断片の画像と前記第2画像に含まれる前記第2断片の画像とを、切断前の前記原稿における前記第1断片及び前記第2断片の位置関係を再現する位置に配置することで重ね合わせられた範囲に含まれる前記第1ライン及び前記第2ラインの各画素を前記抽出画素とし、前記重ね合わせられた範囲において互いに同じ位置で示される前記第1ラインの抽出画素と前記第2ラインの抽出画素との双方の特徴値が、前記原稿を用いずに前記読み取り部で読み取ることで生成される背景の画像の特徴値と異なっている度合いを示す値を前記評価値として求める
ことを特徴とする読み取り装置。
The reading device according to claim 2 or claim 3,
The evaluation unit uses the first fragment and the second fragment in the original document before cutting the image of the first fragment included in the first image and the image of the second fragment included in the second image. The pixels of the first line and the second line included in the overlapped range by arranging them at positions that reproduce the positional relationship are used as the extraction pixels, and are shown at the same positions in the overlapped range. The feature values of both the extracted pixels of the first line and the extracted pixels of the second line are different from the feature values of the background image generated by reading by the reading unit without using the original. A reading device characterized in that a value indicating a degree is obtained as the evaluation value.
原稿を第1方向に切断して得られる第1断片と第2断片とのそれぞれを読み取ることで、第1画像と第2画像とを生成し、
前記第1画像と前記第2画像とのそれぞれにおいて、前記第1方向と交差する第2方向に並び、前記原稿の切断された部分である切断部を含み、前記第1方向の位置が同じ複数の画素の特徴値に基づいて、前記第1画像に属する前記複数の画素の並びの少なくとも一部と前記第2画像に属する前記複数の画素の並びの少なくとも一部とを結合する前記第2方向の位置を検出し、
検出された位置で、前記第1画像と前記第2画像とを結合する
ことを特徴とする読み取り方法。
By reading each of the first fragment and the second fragment obtained by cutting the document in the first direction, a first image and a second image are generated,
Each of the first image and the second image includes a cutting portion that is arranged in a second direction intersecting the first direction and that is a cut portion of the document, and has the same position in the first direction. The second direction combining at least a part of the arrangement of the plurality of pixels belonging to the first image and at least a part of the arrangement of the plurality of pixels belonging to the second image based on a feature value of the pixel of Detects the position of
A reading method comprising combining the first image and the second image at a detected position.
原稿を第1方向に切断して得られる第1断片と第2断片とのそれぞれを読み取ることで、第1画像と第2画像とを生成し、
前記第1画像と前記第2画像とのそれぞれにおいて、前記第1方向と交差する第2方向に並び、前記原稿の切断された部分である切断部を含み、前記第1方向の位置が同じ複数の画素の特徴値に基づいて、前記第1画像に属する前記複数の画素の並びの少なくとも一部と前記第2画像に属する前記複数の画素の並びの少なくとも一部とを結合する前記第2方向の位置を検出し、
検出された位置で、前記第1画像と前記第2画像とを結合する、
処理をコンピュータに実行させる読み取りプログラム。
By reading each of the first fragment and the second fragment obtained by cutting the document in the first direction, a first image and a second image are generated,
Each of the first image and the second image includes a cutting portion that is arranged in a second direction intersecting the first direction and that is a cut portion of the document, and has the same position in the first direction. The second direction combining at least a part of the arrangement of the plurality of pixels belonging to the first image and at least a part of the arrangement of the plurality of pixels belonging to the second image based on a feature value of the pixel of Detects the position of
Combining the first image and the second image at a detected position;
A reading program that causes a computer to execute processing.
JP2013131925A 2013-06-24 2013-06-24 Reading apparatus, reading method and reading program Expired - Fee Related JP6090004B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013131925A JP6090004B2 (en) 2013-06-24 2013-06-24 Reading apparatus, reading method and reading program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013131925A JP6090004B2 (en) 2013-06-24 2013-06-24 Reading apparatus, reading method and reading program

Publications (2)

Publication Number Publication Date
JP2015008350A JP2015008350A (en) 2015-01-15
JP6090004B2 true JP6090004B2 (en) 2017-03-08

Family

ID=52338385

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013131925A Expired - Fee Related JP6090004B2 (en) 2013-06-24 2013-06-24 Reading apparatus, reading method and reading program

Country Status (1)

Country Link
JP (1) JP6090004B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6583209B2 (en) * 2016-10-28 2019-10-02 京セラドキュメントソリューションズ株式会社 Image processing apparatus and image processing method
JP6898684B1 (en) * 2020-11-17 2021-07-07 株式会社シンカ・アウトフィットNq Analyst

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3083671B2 (en) * 1992-10-08 2000-09-04 シャープ株式会社 Image processing device
JP3437249B2 (en) * 1994-04-04 2003-08-18 キヤノン株式会社 Image processing method and image processing apparatus
JPH10222645A (en) * 1997-02-12 1998-08-21 Fuji Xerox Co Ltd Method for reading picture and device therefor
JP2007088830A (en) * 2005-09-22 2007-04-05 Fuji Xerox Co Ltd Image processing apparatus, image processing method, and program
JP2010245885A (en) * 2009-04-07 2010-10-28 Oki Data Corp Image processing apparatus

Also Published As

Publication number Publication date
JP2015008350A (en) 2015-01-15

Similar Documents

Publication Publication Date Title
US9779699B2 (en) Image processing device, image processing method, computer readable medium
KR101916855B1 (en) Apparatus and method for correcting lesion in image frame
JP6623832B2 (en) Image correction apparatus, image correction method, and computer program for image correction
WO2013105373A1 (en) Information processing device, imaging control method, program, digital microscope system, display control device, display control method and program
US9342738B2 (en) Image processing to improve physique of imaged subject
JP6426815B2 (en) Image processing apparatus and image processing method
JP4875470B2 (en) Color correction apparatus and color correction program
US11416978B2 (en) Image processing apparatus, control method and non-transitory computer-readable recording medium therefor
US20140176539A1 (en) Stereoscopic image processing apparatus, stereoscopic image processing method, and recording medium
JP6090004B2 (en) Reading apparatus, reading method and reading program
US20090154827A1 (en) Image processing apparatus and method
US9659226B2 (en) Image processing apparatus, image processing method, and computer-readable recording medium storing image processing program
JP2006084595A (en) Wrinkle detector and image forming apparatus
US11830177B2 (en) Image processing apparatus, control method and non-transitory computer-readable recording medium therefor
TW200937342A (en) Line drawing processor, program and line drawing processing method
JP5825498B1 (en) Image processing apparatus, image forming apparatus, and program
JP2012015592A (en) Image processing apparatus
JP5955003B2 (en) Image processing apparatus, image processing method, and program
JP5928465B2 (en) Degradation restoration system, degradation restoration method and program
JP5857606B2 (en) Depth production support apparatus, depth production support method, and program
JP2007088830A (en) Image processing apparatus, image processing method, and program
CN113674139A (en) Face image processing method and device, electronic equipment and storage medium
JP4865647B2 (en) Document reading apparatus and method for controlling document reading apparatus
JP5395722B2 (en) Line drawing processing apparatus, line drawing processing method and program
JP2015041233A (en) Image processor and method thereof

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160310

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20161226

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170123

R150 Certificate of patent or registration of utility model

Ref document number: 6090004

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees