JP6880460B2 - Image processing device - Google Patents
Image processing device Download PDFInfo
- Publication number
- JP6880460B2 JP6880460B2 JP2018059185A JP2018059185A JP6880460B2 JP 6880460 B2 JP6880460 B2 JP 6880460B2 JP 2018059185 A JP2018059185 A JP 2018059185A JP 2018059185 A JP2018059185 A JP 2018059185A JP 6880460 B2 JP6880460 B2 JP 6880460B2
- Authority
- JP
- Japan
- Prior art keywords
- line
- ruled line
- image
- ruled
- type
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Landscapes
- Image Processing (AREA)
- Character Discrimination (AREA)
- Image Analysis (AREA)
Description
本発明は、画像処理装置に関するものである。 The present invention relates to an image processing apparatus.
ある画像処理装置では、表領域画像の縦方向または横方向の投影分布に基づいて罫線を検出し、検出した罫線に対して膨張収縮処理を実行して、その罫線を実線にしている(例えば特許文献1参照)。つまり、表領域画像内の罫線が破線などであっても、その罫線は実線に変換される。 In one image processing device, a ruled line is detected based on the projection distribution in the vertical or horizontal direction of the tablespace image, and expansion / contraction processing is performed on the detected ruled line to make the ruled line a solid line (for example, a patent). Reference 1). That is, even if the ruled line in the tablespace image is a broken line or the like, the ruled line is converted into a solid line.
しかしながら、上述の画像処理装置は、破線などを実線に変換しているが、検出された罫線の種別を特定することは困難である。 However, although the above-mentioned image processing apparatus converts a broken line or the like into a solid line, it is difficult to specify the type of the detected ruled line.
本発明は、上記の問題に鑑みてなされたものであり、比較的簡単な処理で罫線の種別を特定する画像処理装置を得ることを目的とする。 The present invention has been made in view of the above problems, and an object of the present invention is to obtain an image processing apparatus that specifies a type of ruled line by a relatively simple process.
本発明に係る画像処理装置は、原画像内のエッジを検出しエッジ画像を生成するエッジ画像生成部と、前記エッジ画像に対して膨張処理を実行し前記膨張処理後の前記エッジ画像に対して収縮処理を実行して、クロージング画像を生成する膨張収縮処理部と、前記クロージング画像に基づいて罫線を特定し、前記クロージング画像と前記エッジ画像との差分画像に基づいて前記罫線の種別を特定する罫線特定部とを備える。 The image processing apparatus according to the present invention has an edge image generation unit that detects an edge in the original image and generates an edge image, and the edge image that has been expanded by executing expansion processing on the edge image. The expansion / contraction processing unit that generates a closing image by executing the contraction processing, the rule line is specified based on the closing image, and the type of the rule line is specified based on the difference image between the closing image and the edge image. It is provided with a ruled line specifying part.
本発明によれば、比較的簡単な処理で罫線の種別を特定する画像処理装置が得られる。 According to the present invention, an image processing apparatus for specifying a type of ruled line can be obtained by a relatively simple process.
本発明の上記又は他の目的、特徴および優位性は、添付の図面とともに以下の詳細な説明から更に明らかになる。 The above or other objects, features and advantages of the present invention will be further clarified from the following detailed description along with the accompanying drawings.
以下、図に基づいて本発明の実施の形態を説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.
図1は、本発明の実施の形態に係る画像処理装置の構成を示すブロック図である。図1に示す画像処理装置は、画像読取装置1、記憶装置2、通信装置3、印刷装置4、および演算処理装置5を備える。
FIG. 1 is a block diagram showing a configuration of an image processing device according to an embodiment of the present invention. The image processing device shown in FIG. 1 includes an
画像読取装置1は、原稿から原稿画像を光学的に読み取り、原稿画像の画像データ(ここでは、RGBデータ)を生成する内部装置である。
The
また、記憶装置2は、各種データやプログラムを格納可能な装置である。記憶装置2としては、不揮発性メモリー、ハードディスクドライブなどの不揮発性の大容量記憶媒体が使用される。記憶装置2には、例えば原稿画像の画像データを記憶することができる。
Further, the
また、通信装置3は、外部装置との間でデータ通信を行う装置である。通信装置3としては、ネットワーク通信を行うネットワークインターフェイス、ファクシミリ通信を行うモデムなどが使用される。
Further, the
また、印刷装置4は、色変換、ハーフトーン処理などの、印刷のための画像処理を施された原稿画像の画像データに基づき原稿画像の印刷を実行する。
Further, the
また、演算処理装置5は、CPU(Central Processing Unit)、ROM(Read Only Memory)、RAM(Random Access Memory)などを有するコンピューターであり、ROMや記憶装置2などからRAMへプログラムをロードし、そのプログラムをCPUで実行することにより、各種処理部を実現する。この実施の形態では、演算処理装置5において、読取処理部11および表検出部12が実現される。
Further, the
読取処理部11は、画像読取装置1を制御して、原稿画像を取得し、原稿画像の画像データを記憶装置2、RAMなどに記憶する。
The
表検出部12は、その画像データに基づいて原稿画像(原画像)内の罫線を検出し、検出した罫線に基づいて、原稿画像内の表組を検出する。
The
表検出部12は、エッジ画像生成部21、膨張収縮処理部22、および罫線特定部23を備える。
The
エッジ画像生成部21は、原画像内のエッジを検出しエッジ画像を生成する。例えば、エッジ画像生成部21は、原画像内で、主走査方向または副走査方向に沿って、濃度の立ち上がり位置から立ち下がり位置までの画素の画素値を第1値(例えば1)とし、それ以外の画素の画素値を第2値(例えば0)として、2値画像としてのエッジ画像を生成する。この立ち上がり位置および立ち下がり位置は、隣接画素同士の濃度差が所定値を超えている位置である。
The edge
膨張収縮処理部22は、エッジ画像に対して膨張処理を実行し膨張処理後のエッジ画像に対して収縮処理(つまり、クロージング処理)を実行して、クロージング画像を生成する。
The expansion /
膨張処理では、ある注目画素について、主走査方向および副走査方向において1画素の範囲に、画素値が第1値である画素があれば、注目画素の画素値が第1値とされる。 In the expansion process, if there is a pixel whose pixel value is the first value in the range of one pixel in the main scanning direction and the sub-scanning direction for a certain pixel of interest, the pixel value of the pixel of interest is set to the first value.
収縮処理では、ある注目画素について、主走査方向および副走査方向において1画素の範囲に、画素値が第2値である画素があれば、注目画素の画素値が第2値とされる。 In the shrinkage process, if there is a pixel whose pixel value is the second value in the range of one pixel in the main scanning direction and the sub-scanning direction for a certain pixel of interest, the pixel value of the pixel of interest is set to the second value.
罫線特定部23は、上述のクロージング画像に基づいて罫線を特定し、また、いわゆるブラックハット処理を実行してクロージング画像とエッジ画像との差分画像を生成し、その差分画像に基づいて罫線の種別を特定する。なお、差分画像は、各画素位置において、クロージング画像の画素値とエッジ画像の画素値との排他的論理和(あるいはその反転値)を画素値として有する2値画像である。
The ruled
例えば、罫線特定部23は、特定した罫線の位置に、差分画像において連続的な直線状の線分が現れている場合には、特定した罫線の種別を二重線罫線と判定する。
For example, the ruled
また、罫線特定部23は、特定した罫線の位置に、差分画像において間欠的に複数の線分が直線状に位置している場合には、特定した罫線の種別を破線罫線または鎖線罫線と判定する。つまり、特定した罫線の種別は、その複数の線分の配置パターンに対応する種別(破線、一点鎖線、二点鎖線など)とされる。
Further, when a plurality of line segments are intermittently linearly located in the difference image at the position of the specified ruled line, the ruled
また、罫線特定部23は、特定した罫線のうち、罫線の種別が破線罫線、鎖線罫線および二重線罫線のいずれかであると判定された罫線以外の罫線の種別を実線罫線と判定する。
Further, the ruled
具体的には、罫線特定部23は、クロージング画像に対して収縮処理を実行し、収縮処理後のクロージング画像に残っている線分のうち、罫線の種別が二重線罫線であると判定された罫線に対応する線分以外の線分に対応する罫線の種別を太線罫線(実線罫線の一種)と判定する。そして、それ以外の実線罫線の種別が細線罫線と判定される。
Specifically, the ruled
なお、例えば、表検出部12は、特定した罫線により構成される1または連続する複数の矩形を特定し、特定した1または連続する複数の矩形についての外接矩形を特定し、その外接矩形を表領域として特定する。
For example, the
次に、上記画像処理装置の動作について説明する。図2は、図1に示す画像処理装置の動作を説明するフローチャートである。 Next, the operation of the image processing apparatus will be described. FIG. 2 is a flowchart illustrating the operation of the image processing apparatus shown in FIG.
読取処理部11が原画像を取得すると(ステップS1)、エッジ画像生成部21は、原画像に対応するエッジ画像を生成する(ステップS2)。
When the
図3は、表組を含む原画像の一例を示す図である。図4は、図3に示す原画像に対応するエッジ画像(一部)を示す図である。図3に示す原画像における表組には、太線罫線(実線罫線)、二重線罫線、破線罫線、鎖線罫線、および細線罫線(実線罫線)が含まれている。図4では、エッジ画像の左上部分が示されており、上述の第1値の画素が白画素として表され、上述の第2値の画素が黒画素として表されている。 FIG. 3 is a diagram showing an example of an original image including a table structure. FIG. 4 is a diagram showing an edge image (part) corresponding to the original image shown in FIG. The table set in the original image shown in FIG. 3 includes a thick line ruled line (solid line ruled line), a double line ruled line, a broken line ruled line, a chain line ruled line, and a thin line ruled line (solid line ruled line). In FIG. 4, the upper left portion of the edge image is shown, the first value pixel described above is represented as a white pixel, and the second value pixel described above is represented as a black pixel.
次に、膨張収縮処理部22は、エッジ画像に対応するクロージング画像を生成する(ステップS3)。図5は、図4に示すエッジ画像に対応するクロージング画像(一部)を示す図である。図5では、上述の第1値の画素が白画素として表され、上述の第2値の画素が黒画素として表されている。例えば図5に示すように、クロージング画像では、太線罫線および二重線罫線に対応する位置に、太い線分が現れ、破線罫線、鎖線罫線および細線罫線に対応する位置に、細い線分が現れる。
Next, the expansion /
罫線特定部23は、既知の方法(例えばHough変換など)で、クロージング画像に基づいて罫線(つまり、罫線の位置)を特定する(ステップS4)。
The ruled
そして、罫線特定部23は、クロージング画像と元のエッジ画像との差分画像を生成し(ステップS5)、差分画像において、上述のようにして、罫線の種別のうち、二重線罫線、破線、および鎖線のいずれかを有する罫線を特定する(ステップS6)。
Then, the ruled
図6は、図4に示すエッジ画像および図5に示すクロージング画像に対応する差分画像(一部)を示す図である。図6では、上述の第1値の画素が白画素として表され、上述の第2値の画素が黒画素として表されている。例えば図6に示すように、連続的な線分(図6では横方向に延びる線分101)が現れている場合、その連続的な線分101の位置で特定された罫線の種別は、二重線罫線と特定される。原画像内では2本の線分(線分101の位置に含まれる2本の線分)となっている二重線罫線が、1本の二重線罫線として特定される。また、間欠的に位置している複数の線分(図6では縦方向に並んでいる複数の線分102,103)が現れている場合、その複数の線分102,103の位置で特定された罫線の種別は、その複数の線分の配置パターンに応じて破線または鎖線と特定される。複数の線分102に対応する罫線の種別は、破線と判定され、複数の線分103に対応する罫線の種別は、鎖線(二点鎖線)と判定される。
FIG. 6 is a diagram showing a difference image (part) corresponding to the edge image shown in FIG. 4 and the closing image shown in FIG. In FIG. 6, the above-mentioned first value pixel is represented as a white pixel, and the above-mentioned second value pixel is represented as a black pixel. For example, as shown in FIG. 6, when a continuous line segment (a
ここで、ステップS4において特定された罫線のうち、二重線罫線、破線、および鎖線のいずれかを有する罫線以外の罫線は実線罫線とされる。 Here, among the ruled lines specified in step S4, the ruled lines other than the ruled lines having any of the double line ruled line, the broken line, and the chain line are regarded as solid line ruled lines.
さらに、罫線特定部23は、クロージング画像に対して収縮処理を実行し(ステップS7)、収縮処理後のクロージング画像において残存する線分のうち、二重線罫線とされた罫線に対応する線分以外の線分に対応する罫線の種別を太線罫線と判定し(ステップS8)、太線罫線以外の実線罫線を細線罫線と判定する(ステップS9)。
Further, the ruled
図7は、図5に示すクロージング画像に対して収縮処理を行うことで得られる画像(一部)を示す図である。図7では、上述の第1値の画素が白画素として表され、上述の第2値の画素が黒画素として表されている。例えば図7に示すように、クロージング画像に対して収縮処理を行うことで、細線罫線に対応する線分はすべて消失し、太線罫線および二重線罫線に対応する線分111,112が残存する。そして、その残存する線分111,112に対応する罫線のうち、上述のように特定された二重線罫線(つまり、線分112に対応する罫線)以外の罫線(つまり、線分111に対応する罫線)の種別は太線罫線と特定される。
FIG. 7 is a diagram showing an image (part) obtained by performing a shrinkage process on the closing image shown in FIG. In FIG. 7, the above-mentioned first value pixel is represented as a white pixel, and the above-mentioned second value pixel is represented as a black pixel. For example, as shown in FIG. 7, by performing the shrinkage processing on the closing image, all the line segments corresponding to the thin line ruled lines disappear, and the
以上のように、上記実施の形態によれば、エッジ画像生成部21は、原画像内のエッジを検出しエッジ画像を生成する。膨張収縮処理部22は、エッジ画像に対して膨張処理を実行し膨張処理後のエッジ画像に対して収縮処理を実行して、クロージング画像を生成する。罫線特定部23は、クロージング画像に基づいて罫線を特定し、クロージング画像とエッジ画像との差分画像に基づいて罫線の種別を特定する。
As described above, according to the above embodiment, the edge
これにより、比較的簡単な処理で罫線の種別が特定される。 As a result, the type of ruled line can be specified by a relatively simple process.
なお、上述の実施の形態に対する様々な変更および修正については、当業者には明らかである。そのような変更および修正は、その主題の趣旨および範囲から離れることなく、かつ、意図された利点を弱めることなく行われてもよい。つまり、そのような変更および修正が請求の範囲に含まれることを意図している。 It should be noted that various changes and modifications to the above-described embodiments will be apparent to those skilled in the art. Such changes and modifications may be made without departing from the intent and scope of the subject and without diminishing the intended benefits. That is, such changes and amendments are intended to be included in the claims.
例えば、上記実施の形態において、膨張収縮処理部22は、連続して所定の複数回、膨張処理を行った後に、膨張処理と同一回数の収縮処理を実行するようにしてもよい。ただし、膨張処理の回数(および収縮処理の回数)は、所定の上限値以下に設定される。この回数は、固定値でもよいし、ユーザーにより指定される値でもよい。また、この上限値は、膨張処理によって、隣接する罫線同士が結合しない回数に設定される。
For example, in the above embodiment, the expansion /
また、上記実施の形態において、罫線特定部23は、クロージング画像に対する収縮処理を、連続して所定の複数回実行してもよい。
Further, in the above embodiment, the ruled
また、上記実施の形態において、原画像内の罫線は、表組内の罫線でなくてもよい。 Further, in the above embodiment, the ruled line in the original image does not have to be the ruled line in the table.
本発明は、例えば、複写機、複合機などの画像形成装置に適用可能である。 The present invention is applicable to, for example, an image forming apparatus such as a copying machine or a multifunction device.
21 エッジ画像生成部
22 膨張収縮処理部
23 罫線特定部
21 Edge
Claims (5)
前記エッジ画像に対して膨張処理を実行し前記膨張処理後の前記エッジ画像に対して収縮処理を実行して、クロージング画像を生成する膨張収縮処理部と、
前記クロージング画像に基づいて罫線を特定し、前記クロージング画像と前記エッジ画像との差分画像に基づいて前記罫線の種別を特定する罫線特定部と、
を備えることを特徴とする画像処理装置。 An edge image generator that detects edges in the original image and generates an edge image,
An expansion / contraction processing unit that executes an expansion process on the edge image and performs a contraction process on the edge image after the expansion process to generate a closing image.
A ruled line specifying unit that specifies a ruled line based on the closing image and specifies the type of the ruled line based on a difference image between the closing image and the edge image.
An image processing device comprising.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018059185A JP6880460B2 (en) | 2018-03-27 | 2018-03-27 | Image processing device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018059185A JP6880460B2 (en) | 2018-03-27 | 2018-03-27 | Image processing device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2019174887A JP2019174887A (en) | 2019-10-10 |
JP6880460B2 true JP6880460B2 (en) | 2021-06-02 |
Family
ID=68170326
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018059185A Active JP6880460B2 (en) | 2018-03-27 | 2018-03-27 | Image processing device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6880460B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP7364898B2 (en) * | 2020-02-20 | 2023-10-19 | 日本製鉄株式会社 | Material evaluation device, material evaluation method, and program |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000076370A (en) * | 1989-07-10 | 2000-03-14 | Hitachi Ltd | Slip recognizing method and its device |
JP3147281B2 (en) * | 1995-01-26 | 2001-03-19 | 日本電信電話株式会社 | Underline extraction method |
JP2002310937A (en) * | 2001-04-09 | 2002-10-23 | Dainippon Printing Co Ltd | Method and apparatus for inspection of defect |
JP2013061839A (en) * | 2011-09-14 | 2013-04-04 | Ricoh Co Ltd | Image processor, image processing method, image forming device and image processing program |
CN106156761B (en) * | 2016-08-10 | 2020-01-10 | 北京交通大学 | Image table detection and identification method for mobile terminal shooting |
-
2018
- 2018-03-27 JP JP2018059185A patent/JP6880460B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2019174887A (en) | 2019-10-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4219542B2 (en) | Image processing apparatus, image processing method, and recording medium storing image processing program | |
US9219841B2 (en) | Image-processing device identifying object in image specified by encircling line | |
JP6041836B2 (en) | Image processing apparatus and image processing program | |
JP2010218420A (en) | Character recognition apparatus, image reading apparatus, and program | |
JP6880460B2 (en) | Image processing device | |
JP2008092447A (en) | Image processing apparatus, image output device, and image processing method | |
JP5984880B2 (en) | Image processing device | |
JP5743187B2 (en) | Image area separation method, program for executing the same, and image area separation apparatus | |
US10367971B2 (en) | Image processing apparatus detecting toner peeling area on crease in document and correcting pixel data | |
US9667832B2 (en) | Image processing apparatus | |
US9886648B2 (en) | Image processing device generating arranged image data representing arranged image in which images are arranged according to determined relative position | |
JP6380763B2 (en) | Image forming apparatus, color conversion program, and color conversion method | |
JP5453215B2 (en) | Image processing apparatus, image forming apparatus, and image processing method | |
JP2012095173A (en) | Image processing device, image formation device, and image processing method | |
JPH07221976A (en) | Smoothing magnification processing method for binary image data | |
JP6025803B2 (en) | Image processing device | |
JP6810892B2 (en) | Image processing device | |
JPH0550187B2 (en) | ||
JP2014011590A (en) | Image processing system | |
JP6157234B2 (en) | Image processing apparatus, image processing method, and program | |
JP4517288B2 (en) | Image processing apparatus, image processing method, and program thereof | |
JP2012238051A (en) | Image processing device, image processing method, and program | |
JP5268861B2 (en) | Image processing device | |
JPS60136476A (en) | Picture processor | |
JP6226206B2 (en) | Image processing apparatus, image processing method, and image processing program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20200220 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20210325 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20210401 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20210414 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6880460 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |