JP2017175328A - Image processing device, information processing device, and image processing method - Google Patents
Image processing device, information processing device, and image processing method Download PDFInfo
- Publication number
- JP2017175328A JP2017175328A JP2016058110A JP2016058110A JP2017175328A JP 2017175328 A JP2017175328 A JP 2017175328A JP 2016058110 A JP2016058110 A JP 2016058110A JP 2016058110 A JP2016058110 A JP 2016058110A JP 2017175328 A JP2017175328 A JP 2017175328A
- Authority
- JP
- Japan
- Prior art keywords
- image data
- edge
- region
- determination
- area
- 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
Abstract
Description
本発明は、画像処理装置、情報処理装置、および画像処理方法に関する。 The present invention relates to an image processing device, an information processing device, and an image processing method.
特許文献1には、画像読取装置の自動原稿給送装置に用紙サイズ検出専用のセンサーを設けること無く、読み取った画像領域から自動で抽出された原稿領域を判定する画像読み取りシステムが開示されている。
特許文献1では、スキャンした画像データの上端から所定距離内に存在する原稿の2つの頂点と、下端から所定距離内に存在する2つの頂点により原稿サイズを求める。そのため、特許文献1では、矩形でない原稿の頂点の判定が困難な場合があり、画像データを原稿部分と背景部分(原稿でない部分)とに分けることが困難な場合がある。
In
そこで本発明は、画像データをスキャン対象物部分と背景部分とに適切に分けることができる技術を提供する。 Therefore, the present invention provides a technique capable of appropriately dividing image data into a scan target part and a background part.
上記の課題を解決するための本発明の第一の態様は、スキャン対象物を給送する給送部と、給送される前記スキャン対象物をスキャンし、画像データを出力するスキャン部と、前記画像データのエッジを抽出するエッジ抽出部と、前記エッジに基づいて、前記画像データの上端から所定ラインまでの判定用画像データのエッジ領域および非エッジ領域を検出する領域検出部と、検出された前記エッジ領域および前記非エッジ領域に対し、スキャン対象物領域であるかまたは背景領域であるか判定する前判定部と、前記判定用画像データの前記スキャン対象物領域および前記背景領域の判定結果と、前記判定用画像データに続く続画像データの前記エッジとに基づいて、前記続画像データの前記スキャン対象物領域および前記背景領域を判定する続判定部と、を有することを特徴とする画像処理装置である。第一の態様によれば、画像処理装置は、画像データをスキャン対象物部分と背景部分とに適切に分けることができる。 A first aspect of the present invention for solving the above problems is a feeding unit that feeds a scan object, a scanning unit that scans the fed scan object and outputs image data, An edge extraction unit that extracts an edge of the image data; and an area detection unit that detects an edge region and a non-edge region of determination image data from the upper end of the image data to a predetermined line based on the edge; A pre-determination unit for determining whether the region is a scan target region or a background region with respect to the edge region and the non-edge region, and a determination result of the scan target region and the background region of the determination image data And the scan object area and the background area of the subsequent image data based on the edge of the subsequent image data following the determination image data. A connection judging unit, an image processing apparatus characterized by having a. According to the first aspect, the image processing apparatus can appropriately divide the image data into the scan target part and the background part.
前記前判定部は、前記エッジを含まない前記非エッジ領域を前記背景領域と仮判定し、前記エッジを含む前記非エッジ領域と、前記エッジ領域とを前記スキャン対象物領域と仮判定する、ことを特徴としてもよい。これにより、画像処理装置は、エッジ領域および非エッジ領域に対し、背景領域であるかスキャン対象物領域であるか適切に仮判定することができる。 The pre-determination unit provisionally determines the non-edge area not including the edge as the background area, and temporarily determines the non-edge area including the edge and the edge area as the scan target area. May be a feature. As a result, the image processing apparatus can appropriately provisionally determine whether the edge region and the non-edge region are the background region or the scan target region.
前記スキャン部は、前記スキャン対象物をオーバースキャンし、前記前判定部は、仮判定した前記エッジ領域および前記非エッジ領域が、前記判定用画像データの上端に接しておらず、前記判定用画像データの下端に接し、かつ前記スキャン部の前記スキャン対象物が通過する座標を含む場合、仮判定した前記エッジ領域および前記非エッジ領域を前記スキャン対象物領域と判定する、ことを特徴としてもよい。これにより、画像処理装置は、仮判定したエッジ領域および非エッジ領域に対し、背景領域であるかスキャン対象物領域であるか適切に補正することができる。 The scan unit overscans the scan object, and the pre-determination unit does not contact the upper edge of the determination image data with the provisionally determined edge region and the non-edge region, and the determination image The edge region and the non-edge region that have been provisionally determined may be determined as the scan object region when it includes a coordinate that touches the lower end of the data and passes through the scan object of the scan unit. . As a result, the image processing apparatus can appropriately correct the temporarily determined edge region and non-edge region as a background region or a scan target region.
前記前判定部は、仮判定した前記エッジ領域および前記非エッジ領域が、前記判定用画像データの下端に接し、かつ前記スキャン部の前記スキャン対象物が通過する座標を含む場合であって、前記エッジ領域および前記非エッジ領域が、前記判定用画像データの上端に接しない場合、前記エッジ領域および前記非エッジ領域を、第1型スキャン対象物領域と判定し、前記エッジ領域および前記非エッジ領域が、前記第1型スキャン対象物領域でなく、前記判定用画像データの左上端点と右上端点とに接しない場合、前記エッジ領域および前記非エッジ領域を、第2型スキャン対象物領域と判定し、前記エッジ領域および前記非エッジ領域が、前記第1型スキャン対象物領域かつ前記第2型スキャン対象物領域でなく、前記判定用画像データの左上端点と右上端点とのいずれか一方にのみ接する場合、前記エッジ領域および前記非エッジ領域を、第3型スキャン対象物領域と判定し、前記第1型スキャン対象物領域、前記第2型スキャン対象物領域、および前記第3型スキャン対象物領域の有無に基づいて、前記エッジ領域および前記非エッジ領域が前記スキャン対象物領域であるかまたは前記背景領域であるか判定する、ことを特徴としてもよい。これにより、画像処理装置は、仮判定したエッジ領域および非エッジ領域に対し、背景領域であるかスキャン対象物領域であるか適切に補正することができる。 The pre-determination unit includes a case where the temporarily determined edge region and the non-edge region include a coordinate that is in contact with a lower end of the determination image data and through which the scan object of the scan unit passes. When the edge region and the non-edge region do not touch the upper end of the determination image data, the edge region and the non-edge region are determined as a first type scan object region, and the edge region and the non-edge region Is not the first type scan target area and does not contact the upper left end point and the upper right end point of the determination image data, the edge area and the non-edge area are determined to be the second type scan target area. The edge region and the non-edge region are not the first type scan target region and the second type scan target region, but the determination image data When contacting only one of the upper end point and the upper right end point, the edge region and the non-edge region are determined as a third type scan target region, and the first type scan target region and the second type scan are determined. Determining whether the edge region and the non-edge region are the scan target region or the background region based on the presence of the target region and the third type scan target region Also good. As a result, the image processing apparatus can appropriately correct the temporarily determined edge region and non-edge region as a background region or a scan target region.
前記続判定部は、前記判定用画像データの前記エッジ領域および前記非エッジ領域に続く前記続画像データの前記エッジ領域および前記非エッジ領域に対し、前記判定用画像データで判定された判定結果を適用する、ことを特徴としてもよい。これにより、画像処理装置は、続画像データのエッジ領域および非エッジ領域に対し、背景領域であるかスキャン対象物領域であるか適切に判定することができる。 The continuation determination unit determines a determination result determined by the determination image data for the edge region and the non-edge region of the continuation image data following the edge region and the non-edge region of the determination image data. It may be characterized by applying. As a result, the image processing apparatus can appropriately determine whether the edge area and the non-edge area of the subsequent image data are the background area or the scan target area.
前記スキャン部が前記給送部から給送される前記スキャン対象物をスキャンするかまたは台の上に置かれた前記スキャン対象物をスキャンするかを判定するスキャン種別判定部、をさらに有し、前記前判定部は、前記スキャン種別判定部の判定結果に応じて、前記判定用画像データの前記スキャン対象物領域および前記背景領域の判定を行う、ことを特徴としてもよい。 A scan type determination unit that determines whether the scan unit scans the scan object fed from the feeding unit or scans the scan object placed on a table; The pre-determination unit may determine the scan object region and the background region of the determination image data according to a determination result of the scan type determination unit.
前記エッジ抽出部は、前記画像データの第1の画素の輝度分散と、前記第1の画素の周囲の第2の画素の輝度分散との輝度分散差を算出し、前記輝度分散差に基づいて、前記画像データのエッジを抽出する、ことを特徴としてもよい。これにより、画像処理装置は、エッジを適切に抽出することができる。 The edge extraction unit calculates a luminance dispersion difference between a luminance dispersion of a first pixel of the image data and a luminance dispersion of a second pixel around the first pixel, and based on the luminance dispersion difference , Extracting an edge of the image data. Thereby, the image processing apparatus can appropriately extract the edge.
上記の課題を解決するための本発明の第二の態様は、画像処理装置がスキャン対象物を給送してスキャンした画像データを、前記画像処理装置から受信する受信部と、前記画像データのエッジを抽出するエッジ抽出部と、前記エッジに基づいて、前記画像データの上端から所定ラインまでの判定用画像データのエッジ領域および非エッジ領域を検出する領域検出部と、検出された前記エッジ領域および前記非エッジ領域に対し、スキャン対象物領域であるかまたは背景領域であるか判定する前判定部と、前記判定用画像データの前記スキャン対象物領域および前記背景領域の判定結果と、前記判定用画像データに続く続画像データの前記エッジとに基づいて、前記続画像データの前記スキャン対象物領域および前記背景領域を判定する続判定部と、を有することを特徴とする情報処理装置である。第二の態様によれば、情報処理装置は、画像データをスキャン対象物部分と背景部分とに適切に分けることができる。 According to a second aspect of the present invention for solving the above-described problem, the image processing apparatus feeds a scan object and scans image data scanned from the image processing apparatus, and the image data An edge extraction unit that extracts an edge; an area detection unit that detects an edge region and a non-edge region of image data for determination from an upper end of the image data to a predetermined line based on the edge; and the detected edge region And a pre-determination unit that determines whether the non-edge region is a scan target region or a background region, a determination result of the scan target region and the background region of the determination image data, and the determination Continuation determination for determining the scan object region and the background region of the continuation image data based on the edge of the continuation image data following the image data for use When an information processing apparatus characterized by having a. According to the second aspect, the information processing apparatus can appropriately divide the image data into the scan target part and the background part.
上記の課題を解決するための本発明の第三の態様は、画像処理装置の画像処理方法であって、スキャン対象物を給送するステップと、給送される前記スキャン対象物をスキャンし、画像データを出力するステップと、前記画像データのエッジを抽出するステップと、前記エッジに基づいて、前記画像データの上端から所定ラインまでの判定用画像データのエッジ領域および非エッジ領域を検出するステップと、検出された前記エッジ領域および前記非エッジ領域に対し、スキャン対象物領域であるかまたは背景領域であるか判定するステップと、前記判定用画像データの前記スキャン対象物領域および前記背景領域の判定結果と、前記判定用画像データに続く続画像データの前記エッジとに基づいて、前記続画像データの前記スキャン対象物領域および前記背景領域を判定するステップと、を含むことを特徴とする画像処理方法である。第三の態様によれば、画像処理装置は、画像データをスキャン対象物部分と背景部分とに適切に分けることができる。 A third aspect of the present invention for solving the above-mentioned problem is an image processing method of an image processing apparatus, the step of feeding a scan object, and scanning the scan object to be fed, A step of outputting image data; a step of extracting edges of the image data; and a step of detecting edge regions and non-edge regions of determination image data from an upper end of the image data to a predetermined line based on the edges. Determining whether the detected edge region and the non-edge region are a scan target region or a background region; and the scan target region and the background region of the determination image data Based on the determination result and the edge of the subsequent image data following the determination image data, the scan object of the subsequent image data A frequency and determining the background region, an image processing method, which comprises a. According to the third aspect, the image processing apparatus can appropriately divide the image data into the scan target part and the background part.
上記の課題を解決するための本発明の第四の態様は、情報処理装置の画像処理方法であって、画像処理装置がスキャン対象物を給送してスキャンした画像データを、前記画像処理装置から受信するステップと、前記画像データのエッジを抽出するステップと、前記エッジに基づいて、前記画像データの上端から所定ラインまでの判定用画像データのエッジ領域および非エッジ領域を検出するステップと、検出された前記エッジ領域および前記非エッジ領域に対し、スキャン対象物領域であるかまたは背景領域であるか判定するステップと、前記判定用画像データの前記スキャン対象物領域および前記背景領域の判定結果と、前記判定用画像データに続く続画像データの前記エッジとに基づいて、前記続画像データの前記スキャン対象物領域および前記背景領域を判定するステップと、を含むことを特徴とする画像処理方法である。第四の態様によれば、情報処理装置は、画像データをスキャン対象物部分と背景部分とに適切に分けることができる。 A fourth aspect of the present invention for solving the above problem is an image processing method of an information processing apparatus, wherein the image processing apparatus supplies image data scanned by a scanning object to the image processing apparatus. Receiving the image data, extracting the edge of the image data, detecting the edge region and the non-edge region of the image data for determination from the upper end of the image data to a predetermined line based on the edge, A step of determining whether the detected edge region and the non-edge region are a scan target region or a background region, and a determination result of the scan target region and the background region of the determination image data And the scan object region of the subsequent image data based on the edge of the subsequent image data following the determination image data. And determining the fine the background region, an image processing method, which comprises a. According to the fourth aspect, the information processing apparatus can appropriately separate the image data into the scan target part and the background part.
以下、本発明の実施の形態を、図面を参照して説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[第1の実施の形態]
図1は、第1の実施の形態に係る画像処理装置1の概略斜視図である。図1に示す画像処理装置1は、例えば、複合機であり、本体2と、カバー3と、ADF(Auto Document Feeder)部(本発明の給送部に相当する)4と、入力装置5とを有している。
[First Embodiment]
FIG. 1 is a schematic perspective view of an
カバー3は、本体2の上面(ガラス等で構成された読み取り台)に対し、開閉できるようになっている。カバー3は、本体2の読み取り台に対して閉じられることにより、本体2の読み取り台に置かれた原稿を押さえる。
The
ADF部4は、カバー3に設けられている。ADF部4は、原稿等のスキャン対象物が給紙される給紙口4aと、スキャンしたスキャン対象物を排紙する排紙口4bとを有している。以下では、スキャン対象物を原稿として説明する。
The
入力装置5は、例えば、表示装置の画面に設けられたタッチパネルである。入力装置5は、ユーザーから所定の操作を受付ける。
The
画像処理装置1は、給紙口4aに原稿が置かれ、入力装置5がユーザーから所定の操作を受付けると、給紙口4aに置かれた原稿を自動で取り込み、取り込んだ原稿の画像データを読み込む。画像処理装置1は、画像データを読み込んだ原稿を排紙口4bから排出する。
When an original is placed in the
図2は、カバー3の一部の概略断面図である。図2の(A)は、画像処理装置1の正面から見たカバー3の概略断面図であり、図2の(B)は、画像処理装置1の上面から見たカバー3の概略断面図である。図2において、図1と同じものには同じ符号が付してある。また、図2には、給紙口4aに置かれた原稿11が示してある。
FIG. 2 is a schematic sectional view of a part of the
図2の(A),(B)に示すように、カバー3は、紙検知センサー12を有している。紙検知センサー12は、原稿11が給紙口4aに置かれたか否かを検出する。紙検知センサー12は、図2の(B)に示すように、給紙口4aのx軸方向(原稿11の進行方向に対し、垂直方向)の略中央部に設けられている。すなわち、紙検知センサー12は、原稿11のx軸方向の略中心部分が通過する位置に設けられている。
As shown in FIGS. 2A and 2B, the
図2の(A),(B)に示すように、本体2は、スキャン部13を有している。スキャン部13は、例えば、イメージセンサー(図示せず)を備え、ADF部4によって給送される原稿11を光学的にスキャンし、原稿11の画像データを出力する。
As shown in FIGS. 2A and 2B, the
スキャン部13は、図2の(A)に示す位置から、右方向へ移動することができる。また、スキャン部13は、図2の(A)の右方向から、図2の(A)に示す位置へ移動することができる。スキャン部13は、紙検知センサー12によって、原稿11が検知されると、図2の(A)に示す位置に移動(配置)され、ADF部4によって給送される原稿11をスキャンする。
The
スキャン部13は、本体2の読み取り台に置かれた原稿11の画像データを出力することもできる。この場合、スキャン部13は、例えば、図2の(A)に示す位置から、右方向へ移動し、本体2の読み取り台に置かれた原稿11をスキャンする。以下では、スキャン部13は、ADF部4によって給送される原稿11をスキャンするとして説明する。
The
図3は、スキャン部13によってスキャンされた原稿11の画像データ例を示した図である。図3に示す画像データ21は、ADF部4によって給送された原稿11を、スキャン部13がスキャンした画像データの例を示している。図3に示す領域22は、スキャン部13がスキャンした原稿11の画像データ領域を示している。
FIG. 3 is a diagram illustrating an example of image data of the
スキャン部13は、ADF部4によって給送される原稿11をオーバースキャンする。このため、図3のオーバースキャンOS1,OS2に示すように、画像データ21の上部と下部には、原稿11以外の画像データ(背景の画像データ)が含まれる。また、原稿11の幅の大きさによっては、画像データ21の左右部分にも、背景の画像データが含まれる。
The
画像処理装置1は、スキャン部13によってスキャンした画像データ21から、原稿11の画像データ部分を切り出す。すなわち、画像処理装置1は、画像データ21から背景部分を除去し、領域22を切り出す。画像処理装置1は、この切り出し処理の際、スキャン部13から出力される画像データ21を、2つの画像データ領域に分ける。
The
例えば、画像処理装置1は、図3に示すように画像データ21を、判定用画像データ21aと、続画像データ21bとの2つの領域に分ける。判定用画像データ21aは、スキャン部13がオーバースキャンを開始してから、所定ラインまでの画像データ(画像データ21の上端から所定ラインまでの画像データ)である。続画像データ21bは、判定用画像データ21aに続く、所定ラインより後(下)の画像データである。
For example, as shown in FIG. 3, the
図3に示す点線は、画像データ21の所定ラインの例を示している。所定ラインは、少なくとも、スキャン部13がオーバースキャンを開始し、原稿11をスキャンし始めるラインより、下のラインとする。例えば、所定ラインは、図3に示す領域22の上端より下のラインとする。
A dotted line shown in FIG. 3 shows an example of a predetermined line of the
以下で詳述するが、画像処理装置1は、判定用画像データ21aにおいて、原稿11の部分(原稿領域)と、原稿11以外の背景部分(背景領域)とを判定する。そして、画像処理装置1は、判定用画像データ21aの原稿領域および背景領域を用いて、判定用画像データ21aに続く続画像データ21bの原稿領域および背景領域を判定する。これにより、画像処理装置1は、画像データ21から、領域22で示される原稿11の部分を切り出す。
As will be described in detail below, the
画像処理装置1は、切り出した原稿部分の画像データを、例えば、画像処理装置1と接続されたパーソナルコンピュータやタブレット端末等の情報処理装置(図示せず)に送信する。または、画像処理装置1は、切り出した原稿部分の画像データを、例えば、USB(Universal Serial Bus)メモリー等の外部メモリー(図示せず)に記憶する。これにより、ユーザーは、原稿部分のみの画像データを取得することができる。
The
なお、画像処理装置1は、スキャン部13の画像データ21の出力とともに、画像データ21の原稿領域および背景領域の判定処理を行う。すなわち、画像処理装置1は、スキャンしながらリアルタイムで、画像データ21の原稿領域および背景領域の判定処理を行う。
Note that the
図4は、画像処理装置1の機能ブロック構成例を示した図である。図4に示すように、画像処理装置1は、ADF部4と、スキャン部13と、制御部31と、通信部32と、入力部33と、記憶部34とを有している。
FIG. 4 is a diagram illustrating a functional block configuration example of the
ADF部4は、図1および図2で説明したADF部である。ADF部4は、制御部31の制御によって、給紙口4aに置かれた原稿をスキャン部13に送り出し、排紙口4bに排紙する。
The
スキャン部13は、図2で説明したスキャン部である。スキャン部13は、制御部31の制御によって、ADF部4によって給送された原稿をスキャンし、原稿の画像データを出力する。スキャン部13は、例えば、カラー(RGB)の画像データを出力する。スキャン部13から出力された画像データは、例えば、記憶部34に記憶される。
The
制御部31は、画像処理装置1の動作を統合的に制御する。制御部31は、以下で詳述するが、スキャン部13によってスキャンされた原稿の画像データ(記憶部34に記憶された画像データ)を、背景部分と原稿部分とに分け、原稿部分を切り出す。
The control unit 31 controls the operation of the
通信部32は、パーソナルコンピュータやタブレット端末等の情報処理装置と通信を行う。通信部32は、例えば、有線または無線によって、情報処理装置と通信を行う。
The
入力部33は、入力装置5から、ユーザーからの操作データを受信する。
The
記憶部34には、制御部31が計算処理や制御処理を行うためのプログラムやデータ等を記憶している。また、記憶部34は、制御部31が所定のアプリケーション機能を実現するためのプログラムやデータ等を記憶している。各種のプログラムやデータ等は、あらかじめ不揮発性の記録媒体に記憶されていてもよいし、制御部31が通信ネットワークを介してサーバーから受信して記憶部34に記憶させてもよい。記憶部34は、例えば、ROM(Read Only Memory)やフラッシュROM、RAM(Random Access Memory)等の各種IC(Integrated Circuit)メモリーやハードディスク、メモリーカードなどの記録媒体等により構成される。
The
制御部31は、エッジ抽出部41と、領域検出部42と、前判定部43と、続判定部44と、切り出し部45とを有している。制御部31の各部は、例えば、記憶部34に記憶されたプログラムを実行するCPU(Central Processing Unit)によって、その機能が実現される。なお、制御部31の各部は、ASIC(Application Specific Integrated Circuit)などのカスタムIC(Integrated Circuit)によって、その機能を実現してもよいし、CPUとASICとによって、その機能を実現してもよい。
The control unit 31 includes an
エッジ抽出部41は、スキャン部13から出力される画像データのエッジを抽出する。
The
図5は、エッジ抽出部41によって抽出されるエッジの例を示した図である。図5の(A)には、スキャン部13から出力される画像データのうちの判定用画像データ51と、背景52と、影53と、原稿54とが示してある。
FIG. 5 is a diagram illustrating an example of edges extracted by the
背景52は、スキャン部13によって読み込まれた原稿以外の領域に対応する。影53は、原稿54と背景52との境界に対応する。原稿54と背景52との境は、影53として画像データに現れる。原稿54は、スキャン部13によって読み込まれた原稿に対応する。
The
図5の(B)には、図5の(A)の判定用画像データ51から抽出したエッジの例が示してある。エッジ抽出部41が、図5の(A)の判定用画像データ51からエッジを抽出すると、図5の(B)に示すようになる。
FIG. 5B shows an example of an edge extracted from the
図5の(B)に示す白い部分が、エッジ領域である。エッジ領域は、図5の(A)の影53に対応する。図5の(B)に示す黒く塗りつぶした部分が、非エッジ領域である。非エッジ領域は、図5の(A)の背景52と原稿54とに対応する。
A white portion shown in FIG. 5B is an edge region. The edge region corresponds to the
なお、図5では、判定用画像データ51のエッジ抽出の例を示しているが、エッジ抽出部41は、判定用画像データ51に続く続画像データのエッジも抽出する。すなわち、エッジ抽出部41は、スキャン部13から出力される画像データのエッジを抽出する。
Although FIG. 5 shows an example of edge extraction of the
また、図5には示していないが、原稿54に文字等が含まれている場合、文字もエッジとして抽出される。
Although not shown in FIG. 5, when the
エッジ抽出部41のエッジ抽出動作について具体的に説明する。エッジ抽出部41は、スキャン部13によってスキャンされた原稿のRGBの画像データを、輝度の画像データに変換する。エッジ抽出部41は、次の式(1)によって、RGBの画像データを輝度の画像データに変換する。
The edge extraction operation of the
次に、エッジ抽出部41は、式(1)によって算出した輝度の画像データを用いて、注目画素と、その周囲の画素との輝度平均を算出する。そして、エッジ抽出部41は、算出した輝度平均を用いて、注目画素の輝度分散を算出し、注目画素と周囲の画素との輝度分散差を算出する。
Next, the
図6は、エッジ抽出部41の輝度分散差の算出例を説明する図である。図6に示すマス目は、画素を示している。「P0」は、注目画素を示している。「P1〜P8」は、注目画素の周囲の画素(注目画素に隣接している画素)を示している。以下では、注目画素の周囲の画素を、「周囲画素」と呼ぶことがある。
FIG. 6 is a diagram for explaining a calculation example of the luminance dispersion difference of the
エッジ抽出部41は、注目画素P0と、周囲画素P1〜P8との輝度平均を算出する。具体的には、エッジ抽出部41は、次の式(2)によって、注目画素P0と、周囲画素P1〜P8との輝度平均「Yu」を算出する。
The
ここで、式(2)の「xj,yi」は、画素の座標を示している。「Y(xj,yi)」は、座標「xj,yi」における画素の輝度(式(1)によって算出された輝度)を示している。すなわち、エッジ抽出部41は、図6に示している太枠内の画素の輝度平均「Yu」を算出する。
Here, “x j , y i ” in Expression (2) indicates the coordinates of the pixel. “Y (x j , y i )” indicates the luminance of the pixel at the coordinates “x j , y i ” (the luminance calculated by equation (1)). That is, the
エッジ抽出部41は、式(2)によって輝度平均を算出すると、算出した輝度平均を用いて、注目画素P0の輝度分散を算出する。具体的には、エッジ抽出部41は、次の式(3)によって、注目画素P0の輝度分散「Ys」を算出する。
The
エッジ抽出部41は、画像データの全ての画素に対し、輝度分散「Ys」を算出する。例えば、エッジ抽出部41は、注目画素P0をラスタースキャンのように移動し、画像データの全ての画素の輝度分散「Ys」を算出する。
The
エッジ抽出部41は、全画素の輝度分散を算出すると、注目画素の輝度分散と、周囲画素の輝度分散との輝度分散差を算出する。例えば、エッジ抽出部41は、図6に示す注目画素P0の輝度分散と、周囲画素P1〜P8のそれぞれの輝度分散との差(輝度分散差)を算出する。より具体的には、エッジ抽出部41は、周囲画素P1と、注目画素P0との輝度分散差を算出し、周囲画素P2と、注目画素P0との輝度分散差を算出し、以下同様にして、周囲画素P8と、注目画素P0との輝度分散差を算出する。
After calculating the luminance variance of all pixels, the
エッジ抽出部41は、注目画素と周囲画素との輝度分散差を算出すると、算出した輝度分散差に基づいて、画像データのエッジを判定する。例えば、エッジ抽出部41は、注目画素P0と、周囲画素P1〜P8との輝度分散差の絶対値が、少なくとも1つ以上、所定の閾値(以下では、「輝度分散差閾値」と呼ぶことがある)を超えている場合、注目画素P0をエッジ画素と判定する。
After calculating the luminance dispersion difference between the target pixel and the surrounding pixels, the
エッジ抽出部41は、画像データの全ての画素に対し、輝度分散差を算出する。例えば、エッジ抽出部41は、注目画素P0をラスタースキャンのように移動し、画像データの全ての画素に対して輝度分散差を算出する。そして、エッジ抽出部41は、画像データの全ての画素についてエッジを判定する。
The
図7は、エッジの判定例を説明する図である。図7には、スキャン部13によってスキャンされた原稿の画像データのうちの、判定用画像データ51が示してある。図7において、図5の(A)と同じものには同じ符号が付してある。図7に示す輝度分散差D0〜D2のそれぞれは、矢印A0〜A2のそれぞれの矢先が示す画素の輝度分散差(絶対値)を示している。
FIG. 7 is a diagram illustrating an example of edge determination. FIG. 7 shows
図7に示すように、矢印A1に示す画素の輝度分散差D1は、輝度分散差閾値を超え、矢印A1に示す画素は、エッジと判定される。これにより、図7に示す判定用画像データ51のエッジは、図5の(B)に示したようになる。
As illustrated in FIG. 7, the luminance dispersion difference D1 of the pixel indicated by the arrow A1 exceeds the luminance dispersion difference threshold, and the pixel indicated by the arrow A1 is determined to be an edge. Thereby, the edge of the
図4の説明に戻る。領域検出部42は、スキャン部13から出力される画像データのうち、判定用画像データを読み込む。そして、領域検出部42は、エッジ抽出部41が抽出したエッジに基づいて、判定用画像データのエッジ領域および非エッジ領域を検出する。
Returning to the description of FIG. The
例えば、領域検出部42は、エッジ抽出部41が抽出したエッジの領域をエッジ領域として検出する。また、例えば、領域検出部42は、エッジ抽出部41が抽出したエッジによって囲まれる閉じた領域を非エッジ領域と判定する。また、例えば、領域検出部42は、エッジ抽出部41が抽出したエッジと、判定用画像データの端とで囲まれる閉じた領域を非エッジ領域と判定する。
For example, the
図8は、領域検出部42によるエッジ領域および非エッジ領域の検出例を示した図である。図8に示す領域L1は、図5の(B)に示した白く塗りつぶしたエッジと、判定用画像データ51の上端と、左端と、右端と、下端の一部とに囲まれた領域である。これにより、図8に示す領域L1は、領域検出部42によって、非エッジ領域として検出される。
FIG. 8 is a diagram illustrating an example of detection of edge regions and non-edge regions by the
図8に示す領域L2は、図5の(B)に示した白く塗りつぶしたエッジに対応する。これにより、図8に示す領域L2は、領域検出部42によって、エッジ領域として検出される。
A region L2 illustrated in FIG. 8 corresponds to the white painted edge illustrated in FIG. Accordingly, the region L2 illustrated in FIG. 8 is detected as an edge region by the
図8に示す領域L3は、図5の(B)に示した白く塗りつぶしたエッジと、判定用画像データ51の下端の一部とに囲まれた領域である。これにより、図8に示す領域L3は、領域検出部42によって、非エッジ領域として検出される。
A region L3 illustrated in FIG. 8 is a region surrounded by the white painted edge illustrated in FIG. 5B and a part of the lower end of the
なお、図8に示す一点鎖線は、紙検知センサー12が通過する部分(座標)を示している。
In addition, the dashed-dotted line shown in FIG. 8 has shown the part (coordinate) through which the
領域検出部42の動作例について具体的に説明する。まず、注目画素と参照画素の定義について説明する。
An example of the operation of the
図9は、注目画素と参照画素とを説明する図である。図9に示す「注」は注目画素を示し、「参」は参照画素を示している。注目画素がエッジ画素の場合、参照画素は、図9の(A)に示すように、注目画素の左隣りの画素、左斜め上の画素、上の画素、および右斜め上の画素となる。注目画素が非エッジ画素の場合、参照画素は、図9の(B)に示すように、注目画素の左隣りの画素および上の画素となる。 FIG. 9 is a diagram for explaining a target pixel and a reference pixel. “Note” shown in FIG. 9 indicates a target pixel, and “reference” indicates a reference pixel. When the pixel of interest is an edge pixel, the reference pixel is a pixel adjacent to the left of the pixel of interest, an upper left pixel, an upper pixel, and an upper right pixel, as shown in FIG. When the target pixel is a non-edge pixel, the reference pixel is a pixel adjacent to the left of the target pixel and an upper pixel, as shown in FIG. 9B.
領域検出部42は、注目画素に対し、ラベル値を割り当てていく。領域検出部42は、注目画素と同じエッジ値(エッジであるか非エッジであるかを示す値)の参照画素が存在しない場合、注目画素に最後に割り当てたラベル値に「1」を加算したラベル値を割り当てる(最初に割り当てるラベル値は「1」とする)。ただし、領域検出部42は、注目画素と同じエッジ値の参照画素が存在する場合、その参照画素の最も小さいラベル値を、注目画素に割り当てる。また、領域検出部42は、参照画素の最も小さいラベル値を、注目画素に割り当てた場合、注目画素と同じエッジ値の参照画素のラベル値を、その最も小さいラベル値に補正する。
The
図10は、領域検出部42の領域検出動作例を説明する図である。図10に示すマス目は、画像データの画素に対応している。ハッチングされたマス目は、非エッジ画素に対応し、ハッチングされていないマス目は、エッジ画素に対応している。また、図10に示す下線が付されたラベル値の画素は、注目画素を示している。
FIG. 10 is a diagram for explaining an example of the region detection operation of the
領域検出部42は、図10の(A)に示すように、左上の画素から右の画素へと順に、ラベル値を割り当てる。領域検出部42は、注目画素と同じエッジ値の参照画素が存在しない場合、注目画素に最後に割り当てたラベル値に「1」を加算したラベル値を割り当てる。また、領域検出部42は、注目画素と同じエッジ値の参照画素が存在する場合、その参照画素の最も小さいラベル値を、注目画素に割り当てる。
As shown in FIG. 10A, the
例えば、図10の(A)の上から3行目で、左から7列目の画素を注目画素とする。この注目画素は、非エッジの画素である。この場合、図9の(B)に基づく参照画素は、2つとも注目画素のエッジ値とは異なるエッジの画素である。従って、図10の(A)の上から3行目で、左から7列目の注目画素のラベル値は、最後に注目画素に割り当てたラベル値「3」に「1」を加算した「4」となる。 For example, the pixel in the third row from the top in FIG. 10A and the seventh column from the left is the target pixel. This target pixel is a non-edge pixel. In this case, both reference pixels based on (B) in FIG. 9 are pixels having an edge different from the edge value of the target pixel. Accordingly, the label value of the target pixel in the third row from the top in FIG. 10A and the seventh column from the left is “4” obtained by adding “1” to the label value “3” last assigned to the target pixel. "
図10の(A)に示すラベル値「4」の右隣に、注目画素が移動したとする。この注目画素は、非エッジの画素である。この場合、図8の(B)に基づく参照画素は、2つとも注目画素のエッジ値と同じ非エッジの画素であるため、ラベル値は、図10の(B)に示すように、参照画素のラベル値の最小値である「1」となる。また、この注目画素の左隣りの参照画素は、注目画素と同じ非エッジ画素であり、領域検出部42は、その参照画素の補正ラベル値「4」を、図10の(B)に示すように、補正ラベル値「1」に変更する。
Assume that the pixel of interest has moved to the right of the label value “4” shown in FIG. This target pixel is a non-edge pixel. In this case, since both of the reference pixels based on (B) in FIG. 8 are non-edge pixels that are the same as the edge value of the target pixel, the label value is the reference pixel as shown in (B) in FIG. This is “1”, which is the minimum value of the label value. Further, the reference pixel on the left side of the target pixel is the same non-edge pixel as the target pixel, and the
領域検出部42が、上記の動作を繰り返すと、各画素には、図10の(C)に示すようなラベル値が割り当てられる。領域検出部42は、全ての画素にラベル値を割り当てると、ラベル値を補正ラベル値に補正する。例えば、領域検出部42は、ラベル値「4」を補正ラベル値「1」に補正する。これにより、各画素に割り当てられたラベル値は、図10の(D)に示すようになる。
When the
このように、領域検出部42は、画像データのエッジ領域と非エッジ領域とにラベル値を割り当てる。これにより、領域検出部42は、ラベル値により、判定用画像データのエッジ領域および非エッジ領域を検出できる。例えば、領域検出部42は、ラベル値「1」が割り当てられた非エッジ領域と、ラベル値「2」が割り当てられたエッジ領域と、ラベル値「3」が割り当てられた非エッジ領域とを検出することができる。
As described above, the
なお、領域検出部42の領域検出動作は、上記の動作例に限られない。判定用画像データのエッジ領域および非エッジ領域の検出には、一般的な画像データ処理技術を用いることができる。
Note that the region detection operation of the
図4の説明に戻る。前判定部43は、領域検出部42によって検出されたエッジ領域および非エッジ領域が、原稿領域であるかまたは背景領域であるか判定する。前判定部43は、以下の手順に従って、領域検出部42によって検出されたエッジ領域および非エッジ領域が、原稿領域であるかまたは領域であるか判定する。
Returning to the description of FIG. The
(手順1)まず、前判定部43は、領域検出部42によって検出された領域(エッジ領域および非エッジ領域)が、次の2つの条件を全て満たす場合、領域検出部42によって検出された領域を、背景領域として仮判定する。一方、前判定部43は、次の2つの条件を1つでも満たさない場合、領域検出部42によって検出された領域を、原稿領域として仮判定する。
(Procedure 1) First, the
条件1−1:非エッジ領域であること
条件1−2:領域内にエッジが含まれていないこと
Condition 1-1: It is a non-edge area Condition 1-2: No edge is included in the area
図11は、前判定部43の動作例を説明する図である。図11の(A)には、図8の非エッジ領域L1,L3およびエッジ領域L2に対する、原稿領域および背景領域の仮判定結果が示してある。図11の黒く塗りつぶした部分は、背景領域と仮判定された部分を示し、白く塗りつぶした部分は、原稿領域と仮判定された部分を示している。
FIG. 11 is a diagram illustrating an operation example of the
例えば、図8の非エッジ領域L1,L3は、条件1−1および条件1−2を満たす。従って、前判定部43は、非エッジ領域L1,L3を背景領域と仮判定する。一方、エッジ領域L2は、条件1−1を満たさない。従って、前判定部43は、エッジ領域L2を原稿領域と仮判定する。
For example, the non-edge regions L1 and L3 in FIG. 8 satisfy the condition 1-1 and the condition 1-2. Accordingly, the
これにより、図8の非エッジ領域L1,L3およびエッジ領域L2に対する、原稿領域および背景領域の仮判定結果は、図11の(A)に示すようになる。なお、図11に示す一点鎖線は、紙検知センサー12が通過する座標を示している。
Accordingly, the provisional determination result of the document area and the background area for the non-edge areas L1 and L3 and the edge area L2 in FIG. 8 is as shown in FIG. In addition, the dashed-dotted line shown in FIG. 11 has shown the coordinate which the
(手順2)次に、前判定部43は、上記で仮判定した領域が、次の3つの条件を全て満たす場合、仮判定した領域を原稿領域と判定(変更)する。
(Procedure 2) Next, the
条件2−1:判定用画像データの下端に接すること
条件2−2:紙検知センサー12が通過する座標を含むことまたは給送の開始と完了を検出する給紙センサーが通過する座標を含むこと(スキャン部13の原稿が通過する座標を含むこと、例えば、図2の(B)に示すスキャン部13の走査方向軸(x軸)の原稿が通過する座標を含むこと)
条件2−3:判定用画像データの上端に接しないこと
Condition 2-1: Touching the lower end of the determination image data Condition 2-2: Including coordinates through which the
Condition 2-3: Do not touch the upper end of the image data for determination
図11の(B)には、図11の(A)の仮判定結果に対する、原稿領域および背景領域の判定結果が示してある。 FIG. 11B shows the determination result of the document area and the background area with respect to the temporary determination result of FIG.
例えば、背景領域と仮判定された非エッジ領域L1は、条件2−3を満たさない。従って、前判定部43は、非エッジ領域L1を背景領域のままとする。原稿領域と仮判定されたエッジ領域L2は、条件2−1〜条件2−3を満たす。従って、前判定部43は、エッジ領域L2を原稿領域のままとする。背景領域と判定された非エッジ領域L3は、条件2−1〜条件2−3を満たす。従って、前判定部43は、非エッジ領域L3を原稿領域と判定(変更)する。
For example, the non-edge region L1 provisionally determined as the background region does not satisfy the condition 2-3. Therefore, the
これにより、図11の(A)に示す仮判定結果は、図11の(B)に示すように変更される。すなわち、図8の非エッジ領域L1,L3およびエッジ領域L2に対する、原稿領域および背景領域の判定結果は、最終的に図11の(B)に示すようになる。 Thereby, the provisional determination result shown in FIG. 11A is changed as shown in FIG. That is, the determination results of the document area and the background area for the non-edge areas L1 and L3 and the edge area L2 in FIG. 8 are finally as shown in FIG.
図4の説明に戻る。続判定部44は、前判定部43によって判定された判定用画像データの原稿領域および背景領域の判定結果と、エッジ抽出部41によって抽出された続画像データのエッジとに基づいて、続画像データの原稿領域および背景領域を判定する。例えば、続判定部44は、判定用画像データのエッジ領域および非エッジ領域に続く続画像データのエッジ領域および非エッジ領域に対し、判定用画像データで判定された判定結果を適用する。
Returning to the description of FIG. The
より具体的には、続判定部44は、背景領域と判定された判定用画像データのエッジ領域に続く、続画像データのエッジ領域に対し、背景領域と判定する。また、続判定部44は、背景領域と判定された判定用画像データの非エッジ領域に続く、続画像データの非エッジ領域に対し、背景領域と判定する。また、続判定部44は、原稿領域と判定された判定用画像データのエッジ領域に続く、続画像データのエッジ領域に対し、原稿領域と判定する。また、続判定部44は、原稿領域と判定された判定用画像データの非エッジ領域に続く、続画像データの非エッジ領域に対し、原稿領域と判定する。
More specifically, the
図12は、続判定部44の判定結果例を示した図である。図12には、続判定部44によって判定された、スキャン部13から出力された画像データの背景領域と原稿領域とが示してある。図12の黒く塗りつぶした部分は、背景領域と判定された部分を示し、白く塗りつぶした部分は、原稿領域と判定された部分を示している。また、図12に示す判定用画像データD11は、スキャン部13から出力された画像データの判定用画像データ部分を示し、続画像データD12は、スキャン部13から出力された画像データの続画像データ部分を示している。
FIG. 12 is a diagram illustrating a determination result example of the
図8に示した非エッジ領域L1は、図11の(B)で説明したように、前判定部43によって背景領域と判定される。従って、続判定部44は、判定用画像データD11の非エッジ領域L1に続く非エッジ領域を背景領域と判定する。
The non-edge region L1 illustrated in FIG. 8 is determined as a background region by the
図8に示したエッジ領域L2および非エッジ領域L3は、図11の(B)で説明したように、前判定部43によって原稿領域と判定される。従って、続判定部44は、判定用画像データD11のエッジ領域L2に続くエッジ領域と、判定用画像データD11の非エッジ領域L3に続く非エッジ領域とを原稿領域と判定する。
The edge region L2 and the non-edge region L3 shown in FIG. 8 are determined to be document regions by the
これにより、スキャン部13から出力される画像データは、図12に示すように、原稿領域と背景領域とに分けられる。
As a result, the image data output from the
続判定部44の判定動作について具体的に説明する。続判定部44は、続画像データの1ラインにおいて、一端から他端(例えば、左端から右端)に向けて第1のパターン判定を行い、1ラインの各画素の原稿領域および背景領域を仮判定する。続判定部44は、1ラインの一端から他端に向け、各画素の原稿領域および背景領域を仮判定すると、逆にそのラインにおいて、他端から一端(例えば、右端から左端)に向けて第2のパターン判定を行い、仮判定された原稿領域および背景領域を補正する。続判定部44は、続画像データの全ラインにおいて、上記の処理を行う。
The determination operation of the
図13は、続判定部44が行う第1のパターン判定の判定条件を示した図である。図13に示す注目画素と参照画素は、図9で説明した注目画素と参照画素の定義と同様であるので、その説明を省略する。
FIG. 13 is a diagram illustrating determination conditions for the first pattern determination performed by the
続判定部44は、図13に示す判定条件に従って、続画像データの1ラインの、左端から右端に向けた、各画素の第1のパターン判定を行う。例えば、続判定部44は、注目画素が「エッジ」の場合、8ビットデータで示される第1判定パターンの4ビット目に「1」を立てる。また、例えば、続判定部44は、図9に示した定義に基づく参照画素において、原稿かつエッジの参照画素が存在する場合、第1判定パターンの3ビット目に「1」を立てる。
The
なお、上記では、第1判定パターンは、8ビットとしたが、これに限られない。第1判定パターンは、ビット目が「0〜4ビット」存在するので、少なくとも5ビットあれば足りる。 In the above description, the first determination pattern is 8 bits, but is not limited thereto. Since the first determination pattern has “0 to 4 bits” in the bit, at least 5 bits are sufficient.
図14は、記憶部34のデータ構成例を示した図のその1である。図14に示すように、記憶部34には予め、第1判定パターンと、注目画素が原稿領域の画素であるのか、または背景領域の画素であるのかを示す「1」,「0」の情報とが対応付けられて記憶される。
FIG. 14 is a first diagram illustrating a data configuration example of the
例えば、続判定部44の第1のパターン判定による、ある注目画素の第1判定パターンの結果が「9」(8ビットデータでは「00001001」)であったとする。図14の例の場合、その注目画素は、背景領域の画素と仮判定される。
For example, it is assumed that the result of the first determination pattern of a pixel of interest by the first pattern determination of the
図15は、続判定部44の第1のパターン判定の動作例を説明する図のその1である。図15の(A),(C)の矢印A11に示すラインの画素は、判定用画像データの下端の画素を示している。すなわち、図15の(A),(C)の矢印A11に示すラインの画素およびそれより上の画素は、判定用画像データの画素を示している。また、図15の(A),(C)の矢印A11に示すラインの画素より下の画素は、続画像データの画素を示している。
FIG. 15 is a first diagram illustrating an operation example of the first pattern determination of the
図15の(A),(C)に示すハッチングされたマス目は、非エッジの画素を示し、ハッチングされていないマス目は、エッジの画素を示している。また、マス目内に示している「0」は、背景領域の画素を示し、「1」は、原稿領域の画素を示している。 The hatched cells shown in FIGS. 15A and 15C indicate non-edge pixels, and the non-hatched cells indicate edge pixels. Further, “0” shown in the square indicates a pixel in the background area, and “1” indicates a pixel in the document area.
なお、画像データの各画素のエッジおよび非エッジ(図15のハッチングされていないマス目およびハッチングされているマス目)は、エッジ抽出部41によって、すでに抽出されている。また、判定用画像データの原稿領域および背景領域(図15の矢印A11のラインまでの「0」,「1」)は、前判定部43によって、すでに判定されている。
Note that the edges and non-edges of each pixel of the image data (unhatched and hatched cells in FIG. 15) have already been extracted by the
続判定部44は、判定用画像データの下端の画素のエッジおよび非エッジと、原稿領域および背景領域の判定結果とを用いて、第1のパターン判定を行い、続画像データの原稿領域および背景領域を行う。
The
例えば、図15の(A)に示す「a1」の画素を、注目画素とする。この注目画素は、非エッジであるので、参照画素は、図9の(B)となる。この場合、第1判定パターンは、図15の(B)に示すように、「01001」(10進数では「9」)となる。 For example, the pixel “a1” shown in FIG. Since the target pixel is a non-edge, the reference pixel is (B) in FIG. In this case, the first determination pattern is “01001” (“9” in decimal) as shown in FIG.
続判定部44は、図14に示した記憶部34を参照し、第1判定パターン「9」に対応する「背景領域」を取得する。これにより、図15の(A)に示す「a1」の画素は、図15の(C)に示すように、「0」(背景領域)となる。
The
図16は、続判定部44の第1のパターン判定の動作例を説明する図のその2である。図16の(A)には、図15の(C)に示した画素が示してある。
FIG. 16 is a second diagram illustrating an operation example of the first pattern determination of the
図16の(A)に示す「a2」の画素を、注目画素とする。この注目画素は、エッジであるので、参照画素は、図9の(A)となる。この場合、第1判定パターンは、図16の(B)に示すように、「11101」(10進数では「29」)となる。 A pixel “a2” illustrated in FIG. 16A is a target pixel. Since the target pixel is an edge, the reference pixel is (A) in FIG. In this case, the first determination pattern is “11101” (“29” in decimal) as shown in FIG.
続判定部44は、図14に示した記憶部34を参照し、第1判定パターン「29」に対応する「原稿領域」を取得する。これにより、図16の(A)に示す「a2」の画素は、図16の(C)に示すように、「1」(原稿領域)となる。
The
続判定部44は、1ラインにおいて、右端まで第1のパターン判定を行うと、その1ラインにおいて、逆方向に向けた第2のパターン判定を行い、第1のパターン判定結果を補正する。
When the first pattern determination is performed up to the right end in one line, the
図17は、続判定部44が行う第2のパターン判定の判定条件を示した図である。第2のパターン判定では、参照画素は、注目画素がエッジおよび非エッジのどちらにもかかわらず、注目画素の右隣りの画素のみとなる。
FIG. 17 is a diagram illustrating determination conditions for the second pattern determination performed by the
続判定部44は、図17に示す判定条件に従って、続画像データの1ラインの、右端から左端に向けた、各画素の第2のパターン判定を行う。例えば、続判定部44は、注目画素が「原稿」の場合、8ビットデータで示される第2判定パターンの3ビット目に「1」を立てる。また、例えば、続判定部44は、右隣の画素がエッジの場合、第2判定パターンの0ビット目に「1」を立てる。
The
なお、上記では、第2判定パターンは、8ビットとしたが、これに限られない。第2判定パターンは、ビット目が「0〜3ビット」存在するので、少なくとも4ビットあれば足りる。 In the above description, the second determination pattern is 8 bits, but is not limited thereto. Since the second determination pattern has “0 to 3 bits” in the bit, at least 4 bits are sufficient.
図18は、記憶部34のデータ構成例を示した図のその2である。記憶部34には、図14に示したデータに加え、図18に示すデータも記憶される。記憶部34には予め、第2判定パターンと、注目画素が原稿領域の画素であるのか、または背景領域の画素であるのかを示す「1」,「0」の情報とが対応付けられて記憶される。
FIG. 18 is a second diagram illustrating a data configuration example of the
例えば、続判定部44の第2のパターン判定による、ある注目画素の第2判定パターンの結果が「8」(8ビットデータでは「00001000」)であったとする。図18の例の場合、その注目画素は、背景領域の画素と判定される。
For example, it is assumed that the result of the second determination pattern of a pixel of interest by the second pattern determination of the
図19は、続判定部44の第2のパターン判定の動作例を説明する図のその1である。続判定部44は、1ラインにおいて、第1のパターン判定を右端まで行うと、そのラインにおいて、左端に向かって、第2のパターン判定を行う。
FIG. 19 is a first diagram illustrating an operation example of the second pattern determination of the
図19の(A)の下線を付した「1」の画素を注目画素とする。参照画素は、注目画素の右隣の画素である。この場合、第2判定パターンは、図19の(B)に示すように、「1000」(10進数では「8」)となる。 A pixel “1” with an underline in FIG. 19A is a pixel of interest. The reference pixel is a pixel on the right side of the target pixel. In this case, the second determination pattern is “1000” (“8” in decimal) as shown in FIG.
続判定部44は、図18に示した記憶部34を参照し、第2判定パターン「8」に対応する「背景領域」を取得する。これにより、図19の(A)に示す下線を付した「1」の画素は、図19の(C)に示すように、「0」(背景領域)に補正される。
The
図20は、続判定部44の第2のパターン判定の動作例を説明する図のその2である。図20の(A)には、図19の(C)に示した画素が示してある。
FIG. 20 is a second diagram illustrating an operation example of the second pattern determination of the
図20の(A)の下線を付した「1」の画素を注目画素とする。参照画素は、注目画素の右隣の画素である。この場合、第2判定パターンは、図20の(B)に示すように、「1100」(10進数では「12」)となる。 A pixel “1” with an underline in FIG. The reference pixel is a pixel on the right side of the target pixel. In this case, as shown in FIG. 20B, the second determination pattern is “1100” (decimal number “12”).
続判定部44は、図18に示した記憶部34を参照し、第2判定パターン「12」に対応する「原稿領域」を取得する。これにより、図20の(A)に示す下線を付した「1」の画素は、図20の(C)に示すように、「1」(原稿領域)となる。
The
続判定部44は、続画像データの下端まで、1ラインずつ、上記の第1のパターン判定と、第2のパターン判定とを行う。続判定部44は、第1のパターン判定および第2のパターン判定により、画像データの各画素に割り当てた「0」および「1」に基づいて、例えば、図12に示したように、続画像データD12を原稿領域と背景領域とに分けることができる。
The
なお、続判定部44の処理は、次の考え方に基づいている。
以下のように、参照画素に注目画素と同じエッジ値がある場合は、参照画素の原稿領域および背景領域を注目画素に設定する。
・参照画素にエッジかつ原稿領域が存在する場合において、注目画素がエッジのときは、注目画素を原稿領域とする。
・参照画素に非エッジかつ原稿領域が存在する場合において、注目画素が非エッジのときは、注目画素を原稿領域とする。
・参照画素にエッジかつ背景領域が存在する場合において、注目画素がエッジのときは、注目画素を背景領域とする。
・参照画素に非エッジかつ背景領域が存在する場合において、注目画素が非エッジのときは、注目画素を背景領域とする。
The process of the
As described below, when the reference pixel has the same edge value as the target pixel, the document region and the background region of the reference pixel are set as the target pixel.
When the reference pixel has an edge and a document area, and the target pixel is an edge, the target pixel is set as the document area.
If the reference pixel has a non-edge and document area, and the target pixel is non-edge, the target pixel is set as the document area.
If the reference pixel has an edge and a background area and the target pixel is an edge, the target pixel is set as the background area.
If the reference pixel has a non-edge and background area and the target pixel is non-edge, the target pixel is set as the background area.
上記に該当しない場合は、以下のように、周りの原稿領域および背景領域によって注目画素が原稿領域か背景領域かを決定する。
・参照画素が原稿領域のみの場合は、注目画素を原稿領域とする。
・参照画素に原稿領域と背景領域がある場合において、注目画素がエッジのときは、注目画素を原稿領域、注目画素が非エッジのときは、注目画素を背景領域とする。
・参照画素が背景領域のみの場合は、注目画素を背景領域とする。
When the above does not apply, whether the pixel of interest is the document region or the background region is determined by the surrounding document region and the background region as follows.
When the reference pixel is only the document area, the target pixel is set as the document area.
When the reference pixel includes a document area and a background area, when the target pixel is an edge, the target pixel is a document area. When the target pixel is a non-edge, the target pixel is a background area.
When the reference pixel is only the background area, the target pixel is set as the background area.
図4の説明に戻る。切り出し部45は、前判定部43および続判定部44によって判定された画像データの原稿領域および背景領域に基づいて、スキャン部13から出力された画像データから、原稿部分を切り出す。
Returning to the description of FIG. The
図21は、原稿の切り出し例を説明する図のその1である。図21には、前判定部43および続判定部44が判定した画像データの原稿領域(白く塗りつぶした部分)と背景領域(黒く塗りつぶした部分)とが示してある。
FIG. 21 is a first diagram illustrating an example of document cutting. FIG. 21 shows a document area (a white area) and a background area (a black area) of the image data determined by the
切り出し部45は、画像データの上端から下端に向けて(+y軸方向に向けて)、前判定部43および続判定部44が判定した画像データの原稿領域を探索する。例えば、切り出し部45は、図21の矢印に示すように、+y軸方向に向けて、原稿領域を探索する。切り出し部45は、最初に探索(発見)した原稿領域の座標(x,y)を、原稿の上端座標として、記憶部34に記憶する。
The
なお、切り出し部45は、x座標を1ずつインクリメントしながら、+y軸方向に向けて、最初の原稿領域を探索する。
Note that the
図22は、原稿の切り出し例を説明する図のその2である。図22に示す黒丸は、切り出し部45が、+y軸方向に向けて最初に探索した原稿領域の座標が示してある。なお、図22には、15個の座標しか示していないが、実際はもっと沢山存在している。
FIG. 22 is a second diagram illustrating an example of document cutting. The black circles shown in FIG. 22 indicate the coordinates of the document area that the
切り出し部45は、+y軸方向において探索した最初の原稿領域の座標の中央値を、原稿の上端と判定する。
The
図23は、原稿の切り出し例を説明する図のその3である。図23に示すように、切り出し部45は、+y軸方向に探索した原稿領域の座標を、y座標値に基づいて降順に並べ替える。そして、切り出し部45は、並べ替えたy座標値の中央値の座標を、原稿の上端として判定する。例えば、切り出し部45は、図23に示す矢印A21の座標のy座標値を、原稿の上端の座標値と判定する。
FIG. 23 is a third diagram illustrating an example of document cutting. As shown in FIG. 23, the
切り出し部45は、画像データの下端から、上端に向けても(−y軸方向に向けても)、図21および図22と同様にして、最初の原稿領域を探索する。そして、切り出し部45は、図23と同様にして、探索した原稿領域の中央値のy座標値を、原稿の下端の座標値と判定する。
The
また、切り出し部45は、画像データの左端から、右端に向けても(+x軸方向に向けても)、図21および図22と同様にして、最初の原稿領域を探索する。そして、切り出し部45は、図23と同様にして、探索した原稿領域の中央値のx座標値を、原稿の左端の座標値と判定する。
In addition, the
また、切り出し部45は、画像データの右端から、左端に向けても(−x軸方向に向けても)、図21および図22と同様にして、最初の原稿領域を探索する。そして、切り出し部45は、図23と同様にして、探索した原稿領域の中央値のx座標値を、原稿の右端の座標値と判定する。
Further, the
そして、切り出し部45は、上記のようにして判定した、原稿の上下左右の端を示す座標値(矩形領域)を用いて、スキャン部13から出力された画像データから、原稿部分を切り出す。これにより、例えば、図21に示す白い部分(原稿部分)が切り出される。
Then, the
図24は、画像処理装置1の動作例を示したフローチャートである。画像処理装置1は、給紙口4aに原稿が置かれ、入力装置5がユーザーから所定の操作を受付けると、図24に示すフローチャートの処理を実行する。
FIG. 24 is a flowchart illustrating an operation example of the
まず、ADF部4は、給紙口4aに置かれた原稿をスキャン部13へ給送する(ステップS1)。
First, the
次に、スキャン部13は、ステップS1にてADF部4により給送された原稿をスキャンし、画像データを出力する(ステップS2)。
Next, the
次に、エッジ抽出部41は、ステップS2にて出力される画像データのエッジを抽出する(ステップS3)。
Next, the
次に、領域検出部42は、ステップS2にて出力される画像データから、所定ライン分の画像データである判定用画像データを読み込み、ステップS3にて抽出されたエッジに基づき、判定用画像データのエッジ領域および非エッジ領域を検出する(ステップS4)。
Next, the
次に、前判定部43は、条件1−1,1−2および条件2−1〜2−3に基づいて、ステップS4にて検出された、判定用画像データのエッジ領域および非エッジ領域が、原稿領域であるかまたは背景領域であるか判定する(ステップS5)。
Next, the
次に、続判定部44は、ステップS5にて判定された判定用画像データの原稿領域および背景領域と、ステップS3にて抽出されたエッジとに基づいて、判定用画像データに続く続画像データの原稿領域と背景領域とを判定する(ステップS6)。
Next, the
次に、切り出し部45は、ステップS5にて判定された判定用画像データの原稿領域および背景領域と、ステップS6にて判定された続画像データの原稿領域および背景領域とに基づいて、ステップS2にて出力される画像データから、原稿領域を切り出す(ステップS7)。そして、画像処理装置1は、当該フローチャートの処理を終了する。
Next, the
このように、スキャン部13は、ADF部4から給送される原稿をスキャンし、画像データを出力する。エッジ抽出部41は、スキャン部13から出力される画像データのエッジを抽出し、領域検出部42は、エッジ抽出部41によって抽出されたエッジに基づき、判定用画像データのエッジ領域および非エッジ領域を検出する。前判定部43は、領域検出部42によって検出された判定用画像データのエッジ領域および非エッジ領域が、原稿領域であるかまたは背景領域であるか判定する。そして、続判定部44は、エッジ抽出部41によって抽出されたエッジと、前判定部43によって判定された判定用画像データの原稿領域および背景領域の判定結果とに基づいて、判定用画像データに続く続画像データの原稿領域および背景領域を判定する。これにより、画像処理装置1は、画像データを原稿部分と背景部分とに適切に分けることができる。
As described above, the
また、画像処理装置1は、続画像データの原稿領域および背景領域を、判定用にパターン化した注目画素のエッジ値および参照画素のエッジ値と、原稿領域および背景領域とにより判定する。これにより、画像処理装置1は、続画像データに対し、上から下に1度だけ領域の判定処理を行えばよく、処理時間の短縮を図ることができる。
Further, the
なお、制御部31は、スキャン部13がADF部4から給送される原稿をスキャンするかまたは本体2の読み取り台に置かれた原稿をスキャンするかを判定するスキャン種別判定部、をさらに有してもよい。スキャン種別判定部は、例えば、紙検知センサー12が原稿を検知し、ユーザーが入力装置5に対し、所定の操作を行うと、スキャン部13がADF部4から給送される原稿をスキャンすると判定する。そして、エッジ抽出部41、領域検出部42、前判定部43、続判定部44、および切り出し部45は、スキャン種別判定部によって、スキャン部13がADF部4から給送される原稿をスキャンすると判定された場合に、上記で説明した動作を行う。
The control unit 31 further includes a scan type determination unit that determines whether the
一方、制御部31は、スキャン種別判定部によって、本体2の読み取り台に置かれた原稿をスキャンすると判定された場合、読み取り台に置かれた原稿の画像データから、所定の処理により、原稿領域を切り出す。例えば、制御部31は、スキャン部13から出力された画像データのエッジを抽出し、抽出されたエッジに基づいて、画像データの非エッジ領域を検出する。そして、制御部31は、以下の第1の仮判定条件および第2の仮判定条件に基づいて、検出した非エッジ領域を、原稿領域であるか背景領域であるか仮判定し、仮判定した非エッジ領域の配置に基づいて、非エッジ領域の仮判定を補正し、仮判定を補正した原稿領域および背景領域から、原稿領域を切り出してもよい。例えば、隣接する背景領域が存在し、そのうちの1つが原稿領域と隣接しているとする。この場合、制御部31は、原稿領域に隣接している背景領域を原稿領域に補正する。
On the other hand, when the scan type determination unit determines that the document placed on the reading table of the
第1の仮判定条件:非エッジ領域が画像データの2辺以上のデータ端に接していること
第2の仮判定条件:非エッジ領域にエッジが含まれていないこと
First provisional determination condition: the non-edge region is in contact with data edges of two or more sides of the image data Second provisional determination condition: the non-edge region does not include an edge
また、図4に示した制御部31の機能は、例えば、パーソナルコンピュータやタブレット端末等の情報処理装置が有していてもよい。 Further, the function of the control unit 31 illustrated in FIG. 4 may be included in an information processing apparatus such as a personal computer or a tablet terminal.
図25は、情報処理装置60の機能ブロック構成例を示した図である。図25に示すように、情報処理装置60は、制御部31aと、I/F部61と、記憶部62とを有している。
FIG. 25 is a diagram illustrating a functional block configuration example of the information processing apparatus 60. As illustrated in FIG. 25, the information processing apparatus 60 includes a control unit 31a, an I / F unit 61, and a
図25に示す制御部31a、エッジ抽出部41a、領域検出部42a、前判定部43a、続判定部44a、および切り出し部45aは、図4に示した制御部31、エッジ抽出部41、領域検出部42、前判定部43、続判定部44、および切り出し部45と同様の機能を有するため、その説明を省略する。
The control unit 31a, the
I/F部61(本発明の受信部に相当する)は、有線または無線によって、画像処理装置1のスキャン部13がスキャンした原稿の画像データを受信する。受信された画像データは、記憶部62に記憶される。
An I / F unit 61 (corresponding to a receiving unit of the present invention) receives image data of a document scanned by the
記憶部62には、制御部31aの機能を実現するアプリケーションプログラムが記憶されている。記憶部62は、例えば、HDD(Hard Disk Drive)やSSD(Solid State Drive)などの記憶装置である。
The
制御部31aは、記憶部62に記憶されたアプリケーションプログラムを実行するCPUによって、その機能が実現される。制御部31aは、I/F部61によって受信された画像データ(記憶部62に記憶された画像データ)に対し、上記で説明したのと同様にして、画像データの原稿領域および背景領域を判定する。そして、制御部31aは、画像データから、原稿部分を切り出す。
The function of the control unit 31a is realized by a CPU that executes an application program stored in the
このように、情報処理装置60が、画像データを、原稿領域と背景領域とに分け、原稿部分を切り出してもよい。 As described above, the information processing apparatus 60 may divide the image data into the document area and the background area and cut out the document portion.
[第2の実施の形態]
第2の実施の形態では、判定用画像データの原稿領域および背景領域の判定方法が第1の実施の形態と異なる。
[Second Embodiment]
In the second embodiment, the determination method of the document area and the background area of the determination image data is different from that of the first embodiment.
図26は、第2の実施の形態に係る画像処理装置1の機能ブロック構成例を示した図である。図26において、図4と同じものには同じ符号が付してある。以下では、図4と異なる部分について説明する。図26に示すように、画像処理装置1の制御部31は、前判定部71を有している。
FIG. 26 is a diagram illustrating a functional block configuration example of the
前判定部71は、領域検出部42によって検出されたエッジ領域および非エッジ領域が、原稿領域であるかまたは背景領域であるか判定する。前判定部71は、以下の手順に従って、領域検出部42によって検出されたエッジ領域および非エッジ領域が、原稿領域であるかまたは領域であるか判定する。
The
(手順1)まず、前判定部71は、領域検出部42によって検出された領域が、次の2つの条件を全て満たす場合、領域検出部42によって検出された領域を、背景領域として仮判定する。一方、前判定部71は、次の2つの条件を1つでも満たさない場合、領域検出部42によって検出された領域を、原稿領域として仮判定する。
(Procedure 1) First, when the region detected by the
条件11−1:非エッジ領域であること
条件11−2:領域内にエッジが含まれていないこと
Condition 11-1: Non-edge area Condition 11-2: No edge is included in the area
図27は、前判定部71の動作例を説明する図である。図27の(A)には、スキャン部13から出力される画像データのうちの判定用画像データ81が示してある。判定用画像データ81には、縦筋82と、背景83と、影84と、原稿85とが含まれている。縦筋82は、例えば、スキャン部13に溜まった紙粉等によって現れる。
FIG. 27 is a diagram for explaining an operation example of the
図27の(B)には、図27の(A)の判定用画像データ81から抽出したエッジの例が示してある。エッジ抽出部41が、図27の(A)の判定用画像データ81からエッジを抽出すると、図27の(B)に示すようになる。図27の(B)に示す白い部分が、エッジ領域である。縦筋82は、エッジとして抽出される。
FIG. 27B shows an example of an edge extracted from the
図27の(C)には、図27の(B)のエッジに基づいて検出されたエッジ領域および非エッジ領域が示してある。領域検出部42が、図27の(B)のエッジに基づき、エッジ領域および非エッジ領域を検出すると、図27の(C)に示すように、非エッジ領域L11と、エッジ領域L12と、非エッジ領域L13と、エッジ領域L14と、非エッジ領域L15とが検出される。
FIG. 27C shows edge regions and non-edge regions detected based on the edges in FIG. When the
図27の(D)には、図27の(C)の非エッジ領域L11,L13,L15およびエッジ領域L12,L14に対する、原稿領域および背景領域の仮判定結果が示してある。前判定部71が、上記の条件11−1,11−2に基づいて、図27の(C)の非エッジ領域L11,L13,L15およびエッジ領域L12,L14に対し、原稿領域および背景領域を仮判定すると、図27の(D)に示すようになる。
FIG. 27D shows the provisional determination results of the document area and the background area for the non-edge areas L11, L13, L15 and the edge areas L12, L14 shown in FIG. Based on the above conditions 11-1 and 11-2, the
例えば、図27の(C)の非エッジ領域L11,L13,L15は、図27の(D)に示すように、背景領域(黒く塗りつぶした部分)と仮判定される。また、図27の(C)のエッジ領域L12,L14は、図27の(D)に示すように、原稿領域(白く塗りつぶした部分)と仮判定される。 For example, the non-edge regions L11, L13, and L15 in (C) of FIG. 27 are temporarily determined as background regions (blackened portions) as shown in (D) of FIG. Further, the edge regions L12 and L14 in FIG. 27C are provisionally determined as document regions (white portions) as shown in FIG.
(手順2)次に、前判定部71は、上記で仮判定した領域が、次の2つの条件を満たすか否か判定する。
(Procedure 2) Next, the
条件12−1:判定用画像データの下端に接する領域であること
条件12−2:紙検知センサー12が通過する座標を含むことまたは給紙センサーが通過する座標を含むこと
Condition 12-1: The area is in contact with the lower end of the image data for determination. Condition 12-2: The coordinates through which the
そして、前判定部71は、上記の2つの条件を満たす領域であって、判定用画像データの上端に接しない場合、その領域を第1型原稿領域と判定する。
The
また、前判定部71は、上記の2つの条件を満たす領域であって、第1型原稿領域でなく、判定用画像データの左上端と右上端とに接しない場合、その領域を第2型原稿領域と判定する。
Further, if the
また、前判定部71は、上記の2つの条件を満たす領域であって、第1型原稿領域および第2型原稿領域でなく、判定用画像データの左上端と右上端とのいずれか一方に接する場合、その領域を第3型原稿領域と判定する。
Further, the
図28は、第1型原稿領域、第2型原稿領域、および第3型原稿領域を説明する図である。図28の(A)には、第1型原稿領域の形態が示してある。図28の(B)には、第2型原稿領域の形態が示してある。図28の(C),(D)には、第3型原稿領域の形態が示してある。図28の黒く塗りつぶした部分は背景領域を示し、白く塗りつぶした部分は原稿領域を示している。 FIG. 28 is a diagram for explaining the first type document region, the second type document region, and the third type document region. FIG. 28A shows the form of the first type document area. FIG. 28B shows a form of the second type document area. (C) and (D) of FIG. 28 show the form of the third type document area. In FIG. 28, the black-painted portion indicates the background area, and the white-painted portion indicates the document area.
例えば、図27の(C),(D)の背景領域と仮判定された非エッジ領域L13は、上記の条件12−1,12−2を満たす領域であって、判定用画像データの右上端のみに接する領域である。従って、非エッジ領域L13は、図28の(C)の第3型原稿領域と仮判定される。 For example, the non-edge region L13 provisionally determined as the background region in (C) and (D) of FIG. 27 is a region that satisfies the above conditions 12-1 and 12-2, and is the upper right end of the determination image data. It is the area that touches only. Therefore, the non-edge region L13 is provisionally determined to be the third type document region in FIG.
また、図27の(C),(D)の原稿領域と仮判定されたエッジ領域L14と、非エッジ領域L15は、上記の条件12−1,12−2を満たす領域であって、判定用画像データの上端に接しない領域である。従って、エッジ領域L14と非エッジ領域L15は、図28の(A)の第1型原稿領域と判定される。 27C and 27D, the edge region L14 and the non-edge region L15, which are provisionally determined to be the document region, satisfy the above conditions 12-1 and 12-2 and are used for determination. This is an area that does not touch the upper end of the image data. Therefore, the edge region L14 and the non-edge region L15 are determined as the first type document region in FIG.
(手順3)次に、前判定部71は、第1型原稿領域、第2型原稿領域、および第3型原稿領域の有無に基づいて、第1型原稿領域、第2型原稿領域、および第3型原稿領域が原稿領域であるかまたは背景領域であるか判定する。
(Procedure 3) Next, the
例えば、前判定部71は、第1型原稿領域が存在する場合、第1型原稿領域を原稿領域と判定し、第2型原稿領域および第3型原稿領域を背景領域と判定する。
For example, when the first type document area exists, the
また、前判定部71は、第1型原稿領域が存在せず、第2型原稿領域が存在する場合、第2型原稿領域を原稿領域と判定し、第3型原稿領域を背景領域と判定する。
Further, when the first type original area does not exist and the second type original area exists, the
また、前判定部71は、第1型原稿領域および第2型原稿領域が存在せず、第3型原稿領域が存在する場合、第3型原稿領域を原稿領域と判定する。
Further, when the first-type document area and the second-type document area do not exist and the third-type document area exists, the
また、前判定部71は、第1型原稿領域、第2型原稿領域、および第3型原稿領域が存在しない場合、全領域を原稿領域と判定する。
Further, when the first-type document area, the second-type document area, and the third-type document area do not exist, the
なお、上記手順2で説明した例では、エッジ領域L14と非エッジ領域L15は、第1型原稿領域と判定され、非エッジ領域L13は、第3型原稿領域と判定された。従って、エッジ領域L14と非エッジ領域L15は、当該手順3により、原稿領域と判定され、非エッジ領域L13は、背景領域と判定される。
In the example described in the
(手順4)次に、前判定部71は、上記手順によって、原稿領域と判定した領域が、次の2つ条件を全て満たす場合、その領域を背景領域に変更する。
(Procedure 4) Next, when the area determined as the document area by the above procedure satisfies all the following two conditions, the
条件13−1:判定用画像データの下端に接すること
条件13−2:紙検知センサー12が通過する座標を含まないことまたは給紙センサーが通過する座標を含まないこと
Condition 13-1: Touching the lower end of the determination image data Condition 13-2: Do not include coordinates through which the
例えば、エッジ領域L12は、手順1において、原稿領域と判定されている。エッジ領域L12は、上記の条件13−1,13−2を満たす。従って、前判定部71は、エッジ領域L12を背景領域に変更する。
For example, the edge region L12 is determined as the document region in the
なお、図27の(C)に示した非エッジ領域L11,L13およびエッジ領域L12は、上記の手順1〜手順4により、最終的に背景領域と判定される。また、図27の(C)に示したエッジ領域L14および非エッジ領域L15は、上記の手順1〜手順4により、最終的に原稿領域と判定される。すなわち、図27の(A)に示した判定用画像データ81は、図11の(B)と同様に、原稿領域と背景領域とが判定される。
Note that the non-edge regions L11 and L13 and the edge region L12 illustrated in FIG. 27C are finally determined as background regions by the above-described
このように、前判定部71は、手順1〜手順4に基づいて、判定用画像データの原稿領域および背景領域を判定する。これにより、画像処理装置1は、例えば、紙粉等による縦筋(ノイズ)が画像データに含まれても、画像データを原稿部分と背景部分とに適切に分けることができる。
As described above, the
以上、本発明について実施形態を用いて説明したが、画像処理装置1および情報処理装置60の機能構成は、その構成を理解しやすくするために、主な処理内容に応じて分類したものである。構成要素の分類の仕方や名称によって、本願発明が制限されることはない。画像処理装置1および情報処理装置60の構成は、処理内容に応じて、さらに多くの構成要素に分類することもできる。また、1つの構成要素がさらに多くの処理を実行するように分類することもできる。また、各構成要素の処理は、1つのハードウェアで実行されてもよいし、複数のハードウェアで実行されてもよい。
As mentioned above, although this invention was demonstrated using embodiment, the functional structure of the
また、本発明の技術的範囲は、上記実施形態に記載の範囲には限定されない。上記実施形態に多様な変更又は改良を加えることが可能であることが当業者には明らかである。例えば、各実施の形態を組み合わせてもよい。また、そのような変更又は改良を加えた形態も本発明の技術的範囲に含まれ得ることが、特許請求の範囲の記載から明らかである。また、本発明は、画像処理装置1および情報処理装置60の機能を実現するプログラム、当該プログラムを記憶した記憶媒体として提供することもできる。
Further, the technical scope of the present invention is not limited to the scope described in the above embodiment. It will be apparent to those skilled in the art that various changes and modifications can be made to the above-described embodiment. For example, the embodiments may be combined. Further, it is apparent from the scope of the claims that embodiments with such changes or improvements can also be included in the technical scope of the present invention. The present invention can also be provided as a program that realizes the functions of the
1…画像処理装置、2…本体、3…カバー、4…ADF部、4a…給紙口、4b…排紙口、5…入力装置、11…原稿、12…紙検知センサー、13…スキャン部、21…画像データ、21a…判定用画像データ、21b…続画像データ、22…領域、OS1,OS2…オーバースキャン、31,31a…制御部、32…通信部、33…入力部、34…記憶部、41,41a…エッジ抽出部、42,42a…領域検出部、43,43a…前判定部、44,44a…続判定部、45,45a…切り出し部、51…判定用画像データ、52…背景、53…影、54…原稿、60…情報処理装置、61…I/F部、62…記憶部、71…前判定部、81…判定用画像データ、82…縦筋、83…背景、84…影、85…原稿。
DESCRIPTION OF
Claims (10)
給送される前記スキャン対象物をスキャンし、画像データを出力するスキャン部と、
前記画像データのエッジを抽出するエッジ抽出部と、
前記エッジに基づいて、前記画像データの上端から所定ラインまでの判定用画像データのエッジ領域および非エッジ領域を検出する領域検出部と、
検出された前記エッジ領域および前記非エッジ領域に対し、スキャン対象物領域であるかまたは背景領域であるか判定する前判定部と、
前記判定用画像データの前記スキャン対象物領域および前記背景領域の判定結果と、前記判定用画像データに続く続画像データの前記エッジとに基づいて、前記続画像データの前記スキャン対象物領域および前記背景領域を判定する続判定部と、
を有することを特徴とする画像処理装置。 A feeding unit for feeding the scan object;
A scanning unit that scans the scanned object to be fed and outputs image data;
An edge extraction unit for extracting an edge of the image data;
An area detection unit that detects an edge area and a non-edge area of image data for determination from the upper end of the image data to a predetermined line based on the edge;
A pre-determination unit that determines whether the detected edge region and the non-edge region are a scan target region or a background region;
Based on the determination result of the scan target area and the background area of the determination image data and the edge of the subsequent image data following the determination image data, the scan target area of the subsequent image data and the A continuation determination unit for determining a background area;
An image processing apparatus comprising:
前記前判定部は、前記エッジを含まない前記非エッジ領域を前記背景領域と仮判定し、
前記エッジを含む前記非エッジ領域と、前記エッジ領域とを前記スキャン対象物領域と仮判定する、
ことを特徴とする画像処理装置。 The image processing apparatus according to claim 1,
The pre-determination unit provisionally determines the non-edge region that does not include the edge as the background region,
Tentatively determining the non-edge area including the edge and the edge area as the scan object area;
An image processing apparatus.
前記スキャン部は、前記スキャン対象物をオーバースキャンし、
前記前判定部は、仮判定した前記エッジ領域および前記非エッジ領域が、前記判定用画像データの上端に接しておらず、前記判定用画像データの下端に接し、かつ前記スキャン部の前記スキャン対象物が通過する座標を含む場合、仮判定した前記エッジ領域および前記非エッジ領域を前記スキャン対象物領域と判定する、
ことを特徴とする画像処理装置。 The image processing apparatus according to claim 2,
The scan unit overscans the scan object,
In the pre-determination unit, the temporarily determined edge region and the non-edge region are not in contact with the upper end of the determination image data, but in contact with the lower end of the determination image data, and the scan target of the scan unit When the object includes coordinates that pass, the provisionally determined edge region and the non-edge region are determined as the scan target region,
An image processing apparatus.
前記前判定部は、仮判定した前記エッジ領域および前記非エッジ領域が、前記判定用画像データの下端に接し、かつ前記スキャン部の前記スキャン対象物が通過する座標を含む場合であって、
前記エッジ領域および前記非エッジ領域が、前記判定用画像データの上端に接しない場合、前記エッジ領域および前記非エッジ領域を、第1型スキャン対象物領域と判定し、
前記エッジ領域および前記非エッジ領域が、前記第1型スキャン対象物領域でなく、前記判定用画像データの左上端点と右上端点とに接しない場合、前記エッジ領域および前記非エッジ領域を、第2型スキャン対象物領域と判定し、
前記エッジ領域および前記非エッジ領域が、前記第1型スキャン対象物領域かつ前記第2型スキャン対象物領域でなく、前記判定用画像データの左上端点と右上端点とのいずれか一方にのみ接する場合、前記エッジ領域および前記非エッジ領域を、第3型スキャン対象物領域と判定し、
前記第1型スキャン対象物領域、前記第2型スキャン対象物領域、および前記第3型スキャン対象物領域の有無に基づいて、前記エッジ領域および前記非エッジ領域が前記スキャン対象物領域であるかまたは前記背景領域であるか判定する、
ことを特徴とする画像処理装置。 The image processing apparatus according to claim 2,
The pre-determination unit includes the provisionally determined edge region and the non-edge region that are in contact with a lower end of the determination image data and include coordinates through which the scan target of the scan unit passes.
When the edge region and the non-edge region do not touch the upper end of the determination image data, the edge region and the non-edge region are determined as a first type scan object region,
When the edge region and the non-edge region are not the first type scan object region and do not touch the upper left end point and the upper right end point of the image data for determination, the edge region and the non-edge region are Mold scanning object area,
When the edge region and the non-edge region touch only one of the upper left end point and the upper right end point of the determination image data, not the first type scan target region and the second type scan target region , Determining the edge region and the non-edge region as a third type scan object region,
Whether the edge area and the non-edge area are the scan object areas based on the presence or absence of the first type scan object area, the second type scan object area, and the third type scan object area Or determine whether it is the background area,
An image processing apparatus.
前記続判定部は、前記判定用画像データの前記エッジ領域および前記非エッジ領域に続く前記続画像データの前記エッジ領域および前記非エッジ領域に対し、前記判定用画像データで判定された判定結果を適用する、
ことを特徴とする画像処理装置。 The image processing apparatus according to any one of claims 1 to 4,
The continuation determination unit determines a determination result determined by the determination image data for the edge region and the non-edge region of the continuation image data following the edge region and the non-edge region of the determination image data. Apply,
An image processing apparatus.
前記スキャン部が前記給送部から給送される前記スキャン対象物をスキャンするかまたは台の上に置かれた前記スキャン対象物をスキャンするかを判定するスキャン種別判定部、をさらに有し、
前記前判定部は、前記スキャン種別判定部の判定結果に応じて、前記判定用画像データの前記スキャン対象物領域および前記背景領域の判定を行う、
ことを特徴とする画像処理装置。 An image processing apparatus according to any one of claims 1 to 5,
A scan type determination unit that determines whether the scan unit scans the scan object fed from the feeding unit or scans the scan object placed on a table;
The pre-determination unit determines the scan target region and the background region of the determination image data according to a determination result of the scan type determination unit.
An image processing apparatus.
前記エッジ抽出部は、前記画像データの第1の画素の輝度分散と、前記第1の画素の周囲の第2の画素の輝度分散との輝度分散差を算出し、前記輝度分散差に基づいて、前記画像データのエッジを抽出する、
ことを特徴とする画像処理装置。 The image processing apparatus according to any one of claims 1 to 6,
The edge extraction unit calculates a luminance dispersion difference between a luminance dispersion of a first pixel of the image data and a luminance dispersion of a second pixel around the first pixel, and based on the luminance dispersion difference Extracting an edge of the image data;
An image processing apparatus.
前記画像データのエッジを抽出するエッジ抽出部と、
前記エッジに基づいて、前記画像データの上端から所定ラインまでの判定用画像データのエッジ領域および非エッジ領域を検出する領域検出部と、
検出された前記エッジ領域および前記非エッジ領域に対し、スキャン対象物領域であるかまたは背景領域であるか判定する前判定部と、
前記判定用画像データの前記スキャン対象物領域および前記背景領域の判定結果と、前記判定用画像データに続く続画像データの前記エッジとに基づいて、前記続画像データの前記スキャン対象物領域および前記背景領域を判定する続判定部と、
を有することを特徴とする情報処理装置。 A receiving unit that receives image data scanned by the image processing apparatus by feeding a scan object;
An edge extraction unit for extracting an edge of the image data;
An area detection unit that detects an edge area and a non-edge area of image data for determination from the upper end of the image data to a predetermined line based on the edge;
A pre-determination unit that determines whether the detected edge region and the non-edge region are a scan target region or a background region;
Based on the determination result of the scan target area and the background area of the determination image data and the edge of the subsequent image data following the determination image data, the scan target area of the subsequent image data and the A continuation determination unit for determining a background area;
An information processing apparatus comprising:
スキャン対象物を給送するステップと、
給送される前記スキャン対象物をスキャンし、画像データを出力するステップと、
前記画像データのエッジを抽出するステップと、
前記エッジに基づいて、前記画像データの上端から所定ラインまでの判定用画像データのエッジ領域および非エッジ領域を検出するステップと、
検出された前記エッジ領域および前記非エッジ領域に対し、スキャン対象物領域であるかまたは背景領域であるか判定するステップと、
前記判定用画像データの前記スキャン対象物領域および前記背景領域の判定結果と、前記判定用画像データに続く続画像データの前記エッジとに基づいて、前記続画像データの前記スキャン対象物領域および前記背景領域を判定するステップと、
を含むことを特徴とする画像処理方法。 An image processing method of an image processing apparatus,
Feeding the scan object;
Scanning the object to be fed and outputting image data;
Extracting an edge of the image data;
Detecting an edge region and a non-edge region of image data for determination from the upper end of the image data to a predetermined line based on the edge;
Determining whether the detected edge region and the non-edge region are a scan target region or a background region;
Based on the determination result of the scan target area and the background area of the determination image data and the edge of the subsequent image data following the determination image data, the scan target area of the subsequent image data and the Determining a background region;
An image processing method comprising:
画像処理装置がスキャン対象物を給送してスキャンした画像データを、前記画像処理装置から受信するステップと、
前記画像データのエッジを抽出するステップと、
前記エッジに基づいて、前記画像データの上端から所定ラインまでの判定用画像データのエッジ領域および非エッジ領域を検出するステップと、
検出された前記エッジ領域および前記非エッジ領域に対し、スキャン対象物領域であるかまたは背景領域であるか判定するステップと、
前記判定用画像データの前記スキャン対象物領域および前記背景領域の判定結果と、前記判定用画像データに続く続画像データの前記エッジとに基づいて、前記続画像データの前記スキャン対象物領域および前記背景領域を判定するステップと、
を含むことを特徴とする画像処理方法。 An image processing method for an information processing apparatus,
Receiving from the image processing apparatus image data scanned by the image processing apparatus feeding a scan object; and
Extracting an edge of the image data;
Detecting an edge region and a non-edge region of image data for determination from the upper end of the image data to a predetermined line based on the edge;
Determining whether the detected edge region and the non-edge region are a scan target region or a background region;
Based on the determination result of the scan target area and the background area of the determination image data and the edge of the subsequent image data following the determination image data, the scan target area of the subsequent image data and the Determining a background region;
An image processing method comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016058110A JP2017175328A (en) | 2016-03-23 | 2016-03-23 | Image processing device, information processing device, and image processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016058110A JP2017175328A (en) | 2016-03-23 | 2016-03-23 | Image processing device, information processing device, and image processing method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2017175328A true JP2017175328A (en) | 2017-09-28 |
Family
ID=59973456
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2016058110A Pending JP2017175328A (en) | 2016-03-23 | 2016-03-23 | Image processing device, information processing device, and image processing method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2017175328A (en) |
-
2016
- 2016-03-23 JP JP2016058110A patent/JP2017175328A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5384864A (en) | Method and apparatus for automatic determination of text line, word and character cell spatial features | |
US7269298B2 (en) | Image processing device, image processing method, and record medium on which the same is recorded | |
JP3083918B2 (en) | Image processing device | |
JP5766073B2 (en) | Image processing apparatus, image processing method, image processing program, and image processing system | |
US20040170324A1 (en) | Boundary detection method between areas having different features in image data | |
EP2437215A1 (en) | Detection of a contour edge of an object in an image | |
GB2190778A (en) | Character recognition with variable subdivision of a character region | |
JP2010218420A (en) | Character recognition apparatus, image reading apparatus, and program | |
WO2009094446A1 (en) | Method and apparatus for cropping images | |
JP6021665B2 (en) | Image processing apparatus, image processing method, and computer program | |
CN114820594A (en) | Method for detecting edge sealing defects of plate based on image, related equipment and storage medium | |
JP4393411B2 (en) | Image processing apparatus, image processing program, and image processing method | |
CN110321887B (en) | Document image processing method, document image processing apparatus, and storage medium | |
US20130027732A1 (en) | Image processing device for accurately identifying region in image without increase in memory requirement | |
JPH0418351B2 (en) | ||
JPH09311905A (en) | Line detecting method and character recognition device | |
CN111008987A (en) | Method and device for extracting edge image based on gray background and readable storage medium | |
JP2017175328A (en) | Image processing device, information processing device, and image processing method | |
US10424051B2 (en) | Image analyzing apparatus and non-transitory storage medium storing instructions executable by the image analyzing apparatus | |
JP5693418B2 (en) | Image processing apparatus, image processing method, image processing program, and image processing system | |
JP6693184B2 (en) | Image processing apparatus and image processing method | |
JP3443141B2 (en) | Image tilt detection method and table processing method | |
JP7341758B2 (en) | Image processing device, image processing method, and program | |
US9648206B2 (en) | Image processing apparatus, image processing method and computer program | |
JP2017163407A (en) | Image processing apparatus, information processing apparatus, and image processing method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD05 | Notification of revocation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7425 Effective date: 20180907 |
|
RD03 | Notification of appointment of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7423 Effective date: 20181119 |