JP2019022010A - Document reading device, control method of document reading device, and program - Google Patents

Document reading device, control method of document reading device, and program Download PDF

Info

Publication number
JP2019022010A
JP2019022010A JP2017136973A JP2017136973A JP2019022010A JP 2019022010 A JP2019022010 A JP 2019022010A JP 2017136973 A JP2017136973 A JP 2017136973A JP 2017136973 A JP2017136973 A JP 2017136973A JP 2019022010 A JP2019022010 A JP 2019022010A
Authority
JP
Japan
Prior art keywords
document
shadow
image data
document reading
information
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.)
Pending
Application number
JP2017136973A
Other languages
Japanese (ja)
Inventor
今井 仁
Hitoshi Imai
仁 今井
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2017136973A priority Critical patent/JP2019022010A/en
Publication of JP2019022010A publication Critical patent/JP2019022010A/en
Pending legal-status Critical Current

Links

Images

Abstract

To exclude the shadow effect exactly even when the thickness of a document is not uniquely determined at the time of scanning a document and cut out an image such that missing information contained in the document does not occur in the resultant.SOLUTION: A scanning apparatus 100 captures image data by capturing an image capturing area 112 on which a document is placed with an imaging sensor 108 and acquires image data (S702), recognizes a rectangle formed by a plurality of line segments matching the document size that is a candidate for the document end portion included in the acquired image data within a predetermined error (S703), selects a line segment in which an angle formed by a normal vector of each line segment and the shadow generation direction information is 90 degrees or more from among the line segments constituting each of the rectangles as a line segment hard to be affected by the shadow on the basis of shadow generation direction information stored in an HDD 106 (S801 in FIG. 8), and cuts out a region of a designated size as a reference with the selected line segment (S802 in FIG. 8) (S704 to S705).SELECTED DRAWING: Figure 7

Description

本発明は、原稿読取装置、原稿読取装置の制御方法、及びプログラムに関する。   The present invention relates to an original reading apparatus, an original reading apparatus control method, and a program.

オーバーヘッドスキャナと呼ばれるスキャン装置がある。オーバーヘッドスキャナは、机などの平面上に置かれた原稿を撮像センサで撮影し、原稿の画像を成果物としてユーザに提供するスキャン機能を備える。このようなスキャン装置では、撮像センサで原稿を撮影した際に、撮像に原稿以外の領域が含まれることになる。ユーザが原稿だけが含まれる画像(成果物)を得られるように、スキャン装置又はスキャン装置に接続された情報処理装置には、原稿領域切り出し機能を備えていることが多い。原稿領域切り出し機能は、撮像に含まれる原稿領域とそうではない領域、すなわち原稿の端部を判別する原稿領域認識処理を行い、その原稿端部の認識結果に基づいて原稿だけが含まれる画像を切り出すものである。   There is a scanning device called an overhead scanner. The overhead scanner has a scanning function of photographing a document placed on a plane such as a desk with an imaging sensor and providing a user with an image of the document as a product. In such a scanning apparatus, when a document is photographed by the imaging sensor, an area other than the document is included in the imaging. In order for a user to obtain an image (product) including only a document, a scanning device or an information processing device connected to the scanning device is often provided with a document region cutout function. The document area cut-out function performs document area recognition processing for discriminating between a document area included in imaging and an area that is not, that is, an edge of the document, and an image including only the document based on the recognition result of the document edge Cut out.

しかし、原稿周辺に生じた影や原稿のたわみなど様々な要因の影響を受け、原稿領域認識処理による原稿端部の認識結果には誤差が発生する。それにより、例えばユーザが同じサイズの原稿を複数枚スキャンしたとしても、多くの場合は各成果物のサイズは異なってしまう。   However, due to the influence of various factors such as shadows around the document and document deflection, an error occurs in the document edge recognition result by the document region recognition process. Thereby, for example, even if the user scans a plurality of documents of the same size, in many cases, the size of each product is different.

また、スキャン装置には、ユーザが特定のサイズの原稿をスキャンした際に成果物のサイズが綺麗に揃うように、定型サイズ切り出し機能が存在する。定型サイズ切り出し機能では、予めユーザに原稿のサイズを入力させ、原稿領域認識処理による原稿端部の認識結果と入力された原稿サイズに従い原稿領域の画像を切り出す。なお、定型サイズ切り出し機能では、原稿周辺に生じた影により原稿領域認識処理による原稿端部の認識結果にずれがあると、定型サイズで切り出した際に、成果物は定型サイズになっているものの切り出された画像にずれが含まれてしまう。切り出された画像にずれが含まれる場合、原稿に含まれていた情報が欠落するなどの事象が発生する可能性がある。   In addition, the scanning device has a standard size cutout function so that the sizes of the deliverables are neatly arranged when the user scans a document of a specific size. In the standard size cutout function, the user inputs the size of the document in advance, and the image of the document area is cut out according to the recognition result of the document edge by the document area recognition process and the input document size. In the standard size cutout function, if there is a discrepancy in the recognition result of the document edge by the document area recognition process due to the shadow around the document, the result will be the standard size when cut out at the standard size. Misalignment is included in the cut out image. When the cut image includes a shift, an event such as missing information included in the document may occur.

特許文献1には、CD(Compact Disc)のラベルをコピーするスキャン装置において、定型サイズ切り出しにおいて影の影響によるずれを無くす技術が提案されている。特許文献1の技術では、スキャン画像に含まれる原稿となるCD及びその周辺に生じる影の画像の面積比から、CDの中心を算出することで、その中心から円状にCD領域の画像を切り出すことでCD周辺に生じた影の影響を除外した成果物が得られる。なお、特許文献1のスキャン装置では、予め原稿となるCDを置く場所ごとに、CD及びその周辺に生じる影の画像の面積比の情報(プロファイル)を設定しておく必要がある。   Patent Document 1 proposes a technique for eliminating a shift due to the influence of shadows in a standard size cutout in a scanning device that copies a CD (Compact Disc) label. In the technique of Patent Document 1, the center of the CD is calculated from the area ratio of the CD as a document included in the scanned image and the shadow image generated around the original, and the image of the CD area is cut out from the center in a circular shape. As a result, a product that excludes the influence of the shadow generated around the CD can be obtained. In the scanning apparatus of Patent Document 1, it is necessary to set information (profile) of the area ratio between the CD and the shadow image generated around it in advance for each place where the original CD is placed.

特開2007−104504号公報JP 2007-104504 A

特許文献1のスキャン対象はCDであり、その厚さは一意に決まっている。特許文献1において、もしCDとは厚さの異なるCDと同じ円形状を有する物体をスキャン対象とした場合には、登録しておいたプロファイルの面積比と一致せず、影影響を正確に除外することはできない。   The scan target of Patent Document 1 is a CD, and its thickness is uniquely determined. In Patent Document 1, if an object having the same circular shape as a CD having a thickness different from that of a CD is used as a scan target, the shadow area is not accurately excluded because it does not match the registered area ratio of the profile. I can't do it.

オーバーヘッドスキャナのようなスキャン装置では、原稿によって厚さが異なる、即ちスキャン対象となる原稿の厚さが一意に決まっていないため、特許文献1の技術を適用することはできない。   In a scanning apparatus such as an overhead scanner, the thickness of the original varies depending on the original, that is, the thickness of the original to be scanned is not uniquely determined. Therefore, the technique of Patent Document 1 cannot be applied.

本発明は、上記の課題を解決するためになされたものである。本発明の目的は、原稿をスキャンする際に、原稿の厚さが一意に決まっていなくてもスキャン時に影影響を正確に除外し、原稿に含まれる情報の欠落が成果物に発生しないように所定サイズの画像を切り出すことができる仕組みを提供することである。   The present invention has been made to solve the above problems. An object of the present invention is to accurately exclude shadow effects during scanning even when the thickness of the document is not uniquely determined when scanning a document so that missing information contained in the document does not occur in the product. It is to provide a mechanism that can cut out an image of a predetermined size.

本発明は、撮影手段により原稿から画像データを読み取る原稿読取装置であって、原稿の撮影時に影が生じる方向を示す方向情報を記憶する記憶手段と、原稿の置かれた撮影領域を前記撮影手段で撮影して画像データを取得する第1取得手段と、前記第1取得手段で取得された画像データに含まれる原稿端部の候補となる複数の線で形作られる所定の形状の図形を認識する認識手段と、前記記憶手段に記憶されている方向情報に基づいて、前記認識手段で原稿端部の候補として認識された各図形を構成する線から基準となる線を選択する選択手段と、前記画像データから、前記選択手段で選択された線を基準として所定のサイズの領域を切り出す切り出し手段と、を有することを特徴とする。   The present invention relates to a document reading apparatus that reads image data from a document by a photographing unit, a storage unit that stores direction information indicating a direction in which a shadow is generated when a document is photographed, and a photographing region where the document is placed. A first acquisition unit that captures image data by capturing the image, and a figure having a predetermined shape formed by a plurality of lines that are candidates for the document edge included in the image data acquired by the first acquisition unit Recognizing means; and selecting means for selecting a reference line from lines constituting each figure recognized as a document edge candidate by the recognizing means based on the direction information stored in the storage means; Cutting-out means for cutting out a region of a predetermined size from the image data on the basis of the line selected by the selection means.

本発明によれば、原稿をスキャンする際に、原稿の厚さが一意に決まっていなくてもスキャン時に影影響を正確に除外し、原稿に含まれる情報の欠落が成果物に発生しないように所定サイズの画像を切り出すことができる。   According to the present invention, when scanning a document, even if the thickness of the document is not uniquely determined, the influence of shadow is accurately excluded at the time of scanning so that the missing information contained in the document does not occur in the product. An image of a predetermined size can be cut out.

本実施例の示すスキャン装置の外観図External view of the scanning apparatus shown in this embodiment 本実施例のスキャン装置のハードウェア構成図Hardware configuration diagram of the scanning apparatus of this embodiment 本実施例の影影響把握処理の概要を説明する図The figure explaining the outline | summary of the shadow influence grasp processing of a present Example 実施例1の影影響把握処理で扱う情報の一例を示す図The figure which shows an example of the information handled by the shadow influence grasping process of Example 1. 実施例1の影影響把握処理の一例を示すフローチャートThe flowchart which shows an example of the shadow influence grasping | ascertainment process of Example 1. 実施例1の原稿スキャン処理で扱う情報の一例を示す図FIG. 10 is a diagram illustrating an example of information handled in the document scanning process according to the first embodiment. 実施例1の原稿スキャン処理の一例を示すフローチャート6 is a flowchart illustrating an example of document scanning processing according to the first exemplary embodiment. 実施例1の切り出し処理の一例を示すフローチャートFlowchart illustrating an example of the cutout process according to the first embodiment. 実施例2の影影響把握処理で扱う情報の一例を示す図The figure which shows an example of the information handled by the shadow influence grasping process of Example 2. 実施例2の原稿スキャン処理で扱う情報の一例を示す図FIG. 10 is a diagram illustrating an example of information handled in the document scanning process according to the second embodiment. 実施例2の切り出し処理の一例を示すフローチャートFlowchart illustrating an example of the cutout process according to the second embodiment. 実施例3の影影響把握処理で扱う情報の一例を示す図The figure which shows an example of the information handled by the shadow influence grasping | ascertainment process of Example 3. 実施例3の影影響把握処理の一例を示すフローチャートFlowchart illustrating an example of the shadow effect grasping process according to the third embodiment. 実施例3の原稿スキャン処理で扱う情報の一例を示す図FIG. 10 is a diagram illustrating an example of information handled in document scan processing according to the third embodiment. 実施例3の切り出し処理の一例を示すフローチャートFlowchart illustrating an example of the cutout process according to the third embodiment. 実施例4の影影響把握処理の一例を示すフローチャートFlowchart illustrating an example of a shadow effect grasping process according to the fourth embodiment.

以下、本発明を実施するための形態について図面を用いて説明する。   Hereinafter, embodiments for carrying out the present invention will be described with reference to the drawings.

図1は、本発明の原稿読取装置の一実施例を示すスキャン装置の外観の一例を示す図である。
図1に示すように、本実施例のスキャン装置100は、支柱110で机111の上空に固定された撮像センサ108と、操作パネル107を備えている。撮影領域112は、撮像センサ108により撮影を行える領域を示している。原稿113は、紙やカード等の原稿を示している。原稿は撮影領域112よりも小さいものであれば、ユーザが机111上の任意の場所に置くことが可能である。スキャン装置100は、室内に置かれることを想定しており、スキャン装置100が置かれた場所によって、部屋の照明114から撮影領域112に入ってくる光の向きが変わることになる。
FIG. 1 is a diagram showing an example of the appearance of a scanning apparatus showing an embodiment of a document reading apparatus according to the present invention.
As shown in FIG. 1, the scanning apparatus 100 according to the present embodiment includes an imaging sensor 108 fixed on a desk 111 with a support 110 and an operation panel 107. An imaging area 112 indicates an area where the imaging sensor 108 can perform imaging. A document 113 indicates a document such as paper or a card. If the document is smaller than the shooting area 112, the user can place it on an arbitrary place on the desk 111. The scanning apparatus 100 is assumed to be placed in a room, and the direction of light entering the imaging region 112 from the room illumination 114 changes depending on the place where the scanning apparatus 100 is placed.

図2は、スキャン装置100のハードウェア構成の一例を示すブロック図である。
図2に示すように、スキャン装置100は、コントローラ120、操作パネル107、撮像センサ108を有する。
FIG. 2 is a block diagram illustrating an example of a hardware configuration of the scanning apparatus 100.
As shown in FIG. 2, the scanning apparatus 100 includes a controller 120, an operation panel 107, and an image sensor 108.

コントローラ120において、内部バス109は、メモリコントローラ103、I/Oコントローラ105間で情報の伝達ができるよう、電気信号を送受信する。メモリコントローラ103は、メインメモリ104に対するメモリアクセス全般を統括制御する。I/Oコントローラ105は、HDD106、操作パネル107、撮像センサ108や、内部バス109を介して接続している処理部との情報の送受信を行う。   In the controller 120, the internal bus 109 transmits and receives electrical signals so that information can be transmitted between the memory controller 103 and the I / O controller 105. The memory controller 103 performs overall control of memory access to the main memory 104. The I / O controller 105 transmits and receives information to and from the processing unit connected via the HDD 106, the operation panel 107, the image sensor 108, and the internal bus 109.

グラフィックコントローラ102は、操作パネル107による投影を制御する。ハードディスクドライブ(HDD)106には、ブートローダプログラム及びスキャン装置制御プログラムが格納されている。HDDの代わりに又は併用してソリッドステートドライブ(SSD)等の他の記憶装置を備えていてもよい。メインメモリ104は、揮発性メモリである。メインメモリ104は、高速アクセスが可能であるので、HDD106に記憶されている情報や一時的に使用する情報はここに格納される。   The graphic controller 102 controls projection by the operation panel 107. A hard disk drive (HDD) 106 stores a boot loader program and a scanning device control program. Other storage devices such as a solid state drive (SSD) may be provided instead of or in combination with the HDD. The main memory 104 is a volatile memory. Since the main memory 104 can be accessed at high speed, information stored in the HDD 106 and information used temporarily are stored here.

スキャン装置100の電源投入時には、CPU101がHDD106に格納されているブートローダプログラムを読み出して実行し、HDD106に格納されているスキャン装置制御プログラムを読み出し、メインメモリ104に格納する。そして、CPU101がメインメモリ104に格納されているスキャン装置制御プログラムを実行し、スキャン装置100の有する各機能を実現する。また、CPU101がこのスキャン装置制御プログラムを実行することで、撮像センサ108で撮影した画像を解析したり、操作パネル107でユーザに情報を投影して示したりする等の、スキャン装置100の行う処理が実行される。以上がコントローラ120の構成についての説明である。   When the scanning device 100 is turned on, the CPU 101 reads and executes the boot loader program stored in the HDD 106, reads the scanning device control program stored in the HDD 106, and stores it in the main memory 104. Then, the CPU 101 executes a scanning device control program stored in the main memory 104, and realizes each function of the scanning device 100. In addition, the CPU 101 executes the scanning device control program to analyze the image captured by the imaging sensor 108, or to project and display information to the user on the operation panel 107. Is executed. The above is the description of the configuration of the controller 120.

撮像センサ108は、撮影した画像をRGB輝度情報のデジタル信号に変換し、画像データを生成する(以下「撮影画像」という)。撮像センサ108は、I/Oコントローラ105との情報の送受信を行う。操作パネル107は、液晶等による表示パネルと、表示パネル上に静電容量式センサ等によるタッチパネルを重ねた構造となっている。ユーザは、表示パネル上に表示された情報を閲覧しつつ、タッチパネルへのタッチ操作により情報を入力することが可能である。操作パネル107はI/Oコントローラ105及びグラフィックコントローラ102との情報の送受信を行う。   The imaging sensor 108 converts the captured image into a digital signal of RGB luminance information and generates image data (hereinafter referred to as “captured image”). The image sensor 108 transmits and receives information to and from the I / O controller 105. The operation panel 107 has a structure in which a display panel made of liquid crystal or the like and a touch panel made of a capacitive sensor or the like are stacked on the display panel. The user can input information by touching the touch panel while browsing the information displayed on the display panel. The operation panel 107 transmits / receives information to / from the I / O controller 105 and the graphic controller 102.

以下、スキャン装置100において実行される、部屋の照明光により生じる撮影領域内に置かれた立体物の影の方向を把握する処理と、原稿のサイズを予め指定して原稿のスキャンを行うスキャン処理の具体的な流れを説明する。本実施例では、原稿の一例として免許証を用いて説明する。   Hereinafter, a scan process that is executed in the scanning apparatus 100 to grasp the direction of the shadow of the three-dimensional object placed in the imaging region caused by the illumination light of the room, and a scan process that scans the document by specifying the document size in advance The specific flow of will be described. In this embodiment, a license will be used as an example of a document.

図3は、本実施例の立体物の影の方向を把握する処理(影影響把握処理)の概要を説明する図である。
影影響把握処理は、少なくともスキャン装置100の置き場所、又は、部屋の照明の構成に変化があった際に、最低1回実行されるものである。また、窓等から自然光が入る部屋では、光の状態が変化するため、一定時間ごとに又はスキャン処理の前に影影響把握処理を実行する構成としてもよい。この場合、操作パネル107等にメッセージを表示して、影影響把握処理の実行をユーザに促すようにしてもよい。
FIG. 3 is a diagram for explaining the outline of the process (shadow influence grasping process) for grasping the shadow direction of the three-dimensional object according to the present embodiment.
The shadow effect grasping process is executed at least once when there is a change in at least the place where the scanning apparatus 100 is placed or the lighting configuration of the room. In a room where natural light enters from a window or the like, the state of light changes, so that the shadow effect grasping process may be executed at regular time intervals or before the scanning process. In this case, a message may be displayed on the operation panel 107 or the like to prompt the user to execute the shadow effect grasping process.

図3のように、ユーザが撮影領域112上に、青色など特定の色のついた棒状の立体物301を置くと、部屋の照明114の光により立体物301の影302が生じる。なお、立体物301の色は、撮影領域112や影と区別が容易な色が望ましい。この影302を利用して、影影響把握処理を行う。以下、図4、図5を用いて詳細に説明する。   As shown in FIG. 3, when the user places a rod-shaped three-dimensional object 301 having a specific color such as blue on the photographing region 112, a shadow 302 of the three-dimensional object 301 is generated by the light of the room illumination 114. Note that the color of the three-dimensional object 301 is preferably a color that can be easily distinguished from the imaging region 112 and the shadow. Using this shadow 302, shadow influence grasping processing is performed. This will be described in detail below with reference to FIGS.

図4は、実施例1の影影響把握処理で扱う情報の一例を示す図である。
図5は、実施例1の影影響把握処理の一例を示すフローチャートである。図中のS501〜S504は、スキャン装置100により実行される処理ステップである。図5及び後述する図7、図8に示すフローチャートの処理は、スキャン装置100のCPU101がHDD106に格納されたプログラムを読み出して実行することにより実現されるものである。なお、この影影響把握処理はサービスマンの操作により開始されるものとしてもよいし、他のユーザの操作により開始されるようにしてもよい。
FIG. 4 is a diagram illustrating an example of information handled in the shadow influence grasping process according to the first embodiment.
FIG. 5 is a flowchart illustrating an example of the shadow effect grasping process according to the first embodiment. S501 to S504 in the figure are processing steps executed by the scanning apparatus 100. The processing of the flowcharts shown in FIG. 5 and FIGS. 7 and 8 to be described later is realized by the CPU 101 of the scanning apparatus 100 reading out and executing the program stored in the HDD 106. This shadow influence grasping process may be started by a serviceman operation or may be started by another user operation.

影影響把握処理が開始されると、スキャン装置100は、S501において、撮像センサ108で立体物301を撮影して、撮影画像(図4の例では400)を取得し、S502に処理を進める。撮像センサ108には、シフトレンズ等の光学歪み補正機構が内蔵されており、撮影領域112を斜めに撮影しても、図4(a)に示す通り台形歪みの無い撮影画像400が得られる。   When the shadow influence grasping process is started, the scanning apparatus 100 captures the three-dimensional object 301 with the image sensor 108 in S501, acquires a captured image (400 in the example of FIG. 4), and advances the process to S502. The imaging sensor 108 incorporates an optical distortion correction mechanism such as a shift lens, and even if the imaging region 112 is imaged obliquely, a captured image 400 having no trapezoidal distortion is obtained as shown in FIG.

S502において、スキャン装置100は、上記S501で取得した撮影画像中の特定色を除去し、S503に処理を進める。ここで特定色は立体物301の色である。この特定色を除去することにより、撮影画像から立体物301の画像を除去することができる。なお、図示しない距離センサを用いて立体物の形状を把握して、上記S501で取得した撮影画像から除去するようにしてもよい。   In S502, the scanning apparatus 100 removes the specific color in the captured image acquired in S501 and advances the process to S503. Here, the specific color is the color of the three-dimensional object 301. By removing this specific color, the image of the three-dimensional object 301 can be removed from the captured image. Note that the shape of the three-dimensional object may be grasped using a distance sensor (not shown) and removed from the captured image acquired in S501.

S503において、スキャン装置100は、上記S502で特定色を除去した撮影画像に含まれる影画像(図4の例では401)から、原稿の撮影時に影の生じる方向を算出し、S504に処理を進める。図4(b)の矢印402に示すように、原稿の撮影時に影の生じる方向は、撮影領域の基準方向から角度θsとして算出される。 In S503, the scanning apparatus 100 calculates a direction in which a shadow is generated when shooting a document from a shadow image (401 in the example of FIG. 4) included in the captured image from which the specific color is removed in S502, and proceeds to S504. . As indicated by an arrow 402 in FIG. 4B, the direction in which the shadow is generated when the document is shot is calculated as an angle θ s from the reference direction of the shooting area.

S504において、スキャン装置100は、上記S503で算出した影の生じる方向の情報を影発生方向情報として記憶装置(例えばHDD106)に記憶し、本フローチャートの処理を終了する。例えば影発生方向情報は、図4(c)に示すような情報となる。図4の例では、角度θsが130度であることを示す情報が、影発生方向情報として記憶装置に記憶される。 In S504, the scanning apparatus 100 stores the shadow generation direction information calculated in S503 in the storage device (for example, the HDD 106) as shadow generation direction information, and ends the processing of this flowchart. For example, the shadow generation direction information is information as shown in FIG. In the example of FIG. 4, information indicating that the angle θ s is 130 degrees is stored in the storage device as shadow occurrence direction information.

図6は、実施例1の原稿スキャン処理で扱う情報の一例を示す図である。
図7は、実施例1の原稿スキャン処理の一例を示すフローチャートである。図中のS701〜S705は、スキャン装置100が実施する処理ステップである。
FIG. 6 is a diagram illustrating an example of information handled in the document scanning process according to the first embodiment.
FIG. 7 is a flowchart illustrating an example of a document scanning process according to the first embodiment. S701 to S705 in the figure are processing steps performed by the scanning apparatus 100.

原稿スキャン処理が開始されると、スキャン装置100は、S701において、操作パネル107でユーザからの原稿サイズ(原稿に対応するサイズ)の指定を受け付け、S702に処理を進める。本実施例では、免許証をスキャンするため、ユーザは免許証をスキャンする旨を操作パネル107から入力することにより原稿サイズを指定する。なお、ユーザが原稿サイズ(縦サイズ、横サイズ)を所定の単位(例えばミリメートル単位やインチ単位)で入力する構成でもよい。   When the document scanning process is started, the scanning apparatus 100 accepts designation of the document size (size corresponding to the document) from the user via the operation panel 107 in S701, and advances the process to S702. In this embodiment, in order to scan the license, the user designates the document size by inputting from the operation panel 107 that the license is to be scanned. Note that the user may input the document size (vertical size, horizontal size) in a predetermined unit (for example, millimeter unit or inch unit).

S702において、スキャン装置100は、撮像センサ108で原稿を撮影して、撮影画像(図6の例では600)を取得し、S703に処理を進める。なお、免許証は厚みがあるため、図3に示したような環境下で撮影した場合、図6(a)に示すように、原稿601の上辺側と左辺側に原稿の影602が生じる。   In S702, the scanning apparatus 100 captures a document with the image sensor 108, acquires a captured image (600 in the example of FIG. 6), and advances the process to S703. Since the license is thick, when it is photographed in an environment as shown in FIG. 3, as shown in FIG. 6A, a shadow 602 of the document is generated on the upper side and the left side of the document 601.

S703において、スキャン装置100は、上記S702で取得した撮影画像に含まれる線分を算出し、該算出した線分の中の、上記S701で指定された原稿サイズに所定誤差内で一致する線分で形作られる矩形候補を算出し、S704に処理を進める。なお、撮像に含まれる線分の算出(認識)は、画像の明るさの鋭敏な変化を検出するエッジ検出処理を行い、その検出結果にHough変換をかける方法など、広く行われている技術となるため、詳細な説明は割愛する。   In S703, the scanning apparatus 100 calculates a line segment included in the captured image acquired in S702, and among the calculated line segment, a line segment that matches the document size specified in S701 within a predetermined error. The rectangle candidate formed by is calculated, and the process proceeds to S704. In addition, the calculation (recognition) of the line segment included in the imaging is a widely performed technique such as a method of performing an edge detection process for detecting a sharp change in the brightness of the image and performing a Hough transform on the detection result. Therefore, the detailed explanation is omitted.

図6(a)に示す撮影画像600からは、図6(b)に示すような線分が算出される。その線分の中で、免許証を構成する長さの線分と、例えば誤差5%以内で一致する線分は、図6の(b)に示すEv1〜Ev5、Eh1〜Eh3となる。これらの線分で形作られる矩形候補は、(Ev1,Eh1,Ev5,Eh3)で構成されるもの、(Ev2,Eh2,Ev5,Eh3)で構成されるものなど複数となる。   A line segment as shown in FIG. 6B is calculated from the captured image 600 shown in FIG. Among the line segments, the line segments having the length constituting the license, for example, the line segments that coincide with each other within an error of 5% are Ev1 to Ev5 and Eh1 to Eh3 shown in FIG. There are a plurality of rectangle candidates formed by these line segments, such as those composed of (Ev1, Eh1, Ev5, Eh3) and those composed of (Ev2, Eh2, Ev5, Eh3).

S704において、スキャン装置100は、記憶装置(HDD106)から影発生方向情報(図5のS504で記憶されたもの)を読み出し、S705に処理を進める。
S705において、スキャン装置100は、切り出し処理(実施例1では図8)を実行し、本フローチャートの処理を終了する。
In S704, the scanning apparatus 100 reads the shadow occurrence direction information (stored in S504 of FIG. 5) from the storage device (HDD 106), and advances the process to S705.
In S705, the scanning apparatus 100 executes a cut-out process (FIG. 8 in the first embodiment), and ends the process of this flowchart.

図8は、実施例1の切り出し処理の一例を示すフローチャートである。図中のS801〜S802は、スキャン装置100が実施する処理ステップである。   FIG. 8 is a flowchart illustrating an example of the cutout process according to the first embodiment. S801 to S802 in the figure are processing steps performed by the scanning apparatus 100.

S801において、スキャン装置100は、図7のS703で算出した各矩形候補の各辺の法線ベクトルを算出し、影の生じる方向と為す角度を算出し、S802に処理を進める。
図6の例では、矩形の各辺(上辺、下辺、左辺、右辺)の法線ベクトル(vt、vb、vl、vr)と影の生じる方向との為す角度は、図6(c)に示すθts、θbs、θls、θrsとなる。この角度が90度以上となれば、その辺の側には影が全く生じないこととなる。
In S801, the scanning apparatus 100 calculates a normal vector of each side of each rectangle candidate calculated in S703 of FIG. 7, calculates an angle formed with the direction in which the shadow is generated, and advances the process to S802.
In the example of FIG. 6, the angle formed by the normal vector (vt, vb, vl, vr) of each side of the rectangle (upper side, lower side, left side, right side) and the direction in which the shadow is generated is shown in FIG. θ ts , θ bs , θ ls , θ rs . If this angle is 90 degrees or more, no shadow is produced on the side.

S802において、スキャン装置100は、各矩形候補の構成する辺の中で、前記角度が90度以上となる辺であり且つ最も外側にある辺を基準として、撮影画像600からユーザ指定の原稿サイズで画像を切り出し、本フローチャートの処理を終了する。
図6の例では、下辺Ev3、右辺Ev5を基準として、撮影画像600から免許証サイズで画像が切り出されることになる。
In S802, the scanning apparatus 100 uses a document-specified document size from the photographed image 600 based on the outermost side that is the side where the angle is 90 degrees or more among the sides of each rectangular candidate. The image is cut out, and the processing of this flowchart ends.
In the example of FIG. 6, the image is cut out from the photographed image 600 with the license size using the lower side Ev3 and the right side Ev5 as a reference.

以上の処理により、影の発生しない辺を基準とした原稿サイズの画像を切り出すことができる。これにより、ユーザがオーバーヘッドスキャナと呼ばれるスキャン装置で原稿をスキャンする際に、原稿に含まれる情報の欠落がない成果物(読み取り画像データ)を手に入れることができる。なお、本実施例では、原稿の一例として免許証を用いて説明したが、原稿は免許証に限定されるものではなく、どのような原稿でもよく、そのサイズも免許証サイズに限定されるものではない。   Through the above processing, it is possible to cut out a document size image based on a side where no shadow occurs. As a result, when the user scans a document with a scanning device called an overhead scanner, it is possible to obtain a product (read image data) that does not lack information contained in the document. In this embodiment, a license is used as an example of a manuscript. However, the manuscript is not limited to a license, and any manuscript may be used. The size of the manuscript is also limited to the license size. is not.

スキャン装置を用いる部屋によっては複数の照明があり、立体物の影が複数生じる場合がある。影が生じる方向によっては、実施例1に記載したような影影響を受けない辺が存在しない可能性がある。実施例2では、影影響を受けない辺が存在しない場合の処理の具体的な流れを説明する。   Depending on the room in which the scanning device is used, there are a plurality of lights, and a plurality of shadows of a three-dimensional object may be generated. Depending on the direction in which the shadow is generated, there is a possibility that there is no side that is not affected by the shadow as described in the first embodiment. In the second embodiment, a specific flow of processing when there is no side that is not affected by the shadow will be described.

図9は、実施例2の影影響把握処理で扱う情報の一例を示す図である。なお、実施例2の影影響把握処理に関しては実施例1の図5と同じである。以下、実施例2の影影響把握処理で扱う情報について図5、図9を用いて説明する。   FIG. 9 is a diagram illustrating an example of information handled in the shadow influence grasping process according to the second embodiment. The shadow effect grasping process in the second embodiment is the same as that in FIG. 5 in the first embodiment. Hereinafter, information handled in the shadow influence grasping process according to the second embodiment will be described with reference to FIGS.

実施例2では、図5のS501で、スキャン装置100が撮像センサ108で立体物301(図3)を撮影すると、例えば図9(a)に示す撮影画像900が得られる。
また図5のS503で、スキャン装置100が撮影画像900に含まれる影画像901,902から、影の生じる方向を算出すると、図9(b)の矢印903,904に示すように、撮影領域の基準方向から角度θs1の影と、角度θs2の影が算出される。
また、実施例2では、図5のS504において、スキャン装置100が記憶装置(HDD106)に記憶する影発生方向情報は、図9(c)に示すような情報となる。図9の例では、角度θs1が130度、角度θs2が-50度であることを示す情報が、影発生方向情報として記憶装置に記憶される。即ち、実施例2では、影発生方向情報として、前記影が生じる方向を示す情報を複数記憶することが可能である。
In Example 2, when the scanning apparatus 100 captures the three-dimensional object 301 (FIG. 3) with the image sensor 108 in S501 of FIG. 5, for example, a captured image 900 illustrated in FIG. 9A is obtained.
Further, in S503 of FIG. 5, when the scanning apparatus 100 calculates the direction in which the shadow is generated from the shadow images 901 and 902 included in the captured image 900, as shown by arrows 903 and 904 in FIG. A shadow with an angle θ s1 and a shadow with an angle θ s2 are calculated from the reference direction.
In the second embodiment, the shadow occurrence direction information stored in the storage device (HDD 106) by the scanning apparatus 100 in S504 of FIG. 5 is information as shown in FIG. 9C. In the example of FIG. 9, information indicating that the angle θ s1 is 130 degrees and the angle θ s2 is −50 degrees is stored in the storage device as shadow generation direction information. That is, in the second embodiment, a plurality of pieces of information indicating the direction in which the shadow is generated can be stored as the shadow generation direction information.

図10は、実施例2の原稿スキャン処理で扱う情報の一例を示す図である。実施例2の原稿スキャン処理に関しては実施例1の図7と同じである。以下、実施例2の原稿スキャン処理で扱う情報について図7、図10を用いて説明する。
実施例2では、図7のS702で、スキャン装置100が撮像センサ108で原稿を撮影すると、図10(a)に示すように、撮影画像1000において原稿1001の上下左右どの辺にも原稿の影1002が生じる。
FIG. 10 is a diagram illustrating an example of information handled in the document scanning process according to the second embodiment. The document scanning process of the second embodiment is the same as that of FIG. Hereinafter, information handled in the document scanning process according to the second embodiment will be described with reference to FIGS.
In the second embodiment, when the scanning apparatus 100 captures a document with the image sensor 108 in S702 of FIG. 7, the shadow of the document is applied to any of the top, bottom, left, and right sides of the document 1001 in the captured image 1000 as shown in FIG. 1002 is produced.

図11は、実施例2の切り出し処理の一例を示すフローチャートである。図中のS1101〜S1105は、スキャン装置100が実施する処理ステップである。また、図11に示すフローチャートの処理は、スキャン装置100のCPU101がHDD106に格納されたプログラムを読み出して実行することにより実現されるものである。   FIG. 11 is a flowchart illustrating an example of the cutout process according to the second embodiment. S1101 to S1105 in the figure are processing steps performed by the scanning apparatus 100. Also, the processing of the flowchart shown in FIG. 11 is realized by the CPU 101 of the scanning apparatus 100 reading and executing a program stored in the HDD 106.

実施例2の切り出し処理が開始されると、スキャン装置100は、S1101において、図7のS703で算出した各矩形候補の各辺の法線ベクトルを算出して、影の生じる方向と為す角度を算出し、S1102に処理を進める。   When the clipping process according to the second exemplary embodiment is started, the scanning apparatus 100 calculates a normal vector of each side of each rectangular candidate calculated in S703 in FIG. Calculate and proceed to S1102.

S1102において、スキャン装置100は、上記S1101で算出した角度が90度以上となる辺(すなわち影が生じない辺)を、矩形の角を構成する2辺として抽出する処理を行い、S1103に処理を進める。図10に示した例では、影が矩形を構成する4辺どの方向にも影ができるため、角度が90度以上となる辺(即ち、矩形の角を構成する2辺)は存在しないこととなる。このような場合、S1102において矩形の角を構成する2辺の抽出ができない。   In S1102, the scanning apparatus 100 performs processing for extracting the sides where the angle calculated in S1101 is 90 degrees or more (that is, sides where no shadow is generated) as two sides constituting a rectangular corner, and performs processing in S1103. Proceed. In the example shown in FIG. 10, since the shadow can be shadowed in any direction of the four sides constituting the rectangle, there is no side having an angle of 90 degrees or more (that is, two sides constituting the corner of the rectangle). Become. In such a case, it is not possible to extract the two sides constituting the corner of the rectangle in S1102.

S1103において、スキャン装置100は、矩形の角を構成する2辺を抽出できたか否かを判定する。この判定処理を実施する理由は、矩形の角を構成する2辺が決まれば、その2辺を基準として切り出しが行えるからである。   In S1103, the scanning apparatus 100 determines whether or not the two sides constituting the corner of the rectangle have been extracted. The reason for carrying out this determination processing is that if two sides constituting a corner of a rectangle are determined, the two sides can be cut out as a reference.

上記S1103において、スキャン装置100は、矩形の角を構成する2辺を抽出できたと判定した場合(S1103でYesの場合)、S1105に処理を進める。
一方、上記S1103において、スキャン装置100は、矩形の角を構成する2辺を抽出できなかったと判定した場合(S1103でNoの場合)、S1104に処理を進める。
In S1103, when the scanning apparatus 100 determines that the two sides constituting the corner of the rectangle have been extracted (Yes in S1103), the scanning apparatus 100 proceeds to S1105.
On the other hand, if it is determined in S1103 that the two sides constituting the corner of the rectangle cannot be extracted (No in S1103), the scanning apparatus 100 proceeds to S1104.

S1104において、スキャン装置100は、図7のS703で算出した各矩形候補のうち、最も大きな矩形を構成する辺の中で、上記S1101で算出した角度が90度未満となる辺に関しては最も外側から1つ内側にある辺を抽出する。そして、S1105に処理を進める。以下、具体例を用いて説明する。   In S1104, the scanning apparatus 100 determines from the outermost sides that the angle calculated in S1101 is less than 90 degrees among the sides forming the largest rectangle among the rectangle candidates calculated in S703 of FIG. Extract one inner edge. Then, the process proceeds to S1105. Hereinafter, a specific example will be described.

図10の例では、図10(a)に示す撮像からは図10(b)に示すような線分が算出される。その線分の中で、免許証を構成する長さの線分と例えば誤差5%以内で一致する線分は、図10(b)に示すEv1〜Ev6、Eh1〜Eh4となる。S1104の処理で、各矩形候補の最も大きな矩形とは、図6(b)に示す(Ev1,Eh1,Ev6,Eh4)で構成される矩形となる。この最も大きな矩形を構成する辺の中で、S1101で算出した角度が90度未満となる辺、すなわち影が生じる辺はEv1,Eh1,Ev6,Eh4の全てとなる。従って、Ev1,Eh1,Ev6,Eh4それぞれに関し、1つ内側にある辺を抽出すると、Ev2,Eh2,Ev5,Eh3となる。   In the example of FIG. 10, a line segment as shown in FIG. 10B is calculated from the imaging shown in FIG. Among the line segments, the line segments that coincide with the length of the line constituting the license, for example, within 5% error are Ev1 to Ev6 and Eh1 to Eh4 shown in FIG. In the processing of S1104, the largest rectangle of each rectangle candidate is a rectangle constituted by (Ev1, Eh1, Ev6, Eh4) shown in FIG. Among the sides forming the largest rectangle, the sides where the angle calculated in S1101 is less than 90 degrees, that is, the sides where shadows are generated, are all Ev1, Eh1, Ev6, and Eh4. Therefore, if one side inside is extracted for each of Ev1, Eh1, Ev6, and Eh4, Ev2, Eh2, Ev5, and Eh3 are obtained.

S1105において、スキャン装置100は、上記S1104で抽出した辺を基準として、撮像からユーザ指定の原稿サイズで画像を切り出し、本フローチャートの処理を終了する。   In step S1105, the scanning apparatus 100 cuts out an image with a user-specified original size from the image pickup using the side extracted in step S1104 as a reference, and ends the processing of this flowchart.

以上のように、影が複数発生することで、影が発生しない辺が無い場合でも、ユーザがオーバーヘッドスキャナと呼ばれるスキャン装置で原稿をスキャンする際に、原稿に含まれる情報の欠落がない成果物(読み取り画像データ)を手に入れることができる。
実施例2は、例えば原稿の色が影の濃度と区別し易い色である場合に、原稿と影の境界の検出を精度良く行なうことができるため、特に有効である。例えば、免許証のように原稿の色が明確に影の濃度と異なる原稿に対して、実施例2は有効となる。
As described above, even when there is no side where no shadow occurs due to multiple shadows, when the user scans a document with a scanning device called an overhead scanner, the product does not lack information contained in the document. (Read image data) can be obtained.
The second embodiment is particularly effective because the boundary between the document and the shadow can be accurately detected when the color of the document is easily distinguishable from the shadow density, for example. For example, the second embodiment is effective for an original such as a license whose original color is clearly different from the shadow density.

上述の実施例2では複数の影が生じる場合に関して説明したが、多くの場合、発生する影によって濃度が異なる。濃い影は前述のエッジ検出処理でエッジが検出されやすくなるため、原稿領域認識に誤差を生む可能性が高いが、影が薄ければ誤差を引き起こす可能性は低下する。本実施例3では、スキャン装置100が、発生する複数の影の濃度を把握し、濃い影から優先的に影の影響を考慮することで誤差を生む可能性を極力低める処理の具体的な流れを説明する。   In the above-described second embodiment, the case where a plurality of shadows are generated has been described. However, in many cases, the density differs depending on the generated shadow. Since a dark shadow is easily detected by the above-described edge detection process, there is a high possibility that an error will occur in document area recognition. However, if the shadow is thin, the possibility of causing an error decreases. In the third embodiment, the specific flow of processing in which the scanning apparatus 100 grasps the density of a plurality of shadows generated and minimizes the possibility of generating an error by preferentially considering the influence of the shadow from the dark shadow. Will be explained.

図12は、実施例3の影影響把握処理で扱う情報の一例を示す図である。
図13は、実施例3の影影響把握処理の一例を示すフローチャートである。図中のS1301〜S1304は、スキャン装置100により実行される処理ステップである。また、図13、及び後述する図15に示すフローチャートの処理は、スキャン装置100のCPU101がHDD106に格納されたプログラムを読み出して実行することにより実現されるものである。
FIG. 12 is a diagram illustrating an example of information handled in the shadow influence grasping process according to the third embodiment.
FIG. 13 is a flowchart illustrating an example of the shadow influence grasping process according to the third embodiment. S1301 to S1304 in the figure are processing steps executed by the scanning apparatus 100. Further, the processing of the flowchart shown in FIG. 13 and FIG. 15 to be described later is realized by the CPU 101 of the scanning apparatus 100 reading out and executing the program stored in the HDD 106.

実施例3の影影響把握処理が開始されると、スキャン装置100は、S1301において、撮像センサ108で立体物を撮影して、撮影画像を取得し、S1302に処理を進める。
例えば図12(a)に示す撮影画像1200が得られる。物体の左側には濃い影1201が、下側には薄い影1202が生じていることがわかる。
When the shadow influence grasping process of the third embodiment is started, the scanning apparatus 100 captures a three-dimensional object with the image sensor 108 in S1301, acquires a captured image, and advances the process to S1302.
For example, a photographed image 1200 shown in FIG. It can be seen that a dark shadow 1201 is generated on the left side of the object, and a light shadow 1202 is generated on the lower side.

S1302において、スキャン装置100は、上記S1301で取得した撮影画像中の特定色を除去し、S1303に処理を進める。
S1303において、スキャン装置100は、上記S1302で特定色を除去した撮影画像に含まれる影画像から、影の生じる方向と濃度を算出し、S1304に処理を進める。
本実施例3における濃度の定義は、影が濃くなれば濃度が高く、影が薄くなれば濃度が低くなる数値とし、例えば濃度をz、撮像に含まれる画素の輝度値lをとすれば、数1式のように表わされる。
In S1302, the scanning apparatus 100 removes the specific color from the captured image acquired in S1301, and advances the process to S1303.
In S1303, the scanning apparatus 100 calculates the direction and density of the shadow from the shadow image included in the captured image from which the specific color has been removed in S1302, and advances the process to S1304.
The definition of the density in the third embodiment is a numerical value in which the density is high when the shadow is dark and the density is low when the shadow is thin. For example, if the density is z and the luminance value l of the pixels included in the imaging is taken, It is expressed as Equation 1.

Figure 2019022010
Figure 2019022010

図12(b)の矢印1203,1204に示すように、撮影領域の基準方向から角度θs1の濃い影と、角度θs2の薄い影が算出される。影の濃さに関しては、撮像中の影を構成する画素が、例えば濃度50%未満であれば影と見なさず、濃度50%以上70%未満であれば薄い影、70%以上であれば濃い影と判断する。 As indicated by arrows 1203 and 1204 in FIG. 12B, a dark shadow with an angle θ s1 and a light shadow with an angle θ s2 are calculated from the reference direction of the imaging region. With regard to the shadow density, for example, if the pixel constituting the shadow being imaged is less than 50%, it is not regarded as a shadow. If the density is less than 50% and less than 70%, the shadow is thin. Judge as a shadow.

S1304において、スキャン装置100は、影の生じる方向と濃度の情報を影発生方向情報として記憶装置(HDD106)に記憶し、本フローチャートの処理を終了する。
例えば、スキャン装置100が記憶装置に記憶する影発生方向情報は、図12(c)に示すような情報となる。図12の例では、角度θs1が180度で濃度が濃い影、角度θs2が-60度で濃度が薄い影であることを示す情報が、影発生方向情報として記憶される。即ち、実施例3では、影発生方向情報として、前記影が生じる方向を示す情報と、影の濃度を示す情報の組を複数記憶することが可能である。
In step S1304, the scanning apparatus 100 stores shadow generation direction and density information as shadow generation direction information in the storage device (HDD 106), and ends the process of this flowchart.
For example, the shadow occurrence direction information stored in the storage device by the scanning device 100 is information as shown in FIG. In the example of FIG. 12, information indicating that the angle θ s1 is 180 degrees and the shadow is dark, and the angle θ s2 is −60 degrees and the shadow is light is stored as shadow generation direction information. That is, in the third embodiment, a plurality of sets of information indicating the direction in which the shadow is generated and information indicating the density of the shadow can be stored as the shadow generation direction information.

図14は、実施例3の原稿スキャン処理で扱う情報の一例を示す図である。実施例3の原稿スキャン処理に関しては実施例1の図7と同じである。以下、実施例3の原稿スキャン処理で扱う情報について図7、図14を用いて説明する。
実施例3では、図7のS702で、スキャン装置100が撮像センサ108で原稿を撮影すると、図14(a)に示すように、撮影画像1400において原稿1401の左の辺には原稿によって生じる濃い影1402、右と下の辺には薄い影1403が生じる。
FIG. 14 is a diagram illustrating an example of information handled in the document scanning process according to the third embodiment. The document scanning process of the third embodiment is the same as that of FIG. Hereinafter, information handled in the document scanning process according to the third embodiment will be described with reference to FIGS.
In the third embodiment, when the scanning apparatus 100 captures a document with the image sensor 108 in S702 of FIG. 7, as shown in FIG. 14A, the left side of the document 1401 in the captured image 1400 is dark due to the document. Shadow 1402 and a light shadow 1403 appear on the right and bottom sides.

図15は、実施例3の切り出し処理の一例を示すフローチャートである。図中のS1501〜S1506は、スキャン装置100が実施する処理ステップである。   FIG. 15 is a flowchart illustrating an example of the cutout process according to the third embodiment. S1501 to S1506 in the figure are processing steps performed by the scanning apparatus 100.

実施例3の切り出し処理が開始されると、スキャン装置100は、S1501において、図7のS703で算出した各矩形候補の各辺の法線ベクトルを算出し、所定以上の濃度を有する影の生じる方向と為す角度を算出し、S1502に処理を進める。実施例3では70%以上の濃度を有する影を濃い影と見なす。図14の例では、矩形の各辺の法線ベクトルと濃い影の生じる方向との為す角度は、図14(b)に示すθts1、θbs1、θls1、θrs1となる。 When the clipping process of the third embodiment is started, the scanning apparatus 100 calculates a normal vector of each side of each rectangular candidate calculated in S703 of FIG. 7 in S1501, and a shadow having a density of a predetermined level or more is generated. The angle formed with the direction is calculated, and the process proceeds to S1502. In Example 3, a shadow having a density of 70% or more is regarded as a dark shadow. In the example of FIG. 14, the angles formed between the normal vector of each side of the rectangle and the direction in which the dark shadow is generated are θ ts1 , θ bs1 , θ ls1 , and θ rs1 shown in FIG.

S1502において、スキャン装置100は、各矩形候補を構成する辺の中で、上記S1501で算出した角度が90度以上となる辺(すなわち所定以上の濃度の影が生じない辺)であり、且つ、最も外側にある辺を抽出し、S1503に処理を進める。図14の例では、原稿の上辺、右辺、下辺が抽出されることになる。   In S1502, the scanning apparatus 100 is a side where the angle calculated in S1501 is 90 degrees or more (that is, a side where a shadow with a density of a predetermined density or more does not occur) among the sides constituting each rectangle candidate, and The outermost side is extracted, and the process proceeds to S1503. In the example of FIG. 14, the upper side, the right side, and the lower side of the document are extracted.

S1503において、スキャン装置100は、上記S1502で矩形の平行となる辺が2つ以上抽出されたか否かを判定する。スキャン装置100は、上記S1502で矩形の平行となる辺が2つ以上抽出されなかったと判定した場合(S1503でNoの場合)、S1506に処理を進める。   In S1503, the scanning apparatus 100 determines whether or not two or more rectangular parallel sides are extracted in S1502. If the scanning device 100 determines in S1502 that two or more sides that are parallel to the rectangle have not been extracted (No in S1503), the scanning device 100 proceeds to S1506.

一方、上記S1503において、スキャン装置100は、上記S1502で矩形の平行となる辺が2つ以上抽出されたと判定した場合(S1503でYesの場合)、S1504に処理を進める。
図14の例では、原稿の上辺、下辺が矩形の平行となる辺になるため、S1504に進むこととなる。
On the other hand, if it is determined in S1503 that two or more sides that are parallel to the rectangle have been extracted in S1502 (Yes in S1503), the scanning apparatus 100 proceeds to S1504.
In the example of FIG. 14, since the upper side and the lower side of the document are parallel sides of the rectangle, the process proceeds to S1504.

S1504〜S1505において、スキャン装置100は、影の影響による誤差を最小限にすることができる辺を絞り込む。以下、詳細に説明する。   In S1504 to S1505, the scanning apparatus 100 narrows down the sides that can minimize the error due to the influence of the shadow. Details will be described below.

S1504において、スキャン装置100は、平行となる各辺の法線ベクトルを算出し、該法線ベクトルと所定未満の濃度を有する影の生じる方向と為す角度を算出し、S1505に処理を進める。本実施例では50%以上70%未満の濃度を有する影を薄い影と見なす。図14の例では、平行となる各辺、すなわち原稿の上辺、下辺の法線ベクトルと薄い影の生じる方向との為す角度は、それぞれ図14(c)に示すθts2、θbs2となる。 In S1504, the scanning apparatus 100 calculates a normal vector of each side that is parallel, calculates an angle between the normal vector and a direction in which a shadow having a density less than a predetermined value is generated, and advances the process to S1505. In this embodiment, a shadow having a density of 50% or more and less than 70% is regarded as a light shadow. In the example of FIG. 14, the angles formed by the parallel vectors, that is, the normal vectors of the upper and lower sides of the document, and the direction in which the light shadow is generated are θ ts2 and θ bs2 shown in FIG.

S1505において、スキャン装置100は、平行となる辺の中で、上記S1504で算出した角度が90度以上となる辺(すなわち所定未満の濃度の影が生じない辺)を抽出し、S1506に処理を進める。図14の例では、θts2が90度以上となるため原稿の上辺が抽出される。 In S1505, the scanning apparatus 100 extracts a side where the angle calculated in S1504 is 90 degrees or more (that is, a side where a shadow with a density less than a predetermined value does not occur) from the parallel sides, and performs the process in S1506. Proceed. In the example of FIG. 14, since θ ts2 is 90 degrees or more, the upper side of the document is extracted.

S1506において、スキャン装置100は、抽出された辺を基準として、撮像からユーザ指定の原稿サイズで画像を切り出す。ここで「抽出された辺」とは、上記S1503でYesの場合であって、平行となる辺が4本(2組)の場合には、各組ごとに上記S1504で抽出された辺(すなわち2辺)を示す。また、平行となる辺が2本(1組)の場合には、一方、上記S1504で抽出された辺、及び、上記S1502で抽出された平行とならない辺を示す。また、上記S1503でNoの場合、上記S1502で抽出された辺を示す。図4の例では、上記S1505で抽出された上辺と、上記S1502で抽出された右辺を基準とした切り出しが行われることとなる。即ち、(1)実施例3では、所定以上の濃度の影(第1影)と所定未満の濃度の影(第2影)がともに生じない方向に存在する辺、(2)第1影が生じない方向且つ第2影が生じる方向に存在する辺の順に、切り出しの基準となる辺を抽出する。
上記S1506の処理の後、スキャン装置100は、本フローチャートの処理を終了する。
In step S1506, the scanning apparatus 100 cuts out an image with a user-specified original size from the image pickup using the extracted side as a reference. Here, the “extracted side” is the case of Yes in S1503, and when there are four parallel sides (two sets), the side extracted in S1504 for each group (ie, 2 sides). In addition, when there are two (one set) of parallel sides, the sides extracted in S1504 and the non-parallel sides extracted in S1502 are shown. In the case of No in S1503, the side extracted in S1502 is indicated. In the example of FIG. 4, clipping is performed based on the upper side extracted in S1505 and the right side extracted in S1502. That is, (1) in the third embodiment, a side that exists in a direction in which a shadow with a density of a predetermined level or higher (first shadow) and a shadow with a density of less than a predetermined level (second shadow) do not occur, and (2) the first shadow The sides that are the reference for extraction are extracted in the order of the sides that exist in the direction in which the second shadow does not occur and in the direction in which the second shadow occurs.
After the process of S1506, the scanning apparatus 100 ends the process of this flowchart.

以上のように、濃さの異なる影が複数発生するような環境下でも、影影響による誤差を極力生じさせないことが可能になる。このため、ユーザがオーバーヘッドスキャナと呼ばれるスキャン装置で原稿をスキャンする際に、原稿に含まれる情報の欠落がない成果物(読み取り画像データ)を手に入れることができる。   As described above, even under an environment where a plurality of shadows having different densities are generated, an error due to a shadow effect can be prevented as much as possible. For this reason, when a user scans an original with a scanning device called an overhead scanner, it is possible to obtain a product (read image data) that does not lack information contained in the original.

上述の実施例1〜実施例3の影影響把握処理では、図3に示したように、ユーザが撮影領域上に立体物を置き、スキャン装置100が、立体物と立体物で生じた影を撮影することにより、影発生方向情報を特定していた。本実施例4のでは、その他の影影響把握処理として、操作パネル上で影の生じる向きをユーザに入力させることで、より簡易的に影発生方向情報を特定する構成について説明する。   In the shadow effect grasping process of the above-described first to third embodiments, as shown in FIG. 3, the user places a three-dimensional object on the shooting area, and the scanning device 100 detects the shadow generated by the three-dimensional object and the three-dimensional object. The shadow occurrence direction information was specified by photographing. In the fourth embodiment, as another shadow influence grasping process, a configuration in which shadow generation direction information is specified more simply by allowing a user to input a direction in which a shadow is generated on an operation panel will be described.

図16は、実施例4の影影響把握処理の一例を示すフローチャートである。図中のS1601〜S1603は、スキャン装置100により実行される処理ステップである。図16に示すフローチャートの処理は、スキャン装置100のCPU101がHDD106に格納されたプログラムを読み出して実行することにより実現されるものである。   FIG. 16 is a flowchart illustrating an example of the shadow effect grasping process according to the fourth embodiment. S1601 to S1603 in the figure are processing steps executed by the scanning apparatus 100. The processing of the flowchart shown in FIG. 16 is realized by the CPU 101 of the scanning apparatus 100 reading and executing a program stored in the HDD 106.

実施例4の影影響把握処理が開始されると、スキャン装置100は、S1601において、操作パネル107に影の発生する方向をユーザに選択させるための画面を表示し、S1602に処理を進める。
S1602において、スキャン装置100は、上記S1601で表示された画面から、ユーザによる影の発生する方向の選択操作を受け付け、S1603に処理を進める。
S1603において、スキャン装置100は、上記S1602で受け付けた影の生じる方向を影発生方向情報として記憶装置(HDD106)に記憶し、本フローチャートの処理を終了する。
When the shadow influence grasping process of the fourth embodiment is started, the scanning apparatus 100 displays a screen for allowing the user to select a direction in which the shadow is generated on the operation panel 107 in S1601, and advances the process to S1602.
In S1602, the scanning apparatus 100 accepts a selection operation of the direction in which the shadow is generated by the user from the screen displayed in S1601, and advances the process to S1603.
In S1603, the scanning apparatus 100 stores the shadow generation direction received in S1602 in the storage device (HDD 106) as shadow generation direction information, and ends the processing of this flowchart.

なお、影影響把握処理は、その他にも、例えば、スキャン装置100が固定位置に取り付けられたフラッシュ機構を有する場合など、フラッシュによって生じる影の発生する方向を、メーカー等で予め設定するような構成であってもよい。   In addition, the shadow influence grasping process is configured such that, for example, when the scanning apparatus 100 has a flash mechanism attached to a fixed position, the direction in which the shadow caused by the flash is generated is preset by a manufacturer or the like. It may be.

以上のように、各実施例では、スキャン装置が、原稿スキャン前に影の発生する方向を把握し、原稿スキャン時に事前に把握した影の発生する方向を考慮し、影の発生しない方向を基準として原稿の切り出し処理を行う。これにより、原稿をスキャンする際に、原稿の厚さが一意に決まっていなくてもスキャン時に影影響を正確に除外し、原稿に含まれる情報の欠落が成果物に発生しないように所定サイズの画像を切り出すことができる。したがって、原稿に含まれる情報の欠落が成果物に発生しない定型サイズの切り出し機能を実現することができる。   As described above, in each embodiment, the scanning device grasps the direction in which the shadow is generated before scanning the document, considers the direction in which the shadow is captured in advance when scanning the document, and uses the direction in which no shadow is generated as a reference. As shown in FIG. As a result, when scanning a document, even if the thickness of the document is not uniquely determined, shadow effects are accurately excluded during scanning, and a predetermined size of the document is prevented so that missing information contained in the document does not occur in the product. The image can be cut out. Therefore, it is possible to realize a cut-out function of a standard size that does not cause missing of information included in the document in the product.

なお、原稿は矩形に限定されるものではなく、三角形であっても、5角形以上の原稿であってもよい。この場合、S701で原稿の形状も指定し、矩形の代わりに、指定された原稿形状を用いて処理を行うものとする。また、円形や楕円形をはじめとする1又は複数の曲線で囲まれた形状の原稿であってもよい。なお、曲線で囲まれた形状の原稿の場合、スキャン装置100は、例えば、撮影画像に含まれる曲線を認識し、該曲線で形作られる図形の中の、指定されたサイズ、形状に所定誤差内で一致する図形を原稿端部の候補として認識する。なお、上述した各辺の法線ベクトルは、例えば、上記原稿端部の候補として認識された図形を構成する曲線上に複数の点(例えば等間隔)を設け、その点における法線ベクトルとする。そして、該法線ベクトルと影発生方向情報が示す方向とのなす角度が90度以下の点を基準とし、指定された形状、サイズで、原稿画像を切り取るものとする。これにより、例えばCDのような原稿であっても、原稿に含まれる情報の欠落が成果物に発生しないように所定サイズで原稿画像を切り出すことができる。   The document is not limited to a rectangle, and may be a triangle or a pentagon or more. In this case, it is assumed that the document shape is also specified in S701, and processing is performed using the specified document shape instead of the rectangle. Further, the document may be a document surrounded by one or a plurality of curves such as a circle or an ellipse. In the case of a document surrounded by a curve, for example, the scanning apparatus 100 recognizes a curve included in the photographed image, and within a predetermined error within a specified size and shape among figures formed by the curve. The matching figure is recognized as a document edge candidate. The normal vector of each side described above is, for example, provided with a plurality of points (for example, equidistant intervals) on a curve constituting a graphic recognized as the document edge candidate, and is used as the normal vector at that point. . Then, it is assumed that the original image is cut out with a specified shape and size with reference to a point where the angle between the normal vector and the direction indicated by the shadow generation direction information is 90 degrees or less. As a result, even in the case of a document such as a CD, a document image can be cut out with a predetermined size so that missing information contained in the document does not occur in the product.

なお、上述した各種データの構成及びその内容はこれに限定されるものではなく、用途や目的に応じて、様々な構成や内容で構成されていてもよい。
以上、一実施形態について示したが、本発明は、例えば、システム、装置、方法、プログラムもしくは記憶媒体等としての実施態様をとることが可能である。具体的には、複数の機器から構成されるシステムに適用しても良いし、また、一つの機器からなる装置に適用しても良い。
また、上記各実施例を組み合わせた構成も全て本発明に含まれるものである。
In addition, the structure of the various data mentioned above and its content are not limited to this, You may be comprised with various structures and content according to a use and the objective.
Although one embodiment has been described above, the present invention can take an embodiment as, for example, a system, apparatus, method, program, or storage medium. Specifically, the present invention may be applied to a system composed of a plurality of devices, or may be applied to an apparatus composed of a single device.
Moreover, all the structures which combined said each Example are also contained in this invention.

(その他の実施例)
本発明は、上述の実施例の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
また、本発明は、複数の機器から構成されるシステムに適用しても、1つの機器からなる装置に適用してもよい。
本発明は上記実施例に限定されるものではなく、本発明の趣旨に基づき種々の変形(各実施例の有機的な組合せを含む)が可能であり、それらを本発明の範囲から除外するものではない。即ち、上述した各実施例及びその変形例を組み合わせた構成も全て本発明に含まれるものである。
(Other examples)
The present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in the computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.
Further, the present invention may be applied to a system composed of a plurality of devices or an apparatus composed of one device.
The present invention is not limited to the above embodiments, and various modifications (including organic combinations of the embodiments) are possible based on the spirit of the present invention, and these are excluded from the scope of the present invention. is not. That is, the present invention includes all the combinations of the above-described embodiments and modifications thereof.

100 スキャン装置
120 コントローラ
107 操作パネル
108 撮像センサ
100 scanning equipment
120 controller
107 Control panel
108 Imaging sensor

Claims (8)

撮影手段により原稿から画像データを読み取る原稿読取装置であって、
原稿の撮影時に影が生じる方向を示す方向情報を記憶する記憶手段と、
原稿の置かれた撮影領域を前記撮影手段で撮影して画像データを取得する第1取得手段と、
前記第1取得手段で取得された画像データに含まれる原稿端部の候補となる複数の線で形作られる所定の形状の図形を認識する認識手段と、
前記記憶手段に記憶されている方向情報に基づいて、前記認識手段で原稿端部の候補として認識された各図形を構成する線から基準となる線を選択する選択手段と、
前記画像データから、前記選択手段で選択された線を基準として所定のサイズの領域を切り出す切り出し手段と、
を有することを特徴とする原稿読取装置。
A document reading device that reads image data from a document by photographing means,
Storage means for storing direction information indicating a direction in which a shadow is generated when a document is photographed;
First acquisition means for acquiring image data by imaging an imaging area where a document is placed by the imaging means;
Recognizing means for recognizing a figure having a predetermined shape formed by a plurality of lines that are candidates for the document edge included in the image data obtained by the first obtaining means;
Selection means for selecting a reference line from lines constituting each figure recognized as a document edge candidate by the recognition means based on the direction information stored in the storage means;
From the image data, a cutout unit that cuts out a region of a predetermined size with reference to the line selected by the selection unit;
A document reading apparatus comprising:
前記選択手段は、前記各図形を構成する各線の法線ベクトルと、前記方向情報が示す方向とのなす角度が90度以上となる線を、前記基準となる線として選択することを特徴とする請求項1に記載の原稿読取装置。   The selecting means selects a line having an angle of 90 degrees or more between a normal vector of each line constituting each figure and a direction indicated by the direction information as the reference line. The document reading device according to claim 1. 立体物の置かれた撮影領域を前記撮影手段で撮影して画像データを取得する第2取得手段と、
前記第2取得手段で取得した画像データに含まれる前記立体物の影を認識して影が生じる方向を特定する特定手段と、を有し、
前記記憶手段は、前記特定手段で特定された方向を前記方向情報として記憶することを特徴とする請求項1又は2に記載の原稿読取装置。
Second acquisition means for acquiring image data by imaging the imaging area where the three-dimensional object is placed with the imaging means;
Identifying means for recognizing the shadow of the three-dimensional object included in the image data acquired by the second acquisition means and specifying the direction in which the shadow is generated;
The document reading apparatus according to claim 1, wherein the storage unit stores the direction specified by the specifying unit as the direction information.
ユーザによる前記影が生じる方向の入力を受け付ける入力手段を有し、
前記記憶手段は、前記入力手段により入力された方向を前記方向情報として記憶することを特徴とする請求項1又は2に記載の原稿読取装置。
An input unit that receives an input of a direction in which the shadow is generated by the user;
The document reading apparatus according to claim 1, wherein the storage unit stores a direction input by the input unit as the direction information.
前記記憶手段は、前記方向情報として、前記影が生じる方向を示す情報を複数記憶することが可能であり、
前記選択手段は、前記方向情報に基づいて前記基準となる線を選択できなかった場合、各図形を構成する各線のうち最も外側に位置する線の1つ内側に存在する線を基準となる線として選択することを特徴とする請求項1〜4のいずれか1項に記載の原稿読取装置。
The storage means can store a plurality of information indicating the direction in which the shadow occurs as the direction information,
When the selection unit cannot select the reference line based on the direction information, a line existing inside one of the outermost lines among the lines constituting each figure is used as a reference line. The document reading device according to claim 1, wherein the document reading device is selected as the document reading device.
前記記憶手段は、前記方向情報として、前記影が生じる方向を示す情報と、影の濃度を示す情報の組を複数記憶することが可能であり、
前記選択手段は、前記方向情報に、所定より大きい濃度の影が生じる方向を示す第1情報と、所定未満の濃度の影が生じる方向を示す第2情報とが含まれている場合、前記第1情報に基づいて前記認識手段で認識された各図形を構成する各線から基準となる線の候補を選択し、さらに前記第2情報に基づいて前記選択された基準となる線の候補から基準となる線を選択することを特徴とする請求項1〜3のいずれか1項に記載の原稿読取装置。
The storage means can store a plurality of sets of information indicating the direction in which the shadow occurs and information indicating the density of the shadow as the direction information,
When the direction information includes first information indicating a direction in which a shadow with a density greater than a predetermined value is generated and second information indicating a direction in which a shadow with a density less than a predetermined value is generated, A reference line candidate is selected from each line constituting each figure recognized by the recognition means based on one information, and the selected reference line candidate is selected based on the second information. The document reading apparatus according to claim 1, wherein the line is selected.
撮影手段により原稿から画像データを読み取る原稿読取装置の制御方法であって、
原稿の置かれた撮影領域を前記撮影手段で撮影して画像データを取得する取得ステップと、
前記取得ステップで取得された画像データに含まれる原稿端部の候補となる複数の線で形作られる所定の形状の図形を認識する認識ステップと、
記憶手段に記憶されている原稿の撮影時に影が生じる方向を示す方向情報に基づいて、前記認識ステップで認識された各図形を構成する各線から基準となる線を選択する選択ステップと、
前記画像データから、前記選択ステップで選択された線を基準として所定のサイズの領域を切り出す切り出しステップと、
を有することを特徴とする原稿読取装置の制御方法。
A method of controlling a document reading device that reads image data from a document by a photographing means,
An acquisition step of acquiring image data by imaging the imaging area where the document is placed by the imaging means;
A recognition step for recognizing a figure having a predetermined shape formed by a plurality of lines that are candidates for document edge portions included in the image data acquired in the acquisition step;
A selection step of selecting a reference line from each line constituting each figure recognized in the recognition step, based on direction information indicating a direction in which a shadow is generated during photographing of the document stored in the storage unit;
A cutout step of cutting out a region of a predetermined size from the image data on the basis of the line selected in the selection step;
A method for controlling a document reading apparatus, comprising:
コンピュータに、請求項7に記載の制御方法を実行させるためのプログラム。   A program for causing a computer to execute the control method according to claim 7.
JP2017136973A 2017-07-13 2017-07-13 Document reading device, control method of document reading device, and program Pending JP2019022010A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017136973A JP2019022010A (en) 2017-07-13 2017-07-13 Document reading device, control method of document reading device, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017136973A JP2019022010A (en) 2017-07-13 2017-07-13 Document reading device, control method of document reading device, and program

Publications (1)

Publication Number Publication Date
JP2019022010A true JP2019022010A (en) 2019-02-07

Family

ID=65353645

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017136973A Pending JP2019022010A (en) 2017-07-13 2017-07-13 Document reading device, control method of document reading device, and program

Country Status (1)

Country Link
JP (1) JP2019022010A (en)

Similar Documents

Publication Publication Date Title
US9208550B2 (en) Smart document capture based on estimated scanned-image quality
US10139218B2 (en) Image processing apparatus and image processing method
US10134118B2 (en) Information processing apparatus and method of obtaining information about a projection surface on which a target is projected
US20140362422A1 (en) Handheld device document imaging
JP5878924B2 (en) Image processing apparatus, imaging apparatus, and image processing method
JP6971789B2 (en) Information processing equipment, programs and information processing methods
US20180213147A1 (en) Information processing apparatus having camera function and producing guide display to capture character recognizable image, control method thereof, and storage medium
EP2928174A1 (en) A method and device for capturing a document
US9767588B2 (en) Method and apparatus for image processing
KR101377910B1 (en) Image processing method and image processing apparatus
CN106373154B (en) Image processing apparatus and image processing method
US9979858B2 (en) Image processing apparatus, image processing method and program
JP2019022010A (en) Document reading device, control method of document reading device, and program
US10116809B2 (en) Image processing apparatus, control method, and computer-readable storage medium, which obtains calibration image information with which to correct image data
JP6230360B2 (en) Information processing apparatus and control method thereof, computer program, and storage medium
JP6460510B2 (en) Image processing apparatus, image processing method, and program
JP6600090B2 (en) Image processing apparatus, image processing method, and program
JP6624861B2 (en) Image processing apparatus, control method, and program
US9100512B2 (en) Reading apparatus and method of controlling the same
JP2017182672A (en) Method, device, and program for information processing
JP2014203119A (en) Input device, input processing method, and program
JP2014155073A (en) Image processing device, and image processing method
JP6203070B2 (en) Scanning system, control method therefor, and program
KR20200095391A (en) Information processing apparatus to set lighting effect applied to image, information processing method, and storage medium

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20180306