JP7474411B2 - Image reader - Google Patents

Image reader Download PDF

Info

Publication number
JP7474411B2
JP7474411B2 JP2020088617A JP2020088617A JP7474411B2 JP 7474411 B2 JP7474411 B2 JP 7474411B2 JP 2020088617 A JP2020088617 A JP 2020088617A JP 2020088617 A JP2020088617 A JP 2020088617A JP 7474411 B2 JP7474411 B2 JP 7474411B2
Authority
JP
Japan
Prior art keywords
edge
image
section
predetermined
straight line
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2020088617A
Other languages
Japanese (ja)
Other versions
JP2021184516A (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.)
Kyocera Document Solutions Inc
Original Assignee
Kyocera Document Solutions 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 Kyocera Document Solutions Inc filed Critical Kyocera Document Solutions Inc
Priority to JP2020088617A priority Critical patent/JP7474411B2/en
Priority to US17/321,322 priority patent/US11399108B2/en
Priority to CN202110553055.5A priority patent/CN113489856B/en
Publication of JP2021184516A publication Critical patent/JP2021184516A/en
Application granted granted Critical
Publication of JP7474411B2 publication Critical patent/JP7474411B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Input (AREA)
  • Facsimile Scanning Arrangements (AREA)

Description

本発明は、画像読取装置に関するものである。 The present invention relates to an image reading device.

ある帳票読取装置は、読取画像内の帳票部分の周囲のすべてのエッジを抽出して帳票部分の外形を特定し、その外形に基づいて、帳票の紙折れが発生しているか否かを判定している(例えば特許文献1参照)。 One document reading device extracts all edges around the document portion in the scanned image to identify the outline of the document portion, and determines whether the document is folded based on that outline (see, for example, Patent Document 1).

ある画像読取装置は、あるエッジにおいて、複数のエッジ点Eについての傾きの分散を特定し、その傾きの分散に基づいて、複数のエッジ点Eの直進性を判定している(例えば特許文献2参照)。なお、2つのエッジ点の上下距離を左右距離で除して得られた値が傾きとされ、最小二乗法で傾きの分散が特定される。 A certain image reading device determines the variance of the slope for multiple edge points E on a certain edge, and judges the straightness of the multiple edge points E based on the variance of the slope (see, for example, Patent Document 2). The slope is calculated by dividing the vertical distance between two edge points by the horizontal distance, and the variance of the slope is determined by the least squares method.

特開2010-204906号公報JP 2010-204906 A 特開2016-086217号公報JP 2016-086217 A

しかしながら、上述の帳票読取装置では、読取画像内の帳票部分の周囲のすべてのエッジを抽出して外形を特定しているため、1画素ずつエッジを抽出する場合には計算量が大きくなり処理時間が長くなってしまい、離散的にエッジ位置を抽出する場合には、外形が誤って特定され正確に紙折れが検出されない可能性がある。また、上述の画像読取装置では、複数のエッジ点のすべてに対して傾きと分散を計算する必要があるため、計算量が大きくなり処理時間が長くなってしまう。 However, the above-mentioned document reading device extracts all edges around the document portion in the scanned image to identify the outline, so if edges are extracted one pixel at a time, the amount of calculations increases and the processing time becomes long, and if edge positions are extracted discretely, the outline may be incorrectly identified and paper folds may not be detected accurately. In addition, the above-mentioned image reading device needs to calculate the slope and variance for all multiple edge points, so the amount of calculations increases and the processing time becomes long.

本発明は、上記の問題に鑑みてなされたものであり、比較的少ない計算量で適切に原稿画像の欠損を検出する画像読取装置を得ることを目的とする。 The present invention was made in consideration of the above problems, and aims to provide an image reading device that can appropriately detect defects in an original image with a relatively small amount of calculation.

本発明に係る画像読取装置は、原稿の画像読取によって得られる読取画像または前記読取画像に対して所定の画像処理を実行して得られた画像を対象画像とし、前記対象画像内の原稿画像の先端エッジおよび後端エッジの少なくとも一方のエッジ形状を検出するエッジ形状検出部と、検出された前記エッジ形状に基づいて、前記原稿画像に欠損が発生しているか否かを判定する欠損判定部とを備える。前記エッジ形状検出部は、前記対象画像の所定方向における最初の部分短区間を設定してから、前記部分短区間に対応する区分形状を導出する区分形状探索処理を繰り返して実行することで、前記エッジ形状を特定する。さらに、前記エッジ形状検出部は、(a)前記最初の部分短区間の候補として、前記対象画像の所定方向における所定区間を選択し、(b)前記所定区間のエッジに対応する近似直線が所定閾値以上の正解率で得られるか否かを判定し、(c)前記所定区間のエッジに対応する近似直線が所定閾値以上の正解率で得られる場合には、前記所定区間を前記最初の部分短区間とし、(d)前記所定区間のエッジに対応する近似直線が所定閾値以上の正解率で得られない場合には、前記所定区間とは別の区間を選択し、前記別の区間のエッジに対応する近似直線が前記所定閾値以上の正解率で得られる場合には、前記別の区間を前記最初の部分短区間とする。ここで、前記正解率は、前記所定区間においてサンプリングされたエッジ点のうち、前記近似直線から所定範囲内にあるエッジ点の割合である。 The image reading device according to the present invention has an edge shape detection unit that detects the edge shape of at least one of the leading edge and trailing edge of the document image in the target image, which is a read image obtained by reading an image of a document or an image obtained by performing a predetermined image processing on the read image, and a loss determination unit that determines whether or not a loss occurs in the document image based on the detected edge shape. The edge shape detection unit identifies the edge shape by setting a first partial short section in a predetermined direction of the target image, and then repeatedly performing a segment shape search process that derives a segment shape corresponding to the partial short section. Furthermore, the edge shape detection unit (a) selects a predetermined section in a predetermined direction of the target image as a candidate for the first partial short section, (b) determines whether an approximation line corresponding to the edge of the predetermined section can be obtained with an accuracy rate equal to or higher than a predetermined threshold, (c) sets the predetermined section as the first partial short section if an approximation line corresponding to the edge of the predetermined section can be obtained with an accuracy rate equal to or higher than a predetermined threshold, and (d) selects a section other than the predetermined section if an approximation line corresponding to the edge of the predetermined section cannot be obtained with an accuracy rate equal to or higher than a predetermined threshold, and sets the other section as the first partial short section if an approximation line corresponding to the edge of the other section can be obtained with an accuracy rate equal to or higher than a predetermined threshold. Here, the accuracy rate is the proportion of edge points within a predetermined range from the approximation line among the edge points sampled in the predetermined section.

本発明によれば、比較的少ない計算量で適切に原稿画像の欠損を検出する画像読取装置が得られる。 The present invention provides an image reading device that can appropriately detect defects in an original image with a relatively small amount of calculation.

本発明の上記又は他の目的、特徴および優位性は、添付の図面とともに以下の詳細な説明から更に明らかになる。 The above and other objects, features and advantages of the present invention will become more apparent from the following detailed description taken in conjunction with the accompanying drawings.

図1は、本発明の実施の形態に係る画像読取装置の構成を示すブロック図である。FIG. 1 is a block diagram showing the configuration of an image reading apparatus according to an embodiment of the present invention. 図2は、非端部区間について説明する図である。FIG. 2 is a diagram illustrating the non-end section. 図3は、非端部区間のエッジに対応する近似直線について説明する図である。FIG. 3 is a diagram for explaining an approximation straight line corresponding to an edge of a non-end section. 図4は、部分短区間に対応する区分形状について説明する図である。FIG. 4 is a diagram for explaining a segment shape corresponding to a partial short section. 図5は、欠損面積について説明する図である。FIG. 5 is a diagram for explaining the missing area. 図6は、実施の形態1に係る画像処理装置の動作について説明するフローチャートである。FIG. 6 is a flowchart illustrating the operation of the image processing device according to the first embodiment. 図7は、図6における検査処理(ステップS13,S16)について説明するフローチャートである。FIG. 7 is a flowchart illustrating the inspection process (steps S13 and S16) in FIG. 図8は、実施の形態2における画像読取部11を示す図である。FIG. 8 is a diagram showing the image reading unit 11 according to the second embodiment.

以下、図に基づいて本発明の実施の形態を説明する。 The following describes an embodiment of the present invention with reference to the drawings.

実施の形態1. Embodiment 1.

図1は、本発明の実施の形態に係る画像読取装置の構成を示すブロック図である。図1に示す画像読取装置は、画像読取機能を有する複合機、コピー機、スキャナー機などである。図1に示す画像読取装置は、画像読取部11、プリント装置12、ファクシミリ装置13、通信装置14、操作パネル15、コントローラー16、記憶装置17などを備える。 Fig. 1 is a block diagram showing the configuration of an image reading device according to an embodiment of the present invention. The image reading device shown in Fig. 1 is a multifunction device, a copier, a scanner, or the like, that has an image reading function. The image reading device shown in Fig. 1 includes an image reading unit 11, a printing device 12, a facsimile device 13, a communication device 14, an operation panel 15, a controller 16, a storage device 17, and the like.

画像読取部11は、プラテングラスに載置された原稿や、自動原稿送り装置によりフィードされた原稿から原稿画像を光学的に読み取り、その原稿画像の画像データを生成する内部装置である。 The image reading unit 11 is an internal device that optically reads an original image from an original placed on the platen glass or an original fed by an automatic document feeder, and generates image data of the original image.

プリント装置12は、原稿画像などをプリントする内部装置である。ファクシミリ装置13は、画像読取部11により得られた画像データなどをファクシミリ信号に変換し、そのファクシミリ信号を送信するとともに、ファクシミリ信号を受信して画像データを生成する内部装置である。通信装置14は、ネットワークインターフェイスなどであって、図示せぬ端末装置やサーバーとデータ通信を行う内部装置である。 The printing device 12 is an internal device that prints original images, etc. The facsimile device 13 is an internal device that converts image data obtained by the image reading unit 11 into a facsimile signal, transmits the facsimile signal, and receives the facsimile signal to generate image data. The communication device 14 is an internal device such as a network interface that communicates data with terminal devices and servers (not shown).

操作パネル15は、当該画像読取装置の筺体上面側に配置され、ユーザーに対して操作画面を表示する表示装置15aおよびユーザー操作を受け付ける入力装置15bを有する内部装置である。表示装置15aは、液晶ディスプレイなどである。また、入力装置15bは、ハードキー、表示装置15aとともにソフトキーを実現するタッチパネルなどである。 The operation panel 15 is an internal device that is arranged on the top side of the housing of the image reading device and has a display device 15a that displays an operation screen to the user and an input device 15b that accepts user operations. The display device 15a is a liquid crystal display or the like. The input device 15b is a hard key, a touch panel that realizes soft keys together with the display device 15a, or the like.

コントローラー16は、CPU(Central Processing Unit)、ROM(Read Only Memory)、RAM(Random Access Memory)などを有するコンピューター、ASIC(Application Specific Integrated Circuit)などを備え、各種処理部として動作する。つまり、コントローラー16は、ROMや記憶装置17に記憶されているプログラムをRAMにロードしてCPUで実行して、ソフトウェアによって各種処理部として動作したり、ASICなどで、ハードウェアによって各種処理部として動作したりする。また、記憶装置17は、フラッシュメモリーなどの不揮発性の記憶装置であって、データやプログラムを記憶する。 The controller 16 is equipped with a computer having a CPU (Central Processing Unit), ROM (Read Only Memory), RAM (Random Access Memory), etc., an ASIC (Application Specific Integrated Circuit), etc., and operates as various processing units. In other words, the controller 16 loads programs stored in the ROM or storage device 17 into the RAM and executes them with the CPU, and operates as various processing units by software, or operates as various processing units by hardware such as the ASIC. The storage device 17 is a non-volatile storage device such as a flash memory, and stores data and programs.

ここでは、コントローラー16は、制御部21、対象画像取得部22、エッジ形状検出部23、および欠損判定部24として動作する。 Here, the controller 16 operates as a control unit 21, a target image acquisition unit 22, an edge shape detection unit 23, and a loss determination unit 24.

制御部21は、操作パネル15に対するユーザー操作に基づくジョブ要求および通信装置14によりホスト装置などから受信されたジョブ要求(スキャンジョブ、コピージョブ、ファクシミリ送信ジョブなどの要求)を受け付け、内部装置を使用して、ジョブ要求によって指定されたジョブを実行する。 The control unit 21 accepts job requests based on user operations on the operation panel 15 and job requests (requests for scan jobs, copy jobs, facsimile transmission jobs, etc.) received from a host device or the like via the communication device 14, and uses an internal device to execute the job specified by the job request.

また、スキャンジョブ、コピージョブ、ファクシミリ送信ジョブなどの原稿の画像読取を伴うジョブの場合、制御部21は、画像読取部11から読取画像の画像データを取得してRAMや記憶装置17に保存するとともに、対象画像取得部22、エッジ形状検出部23、および欠損判定部24を使用して、原稿の紙折れや欠損に起因する原稿画像の欠損が発生しているか否かを判定する。原稿画像の欠損が発生している場合には、制御部21は、その旨をユーザーに報知するためのメッセージを表示装置15aに表示する。なお、自動原稿送り装置で複数ページの原稿の画像読取を連続的に行っている場合において原稿画像の欠損が発生しているページを検出したときには、制御部21は、そのページで原稿の画像読取を中断してもよいし、そのページを表示装置15aに表示しつつ原稿の画像読取を継続するようにしてもよい。 In addition, in the case of a job involving image reading of a document, such as a scan job, copy job, or facsimile job, the control unit 21 obtains image data of the read image from the image reading unit 11 and stores it in the RAM or storage device 17, and uses the target image acquisition unit 22, edge shape detection unit 23, and loss determination unit 24 to determine whether or not there is loss in the document image due to folding or loss of the document. If there is loss in the document image, the control unit 21 displays a message to notify the user on the display device 15a. Note that when the automatic document feeder is continuously reading images of multiple pages of documents and a page with a loss in the document image is detected, the control unit 21 may interrupt image reading of the document at that page, or may continue image reading of the document while displaying that page on the display device 15a.

対象画像取得部22は、内包する原稿画像の欠損を発見すべき対象画像を取得する。この実施の形態では、対象画像取得部22は、原稿の画像読取によって得られた読取画像に対して所定の画像処理を実行して得られた画像を対象画像とする。なお、読取画像は、画像読取部11により所定サイズの領域(原稿を含む)の画像を読み取ることで得られた画像である。 The target image acquisition unit 22 acquires a target image in which defects in the contained original image should be found. In this embodiment, the target image acquisition unit 22 performs a predetermined image processing on the read image obtained by reading the image of the original document, and sets the image obtained as the target image. Note that the read image is an image obtained by reading an image of an area of a predetermined size (including the original document) by the image reading unit 11.

具体的には、対象画像取得部22は、原稿の画像読取によって得られた読取画像に対して、縮小処理(解像度変換)、グレースケール画像への変換、エッジ強調処理、および膨張収縮処理を行う。なお、グレースケール画像への変換は、読取画像が輝度データを含んでいる場合(読取画像がグレースケール画像である場合など)には省略される。また、エッジ強調処理は、縮小処理により読取画像から得られた縮小画像において、各画素の画素値を空間的に(隣接する画素との)輝度差が所定閾値より大きいか否かで2値化することでエッジ画像を生成する。膨張収縮処理は、エッジ画像に対して膨張処理を行った後に収縮処理を行うことで、エッジの不適切な途切れを抑制する。ここでは、エッジ画像に対して膨張収縮処理を行うことで得られた2値画像が、対象画像とされる。 Specifically, the target image acquisition unit 22 performs reduction processing (resolution conversion), conversion to a grayscale image, edge enhancement processing, and expansion/contraction processing on the read image obtained by reading the image of the document. Note that conversion to a grayscale image is omitted when the read image contains luminance data (such as when the read image is a grayscale image). In addition, the edge enhancement processing generates an edge image by binarizing the pixel value of each pixel in the reduced image obtained from the read image by the reduction processing according to whether the spatial luminance difference (with adjacent pixels) is greater than a predetermined threshold. The expansion/contraction processing suppresses inappropriate edge discontinuities by performing a contraction process after performing an expansion process on the edge image. Here, the binary image obtained by performing the expansion/contraction process on the edge image is treated as the target image.

なお、対象画像取得部22は、原稿の画像読取によって得られた読取画像を対象画像としてもよい。 The target image acquisition unit 22 may also use the scanned image obtained by scanning an image of a document as the target image.

エッジ形状検出部23は、対象画像内の原稿画像の先端エッジおよび後端エッジの少なくとも一方(つまり、主走査方向に沿って延びるエッジ)のエッジ形状を検出する。 The edge shape detection unit 23 detects the edge shape of at least one of the leading edge and trailing edge of the document image in the target image (i.e., the edge extending along the main scanning direction).

図2は、対象画像における非端部区間について説明する図である。図3は、非端部区間のエッジに対応する近似直線について説明する図である。 Figure 2 is a diagram explaining non-edge sections in a target image. Figure 3 is a diagram explaining approximate straight lines corresponding to edges of non-edge sections.

また、エッジ形状検出部23は、例えば図2に示すように、対象画像の全幅W(主走査方向の幅)から対象画像における両側の所定幅dWの端部を除外した非端部区間VWにおいて、対象画像内の原稿画像の先端エッジおよび後端エッジの少なくとも一方のエッジ形状を検出する。具体的には、エッジ形状検出部23は、(a)対象画像における両側の所定幅dWの端部を除外した非端部区間VWのエッジに対応する近似直線を特定し、(b)非端部区間のエッジに対応する近似直線が所定閾値以上の正解率で得られるか否かを判定する。さらに、エッジ形状検出部23は、(a)非端部区間のエッジに対応する近似直線が所定閾値以上の正解率で得られる場合、後述の区分形状探索処理を行わず、(b)非端部区間のエッジに対応する近似直線が所定閾値以上の正解率で得られない場合、後述の区分形状探索処理を行う。 Also, as shown in FIG. 2, the edge shape detection unit 23 detects at least one edge shape of the leading edge and trailing edge of the document image in the target image in a non-end section VW obtained by excluding the ends of a predetermined width dW on both sides of the target image from the total width W (width in the main scanning direction) of the target image. Specifically, the edge shape detection unit 23 (a) identifies an approximation straight line corresponding to the edge of the non-end section VW obtained by excluding the ends of a predetermined width dW on both sides of the target image, and (b) determines whether or not the approximation straight line corresponding to the edge of the non-end section can be obtained with a correct answer rate equal to or higher than a predetermined threshold. Furthermore, the edge shape detection unit 23 (a) does not perform a division shape search process described later if an approximation straight line corresponding to the edge of the non-end section can be obtained with a correct answer rate equal to or higher than a predetermined threshold, and (b) performs a division shape search process described later if an approximation straight line corresponding to the edge of the non-end section cannot be obtained with a correct answer rate equal to or higher than a predetermined threshold.

なお、近似直線は、当該区間において主走査方向に沿って所定間隔でサンプリングされた複数のエッジ点の座標値に基づいて最小二乗法によって導出される(以下の近似直線も同様に導出される)。 The approximation line is derived by the least squares method based on the coordinate values of multiple edge points sampled at a predetermined interval along the main scanning direction in that section (the approximation lines below are derived in the same way).

ここで、エッジ画像に対して膨張収縮処理を行うことで得られた2値画像が対象画像とされている場合、エッジ点は、その2値のうち、エッジ位置を示す値を有するエッジ画素であって、先端エッジについては対象画像の上端から探索して最初に検出されるエッジ画素であり、後端エッジについては対象画像の下端から探索して最初に検出されるエッジ画素である。 When the target image is a binary image obtained by performing an expansion/contraction process on the edge image, an edge point is an edge pixel that has a value that indicates the edge position among the binary values, and for a leading edge, it is the edge pixel that is first detected by searching from the top edge of the target image, and for a trailing edge, it is the edge pixel that is first detected by searching from the bottom edge of the target image.

また、対象画像が2値化されておらず、読取画像と同様の多階調を有する画像である場合、エッジ点は、副走査方向において隣接する画素との輝度差が所定閾値以上であるエッジ画素であって、先端エッジについては対象画像の上端から探索して最初に検出されるエッジ画素であり、後端エッジについては対象画像の下端から探索して最初に検出されるエッジ画素である。 In addition, if the target image is not binarized and is an image with multiple gradations similar to the scanned image, an edge point is an edge pixel whose luminance difference with adjacent pixels in the sub-scanning direction is equal to or greater than a predetermined threshold, and for the leading edge, it is the edge pixel that is first detected when searching from the top edge of the target image, and for the trailing edge, it is the edge pixel that is first detected when searching from the bottom edge of the target image.

また、上述の所定幅dWは、次式に従って、原稿の画像読取時の斜行における所定の最大斜行角度θに対応して定数として設定されている。 The above-mentioned predetermined width dW is set as a constant corresponding to the predetermined maximum skew angle θ during skew when reading an image of the document, according to the following formula:

dW=H×sin(θ) dW = H × sin(θ)

ここで、Hは、原稿画像の高さであり、画像読取対象の原稿のサイズから予め特定される。 Here, H is the height of the document image, which is determined in advance based on the size of the document to be scanned.

また、上述の正解率は、特定区間(ここでは、非端部区間)においてサンプリングされたエッジ点のうち、近似直線から所定範囲(副走査方向における所定範囲)内に位置するエッジ点の割合である(以下の正解率も同様である)。 The accuracy rate mentioned above is the percentage of edge points that are located within a specified range (specified range in the sub-scanning direction) from the approximation line among the edge points sampled in a specific section (here, a non-end section) (the same applies to the accuracy rates below).

画像欠損がない場合には、例えば図3に示すエッジ点P1~P9のように、直線状に位置するエッジ点が検出されるので、近似直線からの距離が短いエッジ点が多くなり正解率が高くなる。一方、画像欠損がある場合には、例えば図3に示すエッジ点P1~P6,Pa,Pb,Pcのように、直線状に位置していないエッジ点が検出されるので、近似直線からの距離が短いエッジ点が少なくなり正解率が低くなる。 When there is no image loss, edge points located in a straight line, such as edge points P1 to P9 shown in Figure 3, are detected, so there are more edge points that are a short distance from the approximation line, and the accuracy rate is high. On the other hand, when there is an image loss, edge points that are not located in a straight line, such as edge points P1 to P6, Pa, Pb, and Pc shown in Figure 3, are detected, so there are fewer edge points that are a short distance from the approximation line, and the accuracy rate is low.

図4は、部分短区間に対応する区分形状について説明する図である。 Figure 4 is a diagram explaining the segment shapes corresponding to partial short sections.

さらに、エッジ形状検出部23は、対象画像の所定方向(ここでは主走査方向)における最初の部分短区間を設定してから、部分短区間に対応する区分形状を導出する区分形状探索処理を繰り返して実行することで、エッジ形状を特定する。 Furthermore, the edge shape detection unit 23 identifies the edge shape by setting the first partial short section in a specified direction (here, the main scanning direction) of the target image and then repeatedly executing a segment shape search process to derive a segment shape corresponding to the partial short section.

区分形状探索処理において、エッジ形状検出部23は、例えば図4に示すように、(a)(現時点で設定されている)部分短区間#iのエッジに対応する近似直線#i(図4では近似直線#1)を特定して、その近似直線#iを、部分短区間#iについての区分形状とし、(b)その部分短区間#iの外側に向かって(つまり、部分短区間#iの少なくとも一方の側から対象画像の主走査方向における端部に向かって)所定間隔でエッジ点PEi-jをサンプリングして検出していき、その近似直線#iからエッジ点PEi-jまでの距離dEが所定範囲TH(副走査方向における所定範囲)内にあるか否かを判定し、その近似直線からエッジ点PEi-jまでの距離dEが所定範囲THを超えた場合には、そのエッジ点Pi-jの位置に対応して次の部分短区間#(i+1)(図4では近似直線#2)を設定する。 In the segment shape search process, the edge shape detection unit 23, as shown in FIG. 4, for example, (a) identifies an approximation line #i (approximation line #1 in FIG. 4) corresponding to the edge of the partial short section #i (currently set), and sets the approximation line #i as the segment shape for the partial short section #i; (b) samples and detects edge points PEi-j at predetermined intervals toward the outside of the partial short section #i (i.e., from at least one side of the partial short section #i toward the end in the main scanning direction of the target image), and determines whether the distance dE from the approximation line #i to the edge point PEi-j is within a predetermined range TH (a predetermined range in the sub-scanning direction); and if the distance dE from the approximation line to the edge point PEi-j exceeds the predetermined range TH, sets the next partial short section #(i+1) (approximation line #2 in FIG. 4) corresponding to the position of the edge point Pi-j.

1つの部分短区間について得られる区分形状は、近似直線の(一次式)(あるいは、その数式および区間の端点座標)で示され、エッジ形状情報に含められて記憶装置17やコントローラー16のRAMに記憶される。 The segment shape obtained for one partial short section is represented by an approximate straight line (linear expression) (or the expression and the coordinates of the end points of the section), and is included in the edge shape information and stored in the memory device 17 or the RAM of the controller 16.

図4に示す場合では、部分短区間#1(最初の部分短区間)の一方の外側(主走査方向の正方向)に向かってエッジ点PE1-jがサンプリングされていき、部分短区間#1に対応する近似直線#1からエッジ点PE1-7までの距離dEが所定範囲TH外となったため、エッジ点PE1-7の位置から所定幅の部分短区間#2が設定される。そして、部分短区間#2に対応する近似直線#2が導出され、同一の方向に向かって、エッジ点PE2-jがサンプリングされ検出されていき、側端エッジの位置となりエッジ点が検出されなくなるため、この方向(一方の外側方向)についての区分形状(近似直線)の探索が終了する。同様に、部分短区間#1(最初の部分短区間)の他方の外側(主走査方向の負方向)についても、区分形状(近似直線)の探索が行われる。そして、両方向への探索で検出された区分形状(近似直線)が、先端エッジのエッジ形状を構成する複数の区分形状(近似直線)としてエッジ形状情報に含められる。 In the case shown in FIG. 4, edge point PE1-j is sampled toward one outside (positive direction of main scanning direction) of partial short section #1 (first partial short section), and the distance dE from the approximation line #1 corresponding to partial short section #1 to edge point PE1-7 falls outside the predetermined range TH, so partial short section #2 of a predetermined width is set from the position of edge point PE1-7. Then, approximation line #2 corresponding to partial short section #2 is derived, and edge point PE2-j is sampled and detected toward the same direction, and the edge point is no longer detected at the position of the side edge, so the search for the segment shape (approximation line) in this direction (one outer direction) ends. Similarly, a search for a segment shape (approximation line) is also performed for the other outside (negative direction of main scanning direction) of partial short section #1 (first partial short section). Then, the segment shapes (approximation lines) detected by the search in both directions are included in the edge shape information as multiple segment shapes (approximation lines) that constitute the edge shape of the leading edge.

なお、上述の部分短区間は、原稿の上辺または下辺の10分の1程度の幅に対応する区間であって、上述の最初の部分短区間#1は、ここでは約2cmであり、上述の次の部分短区間#i(i>1)は、最初の部分短区間より短く、ここでは約1.5cmである。 Note that the above-mentioned partial short sections are sections that correspond to approximately one-tenth the width of the top or bottom edge of the document, with the first partial short section #1 being approximately 2 cm in this case, and the next partial short section #i (i>1) being shorter than the first partial short section, being approximately 1.5 cm in this case.

また、上述の最初の部分短区間について、エッジ形状検出部23は、(a)最初の部分短区間の候補として、対象画像の所定方向(ここでは、主走査方向)における所定区間を選択し、(b)その所定区間のエッジに対応する近似直線が所定閾値以上の正解率で得られるか否かを判定し、(c)その所定区間のエッジに対応する近似直線が所定閾値以上の正解率で得られる場合には、その所定区間を最初の部分短区間とし、(d)その所定区間のエッジに対応する近似直線が所定閾値以上の正解率で得られない場合には、その所定区間とは別の区間を選択し、その別の区間のエッジに対応する近似直線が所定閾値以上の正解率で得られる場合には、その別の区間を最初の部分短区間とする。ここでの正解率は、所定区間において、近似直線から所定範囲(副走査方向における所定範囲)内にあるエッジ点の割合である。 For the first partial short section, the edge shape detection unit 23 (a) selects a specified section in a specified direction (here, the main scanning direction) of the target image as a candidate for the first partial short section, (b) determines whether an approximation line corresponding to the edge of the specified section can be obtained with an accuracy rate equal to or higher than a specified threshold, (c) sets the specified section as the first partial short section if an approximation line corresponding to the edge of the specified section can be obtained with an accuracy rate equal to or higher than a specified threshold, and (d) selects a section other than the specified section if an approximation line corresponding to the edge of the specified section cannot be obtained with an accuracy rate equal to or higher than a specified threshold, and sets the other section as the first partial short section if an approximation line corresponding to the edge of the other section can be obtained with an accuracy rate equal to or higher than a specified threshold. The accuracy rate here is the percentage of edge points in the specified section that are within a specified range (specified range in the sub-scanning direction) from the approximation line.

つまり、近似直線が所定閾値以上の正解率で得られる区間(部分短区間と同一幅を有する区間)が探索される。ここでは、まず、最初の区間(上述の所定区間)として、対象画像において主走査方向における中央の区間が選択される。この区間で上述のような近似直線が得られない場合には、最初の区間の、右および左のうちの一方に隣接する区間(上述の別の区間)が選択される。この区間で上述のような近似直線が得られない場合には、最初の区間の、右および左のうちの他方に隣接する区間(上述の別の区間)が選択される。 In other words, a search is made for a section (a section having the same width as the partial short section) in which an approximate straight line can be obtained with an accuracy rate equal to or higher than a predetermined threshold. Here, first, the central section in the main scanning direction in the target image is selected as the first section (the above-mentioned predetermined section). If an approximate straight line as described above cannot be obtained in this section, a section adjacent to either the right or left of the first section (the above-mentioned other section) is selected. If an approximate straight line as described above cannot be obtained in this section, a section adjacent to the other of the right or left of the first section (the above-mentioned other section) is selected.

なお、区分形状探索処理における所定範囲は、正解率を導出する際に使用する所定範囲と同じでもよいし、異なっていてもよい。 The specified range in the segment shape search process may be the same as the specified range used when deriving the accuracy rate, or it may be different.

また、欠損判定部24は、検出されたエッジ形状に基づいて、原稿画像の欠損が発生しているか否かを判定する。具体的には、欠損判定部24は、検出されたエッジ形状に基づいて欠損面積を特定し、欠損面積に基づいて、原稿画像に欠損が発生しているか否かを判定する。 The loss determination unit 24 also determines whether or not a loss has occurred in the document image based on the detected edge shape. Specifically, the loss determination unit 24 identifies the loss area based on the detected edge shape, and determines whether or not a loss has occurred in the document image based on the loss area.

図5は、欠損面積について説明する図である。ここで、欠損面積は、例えば図5に示すように、対象画像の所定方向における特定の部分短区間のエッジの近似直線(ここでは、最初の部分短区間#1に対応する近似直線#1)とエッジ形状で特定されるエッジとに挟まれる1または複数の領域の面積である。 Figure 5 is a diagram explaining the missing area. Here, the missing area is the area of one or more regions between an approximation line of the edge of a specific partial short section in a specified direction of the target image (here, approximation line #1 corresponding to the first partial short section #1) and an edge specified by the edge shape, as shown in Figure 5, for example.

例えば、図5に示すように3つの近似直線#1,#2,#3が検出された場合、まず、最初の部分短区間についての近似直線#1と隣接する部分短区間についての近似直線#2,#3との交点C1,C2の座標値がそれぞれ導出される。図5では、近似直線#2,#3の外側に近似直線はないが、近似直線#2,#3の外側に近似直線がある場合には、順次、近似直線の交点の座標値が導出される。他方、側端エッジあるいは非端部区間の端点に接続する区分形状の近似直線#2,#3については、区分形状の近似直線#2,#3と、側端エッジあるいは非端部区間の端点との交点Ce1,Ce2の座標値がそれぞれ導出される。このようにして得られた交点C1,C2,・・・,Ce1,Ce2と、近似直線#1とに基づき、ここでは2つの欠損領域の形状が特定され、その欠損領域の面積A1,A2が導出される。そして、上述の欠損面積Aは、欠損領域の面積A1,A2の総和とされる。 For example, when three approximate lines #1, #2, and #3 are detected as shown in FIG. 5, the coordinate values of the intersections C1 and C2 between the approximate line #1 for the first partial short section and the approximate lines #2 and #3 for the adjacent partial short sections are derived. In FIG. 5, there is no approximate line outside the approximate lines #2 and #3, but if there is an approximate line outside the approximate lines #2 and #3, the coordinate values of the intersections of the approximate lines are derived in sequence. On the other hand, for the approximate lines #2 and #3 of the segment shape that connect to the end points of the side edge or non-end section, the coordinate values of the intersections Ce1 and Ce2 between the approximate lines #2 and #3 of the segment shape and the end points of the side edge or non-end section are derived. Based on the intersections C1, C2, ..., Ce1, Ce2 and the approximate line #1 obtained in this way, the shapes of the two missing areas are specified, and the areas A1 and A2 of the missing areas are derived. The above-mentioned missing area A is the sum of the areas A1 and A2 of the missing areas.

また、欠損判定部24は、先端エッジまたは後端エッジについて、非端部区間のエッジに対応する近似直線が所定閾値以上の正解率で得られない場合、そのエッジについて、区分形状探索処理によって検出されたエッジ形状に基づいて、原稿画像に欠損が発生しているか否かを判定する。 In addition, when an approximation straight line corresponding to the edge of a non-end section for a leading edge or trailing edge cannot be obtained with an accuracy rate equal to or higher than a predetermined threshold, the defect determination unit 24 determines whether or not a defect has occurred in the document image for that edge based on the edge shape detected by the segment shape search process.

また、欠損判定部24は、先端エッジおよび後端エッジの両方について、非端部区間のエッジに対応する近似直線が所定閾値以上の正解率で得られる場合において、先端エッジの近似直線と後端エッジの近似直線とが略平行であるときには、原稿画像に欠損が発生していないと判定し、先端エッジの近似直線と後端エッジの近似直線とが略平行ではないときには、原稿画像に欠損が発生していると判定する。 In addition, for both the leading edge and the trailing edge, when an approximation line corresponding to the edge of the non-end section is obtained with an accuracy rate equal to or higher than a predetermined threshold, the loss determination unit 24 determines that no loss has occurred in the original image if the approximation line of the leading edge and the approximation line of the trailing edge are approximately parallel, and determines that a loss has occurred in the original image if the approximation line of the leading edge and the approximation line of the trailing edge are not approximately parallel.

次に、実施の形態1に係る画像処理装置の動作について説明する。図6は、実施の形態1に係る画像処理装置の動作について説明するフローチャートである。図7は、図6における検査処理(ステップS13,S16)について説明するフローチャートである。 Next, the operation of the image processing device according to the first embodiment will be described. FIG. 6 is a flowchart illustrating the operation of the image processing device according to the first embodiment. FIG. 7 is a flowchart illustrating the inspection process (steps S13 and S16) in FIG. 6.

制御部21は、画像読取を伴うジョブのジョブ要求を受け付けると、まず、画像読取部11に、原稿の画像読取を実行させ、画像読取部11から読取画像の画像データを取得して保存するとともに、対象画像取得部22、エッジ形状検出部23、および欠損判定部24に、以下のように検査処理を実行させる。 When the control unit 21 receives a job request for a job involving image reading, it first causes the image reading unit 11 to read the image of the document, acquires and stores image data of the read image from the image reading unit 11, and causes the target image acquisition unit 22, edge shape detection unit 23, and defect determination unit 24 to perform inspection processing as follows.

まず、対象画像取得部22は、読取画像に対して前処理(上述の縮小処理など)を実行して対象画像を生成する(ステップS11)。 First, the target image acquisition unit 22 performs preprocessing (such as the reduction process described above) on the scanned image to generate a target image (step S11).

次に、制御部21は、まず、原稿の上辺(先端エッジ)を検査対象として選択し(ステップS12)、対象画像取得部22、エッジ形状検出部23、および欠損判定部24に、先端エッジについての検査処理を実行させる(ステップS13)。 Next, the control unit 21 first selects the top edge (leading edge) of the document as the inspection target (step S12), and causes the target image acquisition unit 22, edge shape detection unit 23, and defect determination unit 24 to perform inspection processing on the leading edge (step S13).

制御部21は、上辺(先端エッジ)についての検査処理(ステップS13)の検査結果に基づいて、上辺(先端エッジ)において画像欠損が検出されたか否かを判定する(ステップS14)。 Based on the results of the inspection process for the top edge (leading edge) (step S13), the control unit 21 determines whether or not an image defect has been detected on the top edge (leading edge) (step S14).

上辺(先端エッジ)において画像欠損が発生していないと判定した場合、制御部21は、原稿の下辺(後端エッジ)を検査対象として選択し(ステップS15)、対象画像取得部22、エッジ形状検出部23、および欠損判定部24に、後端エッジについての検査処理を実行させる(ステップS16)。 If it is determined that there is no image loss on the top edge (leading edge), the control unit 21 selects the bottom edge (trailing edge) of the document as the inspection target (step S15), and causes the target image acquisition unit 22, edge shape detection unit 23, and loss determination unit 24 to perform inspection processing on the trailing edge (step S16).

制御部21は、下辺(後端エッジ)についての検査処理(ステップS16)の検査結果に基づいて、下辺(後端エッジ)において画像欠損が検出されたか否かを判定する(ステップS17)。 Based on the results of the inspection process for the bottom edge (rear end edge) (step S16), the control unit 21 determines whether or not an image defect has been detected at the bottom edge (rear end edge) (step S17).

下辺(後端エッジ)において画像欠損が発生していないと判定された場合、欠損判定部24は、先端エッジのエッジ形状(近似直線)と後端エッジのエッジ形状(近似直線)とを参照し、両者が略平行であるか否かを判定する(ステップS18)。ここで、両者間の角度が所定閾値未満であれば、両者が略平行であると判定される。 If it is determined that no image loss has occurred on the bottom side (rear edge), the loss determination unit 24 refers to the edge shape (approximate straight line) of the leading edge and the edge shape (approximate straight line) of the rear edge and determines whether they are approximately parallel (step S18). Here, if the angle between them is less than a predetermined threshold, it is determined that they are approximately parallel.

なお、エッジ形状が複数の区分形状(つまり、複数の近似直線)を有する場合には、例えば、複数の区分形状のうちの最も長い区分形状の近似直線や、対象画像の中央に位置する区分形状の近似直線を使用して、先端エッジの近似直線の傾き角と後端エッジ近似直線の傾き角との差分が導出され、その差分に基づいて、両者が略平行であるか否かが判定される。 When the edge shape has multiple segment shapes (i.e. multiple approximate straight lines), for example, the approximation straight line of the longest segment shape among the multiple segment shapes or the approximation straight line of the segment shape located at the center of the target image is used to derive the difference between the inclination angle of the approximation straight line of the leading edge and the approximation straight line of the trailing edge, and based on that difference, it is determined whether the two are approximately parallel.

ここで、両者が略平行であると判定された場合、制御部21は、当該対象画像に画像欠損が発生していないと判定する(ステップS19)。 If it is determined that the two are approximately parallel, the control unit 21 determines that no image loss has occurred in the target image (step S19).

一方、ステップS14またはステップS17において画像欠損が検出されたと判定された場合、およびステップS18において先端エッジのエッジ形状および後端エッジのエッジ形状が略平行ではないと判定された場合、制御部21は、当該対象画像に画像欠損が発生していると判定する(ステップS20)。 On the other hand, if it is determined in step S14 or step S17 that an image defect has been detected, and if it is determined in step S18 that the edge shape of the leading edge and the edge shape of the trailing edge are not approximately parallel, the control unit 21 determines that an image defect has occurred in the target image (step S20).

ここで、図7を参照して、ステップS13およびステップS16の検査処理について説明する。 Now, with reference to Figure 7, we will explain the inspection process in steps S13 and S16.

まず、エッジ形状検出部23は、検査対象のエッジ(先端エッジまたは後端エッジ)について、非端部区間VWを設定し(ステップS41)、非端部区間VWにおいて所定間隔でエッジ点をサンプリングし、エッジ点の座標値に基づいて近似直線を導出し(ステップS42)、非端部区間VWにおける正解率が所定閾値以上であるか否かを判定する(ステップS43)。なお、この所定間隔は、区分形状探索処理におけるエッジ点の間隔より広く設定される。 First, the edge shape detection unit 23 sets a non-end section VW for the edge to be inspected (leading edge or trailing edge) (step S41), samples edge points at a predetermined interval in the non-end section VW, derives an approximate straight line based on the coordinate values of the edge points (step S42), and determines whether the accuracy rate in the non-end section VW is equal to or greater than a predetermined threshold (step S43). Note that this predetermined interval is set wider than the interval between edge points in the segment shape search process.

正解率が所定閾値以上であると判定された場合、エッジ形状検出部23は、当該近似直線を1つの区分形状として含むエッジ形状情報を記憶し(ステップS44)、欠損判定部24は、当該検査対象のエッジでは画像欠損が検出されなかったと判定し(ステップS45)、検査処理を終了する。 If it is determined that the accuracy rate is equal to or greater than a predetermined threshold, the edge shape detection unit 23 stores edge shape information including the approximation line as one segment shape (step S44), and the defect determination unit 24 determines that no image defect has been detected at the edge of the inspection target (step S45), and the inspection process ends.

一方、正解率が所定閾値未満であると判定された場合、エッジ形状検出部23は、まず、部分短区間設定処理を行い、最初の部分短区間の設定を試みる(ステップS46)。 On the other hand, if it is determined that the accuracy rate is less than the predetermined threshold, the edge shape detection unit 23 first performs a partial short section setting process and attempts to set the first partial short section (step S46).

具体的には、部分短区間設定処理では、エッジ形状検出部23は、上述のように、部分短区間の候補となる区間を設定し、その区間でサンプリングされたエッジ点に基づく近似直線を導出し、正解率が所定閾値以上である近似直線が得られる区間を、最初の部分短区間とする。そして、所定回数の候補区間を設定して最初の部分短区間を探索したにも拘わらず、正解率が所定閾値以上である近似直線が得られる区間が発見されなかった場合には、エッジ形状検出部23は、最初の部分短区間を設定せずに、部分短区間設定処理を終了する。 Specifically, in the partial short section setting process, the edge shape detection unit 23 sets sections that are candidates for partial short sections as described above, derives an approximation line based on the edge points sampled in that section, and sets the section in which an approximation line with an accuracy rate of a predetermined threshold or higher is obtained as the first partial short section. Then, if a section in which an approximation line with an accuracy rate of a predetermined threshold or higher is obtained is not found despite setting a predetermined number of candidate sections and searching for the first partial short section, the edge shape detection unit 23 ends the partial short section setting process without setting the first partial short section.

そして、欠損判定部24は、部分短区間設定処理において、最初の部分短区間が設定されたか否かを判定し(ステップS47)、最初の部分短区間が設定されなかった場合には、欠損判定部24は、当該検査対象のエッジについて画像欠損が検出されたと判定し(ステップS48)、検査処理を終了する。 Then, the loss determination unit 24 determines whether or not the first partial short section has been set in the partial short section setting process (step S47), and if the first partial short section has not been set, the loss determination unit 24 determines that an image loss has been detected for the edge to be inspected (step S48), and ends the inspection process.

一方、最初の部分短区間が設定された場合、エッジ形状検出部23は、その部分短区間についての近似直線(ここでは、部分短区間設定処理(ステップS46)で当該区間について特定されたもの)を1つの区分形状として当該検査対象のエッジのエッジ形状情報に追加する(ステップS49)。 On the other hand, when the first partial short section is set, the edge shape detection unit 23 adds the approximation line for that partial short section (here, the line identified for that section in the partial short section setting process (step S46)) as one segment shape to the edge shape information of the edge being inspected (step S49).

次に、エッジ形状検出部23は、当該区分形状に別の区分形状が連続しているか否かを判定する(ステップS50)。 Next, the edge shape detection unit 23 determines whether the segment shape is adjacent to another segment shape (step S50).

具体的には、エッジ形状検出部23は、エッジ点がサンプリングされなくなるか、近似直線からの距離が所定範囲外となるエッジ点(以下、範囲外エッジ点という)が現れるまで、部分短区間の端点から所定間隔でエッジ点をサンプリングしていき、(a)近似直線からの距離が所定範囲外となるエッジ点が現れた場合、当該区分形状に別の区分形状が連続していると判定し、(b)近似直線からの距離が所定範囲外となるエッジ点が現れずにエッジ点がサンプリングされなくなった場合(つまり、ここでは非端部区間の端点まですべてのエッジ点が近似直線から所定範囲内の距離に位置している場合)、当該区分形状に別の区分形状が連続していないと判定する。 Specifically, the edge shape detection unit 23 samples edge points at a predetermined interval from the endpoints of the partial short intervals until no edge points are sampled or an edge point whose distance from the approximation line is outside a predetermined range (hereinafter referred to as an out-of-range edge point) appears, and (a) if an edge point whose distance from the approximation line is outside the predetermined range appears, it determines that the segment shape is continuous with another segment shape, and (b) if an edge point whose distance from the approximation line is outside the predetermined range does not appear and no edge points are sampled (in other words, in this case, all edge points up to the endpoints of the non-end intervals are located at distances within a predetermined range from the approximation line), it determines that the segment shape is not continuous with another segment shape.

当該区分形状に別の区分形状が連続していると判定した場合、エッジ形状検出部23は、検出した範囲外エッジ点に基づいて、次の部分短区間(そのエッジ点から所定幅の区間)の設定を試みる(ステップS51)。 If it is determined that the segment shape is adjacent to another segment shape, the edge shape detection unit 23 attempts to set the next partial short section (a section of a specified width from that edge point) based on the detected out-of-range edge point (step S51).

具体的には、エッジ形状検出部23は、その範囲外エッジ点から所定幅の区間を次の部分短区間の候補とし、部分短区間設定処理(ステップS46)と同様に、その区間についての近似直線を導出し正解率を導出し、その正解率が所定閾値以上であれば、その候補区間を次の部分短区間として設定し、その正解率が所定閾値未満であれば、次の部分短区間を設定しない。 Specifically, the edge shape detection unit 23 sets a section of a predetermined width from the out-of-range edge point as a candidate for the next partial short section, and similarly to the partial short section setting process (step S46), derives an approximation line for that section and derives the accuracy rate. If the accuracy rate is equal to or greater than a predetermined threshold, the candidate section is set as the next partial short section, and if the accuracy rate is less than the predetermined threshold, the next partial short section is not set.

そして、エッジ形状検出部23は、次の部分短区間が設定されたか否かを判定し(ステップS52)、次の部分短区間が設定された場合には、設定した当該次の部分短区間についてステップS49以降の処理を同様に実行する。一方、次の部分短区間が設定されなかった場合には、欠損判定部24は、当該検査対象のエッジについて画像欠損が検出されたと判定し(ステップS48)、検査処理を終了する。 Then, the edge shape detection unit 23 determines whether the next partial short section has been set (step S52), and if the next partial short section has been set, similarly performs the processes from step S49 onwards for the set next partial short section. On the other hand, if the next partial short section has not been set, the loss determination unit 24 determines that an image loss has been detected for the edge to be inspected (step S48), and ends the inspection process.

このようにして、エッジ形状検出部23は、別の区分形状が連続しなくなるまで区分形状探索処理を実行して、エッジ形状を特定する。 In this way, the edge shape detection unit 23 performs the segment shape search process to identify the edge shape until no other segment shapes are found in succession.

そして、現時点の区分形状に別の区分形状が連続していないと判定された場合、欠損判定部24は、特定されたエッジ形状に基づいて、上述の欠損面積が所定閾値以上であるか否かを判定(ステップS53)。そして、欠損面積が所定閾値以上である場合、欠損判定部24は、画像欠損が検出されたと判定し(ステップS48)、検査処理を終了する。一方、欠損面積が所定閾値未満である場合、欠損判定部24は、画像欠損が検出されなかったと判定し(ステップS45)、検査処理を終了する。 If it is determined that the current partition shape is not adjacent to another partition shape, the loss determination unit 24 determines whether the above-mentioned loss area is equal to or greater than a predetermined threshold based on the identified edge shape (step S53). If the loss area is equal to or greater than the predetermined threshold, the loss determination unit 24 determines that an image loss has been detected (step S48) and ends the inspection process. On the other hand, if the loss area is less than the predetermined threshold, the loss determination unit 24 determines that an image loss has not been detected (step S45) and ends the inspection process.

以上のように、上記実施の形態1によれば、エッジ形状検出部23は、対象画像内の原稿画像の先端エッジおよび後端エッジの少なくとも一方のエッジ形状を検出する。欠損判定部24は、検出されたエッジ形状に基づいて、原稿画像の欠損が発生しているか否かを判定する。そして、エッジ形状検出部23は、対象画像の所定方向における最初の部分短区間を設定してから、部分短区間に対応する区分形状を導出する区分形状探索処理を繰り返して実行することで、エッジ形状を特定する。さらに、エッジ形状検出部23は、区分形状探索処理において、(a)部分短区間のエッジに対応する近似直線を特定して、特定した近似直線を区分形状とし、(b)部分短区間の少なくとも一方の側からその所定方向における端部に向かって所定間隔でエッジ点を検出していき、近似直線からエッジ点までの距離が所定範囲外となった場合には、エッジ点に対応して次の部分短区間を設定する。 As described above, according to the first embodiment, the edge shape detection unit 23 detects the edge shape of at least one of the leading edge and trailing edge of the document image in the target image. The loss determination unit 24 determines whether or not a loss has occurred in the document image based on the detected edge shape. Then, the edge shape detection unit 23 sets the first partial short section in a predetermined direction of the target image, and then repeatedly executes a segment shape search process to derive a segment shape corresponding to the partial short section, thereby identifying the edge shape. Furthermore, in the segment shape search process, the edge shape detection unit 23 (a) identifies an approximation line corresponding to the edge of the partial short section, and sets the identified approximation line as the segment shape, and (b) detects edge points at a predetermined interval from at least one side of the partial short section toward the end in the predetermined direction, and when the distance from the approximation line to the edge point falls outside the predetermined range, sets the next partial short section corresponding to the edge point.

これにより、サンプリングするエッジ点が比較的少なくて済むため、比較的少ない計算量で適切に原稿画像の欠損が検出される。 This allows a relatively small number of edge points to be sampled, so defects in the original image can be detected appropriately with a relatively small amount of calculation.

また、上記実施の形態1によれば、エッジ形状検出部23は、対象画像における両側の所定幅の端部を除外した非端部区間において、対象画像内の原稿画像の先端エッジおよび後端エッジの少なくとも一方のエッジ形状を検出する。ここで、その所定幅は、原稿の画像読取時の斜行における所定の最大斜行角度に対応して設定されている。 Furthermore, according to the above-mentioned first embodiment, the edge shape detection unit 23 detects the edge shape of at least one of the leading edge and trailing edge of the document image in the target image in a non-end section excluding the ends of a predetermined width on both sides of the target image. Here, the predetermined width is set corresponding to a predetermined maximum skew angle in the skew when the document image is read.

これにより、サンプリングするエッジ点が比較的少なくて済むとともに、画像読取時の原稿の斜行に起因して側端エッジが誤ってエッジ点としてサンプリングされることが抑制されるため、比較的少ない計算量で適切に原稿画像の欠損が検出される。 This allows a relatively small number of edge points to be sampled and prevents side edges from being erroneously sampled as edge points due to skewing of the document during image reading, allowing defects in the document image to be properly detected with a relatively small amount of calculation.

また、上記実施の形態1によれば、最初の部分短区間を設定する際に、エッジ形状検出部23は、(a)最初の部分短区間の候補として、対象画像の所定方向における所定区間を選択し、(b)所定区間のエッジに対応する近似直線が所定閾値以上の正解率で得られるか否かを判定し、(c)所定区間のエッジに対応する近似直線が所定閾値以上の正解率で得られる場合には、その所定区間を最初の部分短区間とし、(d)その所定区間のエッジに対応する近似直線が所定閾値以上の正解率で得られない場合には、その所定区間とは別の区間を選択し、その別の区間のエッジに対応する近似直線が所定閾値以上の正解率で得られる場合には、その別の区間を最初の部分短区間とする。 Furthermore, according to the above-mentioned embodiment 1, when setting the first partial short section, the edge shape detection unit 23 (a) selects a specified section in a specified direction of the target image as a candidate for the first partial short section, (b) determines whether an approximation line corresponding to the edge of the specified section can be obtained with an accuracy rate equal to or higher than a specified threshold, (c) sets the specified section as the first partial short section if an approximation line corresponding to the edge of the specified section can be obtained with an accuracy rate equal to or higher than the specified threshold, and (d) selects a section other than the specified section if an approximation line corresponding to the edge of the specified section cannot be obtained with an accuracy rate equal to or higher than the specified threshold, and sets the other section as the first partial short section if an approximation line corresponding to the edge of the other section can be obtained with an accuracy rate equal to or higher than the specified threshold.

これにより、最初の部分短区間が得られやすくなり、区分形状探索処理によってサンプリングするエッジ点が比較的少なくて済むため、比較的少ない計算量で適切に原稿画像の欠損が検出される。 This makes it easier to obtain the initial partial short interval, and the number of edge points sampled by the segmented shape search process is relatively small, so defects in the original image can be detected appropriately with a relatively small amount of calculation.

また、上記実施の形態1によれば、欠損判定部24は、検出されたエッジ形状に基づいて欠損面積を特定し、その欠損面積に基づいて、原稿画像に欠損が発生しているか否かを判定する。ここで、欠損面積は、対象画像の所定方向における特定の部分短区間のエッジの近似直線とエッジ形状で特定されるエッジとに挟まれる領域の面積である。 Furthermore, according to the above-mentioned first embodiment, the loss determination unit 24 identifies a loss area based on the detected edge shape, and determines whether or not a loss has occurred in the document image based on the loss area. Here, the loss area is the area of the region between the approximation line of the edge of a specific partial short section in a specified direction of the target image and the edge identified by the edge shape.

これにより、比較的少ない計算量でエッジ形状情報から、エッジ形状が複雑であっても適切に原稿画像の欠損が検出される。 This allows defects in the original image to be properly detected from edge shape information with a relatively small amount of calculation, even if the edge shape is complex.

実施の形態2. Embodiment 2.

図8は、実施の形態2における画像読取部11を示す図である。 Figure 8 shows the image reading unit 11 in embodiment 2.

実施の形態2において、画像読取部11は、例えば図8に示すように、原稿のおもて面の画像読取を実行する第1画像読取部11aと、原稿の裏面の画像読取を実行する第2画像読取部11bとを備える。第1画像読取部11aおよび第2画像読取部11bは、1回の原稿搬送で両面スキャンが可能なように配置されており、制御部21は、両面スキャンジョブのジョブ要求を受け付けた場合、画像読取部11に、原稿の両面スキャンを実行させる。 In the second embodiment, the image reading unit 11 includes a first image reading unit 11a that performs image reading of the front side of the document, and a second image reading unit 11b that performs image reading of the back side of the document, as shown in FIG. 8, for example. The first image reading unit 11a and the second image reading unit 11b are arranged so that double-sided scanning is possible with one document transport, and when the control unit 21 receives a job request for a double-sided scan job, it causes the image reading unit 11 to perform double-sided scanning of the document.

第1画像読取部11aは、光源41aと、光源41aによって画像読取位置に照射された光の反射光を検出する光学系42aとを備える。第2画像読取部11bは、光源41bと、光源41bによって画像読取位置に照射された光の反射光を検出する光学系42bとを備える。なお、光学系42a,42bは、レンズなどの導光部材、導光部材を介して入射する反射光を検出するイメージングセンサーなどを含む。 The first image reading unit 11a includes a light source 41a and an optical system 42a that detects reflected light of light irradiated by the light source 41a to the image reading position. The second image reading unit 11b includes a light source 41b and an optical system 42b that detects reflected light of light irradiated by the light source 41b to the image reading position. The optical systems 42a and 42b include a light-guiding member such as a lens, an imaging sensor that detects reflected light incident through the light-guiding member, and the like.

第1画像読取部11aおよび第2画像読取部11bの一方(ここでは、第1画像読取部11a)は、原稿の搬送方向における画像読取位置より上流側に光源41aを備える。第1画像読取部11aおよび第2画像読取部11bの他方(ここでは、第2画像読取部11b)は、原稿の搬送方向における画像読取位置より下流側に光源41bを備える。 One of the first image reading unit 11a and the second image reading unit 11b (here, the first image reading unit 11a) has a light source 41a upstream of the image reading position in the document transport direction. The other of the first image reading unit 11a and the second image reading unit 11b (here, the second image reading unit 11b) has a light source 41b downstream of the image reading position in the document transport direction.

実施の形態2では、対象画像取得部22は、第1画像読取部11aによる原稿のおもて面の読取画像について上述の対象画像と同様に第1対象画像を取得し、第2画像読取部11bによる原稿の裏面の読取画像について上述の対象画像と同様に第2対象画像を取得する。 In the second embodiment, the target image acquisition unit 22 acquires a first target image similar to the target image described above for the image read by the first image reading unit 11a on the front side of the document, and acquires a second target image similar to the target image described above for the image read by the second image reading unit 11b on the back side of the document.

エッジ形状検出部23は、画像内の原稿画像の先端エッジおよび後端エッジの両方のエッジ形状を検出する。実施の形態2では、エッジ形状検出部23は、(a)第1対象画像内の原稿画像の先端エッジおよび後端エッジのエッジ形状の一方(ここでは、第1画像読取部11aによって影のできやすい先端エッジのエッジ形状)を検出し、(b)第2対象画像内の原稿画像の先端エッジおよび後端エッジのエッジ形状の他方(ここでは、第2画像読取部11bによって影のできやすい後端エッジのエッジ形状)を検出する。 The edge shape detection unit 23 detects the edge shapes of both the leading edge and trailing edge of the document image in the image. In the second embodiment, the edge shape detection unit 23 (a) detects one of the edge shapes of the leading edge and trailing edge of the document image in the first target image (here, the edge shape of the leading edge that is likely to be shaded by the first image reading unit 11a), and (b) detects the other of the edge shapes of the leading edge and trailing edge of the document image in the second target image (here, the edge shape of the trailing edge that is likely to be shaded by the second image reading unit 11b).

実施の形態2では、制御部21は、片面スキャンジョブのジョブ要求を受け付けた場合でも、画像読取部11に、原稿のおもて面および裏面の両方の画像読取を実行させて、対象画像取得部22、エッジ形状検出部23、および欠損判定部24に、先端エッジおよび後端エッジの両方についての画像欠損の検査を行わせる。 In the second embodiment, even when a job request for a single-sided scan job is received, the control unit 21 causes the image reading unit 11 to execute image reading of both the front and back sides of the document, and causes the target image acquisition unit 22, edge shape detection unit 23, and defect determination unit 24 to inspect both the leading edge and trailing edge for image defects.

なお、実施の形態2に係る画像読取装置のその他の構成および動作については実施の形態1と同様であるので、その説明を省略する。 Note that other configurations and operations of the image reading device in embodiment 2 are the same as those in embodiment 1, so their explanation is omitted.

以上のように、上記実施の形態2によれば、画像読取部11は、原稿のおもて面の画像読取を実行する第1画像読取部11aと、原稿の裏面の画像読取を実行する第2画像読取部11bとを備える。そして、第1画像読取部11aおよび第2画像読取部11bの一方は、原稿の搬送方向における画像読取位置より上流側に光源を備え、他方は、原稿の搬送方向における画像読取位置より下流側に光源を備える。そして、エッジ形状検出部23は、(a)おもて面についての第1対象画像内の原稿画像の先端エッジおよび後端エッジのエッジ形状の一方を検出し、(b)裏面についての第2対象画像内の原稿画像の先端エッジおよび後端エッジのエッジ形状の他方を検出する。 As described above, according to the second embodiment, the image reading unit 11 includes a first image reading unit 11a that performs image reading of the front side of the document, and a second image reading unit 11b that performs image reading of the back side of the document. One of the first image reading unit 11a and the second image reading unit 11b has a light source upstream of the image reading position in the document transport direction, and the other has a light source downstream of the image reading position in the document transport direction. The edge shape detection unit 23 (a) detects one of the edge shapes of the leading edge and the trailing edge of the document image in the first target image for the front side, and (b) detects the other edge shape of the leading edge and the trailing edge of the document image in the second target image for the back side.

これにより、先端エッジおよび後端エッジのいずれも第1対象画像および第2対象画像のいずれかにおいて明確に現れ、適切に検出されやすくなるため、適切に原稿画像の欠損が検出される。 As a result, both the leading and trailing edges appear clearly in either the first or second target image, making them easier to detect properly, and therefore defects in the document image can be properly detected.

なお、上述の実施の形態に対する様々な変更および修正については、当業者には明らかである。そのような変更および修正は、その主題の趣旨および範囲から離れることなく、かつ、意図された利点を弱めることなく行われてもよい。つまり、そのような変更および修正が請求の範囲に含まれることを意図している。 It should be noted that various changes and modifications to the above-described embodiments will be apparent to those skilled in the art. Such changes and modifications may be made without departing from the spirit and scope of the subject matter and without diminishing its intended advantages. In other words, such changes and modifications are intended to be included within the scope of the claims.

本発明は、例えば、画像読取装置に適用可能である。 The present invention can be applied to, for example, image reading devices.

11 画像読取部
11a 第1画像読取部
11b 第2画像読取部
21 制御部
22 対象画像取得部
23 エッジ形状検出部
24 欠損判定部
REFERENCE SIGNS LIST 11 image reading section 11a first image reading section 11b second image reading section 21 control section 22 target image acquisition section 23 edge shape detection section 24 defect determination section

Claims (5)

原稿の画像読取によって得られる読取画像または前記読取画像に対して所定の画像処理を実行して得られた画像を対象画像とし、前記対象画像内の原稿画像の先端エッジおよび後端エッジの少なくとも一方のエッジ形状を検出するエッジ形状検出部と、
検出された前記エッジ形状に基づいて、前記原稿画像に欠損が発生しているか否かを判定する欠損判定部とを備え、
前記エッジ形状検出部は、前記対象画像の所定方向における最初の部分短区間を設定してから、前記部分短区間に対応する区分形状を導出する区分形状探索処理を繰り返して実行することで、前記エッジ形状を特定し、
前記エッジ形状検出部は、(a)前記最初の部分短区間の候補として、前記対象画像の所定方向における所定区間を選択し、(b)前記所定区間のエッジに対応する近似直線が所定閾値以上の正解率で得られるか否かを判定し、(c)前記所定区間のエッジに対応する近似直線が所定閾値以上の正解率で得られる場合には、前記所定区間を前記最初の部分短区間とし、(d)前記所定区間のエッジに対応する近似直線が所定閾値以上の正解率で得られない場合には、前記所定区間とは別の区間を選択し、前記別の区間のエッジに対応する近似直線が前記所定閾値以上の正解率で得られる場合には、前記別の区間を前記最初の部分短区間とし、
前記正解率は、前記所定区間においてサンプリングされたエッジ点のうち、前記近似直線から所定範囲内にあるエッジ点の割合であること、
を特徴とする画像読取装置。
an edge shape detection unit that detects at least one edge shape of a leading edge and a trailing edge of an original image in a target image, the target image being a read image obtained by reading an image of an original document or an image obtained by performing a predetermined image processing on the read image;
a loss determination unit that determines whether or not a loss has occurred in the document image based on the detected edge shape,
the edge shape detection unit specifies the edge shape by repeatedly executing a segment shape search process that sets a first partial short section in a predetermined direction of the target image and then derives a segment shape corresponding to the partial short section;
The edge shape detection unit (a) selects a predetermined section in a predetermined direction of the target image as a candidate for the first partial short section, (b) determines whether an approximation straight line corresponding to the edge of the predetermined section can be obtained with an accuracy rate of a predetermined threshold or more, (c) if an approximation straight line corresponding to the edge of the predetermined section can be obtained with an accuracy rate of a predetermined threshold or more, sets the predetermined section as the first partial short section, (d) if an approximation straight line corresponding to the edge of the predetermined section cannot be obtained with an accuracy rate of a predetermined threshold or more, selects a section other than the predetermined section, and if an approximation straight line corresponding to the edge of the other section can be obtained with an accuracy rate of a predetermined threshold or more, sets the other section as the first partial short section,
the accuracy rate is a ratio of edge points that are within a predetermined range from the approximation line to the edge points sampled in the predetermined section;
An image reading device comprising:
前記エッジ形状検出部は、前記区分形状探索処理において、(a)前記部分短区間のエッジに対応する近似直線を特定して、特定した前記近似直線を前記区分形状とし、(b)前記部分短区間の少なくとも一方の側から前記対象画像の前記所定方向における端部に向かって所定間隔でエッジ点を検出していき、前記近似直線から前記エッジ点までの距離が所定範囲外となった場合には、前記エッジ点に対応して次の部分短区間を設定することを特徴とする請求項1記載の画像読取装置。 The image reading device according to claim 1, characterized in that, in the segment shape search process, the edge shape detection unit (a) identifies an approximation line corresponding to the edge of the partial short section, and sets the identified approximation line as the segment shape, and (b) detects edge points at a predetermined interval from at least one side of the partial short section toward the end of the target image in the predetermined direction, and when the distance from the approximation line to the edge point falls outside a predetermined range, sets the next partial short section corresponding to the edge point. 前記エッジ形状検出部は、(a)前記対象画像における両側の所定幅の端部を除外した非端部区間のエッジに対応する近似直線を特定し、(b)前記非端部区間のエッジに対応する近似直線が所定閾値以上の正解率で得られるか否かを判定し、
前記エッジ形状検出部は、(a)前記非端部区間のエッジに対応する近似直線が所定閾値以上の正解率で得られる場合、前記区分形状探索処理を行わず、(b)前記非端部区間のエッジに対応する近似直線が所定閾値以上の正解率で得られない場合、前記区分形状探索処理を行い、
前記欠損判定部は、前記先端エッジおよび前記後端エッジの一方のエッジについて、前記非端部区間のエッジに対応する近似直線が所定閾値以上の正解率で得られない場合、前記一方のエッジについて、前記区分形状探索処理によって検出された前記エッジ形状に基づいて、前記原稿画像に欠損が発生しているか否かを判定すること、
を特徴とする請求項1または請求項2記載の画像読取装置。
the edge shape detection unit (a) identifies an approximation straight line corresponding to an edge of a non-end section excluding end sections of a predetermined width on both sides in the target image, and (b) determines whether or not the approximation straight line corresponding to the edge of the non-end section can be obtained with an accuracy rate equal to or higher than a predetermined threshold;
the edge shape detection unit (a) does not perform the division shape search process when an approximation straight line corresponding to the edge of the non-end section is obtained with a correct answer rate of a predetermined threshold or more, and (b) performs the division shape search process when an approximation straight line corresponding to the edge of the non-end section is not obtained with a correct answer rate of a predetermined threshold or more,
when an approximation straight line corresponding to an edge of the non-end section cannot be obtained with a correct answer rate equal to or higher than a predetermined threshold value for one of the leading edge and the trailing edge, the loss determination unit determines whether or not a loss has occurred in the document image for the one edge based on the edge shape detected by the segment shape search process;
3. The image reading device according to claim 1, wherein:
前記欠損判定部は、前記先端エッジおよび前記後端エッジの両方について、前記非端部区間のエッジに対応する近似直線が所定閾値以上の正解率で得られる場合において、前記先端エッジの前記近似直線と前記後端エッジの前記近似直線とが略平行であるときには、前記原稿画像に欠損が発生していないと判定し、前記先端エッジの前記近似直線と前記後端エッジの前記近似直線とが略平行ではないときには、前記原稿画像に欠損が発生していると判定することを特徴とする請求項3記載の画像読取装置。 The image reading device according to claim 3, characterized in that the defect determination unit determines that no defect has occurred in the document image when the approximation straight line of the leading edge and the approximation straight line of the trailing edge are substantially parallel when an approximation straight line corresponding to the edge of the non-end section is obtained with a correct answer rate equal to or higher than a predetermined threshold for both the leading edge and the trailing edge, and determines that a defect has occurred in the document image when the approximation straight line of the leading edge and the approximation straight line of the trailing edge are not substantially parallel. 前記エッジ形状検出部は、前記対象画像における両側の所定幅の端部を除外した非端部区間において、前記対象画像内の原稿画像の先端エッジおよび後端エッジの少なくとも一方のエッジ形状を検出し、
前記所定範囲は、前記原稿の画像読取時の斜行における所定の最大斜行角度に対応して設定されていること、
を特徴とする請求項1から請求項4のうちのいずれか1項記載の画像読取装置。
the edge shape detection unit detects at least one of an edge shape of a leading edge and a trailing edge of an original image in the target image in a non-edge section excluding edges of a predetermined width on both sides of the target image;
the predetermined range is set in accordance with a predetermined maximum skew angle in skew when an image of the document is read;
5. The image reading device according to claim 1, wherein:
JP2020088617A 2020-05-21 2020-05-21 Image reader Active JP7474411B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2020088617A JP7474411B2 (en) 2020-05-21 2020-05-21 Image reader
US17/321,322 US11399108B2 (en) 2020-05-21 2021-05-14 Image reading apparatus capable of determining whether missing part of document image occurs based on edge shape of at least one of leading and trailing edges of document image
CN202110553055.5A CN113489856B (en) 2020-05-21 2021-05-20 Image reading apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020088617A JP7474411B2 (en) 2020-05-21 2020-05-21 Image reader

Publications (2)

Publication Number Publication Date
JP2021184516A JP2021184516A (en) 2021-12-02
JP7474411B2 true JP7474411B2 (en) 2024-04-25

Family

ID=78767622

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020088617A Active JP7474411B2 (en) 2020-05-21 2020-05-21 Image reader

Country Status (1)

Country Link
JP (1) JP7474411B2 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004118467A (en) 2002-09-25 2004-04-15 Sharp Corp Member inclination recognizing method, member inclination recognition control program, readable recording medium, and shape recognizing device
JP2013157966A (en) 2012-01-31 2013-08-15 Oki Data Corp Image reader
JP2014072626A (en) 2012-09-28 2014-04-21 Pfu Ltd Image processing apparatus, image processing system, image processing method and image processing program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004118467A (en) 2002-09-25 2004-04-15 Sharp Corp Member inclination recognizing method, member inclination recognition control program, readable recording medium, and shape recognizing device
JP2013157966A (en) 2012-01-31 2013-08-15 Oki Data Corp Image reader
JP2014072626A (en) 2012-09-28 2014-04-21 Pfu Ltd Image processing apparatus, image processing system, image processing method and image processing program

Also Published As

Publication number Publication date
JP2021184516A (en) 2021-12-02

Similar Documents

Publication Publication Date Title
US8064729B2 (en) Image skew detection apparatus and methods
EP2449531B1 (en) Skew detection
US20130021629A1 (en) Method of editing static digital combined images comprising images of multiple objects
US7991244B2 (en) Variable skew correction system and method
US6798905B1 (en) Document orientation recognizing device which recognizes orientation of document image
EP2438574A2 (en) Edge detection
US20110181919A1 (en) Image reading apparatus, control method thereof and computer-readable storage medium
US20160344897A1 (en) Image processing apparatus
JP6323190B2 (en) Inspection apparatus, image forming apparatus, and image inspection method
US9826118B2 (en) Image formation apparatus
CN113489856B (en) Image reading apparatus
US11153447B2 (en) Image processing apparatus and non-transitory computer readable medium storing program
JP7474411B2 (en) Image reader
JP7474410B2 (en) Image reader
US11134170B2 (en) Correction of feed skewed images
JP2005274183A (en) Image inspection device with inclination detection function
JP2021184515A (en) Image reading device
JP2021184517A (en) Image reading device
JP2021184518A (en) Image reading device
JP4285253B2 (en) Image inspection device with tilt detection function
JP2009284190A (en) Image reading apparatus and image reading system
US11316995B2 (en) Bending detection device and image processing apparatus
JP7159878B2 (en) Image processing device, image processing method and image processing program
US20230401695A1 (en) Inspection apparatus, method of controlling the same, and storage medium
JP2018078462A (en) Image processing apparatus, method for controlling image processing apparatus, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230427

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20240216

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20240327

R150 Certificate of patent or registration of utility model

Ref document number: 7474411

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150