JP5418064B2 - Image processing apparatus and program - Google Patents

Image processing apparatus and program Download PDF

Info

Publication number
JP5418064B2
JP5418064B2 JP2009193243A JP2009193243A JP5418064B2 JP 5418064 B2 JP5418064 B2 JP 5418064B2 JP 2009193243 A JP2009193243 A JP 2009193243A JP 2009193243 A JP2009193243 A JP 2009193243A JP 5418064 B2 JP5418064 B2 JP 5418064B2
Authority
JP
Japan
Prior art keywords
rectangle
specifying
line segment
specified
graphic
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.)
Expired - Fee Related
Application number
JP2009193243A
Other languages
Japanese (ja)
Other versions
JP2011044089A (en
Inventor
正和 福永
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Fujifilm Business Innovation Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Xerox Co Ltd, Fujifilm Business Innovation Corp filed Critical Fuji Xerox Co Ltd
Priority to JP2009193243A priority Critical patent/JP5418064B2/en
Publication of JP2011044089A publication Critical patent/JP2011044089A/en
Application granted granted Critical
Publication of JP5418064B2 publication Critical patent/JP5418064B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、画像処理装置およびプログラムに関する。   The present invention relates to an image processing apparatus and a program.

画像中の表領域を認識する装置としては、例えば、特許文献1に開示された装置がある。この装置は、画像からセル領域の候補領域を特定し、複数の候補領域について表を構成することが可能な組み合わせ候補を選定する。そして、組み合わせの候補毎に表を構成する可能性の度合いを示す評価値を算出し、算出した度合いが最大の候補を選択して表を構成する。   As an apparatus for recognizing a table area in an image, for example, there is an apparatus disclosed in Patent Document 1. This apparatus identifies candidate areas of cell areas from an image, and selects combination candidates that can form a table for a plurality of candidate areas. Then, an evaluation value indicating the degree of possibility of configuring the table is calculated for each combination candidate, and the table having the maximum calculated degree is selected to configure the table.

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

本発明は、表領域ではない領域が表領域として判定されることを少なくする技術を提供することを目的とする。   An object of the present invention is to provide a technique for reducing a case where an area that is not a table area is determined as a table area.

本発明の請求項1に係る画像処理装置は、画像を二値で表した二値化画像を取得する取得手段と、前記取得手段で取得された二値化画像中の図形部分を特定する図形特定手段と、前記図形特定手段で特定された部分にある線分を特定する線分特定手段と、前記線分特定手段で特定された各線分の交差関係を判定する交差判定手段と、前記線分特定手段で特定された線分と、前記交差判定手段で判定された交差関係とにより、矩形が複数行または複数列で並んだセル構造と、該セル構造を構成せずに独立した独立矩形を特定する構造特定手段と、前記構造特定手段で特定された前記独立矩形に基づいて前記図形特定手段で特定された図形部分が表領域であるか否かを判定する手段であって、前記構造特定手段で特定されたセル構造を構成する矩形のうち、前記構造特定手段で特定された独立矩形が内側にある矩形以外の矩形について、該矩形の面積が前記セル構造の面積において占める割合を算定し、該算定した割合に基づいて、前記図形特定手段で特定された図形部分が表領域であるか否かを判定する表領域判定手段とを有する。 An image processing apparatus according to claim 1 of the present invention includes an acquisition unit that acquires a binary image representing a binary image, and a graphic that identifies a graphic portion in the binarized image acquired by the acquisition unit. Specifying means; line segment specifying means for specifying a line segment in the part specified by the graphic specifying means; intersection determining means for determining an intersection relation of each line segment specified by the line segment specifying means; A cell structure in which rectangles are arranged in a plurality of rows or columns by the line segment specified by the segment specifying means and the intersection relationship determined by the intersection determining means, and an independent independent rectangle without forming the cell structure a structure specifying means for specifying, identified geometric portion in the previous SL diagram form specifying means based on the independent rectangle identified in the structural specification means is a means for determining whether a table region, A rectangle constituting the cell structure specified by the structure specifying means. Among the rectangles other than the rectangle with the independent rectangle specified by the structure specifying means inside, the ratio of the area of the rectangle in the area of the cell structure is calculated, and the figure is based on the calculated ratio. Table area determining means for determining whether or not the graphic part specified by the specifying means is a table area .

本発明の請求項に係る画像処理装置は、請求項1に記載の画像処理装置において、前記構造特定手段は、特定したセル構造を構成する矩形の内部についてさらに前記セル構造を特定することを特徴とする。 The image processing apparatus according to claim 2 of the present invention is the image processing apparatus according to claim 1 , wherein the structure specifying means further specifies the cell structure for the inside of the rectangle constituting the specified cell structure. Features.

本発明の請求項に係る画像処理装置は、請求項1または請求項2に記載の画像処理装置において、前記セル構造は、1行n列またはn行1列(n≧2)で矩形が並んだ構造であることを特徴とする。 An image processing apparatus according to a third aspect of the present invention is the image processing apparatus according to the first or second aspect , wherein the cell structure has a rectangular shape of 1 row n columns or n rows 1 column (n ≧ 2). It is characterized by a side-by-side structure.

本発明の請求項に係る画像処理装置は、請求項または請求項に記載の画像処理装置において、前記構造特定手段は、特定したセル構造を構成する矩形について、該矩形の角部の内側にある前記セル構造を特定することを特徴とする。 An image processing apparatus according to a fourth aspect of the present invention is the image processing apparatus according to the second or third aspect , wherein the structure specifying unit is configured to determine a rectangular shape of the specified cell structure. The cell structure inside is specified.

本発明の請求項に係るプログラムは、コンピュータを、画像を二値で表した二値化画像を取得する取得手段と、前記取得手段で取得された二値化画像中の図形部分を特定する図形特定手段と、前記図形特定手段で特定された部分にある線分を特定する線分特定手段と、前記線分特定手段で特定された各線分の交差関係を判定する交差判定手段と、前記線分特定手段で特定された線分と、前記交差判定手段で判定された交差関係とにより、矩形が複数行または複数列で並んだセル構造と、該セル構造を構成せずに独立した独立矩形を特定する構造特定手段と、前記構造特定手段で特定された前記独立矩形に基づいて前記図形特定手段で特定された図形部分が表領域であるか否かを判定する手段であって、前記構造特定手段で特定されたセル構造を構成する矩形のうち、前記構造特定手段で特定された独立矩形が内側にある矩形以外の矩形について、該矩形の面積が前記セル構造の面積において占める割合を算定し、該算定した割合に基づいて、前記図形特定手段で特定された図形部分が表領域であるか否かを判定する表領域判定手段として機能させるためのプログラムである。 According to a fifth aspect of the present invention, there is provided a program for identifying a computer with an acquisition unit that acquires a binarized image representing a binary image and a figure portion in the binarized image acquired by the acquisition unit. Figure specifying means, line segment specifying means for specifying line segments in the part specified by the figure specifying means, intersection determination means for determining an intersection relationship of each line segment specified by the line segment specifying means, A cell structure in which rectangles are arranged in a plurality of rows or columns by the line segment specified by the line segment specifying means and the intersection relationship determined by the intersection determining means, and independent independent without constituting the cell structure a structure specifying means for specifying a rectangle, the structure has been geometric portion identified in the previous SL diagram form specifying means based on the independent rectangle identified in particular means a unit that determines whether a table region The cell structure specified by the structure specifying means Among rectangles other than the rectangle in which the independent rectangle specified by the structure specifying means is inside, the ratio of the area of the rectangle in the area of the cell structure is calculated, and based on the calculated ratio And a program for causing the graphic portion specified by the graphic specifying means to function as a table area determining means for determining whether or not the graphic portion is a table area .

本発明の請求項1、に係る発明によれば、本発明の構成を有さないものと比較して、表領域ではない領域が表領域として判定されることを少なくすることができる。
本発明の請求項に係る発明によれば、特定したセル構造に含まれる矩形の内部についてさらにセル構造を特定しないものと比較して、表領域ではない領域が表領域として判定されることを少なくすることができる。
本発明の請求項に係る発明によれば、1行n列またはn行1列(n≧2)で矩形が並んだ構造をセル構造と特定しないものと比較して、表領域ではない領域が表領域として判定されることを少なくすることができる。
本発明の請求項に係る発明によれば、特定したセル構造に含まれる矩形の角部の内側にセル構造がある図形を、表領域として判定することができる。
According to the inventions according to claims 1 and 5 of the present invention, it is possible to reduce an area that is not a table area from being determined as a table area, as compared with the case without the configuration of the present invention.
According to the invention according to claim 2 of the present invention, it is determined that a region that is not a table region is determined as a table region compared to a case where a cell structure is not further specified for the inside of a rectangle included in the specified cell structure. Can be reduced.
According to the invention of claim 3 of the present invention, an area that is not a table area is compared with a structure in which rectangles are arranged in 1 row and n columns or n rows and 1 column (n ≧ 2) as not specifying a cell structure. Can be reduced as a table area.
According to the fourth aspect of the present invention, a figure having a cell structure inside a corner of a rectangle included in the specified cell structure can be determined as a table region.

コンピュータ装置1のハードウェア構成を示したブロック図。FIG. 3 is a block diagram showing a hardware configuration of the computer apparatus 1. コンピュータ装置1において実現する機能ブロックを示した図。The figure which showed the functional block implement | achieved in the computer apparatus. CPU102が行う処理の流れを示したフローチャート。The flowchart which showed the flow of the process which CPU102 performs. 二値化画像の一例を示した図。The figure which showed an example of the binarized image. 線分テーブルTB10のフォーマットを例示した図。The figure which illustrated the format of line segment table TB10. リスト300の内容を示した図。The figure which showed the content of the list 300. FIG. 実施形態の動作を説明するための図。The figure for demonstrating operation | movement of embodiment. 実施形態の動作を説明するための図。The figure for demonstrating operation | movement of embodiment. 実施形態の動作を説明するための図。The figure for demonstrating operation | movement of embodiment. 実施形態の動作を説明するための図。The figure for demonstrating operation | movement of embodiment. 二値化画像の一例を示した図。The figure which showed an example of the binarized image. 実施形態の動作を説明するための図。The figure for demonstrating operation | movement of embodiment. リスト300の内容を示した図。The figure which showed the content of the list 300. FIG. 二値化画像の一例を示した図。The figure which showed an example of the binarized image. リスト300の内容を示した図。The figure which showed the content of the list 300. FIG. 二値化画像の一例を示した図。The figure which showed an example of the binarized image. リスト300の内容を示した図。The figure which showed the content of the list 300. FIG. 二値化画像の一例を示した図。The figure which showed an example of the binarized image. リスト300の内容を示した図。The figure which showed the content of the list 300. FIG.

[実施形態]
(実施形態の構成)
図1は、本発明の一実施形態に係るコンピュータ装置1のハードウェア構成を示したブロック図である。本実施形態においてコンピュータ装置1は、所謂PC(Personal Computer)であり、図1に示したように、各部は、バス101に接続され、このバス101を介して各部間で情報のやり取りを行う。
[Embodiment]
(Configuration of the embodiment)
FIG. 1 is a block diagram showing a hardware configuration of a computer apparatus 1 according to an embodiment of the present invention. In the present embodiment, the computer device 1 is a so-called PC (Personal Computer), and as shown in FIG. 1, each unit is connected to the bus 101, and exchanges information between each unit via the bus 101.

表示部107は、画像を表示する表示装置として液晶ディスプレイを備えており、CPU102の制御の下、コンピュータ装置1を操作するためのメニュー画面や各種メッセージ、画像等を表示する。なお、表示装置は液晶ディスプレイに限定されるものではなく、CRT(Cathode Ray Tube)やEL(electroluminescence)を用いたディスプレイなど他の表示装置であってもよい。
操作部106は、コンピュータ装置1を操作するためのキーボードやマウスを備えている。ユーザがこのキーボードやマウスを操作することにより、コンピュータ装置1に対する各種指示の入力や各種設定が行われる。
画像取得部108は、スキャナが接続されるインターフェースであり、紙面の画像を読み取り、読み取った画像の画像データを生成するスキャナと通信を行い、スキャナから画像データを取得する。
The display unit 107 includes a liquid crystal display as a display device for displaying an image, and displays a menu screen, various messages, images, and the like for operating the computer device 1 under the control of the CPU 102. The display device is not limited to a liquid crystal display, and may be another display device such as a display using CRT (Cathode Ray Tube) or EL (electroluminescence).
The operation unit 106 includes a keyboard and a mouse for operating the computer apparatus 1. When the user operates the keyboard and mouse, various instructions are input to the computer apparatus 1 and various settings are made.
The image acquisition unit 108 is an interface to which a scanner is connected, reads an image on a paper surface, communicates with a scanner that generates image data of the read image, and acquires image data from the scanner.

記憶部105はハードディスク装置を具備しており、コンピュータ装置1にオペレーティングシステムの機能を実現させるプログラムや、画像データが示す画像に画像処理を施す画像処理プログラム、スキャナから取得した画像データなどを記憶する。
ROM(Read Only Memory)103は、IPL(Initial Program Loader)を記憶しており、CPU(Central Processing Unit)102は、ROM103に記憶されているIPLを読み出して実行する。IPLが実行されると、記憶部105からオペレーティングシステムの機能を実現させるプログラムが読み出されて実行される。また、オペレーティングシステムの機能を実現させるプログラムが実行されると、CPU102により画像処理プログラムを実行することが可能となる。そして、CPU102により画像処理プログラムが実行されると、コンピュータ装置1は、画像データが示す画像を処理する画像処理装置として機能し、画像中にある図形が表であるか否か判定し、表の領域を特定する機能が実現する。
The storage unit 105 includes a hard disk device, and stores a program that causes the computer apparatus 1 to realize the function of the operating system, an image processing program that performs image processing on an image indicated by the image data, and image data acquired from a scanner. .
A ROM (Read Only Memory) 103 stores an IPL (Initial Program Loader), and a CPU (Central Processing Unit) 102 reads and executes the IPL stored in the ROM 103. When the IPL is executed, a program for realizing the function of the operating system is read from the storage unit 105 and executed. Further, when a program for realizing the function of the operating system is executed, the image processing program can be executed by the CPU 102. When the image processing program is executed by the CPU 102, the computer apparatus 1 functions as an image processing apparatus that processes the image indicated by the image data, and determines whether or not the figure in the image is a table. A function for specifying an area is realized.

図2は、画像処理プログラムをCPU102が実行したことにより実現する機能を示したブロック図である。
二値化部200は、画像取得部108で取得された画像データが表す画像を白黒の二値の画像に二値化するブロックであり、二値化された画像(以下、二値化画像と称する)を得る取得手段の一例である。本実施形態においては、二値化画像は、画素の値を1ビットで表しており、黒の画素を「1」、白の画素を「0」とし、白画素が画像の背景を表している。なお、二値化画像は、黒の画素を「0」、白の画素を「1」で表してもよい。また、黒の画素を「10」、白の画素を「1」というように、「0」と「1」以外の数値で黒画素と白画素を表してもよい。
図形特定部201は、二値化画像中の図形の部分を特定するブロックである。画像から図形の部分を特定する技術としては、例えば、特開平3−102964号公報に記載されている技術など公知の技術を採用できる。なお、画像から図形の部分を特定する技術は、特開平3−102964号公報に記載されている技術に限定されず、他の技術を採用してもよい。
線分特定部202は、図形特定部201で特定された図形部分にある線分を特定するブロックである。線分を特定する技術としては、例えば、特開平2−210586号公報に記載されている技術のように、二値化画像を走査し、予め定められた閾値以上に黒画素が連続している部分を線分として特定するという手法など公知の様々な技術を採用できる。なお、図形部分にある線分を特定する技術は、特開平2−210586号公報に記載されている技術に限定されず、他の技術を採用してもよい。
FIG. 2 is a block diagram illustrating functions realized by the CPU 102 executing the image processing program.
The binarization unit 200 is a block that binarizes the image represented by the image data acquired by the image acquisition unit 108 into a black and white binary image. The binarized image (hereinafter referred to as a binarized image). It is an example of the acquisition means to obtain. In the present embodiment, the binarized image represents the pixel value by 1 bit, the black pixel is “1”, the white pixel is “0”, and the white pixel represents the background of the image. . In the binarized image, black pixels may be represented by “0” and white pixels by “1”. Further, the black pixel and the white pixel may be represented by numerical values other than “0” and “1”, such as “10” for the black pixel and “1” for the white pixel.
The graphic specifying unit 201 is a block that specifies a graphic part in the binarized image. As a technique for specifying a graphic portion from an image, for example, a known technique such as a technique described in Japanese Patent Laid-Open No. 3-102964 can be employed. Note that the technique for specifying a graphic portion from an image is not limited to the technique described in Japanese Patent Laid-Open No. 3-102964, and other techniques may be adopted.
The line segment specifying unit 202 is a block that specifies a line segment in the graphic part specified by the graphic specifying unit 201. As a technique for specifying a line segment, for example, as in the technique described in JP-A-2-210586, a binarized image is scanned, and black pixels are continuous beyond a predetermined threshold. Various known techniques such as a method of specifying a portion as a line segment can be employed. Note that the technique for identifying the line segment in the graphic portion is not limited to the technique described in Japanese Patent Laid-Open No. 2-258686, and other techniques may be employed.

交差判定部203は、線分特定部202で特定された線分同士の交差関係を判定するブロックであり、線分の始点と終点の座標から、線分同士が交差しているか否か判定する。
構造特定部204は、図形特定部201が特定した図形部分において矩形の升目部分を特定するブロックであり、線分特定部202が特定した線分と、交差判定部203が判定した線分同士の交差関係とを用いて図形部分にある矩形を特定し、複数行または複数列で矩形が並んだ構造や、セル構造を構成せずに独立した矩形などを特定する。
リスト作成部205は、構造特定部204で特定された構造を表すリストを生成するブロックである。
表領域判定部206は、リスト作成部205が作成したリストを用いて図形特定部201が特定した図形部分が表であるか否か判定するブロックである。
The intersection determination unit 203 is a block for determining the intersection relationship between the line segments specified by the line segment specifying unit 202, and determines whether or not the line segments intersect from the coordinates of the start point and end point of the line segment. .
The structure specifying unit 204 is a block that specifies a rectangular grid portion in the graphic portion specified by the graphic specifying unit 201, and the line segment specified by the line segment specifying unit 202 and the line segments determined by the intersection determining unit 203 are Using the cross relationship, a rectangle in the graphic part is specified, and a structure in which the rectangles are arranged in a plurality of rows or a plurality of columns, an independent rectangle, etc. without configuring a cell structure are specified.
The list creation unit 205 is a block that generates a list representing the structure identified by the structure identification unit 204.
The table area determination unit 206 is a block that determines whether the graphic part specified by the graphic specification unit 201 is a table using the list generated by the list generation unit 205.

(実施形態の動作)
以下、本実施形態の動作例について説明する。なお、以下の説明においては、まず、画像データが示す画像を表ではないと判定する場合の動作について説明し、次に画像データが示す画像を表であると判定する場合の動作について説明する。
(Operation of the embodiment)
Hereinafter, an operation example of this embodiment will be described. In the following description, an operation when it is determined that the image indicated by the image data is not a table will be described first, and then an operation when it is determined that the image indicated by the image data is a table will be described.

(画像を表ではないと判定する場合の動作)
まず、ユーザが画像取得部108に接続されたスキャナに画像が描かれた紙をセットし、紙面の画像の読み取りを行わせると、紙面の画像を表す画像データがスキャナにおいて生成される。次に、ユーザが、スキャナで生成された画像データの取得を指示する操作を操作部106において行うと、画像取得部108がスキャナと通信を行い、スキャナで生成された画像データが取得されて記憶部105に記憶される。
(Operation when determining that an image is not a table)
First, when a user sets paper on which an image is drawn on a scanner connected to the image acquisition unit 108 and causes the image on the paper surface to be read, image data representing the image on the paper surface is generated in the scanner. Next, when the user performs an operation for instructing the acquisition of the image data generated by the scanner in the operation unit 106, the image acquisition unit 108 communicates with the scanner, and the image data generated by the scanner is acquired and stored. Stored in the unit 105.

また、ユーザが、画像処理プログラムの実行を指示する操作を操作部106において行うと、画像処理プログラムがCPU102により実行される。次に、記憶部105に記憶された画像データを指定し、この指定した画像データに対して画像処理を行うように指示する操作をユーザが操作部106において行うと、CPU102は、画像処理プログラムに従って図3に示した処理を実行する。   When the user performs an operation for instructing execution of the image processing program on the operation unit 106, the image processing program is executed by the CPU 102. Next, when the image data stored in the storage unit 105 is designated and the user performs an operation to instruct the designated image data to perform image processing on the operation unit 106, the CPU 102 follows the image processing program. The process shown in FIG. 3 is executed.

具体的には、まず、CPU102は、ユーザにより指定された画像データの画像を二値化する処理(ステップSA1)を行う。ここで、図4は、二値化処理により得られた二値化画像の一例を示した図であり、図4に示した画像G10は、棒グラフの画像である。なお、CPU102は、画像データの画像を二値化しているため、ここで二値化部200として機能している。   Specifically, first, the CPU 102 performs a process of binarizing the image of the image data designated by the user (step SA1). Here, FIG. 4 is a diagram illustrating an example of the binarized image obtained by the binarization process, and the image G10 illustrated in FIG. 4 is a bar graph image. Since the CPU 102 binarizes the image data image, it functions as the binarization unit 200 here.

CPU102は、二値化処理が終了すると二値化画像を解析し、二値化画像にある図形の部分を特定する(ステップSA2)。例えば、図4の二値化画像の場合、画像G10の部分が図形の部分として特定される。CPU102は、二値化画像にある図形部分を特定すると、各図形部分を一意に識別する図形識別子を生成し、例えば、画像G10の部分に対して「1」という図形識別子を生成する。なお、CPU102は、二値化画像にある図形部分を特定しているため、ここで図形特定部201として機能している。   When the binarization processing is completed, the CPU 102 analyzes the binarized image and specifies a graphic portion in the binarized image (step SA2). For example, in the case of the binarized image of FIG. 4, the part of the image G10 is specified as the part of the figure. When the CPU 102 specifies a graphic part in the binarized image, the CPU 102 generates a graphic identifier that uniquely identifies each graphic part, for example, generates a graphic identifier “1” for the part of the image G10. Since the CPU 102 specifies a graphic part in the binarized image, it functions as the graphic specifying unit 201 here.

次にCPU102は、特定した図形部分にある線分を特定し、各線分の座標を特定する(ステップSA3)。例えば、図4の二値化画像の場合、画像G10の部分からは、縦方向に描かれた線分L101〜L110と、横方向に描かれた線分L121〜L130とが特定される。なお、線分の座標としては、例えば画像の左下隅を原点として、原点から横方向にx座標、原点から縦方向にy座標をとった場合の座標が特定される。CPU102は、図形部分にある線分の特定をしているため、ここで線分特定部202として機能している。   Next, the CPU 102 specifies line segments in the specified graphic part, and specifies the coordinates of each line segment (step SA3). For example, in the case of the binarized image in FIG. 4, line segments L101 to L110 drawn in the vertical direction and line segments L121 to L130 drawn in the horizontal direction are specified from the portion of the image G10. As the coordinates of the line segment, for example, the coordinates when the lower left corner of the image is the origin, the x coordinate is taken in the horizontal direction from the origin, and the y coordinate is taken in the vertical direction from the origin are specified. Since the CPU 102 specifies a line segment in the graphic part, it functions as the line segment specifying unit 202 here.

CPU102は、各図形部分にある線分を特定すると、各線分を一意に識別するラベル番号を各線分に付ける。そして、図形部分に付けられた図形識別子と、この図形識別子で特定される部分にある各線分のラベル番号、各線分の両端の座標を対応付け、RAM(Random Access Memory)104に設けられる線分テーブルTB10に格納する(ステップSA4)。ここで、図5は、線分テーブルTB10のフォーマットの一例である。線分テーブルTB10は、図形識別子、ラベル番号、線分の両端の座標、交差する他の線分のラベル番号の列を有している。なお、本説明においては、各線分の符号における数の部分とラベル番号とを同じにしており、例えば、101というラベル番号は、線分L101に付けたラベル番号である。   When the CPU 102 specifies a line segment in each graphic part, the CPU 102 attaches a label number uniquely identifying each line segment to each line segment. A line identifier provided in a RAM (Random Access Memory) 104 is created by associating the graphic identifier attached to the graphic part with the label number of each line segment in the part specified by this graphic identifier and the coordinates of both ends of each line segment. Store in the table TB10 (step SA4). Here, FIG. 5 is an example of a format of the line segment table TB10. The line segment table TB10 has columns of figure identifiers, label numbers, coordinates of both ends of line segments, and label numbers of other line segments that intersect. In the present description, the number part in the code of each line segment is the same as the label number. For example, the label number 101 is the label number assigned to the line segment L101.

CPU102は、ステップSA4の処理が終了すると、ラベル番号が付けられた各線分を参照して線分同士の交差関係を判定する(ステップSA5)。そして、一の線分に交差する他の線分のラベル番号を、線分テーブルTB10に格納する。つまり、CPU102は、ここで線分同士の交差関係を判定する交差判定部203として機能する。
例えば、図4の画像の場合、線分L101については、線分L121,L122,L124,L128,L130が交差しているため、線分L101のラベル番号「101」に対応付けて、線分L121,L122,L124,L128,L130のラベル番号が図5に示したように格納される。
When the process of step SA4 is completed, the CPU 102 refers to each line segment to which a label number is attached and determines the crossing relationship between the line segments (step SA5). And the label number of the other line segment which cross | intersects one line segment is stored in line segment table TB10. That is, the CPU 102 functions as the intersection determination unit 203 that determines the intersection relationship between the line segments.
For example, in the case of the image of FIG. 4, the line segment L101 is associated with the label number “101” of the line segment L101 because the line segments L121, L122, L124, L128, and L130 intersect with each other. , L122, L124, L128, and L130 are stored as shown in FIG.

CPU102は、ステップSA5の処理が終了すると、線分テーブルTB10に格納されている情報を用いて、特定された図形部分において複数行または複数列で矩形がある部分を特定し(ステップSA6)、特定した矩形間の関係を表すリスト300を作成する(ステップSA7)。つまり、ここでCPU102は、複数行または複数列で矩形が並んだ構造(セル構造)を特定する構造特定部204と、構造特定部204で特定された構造を表すリストを作成するリスト作成部205として機能する。なお、本実施形態においては、CPU102は、複数行または複数列で矩形がある部分を特定する際、n行1列または1行n列(n≧2)で矩形がある部分を特定する。
具体的には、まずCPU102は、ステップSA2で特定した図形の外周となる線分で囲まれて複数行または複数列で矩形が並んでいる部分を特定し、並んでいる各矩形に対してラベルを付ける処理を行う。例えば図4の画像の場合、CPU102は、線分の座標と交差関係から図形の外周となる線分として線分L101,L121,L110,L130を特定し、図7に示したように、複数行で矩形がある部分として矩形R10、矩形R20、矩形R30および矩形R40の部分を特定する。そして、CPU102は、各矩形に対してID10,ID20,ID30,ID40というラベルを付け、図6に示したように図形の図形識別子に対して各ラベルを関連付けたリスト300を作成する。
なお、以下の説明においては、特定した矩形内にさらに矩形がある場合、矩形内に含まれる矩形を下位の矩形と称し、内側に矩形を含んでいる矩形を上位の矩形と称する。例えば、矩形R20の部分は、内側に後述する矩形R21〜R23があるため、矩形R20は、矩形R21〜R23に対して上位の矩形となり、矩形R21〜R23は、矩形R20に対して下位の矩形となる。
When the process of step SA5 is completed, the CPU 102 uses the information stored in the line segment table TB10 to specify a part having a rectangle in a plurality of rows or a plurality of columns in the specified graphic part (step SA6). A list 300 representing the relationship between the rectangles is created (step SA7). That is, here, the CPU 102 identifies a structure (cell structure) in which rectangles are arranged in a plurality of rows or columns, and a list creation unit 205 that creates a list representing the structure identified by the structure identification unit 204. Function as. In the present embodiment, when the CPU 102 specifies a portion having a rectangle in a plurality of rows or columns, the CPU 102 specifies a portion having a rectangle in n rows 1 column or 1 row n columns (n ≧ 2).
Specifically, first, the CPU 102 specifies a portion where rectangles are arranged in a plurality of rows or columns surrounded by a line segment that is the outer periphery of the graphic specified in step SA2, and labels each of the arranged rectangles. Perform processing to add. For example, in the case of the image in FIG. 4, the CPU 102 identifies line segments L101, L121, L110, and L130 as line segments that are the outer periphery of the figure from the coordinates of the line segments and the intersection relationship, and as shown in FIG. Then, the rectangle R10, the rectangle R20, the rectangle R30, and the rectangle R40 are specified as the portion having the rectangle. Then, the CPU 102 labels each rectangle with ID10, ID20, ID30, and ID40, and creates a list 300 in which each label is associated with the graphic identifier of the graphic as shown in FIG.
In the following description, when there are more rectangles in the specified rectangle, the rectangle included in the rectangle is referred to as a lower rectangle, and the rectangle including the rectangle inside is referred to as an upper rectangle. For example, since the portion of the rectangle R20 includes rectangles R21 to R23 described later, the rectangle R20 is an upper rectangle with respect to the rectangles R21 to R23, and the rectangles R21 to R23 are lower rectangles with respect to the rectangle R20. It becomes.

CPU102は、特定した各矩形について、さらに矩形内において複数行または複数列で矩形がある部分を特定する処理を続ける。例えば、矩形R10については、この矩形内には、複数行または複数列で矩形がないため、この矩形R10については、CPU102は、下位にある矩形の特定を終了する。   For each specified rectangle, the CPU 102 further continues the process of specifying a portion having a rectangle in a plurality of rows or a plurality of columns in the rectangle. For example, for the rectangle R10, since there are no rectangles in a plurality of rows or columns in the rectangle, the CPU 102 ends the specification of the lower rectangle for the rectangle R10.

また、矩形R20については、CPU102は、図8に示したように複数列の矩形R21〜R23を特定し、各矩形に対してID21,ID22,ID23というラベルを付け、図6に示したように各矩形のラベルをリスト300にあるID20に関連付ける。これにより、図6のリスト300を参照すると、ID21,ID22,ID23で特定される矩形がID20で特定される矩形の下位の矩形であることが分かる。
そして、さらに矩形R21については、複数行または複数列ではないものの、内側に矩形がある。この場合、CPU102は、矩形R21の内側にある矩形についてはセル構造を構成しない独立した矩形(独立矩形)として特定する。そして、独立矩形を含む矩形R21については表の一部を構成する矩形ではないものと判断し、表を構成する矩形ではない矩形であることを示す「?」を図6に示したようにID21に対応付ける。
As for the rectangle R20, the CPU 102 identifies a plurality of rows of rectangles R21 to R23 as shown in FIG. 8, and labels each rectangle with ID21, ID22, and ID23, as shown in FIG. Each rectangular label is associated with ID 20 in list 300. Thereby, referring to the list 300 in FIG. 6, it can be seen that the rectangle specified by ID21, ID22, and ID23 is a lower rectangle of the rectangle specified by ID20.
Further, the rectangle R21 is not a plurality of rows or a plurality of columns, but has a rectangle inside. In this case, the CPU 102 specifies the rectangle inside the rectangle R21 as an independent rectangle (independent rectangle) that does not constitute a cell structure. Then, it is determined that the rectangle R21 including the independent rectangle is not a rectangle constituting a part of the table, and “?” Indicating that the rectangle R21 is not a rectangle constituting the table is ID21 as shown in FIG. Associate with.

また、矩形R30については、CPU102は、図9に示したように、複数列の矩形R31〜R37を特定し、各矩形に対してID31〜ID37というラベルを付け、図6に示したように各矩形のラベルをリスト300にあるID30に関連付ける。
そして矩形R34と矩形R36については、各矩形内に複数行の矩形があるため、CPU102は、複数行の各矩形に対してラベルを付し、図6に示したように、リスト300にあるID34とID36に対して各矩形のラベルを関連付ける。
なお、矩形R37については、セル構造ではなく内側に独立矩形がある。CPU102は、セル構造でない矩形R37については表の一部を構成する矩形ではないものとし、表を構成する矩形ではない矩形であることを示す「?」を図6に示したようにリスト300にあるID37に対応付ける。
As for the rectangle R30, as shown in FIG. 9, the CPU 102 identifies a plurality of rows of rectangles R31 to R37, labels each rectangle with ID31 to ID37, and sets each rectangle as shown in FIG. The rectangular label is associated with the ID 30 in the list 300.
As for the rectangle R34 and the rectangle R36, since there are a plurality of rows of rectangles in each rectangle, the CPU 102 labels each rectangle of the plurality of rows and, as shown in FIG. And ID 36 are associated with each rectangular label.
Note that the rectangle R37 has an independent rectangle inside rather than a cell structure. The CPU 102 assumes that the rectangle R37 having no cell structure is not a rectangle constituting a part of the table, and "?" Indicating that the rectangle R37 is not a rectangle constituting the table is displayed in the list 300 as shown in FIG. Corresponds to a certain ID37.

また、矩形R40については、CPU102は、図10に示したように、複数列の矩形R41〜R49を特定し、各矩形に対してID41〜ID49というラベルを付け、図6に示したように各矩形のラベルをリスト300にあるID40に関連付ける。
そして、矩形R48については、矩形内に複数行の矩形があるため、CPU102は、複数行の各矩形に対してラベルを付し、図6に示したように、リスト300にあるID48に対して各矩形のラベルを関連付ける。
As for the rectangle R40, as shown in FIG. 10, the CPU 102 identifies a plurality of rows of rectangles R41 to R49, labels each rectangle with ID41 to ID49, and displays each rectangle as shown in FIG. The rectangular label is associated with ID 40 in the list 300.
As for the rectangle R48, since there are a plurality of rows of rectangles in the rectangle, the CPU 102 labels each rectangle of the plurality of rows, and as shown in FIG. Associate labels for each rectangle.

次にCPU102は、ラベルが付けられた各矩形の面積について上位の矩形の面積に占める割合を算出し、算出した割合を図6のリスト300にあるラベルに対応付ける(ステップSA8)。
例えば、矩形R10,R20,R30,R40の各面積が等しい場合、図形識別子として「1」が付けられた画像G10の面積に占める各矩形の面積の割合は、各々25%となるため、CPU102は、図6に示したように「25%」をリスト300にあるID10,ID20,ID30,ID40に対応付ける。また、例えば矩形R20の面積に占める矩形R21の面積の割合が60%、矩形R20の面積に占める矩形R22の面積の割合が10%、矩形R20の面積に占める矩形R23の面積の割合が30%である場合、CPU102は、図6に示したようにリスト300にあるID21に対して60%、ID22に対して10%、ID23に対して30%を対応付ける。なお、他のラベルが付けられた矩形についても同様に面積の割合を求めると、図4に示した画像の場合、図6に示したように各矩形の面積の割合がラベルに対応付けられる。このように、ここでもCPU102は、リストを作成するためリスト作成部205として機能している。
Next, the CPU 102 calculates the ratio of the area of each rectangle with a label to the area of the upper rectangle, and associates the calculated ratio with the label in the list 300 of FIG. 6 (step SA8).
For example, when the areas of the rectangles R10, R20, R30, and R40 are equal, the ratio of the area of each rectangle to the area of the image G10 assigned “1” as the graphic identifier is 25%. As shown in FIG. 6, “25%” is associated with ID10, ID20, ID30, and ID40 in the list 300. For example, the ratio of the area of the rectangle R21 to the area of the rectangle R20 is 60%, the ratio of the area of the rectangle R22 to the area of the rectangle R20 is 10%, and the ratio of the area of the rectangle R23 to the area of the rectangle R20 is 30%. In this case, the CPU 102 associates 60% with the ID 21 in the list 300, 10% with the ID 22, and 30% with the ID 23 as shown in FIG. If the ratio of the area is similarly obtained for the rectangles with other labels, the ratio of the area of each rectangle is associated with the label as shown in FIG. 6 in the case of the image shown in FIG. As described above, the CPU 102 also functions as the list creation unit 205 in order to create a list.

次にCPU102は、リスト300において「?」が対応付けられているラベルを特定し、特定したラベル対応付けられている割合を0%に置換する(ステップSA9)。例えば、矩形R21のラベルであるID21には「?」が対応付けられているため、CPU102は、ID21に対して対応付けられている割合を0%に置換する。また、矩形R37のラベルであるID37には「?」が対応付けられているため、CPU102は、ID37に対して対応付けられている割合を0%に置換する。   Next, the CPU 102 identifies a label associated with “?” In the list 300, and replaces the identified ratio associated with the label with 0% (step SA9). For example, since “?” Is associated with ID21 which is the label of the rectangle R21, the CPU 102 replaces the ratio associated with ID21 with 0%. Further, since “?” Is associated with the ID 37 that is the label of the rectangle R 37, the CPU 102 replaces the ratio associated with the ID 37 with 0%.

CPU102は、ステップSA9の処理を終了すると、リスト300にあるラベルに対応付けられた割合に基づいて、特定した図形部分が表であるか否か判定する(ステップSA10)。つまり、ここでCPU102は、図形部分が表であるか否か判定する表領域判定部206として機能する。
具体的には、CPU102は、まず下位の矩形について矩形の面積の割合を加算し、加算結果が予め定められた閾値未満である場合、上位の矩形について、対応付けて格納されている割合を0%に置換する。
例えば、矩形R20に対して下位層の矩形である矩形R21〜R23については、ID21に対応付けられている割合が「0%」、ID22に対応付けられている割合が「10%」、ID23に対応付けられている割合が「30%」であるため、加算結果は40%となる。ここで、閾値が例えば85%である場合、加算結果は40%であって閾値未満であるため、上位層の矩形R20については、ID20に対応付けて格納されている割合を0%に置換する。
When the CPU 102 finishes the process of step SA9, it determines whether or not the identified graphic part is a table based on the ratio associated with the labels in the list 300 (step SA10). That is, the CPU 102 functions as a table area determination unit 206 that determines whether or not the graphic part is a table.
Specifically, the CPU 102 first adds the ratio of the rectangular area to the lower rectangle, and if the addition result is less than a predetermined threshold, the CPU 102 sets the ratio stored in association with the upper rectangle to 0. Replace with%.
For example, for the rectangles R21 to R23 which are lower-layer rectangles with respect to the rectangle R20, the ratio associated with ID21 is “0%”, the ratio associated with ID22 is “10%”, and ID23. Since the associated ratio is “30%”, the addition result is 40%. Here, when the threshold value is 85%, for example, the addition result is 40% and is less than the threshold value. Therefore, for the upper layer rectangle R20, the ratio stored in association with ID20 is replaced with 0%. .

次に、ID341とID342の矩形については、ID341に対応付けられている割合が「80%」、ID342に対応付けられている割合が「20%」であり、加算結果が閾値以上となるため、上位層となる矩形R34のラベルであるID34については、対応づけられている割合を0%に置換せず、そのままとする。
なお、ラベルがID361とID362の矩形についても、「?」が対応づけられていないため、上位層となる矩形R36のラベルであるID36については、対応づけられている割合を0%に置換せず、そのままとする。
また、矩形R31〜R37の矩形については、ID31〜ID37に対応づけられている割合を加算すると加算結果は「65%」となる。ここで、加算結果は65%であって閾値未満であるため、上位層の矩形R30のラベルであるID30については、対応付けて格納されている割合を0%に置換する。
なお、ID481,ID482,ID41〜ID49の矩形については、「?」が対応付けられていないため、ID41〜ID49およびID40に対応付けられている割合が0%に置換されることがない。
Next, for the rectangles of ID 341 and ID 342, the ratio associated with ID 341 is “80%”, the ratio associated with ID 342 is “20%”, and the addition result is equal to or greater than the threshold value. The ID 34 that is the label of the upper-layer rectangle R 34 is left as it is without replacing the associated ratio with 0%.
In addition, since “?” Is not associated with the rectangles whose labels are ID361 and ID362, the associated ratio is not replaced with 0% for ID36 which is the label of the rectangle R36 as the upper layer. Leave it as it is.
For the rectangles R31 to R37, the addition result is “65%” when the proportions associated with ID31 to ID37 are added. Here, since the addition result is 65% which is less than the threshold value, the ratio stored in association with ID30 which is the label of the upper layer rectangle R30 is replaced with 0%.
In addition, since “?” Is not associated with the rectangles of ID481, ID482, ID41 to ID49, the ratio associated with ID41 to ID49 and ID40 is not replaced with 0%.

次にCPU102は、矩形R10,R20,R30,R40のラベルに対応付けられた割合「25%」、「0%」、「0%」、「25%」を加算する。ここで、加算結果は50%となり、加算結果が閾値未満であるため、画像G10については表ではないと判定する。CPU102は、判定結果を得ると、表示部107を制御して判定結果を表示部107に表示させる。   Next, the CPU 102 adds the ratios “25%”, “0%”, “0%”, and “25%” associated with the labels of the rectangles R10, R20, R30, and R40. Here, the addition result is 50%, and since the addition result is less than the threshold value, it is determined that the image G10 is not a table. When the CPU 102 obtains the determination result, the CPU 102 controls the display unit 107 to display the determination result on the display unit 107.

(画像を表であると判定する場合の動作)
次に、二値化画像の図形部分を表であると判定する場合の動作について説明する。なお、本動作例においては、図11に示した二値化画像が得られた場合を例に動作の説明を行う。
(Operation when determining that an image is a table)
Next, the operation when it is determined that the graphic portion of the binarized image is a table will be described. In this operation example, the operation will be described by taking as an example the case where the binarized image shown in FIG. 11 is obtained.

まず、本動作例においては、画像データを取得してから二値化画像中の線分同士の交差関係を判定するまでは、上述の動作例と同じ動作を行う。CPU102は、ステップSA1からステップSA5までの処理が終了すると、線分テーブルTB10に格納されている情報を用いて、図形部分において複数行または複数列で矩形がある部分を特定し(ステップSA6)、特定した矩形間の関係を表すリスト300を生成する(ステップSA7)。   First, in the present operation example, the same operation as the above-described operation example is performed from the time when image data is acquired until the intersection relationship between line segments in the binarized image is determined. When the processing from step SA1 to step SA5 is completed, the CPU 102 uses the information stored in the line segment table TB10 to specify a portion having a rectangle in a plurality of rows or a plurality of columns in the graphic portion (step SA6). A list 300 representing the relationship between the specified rectangles is generated (step SA7).

例えば、図11に示した画像G11の場合、図12に示したように、矩形R50、矩形R60、矩形R70および矩形R80が、複数行で矩形がある部分として特定される。そして、CPU102は、各矩形に対してID50,ID60,ID70,ID80というラベルを付ける。また、矩形R50、矩形R60、矩形R70および矩形R80の下位の矩形についてもラベルを付け、図13に示したように各ラベルを付けたリスト300を作成する。   For example, in the case of the image G11 shown in FIG. 11, as shown in FIG. 12, the rectangle R50, the rectangle R60, the rectangle R70, and the rectangle R80 are specified as a portion having a rectangle in a plurality of lines. Then, the CPU 102 labels each rectangle as ID50, ID60, ID70, and ID80. Also, labels are attached to the lower rectangles of the rectangle R50, the rectangle R60, the rectangle R70, and the rectangle R80, and a list 300 with each label is created as shown in FIG.

次にCPU102は、ラベルが付けられた各矩形の面積について上位の矩形の面積に占める割合を算出し、算出した割合をリスト300にあるラベルに対応付ける(ステップSA8)。例えば、矩形R50,R60,R70,R80の各面積が等しい場合、
図形識別子として「1」が付けられた画像G11の面積に占める各矩形の面積の割合は、各々25%となるため、CPU102は、図13に示したように「25%」をリスト中のID50,ID60,ID70,ID80に対応付ける。なお、他のラベルが付けられた矩形についても同様に面積の割合を求めると、図11に示した画像の場合、図13に示したように各矩形の面積の割合がラベルに対応付けられる。
Next, the CPU 102 calculates the ratio of the area of each rectangle with a label to the area of the upper rectangle, and associates the calculated ratio with the label in the list 300 (step SA8). For example, when the areas of the rectangles R50, R60, R70, R80 are equal,
Since the ratio of the area of each rectangle occupying the area of the image G11 with “1” as the graphic identifier is 25%, the CPU 102 sets “25%” to ID 50 in the list as shown in FIG. , ID60, ID70, ID80. In addition, when the ratio of the area is similarly obtained for rectangles with other labels, in the case of the image shown in FIG. 11, the ratio of the area of each rectangle is associated with the label as shown in FIG.

次にCPU102は、図13のリストにおいて「?」に対応付けられているラベルを特定し、特定したラベルに対応付けられている割合を0%に置換する処理を行う(ステップSA9)。なお、図11に示した画像の場合、図13のリストが作成されて「?」が対応付けられているラベルが無いため、いずれのラベルにおいても、対応付けられている面積の割合が0%に置換されることがない。   Next, the CPU 102 identifies a label associated with “?” In the list of FIG. 13, and performs processing to replace the ratio associated with the identified label with 0% (step SA9). In the case of the image shown in FIG. 11, since the list of FIG. 13 is created and there is no label associated with “?”, The proportion of the area associated with any label is 0%. Will not be replaced.

次にCPU102は、リスト300にあるラベルに対応付けられた割合に基づいて、特定した図形部分が表であるか否か判定する(ステップSA10)。ここでCPU102が、矩形R50,R60,R70,R80のラベルに対応付けられた割合「25%」、「25%」、「25%」、「25%」を加算すると、加算結果は100%となる。ここで加算結果が閾値以上であるため、CPU102は、画像G11については表であると判定する。CPU102は、判定結果を得ると、表示部107を制御して判定結果を表示部107に表示させる。
以上説明したように本実施形態によれば、グラフのように表ではない領域は表と認識しないため、表の認識率を高めることができる。
Next, the CPU 102 determines whether or not the identified graphic part is a table based on the ratio associated with the label in the list 300 (step SA10). When the CPU 102 adds the ratios “25%”, “25%”, “25%”, and “25%” associated with the labels of the rectangles R50, R60, R70, and R80, the addition result is 100%. Become. Here, since the addition result is equal to or greater than the threshold value, the CPU 102 determines that the image G11 is a table. When the CPU 102 obtains the determination result, the CPU 102 controls the display unit 107 to display the determination result on the display unit 107.
As described above, according to the present embodiment, an area that is not a table as in the graph is not recognized as a table, so that the recognition rate of the table can be increased.

[変形例]
以上、本発明の実施形態について説明したが、本発明は上述した実施形態に限定されることなく、他の様々な形態で実施可能である。例えば、上述の実施形態を以下のように変形して本発明を実施してもよい。なお、上述した実施形態及び以下の変形例は、各々を組み合わせてもよい。
[Modification]
As mentioned above, although embodiment of this invention was described, this invention is not limited to embodiment mentioned above, It can implement with another various form. For example, the present invention may be implemented by modifying the above-described embodiment as follows. In addition, you may combine each of embodiment mentioned above and the following modifications.

画像処理プログラムを実行したCPU102は、図14に示したように外枠が矩形でない図形の場合、複数行で矩形がある部分として矩形R101、矩形R102、矩形R103および矩形R104を特定して各矩形に対してID101〜ID104というラベルを付けると共に、複数列で矩形がある部分として、矩形R105と矩形R106を特定してID105、ID106というラベルを付け、図15に示したリスト300を作成してもよい。なお、図15に示したリスト300は、矩形の面積の割合を対応付ける前の状態のリストを示した図である。   When the outer frame is a non-rectangular figure as shown in FIG. 14, the CPU 102 that has executed the image processing program identifies the rectangle R101, the rectangle R102, the rectangle R103, and the rectangle R104 as a portion having a rectangle in a plurality of lines, and sets each rectangle. Even if ID101 to ID104 are labeled, the rectangle R105 and the rectangle R106 are specified as a portion having a rectangle in a plurality of columns, ID105 and ID106 are labeled, and the list 300 shown in FIG. 15 is created. Good. The list 300 shown in FIG. 15 is a diagram showing a list of states before associating the proportion of the rectangular area.

また、画像処理プログラムを実行したCPU102は、図16に示したように外枠が矩形でない画像の場合、複数行で矩形がある部分として、矩形R201および矩形R202の部分と、矩形R203および矩形R204の部分と、矩形R205および矩形R206の部分とを特定するようにしてもよい。そして、矩形R201,R202に対してID201,ID202、矩形R203,R204に対してID203,ID204、矩形R205,R206に対してID205,ID206というラベルを付け、図17に示したリスト300を作成してもよい。なお、図17に示したリスト300は、矩形の面積の割合を対応付ける前の状態のリストを示した図である。   In addition, in the case where the outer frame is not a rectangle as shown in FIG. 16, the CPU 102 that has executed the image processing program has a rectangle R201 and a rectangle R202, a rectangle R203 and a rectangle R204 as a portion having a rectangle in a plurality of lines. And the portions of the rectangle R205 and the rectangle R206 may be specified. The labels R201 and R202 are labeled ID201 and ID202, the rectangles R203 and R204 are labeled ID203 and ID204, the rectangles R205 and R206 are labeled ID205 and ID206, and the list 300 shown in FIG. 17 is created. Also good. Note that the list 300 shown in FIG. 17 is a diagram showing a list of states before associating the proportions of rectangular areas.

また、画像処理プログラムを実行したCPU102は、図18に示したように矩形の内側の角部にさらに矩形がある図形の場合、複数行で矩形がある部分として、矩形R301〜R304を特定し、矩形R304の内側において、矩形R3041と矩形R3042を特定してもよい。
そして、矩形R301〜R304に対してID301〜ID304というラベルを付け、さらに矩形R3041,R3042に対してID3041,ID3042というラベルを付け、図19に示したリスト300を作成してもよい。なお、図19に示したリスト300は、矩形の面積の割合を対応付ける前の状態のリストを示した図である。
Further, the CPU 102 that has executed the image processing program specifies the rectangles R301 to R304 as a portion having a rectangle in a plurality of lines in the case of a figure having a rectangle at the corners inside the rectangle as shown in FIG. The rectangle R3041 and the rectangle R3042 may be specified inside the rectangle R304.
Then, the labels R301 to R304 may be labeled ID301 to ID304, the rectangles R3041 and R3042 may be labeled ID3041 and ID3042, and the list 300 illustrated in FIG. 19 may be created. The list 300 shown in FIG. 19 is a diagram showing a list of states before associating the proportions of rectangular areas.

本発明においては、独立矩形の面積が画像中に占める割合を算定し、算定した割合が予め定められた閾値以上である場合には、画像が表ではないと判定するようにしてもよい。
また、本発明においては、独立矩形を内側に含む矩形の面積が画像中に占める割合を算定し、算定した割合が予め定められた閾値以上である場合には、画像が表ではないと判定するようにしてもよい。
In the present invention, the ratio of the area of the independent rectangle in the image may be calculated, and when the calculated ratio is equal to or greater than a predetermined threshold, it may be determined that the image is not a table.
In the present invention, the ratio of the area of the rectangle including the independent rectangle to the inside of the image is calculated, and when the calculated ratio is equal to or greater than a predetermined threshold, it is determined that the image is not a table. You may do it.

上述した実施形態においては、操作部106を操作することにより、ユーザが閾値を設定できるようにしてもよい。
また、閾値を複数設定可能とし、ユーザが複数の閾値のいずれかから閾値を選択するようにしてもよい。例えば、2つの閾値を設定可能とし、一方の閾値を例えば95%とし、他方の閾値を50%というように、2つの閾値の値を異ならせてもよい。
また、閾値を設定する場合、表の画像とグラフの画像とを複数準備し、これらの画像に対しての判定結果からWidrow-Hoffの学習規則やフィッシャーの判別分析などの学習方法により、表であるか否かを判定する際の閾値を設定するようにしてもよい。
In the above-described embodiment, the threshold value may be set by the user by operating the operation unit 106.
Further, a plurality of threshold values may be set, and the user may select a threshold value from any one of a plurality of threshold values. For example, the two threshold values may be set so that one threshold value is, for example, 95% and the other threshold value is 50%.
Also, when setting the threshold, prepare multiple images of the table and graph, and use the learning results such as Widrow-Hoff learning rules and Fisher discriminant analysis based on the determination results for these images. You may make it set the threshold value at the time of determining whether it exists.

上述した実施形態においては、CPU102が画像処理プログラムを実行することにより、CPU102が画像データを処理し、画像データ中の表の領域を特定しているが、画像データの画像に上述した画像処理を施す構成は、この構成に限定されるものではない。例えば、上述した処理を行うDSP(Digital Signal Processor)やプログラマブルロジックデバイスなどのハードウェアをバス101に接続し、画像データを、このハードウェアに供給することにより、ハードウェアで上述した処理を行うようにしてもよい。   In the above-described embodiment, the CPU 102 executes the image processing program so that the CPU 102 processes the image data and identifies the table area in the image data. However, the image processing described above is performed on the image of the image data. The configuration to be applied is not limited to this configuration. For example, a hardware such as a DSP (Digital Signal Processor) or a programmable logic device that performs the above-described processing is connected to the bus 101, and image data is supplied to the hardware so that the above-described processing is performed by the hardware. It may be.

上述した画像処理プログラムは、磁気記録媒体(磁気テープ、磁気ディスク(HDD(Hard Disk Drive)、FD(Flexible Disk))など)、光記録媒体(光ディスク(CD(Compact Disc)、DVD(Digital Versatile Disk))など)、光磁気記録媒体、半導体メモリなどのコンピュータ読取り可能な記録媒体に記憶した状態で提供し、コンピュータ装置1にインストールしてもよい。また、通信回線を介してダウンロードしてインストールしてもよい。   The above-described image processing program includes a magnetic recording medium (magnetic tape, magnetic disk (HDD (Hard Disk Drive), FD (Flexible Disk), etc.)), optical recording medium (optical disc (CD (Compact Disc)), DVD (Digital Versatile Disk). )), Etc.) may be provided in a state of being stored in a computer-readable recording medium such as a magneto-optical recording medium or a semiconductor memory and installed in the computer apparatus 1. Alternatively, it may be downloaded and installed via a communication line.

上述した実施形態においては、PCが画像処理プログラムを実行しているが、PC以外のコンピュータ装置が画像処理プログラムを実行してもよく、例えば、複写機能やスキャナの機能を有する画像形成装置が画像処理プログラムを実行し、上述した処理を画像形成装置が行うようにしてもよい。   In the embodiment described above, the PC executes the image processing program. However, a computer device other than the PC may execute the image processing program. For example, an image forming apparatus having a copying function or a scanner function may be used as an image. The image forming apparatus may execute the processing described above by executing a processing program.

1・・・コンピュータ装置、101・・・バス、102・・・CPU、103・・・ROM、104・・・RAM、105・・・記憶部、106・・・操作部、107・・・表示部、108・・・画像取得部、200・・・二値化部、201・・・図形特定部、202・・・線分特定部、203・・・交差判定部、204・・・構造特定部、205・・・リスト作成部、206・・・表領域判定部 DESCRIPTION OF SYMBOLS 1 ... Computer apparatus, 101 ... Bus, 102 ... CPU, 103 ... ROM, 104 ... RAM, 105 ... Memory | storage part, 106 ... Operation part, 107 ... Display 108: Image acquisition unit, 200: Binarization unit, 201 ... Graphic identification unit, 202 ... Line segment identification unit, 203 ... Intersection determination unit, 204 ... Structure identification , 205... List creation unit, 206... Table area determination unit

Claims (5)

画像を二値で表した二値化画像を取得する取得手段と、
前記取得手段で取得された二値化画像中の図形部分を特定する図形特定手段と、
前記図形特定手段で特定された部分にある線分を特定する線分特定手段と、
前記線分特定手段で特定された各線分の交差関係を判定する交差判定手段と、
前記線分特定手段で特定された線分と、前記交差判定手段で判定された交差関係とにより、矩形が複数行または複数列で並んだセル構造と、該セル構造を構成せずに独立した独立矩形を特定する構造特定手段と、
前記構造特定手段で特定された前記独立矩形に基づいて前記図形特定手段で特定された図形部分が表領域であるか否かを判定する手段であって、前記構造特定手段で特定されたセル構造を構成する矩形のうち、前記構造特定手段で特定された独立矩形が内側にある矩形以外の矩形について、該矩形の面積が前記セル構造の面積において占める割合を算定し、該算定した割合に基づいて、前記図形特定手段で特定された図形部分が表領域であるか否かを判定する表領域判定手段と
を有する画像処理装置。
Acquisition means for acquiring a binarized image representing a binary image;
Graphic specifying means for specifying a graphic part in the binarized image acquired by the acquiring means;
Line segment specifying means for specifying a line segment in a part specified by the graphic specifying means;
Intersection determination means for determining the intersection relationship of each line segment specified by the line segment specifying means;
A cell structure in which rectangles are arranged in a plurality of rows or columns by the line segment specified by the line segment specifying unit and the crossing relationship determined by the crossing determining unit, and independent without constituting the cell structure A structure specifying means for specifying an independent rectangle;
The identified geometric portion in the previous SL diagram form specifying means based on the independent rectangular identified a means for determining whether the tablespace by the structural identification means, identified in the structural specification means Of the rectangles constituting the cell structure, for the rectangles other than the rectangle with the independent rectangle specified by the structure specifying means inside, the ratio of the area of the rectangle to the area of the cell structure is calculated, and the calculated ratio An image processing apparatus comprising: a table area determining unit that determines whether or not the graphic part specified by the graphic specifying unit is a table area .
前記構造特定手段は、特定したセル構造を構成する矩形の内部についてさらに前記セル構造を特定することを特徴とする請求項1に記載の画像処理装置。 The image processing apparatus according to claim 1, wherein the structure specifying unit further specifies the cell structure with respect to an inside of a rectangle constituting the specified cell structure. 前記セル構造は、1行n列またはn行1列(n≧2)で矩形が並んだ構造であることを特徴とする請求項1または請求項2に記載の画像処理装置。 The cell structure, the image processing apparatus according to claim 1 or claim 2, wherein the rectangle on one line n columns or n rows and one column (n ≧ 2) is a structure aligned. 前記構造特定手段は、特定したセル構造を構成する矩形について、該矩形の角部の内側にある前記セル構造を特定することを特徴とする請求項または請求項に記載の画像処理装置。 The structure identification means, for rectangles constituting the identified cell structure, the image processing apparatus according to claim 2 or claim 3, characterized in that identifying the cell structure on the inside of the corners of the rectangle. コンピュータを、
画像を二値で表した二値化画像を取得する取得手段と、
前記取得手段で取得された二値化画像中の図形部分を特定する図形特定手段と、
前記図形特定手段で特定された部分にある線分を特定する線分特定手段と、
前記線分特定手段で特定された各線分の交差関係を判定する交差判定手段と、
前記線分特定手段で特定された線分と、前記交差判定手段で判定された交差関係とにより、矩形が複数行または複数列で並んだセル構造と、該セル構造を構成せずに独立した独立矩形を特定する構造特定手段と、
前記構造特定手段で特定された前記独立矩形に基づいて前記図形特定手段で特定された図形部分が表領域であるか否かを判定する手段であって、前記構造特定手段で特定されたセル構造を構成する矩形のうち、前記構造特定手段で特定された独立矩形が内側にある矩形以外の矩形について、該矩形の面積が前記セル構造の面積において占める割合を算定し、該算定した割合に基づいて、前記図形特定手段で特定された図形部分が表領域であるか否かを判定する表領域判定手段
として機能させるためのプログラム。
Computer
Acquisition means for acquiring a binarized image representing a binary image;
Graphic specifying means for specifying a graphic part in the binarized image acquired by the acquiring means;
Line segment specifying means for specifying a line segment in a part specified by the graphic specifying means;
Intersection determination means for determining the intersection relationship of each line segment specified by the line segment specifying means;
A cell structure in which rectangles are arranged in a plurality of rows or columns by the line segment specified by the line segment specifying unit and the crossing relationship determined by the crossing determining unit, and independent without constituting the cell structure A structure specifying means for specifying an independent rectangle;
The identified geometric portion in the previous SL diagram form specifying means based on the independent rectangular identified a means for determining whether the tablespace by the structural identification means, identified in the structural specification means Of the rectangles constituting the cell structure, for the rectangles other than the rectangle with the independent rectangle specified by the structure specifying means inside, the ratio of the area of the rectangle to the area of the cell structure is calculated, and the calculated ratio A program for functioning as a table area determination means for determining whether or not the graphic part specified by the graphic specification means is a table area .
JP2009193243A 2009-08-24 2009-08-24 Image processing apparatus and program Expired - Fee Related JP5418064B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009193243A JP5418064B2 (en) 2009-08-24 2009-08-24 Image processing apparatus and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009193243A JP5418064B2 (en) 2009-08-24 2009-08-24 Image processing apparatus and program

Publications (2)

Publication Number Publication Date
JP2011044089A JP2011044089A (en) 2011-03-03
JP5418064B2 true JP5418064B2 (en) 2014-02-19

Family

ID=43831461

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009193243A Expired - Fee Related JP5418064B2 (en) 2009-08-24 2009-08-24 Image processing apparatus and program

Country Status (1)

Country Link
JP (1) JP5418064B2 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02252078A (en) * 1989-03-25 1990-10-09 Sony Corp Method for identifying area of document
JP3420864B2 (en) * 1995-08-09 2003-06-30 富士通株式会社 Frame extraction device and rectangle extraction device
JPH09319878A (en) * 1996-05-29 1997-12-12 Fuji Xerox Co Ltd Image discrimination device

Also Published As

Publication number Publication date
JP2011044089A (en) 2011-03-03

Similar Documents

Publication Publication Date Title
JP4361080B2 (en) Method, program, and apparatus for generating image data
JP2005292975A (en) Button processing method and data processor
JP2012022632A (en) Information processing apparatus and control method thereof
KR20060029502A (en) Method for displaying the state of data process
JP6206202B2 (en) Information processing apparatus and information processing program
JP2009098883A (en) Information processor and information processing program
JP2012194879A (en) Information processing apparatus, information processing method and program
JP5418064B2 (en) Image processing apparatus and program
JP5267364B2 (en) Image processing apparatus and program
CN108509112B (en) Menu display method and device, display equipment and storage medium
JP5870839B2 (en) Information processing apparatus and information processing program
JP2008042545A (en) Image processing apparatus and its program
JP2004102320A (en) Business forms processing device and method, and program for executing method in computer
JP2018137509A (en) Image processing device, image reading device, and program
JP5325744B2 (en) Image processing apparatus and image processing program
JP3602061B2 (en) Three-dimensional graphics display device and method
JP2012044478A (en) Image processing device, method and program for image processing
JP6752311B2 (en) Display device and display method
JP2018010691A (en) Display device and display method
JP4890425B2 (en) Method and program for creating mask image for manga frame image
JP2010140435A (en) Information processor, display control method and program
JP2011018997A (en) Image processing apparatus, and program
JP2008092250A (en) Image processing system and image processing program
JP2008090449A (en) Image processing system and image processing program
JP5591092B2 (en) Display control apparatus, display control method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120719

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130603

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130625

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130812

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20131104

R150 Certificate of patent or registration of utility model

Ref document number: 5418064

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees