Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP4829757B2 - Ruled line extraction apparatus and method - Google Patents
[go: Go Back, main page]

JP4829757B2 - Ruled line extraction apparatus and method - Google Patents

Ruled line extraction apparatus and method Download PDF

Info

Publication number
JP4829757B2
JP4829757B2 JP2006323625A JP2006323625A JP4829757B2 JP 4829757 B2 JP4829757 B2 JP 4829757B2 JP 2006323625 A JP2006323625 A JP 2006323625A JP 2006323625 A JP2006323625 A JP 2006323625A JP 4829757 B2 JP4829757 B2 JP 4829757B2
Authority
JP
Japan
Prior art keywords
saturation
ruled line
image
gray image
lightness
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
JP2006323625A
Other languages
Japanese (ja)
Other versions
JP2008139967A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2006323625A priority Critical patent/JP4829757B2/en
Publication of JP2008139967A publication Critical patent/JP2008139967A/en
Application granted granted Critical
Publication of JP4829757B2 publication Critical patent/JP4829757B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Character Input (AREA)
  • Image Analysis (AREA)

Description

本発明は、カラー画像から罫線を抽出する装置および方法に関する。   The present invention relates to an apparatus and method for extracting ruled lines from a color image.

図11は、カラー画像を入力として画像内に配置された罫線を抽出する、従来の罫線抽出処理のフローチャートである。この罫線抽出処理では、まず、入力されたカラー画像から明度グレー画像を生成し、その明度グレー画像を二値化する(ステップ11)。そして、得られた二値画像から、罫線とそれに囲まれたセルを抽出する(ステップ12)。これにより、背景と明度差のある罫線を抽出することができる。明度グレー画像は、いわゆるグレースケール画像に相当する。   FIG. 11 is a flowchart of a conventional ruled line extraction process that extracts a ruled line arranged in an image using a color image as an input. In this ruled line extraction process, first, a lightness gray image is generated from the input color image, and the lightness gray image is binarized (step 11). Then, a ruled line and cells surrounded by the ruled line are extracted from the obtained binary image (step 12). Thereby, a ruled line having a brightness difference from the background can be extracted. The lightness gray image corresponds to a so-called gray scale image.

また、背景と罫線の濃度差が小さい画像から罫線を抽出する方法として、多値画像を2種類の異なる方法で二値化する方法が知られている(例えば、下記の特許文献1を参照)。この方法では、一方の潰れ気味の二値画像を用いて罫線候補領域を抽出し、もう一方の掠れ気味の二値画像を用いて罫線候補領域を検証することで、罫線をより正確に抽出することができる。   Further, as a method of extracting ruled lines from an image having a small density difference between the background and the ruled lines, a method of binarizing a multi-valued image by two different methods is known (see, for example, Patent Document 1 below). . In this method, a ruled line candidate region is extracted using one squashed binary image, and a ruled line candidate region is verified using the other shrunken binary image to more accurately extract a ruled line. be able to.

先願であるPCT/JP2006/302763は、カラー画像の領域色を認識するために彩度補正を行う方法に関する。
特開2002−133426号公報
Prior application PCT / JP2006 / 302763 relates to a method of performing saturation correction in order to recognize a region color of a color image.
JP 2002-133426 A

上述した従来の罫線抽出方法には、次のような問題がある。
図11の罫線抽出処理では、背景と罫線の明度の差が小さい場合は、罫線および背景ともに二値化により白となってしまい、罫線を抽出することができない。例えば、図12に示すように、薄い色のセル同士が明示的な境界線で区別されずに、色の変化により区別されている場合がある。以下では、このようなセル間の境界を、境界罫線と呼ぶことする。このような境界罫線を含むカラー画像が入力された場合、両方のセルが二値化により白となってしまい、罫線を抽出することができない。
The conventional ruled line extraction method described above has the following problems.
In the ruled line extraction process of FIG. 11, when the difference in brightness between the background and the ruled line is small, both the ruled line and the background become white due to binarization, and the ruled line cannot be extracted. For example, as shown in FIG. 12, light-colored cells may not be distinguished by an explicit boundary line but may be distinguished by a color change. Hereinafter, such a boundary between cells is referred to as a boundary ruled line. When a color image including such a boundary ruled line is input, both cells become white due to binarization, and the ruled line cannot be extracted.

また、図13に示すカラー画像21が入力された場合、まず、明度グレー画像22が生成され、次に、明度グレー画像22から二値画像23が生成される(ステップ11)。そして、二値画像23から罫線およびセルが抽出され、抽出結果24が得られる(ステップ12)。ところが、抽出結果24には、カラー画像21に含まれていた境界罫線が含まれていない。   When the color image 21 shown in FIG. 13 is input, a lightness gray image 22 is first generated, and then a binary image 23 is generated from the lightness gray image 22 (step 11). Then, ruled lines and cells are extracted from the binary image 23, and an extraction result 24 is obtained (step 12). However, the extraction result 24 does not include the boundary ruled line included in the color image 21.

特許文献1の罫線抽出方法では、明度グレー画像のみから潰れ気味の二値画像と掠れ気味の二値画像を生成しているため、明度が同一で彩度が異なるようなカラー画像からは、罫線が適切に抽出できないという問題がある。   In the ruled line extraction method of Patent Document 1, since a squashed binary image and a blurred binary image are generated from only a lightness gray image, a ruled line is obtained from a color image having the same lightness but different saturation. There is a problem that cannot be extracted properly.

本発明の課題は、薄い色のセル間における境界罫線のように、背景と罫線の明度差が小さいカラー画像から罫線を抽出することである。   An object of the present invention is to extract a ruled line from a color image having a small difference in brightness between the background and the ruled line, such as a boundary ruled line between light-colored cells.

図1は、本発明の罫線抽出装置の原理図である。図1の罫線抽出装置は、格納手段101、第1の生成手段102、第2の生成手段104、第1の抽出手段103、第2の抽出手段105、および出力手段106を備える。   FIG. 1 is a principle diagram of the ruled line extraction apparatus of the present invention. The ruled line extraction apparatus in FIG. 1 includes a storage unit 101, a first generation unit 102, a second generation unit 104, a first extraction unit 103, a second extraction unit 105, and an output unit 106.

格納手段101は、カラー画像111を格納する。生成手段102は、カラー画像111から明度グレー画像112を生成して、格納手段101に格納する。抽出手段103は、明度グレー画像112を用いて第1の罫線を抽出する。生成手段104は、第1の罫線により囲まれたセル領域の彩度グレー画像113を生成して、格納手段101に格納する。抽出手段105は、彩度グレー画像113を用いて第2の罫線を抽出する。出力手段106は、第1および第2の罫線の情報を出力する。   The storage unit 101 stores a color image 111. The generation unit 102 generates a lightness gray image 112 from the color image 111 and stores it in the storage unit 101. The extraction unit 103 extracts the first ruled line using the lightness gray image 112. The generation unit 104 generates a saturation gray image 113 of the cell region surrounded by the first ruled line, and stores it in the storage unit 101. The extraction unit 105 extracts the second ruled line using the saturation gray image 113. The output means 106 outputs information on the first and second ruled lines.

生成手段102は、格納手段101からカラー画像111を取り出し、その色情報を用いて明度グレー画像112を生成する。抽出手段103は、格納手段101から明度グレー画像112を取り出し、その明度情報を用いて第1の罫線を抽出して、その情報を出力手段106に転送する。   The generation unit 102 extracts the color image 111 from the storage unit 101 and generates a lightness gray image 112 using the color information. The extraction unit 103 extracts the lightness gray image 112 from the storage unit 101, extracts a first ruled line using the lightness information, and transfers the information to the output unit 106.

生成手段104は、第1の罫線により囲まれたセル領域の色情報を用いて彩度グレー画像113を生成する。抽出手段105は、格納手段101から彩度グレー画像113を取り出し、その彩度情報を用いて第2の罫線を抽出して、その情報を出力手段106に転送する。出力手段106は、受け取った第1および第2の罫線の情報を出力する。   The generation unit 104 generates the saturation gray image 113 using the color information of the cell region surrounded by the first ruled line. The extraction unit 105 extracts the saturation gray image 113 from the storage unit 101, extracts the second ruled line using the saturation information, and transfers the information to the output unit 106. The output means 106 outputs the received first and second ruled line information.

格納手段101は、例えば、後述する図9のメモリ902に対応し、生成手段102、103および抽出手段104、105は、例えば、CPU(中央処理装置)901に対応する。出力手段106は、例えば、出力装置904に対応する。   The storage unit 101 corresponds to, for example, a memory 902 in FIG. 9 described later, and the generation units 102 and 103 and the extraction units 104 and 105 correspond to, for example, a CPU (central processing unit) 901. The output unit 106 corresponds to the output device 904, for example.

本発明によれば、明度グレー画像を用いた罫線抽出処理と、彩度グレー画像を用いた罫線抽出処理を組み合わせて用いることにより、従来技術では抽出が困難であった、背景との明度差が小さい罫線を、適切に抽出することが可能になる。   According to the present invention, by using a combination of ruled line extraction processing using a lightness gray image and ruled line extraction processing using a saturation gray image, the brightness difference from the background, which has been difficult to extract by the conventional technology, is improved. A small ruled line can be appropriately extracted.

以下、図面を参照しながら、本発明を実施するための最良の形態を詳細に説明する。
本実施形態では、明度グレー画像を用いた罫線抽出処理と、彩度グレー画像を用いた罫線抽出処理に加えて、さらに彩度補正画像を用いた罫線抽出処理を組み合わせて用いる。これにより、背景との明度差が小さい罫線を、より精密に抽出することが可能になる。
The best mode for carrying out the present invention will be described below in detail with reference to the drawings.
In the present embodiment, in addition to the ruled line extraction process using the lightness gray image and the ruled line extraction process using the saturation gray image, the ruled line extraction process using the saturation correction image is further used in combination. Thereby, it becomes possible to extract a ruled line with a small brightness difference from the background more precisely.

図2は、このような罫線抽出処理のフローチャートである。罫線抽出装置は、まず、スキャナ等により入力されたカラー画像から明度グレー画像を生成し、その明度グレー画像を二値化して、二値画像を生成する(ステップ201)。そして、その二値画像から、罫線とそれに囲まれたセルを抽出する(ステップ202)。背景と罫線にある程度の明度差がある場合は、この処理により罫線が抽出される。   FIG. 2 is a flowchart of such ruled line extraction processing. The ruled line extraction device first generates a lightness gray image from a color image input by a scanner or the like, binarizes the lightness gray image, and generates a binary image (step 201). Then, a ruled line and a cell surrounded by the ruled line are extracted from the binary image (step 202). When there is a certain brightness difference between the background and the ruled line, the ruled line is extracted by this processing.

次に、ステップ202で抽出された各セルの領域を対象として、彩度グレー画像を生成し、その彩度グレー画像を二値化して、二値画像を生成する(ステップ203)。そして、その二値画像から、罫線とそれに囲まれたセルを抽出する(ステップ204)。背景と罫線に明度差はないが彩度差がある場合は、この処理により罫線が抽出される。   Next, a saturation gray image is generated for each cell area extracted in step 202, and the saturation gray image is binarized to generate a binary image (step 203). Then, a ruled line and a cell surrounded by the ruled line are extracted from the binary image (step 204). When there is no brightness difference between the background and the ruled line but there is a chroma difference, the ruled line is extracted by this processing.

次に、すべてのセルの処理が終了したか否かをチェックし(ステップ205)、未処理のセルがあれば、ステップ203およびステップ204の処理を繰り返す。
すべてのセルの処理が終了すると、次に、ステップ204で抽出された各セルの領域を対象として、彩度補正画像を生成し、その彩度補正画像を二値化して、二値画像を生成する(ステップ206)。そして、その二値画像から、罫線とそれに囲まれたセルを抽出する(ステップ207)。ただし、ステップ204で罫線およびセルが抽出されなかったセルについては、ステップ202で抽出されたセルの領域を対象として処理が行われる。
Next, it is checked whether or not the processing of all cells has been completed (step 205). If there is an unprocessed cell, the processing of step 203 and step 204 is repeated.
When all the cells have been processed, a saturation correction image is generated for each cell region extracted in step 204, and the saturation correction image is binarized to generate a binary image. (Step 206). Then, a ruled line and a cell surrounded by the ruled line are extracted from the binary image (step 207). However, for the cells for which the ruled lines and the cells are not extracted in step 204, the process is performed on the cell area extracted in step 202.

背景と罫線の明度差および彩度差がともに小さいが、色相が異なる場合は、彩度を適切に補正することで、色相差を明確に認識することが可能になる。したがって、この処理により罫線が抽出される。   Although the brightness difference and saturation difference between the background and the ruled line are both small, if the hue is different, the hue difference can be clearly recognized by appropriately correcting the saturation. Therefore, ruled lines are extracted by this processing.

次に、すべてのセルの処理が終了したか否かをチェックし(ステップ208)、未処理のセルがあれば、ステップ206およびステップ207の処理を繰り返す。そして、すべてのセルの処理が終了すると、罫線抽出処理を終了する。   Next, it is checked whether or not all the cells have been processed (step 208). If there is an unprocessed cell, the processing in step 206 and step 207 is repeated. When all the cells have been processed, the ruled line extraction process ends.

このように、異なる色属性に基づく二値画像を併用することにより、背景との明度差が小さい罫線を抽出することができる。なお、罫線抽出処理の目的に応じて、ステップ206〜208の処理を省略することも可能である。   In this way, ruled lines having a small brightness difference from the background can be extracted by using binary images based on different color attributes in combination. Depending on the purpose of the ruled line extraction process, the processes in steps 206 to 208 can be omitted.

図3は、明度差があるセル間の境界罫線の例を示している。カラー画像301には境界罫線が含まれており、色相グレー画像302および彩度グレー画像303では、その境界罫線が認識できないが、明度グレー画像304では、認識することができる。このような場合、ステップ202の処理により境界罫線が抽出される。   FIG. 3 shows an example of a boundary ruled line between cells having a brightness difference. The color image 301 includes boundary ruled lines. The hue gray image 302 and the saturation gray image 303 cannot recognize the boundary ruled lines, but the lightness gray image 304 can recognize them. In such a case, a boundary ruled line is extracted by the process of step 202.

図4は、彩度差があるセル間の境界罫線の例を示している。カラー画像401には境界罫線が含まれており、色相グレー画像402および明度グレー画像404では、その境界罫線が認識できないが、彩度グレー画像403では、認識することができる。このような場合、ステップ204の処理により境界罫線が抽出される。   FIG. 4 shows an example of a border ruled line between cells having a saturation difference. The color image 401 includes boundary ruled lines. The hue gray image 402 and the lightness gray image 404 cannot recognize the boundary ruled lines, but the saturation gray image 403 can recognize them. In such a case, a boundary ruled line is extracted by the process of step 204.

図5は、色相差があるセル間の境界罫線の例を示している。カラー画像501には境界罫線が含まれており、彩度グレー画像503および明度グレー画像504では、その境界罫線が認識できないが、色相グレー画像502では、認識することができる。このような場合、ステップ207の処理により境界罫線が抽出される。   FIG. 5 shows an example of a boundary ruled line between cells having a hue difference. The color image 501 includes boundary ruled lines. The saturation gray image 503 and the lightness gray image 504 cannot recognize the boundary ruled lines, but the hue gray image 502 can recognize them. In such a case, a boundary ruled line is extracted by the processing in step 207.

図2のステップ201では、次式により、カラー画像のRGB値を明度I(0≦I≦1)に変換することで、明度グレー画像が生成される。

I=0.299×R+0.587×G+0.114×B (1)

ステップ203では、各セル内に、従来の処理では抽出できない、明度差が小さい罫線が存在するか否かがチェックされる。まず、セル内の画素のRGB値が抽出され、次式により彩度S(0≦S≦21/2 )に変換される。
In step 201 in FIG. 2, a lightness gray image is generated by converting the RGB value of the color image into lightness I (0 ≦ I ≦ 1) by the following equation.

I = 0.299 × R + 0.587 × G + 0.114 × B (1)

In step 203, it is checked whether or not there is a ruled line with a small brightness difference that cannot be extracted by the conventional processing in each cell. First, the RGB values of the pixels in the cell are extracted and converted to saturation S (0 ≦ S ≦ 2 1/2 ) by the following equation.

次に、正規化により彩度Sが0〜255の離散値に変換され、その離散値を用いて彩度グレー画像が生成される。 Next, the saturation S is converted into a discrete value of 0 to 255 by normalization, and a saturation gray image is generated using the discrete value.

ステップ206では、例えば、先願のPCT/JP2006/302763に記載された彩度補正処理を用いて、カラー画像から各セルの彩度補正画像が生成される。この処理では、明度と彩度を座標値とする2次元空間において、無彩色と有彩色の境界線を閾値として、各画素の彩度を閾値と比較し、有彩色側では彩度を急激に大きくし、無彩色側では彩度を急激に小さくする演算を行う。   In step 206, for example, the saturation correction image of each cell is generated from the color image using the saturation correction processing described in PCT / JP2006 / 302763 of the prior application. In this process, in a two-dimensional space with brightness and saturation as coordinate values, the boundary line between an achromatic color and a chromatic color is used as a threshold value, and the saturation of each pixel is compared with the threshold value. The calculation is performed to increase the value and to decrease the saturation sharply on the achromatic side.

罫線抽出装置は、まず、彩度Sとあらかじめ設定された閾値αを比較する。この閾値αは明度Iに応じて設定されるため、彩度補正処理を行う際には、補正対象領域のカラー画像の情報が必要となる。   The ruled line extraction apparatus first compares the saturation S with a preset threshold value α. Since the threshold value α is set according to the lightness I, information on the color image of the correction target area is necessary when performing the saturation correction process.

次に、比較結果に応じて中間補正値S’を算出する。具体的には、彩度Sが閾値αより小さい場合には無彩色であると判定して、次式により中間補正値S’を算出する。

S’=(S−α)/α (5)

一方、彩度Sが閾値αより大きい場合には有彩色であると判定して、次式により中間補正値S’を算出する。

S’=(S−α)/(1−α) (6)

次に、算出された中間補正値S’を用いて、次式により補正後の彩度S”を算出する。
Next, an intermediate correction value S ′ is calculated according to the comparison result. Specifically, when the saturation S is smaller than the threshold value α, it is determined that the color is achromatic, and the intermediate correction value S ′ is calculated by the following equation.

S ′ = (S−α) / α (5)

On the other hand, when the saturation S is larger than the threshold value α, it is determined that the color is a chromatic color, and an intermediate correction value S ′ is calculated by the following equation.

S ′ = (S−α) / (1−α) (6)

Next, using the calculated intermediate correction value S ′, the corrected saturation S ″ is calculated by the following equation.

ここで、(7)式におけるAおよびBは、次式により算出される。

A=(eT −1)/(eT +1) (8)
B=1/(1+eT ) (9)

(8)式および(9)式におけるパラメータTは、例えば、T=10に設定される。
Here, A and B in the equation (7) are calculated by the following equations.

A = (e T −1) / (e T +1) (8)
B = 1 / (1 + e T ) (9)

The parameter T in the equations (8) and (9) is set to T = 10, for example.

図6は、補正前の彩度Sと補正後の彩度S”の関係を示している。グラフ610において、横軸は中間補正値S’を表し、縦軸は補正後の彩度S”を表す。中間補正値S’は、−1〜1の範囲の値をとり、補正後の彩度S”は、0〜1の範囲の値をとる。グラフ610の下の直線620は、補正前の彩度Sを表している。S’=−1はS=0に対応し、S’=1はS=1に対応している。   FIG. 6 shows the relationship between the saturation S ″ before correction and the saturation S ″ after correction. In the graph 610, the horizontal axis represents the intermediate correction value S ′, and the vertical axis represents the saturation S ″ after correction. Represents. The intermediate correction value S ′ takes a value in the range of −1 to 1, and the corrected saturation S ″ takes a value in the range of 0 to 1. A straight line 620 below the graph 610 indicates a saturation before correction. Degree of degree S. S ′ = − 1 corresponds to S = 0, and S ′ = 1 corresponds to S = 1.

(7)式はシグモイド曲線601により表される。彩度Sに対する補正後の彩度S”の変化率は中間補正値S’の値に応じて異なり、中間補正値S’が−1あるいは1に近づくほど小さくなり、0付近で急激に大きくなる。   Expression (7) is represented by a sigmoid curve 601. The rate of change of the saturation S ″ after correction with respect to the saturation S varies depending on the value of the intermediate correction value S ′, and decreases as the intermediate correction value S ′ approaches −1 or 1, and increases rapidly near 0. .

(7)式に(5)式の中間補正値S’を代入すると、補正後の彩度S”は彩度Sより大きな値となり、(7)式に(6)式を代入すると、補正後の彩度S”は彩度Sより小さな値となる。すなわち、彩度Sが閾値αより小さい場合には、補正後の彩度S”は彩度Sより大きな値となり、彩度Sが閾値αより大きい場合には、補正後の彩度S”は彩度Sより小さな値となる。その結果、無彩色の彩度は黒(彩度S=0)に近づけられ、有彩色の彩度は、その色相をより明確にするように強調される。   Substituting the intermediate correction value S ′ of the equation (5) into the equation (7) makes the corrected saturation S ″ larger than the saturation S, and substituting the equation (6) into the equation (7) The saturation S ″ is smaller than the saturation S. That is, when the saturation S is smaller than the threshold α, the corrected saturation S ″ is a value larger than the saturation S, and when the saturation S is larger than the threshold α, the corrected saturation S ″ is The value is smaller than the saturation S. As a result, the saturation of the achromatic color is brought close to black (saturation S = 0), and the saturation of the chromatic color is emphasized so as to make the hue more clear.

例えば、α=0.18、S=0.3とすると、破線で示すように、(6)式よりS’=0.15となり、(7)式よりS”=0.8となる。したがって、補正後の彩度S”は補正前の彩度Sより大きな値となり、彩度が強調される。   For example, if α = 0.18 and S = 0.3, as shown by the broken line, S ′ = 0.15 from the equation (6) and S ″ = 0.8 from the equation (7). The saturation S ″ after the correction is larger than the saturation S before the correction, and the saturation is emphasized.

次に、図7および図8を参照しながら、図2の罫線抽出処理の具体例について説明する。
図7に示すようなカラー画像701が入力されると、明度グレー画像702が生成され、明度グレー画像702が二値化される(ステップ201)。そして、得られた二値画像から罫線およびセルが抽出される(ステップ202)。この場合、カラー画像701の領域711内には境界罫線が含まれているが、その境界罫線は抽出されていない。
Next, a specific example of the ruled line extraction process of FIG. 2 will be described with reference to FIGS.
When a color image 701 as shown in FIG. 7 is input, a lightness gray image 702 is generated, and the lightness gray image 702 is binarized (step 201). Then, ruled lines and cells are extracted from the obtained binary image (step 202). In this case, a boundary ruled line is included in the area 711 of the color image 701, but the boundary ruled line is not extracted.

そこで、抽出されたセル712に対応する、カラー画像701の領域711のRGB値を用いて、彩度グレー画像703が生成され、彩度グレー画像703から二値画像704が生成される(ステップ203)。そして、二値画像704から罫線およびセルの抽出が試行されるが(ステップ204)、境界罫線を抽出することはできない。   Therefore, a saturation gray image 703 is generated using the RGB values of the region 711 of the color image 701 corresponding to the extracted cell 712, and a binary image 704 is generated from the saturation gray image 703 (step 203). ). Then, an attempt is made to extract ruled lines and cells from the binary image 704 (step 204), but the boundary ruled lines cannot be extracted.

次に、領域711のRGB値を用いて彩度補正画像705が生成され、彩度補正画像705から二値画像706が生成される(ステップ206)。そして、二値画像706から罫線およびセルが抽出される(ステップ207)。この場合、彩度補正により、領域711内のセル間の色相差が明確になり、境界罫線を抽出することができる。   Next, a saturation correction image 705 is generated using the RGB values of the region 711, and a binary image 706 is generated from the saturation correction image 705 (step 206). Then, ruled lines and cells are extracted from the binary image 706 (step 207). In this case, the hue correction between the cells in the region 711 is clarified by the saturation correction, and the boundary ruled line can be extracted.

また、図8に示すようなカラー画像801が入力されると、明度グレー画像802が生成され、明度グレー画像802が二値化される(ステップ201)。そして、得られた二値画像から罫線およびセルが抽出され、抽出結果803が得られる(ステップ202)。抽出結果803においては、2つのセル821および822が抽出されている。   When a color image 801 as shown in FIG. 8 is input, a lightness gray image 802 is generated, and the lightness gray image 802 is binarized (step 201). Then, ruled lines and cells are extracted from the obtained binary image, and an extraction result 803 is obtained (step 202). In the extraction result 803, two cells 821 and 822 are extracted.

次に、セル821および822のそれぞれに対応する、カラー画像801の領域のRGB値を用いて、セル毎の彩度グレー画像804および805が生成され、彩度グレー画像804および805がそれぞれ二値化される(ステップ203)。そして、得られた二値画像から罫線およびセルが抽出され、抽出結果806および807が得られる(ステップ204)。抽出結果807においては、3つのセル823、824、および825が抽出されている。   Next, saturation gray images 804 and 805 for each cell are generated using the RGB values of the area of the color image 801 corresponding to each of the cells 821 and 822, and the saturation gray images 804 and 805 are respectively binary. (Step 203). Then, ruled lines and cells are extracted from the obtained binary image, and extraction results 806 and 807 are obtained (step 204). In the extraction result 807, three cells 823, 824, and 825 are extracted.

次に、セル823、824、および825のRGB値を用いて彩度補正画像808、809、および810が生成され、それらの彩度補正画像が二値化される(ステップ206)。そして、得られた二値画像から罫線およびセルが抽出され、抽出結果811、812、および813が得られる(ステップ207)。抽出結果813においては、3つのセル826、827、および828が抽出されている。   Next, saturation correction images 808, 809, and 810 are generated using the RGB values of cells 823, 824, and 825, and the saturation correction images are binarized (step 206). Then, ruled lines and cells are extracted from the obtained binary image, and extraction results 811, 812, and 813 are obtained (step 207). In the extraction result 813, three cells 826, 827, and 828 are extracted.

なお、ステップ206における彩度補正処理は、上述した処理に限られるものではなく、別の方法で彩度を補正しても構わない。例えば、入力されたカラー画像を用いることなく、ステップ203において生成された彩度グレー画像を、適切な演算により直接補正することで、彩度補正画像を生成してもよい。   Note that the saturation correction process in step 206 is not limited to the process described above, and the saturation may be corrected by another method. For example, the saturation correction image may be generated by directly correcting the saturation gray image generated in step 203 by using an appropriate calculation without using the input color image.

本実施形態の罫線抽出装置は、例えば、図9に示すような情報処理装置(コンピュータ)を用いて構成される。図9の情報処理装置は、CPU(中央処理装置)901、メモリ902、入力装置903、出力装置904、外部記憶装置905、媒体駆動装置906、およびネットワーク接続装置907を備え、それらはバス908により互いに接続されている。   The ruled line extraction apparatus of the present embodiment is configured using, for example, an information processing apparatus (computer) as shown in FIG. 9 includes a CPU (central processing unit) 901, a memory 902, an input device 903, an output device 904, an external storage device 905, a medium driving device 906, and a network connection device 907, which are connected via a bus 908. Are connected to each other.

メモリ902は、例えば、ROM(read only memory)、RAM(random access memory)等を含み、処理に用いられるプログラムおよびデータを格納する。CPU901は、メモリ902を利用してプログラムを実行することにより、上述した罫線抽出処理を行う。   The memory 902 includes, for example, a read only memory (ROM), a random access memory (RAM), and the like, and stores programs and data used for processing. The CPU 901 performs the above-described ruled line extraction process by executing a program using the memory 902.

この場合、入力されたカラー画像は、処理対象データとしてメモリ902に格納され、メモリ902内で、明度グレー画像、彩度グレー画像、および彩度補正画像とそれらの二値画像が生成される。   In this case, the input color image is stored in the memory 902 as processing target data, and a lightness gray image, a saturation gray image, a saturation correction image, and their binary images are generated in the memory 902.

入力装置903は、例えば、キーボード、ポインティングデバイス等であり、オペレータからの指示や情報の入力に用いられる。出力装置904は、例えば、ディスプレイ、プリンタ、スピーカ等であり、オペレータへの問い合わせや処理結果の出力に用いられる。   The input device 903 is, for example, a keyboard, a pointing device, and the like, and is used for inputting instructions and information from an operator. The output device 904 is, for example, a display, a printer, a speaker, or the like, and is used to output an inquiry to an operator or a processing result.

外部記憶装置905は、例えば、磁気ディスク装置、光ディスク装置、光磁気ディスク装置、テープ装置等である。情報処理装置は、この外部記憶装置905に、プログラムおよびデータを格納しておき、必要に応じて、それらをメモリ902にロードして使用する。   The external storage device 905 is, for example, a magnetic disk device, an optical disk device, a magneto-optical disk device, a tape device, or the like. The information processing apparatus stores programs and data in the external storage device 905, and loads them into the memory 902 and uses them as necessary.

媒体駆動装置906は、可搬記録媒体909を駆動し、その記録内容にアクセスする。可搬記録媒体909は、メモリカード、フレキシブルディスク、光ディスク、光磁気ディスク等の任意のコンピュータ読み取り可能な記録媒体である。オペレータは、この可搬記録媒体909にプログラムおよびデータを格納しておき、必要に応じて、それらをメモリ902にロードして使用する。   The medium driving device 906 drives a portable recording medium 909 and accesses the recorded contents. The portable recording medium 909 is an arbitrary computer-readable recording medium such as a memory card, a flexible disk, an optical disk, and a magneto-optical disk. The operator stores programs and data in the portable recording medium 909 and loads them into the memory 902 and uses them as necessary.

ネットワーク接続装置907は、LAN(local area network)等の通信ネットワークに接続され、通信に伴うデータ変換を行う。また、情報処理装置は、必要に応じて、プログラムおよびデータを外部の装置からネットワーク接続装置907を介して受け取り、それらをメモリ902にロードして使用する。   The network connection device 907 is connected to a communication network such as a local area network (LAN) and performs data conversion accompanying communication. Further, the information processing apparatus receives programs and data from an external apparatus via the network connection apparatus 907 as necessary, and loads them into the memory 902 for use.

図10は、図9の情報処理装置にプログラムおよびデータを提供する方法を示している。可搬記録媒体909やサーバ1001のデータベース1011に格納されたプログラムおよびデータは、情報処理装置1002のメモリ902にロードされる。サーバ1001は、そのプログラムおよびデータを搬送する搬送信号を生成し、通信ネットワーク上の任意の伝送媒体を介して情報処理装置1002に送信する。CPU901は、そのデータを用いてそのプログラムを実行し、上述した処理を行う。   FIG. 10 shows a method for providing a program and data to the information processing apparatus of FIG. Programs and data stored in the portable recording medium 909 and the database 1011 of the server 1001 are loaded into the memory 902 of the information processing apparatus 1002. The server 1001 generates a carrier signal that carries the program and data, and transmits the carrier signal to the information processing apparatus 1002 via any transmission medium on the communication network. The CPU 901 executes the program using the data and performs the above-described processing.

(付記1)カラー画像を格納する格納手段と、
前記カラー画像から明度グレー画像を生成して、前記格納手段に格納する第1の生成手段と、
前記明度グレー画像を用いて第1の罫線を抽出する第1の抽出手段と、
前記第1の罫線により囲まれたセル領域の彩度グレー画像を生成して、前記格納手段に格納する第2の生成手段と、
前記彩度グレー画像を用いて第2の罫線を抽出する第2の抽出手段と、
前記第1および第2の罫線の情報を出力する出力手段と
を備えることを特徴とする罫線抽出装置。
(付記2)カラー画像を格納手段に格納し、
前記カラー画像から明度グレー画像を生成して、前記格納手段に格納し、
前記明度グレー画像を用いて第1の罫線を抽出し、
前記第1の罫線により囲まれたセル領域の彩度グレー画像を生成して、前記格納手段に格納し、
前記彩度グレー画像を用いて第2の罫線を抽出し、
前記第1および第2の罫線の情報を出力する
処理をコンピュータに実行させることを特徴とするプログラム。
(付記3)前記明度グレー画像を二値化して、得られた第1の二値画像を前記格納手段に格納し、前記第1の二値画像を用いて前記第1の罫線を抽出し、前記彩度グレー画像を二値化して、得られた第2の二値画像を前記格納手段に格納し、前記第2の二値画像を用いて前記第2の罫線を抽出する処理を、前記コンピュータに実行させることを特徴とする付記2記載のプログラム。
(付記4)前記第1または第2の罫線により囲まれたセル領域の彩度補正画像を生成して、前記格納手段に格納し、前記彩度補正画像を用いて第3の罫線を抽出し、前記第3の罫線の情報を出力する処理を、前記コンピュータにさらに実行させることを特徴とする付記2または3記載のプログラム。
(付記5)前記第2の罫線により囲まれたセル領域の彩度を閾値と比較し、該彩度が該閾値より大きければ、該彩度を大きくする演算を行い、該彩度が該閾値より小さければ、該彩度を小さくする演算を行うことで、前記彩度補正画像を生成する処理を、前記コンピュータに実行させることを特徴とする付記4記載のプログラム。
(付記6)第1の生成手段が、格納手段に格納されたカラー画像から明度グレー画像を生成して、該格納手段に格納し、
第1の抽出手段が、前記明度グレー画像を用いて第1の罫線を抽出し、
第2の生成手段が、前記第1の罫線により囲まれたセル領域の彩度グレー画像を生成して、前記格納手段に格納し、
第2の抽出手段が、前記彩度グレー画像を用いて第2の罫線を抽出し、
出力手段が、前記第1および第2の罫線の情報を出力する
ことを特徴とする罫線抽出方法。
(Supplementary note 1) storage means for storing a color image;
First generation means for generating a lightness gray image from the color image and storing it in the storage means;
First extraction means for extracting a first ruled line using the lightness gray image;
Second generation means for generating a saturation gray image of the cell region surrounded by the first ruled line and storing it in the storage means;
Second extraction means for extracting a second ruled line using the saturation gray image;
A ruled line extraction apparatus comprising: output means for outputting information on the first and second ruled lines.
(Appendix 2) A color image is stored in a storage means,
A lightness gray image is generated from the color image and stored in the storage means;
Extracting a first ruled line using the lightness gray image;
A saturation gray image of the cell region surrounded by the first ruled line is generated and stored in the storage means;
Extracting a second ruled line using the saturation gray image;
A program for causing a computer to execute a process of outputting information on the first and second ruled lines.
(Supplementary Note 3) The lightness gray image is binarized, the obtained first binary image is stored in the storage means, and the first ruled line is extracted using the first binary image, Binarizing the saturation gray image, storing the obtained second binary image in the storage means, and extracting the second ruled line using the second binary image, The program according to appendix 2, wherein the program is executed by a computer.
(Supplementary Note 4) A saturation correction image of a cell region surrounded by the first or second ruled line is generated, stored in the storage means, and a third ruled line is extracted using the saturation correction image. The program according to claim 2 or 3, further causing the computer to execute a process of outputting information of the third ruled line.
(Supplementary Note 5) The saturation of the cell region surrounded by the second ruled line is compared with a threshold value, and if the saturation is larger than the threshold value, an operation for increasing the saturation is performed. The program according to appendix 4, wherein if it is smaller, the computer is caused to execute the process of generating the saturation correction image by performing an operation for reducing the saturation.
(Additional remark 6) A 1st production | generation means produces | generates the brightness gray image from the color image stored in the storage means, and stores it in this storage means,
A first extracting means for extracting a first ruled line using the lightness gray image;
A second generation unit generates a saturation gray image of the cell region surrounded by the first ruled line, and stores the saturation gray image in the storage unit;
A second extracting means for extracting a second ruled line using the saturation gray image;
A ruled line extraction method, wherein the output means outputs information of the first and second ruled lines.

本発明の罫線抽出装置の原理図である。It is a principle figure of the ruled line extraction apparatus of this invention. 本発明の罫線抽出処理のフローチャートである。It is a flowchart of the ruled line extraction process of this invention. 背景と明度差がある罫線を示す図である。It is a figure which shows the ruled line with a brightness difference with a background. 背景と彩度差がある罫線を示す図である。It is a figure which shows the ruled line with a background and saturation difference. 背景と色相差がある罫線を示す図である。It is a figure which shows the ruled line with a background and a hue difference. 彩度補正方法を示す図である。It is a figure which shows the saturation correction method. 第1の罫線抽出処理を示す図である。It is a figure which shows the 1st ruled line extraction process. 第2の罫線抽出処理を示す図である。It is a figure which shows the 2nd ruled line extraction process. 情報処理装置の構成図である。It is a block diagram of information processing apparatus. プログラムおよびデータの提供方法を示す図である。It is a figure which shows the provision method of a program and data. 従来の罫線抽出処理のフローチャートである。It is a flowchart of the conventional ruled line extraction process. 境界罫線を示す図である。It is a figure which shows a boundary ruled line. 従来の罫線抽出処理を示す図である。It is a figure which shows the conventional ruled line extraction process.

符号の説明Explanation of symbols

21、301、401、501、701、801 カラー画像
22、304、404、504、702、802 明度グレー画像
23、704、706 二値画像
24、803、806、807、811、812、813 抽出結果
101 格納手段
102 第1の生成手段
103 第1の抽出手段
104 第2の生成手段
105 第2の抽出手段
106 出力手段
302、402、502 色相グレー画像
303、403、503、703 彩度グレー画像
601 シグモイド曲線
610 グラフ
620 直線
705 彩度補正画像
711 領域
712、821、822、823、824、825、826、827、828 セル
901 CPU
902 メモリ
903 入力装置
904 出力装置
905 外部記憶装置
906 媒体駆動装置
907 ネットワーク接続装置
908 バス
909 可搬記録媒体
1001 サーバ
1002 情報処理装置
1011 データベース
21, 301, 401, 501, 701, 801 Color image 22, 304, 404, 504, 702, 802 Light gray image 23, 704, 706 Binary image 24, 803, 806, 807, 811, 812, 813 Extraction result DESCRIPTION OF SYMBOLS 101 Storage means 102 1st production | generation means 103 1st extraction means 104 2nd production | generation means 105 2nd extraction means 106 Output means 302, 402, 502 Hue gray image 303, 403, 503, 703 Saturation gray image 601 Sigmoid curve 610 Graph 620 Line 705 Saturation correction image 711 Region 712, 821, 822, 823, 824, 825, 826, 827, 828 Cell 901 CPU
902 Memory 903 Input device 904 Output device 905 External storage device 906 Medium drive device 907 Network connection device 908 Bus 909 Portable recording medium 1001 Server 1002 Information processing device 1011 Database

Claims (5)

カラー画像を格納する格納手段と、
前記カラー画像から明度グレー画像を生成して、前記格納手段に格納する第1の生成手段と、
前記明度グレー画像を用いて第1の罫線を抽出する第1の抽出手段と、
前記第1の罫線により囲まれたセル領域の彩度グレー画像を生成して、前記格納手段に格納する第2の生成手段と、
前記彩度グレー画像を用いて第2の罫線を抽出する第2の抽出手段と、
前記第1および第2の罫線の情報を出力する出力手段と
を備えることを特徴とする罫線抽出装置。
Storage means for storing color images;
First generation means for generating a lightness gray image from the color image and storing it in the storage means;
First extraction means for extracting a first ruled line using the lightness gray image;
Second generation means for generating a saturation gray image of the cell region surrounded by the first ruled line and storing it in the storage means;
Second extraction means for extracting a second ruled line using the saturation gray image;
A ruled line extraction apparatus comprising: output means for outputting information on the first and second ruled lines.
カラー画像を格納手段に格納し、
前記カラー画像から明度グレー画像を生成して、前記格納手段に格納し、
前記明度グレー画像を用いて第1の罫線を抽出し、
前記第1の罫線により囲まれたセル領域の彩度グレー画像を生成して、前記格納手段に格納し、
前記彩度グレー画像を用いて第2の罫線を抽出し、
前記第1および第2の罫線の情報を出力する
処理をコンピュータに実行させることを特徴とするプログラム。
Store the color image in the storage means,
A lightness gray image is generated from the color image and stored in the storage means;
Extracting a first ruled line using the lightness gray image;
A saturation gray image of the cell region surrounded by the first ruled line is generated and stored in the storage means;
Extracting a second ruled line using the saturation gray image;
A program for causing a computer to execute a process of outputting information on the first and second ruled lines.
前記第1または第2の罫線により囲まれたセル領域の彩度補正画像を生成して、前記格納手段に格納し、前記彩度補正画像を用いて第3の罫線を抽出し、前記第3の罫線の情報を出力する処理を、前記コンピュータにさらに実行させることを特徴とする請求項2記載のプログラム。   A saturation correction image of the cell region surrounded by the first or second ruled line is generated, stored in the storage means, a third ruled line is extracted using the saturation correction image, and the third The program according to claim 2, further causing the computer to execute a process of outputting the ruled line information. 前記第2の罫線により囲まれたセル領域の彩度を閾値と比較し、該彩度が該閾値より大きければ、該彩度を大きくする演算を行い、該彩度が該閾値より小さければ、該彩度を小さくする演算を行うことで、前記彩度補正画像を生成する処理を、前記コンピュータに実行させることを特徴とする請求項3記載のプログラム。   Comparing the saturation of the cell region surrounded by the second ruled line with a threshold value, if the saturation is larger than the threshold, an operation for increasing the saturation is performed, and if the saturation is smaller than the threshold, The program according to claim 3, wherein the computer is caused to execute the process of generating the saturation correction image by performing an operation for reducing the saturation. 第1の生成手段が、格納手段に格納されたカラー画像から明度グレー画像を生成して、該格納手段に格納し、
第1の抽出手段が、前記明度グレー画像を用いて第1の罫線を抽出し、
第2の生成手段が、前記第1の罫線により囲まれたセル領域の彩度グレー画像を生成して、前記格納手段に格納し、
第2の抽出手段が、前記彩度グレー画像を用いて第2の罫線を抽出し、
出力手段が、前記第1および第2の罫線の情報を出力する
ことを特徴とする罫線抽出方法。
The first generation means generates a lightness gray image from the color image stored in the storage means, stores the lightness gray image in the storage means,
A first extracting means for extracting a first ruled line using the lightness gray image;
A second generation unit generates a saturation gray image of the cell region surrounded by the first ruled line, and stores the saturation gray image in the storage unit;
A second extracting means for extracting a second ruled line using the saturation gray image;
A ruled line extraction method, wherein the output means outputs information of the first and second ruled lines.
JP2006323625A 2006-11-30 2006-11-30 Ruled line extraction apparatus and method Expired - Fee Related JP4829757B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006323625A JP4829757B2 (en) 2006-11-30 2006-11-30 Ruled line extraction apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006323625A JP4829757B2 (en) 2006-11-30 2006-11-30 Ruled line extraction apparatus and method

Publications (2)

Publication Number Publication Date
JP2008139967A JP2008139967A (en) 2008-06-19
JP4829757B2 true JP4829757B2 (en) 2011-12-07

Family

ID=39601388

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006323625A Expired - Fee Related JP4829757B2 (en) 2006-11-30 2006-11-30 Ruled line extraction apparatus and method

Country Status (1)

Country Link
JP (1) JP4829757B2 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4077094B2 (en) * 1998-12-11 2008-04-16 富士通株式会社 Color document image recognition device

Also Published As

Publication number Publication date
JP2008139967A (en) 2008-06-19

Similar Documents

Publication Publication Date Title
US11574489B2 (en) Image processing system, image processing method, and storage medium
CN108229490B (en) Key point detection method, neural network training method, device and electronic equipment
JP5934762B2 (en) Document modification detection method by character comparison using character shape characteristics, computer program, recording medium, and information processing apparatus
CN113344826B (en) Image processing methods, devices, electronic equipment and storage media
US10049291B2 (en) Image-processing apparatus, image-processing method, and computer program product
JP5701182B2 (en) Image processing apparatus, image processing method, and computer program
JP5900208B2 (en) Image processing apparatus and image processing method
US20080075381A1 (en) Image processing apparatus, image processing method, and computer product
US8705134B2 (en) Method of processing an image to clarify text in the image
CN112836692B (en) Method, apparatus, device and medium for processing image
US20230316697A1 (en) Association method, association system, and non-transitory computer-readable storage medium
US9756220B2 (en) Image data generating apparatus, printer, image data generating method, and non-transitory computer readable medium for extracting one or more pixels corresponding to a metallic-color region
CN110210467B (en) Formula positioning method of text image, image processing device and storage medium
KR20150099116A (en) Method for recognizing a color character using optical character recognition and apparatus thereof
US20170278250A1 (en) Image processing device, non-transitory computer readable medium, and image processing method
JP2019046225A (en) Recognition device, recognition program, and recognition method
JP4829757B2 (en) Ruled line extraction apparatus and method
JP5979008B2 (en) Image processing apparatus, image processing method, and program
JP4569785B2 (en) Binarization device and binarization processing program
JP2023023777A (en) Computer program, generation device, and generation method
US12456174B2 (en) Image processing apparatus, image processing method, and non-transitory computer-readable storage medium storing program comprising acquiring an image generated by reading an original, and removing noise from an object region with a size smaller than a size specified in a first threshold
JP4973603B2 (en) Image processing apparatus and image processing program
JP6701773B2 (en) Ruled line deleting device, ruled line deleting method, and ruled line deleting program
JP2017138742A (en) Image processing apparatus, image processing method, and program
CN118429973A (en) Panoramic image stitching method, device and equipment based on scanning pen and storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20081205

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110916

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140922

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4829757

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees