JP2019050466A - Image reader image reading program - Google Patents
Image reader image reading program Download PDFInfo
- Publication number
- JP2019050466A JP2019050466A JP2017172821A JP2017172821A JP2019050466A JP 2019050466 A JP2019050466 A JP 2019050466A JP 2017172821 A JP2017172821 A JP 2017172821A JP 2017172821 A JP2017172821 A JP 2017172821A JP 2019050466 A JP2019050466 A JP 2019050466A
- Authority
- JP
- Japan
- Prior art keywords
- edge
- scanning direction
- reading
- image
- pixels
- 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
Links
Images
Landscapes
- Image Input (AREA)
- Facsimile Scanning Arrangements (AREA)
Abstract
Description
本発明は、画像読取装置、及び画像読取プログラムに関する。 The present invention relates to an image reading apparatus and an image reading program.
従来、特許文献1に記載の通り、コンタクトガラスの下方に設けられた複数の光学センサの検出結果に基づいて、コンタクトガラス上に載置された原稿の用紙長さを検出し、画像読取部への入射光に基づいて原稿の用紙幅を検出し、検出された用紙長さ及び用紙幅の原稿サイズの画像データを、画像読取部に読み取らせる画像読取装置が知られている。
Conventionally, as described in
特許文献1に記載された画像読取装置において、見開き原稿の各頁の画像をそれぞれ読み取り、各頁の画像データを管理する使い方が考えられる。
In the image reading apparatus described in
特許文献1に記載された画像読取装置において、コンタクトガラス上に見開き原稿を載置する場合、見開き原稿の中綴じ部が撓み、コンタクトガラス上に接する見開き原稿の左頁の左端から右頁の右端までの用紙長さ(左端から右端までの用紙長さ)は本来の用紙長さより短くなる。
In the image reading apparatus described in
上記画像読取装置において、ユーザが、見開き原稿を、見開き原稿の中綴じ部が主走査方向と平行となる向きに載置した場合、上記画像読取装置は、本来の用紙長さより長い定形サイズの用紙長さとして検出する。上記画像読取装置は、見開き原稿の画像を読み取るために、画像読取部を、原稿の左端から定形サイズの用紙長さまで副走査方向に移動させながら画像を読み取ることになり、画像読取部を原稿の右端において原稿が存在しない領域まで余分に移動させてしまう問題が発生する。 In the above image reading device, when the user places the double-page spread original in a direction in which the saddle-stitched part of the double-page spread original is parallel to the main scanning direction, the image reading device is a sheet of fixed size longer than the original sheet length. Detect as a length. The image reading apparatus reads an image while moving the image reading unit in the sub-scanning direction from the left end of the document to the sheet length of the fixed size in order to read the image of the double-page spread document. There is a problem that an extra portion is moved to the area where the document does not exist at the right end.
本発明は、上述した問題点を解決するためになされたものであり、画像読取部を見開き原稿の右端から原稿が存在しない領域まで余分に移動させることを防止可能な画像読取装置、及び画像読取プログラムを提供することができる。 The present invention has been made to solve the above-mentioned problems, and an image reading apparatus capable of preventing an extra movement from the right end of the image reading unit to the area where the document is not present, and the image reading unit The program can be provided.
上記目的を達成するために、請求項1に記載の発明態様では、画像読取装置は、原稿を支持する原稿台と、主走査方向に原稿のライン画像を読み取る読取部と、前記主走査方向と直交する副走査方向に、読取開始位置から読取終了位置に向けて前記読取部を移動させる駆動部と、前記読取部によって読み取られた前記ライン画像に係る画像データにエッジ強調処理を行い、エッジ画像データを生成するエッジ画像生成部と、制御部と、を備え、前記制御部は、前記駆動部に前記副走査方向の前記読取開始位置から前記読取終了位置に向けて前記読取部を移動させながら、前記読取部に前記ライン画像を読み取らせる読取処理と、前記エッジ画像生成部により生成された前記エッジ画像データから、前記副走査方向に複数の画素および前記主走査方向に複数の画素からなるエッジ判断対象範囲のエッジ画素値を取得し、取得した前記エッジ判断対象範囲の前記エッジ画素値について、前記副走査方向に沿った前記複数の画素に係る前記エッジ画素値のいずれかが第1閾値以上であるか否かの判断を、前記主走査方向に沿った前記複数の画素毎に行うエッジ判断処理と、前記エッジ判断処理により、前記主走査方向に沿った前記複数の画素全てにおいて、前記副走査方向に沿った前記複数の画素に係る前記エッジ画素値のいずれかが第1閾値以上であると判断した場合、前記画像データのうち前記エッジ判断対象範囲に対応する位置よりも前記副走査方向において前記読取終了位置に近い画像データから、前記副走査方向に複数の画素および前記主走査方向に複数の画素からなる濃度判断対象範囲の画素値を取得し、取得した前記濃度判断対象範囲の前記画素値について、前記画素値の取り得る最小値及び最大値を除いて第2閾値以下である画素値となる前記濃度判断対象範囲の全画素数に対応する割合が第3閾値以上であるか否かの判断を行う濃度判断処理と、前記濃度判断処理により、前記割合が前記第3閾値以上であると判断した場合、前記駆動部に前記副走査方向に移動している前記読取部を停止させる移動停止処理と、を実行する。 In order to achieve the above object, according to the first aspect of the present invention, an image reading apparatus comprises: a document holder for supporting a document; a reading unit for reading a line image of the document in the main scanning direction; An edge emphasizing process is performed on image data relating to the line image read by the reading unit and a driving unit that moves the reading unit from the reading start position to the reading end position in the sub scanning direction orthogonal to each other; The control unit includes an edge image generation unit that generates data, and a control unit, and the control unit causes the drive unit to move the reading unit from the reading start position in the sub scanning direction toward the reading end position. A reading process for causing the reading unit to read the line image, and a plurality of pixels and the main running in the sub scanning direction from the edge image data generated by the edge image generating unit The edge pixel value of the edge determination target range including a plurality of pixels in the direction is acquired, and the edge pixel value of the plurality of pixels along the sub-scanning direction is acquired for the acquired edge pixel value of the edge determination target range Edge determination processing for determining whether any one of the plurality of pixels is greater than or equal to the first threshold value for each of the plurality of pixels along the main scanning direction; If it is determined that any one of the edge pixel values of the plurality of pixels along the sub scanning direction is equal to or greater than the first threshold value in all the plurality of pixels, the image data corresponds to the edge determination target range From the image data closer to the reading end position in the sub scanning direction than the scanning position, the density determination including a plurality of pixels in the sub scanning direction and a plurality of pixels in the main scanning direction A pixel value of a target range is acquired, and the concentration judgment target which becomes a pixel value equal to or less than a second threshold except for the obtainable minimum value and the maximum value of the pixel value of the acquired concentration judgment target range When it is determined that the ratio is equal to or more than the third threshold value by the density determination process of determining whether the ratio corresponding to the total number of pixels in the range is equal to or more than the third threshold value; And moving stop processing for causing the drive unit to stop the reading unit moving in the sub scanning direction.
本発明態様によれば、原稿トレイに支持された原稿を自動的に搬送して読み取る画像読取装置において、制御部が移動停止処理を実行することにより、画像読取部を見開き原稿の右端から見開き原稿が存在しない領域まで余分に移動させることを防止可能である。 According to the aspect of the present invention, in the image reading apparatus which automatically conveys and reads the document supported by the document tray, the control unit executes the movement stop process to open the document from the right end of the image reading unit It is possible to prevent extra movement to an area where there is no
請求項2に記載の具体的態様では、制御部は、前記エッジ判断処理により、前記主走査方向に沿った前記複数の画素のうち少なくとも1つ以上の画素において、前記副走査方向に沿った前記複数の画素全てにそれぞれ係る全ての前記エッジ画素値が第1閾値未満であると判断した場合、前記エッジ判断対象範囲から前記副走査方向の前記読取終了位置に向かって所定数の画素まで離れたエッジ判断対象範囲を新たなエッジ判断対象範囲として前記エッジ判断処理を再度実行するエッジ判断制御処理と、前記濃度判断処理により、前記割合が前記第3閾値未満であると判断した場合、前記エッジ判断対象範囲に対応する位置から前記副走査方向の前記読取終了位置に向かって所定数の画素まで離れた位置を新たなエッジ判断対象範囲に対応する位置として前記濃度判断処理を再度実行する濃度判断制御処理と、を実行する。 According to a specific aspect of the present invention, the control unit is configured to execute the edge determination processing in at least one or more pixels among the plurality of pixels along the main scanning direction along the sub scanning direction. When it is determined that all the edge pixel values related to all the plurality of pixels are less than the first threshold value, a predetermined number of pixels are separated from the edge determination target range toward the reading end position in the sub scanning direction When it is determined that the ratio is less than the third threshold value by the edge determination control processing of re-executing the edge determination processing with the edge determination target range as a new edge determination target range and the density determination processing, the edge determination A position away from a position corresponding to the target range to a predetermined number of pixels toward the reading end position in the sub scanning direction corresponds to a new edge determination target range And density determination control process for executing the concentration determination process as location again, to run.
制御部が、エッジ判断制御処理および濃度判断制御処理を実行することにより、例えば、先回のエッジ判断処理の結果、主走査方向に沿った複数の画素のうち少なくとも1つ以上の画素において、副走査方向に沿った複数の画素全てにそれぞれ係る全てのエッジ画素値が第1閾値未満であると判断した場合、または先回の濃度判断処理の結果、濃度判断対象範囲の画素値について、画素値の取り得る最小値及び最大値を除いて第2閾値以下である画素値となる濃度判断対象範囲の全画素数に対応する割合が第3閾値未満である場合であっても、移動停止処理の実行を可能にする。 The control unit executes the edge determination control process and the density determination control process, for example, as a result of the previous edge determination process, at least one of the plurality of pixels along the main scanning direction as a result of the edge determination process. When it is determined that all edge pixel values pertaining to all the plurality of pixels along the scanning direction are less than the first threshold, or as a result of the previous density determination processing, pixel values for pixel values in the density determination target range Of the movement stop process even if the ratio corresponding to the total number of pixels in the density determination target range which is a pixel value equal to or less than the second threshold except for the possible minimum value and maximum value is less than the third threshold Make it possible to do it.
請求項3に記載の具体的態様では、制御部は、前記読取処理の開始後、前記エッジ画像データにおける前記原稿の先端エッジまたは側端エッジを検出することにより前記原稿の主走査原稿幅および前記原稿の主走査原稿傾きを決定する原稿決定処理を実行し、前記エッジ判断対象範囲は、前記制御部により前記主走査原稿幅に基づいて決められる前記主走査方向に複数の画素および前記主走査原稿幅と前記主走査原稿傾きとに基づいて決められる前記副走査方向に複数の画素からなる範囲であり、前記新たなエッジ判断対象範囲は、前記エッジ判断対象範囲から前記副走査方向の前記読取終了位置に向かって1つの画素まで離れたエッジ判断対象範囲である。 According to a specific aspect of the present invention, after the start of the reading process, the control unit detects the leading edge or the side edge of the document in the edge image data to thereby detect the main scanning document width of the document and An original determination process for determining the main scanning original inclination of the original is executed, and the edge determination target range is determined by the control unit based on the main scanning original width and a plurality of pixels in the main scanning direction and the main scanning original It is a range consisting of a plurality of pixels in the sub scanning direction determined based on the width and the main scanning document inclination, and the new edge determination target range is the end of reading in the sub scanning direction from the edge determination target range This is an edge determination target range separated by one pixel toward the position.
制御部が原稿決定処理を実行し、エッジ判断対象範囲を主走査原稿幅に基づいて決められる主走査方向に複数の画素および主走査原稿幅と、主走査原稿傾きと、に基づいて決められる副走査方向に複数の画素からなる範囲とし、新たなエッジ判断対象範囲をエッジ判断対象範囲から副走査方向の読取終了位置に向かって1つの画素まで離れたエッジ判断対象範囲とすることにより、原稿が主走査方向に対して傾いた場合であっても、主走査方向に沿った複数の画素全てにおいて、副走査方向に沿った複数の画素に係るエッジ画素値のいずれかが第1閾値以上となるので、エッジ取得判断処理における判断精度を向上することができる。 The control unit executes document determination processing, and the edge determination target range is determined based on the plurality of pixels in the main scanning direction determined based on the main scanning document width, the main scanning document width, and the main scanning document inclination. The original is determined by setting the range including a plurality of pixels in the scanning direction and setting the new edge determination target range as an edge determination target range separated from the edge determination target range to the reading end position in the sub scanning direction up to one pixel. Even when tilted with respect to the main scanning direction, one of the edge pixel values of a plurality of pixels along the sub-scanning direction is equal to or greater than the first threshold in all of the plurality of pixels along the main scanning direction. Therefore, the determination accuracy in the edge acquisition determination process can be improved.
請求項4に記載の具体的態様では、画像読取装置において、前記濃度判断対象範囲は、前記副走査方向の前記読取終了位置に向かう方向の前記原稿の側端部の前記原稿台に対する傾きおよび前記読取部の焦点深度に基づいて予め決められた前記副走査方向に複数の画素および前記主走査方向に複数の画素からなる範囲である。 According to a fourth aspect of the present invention, in the image reading apparatus, the density determination target range is an inclination of the side end portion of the document in the sub scanning direction toward the reading end position with respect to the document table It is a range including a plurality of pixels in the sub-scanning direction and a plurality of pixels in the main scanning direction which are predetermined based on the depth of focus of the reading unit.
濃度判断対象範囲が、原稿の側端部の原稿台に対する傾きおよび読取部の焦点深度に基づいて予め決められた副走査方向に複数の画素および主走査方向に複数の画素からなる範囲とすることにより、濃度判断対象範囲において、画素値の取り得る最小値及び最大値を除いて第2閾値以下である画素値となる画素数を増やし、濃度判断制御処理を実行することなく、濃度判断対象範囲の全画素数に対応する割合を第3閾値以上となる可能性を高め、移動停止処理を早期に実行する可能性を高めることができる。 The density judgment target range is a range consisting of a plurality of pixels in the sub-scanning direction and a plurality of pixels in the main scanning direction, which are determined in advance based on the inclination of the side edge of the document to the document table and the focal depth of the reading unit. In the density determination target range, the number of pixels having the pixel value equal to or less than the second threshold is increased except for the possible minimum and maximum values of the pixel value, and the density determination target range is performed without executing the density determination control process. It is possible to increase the possibility that the ratio corresponding to the total number of pixels of the pixel becomes equal to or higher than the third threshold, and to increase the possibility to execute the movement stopping process early.
請求項5に記載の具体的態様では、画像読取装置において、前記エッジ判断対象範囲は、前記エッジ解析画像データにおいて、前記主走査方向の1つの画素データである特定画素データを基準として、当該特定画素データから前記移動方向に前記エッジ副走査幅の範囲まで含まれる画素データで構成されたエッジ判断対象ブロックを1つの単位として、前記特定画素データから前記主走査原稿幅の範囲の画素データの数だけ前記主走査方向に沿って構成された複数の前記エッジ判断対象ブロックからなる範囲であり、前記エッジ判断処理は、前記エッジ判断対象ブロック毎に、前記エッジ画素データをそれぞれ取得し、前記取得されたエッジ画素データが、前記エッジ判断対象ブロック毎に前記第1閾値以上存在するか否かを全てのエッジ判断対象ブロックに対して判断し、前記エッジ判断制御処理は、前記エッジ判断処理の結果、前記全てのエッジ判断対象ブロックのうち、1つのエッジ判断対象ブロックにおいて、前記取得されたエッジ画素データが、前記第1閾値以上存在しないと判断した場合、前記特定画素データを前記移動方向に所定数の画素データだけ離れた画素データを新たな特定画素データとして前記エッジ判断処理を再度実行する。
In a specific aspect according to
制御部が、全てのエッジ判断対象ブロックで、各エッジ判断対象ブロックにエッジ画素データが第1閾値以上存在しないと判断した後、新たな特定画素データを基準としてエッジ判断処理を実行する場合より、早期に読取制御処理の実行後、エッジ判断処理を実行することができる。 After the control unit determines that edge pixel data does not exist in each edge determination target block for all edge determination target blocks, the edge determination process is performed based on new specific pixel data, Edge determination processing can be performed after execution of the read control processing at an early stage.
請求項6に記載の具体的態様では、画像読取装置において、前記読取部は、前記主走査方向のライン毎に原稿の画像を読み取り、前記エッジ画像生成部は、前記主走査方向のライン毎に、前記解析画像データに対してエッジ強調処理を行い、前記主走査方向のライン毎に、画素単位で各画素の画素値が所定の閾値以上となる画素をエッジ画素としてエッジ画像データを生成し、前記主走査方向のライン数をカウントするラインカウンタを備え、前記制御部は、前記原稿決定処理によって決定された主走査原稿幅に基づいて、前記主走査方向の特定ラインのライン数を決定する特定ライン決定処理と、前記ラインカウンタによってカウントされた前記主走査方向のライン数が前記特定ラインのライン数と等しいか否かを判断するライン数判断処理と、を実行し、前記ライン数判断処理の結果、前記カウントされた主走査方向のライン数が前記特定ラインのライン数と等しいと判断した場合、前記特定ラインにおける特定画素を基準として前記エッジ取得判断処理を実行する。 According to a specific aspect of the present invention, in the image reading apparatus, the reading unit reads an image of a document for each line in the main scanning direction, and the edge image generator for each line in the main scanning direction. Edge enhancement processing is performed on the analysis image data, and edge image data is generated with an edge pixel as a pixel having a pixel value of each pixel equal to or more than a predetermined threshold in pixel units, for each line in the main scanning direction. The control unit may include a line counter that counts the number of lines in the main scanning direction, and the control unit may determine the number of lines in the main scanning direction based on the main scanning document width determined by the original determination process. Line determination processing and line number determination processing for determining whether the number of lines in the main scanning direction counted by the line counter is equal to the number of lines of the specific line And when it is determined that the counted number of lines in the main scanning direction is equal to the number of lines of the specific line, the edge acquisition is performed based on the specific pixel in the specific line. Execute judgment processing.
制御部が、ライン数判断処理を実行することにより、原稿に記載された情報によってエッジ取得判断処理で生じる誤判断を防止することができる。 When the control unit executes the line number determination process, it is possible to prevent an erroneous determination that occurs in the edge acquisition determination process based on the information described in the document.
請求項7に記載の具体的態様では、画像読取装置は、画像データを所定の出力範囲で出力する画像出力部を備え、前記制御部は、前記読取終了処理の実行後、前記ラインカウンタによってカウントされた読取終了ラインのライン数を記憶する読取終了ライン記憶処理と、前記エッジ画像データにおいて前記原稿の後端エッジを検出する後端エッジ検出処理と、前記検出された原稿の後端エッジおよび前記読取終了ラインのライン数に基づいて、前記後端エッジのライン数を決定する後端ライン決定処理と、前記後端エッジに基づいて、前記読取部によって読み取られた画像データを抽出する画像抽出処理と、前記主走査原稿幅に基づいて、前記出力範囲を決定する出力範囲決定処理と、前記特定ラインおよび前記後端エッジのライン数に基づいて、前記抽出された読取画像データを、前記決定された出力範囲内に配置する画像出力処理と、を実行する。 According to a specific aspect of the present invention, the image reading apparatus comprises an image output unit for outputting image data in a predetermined output range, and the control unit counts the line counter after execution of the reading end processing. Reading end line storing processing for storing the number of read end lines, rear end edge detecting processing for detecting the rear end edge of the original in the edge image data, rear end edge of the detected original, and Rear end line determination processing of determining the number of lines of the rear end edge based on the number of reading end lines, and image extraction processing of extracting image data read by the reading unit based on the rear end edge And an output range determination process of determining the output range based on the main scanning document width, and based on the number of lines of the specific line and the rear end edge. Te, the scanned image data the extracted, and the image output process of placing in the output range the determined, to run.
制御部が、画像出力処理を実行することにより、読取画像を出力範囲における主走査方向の中心に配置することができる。 The control unit can arrange the read image at the center of the output range in the main scanning direction by executing the image output process.
請求項8に記載の発明態様では、画像読取プログラムは、原稿を支持する原稿台と、主走査方向に原稿のライン画像を読み取る読取部と、前記主走査方向と直交する副走査方向に、読取開始位置から読取終了位置に向けて前記読取部を移動させる駆動部と、前記読取部によって読み取られた前記ライン画像に係る画像データにエッジ強調処理を行い、エッジ画像データを生成するエッジ画像生成部と、を備える画像読取装置の制御部が、実行する画像読取プログラムであって、前記駆動部に前記副走査方向の前記読取開始位置から前記読取終了位置に向けて前記読取部を移動させながら、前記読取部に前記ライン画像を読み取らせる読取処理と、前記エッジ画像生成部により生成された前記エッジ画像データから、前記副走査方向に複数の画素および前記主走査方向に複数の画素からなるエッジ判断対象範囲のエッジ画素値を取得し、取得した前記エッジ判断対象範囲の前記エッジ画素値について、前記副走査方向に沿った前記複数の画素に係る前記エッジ画素値のいずれかが第1閾値以上であるか否かの判断を、前記主走査方向に沿った前記複数の画素毎に行うエッジ判断処理と、前記エッジ判断処理により、前記主走査方向に沿った前記複数の画素全てにおいて、前記副走査方向に沿った前記複数の画素に係る前記エッジ画素値のいずれかが第1閾値以上であると判断した場合、前記画像データのうち前記エッジ判断対象範囲に対応する位置よりも前記副走査方向において前記読取終了位置に近い画像データから、前記副走査方向に複数の画素および前記主走査方向に複数の画素からなる濃度判断対象範囲の画素値を取得し、取得した前記濃度判断対象範囲の前記画素値について、前記画素値の取り得る最小値及び最大値を除いて第2閾値以下である画素値となる前記濃度判断対象範囲の全画素数に対応する割合が第3閾値以上であるか否かの判断を行う濃度判断処理と、前記濃度判断処理により、前記割合が前記第3閾値以上であると判断した場合、前記駆動部に前記副走査方向に移動している前記読取部を停止させる移動停止処理と、
を実行する画像読取プログラム。
In the aspect of the invention according to claim 8, the image reading program reads in a sub scanning direction orthogonal to the main scanning direction, a reading unit for reading a line image of the document in a main scanning direction, a document table supporting the document A driving unit that moves the reading unit from a start position to a reading end position, and an edge image generation unit that performs edge enhancement processing on image data related to the line image read by the reading unit and generates edge image data And an image reading program executed by the control unit of the image reading apparatus, wherein the driving unit moves the reading unit from the reading start position in the sub scanning direction to the reading end position. A reading process for causing the reading unit to read the line image, and a plurality of images in the sub-scanning direction from the edge image data generated by the edge image generation unit And acquiring an edge pixel value of an edge determination target range including a plurality of pixels in the main scanning direction, and regarding the edge pixel value of the acquired edge determination target range, the plurality of pixels in the sub scanning direction The main scanning direction is determined by an edge determining process for determining whether any one of the edge pixel values is equal to or more than a first threshold value for each of the plurality of pixels along the main scanning direction, and the edge determining process. When it is determined that any one of the edge pixel values of the plurality of pixels along the sub-scanning direction is equal to or greater than a first threshold value in all of the plurality of pixels along the sub-scanning direction, the edge determination among the image data From the image data closer to the reading end position in the sub scanning direction than the position corresponding to the target range, a plurality of pixels in the sub scanning direction and a plurality of images in the main scanning direction The pixel value of the density determination target range consisting of is obtained, and the obtained pixel value of the density determination target range becomes a pixel value equal to or less than the second threshold except for the minimum value and the maximum value that can be taken of the pixel value. Judgment that the ratio is equal to or more than the third threshold value by the concentration judgment process of judging whether the ratio corresponding to the total number of pixels of the concentration judgment target range is equal to or more than the third threshold value Moving stop processing for causing the drive unit to stop the reading unit moving in the sub-scanning direction;
An image reading program that executes
本発明態様によれば、原稿トレイに支持された原稿を自動的に搬送して読み取る画像読取装置の制御部が実行する画像読取プログラムにおいて、送信制御処理を実行することにより、特定原稿以外の原稿の読取画像がユーザの意図しない画像送信先へ送信されることを防止可能である。 According to the aspect of the present invention, in the image reading program executed by the control unit of the image reading apparatus which automatically conveys and reads the document supported on the document tray, the document other than the specific document is executed by executing the transmission control process. Can be prevented from being transmitted to an image transmission destination not intended by the user.
本発明によれば、画像読取部を見開き原稿の右端から見開き原稿が存在しない領域まで余分に移動させることを防止可能な画像読取装置、及び画像読取プログラムを提供することができる。 According to the present invention, it is possible to provide an image reading apparatus and an image reading program that can prevent extra movement from the right end of the image reading unit to the area where the spread document is not present.
以下、本発明を具体化した実施例について図面を参照しつつ説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.
<実施形態>
以下、本実施形態の複合機1は、本発明の複合機の具体的態様の一例である。まず、図1及び図2を参照しつつ、複合機1の構成について説明する。図1及び図2において、前後、左右及び上下の各方向を表示する。図2に示す各方向は、全て図1に示す各方向に対応させて表示する。また、図9に示す各方向についても、全て図1に示す各方向に対応させて表示する。
Embodiment
Hereinafter, the multifunction peripheral 1 of the present embodiment is an example of a specific aspect of the multifunction peripheral of the present invention. First, the configuration of the
[複合機の外観構成]
複合機1は、図1に示すように、プラテンガラス2、カバー部3、読取部4、及び駆動部5などを備えている。プラテンガラス2は、複合機1の直方体形状の筐体11の上部に形成された開口11aを、筐体11の内側から閉塞している。プラテンガラス2の上面において、開口11aから露出している部分は、読取対象の見開き原稿BKが載置される原稿載置面2aを構成する。カバー部3は、その一端部が筐体11の上面に回動可能に支持されており、原稿載置面2aを覆う閉位置(図1の破線で示す位置)と原稿載置面2aを露出させる開位置(図1の実線で示す位置)とを取り得る。なお、図2(A)は、カバー部3が開位置にある状態で複合機1を上方から見たときの読取部4の位置を示すものであり、原稿載置面2aの上方に位置するカバー部3と駆動部5の図示は省略している。
[Appearance configuration of MFP]
As shown in FIG. 1, the
見開き原稿BKは、図2(A)に示すように、見開き中央の中心線CL(一点鎖線)を基準として、左方に左頁BKL、右方に右頁BKRを有する。左頁BKLは、左方の頁端部に左端部BLA(左頁BKLの二点鎖線で囲まれた範囲)を有し、右頁BKRは、右方の頁端部に右端部BRA(右頁BKRの二点鎖線で囲まれた範囲)を有する。具体的には、左端部BLAは、図2(B)に示すように、原稿載置面2a上に接する左頁BKLの1頁目から上方に積み上がった最終頁目までの左方の頁端部(左頁BKLの二点鎖線で囲まれた範囲)である。右端部BRAは、左端部BLAと同様に、原稿載置面2a上に接する右頁BKRの1頁目から上方に積み上がった最終頁までの右方の頁端部(図2(B)において図示省略)である。
As shown in FIG. 2A, the spread original BK has a left page BKL on the left and a right page BKR on the right with reference to a center line CL (one-dot chain line) at the center of the spread. The left page BKL has a left edge BLA (a range surrounded by a two-dot chain line on the left page BKL) at the left page edge, and the right page BKR has a right edge BRA (right page) at the right page edge. The page BKR has a range enclosed by a two-dot chain line). Specifically, as shown in FIG. 2B, the left end BLA is a left page from the first page of the left page BKL in contact with the
図1及び図2(A)に示すように、原稿載置面2a上の左後方に筐体11の開口11aによって構成された位置合わせ壁部11bを設ける。位置合わせ壁部11bの左後方の端点は、図2(A)に示す見開き原稿BKの位置合わせ点Pである。ユーザは、原稿載置面2a上に見開き原稿BKを載置する際に、原稿載置面2aの上面に接する見開き原稿BKの見開き頁の左後方端部を位置合わせ壁部11bに突き当てることで、原稿載置面2a上の見開き原稿BKの位置合わせをすることができる。本実施形態では、図2(B)に示すように、ユーザが、左頁BKLの1頁目の左後方端部を位置あわせ点Pに合わせることで、見開き原稿BKが位置合わせされて載置されているものとする。
As shown in FIGS. 1 and 2A, an
読取部4及び駆動部5は、図1に示すように、筐体11の内部に配置されている。読取部4は、CIS(Contact Image Sensor)44、及びキャリッジ47で構成される。CIS44は、イメージセンサ41、光源43、及びロッドレンズアレイ45で構成され、キャリッジ47に搭載されている。なお、図2(A)に示す読取部4においては、イメージセンサ41のみを図示している。イメージセンサ41は、図示しない複数の受光素子が図2(A)に示す主走査方向(図2(A)の前後方向)に配列されたリニアイメージセンサである。光源43は、発光ダイオードなどで構成されており、プラテンガラス2に向けて光を出射する。ロッドレンズアレイ45は、光源43から出射され被照射物により反射された光線をイメージセンサ41の各受光素子(図示せず)に結像させる。これにより、被照射物の画像が主走査方向に1ライン分読み取られる。
The
駆動部5は、図1に示すように、読取部4を主走査方向と直交する副走査方向(図1の左右方向)に移動させるものである。駆動部5は、正逆回転可能なモータ59によって駆動される駆動プーリ51と、従動プーリ53と、駆動プーリ51及び従動プーリ53に架け渡されたエンドレスのベルト55などで構成されている。駆動プーリ51は、筐体11の内部における副走査方向の一端側に配置され、一方で、従動プーリ53は、筐体11の内部における副走査方向の他端側に配置されている。ベルト55には、キャリッジ47が取り付けられており、駆動プーリ51(モータ59)の回転によりベルト55が移動することでキャリッジ47に搭載されたCIS44が副走査方向に往復移動できるように構成されている。
As shown in FIG. 1, the
プラテンガラス2の左方には、図1に示す調整基準板13が配置されている。この調整基準板13は、副走査方向に並べられる白テープ13a及び黒テープ13bから構成されている。読取部4によって、白テープ13a及び黒テープ13bの画像は読み取られ、その画像データに対応する白画素から黒画素へ変化する位置、または黒画素から白画素へ変化する位置が、図1及び図2(A)に示す読取部4の待機位置HPである。待機位置HPは、読取部4の副走査方向移動における基準位置となる。CPU90(図3参照)は、複合機1に電源が投入された後、駆動部5によって読取部4を待機位置HPに待機させる。さらに、CPU90は、後述する読取処理を実行する前に、読取部4に白テープ13aの画像を読み取らせ、シェーディング補正で使用する白基準データの取得等の補正処理(以下、読取前補正処理と称す)を実行する。
An adjustment reference plate 13 shown in FIG. 1 is disposed on the left side of the
CPU90は、後述する読取処理において、図1及び図2(A)に示す読取開始位置PSの位置で読取部4の光源43を点灯開始させる。CPU90は、読取部4を、読取開始位置PSから読取終了位置PEへ副走査方向に移動させながら、主走査方向に1ラインずつ画像を読み取る。以下に、読取開始位置PS、読取終了位置PEについて説明する。
The
読取開始位置PSは、図1及び図2(A)に示すように、読取部4が原稿載置面2aの左端に対向する位置である。読取終了位置PEは、図1及び図2(A)に示すように、読取部4が原稿載置面2aの右端に対向する位置である。なお、読取終了位置PEは、操作部7からユーザによって入力された見開き原稿BKの定形サイズ(A5判等の定形サイズ)に基づいて、CPU90が決定してもよい。
As shown in FIGS. 1 and 2A, the reading start position PS is a position at which the
複合機1の筐体11の前面には、液晶や有機EL等の表示部6、及びスタートキー、ストップキー、テンキー等の各種のボタンによって構成される操作部7が設けられている(図3(A)参照)。この表示部6及び操作部7により、複合機1の動作状況の表示やユーザによる操作の入力が可能となっている。なお、表示部6及び操作部7は、表示部6による表示機能、及び操作部7による入力機能を兼ね備えたタッチパネルであってもよい。後述する図3(A)に示す画像形成部10については、図示を省略する。
A
[複合機の電気的構成]
本実施形態の複合機1の電気的構成について説明する。複合機1は、図3(A)に示すように、CPU(Central Processing Unit)90、ROM(Read Only Memory)92、RAM(Random Access Memory)93、画像処理部94、読取部4、及び駆動部5を構成の一部として備える。これらの構成要素は、バス9を介して、表示部6、操作部7、及び画像形成部10に接続される。
[Electric configuration of multifunction machine]
The electrical configuration of the
CPU90は、ROM92に記憶された制御プログラムに従って、複合機1の各部の制御を行う。ROM92には、後述する読取処理等の複合機1の各種動作を実行するためのプログラムを記憶する。
The
ROM92は、後述する読取処理における読取解像度、及びモノクロ読取(Green1色)またはカラー読取(RGB3色)等の読取設定に関する情報を記憶する。読取解像度は、600dpi、及び1200dpiのうちいずれかの読取解像度である。また、ROM92は、待機位置HPを基準として読取部4が読取開始位置PS及び読取終了位置PEまで移動するために必要な移動量を表すデータを記憶する。なお、読取設定は、操作部7からユーザによって入力された設定に基づいて、CPU90が決定してもよい。読取部4を構成するCIS44の主走査方向における解像度は、CPU90からの指示によって、600dpi、及び1200dpiのうち、いずれかの解像度に切替可能である。
The
また、ROM92は、図4に示すように、見開き原稿の定形サイズを示すテーブルを記憶する。本実施形態では、見開き原稿の定形サイズを示すテーブルは、A6判、A5判、及びB5判毎に、図2(A)に示す1頁分の長辺幅LW及び1頁分の短辺幅SWを示すデータで構成されたテーブルとする。上記テーブルを構成するデータは、具体的には、A6判に対して、1頁分の長辺幅LWとして148mm、1頁分の短辺幅SWとして105mmにそれぞれ対応する画素数とする。A5判に対して、1頁分の長辺幅LWとして210mm、1頁分の短辺幅SWとして148mmにそれぞれ対応する画素数とする。B5判に対して、1頁分の長辺幅LWとして257mm、1頁分の短辺幅SWとして182mmにそれぞれ対応する画素数とする。本実施形態では、図4に示すように、A6判、A5判、及びB5判毎に、1頁分の長辺幅LW及び1頁分の短辺幅SWをそれぞれ300dpiの解像度における画素数とするテーブルとしてROM92に記憶する。
Further, as shown in FIG. 4, the
画像処理部94は、画像処理専用のハード回路であり、図3(B)に示すように、画像加工処理部100、解像度変換部101、色変換部102、エッジ画像生成部103、及びカウンタ104を含んで構成されている。
The
画像加工処理部100は、読取部4によって読み取られたRGB各色それぞれのラインデータに各種の画像加工処理を施し、RAM93に記憶する。画像加工処理は、例えば、画像データを90度等の所定角度に回転する回転処理や、画像データから所定範囲の画像を抽出する画像抽出処理等である。
The
解像度変換部101は、読取部4によって読み取られたRGB各色それぞれのラインデータに対し、公知の間引き処理により、300dpiの低解像度に変換する。解像度変換部101は、例えば、RGB各色それぞれのラインデータにおける先頭画素から最終画素までの全画素について設定された複数の間引き画素を間引く処理により、600dpiまたは1200dpiのラインデータから300dpiのラインデータへ変換する。解像度変換部101は、低解像度に変換したRGB各色それぞれのライン画像データを後述する濃度判断処理で判断するための濃度画像データとしてそれぞれRAM93に記憶する。
The
色変換部102は、解像度変換部101によって低解像度に変換されたRGB各色それぞれのラインデータに対し、YCbCr変換やYIQ変換等の色変換処理を実行し、色ごとの輝度値や色差値などを示す色変換後データを生成する。
The
エッジ画像生成部103は、色変換部102によって生成された色変換後データに対し、各種のエッジ強調処理を実行し、エッジ画像データを生成可能である。本実施形態では、エッジ画像生成部103は、公知の差分フィルタであるラプラシアンフィルタを用いるエッジ強調処理を実行するものとする。具体的には、エッジ画像生成部103は、色変換後データに対して、ラプラシアンフィルタ係数を適用して各画素のエッジ強度値を算出する。エッジ画像生成部103は、各画素の算出したエッジ強度値が予め定められたエッジ強度閾値以上であれば、「1」とし、エッジ強度閾値未満であれば、「0」としてエッジ強度値からエッジ画素値に置き換えてエッジ画像データを生成し、RAM93に記憶する。エッジ強度閾値は、例えば色変換後データに対応する画像上の線画像部分(例えば文字)の画素のエッジ強度値を「1」のエッジ画素値としてデータを置き換えできる程度の値である。
The edge
ラインカウンタ104は、エッジ画像生成部103からRAM93へ出力されるエッジ画像データのライン数をカウントする。ラインカウンタ104のカウント開始、カウント終了、及びカウントリセットは、CPU90からの指示により実行される。
The
駆動部5は、駆動制御部54、ドライバ52、及びモータ59を含んで構成されている。駆動制御部54は、PWMによってドライバ52へパルス制御信号を送信してモータ59を回転させるためのハードウェアである。また、駆動制御部54は、ドライバ52へモータ59の正回転または逆回転を制御する信号を送信し、モータ59の回転方向を変えられるように構成されている。ドライバ52は、駆動制御部54から入力されるパルス制御信号及びモータ回転方向の制御信号に従って、モータ59の各相の巻線に流す電流のタイミング及び各相の巻線に流す電流の順序を制御可能となるように構成されたハードウェアである。モータ59は、本実施形態では、ステッピングモータである。
The
パルスカウンタ95は、駆動制御部54が1パルスのパルス制御信号を送信する度に送信パルス数を1カウントする。CPU90が、駆動制御部54にモータ59の回転開始を指示すると、パルスカウンタ95を初期化し、駆動制御部54の送信パルス数のカウントを開始する。CPU90が、駆動制御部54にモータ59の回転停止を指示すると、パルスカウンタ95は、駆動制御部54の送信パルス数のカウントを終了する。
The pulse counter 95 counts the number of transmission pulses by one each time the
モータ59は、駆動部5の駆動制御部54が1パルス制御信号をドライバ52へ送信する毎に、所定の回転角度分だけ回転する。モータ59の回転量は、駆動制御部54が送信するパルス数によって決まる。駆動制御部54の送信パルス数と、読取部4の副走査方向への移動量との関係は、予め決められており、駆動制御部54の送信パルス数から読取部4の副走査方向の移動量を算出するためのデータがROM92に記憶されている。本実施形態では、送信パルス数1パルスあたり、600dpiの1ライン分(25.4mm/600=0.042mm)に相当する移動量である。ROM92には、パルスカウンタ95によってカウントされる送信パルス数1パルスあたり、読取部4が600dpiの1ライン移動することを表す送信パルス数当たりの移動量データが記憶されている。なお、モータ59は、本実施形態では、ステッピングモータであるが、この構成に限定されない。モータ59をエンコーダ付きのDCモータにして、パルスカウンタ95がエンコーダによるパルス信号の信号数をカウントするような構成にしてもよい。
The
CPU90は、モータ59の回転開始の指示において、駆動制御部54に、ドライバ52へ送信させる送信パルス周波数及び送信パルス数を設定する。駆動制御部54は、送信パルス周波数及び送信パルス数の設定に従って、パルス制御信号を送信することで、モータ59の回転速度及び回転数が制御される。CPU90は、駆動制御部54に、モータ59の正回転または逆回転の回転方向を設定する。駆動制御部54は、回転方向の設定に従って、正回転または逆回転に対応する制御信号をドライバ52へ送信することで、モータ59の回転方向が制御される。CPU90は、モータ59の回転停止の指示において、駆動制御部54の上記送信パルス数等の設定をクリアする。
The
RAM93は、各種制御プログラムが読み出される作業領域、制御部9の制御処理によって算出された算出結果、及び読取部4によって読み取られた画像データを一時的に記憶する記憶領域として利用される。
The
画像形成部10は、インクジェット方式又は電子写真方式等により記録紙に画像を形成する。
The
[本実施形態の複合機の動作]
本実施形態では、ユーザが、見開き原稿BKの画像を記録紙にコピーしたい場合、図2(A)に示すように、複合機1の原稿載置面2a上に、見開き原稿BKを載置する。複合機1は、図10(B)に示すように、見開き原稿BKの定形サイズに基づいて決定したライン数NSWより副走査方向の読取開始位置PSに近い側の読取終了ライン数LEで、読取部4を停止させることができる。
[Operation of MFP according to this embodiment]
In the present embodiment, when the user wants to copy the image of the spread original BK onto the recording sheet, the spread original BK is placed on the
複合機1は、メイン処理と、原稿決定処理と、読取終了判断処理と、画像出力処理とを主に実行する。図5に示すメイン処理中のS1〜S9の処理、図6に示す原稿決定処理中のS100〜S107の処理、図7に示す読取終了判断処理のS200〜S218の処理及び図8に示すサブルーチン処理中のS300〜S306の処理、及び図9に示す画像出力処理中のS400〜S412の処理は、第1CPU90が実行する処理である。
The
[メイン処理]
本実施形態の複合機1におけるメイン処理について、図5のフローチャートを参照して説明する。複合機1の操作部7によってスタートキーが押下されると、CPU90により、図5に示すメイン処理が実行される。CPU90は、正回転開始を駆動部5に指示し、モータ59を正回転させて、読取部4を待機位置HPから読取開始位置PSへ移動させる(S1)。
[Main processing]
The main processing in the
CPU90は、パルスカウンタ95によって送信パルス数を取得することで、読取部4の副走査方向の移動量を算出し、読取部4が、図1及び図2に示す読取開始位置PSに位置するか否かを判断する(S2)。読取部4が読取開始位置PSに位置しないと判断した場合(S2:NO)、CPU90は、S2の判断処理を繰り返す。読取部4が読取開始位置PSに位置すると判断した場合(S2:YES)、CPU90は、読取部4に画像の読み取りを開始させる(S3)。
The
CPU90は、後述する原稿決定処理によって、見開き原稿BKの主走査方向の幅である原稿幅に対応する画素数(以降、原稿幅画素数Mと称す)及び主走査方向に対する原稿傾きθkを決定する(S4)。CPU90は、後述する読取終了判断処理の実行を開始するライン数である判断開始ライン数LSWを、原稿幅画素数M、原稿傾きθk及び見開き原稿の定形サイズを示すテーブルに基いて決定する(S5)。具体的には、CPU90は、図10(A)に示すように、後述する原稿決定処理によって検出された原稿幅画素数Mに原稿傾きθkによるcosθkを乗算して、見開き原稿BKの1頁分の長辺幅に対応する画素数LWを算出し、ROM92に記憶された見開き原稿の定形サイズを示すテーブルに基づいて、1頁分の短辺幅に対応する画素数SWを決定する。CPU90は、1頁分の短辺幅に対応する画素数SWを2倍し、画素数SWの2倍の画素数に対して見開き原稿BKの左端部BLAの左端から読取開始位置PSまでの画素数ΔSWを減算し、画素数NSWを算出する。CPU90は、図2(A)に示すように、画素数NSWから見開き原稿BKの右端部BRAの短辺幅に対応する画素数RSWを減算した画素数LSWを算出する。CPU90は、画素数LSWを、判断開始ライン数として決定し、RAM93に記憶する。CPU90は、後述するS305の処理において、算出した画素数NSWを利用するため、画素数NSWをRAM93に記憶する。なお、CPU90は、画素数ΔSWを、実験で事前に確認した画素数でROM92に記憶する構成であってもよい。もしくは、CPU90は、公知技術で見開き中央の中心線CLを、見開き原稿BKの綴じ部の濃度によって検出し、画素数SWに対して読取開始位置PSから見開き中央の中心線CLまでのライン数で減算し、画素数ΔSWを算出してRAM93に記憶する構成であってもよい。
The
CPU90は、ラインカウンタ104によって読取部4が読取開始位置PSから現在位置へ移動するまでにカウントされたライン数Lgを取得し、取得したライン数Lgが判断開始ライン数LSW以上であるか否かを判断する(S6)。取得したライン数Lgが判断開始ライン数LSW以上ではないと判断した場合(S6:NO)、CPU90は、S6の判断処理を繰り返す。
The
取得したライン数Lgが判断開始ライン数LSW以上であると判断した場合(S6:YES)、CPU90は、後述する読取終了判断処理を実行する(S7)。CPU90は、逆回転開始を駆動部5に指示し、モータ59を逆回転させて、読取部4を後述する読取終了ラインLEに対応する位置から待機位置HPへ移動させる(S8)。CPU90は、後述する画像出力処理を実行する(S9)。
If it is determined that the acquired line number Lg is greater than or equal to the determination start line number LSW (S6: YES), the
[原稿決定処理]
本実施形態の複合機1は、図6のフローチャートに示す原稿決定処理によって、図10(A)に示す見開き原稿BKの左頁BKLに対応する左頁画像GLの原稿幅画素数M及び原稿傾きθkを決定する。
[Original determination process]
The
複合機1における原稿決定処理について、図6のフローチャートを参照して説明する。CPU90は、検索変数iを初期化して、RAM93に記憶する(S100)。CPU90は、RAM93に記憶されたエッジ画像データにおいて、検索変数iに対応する検索開始点を始点として、見開き原稿BKの左頁BKLの側端エッジ点を検索開始する(S101)。CPU90は、検索した側端エッジ点の位置情報をRAM93に記憶する(S102)。CPU90は、検索変数iが検索終了変数N以上であるか否かを判断する(S103)。検索変数iが検索終了変数N以上ではないと判断した場合(S103:NO)、CPU90は、検索変数iに1を加算して検索変数iに代入し(S107)、S101以降の処理を繰り返す。
The document determination process in the
具体的には、図10(A)を参照して説明する。図10(A)において、原稿決定処理を視覚的に説明するために、RAM93に記憶されたエッジ画像データにおいて「1」のデータを実線で示したエッジ画像のうち、見開き原稿BKの左頁BKLに対応する画像GLのみを含む先端エッジ画像EG1を示す図である。説明簡略化のため、エッジ画像データにおける見開き原稿BKに記載された原稿情報は図示を省略する。図10(A)において、先端エッジ画像EG1の外周を一点鎖線で示す。図10(A)において、複数の点線矢印は、各検索開始点SR(0)、SR(1)・・・SR(N)、及びSL(0)、SL(1)、・・・SL(N)からの検索方向を示す。CPU90は、図10(A)に示すように、RAM93に記憶された先端エッジ画像EG1の側端点である検索変数i=0に対応する検索開始点SL(0)及びSR(0)をそれぞれ左頁画像GLの側端エッジ点の検索開始点とする(S101)。CPU90は、主走査方向に沿って、それぞれの検索開始点から離れる方向に検索点を移動させながら、左頁画像GLの境界線となる側端エッジ点Dを検索する(S101)。CPU90は、検索した側端エッジ点Dの先端エッジ画像EG1における位置情報をRAM93に記憶する(S102)。CPU90は、先端エッジ画像EG1における検索変数i=0に対応する読取開始位置PSから副走査方向の読取終了位置PEに近づく方向に所定距離の分だけ離れた検索終了変数Nに対応する位置までの左頁画像GLの側端エッジ点をそれぞれ検索する。上記所定距離及び検索変数Nの数値は、実験で事前に原稿幅画素数M及び原稿傾きθkを精度良く決定可能な数値として決定し、ROM92に記憶しておくものとする。CPU90は、検索変数iが検索終了変数N以上ではないと判断した場合(S103:NO)、S107の処理によって、図10(A)に示すように、検索開始点SL(0)及びSR(0)から副走査方向の読取終了位置PEに近づく方向に所定間隔離れた検索変数i=1に対応する検索開始点SL(1)及びSR(1)を始点としてS101以降の処理を繰り返す。本実施形態では、上記所定距離を30mmとする。検索変数Nは、原稿決定処理の精度に関わる変数であり、実験によって決定され、決定された検索変数Nは、ROM92に記憶されるものとする。上記所定間隔は、上記所定距離に検索変数Nの数値を除算することで自動的に決まる間隔である。
Specifically, this will be described with reference to FIG. In FIG. 10A, in order to visually explain the original determination process, the left page BKL of the spread original BK of the edge image in which the data of “1” is indicated by the solid line in the edge image data stored in
検索変数iが検索終了変数N以上であると判断した場合(S103:YES)、CPU90は、検索した側端エッジ点に対して公知技術である最小二乗法による直線式をそれぞれ算出する(S104)。CPU90は、算出した直線式による直線のうち、平行となる2つの直線の間の主走査方向と平行な間隔を見開き原稿BKの原稿幅画素数Mとして決定する(S105)。CPU90は、公知技術である余弦定理を利用して算出した左頁画像GLの主走査方向に対する傾きθkを、見開き原稿BKの主走査方向に対する原稿傾きθkとして決定する(S106)。
When it is determined that the search variable i is equal to or more than the search end variable N (S103: YES), the
具体的には、CPU90は、図10(A)に示す検索変数i=0・・・Nに対応するそれぞれの側端エッジ点に対する最小二乗法により、直線AB、直線BC、直線CD、及び直線DAの直線式をそれぞれ算出する(S104)。CPU90は、互いに平行となる2つの直線AB及び直線CDの間の主走査方向と平行な間隔Mを算出し、算出した間隔Mを見開き原稿BKの原稿幅画素数Mとして決定する(S105)。CPU90は、余弦定理を利用して、図10(A)に示す直線AD、直線AE、及び直線EDのそれぞれの線分の間隔に基づいて、cosθkを算出し、θkを見開き原稿BKの主走査方向に対する原稿傾きθkとして決定する(S106)。
Specifically, the
[読取終了判断処理]
本実施形態の複合機1は、図7及び図8のフローチャートに示す読取終了判断処理によって、エッジ画像データ及び濃度画像データにおけるそれぞれの画素値と閾値を比較することで読取終了を判断し、読取部4による画像の読取を終了させ、モータ59の回転を停止させる。
[Reading end judgment processing]
The
複合機1における読取終了判断処理について、図7及び図8のフローチャートを参照して説明する。CPU90は、図7に示すように、エッジ検出フラグをオフして、RAM93に記憶し、エッジ検出フラグを初期化する(S200)。CPU90は、副走査変数nを初期化して、RAM93に記憶する(S201)。CPU90は、ラインカウンタ104によってカウントされたライン数を基準ライン数Lkとして取得する(S202)。CPU90は、ラインカウンタ104によってカウントされたライン数Lgを取得し、取得したライン数Lgが基準ライン数Lkに所定ライン数LNを加算したライン数(Lk+LN)以上であるか否かを判断する(S203)。取得したライン数Lgがライン数(Lk+LN)以上ではないと判断した場合(S203:NO)、CPU90は、S203の判断処理を繰り返す。具体的には、所定ライン数LNは、後述するエッジ判断対象ブロックの副走査エッジ判断画素数N1及び濃度判断対象範囲の副走査方向の画素数である副走査濃度判断画素数N2以上となるライン数としてROM92に記憶されているものとする。
The reading end determination process in the
取得したライン数Lgがライン数(Lk+LN)以上であると判断した場合(S203:YES)、CPU90は、RAM93に記憶されたエッジ検出フラグがオフであるか否かを判断する(S204)。エッジ検出フラグがオフではないと判断した場合(S204:NO)、CPU90は、図8に示す後述する濃度判断処理におけるS301以降の処理を実行する。エッジ検出フラグがオフであると判断した場合(S204:YES)、CPU90は、主走査変数mを初期化して、RAM93に記憶する(S205)。CPU90は、図11(A)に示すように、RAM93に記憶されたエッジ画像データ110においてエッジ判断対象ブロックである画素P(m,n)から副走査方向の読取終了位置PEに向かう方向に沿って副走査エッジ判断画素数N1の分だけ離れた画素P(m,n+N1)までのエッジ画素値を取得する(S206)。CPU90は、取得した画素P(m,n)から画素P(m,n+N1)までのエッジ画素値がそれぞれエッジ閾値Eh以上となるか否かを判断する(S207)。取得した画素P(m,n)から画素P(m,n+N1)までのエッジ画素値がそれぞれエッジ閾値Eh以上ではないと判断した場合(S207:NO)、CPU90は、副走査変数nに副走査エッジ判断画素数N1を加えた変数(n+N1)が所定ライン数LN以上であるか否かを判断する(S217)。変数(n+N1)が所定ライン数LN以上ではないと判断した場合(S217:NO)、CPU90は、主走査変数mを初期化し、副走査変数nに所定の定数nsを加算した変数(n+ns)を、副走査変数nに代入し(S218)、S206以降の処理を繰り返す。変数(n+N1)が所定ライン数LN以上であると判断した場合(S217:YES)、CPU90は、S202以降の処理を繰り返す。
If it is determined that the acquired line number Lg is equal to or more than the line number (Lk + LN) (S203: YES), the
取得した画素P(m,n)から画素P(m,n+N1)までのエッジ画素値がそれぞれエッジ閾値Eh以上であると判断した場合(S207:YES)、CPU90は、主走査変数mが原稿幅画素数M以上であるか否かを判断する(S208)。主走査変数mが原稿幅画素数M以上ではないと判断した場合(S208:NO)、CPU90は、主走査変数mに1を加算して主走査変数mに代入し(S216)、S206以降の処理を繰り返す。主走査変数mが原稿幅画素数M以上であると判断した場合(S208:YES)、CPU90は、エッジ検出フラグをオンにする(S209)。CPU90は、ラインカウンタ104によってカウントしたライン数を後端エッジライン数EEとしてRAM93に記憶する(S210)。
When it is determined that the edge pixel values from the acquired pixel P (m, n) to the pixel P (m, n + N1) are each equal to or greater than the edge threshold Eh (S207: YES), the
具体的には、副走査エッジ判断画素数N1=4、所定の定数ns=1、エッジ閾値Eh=1、原稿幅画素数M=2480、及び所定ライン数LN=32である場合について、図11(A)及び図11(B)を参照して説明する。CPU90は、図11(A)に示すエッジ画像データ110における画素P(0,0)〜画素P(0,4)のエッジ画素値をそれぞれ取得する(S206)。CPU90は、画素P(0,0)〜画素P(0,4)のエッジ画素値(=0)は、それぞれエッジ閾値Eh(=1)以上ではないと判断する(S207:NO)。CPU90は、変数(n+N1)(=4)が所定ライン数LN(=32)以上ではないと判断し(S217:NO)、CPU90は、主走査変数mを初期化し、副走査変数n(=0)に1を加算してnに代入する(S218)。CPU90は、図11(B)に示すエッジ画像データ110における画素P(0,1)〜画素P(0,5)のエッジ画素値をそれぞれ取得する(S206)。CPU90は、画素P(0,5)のエッジ画素値(=1)が、エッジ閾値Eh(=1)以上であると判断する(S207:YES)。CPU90は、主走査変数m(=0)が、原稿幅画素数M(=2480)以上ではないと判断し(S208:NO)、主走査変数m(=0)に1を加算して主走査変数mに代入し(S216)、図11(B)に示すエッジ画像データ110における画素P(1,1)〜画素P(1,5)のエッジ画素値をそれぞれ取得する(S206)。CPU90は、画素P(1,5)のエッジ画素値が1であるため、画素P(0,5)と同様に、エッジ閾値Eh(=1)以上であると判断し(S207:YES)、S208、S216、及びS206以降の処理を、主走査変数mが原稿幅画素数Mである2480と等しくなるまで繰り返す。なお、エッジ閾値Ehは0より大きく、1以下である所定の数値である。エッジ閾値Ehは、事前に実験で確認して決定し、ROM92に記憶するものとする。
Specifically, in the case of sub-scanning edge determination pixel number N1 = 4, predetermined constant ns = 1, edge threshold value Eh = 1, document width pixel number M = 2480, and predetermined line number LN = 32, as shown in FIG. This will be described with reference to (A) and FIG. 11 (B). The
CPU90は、S209の処理を実行後、RAM93に記憶されたR色の濃度画像データに対して、後述する濃度判断処理を実行し(S211)、同様に、RAM93に記憶されたG色の濃度画像データ及びB色の濃度画像データに対して、後述する濃度判断処理をそれぞれ実行する。(S212、S213)。CPU90は、読取部4に画像の読み取りを終了させ(S214)、駆動部5にモータ59の回転を停止させる(S215)。
After executing the processing of S209, the
複合機1における読取終了判断処理のサブルーチン処理である濃度判断処理について、図8のフローチャートを参照して説明する。CPU90は、主走査変数mを初期化し、副走査変数nを副走査基準変数Nkに代入する(S300)。CPU90は、濃度判断対象範囲として、濃度画像データにおいて、画素P(m,n)から副走査方向の読取終了位置PEに向かう方向に沿って副走査濃度判断画素数N2の分だけ離れ、かつ、原稿幅画素数Mの分だけ離れた画素P(M,n+N2)までの範囲の濃度画素値を取得する(S301)。CPU90は、濃度画像データにおいて、画素P(m,n)から画素P(M,n+N2)までの範囲の全体の画素数に対して、灰色濃度閾値Gh以下となる濃度画素値の割合が割合閾値Wh以上であるか否かを判断する(S302)。
The density determination process, which is a subroutine process of the reading end determination process in the
全体の画素数に対して、灰色濃度閾値Gh以下となる濃度画素値の割合が割合閾値Wh以上ではないと判断した場合(S302:NO)、CPU90は、副走査変数nに副走査濃度判断画素数N2を加えた変数(n+N2)が所定ライン数LN以上であるか否かを判断する(S304)。変数(n+N2)が所定ライン数LN以上ではないと判断した場合(S304:NO)、CPU90は、副走査変数nに所定の定数nsを加算した変数(n+ns)を、副走査変数nに代入し(S306)、S301以降の処理を繰り返す。変数(n+N2)が所定ライン数LN以上であると判断した場合(S304:YES)、CPU90は、ラインカウンタ104によってカウントされたライン数Lgを取得し、取得したライン数Lgが、RAM93に記憶された画素数NSW以上であるか否かを判断する(S305)。取得したライン数Lgが、RAM93に記憶された画素数NSW以上ではないと判断した場合(S305:NO)、CPU90は、図7に示すS202以降の処理を繰り返す。取得したライン数Lgが、RAM93に記憶された画素数NSW以上であると判断した場合(S305:YES)、CPU90は、図7に示すS214以降の処理を実行する。全体の画素数に対して、灰色濃度閾値Gh以下となる濃度画素値の割合が割合閾値Wh以上であると判断した場合(S302:YES)、CPU90は、副走査変数nに副走査基準変数Nkを代入し(S303)、濃度判断処理を終了する。
When it is determined that the ratio of the density pixel value which is equal to or less than the gray density threshold Gh is not equal to or more than the ratio threshold Wh with respect to the total number of pixels (S302: NO), the
具体的には、副走査濃度判断画素数N2=3、原稿幅画素数M=2480、所定の定数ns=1、灰色濃度閾値Gh=180、割合閾値Wh=30%、及び所定ライン数LN=32である場合であって、かつ、CPU90が、副走査変数n=n+1でS207(YES)、S208(YES)、S209、及びS210の処理を実行した場合について、図11(C)及び図11(D)を参照して説明する。CPU90は、図11(C)に示すR色の濃度画像データ111における画素P(0,n+1)と、画素P(0,n+1)から副走査方向の読取終了位置PEに向かう方向に沿って副走査濃度判断画素数N2の分だけ離れた画素P(0,n+4)と、主走査方向に原稿幅画素数M(=2480)の分だけ離れた画素P(2480,n+1)と、画素P(2480,n+4)とで囲まれた濃度判断対象範囲における濃度画素値をそれぞれ取得する(S301)。CPU90は、濃度判断対象範囲である画素P(0,n+1)〜画素P(2480,n+4)の濃度画素値は、最小値でも190であるため、灰色濃度閾値Gh(=180)以下である濃度画素値の割合は0%であるため、割合閾値Wh(=30%)以上ではないと判断する(S302:NO)。CPU90は、変数(n+1+N2)(=4)が所定ライン数LN(=32)以上ではないと判断し(S304:NO)、CPU90は、副走査変数n(=n+1)に1を加算してnに代入する(S306)。CPU90は、図11(D)に示すR色の濃度画像データ111における濃度判断対象範囲である画素P(0,n+2)〜画素P(2480,n+5)の濃度画素値をそれぞれ取得する(S301)。CPU90は、濃度判断対象範囲である画素P(0,n+2)〜画素P(2480,n+5)の濃度画素値は最小値が180であり、灰色濃度閾値Gh(=180)以下である濃度画素値の割合は33%であるため、割合閾値Wh(=30%)以上であると判断する(S302:YES)。CPU90は、S303の処理を実行後、上記と同様に、G色及びB色の濃度画像データについても濃度判断処理を実行し(S212及びS213)、S214及びS215の処理を実行する。
Specifically, subscanning density determination pixel count N2 = 3, document width pixel count M = 2480, predetermined constant ns = 1, gray density threshold Gh = 180, ratio threshold Wh = 30%, and predetermined line count LN = 11C and 11 for the case where the
灰色濃度閾値Ghについて、読取部4が、図10(B)に示す副走査方向の右方へ移動しながら見開き原稿BKの右頁BKR及び右頁BKRの右端部BRAの画像を読み取る場合を例に挙げて、図10(B)及び図10(C)を参照して説明する。図10(B)に示すように、読取部4と右端部BRAとの上下方向距離Wzが、読取部4の焦点深度以上となることにより、読取部4で読み取られた画像の濃度画素値は灰色の濃度画素値となる。灰色濃度閾値Ghは、図10(C)に示すように、後端エッジライン数EEより副走査方向のライン数NSW(S5の処理で算出したライン数NSW)に向かう方向における画素値の中で最大値BKG(max)及び最小値BKG(min)を除いた画素値のうちのいずれかの画素値である。灰色濃度閾値Ghを図10(C)示すように設定して、CPU90が上記読取終了判断処理を実行することにより、従来、見開き原稿BKの定形サイズに基づいて算出したライン数NSWの位置よりも副走査方向の読取開始位置に近いライン数である読取終了ライン数LEで読取部4の画像の読み取りを終了し、モータ59を停止させることができる。割合閾値Whは、1%以上の所定の閾値であり、実験で事前に確認して決定し、ROM92に記憶しておくものとする。
For the gray density threshold Gh, the
[画像出力処理]
本実施形態の複合機1が実行する画像出力処理について、図9のフローチャート及び図12(A)を参照して説明する。図12(A)において、図10(A)と同様に、視覚的に説明するために、RAM93に記憶されたエッジ画像データにおいて「1」のデータを実線で示したエッジ画像のうち、見開き原稿BKの右頁BKRに対応する画像GRのみを含む後端エッジ画像EG2を示す図である。説明簡略化のため、エッジ画像データにおける見開き原稿BKに記載された原稿情報は図示を省略する。図12(A)において、後端エッジ画像EG2の外周を一点鎖線で示す。図12(A)において、複数の点線矢印は、各検索開始点SP(0)、SP(1)・・・SP(N)からの後端エッジ点の検索方向を示す。図9のフローチャートに示す画像出力処理によって、図12(A)に示す後端エッジ画像EG2において、見開き原稿BKの右頁BKRに対応する右頁画像GRの後端エッジ点を検出して、左頁画像GL及び右頁画像GRの画像を抽出し、記録紙の中央に出力する。本実施形態では、説明簡略化のため、原稿の傾きθkが0、またはCPU90がS214の処理実行後で画像出力処理の実行前に、画像処理部94によって読取画像GA及び後端エッジ画像EG2の原稿の傾きθkを補正した場合について説明する。
[Image output processing]
The image output process performed by the
複合機1における画像出力処理について、図9のフローチャートを参照して説明する。CPU90は、ラインカウンタ104によってカウントされたライン数を取得し、読取終了ライン数LEとしてRAM93に記憶する(S400)。CPU90は、後端変数pを初期化して、RAM93に記憶する(S401)。CPU90は、RAM93に記憶されたエッジ画像データにおいて、後端変数pに対応する検索開始点を始点として、見開き原稿BKの右頁BKRに対応する右頁画像GRの後端エッジ点を検索開始する(S402)。CPU90は、読取終了ライン数LEから後端エッジライン数EEを減算したライン数までの画素数を検索したか否かを判断する(S403)。読取終了ライン数LEから後端エッジライン数EEを減算したライン数までの画素数を検索しなかったと判断した場合(S403:NO)、CPU90は、S403の判断処理を繰り返す。読取終了ライン数LEから後端エッジライン数EEを減算したライン数までの画素数を検索したと判断した場合(S403:YES)、CPU90は、検索した後端エッジ点の位置情報をRAM93に記憶する(S404)。CPU90は、後端変数pが検索終了変数PF以上であるか否かを判断する(S405)。後端変数pが検索終了変数PF以上ではないと判断した場合(S405:NO)、CPU90は、後端変数pに1を加算して後端変数pに代入し(S412)、S403以降の処理を繰り返す。
Image output processing in the
具体的には、CPU90は、図12(A)に示すように、RAM93に記憶された後端エッジ画像EG2の読取終了ライン数LE上の後端点である後端変数p=0に対応する検索開始点SP(0)を右頁画像GRの側端エッジ点の検索開始点とする(S402)。CPU90は、後端エッジ画像EG2において、副走査方向に沿って、読取開始位置PSに近づく方向に検索点を移動させながら、エッジ点を検索する(S402)。CPU90は、読取終了ライン数LEから後端エッジライン数EEを減算したライン数まで検索点を移動させたと判断した場合(S403:YES)、検索した複数のエッジ点のうち、読取開始位置PSに最も近いエッジ点の位置情報を、後端エッジ点EP(0)の位置情報としてRAM93に記憶する(S404)。見開き原稿BKの右端部BRAは、複数の頁端部で構成されているので、後端エッジ画像EG2のうち、右端部BRAに対応する画像GRAには、エッジ画素値が「1」であるエッジ画素が主走査方向に沿って複数存在する。S402の処理によって、エッジ点を検索していくと副走査方向に複数のエッジ点が検索されるため、読取開始位置PS及び後端エッジライン数EEにおけるエッジ画素に最も近いエッジ点を後端エッジ点とする。CPU90は、後端変数pが検索終了変数PF以上ではないと判断した場合(S405:NO)、S412の処理によって、図10(A)に示すように、検索開始点SP(0)から主走査方向の検索開始点SP(0)から所定間隔離れた検索変数p=1に対応する検索開始点SP(1)を始点としてS403以降の処理を繰り返す。検索終了変数PFは、原稿幅画素数Mに対応する数値である。上記所定間隔は、原稿幅画素数Mに検索変数PFの数値を除算することで自動的に決まる間隔である。
Specifically, as shown in FIG. 12A, the
後端変数pが検索終了変数PF以上であると判断した場合(S405:YES)、CPU90は、検索した後端エッジ点EP(0)、EP(1)・・・・EP(PF)に対して公知技術である最小二乗法による直線式を算出する(S406)。CPU90は、RAM93に記憶された後端エッジライン数EEを、読取開始位置PSから副走査方向の算出した直線式までの画素数としてRAM93に記憶し直す(S407)。CPU90は、図12(B)に示すように、画像処理部94によって、RAM93に記憶された読取画像GAから見開き原稿BKに対応する画像GKを画像抽出する(S408)。CPU90は、図12(C)に示すように、画像処理部94によって、出力範囲OAにおいて、抽出した見開き原稿BKに対応する画像GKを、副走査方向の出力範囲OAの右端ライン数SEに近づく方向に、(SE−EE)/2だけ移動して画像配置し、RAM93に記憶する(S409)。CPU90は、画像形成部によって出力範囲OAにおける画像データを記録紙に出力する(S410)。なお、出力範囲OAは、定形サイズのうちのいずれかのサイズに対応する出力範囲としてROM92に記憶してもよいし、もしくは操作部7によって、ユーザから入力された定形サイズに対応する出力範囲であってもよい。
If it is determined that the rear end variable p is equal to or more than the search end variable PF (S405: YES), the
[作用効果]
本実施形態における複合機1は、見開き原稿BKを支持するプラテンガラス2と、主走査方向に見開き原稿BKのラインデータを読み取る読取部4と、副走査方向に、読取開始位置PSから読取終了位置PEに向けて読取部4を移動させる駆動部5と、読取部4によって読み取られたライン画像に係る画像データにエッジ強調処理を行い、エッジ画像データを生成するエッジ画像生成部103と、主走査方向のラインをカウントするラインカウンタ104と、画像データを所定の出力範囲OAで出力する画像形成部10と、CPU90と、を備えている。CPU90は、S3の処理によって、読取部4に見開き原稿BKのラインデータを読み取らせ、S7の処理によって、読取部4による読取終了を判断し、S401〜S405の処理によって見開き原稿BKの右頁BKRに対応する画像GRの後端エッジを検出し、S400、S406〜S410の処理によって、出力範囲OAにおいて、見開き原稿BKの画像GKを、副走査方向に(SE−EE)/2だけ移動させて配置し、S411の処理によって、出力範囲OAにおける画像を記録紙に出力する。
[Function effect]
The
これにより、ユーザは、見開き原稿の画像の中心位置を記録紙の中心位置に合わせて、見開き原稿の画像を記録紙に画像形成することができる。 Thus, the user can form the image of the spread original on the recording sheet by aligning the center position of the image of the spread original with the center position of the recording sheet.
[実施形態と発明との対応関係]
複合機1が、本発明の画像読取装置の一例である。CPU90が、本発明の制御部の一例である。プラテンガラス2が、本発明の原稿台の一例である。S3〜S7が、本発明の読取処理の一例である。エッジ閾値Ehが、本発明の第1閾値の一例である。S201及びS205〜S209が、本発明のエッジ判断処理の一例である。灰色濃度閾値Ghが、本発明の第2閾値の一例である。割合閾値Whが、本発明の第3閾値の一例である。S211〜S213、及びS300〜S303が、本発明の濃度判断処理の一例である。S215が、本発明の移動停止処理の一例である。S206、S207、及びS216〜S218が、本発明のエッジ判断制御処理の一例である。S301、及びS304〜S306が、本発明の濃度判断制御処理の一例である。原稿幅画素数Mが、本発明の主走査原稿幅の一例である。原稿傾きθkが、本発明の主走査原稿傾きの一例である。S100〜S107が、本発明の原稿決定処理の一例である。S5が、本発明の特定ライン決定処理の一例である。S6が、本発明のライン数判断処理の一例である。画像形成部10が、本発明の画像出力部の一例である。S400が、本発明の読取終了ライン記憶処理の一例である。S401〜S405、S412が、本発明の後端エッジ検出処理の一例である。S406及びS407が、本発明の後端ライン決定処理の一例である。S408が、本発明の画像抽出処理の一例である。S409が、本発明の画像出力範囲決定処理の一例である。S410が、本発明の画像出力処理の一例である。
[Correspondence between embodiment and invention]
The
[変形例]
本発明は上記記述及び図面によって説明した実施形態に限定されるものではなく、例えば、次のように本実施形態を変更してもよい。
[Modification]
The present invention is not limited to the embodiments described above with reference to the drawings. For example, the present embodiment may be modified as follows.
(1)本実施形態では、エッジ判断対象範囲の主走査方向の画素数を、原稿幅エッジ画素数Mで構成しているが、この構成に限定されない。エッジ判断対象範囲の主走査方向の画素数を所定の複数の画素数で構成してもよい。また、本実施形態では、エッジ判断対象範囲の副走査方向の画素数を、所定の複数の画素数である副走査エッジ判断画素数N1で構成しているが、この構成に限定されない。S4の処理によって、決定された原稿幅画素数M及び原稿傾きθkに基づいて、M×sinθkで表される副走査方向の画素数を、エッジ判断対象範囲の副走査方向の画素数とする構成であってもよい。 (1) In the present embodiment, the number of pixels in the main scanning direction of the edge determination target range is configured by the document width edge pixel number M, but the present invention is not limited to this configuration. The number of pixels in the main scanning direction of the edge determination target range may be configured with a predetermined number of pixels. Further, in the present embodiment, the number of pixels in the sub-scanning direction of the edge determination target range is configured with the number N1 of sub-scanning edge determination pixels, which is a predetermined plurality of pixels, but is not limited to this configuration. A configuration in which the number of pixels in the subscanning direction represented by M × sin θk is the number of pixels in the subscanning direction of the edge determination target range based on the document width pixel number M and the document inclination θk determined by the process of S4. It may be
(2)実施形態では、エッジ判断対象範囲P(m,n)〜P(M,n+N1)を、エッジ判断対象ブロックに分割する構成としているが、この構成に限定されない。エッジ判断対象範囲P(m,n)〜P(M,n+N1)をエッジ判断対象ブロックに分割しない構成であってもよい。この場合、CPU90は、S206の処理において、エッジ判断対象範囲P(m,n)〜P(M,n+N1)におけるエッジ画素値を取得する。CPU90は、S207の処理において、S206の処理によって取得したエッジ画素値について、副走査方向に沿った複数のエッジ画素値のいずれかがエッジ閾値Eh以上であるか否かの判断を、エッジ判断対象範囲の主走査方向の複数の画素毎に行う。
(2) In the embodiment, the edge determination target ranges P (m, n) to P (M, n + N1) are divided into edge determination target blocks, but the present invention is not limited to this configuration. The edge determination target ranges P (m, n) to P (M, n + N1) may not be divided into edge determination target blocks. In this case, the
(3)本実施形態では、濃度判断対象範囲の主走査方向の画素数を、原稿幅エッジ画素数Mで構成しているが、この構成に限定されない。濃度判断対象範囲の主走査方向の画素数を所定の複数の画素数で構成してもよい。また、本実施形態では、濃度判断対象範囲の副走査方向の画素数を、所定の複数の画素数である副走査濃度判断画素数N2で構成しているが、この構成に限定されない。図10(B)に示す原稿載置面2aに対するブック原稿BKの右端部BRAの傾きθwと、読取部4の焦点深度Wkとに基づいて、Wk/tanθwで算出される副走査方向の距離に対応する画素数を、副走査濃度判断画素数N2とする構成であってもよい。これにより、CPU90が、S207及びS208の処理によって、エッジ検出フラグがオンとなった後(S207:YES、S208:YES、S209)、濃度判断対象範囲に灰色濃度閾値以下となる画素数の割合が、割合閾値以上となる確率を高め、CPU90は、S214及びS215の処理を早期に実行することが可能となる。
(3) In the present embodiment, the number of pixels in the main scanning direction of the density determination target range is configured by the document width edge pixel number M, but the present invention is not limited to this configuration. The number of pixels in the main scanning direction of the density determination target range may be configured with a predetermined number of pixels. Further, in the present embodiment, the number of pixels in the sub-scanning direction of the density determination target range is configured with the number N2 of sub-scanning density determination pixels, which is a predetermined plurality of pixels, but is not limited to this configuration. Based on the inclination θw of the right end portion BRA of the book document BK with respect to the
(4)本実施形態では、画像処理部94に解像度変換部101が含まれる構成としているが、この構成に限定されない。読取部4によって読み取られたRGB各色それぞれのラインデータを解像度変換部101に接続することなく、色変換部102に接続するとともに、濃度画像データとしてRAM93に出力して記憶する構成であってもよい。
(4) In the present embodiment, the
(5)本実施形態では、濃度判断対象範囲において、灰色濃度閾値以下である濃度画素値となる濃度判断対象範囲の全画素数に対する割合を、灰色濃度閾値以下である濃度画素値に対して濃度判断対象範囲の全画素数を除算して算出する構成としたが、この構成に限定されない。灰色濃度閾値以下の濃度画素値となる濃度判断対象範囲の全画素数に対する割合を、灰色濃度閾値以下である濃度画素値となる濃度画素数とする構成であってもよい。 (5) In the present embodiment, in the density determination target range, the ratio to the total number of pixels of the density determination target range which is the density pixel value equal to or less than the gray density threshold is the density relative to the density pixel value equal to or less than the gray density threshold Although the configuration is such that calculation is performed by dividing the total number of pixels in the determination target range, the present invention is not limited to this configuration. The ratio of the density determination target range in which the density pixel value is equal to or less than the gray density threshold to the total number of pixels may be set as the number of density pixels in which the density pixel value is equal to or less than the gray density threshold.
(6)本実施形態では、所定の変数nsを1とする構成としているが、この構成に限定されない。所定の変数nsを、2以上で、かつ、所定ライン数LN未満である数値とする構成であってもよい。 (6) Although the predetermined variable ns is set to 1 in the present embodiment, the present invention is not limited to this structure. The predetermined variable ns may be a numerical value which is 2 or more and less than the predetermined line number LN.
(7)本実施形態では、図5に示すS5及びS6の処理を実行する構成としたが、この構成に限定されない。CPU90は、S4の処理を実行後、S7の処理を実行する構成であってもよい。
(7) Although this embodiment is configured to execute the processes of S5 and S6 shown in FIG. 5, the present invention is not limited to this configuration. The
(8)本実施形態では、S5の処理において、CPU90は、画素数2SWから見開き原稿BKの右端部BRAの短辺幅に対応する画素数RSWを減算した画素数LSWを算出し、画素数LSWを、判断開始ライン数として決定する構成としたが、この構成に限定されない。画素数2SWから見開き原稿BKの右端部BRAの短辺幅に対応する画素数RSWを減算し、さらに所定の画素数を減算して画素数LSWを算出し、判断開始ライン数として決定する構成であってもよい。所定の画素数は、判断開始ライン数LSWを、見開き原稿BKの右端部BRAより副走査方向の読取開始位置PSに近づけるための画素数である。所定の画素数は、S4の処理によって、決定された原稿幅画素数M及び原稿傾きθkに基づいて、M×sinθkで表される副走査方向の画素数としてもよい。これにより、見開き原稿BKが、主走査方向に対して原稿傾きθkだけ傾いていた場合であっても、エッジ閾値Eh以上となるエッジ画素値の検出精度を向上させることができる。
(8) In the present embodiment, in the process of S5, the
(9)本実施形態では、解像度変換部101の後段で、かつ色変換部102の手前でRGB各色それぞれのライン画像データを濃度画像データとしてそれぞれRAM93に記憶する構成としたが、この構成に限定されない。色変換部102の後段で、かつエッジ画像生成部103の手前で、各画素の輝度値のデータを濃度画像データとしてRAM93に記憶する構成であってもよい。この場合、CPU90は、S211の処理を各画素の輝度値のデータで構成された濃度画像データに対して実行し、S212及びS213の処理を実行しなくてもよい。
(9) In the present embodiment, the line image data of each of the RGB colors is stored in the
(10)本実施形態では、S214の処理を実行する構成としたが、これに限定されない。CPU90は、S213の処理を実行後、S214の処理を実行することなく、S215の処理を実行する構成であってもよい。この場合、CPU90は、S8の処理を実行後、S214の処理を実行し、S214の処理の実行後、S9の処理を実行する。
(10) In the present embodiment, the processing of S214 is performed, but the present invention is not limited to this. After executing the processing of S213, the
2…プラテンガラス、4…読取部、5…駆動部、103…エッジ画像生成部、
90…CPU、1…複合機
2 ... platen glass, 4 ... reading unit, 5 ... driving unit, 103 ... edge image generating unit,
90 CPU, 1 multifunction machine
Claims (8)
主走査方向に原稿のライン画像を読み取る読取部と、
前記主走査方向と直交する副走査方向に、読取開始位置から読取終了位置に向けて前記読取部を移動させる駆動部と、
前記読取部によって読み取られた前記ライン画像に係る画像データにエッジ強調処理を行い、エッジ画像データを生成するエッジ画像生成部と、
制御部と、を備え、
前記制御部は、
前記駆動部に前記副走査方向の前記読取開始位置から前記読取終了位置に向けて前記読取部を移動させながら、前記読取部に前記ライン画像を読み取らせる読取処理と、
前記エッジ画像生成部により生成された前記エッジ画像データから、前記副走査方向に複数の画素および前記主走査方向に複数の画素からなるエッジ判断対象範囲のエッジ画素値を取得し、取得した前記エッジ判断対象範囲の前記エッジ画素値について、前記副走査方向に沿った前記複数の画素に係る前記エッジ画素値のいずれかが第1閾値以上であるか否かの判断を、前記主走査方向に沿った前記複数の画素毎に行うエッジ判断処理と、
前記エッジ判断処理により、前記主走査方向に沿った前記複数の画素全てにおいて、前記副走査方向に沿った前記複数の画素に係る前記エッジ画素値のいずれかが第1閾値以上であると判断した場合、前記画像データのうち前記エッジ判断対象範囲に対応する位置よりも前記副走査方向において前記読取終了位置に近い画像データから、前記副走査方向に複数の画素および前記主走査方向に複数の画素からなる濃度判断対象範囲の画素値を取得し、取得した前記濃度判断対象範囲の前記画素値について、前記画素値の取り得る最小値及び最大値を除いて第2閾値以下である画素値となる前記濃度判断対象範囲の全画素数に対応する割合が第3閾値以上であるか否かの判断を行う濃度判断処理と、
前記濃度判断処理により、前記割合が前記第3閾値以上であると判断した場合、前記駆動部に前記副走査方向に移動している前記読取部を停止させる移動停止処理と、
を実行する、画像読取装置。 A manuscript support for supporting the manuscript,
A reading unit that reads a line image of a document in the main scanning direction;
A driving unit for moving the reading unit from a reading start position toward a reading end position in a sub-scanning direction orthogonal to the main scanning direction;
An edge image generation unit that performs edge enhancement processing on image data relating to the line image read by the reading unit to generate edge image data;
And a control unit,
The control unit
Reading processing for causing the reading unit to read the line image while moving the reading unit from the reading start position in the sub scanning direction to the reading end position in the driving unit;
An edge pixel value of an edge determination target range including a plurality of pixels in the sub scanning direction and a plurality of pixels in the main scanning direction is acquired from the edge image data generated by the edge image generation unit, and the acquired edge With respect to the edge pixel value in the determination target range, it is determined whether or not any of the edge pixel values of the plurality of pixels along the sub scanning direction is equal to or greater than a first threshold, along the main scanning direction. Edge determination processing performed for each of the plurality of pixels;
In the edge determination processing, it is determined that, in all the plurality of pixels along the main scanning direction, any of the edge pixel values of the plurality of pixels along the sub scanning direction is equal to or greater than a first threshold In this case, from the image data closer to the reading end position in the sub scanning direction than the position corresponding to the edge determination target range in the image data, a plurality of pixels in the sub scanning direction and a plurality of pixels in the main scanning direction The pixel value of the density determination target range consisting of is obtained, and the obtained pixel value of the density determination target range becomes a pixel value equal to or less than the second threshold except for the minimum value and the maximum value that can be taken of the pixel value. Density determination processing for determining whether a ratio corresponding to the total number of pixels in the density determination target range is equal to or greater than a third threshold;
Movement stop processing for causing the drive unit to stop the reading unit moving in the sub scanning direction when it is determined by the density determination processing that the ratio is equal to or more than the third threshold;
Perform an image reader.
前記制御部は、
前記エッジ判断処理により、前記主走査方向に沿った前記複数の画素のうち少なくとも1つ以上の画素において、前記副走査方向に沿った前記複数の画素全てにそれぞれ係る全ての前記エッジ画素値が第1閾値未満であると判断した場合、前記エッジ判断対象範囲から前記副走査方向の前記読取終了位置に向かって所定数の画素まで離れたエッジ判断対象範囲を新たなエッジ判断対象範囲として前記エッジ判断処理を再度実行するエッジ判断制御処理と、
前記濃度判断処理により、前記割合が前記第3閾値未満であると判断した場合、前記エッジ判断対象範囲に対応する位置から前記副走査方向の前記読取終了位置に向かって所定数の画素まで離れた位置を新たなエッジ判断対象範囲に対応する位置として前記濃度判断処理を再度実行する濃度判断制御処理と、を実行する、画像読取装置。 In the image reading apparatus according to claim 1,
The control unit
According to the edge determination processing, in at least one or more pixels among the plurality of pixels along the main scanning direction, all the edge pixel values respectively related to all the plurality of pixels along the sub scanning direction If it is determined that the value is less than one threshold, the edge determination range is determined as a new edge determination range, which is a predetermined number of pixels away from the edge determination range toward the reading end position in the sub scanning direction. Edge determination control processing that executes the processing again;
When it is determined by the density determination process that the ratio is less than the third threshold, a predetermined number of pixels are separated from the position corresponding to the edge determination target range toward the reading end position in the sub scanning direction An image reading apparatus that executes density determination control processing that executes the density determination processing again as a position corresponding to a new edge determination target range;
前記制御部は、
前記読取処理の開始後、前記エッジ画像データにおける前記原稿の先端エッジまたは側端エッジを検出することにより前記原稿の主走査原稿幅および前記原稿の主走査原稿傾きを決定する原稿決定処理を実行し、
前記エッジ判断対象範囲は、
前記制御部により前記主走査原稿幅に基づいて決められる前記主走査方向に複数の画素および前記主走査原稿幅と前記主走査原稿傾きとに基づいて決められる前記副走査方向に複数の画素からなる範囲であり、
前記新たなエッジ判断対象範囲は、
前記エッジ判断対象範囲から前記副走査方向の前記読取終了位置に向かって1つの画素まで離れたエッジ判断対象範囲である、画像読取装置。 In the image reading apparatus according to claim 2,
The control unit
After the start of the reading process, an original determination process is performed to determine the main scanning original width of the original and the main scanning inclination of the original by detecting the leading edge or the side edge of the original in the edge image data. ,
The edge judgment target range is
The control unit comprises a plurality of pixels in the main scanning direction determined based on the main scanning document width, and a plurality of pixels in the sub scanning direction determined based on the main scanning document width and the main scanning document inclination. Range,
The new edge judgment target range is
An image reading apparatus, which is an edge determination target range separated from the edge determination target range by one pixel toward the reading end position in the sub scanning direction.
前記濃度判断対象範囲は、
前記副走査方向の前記読取終了位置に向かう方向の前記原稿の側端部の前記原稿台に対する傾きおよび前記読取部の焦点深度に基づいて予め決められた前記副走査方向に複数の画素および前記主走査方向に複数の画素からなる範囲である、画像読取装置。 In the image reading apparatus according to claim 2,
The concentration judgment target range is
A plurality of pixels and the main in the sub-scanning direction predetermined based on the inclination of the side end of the document in the sub-scanning direction toward the reading end position with respect to the document table and the focal depth of the reading unit An image reading apparatus which is a range consisting of a plurality of pixels in a scanning direction.
前記エッジ判断対象範囲は、
前記エッジ解析画像データにおいて、前記主走査方向の1つの画素データである特定画素データを基準として、当該特定画素データから前記移動方向に前記エッジ副走査幅の範囲まで含まれる画素データで構成されたエッジ判断対象ブロックを1つの単位として、前記特定画素データから前記主走査原稿幅の範囲の画素データの数だけ前記主走査方向に沿って構成された複数の前記エッジ判断対象ブロックからなる範囲であり、
前記エッジ判断処理は、
前記エッジ判断対象ブロック毎に、前記エッジ画素データをそれぞれ取得し、前記取得されたエッジ画素データが、前記エッジ判断対象ブロック毎に前記第1閾値以上存在するか否かを全てのエッジ判断対象ブロックに対して判断し、
前記エッジ判断制御処理は、
前記エッジ判断処理の結果、前記全てのエッジ判断対象ブロックのうち、1つのエッジ判断対象ブロックにおいて、前記取得されたエッジ画素データが、前記第1閾値以上存在しないと判断した場合、前記特定画素データを前記移動方向に所定数の画素データだけ離れた画素データを新たな特定画素データとして前記エッジ判断処理を再度実行する、画像読取装置。 In the image reading apparatus according to claim 4,
The edge judgment target range is
In the edge analysis image data, it is constituted by pixel data including the specific pixel data which is one pixel data in the main scanning direction as a reference to the range of the edge sub-scanning width in the moving direction from the specific pixel data. The edge determination target block is a range consisting of a plurality of the edge determination target blocks configured along the main scanning direction by the number of pixel data in the range of the main scanning document width from the specific pixel data as one unit ,
The edge determination process is
The edge pixel data is acquired for each of the edge determination target blocks, and all the edge determination target blocks have the acquired first edge threshold data or more for each of the edge determination target blocks. Judge against
The edge determination control process is
When it is determined that the acquired edge pixel data does not exist in the one edge determination target block among all the edge determination target blocks as the result of the edge determination processing, the specific pixel data is not present An image reading apparatus that executes again the edge determination processing as new specified pixel data with pixel data separated by a predetermined number of pixel data in the movement direction.
前記読取部は、
前記主走査方向のライン毎に原稿の画像を読み取り、
前記エッジ画像生成部は、
前記主走査方向のライン毎に、前記解析画像データに対してエッジ強調処理を行い、前記主走査方向のライン毎に、画素単位で各画素の画素値が所定の閾値以上となる画素をエッジ画素としてエッジ画像データを生成し、
前記主走査方向のライン数をカウントするラインカウンタを備え、
前記制御部は、
前記原稿決定処理によって決定された主走査原稿幅に基づいて、前記主走査方向の特定ラインのライン数を決定する特定ライン決定処理と、
前記ラインカウンタによってカウントされた前記主走査方向のライン数が前記特定ラインのライン数と等しいか否かを判断するライン数判断処理と、を実行し、
前記ライン数判断処理の結果、前記カウントされた主走査方向のライン数が前記特定ラインのライン数と等しいと判断した場合、前記特定ラインにおける特定画素を基準として前記エッジ取得判断処理を実行する、画像読取装置。 In the image reading apparatus according to claim 2,
The reading unit is
Reading an image of a document for each line in the main scanning direction;
The edge image generation unit
Edge enhancement processing is performed on the analysis image data for each line in the main scanning direction, and pixels for which the pixel value of each pixel is equal to or more than a predetermined threshold in each pixel in the main scanning direction are edge pixels Generate edge image data as
A line counter for counting the number of lines in the main scanning direction;
The control unit
A specific line determination process of determining the number of lines of a specific line in the main scanning direction based on the main scanning document width determined by the original determination process;
Performing a line number determination process of determining whether the number of lines in the main scanning direction counted by the line counter is equal to the number of lines of the particular line;
When it is determined that the counted number of lines in the main scanning direction is equal to the number of lines of the specific line as a result of the line number determination process, the edge acquisition determination process is executed based on a specific pixel in the specific line. Image reader.
画像データを所定の出力範囲で出力する画像出力部を備え、
前記制御部は、
前記読取終了処理の実行後、前記ラインカウンタによってカウントされた読取終了ラインのライン数を記憶する読取終了ライン記憶処理と、前記エッジ画像データにおいて前記原稿の後端エッジを検出する後端エッジ検出処理と、前記検出された原稿の後端エッジおよび前記読取終了ラインのライン数に基づいて、前記後端エッジのライン数を決定する後端ライン決定処理と、前記後端エッジに基づいて、前記読取部によって読み取られた画像データを抽出する画像抽出処理と、前記主走査原稿幅に基づいて、前記出力範囲を決定する出力範囲決定処理と、前記特定ラインおよび前記後端エッジのライン数に基づいて、前記抽出された読取画像データを、前記決定された出力範囲内に配置する画像出力処理と、を実行する、画像読取装置。 In the image reading apparatus according to claim 6,
An image output unit for outputting image data in a predetermined output range;
The control unit
Reading end line storing processing for storing the line number of reading ending lines counted by the line counter after execution of the reading end processing, and rear end edge detection processing for detecting the rear end edge of the document in the edge image data And, on the basis of the rear end edge, the rear end line determination processing for determining the number of lines of the rear end edge based on the detected rear end edge of the document and the number of lines of the reading completion line. And an output range determining process for determining the output range based on the main scanning document width based on an image extracting process for extracting image data read by a copy unit, and based on the number of lines of the specific line and the rear end edge. An image output process of arranging the extracted read image data within the determined output range.
前記駆動部に前記副走査方向の前記読取開始位置から前記読取終了位置に向けて前記読取部を移動させながら、前記読取部に前記ライン画像を読み取らせる読取処理と、
前記エッジ画像生成部により生成された前記エッジ画像データから、前記副走査方向に複数の画素および前記主走査方向に複数の画素からなるエッジ判断対象範囲のエッジ画素値を取得し、取得した前記エッジ判断対象範囲の前記エッジ画素値について、前記副走査方向に沿った前記複数の画素に係る前記エッジ画素値のいずれかが第1閾値以上であるか否かの判断を、前記主走査方向に沿った前記複数の画素毎に行うエッジ判断処理と、
前記エッジ判断処理により、前記主走査方向に沿った前記複数の画素全てにおいて、前記副走査方向に沿った前記複数の画素に係る前記エッジ画素値のいずれかが第1閾値以上であると判断した場合、前記画像データのうち前記エッジ判断対象範囲に対応する位置よりも前記副走査方向において前記読取終了位置に近い画像データから、前記副走査方向に複数の画素および前記主走査方向に複数の画素からなる濃度判断対象範囲の画素値を取得し、取得した前記濃度判断対象範囲の前記画素値について、前記画素値の取り得る最小値及び最大値を除いて第2閾値以下である画素値となる前記濃度判断対象範囲の全画素数に対応する割合が第3閾値以上であるか否かの判断を行う濃度判断処理と、
前記濃度判断処理により、前記割合が前記第3閾値以上であると判断した場合、前記駆動部に前記副走査方向に移動している前記読取部を停止させる移動停止処理と、
を実行する画像読取プログラム。 An original support plate for supporting an original, a reading unit for reading a line image of the original in the main scanning direction, and the reading unit from the reading start position to the reading end position in the sub scanning direction orthogonal to the main scanning direction An image to be executed by a control unit of an image reading apparatus including a driving unit, and an edge image generation unit that performs edge enhancement processing on image data related to the line image read by the reading unit and generates edge image data A reading program,
Reading processing for causing the reading unit to read the line image while moving the reading unit from the reading start position in the sub scanning direction to the reading end position in the driving unit;
An edge pixel value of an edge determination target range including a plurality of pixels in the sub scanning direction and a plurality of pixels in the main scanning direction is acquired from the edge image data generated by the edge image generation unit, and the acquired edge With respect to the edge pixel value in the determination target range, it is determined whether or not any of the edge pixel values of the plurality of pixels along the sub scanning direction is equal to or greater than a first threshold, along the main scanning direction. Edge determination processing performed for each of the plurality of pixels;
In the edge determination processing, it is determined that, in all the plurality of pixels along the main scanning direction, any of the edge pixel values of the plurality of pixels along the sub scanning direction is equal to or greater than a first threshold In this case, from the image data closer to the reading end position in the sub scanning direction than the position corresponding to the edge determination target range in the image data, a plurality of pixels in the sub scanning direction and a plurality of pixels in the main scanning direction The pixel value of the density determination target range consisting of is obtained, and the obtained pixel value of the density determination target range becomes a pixel value equal to or less than the second threshold except for the minimum value and the maximum value that can be taken of the pixel value. Density determination processing for determining whether a ratio corresponding to the total number of pixels in the density determination target range is equal to or greater than a third threshold;
Movement stop processing for causing the drive unit to stop the reading unit moving in the sub scanning direction when it is determined by the density determination processing that the ratio is equal to or more than the third threshold;
An image reading program that executes
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017172821A JP2019050466A (en) | 2017-09-08 | 2017-09-08 | Image reader image reading program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017172821A JP2019050466A (en) | 2017-09-08 | 2017-09-08 | Image reader image reading program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2019050466A true JP2019050466A (en) | 2019-03-28 |
Family
ID=65905980
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017172821A Pending JP2019050466A (en) | 2017-09-08 | 2017-09-08 | Image reader image reading program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2019050466A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2021195258A (en) * | 2020-06-18 | 2021-12-27 | 株式会社Pfu | Medium conveying apparatus, control method, and control program |
-
2017
- 2017-09-08 JP JP2017172821A patent/JP2019050466A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2021195258A (en) * | 2020-06-18 | 2021-12-27 | 株式会社Pfu | Medium conveying apparatus, control method, and control program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4752605B2 (en) | Image reading device | |
JP4792926B2 (en) | Image reading device | |
US20100315689A1 (en) | Image processing apparatus, image processing method, and image processing program recorded recording medium | |
JP6338554B2 (en) | Image processing apparatus, image processing method, and program | |
JP2007208617A (en) | Image reading apparatus and image reading method | |
JP2019050466A (en) | Image reader image reading program | |
JP5939017B2 (en) | Image reading apparatus and document presence / absence determination program | |
JP2015198327A (en) | Image reading device, image reading method, and computer program | |
JP2021158562A (en) | Image reader | |
JP6590991B2 (en) | Information processing apparatus, information processing apparatus control method, and program | |
US20150381846A1 (en) | Image reading apparatus, image forming apparatus and computer readable medium storing program | |
JP5768752B2 (en) | Image reading apparatus and original arrangement determination program | |
JP2009135730A (en) | Image reader | |
JP5915256B2 (en) | Image reading apparatus and document area determination program | |
JP2018148445A (en) | Image reader, image reading system, and image reading program | |
JP6561732B2 (en) | Reader and program | |
JP2019080092A (en) | Image reader | |
JP2009111692A (en) | Image reader | |
JP5885766B2 (en) | Image processing device | |
JP2009038429A (en) | Image reader | |
JP2010041595A (en) | Image reader, image forming apparatus, image reading method, and computer program | |
JP6115804B2 (en) | Image reading device | |
JP2020167515A (en) | Image reading device, method for controlling image reading device, and program | |
JP2018026729A (en) | Imaging apparatus, imaging method and imaging program | |
JP6501125B2 (en) | Image reading apparatus, image reading method, image forming apparatus, and image reading program |