JP2010258627A - Image processor, image processing method, program, and storage medium - Google Patents

Image processor, image processing method, program, and storage medium Download PDF

Info

Publication number
JP2010258627A
JP2010258627A JP2009104547A JP2009104547A JP2010258627A JP 2010258627 A JP2010258627 A JP 2010258627A JP 2009104547 A JP2009104547 A JP 2009104547A JP 2009104547 A JP2009104547 A JP 2009104547A JP 2010258627 A JP2010258627 A JP 2010258627A
Authority
JP
Japan
Prior art keywords
line
document image
character
area
black
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.)
Withdrawn
Application number
JP2009104547A
Other languages
Japanese (ja)
Inventor
Atsushi Tamaru
淳 田丸
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2009104547A priority Critical patent/JP2010258627A/en
Publication of JP2010258627A publication Critical patent/JP2010258627A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To extract watermark information embedded by changing and using blank length between characters even from a document with a postscript line written therein by extracting a circumscribed rectangle of a character even from the document with the postscript line written therein. <P>SOLUTION: A document image with embedding information embedded therein is acquired by controlling a distance between characters. A first object composed of adjacent black pixel groups is detected within an area between characters in the document image. The line width of the first object is calculated as a parameter value for the first object. When the parameter value for the first object is equal to or less than a threshold, after the first object is regarded as an area composed of white pixel groups, each circumscribed rectangle of a character constituting the document image is calculated, and the embedding information embedded in the document image is extracted. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、電子透かしの読取精度を向上させる技術に関する。   The present invention relates to a technique for improving the reading accuracy of a digital watermark.

印刷文書に情報を密かに埋め込む技術として、例えば特許文献1に示すように、文書中の文字の間の空白長を利用した電子透かし(以下、「文字間電子透かし」と呼ぶ。)がある。文字間電子透かしは、文字の間の空白長を微小に変更し、人間が気付き難いように情報を埋め込む技術である。そのために、文字認識技術の要素技術である文字外接矩形抽出技術が用いられる。ここで、文字間電子透かしという用語には、行間の空白長を変更して埋め込む電子透かしと、文字間の空白長を変更して埋め込む電子透かしの双方を含む。   As a technique for secretly embedding information in a printed document, for example, as shown in Patent Document 1, there is a digital watermark using a space length between characters in a document (hereinafter referred to as “character watermark digital watermark”). Inter-character digital watermarking is a technique for embedding information so that humans do not notice easily by changing the length of a space between characters. For this purpose, a character circumscribed rectangle extraction technique, which is an element technique of the character recognition technique, is used. Here, the term “inter-character digital watermark” includes both an electronic watermark embedded by changing the blank length between lines and an electronic watermark embedded by changing the blank length between characters.

特開2002−232679号公報JP 2002-232679 A

文字間電子透かしを埋め込まれた印刷文書に手書きの追記をする際には、下線や訂正線を含む線を追記することが考えられる。線が追記された場合、何も対策を施さないと、埋め込み時の外接矩形抽出結果とは異なる結果が生じてしまい、埋め込まれた情報を確実に抽出出来ない場合がある。例えば、図5(a)に示すような追記線の一例を示すサンプルでは、文字の中を追記線が貫通している。このような場合、一文字一文字を確実に切り出して、埋め込まれた透かし情報を抽出することは困難である。   When handwriting is added to a printed document in which an inter-character digital watermark is embedded, it is conceivable to add a line including an underline and a correction line. When a line is added, if no measures are taken, a result different from the circumscribed rectangle extraction result at the time of embedding occurs, and the embedded information may not be extracted reliably. For example, in the sample showing an example of the additional line as shown in FIG. 5A, the additional line penetrates the character. In such a case, it is difficult to extract the embedded watermark information by reliably cutting out each character.

本発明は、追記線を書き込まれた文書からも文字外接矩形を抽出することを可能にし、もって追記線を書き込まれた文書からも、文字の間の空白長を変化させることによって埋め込んだ透かし情報の抽出を容易にし、抽出率の向上に寄与することを目的とする。   The present invention makes it possible to extract a character circumscribing rectangle from a document in which a writing line is written, and also from a document in which a writing line is written, by embedding the watermark information embedded by changing the blank length between characters. The purpose of this is to facilitate the extraction and to improve the extraction rate.

本発明の目的を達成するために、例えば、本発明の画像処理装置は以下の構成を備える。すなわち、
埋め込み情報に応じて文字間距離を制御することでこの埋め込み情報を埋め込む埋め込み方法に従って埋め込み情報が埋め込まれた文書画像を取得する手段と、
前記文書画像中に記されている文字の並び方向を行方向、行方向と直交する方向を列方向とする場合に、前記文書画像における空白行領域を特定する手段と、
前記文書画像において前記空白行領域以外の領域を文字列領域として特定する手段と、
前記文字列領域において文字間領域を特定する手段と、
前記文書画像において文字部を構成する画素と同じ画素値を有する画素を黒画素、黒画素以外の画素を白画素とする場合に、前記文字間領域内で、隣接する黒画素群で構成されている第1のオブジェクトを検出する手段と、
前記第1のオブジェクトの線幅を、前記第1のオブジェクトに対するパラメータ値として求める手段と、
前記文書画像の行方向、列方向のそれぞれについて射影を求め、求めた射影に基づいて前記文書画像を構成する各文字部の外接矩形を求める計算手段と、
それぞれの外接矩形間の距離に基づいて、前記文書画像に対して埋め込まれた埋め込み情報を抽出する手段とを備え、
前記計算手段は、前記第1のオブジェクトに対するパラメータ値が第1の閾値以下の場合には、前記第1のオブジェクトを、白画素群で構成されている領域として見なした後、前記文書画像の行方向の射影を求め、その結果得られる密度によって行を求め、続いて各行毎に行と直行する方向の射影を求める事により前記文書画像を構成する各文字部の外接矩形を求めることを特徴とする。
In order to achieve the object of the present invention, for example, an image processing apparatus of the present invention comprises the following arrangement. That is,
Means for acquiring a document image in which the embedded information is embedded in accordance with an embedding method for embedding the embedded information by controlling the distance between characters according to the embedded information;
Means for specifying a blank line area in the document image when the direction of arrangement of characters written in the document image is the row direction and the direction orthogonal to the row direction is the column direction;
Means for specifying an area other than the blank line area as a character string area in the document image;
Means for specifying an inter-character area in the character string area;
When a pixel having the same pixel value as a pixel constituting the character part in the document image is a black pixel, and a pixel other than the black pixel is a white pixel, the document image is composed of adjacent black pixels in the inter-character area. Means for detecting a first object that is present;
Means for determining a line width of the first object as a parameter value for the first object;
Calculating means for obtaining a projection for each of a row direction and a column direction of the document image, and obtaining a circumscribed rectangle of each character part constituting the document image based on the obtained projection;
Means for extracting embedded information embedded in the document image based on the distance between each circumscribed rectangle;
If the parameter value for the first object is less than or equal to a first threshold value, the calculation means regards the first object as an area composed of white pixel groups, and then calculates the document image Obtain a projection in the line direction, obtain a line according to the density obtained as a result, and then obtain a circumscribed rectangle of each character part constituting the document image by obtaining a projection in a direction perpendicular to the line for each line. And

本発明の目的を達成するために、例えば、本発明の画像処理装置は以下の構成を備える。すなわち、
画像処理装置が行う画像処理方法であって、
埋め込み情報に応じて文字間距離を制御することでこの埋め込み情報を埋め込む埋め込み方法に従って埋め込み情報が埋め込まれた文書画像を取得する工程と、
前記文書画像中に記されている文字の並び方向を行方向、行方向と直交する方向を列方向とする場合に、前記文書画像における空白行領域を特定する工程と、
前記文書画像において前記空白行領域以外の領域を文字列領域として特定する工程と、
前記文字列領域において文字間領域を特定する工程と、
前記文書画像において文字部を構成する画素と同じ画素値を有する画素を黒画素、黒画素以外の画素を白画素とする場合に、前記文字間領域内で、隣接する黒画素群で構成されている第1のオブジェクトを検出する工程と、
前記第1のオブジェクトの線幅を、前記第1のオブジェクトに対するパラメータ値として求める工程と、
前記文書画像の行方向、列方向のそれぞれについて射影を求め、求めた射影に基づいて前記文書画像を構成する各文字部の外接矩形を求める計算工程と、
それぞれの外接矩形間の距離に基づいて、前記文書画像に対して埋め込まれた埋め込み情報を抽出する工程とを備え、
前記計算工程では、前記第1のオブジェクトに対するパラメータ値が第1の閾値以下の場合には、前記第1のオブジェクトを、白画素群で構成されている領域として見なした後、前記文書画像の行方向の射影を求め、その結果得られる密度によって行を求め、続いて各行毎に行と直行する方向の射影を求めることにより前記文書画像を構成する各文字部の外接矩形を求めることを特徴とする。
In order to achieve the object of the present invention, for example, an image processing apparatus of the present invention comprises the following arrangement. That is,
An image processing method performed by an image processing apparatus,
Acquiring a document image in which the embedded information is embedded in accordance with an embedding method for embedding the embedded information by controlling the distance between characters according to the embedded information;
Specifying a blank line area in the document image when the line direction is a line direction of characters written in the document image and the column direction is a direction orthogonal to the line direction;
Identifying an area other than the blank line area as a character string area in the document image;
Identifying an inter-character area in the character string area;
When a pixel having the same pixel value as a pixel constituting the character part in the document image is a black pixel, and a pixel other than the black pixel is a white pixel, the document image is composed of adjacent black pixels in the inter-character area. Detecting a first object that is present;
Obtaining a line width of the first object as a parameter value for the first object;
A calculation step for obtaining a projection for each of the row direction and the column direction of the document image, and obtaining a circumscribed rectangle of each character part constituting the document image based on the obtained projection;
Extracting embedded information embedded in the document image based on a distance between each circumscribed rectangle,
In the calculation step, when the parameter value for the first object is equal to or less than a first threshold value, the first object is regarded as an area composed of a group of white pixels, and then the document image Obtaining a projection in the line direction, obtaining a line according to the density obtained as a result, and then obtaining a projection in a direction perpendicular to the line for each line to obtain a circumscribed rectangle of each character part constituting the document image And

本発明によれば、追記線を書き込まれた文書からも、文字外接矩形をより確実に抽出することが可能となる。もって、追記線を書き込まれた文書からも文字の間の空白長を変化させて用いて埋め込んだ透かし情報の抽出を容易とし、その抽出率の向上に寄与することが可能となる。   According to the present invention, a character circumscribed rectangle can be more reliably extracted from a document in which a write-once line is written. Therefore, it is possible to easily extract the watermark information embedded by changing the blank length between characters from the document in which the additional writing line is written, and contribute to the improvement of the extraction rate.

文字間電子透かし抽出装置の構成を示すブロック図である。It is a block diagram which shows the structure of the electronic watermark extraction apparatus between characters. 文字間電子透かし抽出装置の動作フローチャートである。It is an operation | movement flowchart of the electronic watermark extraction apparatus between characters. (a)追記線消去部0102、(b) 識別部0303の詳細を示す図である。It is a figure which shows the detail of (a) additional writing line deletion part 0102, (b) the identification part 0303. FIG. ステップS0202の追記線消去部の動作フローチャートである。It is an operation | movement flowchart of the write-once line deletion part of step S0202. 追記線、及び追記線消去方法を説明する図である。It is a figure explaining a write-once line and a write-once line erasing method. 追記線消去を説明する図である。It is a figure explaining additional writing line erasure. ステップS0405の行間追記線消去処理のフローチャートである。It is a flowchart of the line-to-line additional line deletion process of step S0405. ステップS0408の文字間追記線消去処理のフローチャートである。It is a flowchart of the additional writing line deletion process between characters of step S0408. 文字サイズの推定、及び連結黒画素領域を説明する図である。It is a figure explaining the estimation of a character size, and a connection black pixel area | region. コンピュータの電気的構成を示すブロック図である。It is a block diagram which shows the electric constitution of a computer.

以下、本発明の実施例を図面に基づいて説明する。ただし、発明の範囲は以下の実施例に限定されるものではない。以下の実施例において、「行間」は文字列行の間を、「文字間」は文字列行内で2つの文字の間を、「文字の間」は行間と文字間の双方を示す。また、文字の並び方向を行方向、行方向に直交する方向を列方向とする。   Embodiments of the present invention will be described below with reference to the drawings. However, the scope of the invention is not limited to the following examples. In the following embodiments, “between lines” indicates between character string lines, “between characters” indicates between two characters in the character string line, and “between characters” indicates both between the lines and between characters. In addition, the arrangement direction of characters is a row direction, and a direction orthogonal to the row direction is a column direction.

[実施例1]
以下で、文字の間に追記された線を消去してから文字間電子透かしを抽出する画像処理装置について説明する。以下では、文書に対して追記された線を追記線と呼ぶ。図1は本実施例に係る画像処理装置である電子透かし抽出装置である。以下に、電子透かし抽出装置の各部について説明する。
[Example 1]
Hereinafter, an image processing apparatus that extracts a digital watermark between characters after deleting a line added between characters will be described. Hereinafter, a line added to a document is referred to as a postscript line. FIG. 1 shows a digital watermark extraction apparatus which is an image processing apparatus according to the present embodiment. Hereinafter, each unit of the digital watermark extracting apparatus will be described.

入力部0101は、透かし埋め込み済み画像を入力画像として取得する。追記線消去部0102は、印刷物に付された追記線のうち、文字間電子透かしの抽出に障害となる部分、即ち追記線若しくは追記線の一部分を取り除く。文字矩形抽出部0103は、文字に外接する矩形の抽出を行って、外接矩形の位置座標を出力する。電子透かし抽出部0104は、文字矩形抽出部0103から取得した位置座標から外接矩形間の空白長、すなわち文字間距離を計算し、埋め込まれた電子透かしの抽出を行う。   The input unit 0101 acquires a watermark embedded image as an input image. The additional line erasing unit 0102 removes a part that hinders the extraction of the inter-character digital watermark, that is, the additional line or a part of the additional line, from the additional line attached to the printed matter. The character rectangle extraction unit 0103 extracts a rectangle circumscribing the character and outputs the position coordinates of the circumscribed rectangle. The digital watermark extraction unit 0104 calculates a blank length between circumscribed rectangles, that is, a distance between characters, from the position coordinates acquired from the character rectangle extraction unit 0103, and extracts an embedded digital watermark.

この電子透かし抽出装置の処理について、図2を用いて説明する。まず、透かし埋め込み済み画像を入力する(ステップS0201)。そして、追記線若しくは追記線の障害部分の消去を行う(ステップS0202)。次に、文字矩形抽出(ステップS0203)を行い、最後に、電子透かし抽出(ステップS0204)を行う。   The processing of this digital watermark extracting apparatus will be described with reference to FIG. First, the watermark embedded image is input (step S0201). Then, the write-on line or the faulty part of the write-on line is deleted (step S0202). Next, character rectangle extraction (step S0203) is performed, and finally digital watermark extraction (step S0204) is performed.

図3(a)は、図1で示された追記線消去部0102の詳細を示す図である。入力部0101は、入力画像(文字間電子透かし埋め込み済み画像)を取得する。入力画像は黒画素と白画素とからなる2値画像である。本実施例では、入力画像中の文字部は黒画素により構成されるものとし、黒画素以外の画素を白画素とする。そして入力部0101は、後述する射影部0302及び連結画素領域抽出部0304に2値画像である入力画像を提供する。入力部0101は、2値画像ではない入力画像、例えばグレースケール又はフルカラーの入力画像を取得した後に、2値化を行ってから射影部0302及び連結画素領域抽出部0304に2値化後の画像を提供してもよい。   FIG. 3A is a diagram showing details of the write-once line erasing unit 0102 shown in FIG. The input unit 0101 acquires an input image (an image with embedded inter-character digital watermark). The input image is a binary image composed of black pixels and white pixels. In this embodiment, the character part in the input image is composed of black pixels, and pixels other than the black pixels are white pixels. The input unit 0101 provides an input image that is a binary image to a projection unit 0302 and a connected pixel region extraction unit 0304 described later. The input unit 0101 obtains an input image that is not a binary image, for example, a grayscale or full-color input image, and then binarizes the image, and then outputs the binarized image to the projection unit 0302 and the connected pixel region extraction unit 0304. May be provided.

射影部0302は、文書画像中の黒画素密度が閾値以下である低密度領域を検出する(低密度領域検出手段)。具体的には、入力画像に対して行方向(横書きの場合は水平方向であり、縦書きの場合は垂直方向である。)の射影を行い、黒画素数が閾値以上の行を高密度行、黒画素数が閾値以下の行を低密度行として判別すればよい。ここで射影とは、水平方向であれば、ピクセル単位の各ライン毎に各ライン上にある黒画素の個数を集計することである。(垂直方向であれば、ピクセル単位で各コラム毎に各コラム上にある黒画素の個数を集計することである。)そして、その結果得られる密度によって、どの行が高密度行であって、どの行が低密度行であるかを示す情報を、行情報として記憶部0308に格納する。さらに、連続する低密度行である低密度行領域の位置を示す行間低密度部分情報を、識別部0303に提供する。低密度行領域は、文書画像中の空白行領域に相当する。また射影部0302は、記憶部0308に格納された行情報を用いて、連続する高密度行を高密度行領域として取得する。高密度行領域は、文書画像中における空白行領域以外の部分であり、文字列領域に相当する。さらに、高密度行領域のそれぞれに対して、すなわち文字列の各行毎に、各行に直交する方向に射影を行い、黒画素数が閾値以上の部分を高密度列、黒画素数が閾値以下の部分を低密度列として判別する。そして、連続する低密度列である低密度文字間領域の位置を示す文字間低密度部分情報を、識別部0303に提供する。低密度部分情報とは、射影を行った結果を基に、密度が予め定めた閾値より低い部分の位置を表す情報である。つまり行間低密度部分情報は行間の空白の位置を示し、文字間低密度部分情報は文字間の空白の位置を示す。   The projection unit 0302 detects a low-density area where the black pixel density in the document image is equal to or less than a threshold (low-density area detection unit). Specifically, the input image is projected in the row direction (horizontal for horizontal writing and vertical for vertical writing), and rows with black pixels greater than or equal to the threshold are displayed in high-density rows. A row in which the number of black pixels is equal to or less than the threshold value may be determined as a low density row. Here, projecting means totaling the number of black pixels on each line for each line in a pixel unit in the horizontal direction. (In the vertical direction, the number of black pixels on each column is counted for each column in pixel units.) And, depending on the density obtained as a result, which rows are high-density rows, Information indicating which rows are low-density rows is stored in the storage unit 0308 as row information. Further, the inter-row low density partial information indicating the position of the low density row region which is a continuous low density row is provided to the identification unit 0303. The low density line area corresponds to a blank line area in the document image. The projecting unit 0302 uses the row information stored in the storage unit 0308 to acquire continuous high-density rows as a high-density row region. The high-density line area is a part other than the blank line area in the document image, and corresponds to a character string area. Further, for each of the high-density row regions, that is, for each row of the character string, projection is performed in a direction orthogonal to each row. The part is determined as a low-density column. Then, low-density inter-character density information indicating the position of a low-density inter-character area that is a continuous low-density sequence is provided to the identification unit 0303. The low-density partial information is information that represents the position of a portion where the density is lower than a predetermined threshold based on the result of projection. That is, the inter-line low density partial information indicates a blank position between lines, and the inter-character low density partial information indicates a blank position between characters.

識別部0303は、行間低密度部分情報又は文字間低密度部分情報で示される領域内、すなわち低密度領域内の黒画素が追記線若しくは追記線の一部分であるか否かを判断する。判断には、低密度領域内の連結黒画素群により求められるパラメータ値を用いる。そして、追記線若しくは追記線の一部分を構成する画素の座標を線情報として比較部0305及び消去部0307に提供する。   The identification unit 0303 determines whether or not a black pixel in the area indicated by the low-density part information between lines or the low-density part information between characters, that is, a black pixel in the low-density area is a part of the additional line or the additional line. For the determination, a parameter value obtained from the connected black pixel group in the low density region is used. Then, the coordinates of the pixels constituting the additional writing line or a part of the additional recording line are provided as line information to the comparison unit 0305 and the erasing unit 0307.

図3(b)は、識別部0303の詳細を示す図である。識別部0303は、積算値計算部1601と、線幅計算部1602と、条件判定部1603とを備える。積算値計算部1601は、行間低密度部分情報で示される低密度行領域内の連結黒画素群からなる線のおおよその長さに対応するパラメータ値を求める。また、文字間低密度部分情報で示される低密度文字間領域内の連結黒画素群からなる線のおおよその長さに対応するパラメータ値を求める。このパラメータ値を、連結黒画素群の長さと呼ぶことにする。連結黒画素群とは、縦又は横又は斜めに互いに連結した2つ以上の黒画素の集合である。ただし、斜めに隣接する、即ち角と角が隣接する2つの画素は、基本的に連結していないとみなすことも可能である。解像度が低い場合には連結していないとみなす方が望ましい場合もある。(解像度を落とした場合に、元の解像度においては、実際に連結していない場合も考えられるため。)線幅計算部1602は、連結黒画素群からなる線のおおよその幅に対応するパラメータ値を求める。このパラメータ値を、連結黒画素群の幅又は線幅と呼ぶことにする。条件判定部1603は、求めた長さと線幅が、所定の条件を満たすかどうかを判定し、条件を満たす連結黒画素群に関する線情報を出力する。線情報とは、連結黒画素群に含まれる黒画素の、入力画像中での座標を示す情報である。識別部0303の具体的な処理については後述する。   FIG. 3B is a diagram illustrating details of the identification unit 0303. The identification unit 0303 includes an integrated value calculation unit 1601, a line width calculation unit 1602, and a condition determination unit 1603. The integrated value calculation unit 1601 obtains a parameter value corresponding to the approximate length of a line composed of a group of connected black pixels in the low density row area indicated by the inter-row low density partial information. In addition, a parameter value corresponding to the approximate length of a line made up of connected black pixel groups in the low density inter-character area indicated by the inter-character low density partial information is obtained. This parameter value is called the length of the connected black pixel group. The connected black pixel group is a set of two or more black pixels connected to each other vertically, horizontally, or diagonally. However, it is possible to consider that two pixels that are adjacent obliquely, that is, corners and corners are basically not connected. In some cases it may be desirable to assume that the resolution is not connected when the resolution is low. (If the resolution is lowered, the original resolution may not be actually connected.) The line width calculation unit 1602 sets the parameter value corresponding to the approximate width of the line made up of connected black pixels. Ask for. This parameter value is called the width or line width of the connected black pixel group. The condition determination unit 1603 determines whether the obtained length and line width satisfy a predetermined condition, and outputs line information regarding a connected black pixel group that satisfies the condition. The line information is information indicating the coordinates in the input image of the black pixels included in the connected black pixel group. Specific processing of the identification unit 0303 will be described later.

連結画素領域抽出部0304は、文書画像内の連結黒画素群(第3のオブジェクト)の抽出を行う(連結黒画素群検出手段)。比較部0305は、識別部0303から線情報を、文字サイズ推定部0306から文字サイズ情報を、及び連結画素領域抽出部0304から連結黒画素群情報を取得する。そして、線情報が示す線が追記された線、すなわち追記線若しくは追記線の一部分であるかどうかを、連結黒画素群の大きさと、文字サイズ情報を比較して判断する。その結果、追記線若しくは追記線の一部分であると判断した場合には、識別部0303から取得した線情報を、追記線情報として消去部0307に提供する。例えば、図9(e)に示される密度が低いと判断される部分にある線は、追記線若しくは追記線の一部分であり、これらを表す情報が追記線情報である。具体的な処理については後述する。   The connected pixel area extraction unit 0304 extracts a connected black pixel group (third object) in the document image (connected black pixel group detection means). The comparison unit 0305 acquires line information from the identification unit 0303, character size information from the character size estimation unit 0306, and connected black pixel group information from the connected pixel region extraction unit 0304. Then, it is determined by comparing the size of the connected black pixel group and the character size information whether the line indicated by the line information is an added line, that is, an additional line or a part of the additional line. As a result, when it is determined that it is a write-once line or a part of the write-online, the line information acquired from the identifying unit 0303 is provided to the erasing unit 0307 as write-once line information. For example, the line in the portion where the density shown in FIG. 9E is determined to be low is a write-on line or a part of the write-on line, and information representing these is the write-on line information. Specific processing will be described later.

文字サイズ推定部0306は、連結画素領域抽出部0304から取得した連結黒画素群情報を用いて、文字サイズの推定を行う。文字サイズの推定にあたっては、予め決められた方法で区切ったブロック毎に文字サイズの推定を行う。例えば、入力画像を、縦方向と横方向でそれぞれ半分に区切って4つのブロックとし、それぞれのブロックについて文字サイズの推定を行えばよい。ブロックの数はもっと多くてもよく、ブロックセレクション技術を用いて文字オブジェクト毎に区切ってもよい。そして、ブロック毎に推定された文字サイズの情報を含む文字サイズ情報を生成し、比較部0305に提供する。   The character size estimation unit 0306 estimates the character size using the connected black pixel group information acquired from the connected pixel region extraction unit 0304. In estimating the character size, the character size is estimated for each block divided by a predetermined method. For example, the input image may be divided into half in the vertical direction and the horizontal direction to form four blocks, and the character size may be estimated for each block. The number of blocks may be larger, and may be divided for each character object by using a block selection technique. Then, character size information including information on the character size estimated for each block is generated and provided to the comparison unit 0305.

図9(a)は、連結黒画素群の重なる文字矩形を統合する方法を示す図である。図9(b)、(c)は、文字サイズ推定で用いるヒストグラムを示す図である。文字サイズの推定方法としては次の方法がある。まず、複数の連結黒画素群の各々について、その外接矩形が重なる場合には、それらを統合する(図9(a)参照)。そして、ブロック内の統合処理を行った後の外接矩形について、それぞれの面積、幅、若しくは高さについてヒストグラムを取り(図9(b)(c)参照)、最頻値に相当する値を取ることによって、文字のサイズを推定する。最頻値に相当する値としては、正規分布のパターンとヒストグラムのグラフの畳み込み積分の結果から抽出されるピーク値を用いればよい。というのも、文字サイズに関しては最頻値が一つに定まる事が現実的でないからである。面積に関する最頻値相当の値の場合は、その平方根をとった値を推定文字サイズとし、幅に関しての場合には、その最頻値相当の値を推定文字サイズとする。推定文字サイズの単位はpixelである。   FIG. 9A is a diagram illustrating a method of integrating character rectangles overlapping connected black pixel groups. FIGS. 9B and 9C are diagrams showing histograms used for character size estimation. There are the following methods for estimating the character size. First, when the circumscribed rectangles overlap each other for a plurality of connected black pixel groups, they are integrated (see FIG. 9A). Then, for the circumscribed rectangle after the integration process in the block, a histogram is taken for each area, width, or height (see FIGS. 9B and 9C), and a value corresponding to the mode is taken. Thus, the size of the character is estimated. As a value corresponding to the mode value, a peak value extracted from the result of convolution integration of a normal distribution pattern and a histogram graph may be used. This is because it is not realistic that the mode value is set to one for the character size. In the case of a value corresponding to the mode value regarding the area, a value obtained by taking the square root thereof is set as the estimated character size, and in the case of the width, the value corresponding to the mode value is set as the estimated character size. The unit of the estimated character size is pixel.

代わりの文字サイズ推定方法として、一般的な文書から得られる文字サイズとヒストグラムのパターンとの関係を示すテーブルを使用する方法がある。この場合、ブロック内の統合処理を行った後の連結黒画素群についてのヒストグラムに最も近いテーブル中のパターンを判断し、対応する文字サイズを推定文字サイズとしてもよい。また、半角文字や全角文字が混在する場合には、ヒストグラムは双峰性を持つものと考えられる。この場合に対応して、ブロック内の統合処理を行った後の連結黒画素群についてのヒストグラムが、部分的にテーブル内のパターンを含むような場合を検出する事によっても、文字サイズは推定可能である。また、日本語の場合は、全角文字についてはほとんど正方形に近いものとみなせるが、半角文字や英数字の場合は、幅と高さの差が大きいので、幅と高さの夫々について、別個にその長さを推定し、それぞれの結果を文字のサイズとして扱ってもよい。   As an alternative character size estimation method, there is a method of using a table indicating a relationship between a character size obtained from a general document and a histogram pattern. In this case, the pattern in the table closest to the histogram for the connected black pixel group after performing the integration processing in the block may be determined, and the corresponding character size may be used as the estimated character size. When half-width characters and full-width characters are mixed, the histogram is considered to have bimodality. Corresponding to this case, the character size can also be estimated by detecting the case where the histogram for the connected black pixel group after the integration processing in the block partially includes the pattern in the table. It is. In the case of Japanese, full-width characters can be regarded as almost square, but in the case of half-width characters and alphanumeric characters, the difference between width and height is large. The length may be estimated, and each result may be treated as a character size.

消去部0307は、入力部0101から取得した入力画像について、比較部0305から取得した追記線情報が示す黒画素を白画素に変換することで修正を行う。バッファとして記憶部0308を用い、記憶部0308との間で修正途中の修正画像を入出力する。また、修正が終わった画像も、記憶部0308に格納する。   The erasing unit 0307 corrects the input image acquired from the input unit 0101 by converting the black pixel indicated by the additional line information acquired from the comparison unit 0305 into a white pixel. A storage unit 0308 is used as a buffer, and a corrected image in the middle of correction is input / output to / from the storage unit 0308. Further, the corrected image is also stored in the storage unit 0308.

記憶部0308は、射影部0302との間で行情報の入出力を行い、行情報を保持しておく。また、消去部0307との間で修正画像を入出力し、修正画像を保持しておく。出力部0309は、記憶部0308から全ての修正を終えた修正画像を取得し、出力画像として出力する。   The storage unit 0308 inputs / outputs line information to / from the projecting unit 0302 and holds the line information. Further, a corrected image is input / output to / from the erasing unit 0307, and the corrected image is held. The output unit 0309 acquires a corrected image that has been all corrected from the storage unit 0308, and outputs it as an output image.

次に、ステップS0202の追記線消去処理、すなわち追記線消去部0102の処理の詳細を、図4を用いて説明する。まず、連結画素領域抽出部0304は、入力画像に対して連結黒画素群の抽出(ステップS0401)を行う。そして、文字サイズ推定部0306は、その抽出結果を基に、文字サイズの推定(ステップS0402)を行う。次に、射影部0302は、入力画像に対して水平方向の射影を行い(ステップS0403)、低密度行領域(矩形領域)を特定(ステップS0404)する。そして、識別部0303は低密度行領域内の追記線の特定を行い、消去部0307が追記線の消去を行う(ステップS0405)。ステップS0405の詳細については後述する。   Next, the details of the additional line erasing process in step S0202, that is, the process of the additional line erasing unit 0102 will be described with reference to FIG. First, the connected pixel area extracting unit 0304 extracts a connected black pixel group from the input image (step S0401). Then, the character size estimation unit 0306 performs character size estimation (step S0402) based on the extraction result. Next, the projecting unit 0302 performs horizontal projection on the input image (step S0403), and specifies a low-density row area (rectangular area) (step S0404). Then, the identification unit 0303 specifies a write-on line in the low-density row area, and the erase unit 0307 erases the write-on line (step S0405). Details of step S0405 will be described later.

次に、射影部0302は高密度行領域のそれぞれについて、行に直交する方向の射影を行い(ステップS0406)、低密度文字間領域(矩形領域)を特定(ステップS0407)する。この2つの処理は、図3(a)の射影部0302で行われる。そして、識別部0303は低密度文字間領域内の追記線や追記線の一部分の特定を行い(追記線特定手段)、消去部0307が追記線や追記線の一部分の消去を行う(ステップS0408)。ステップS0405の詳細についても後述する。最後に出力部0309は、修正された画像を出力する(ステップS0409)。   Next, the projecting unit 0302 performs projection in the direction orthogonal to the row for each of the high-density row regions (step S0406), and specifies the low-density character region (rectangular region) (step S0407). These two processes are performed by the projection unit 0302 in FIG. Then, the identification unit 0303 specifies a part of the additional line and the additional line in the low-density character space area (an additional line specifying unit), and the erasing unit 0307 erases the additional line and a part of the additional line (step S0408). . Details of step S0405 will also be described later. Finally, the output unit 0309 outputs the corrected image (step S0409).

続けて、ステップS0405の行間追記線若しくは追記線の一部分の消去処理の詳細を、図7を用いて説明する。まずステップS1000−1において、識別部0303は行間低密度領域のうち1つを選択する。例えば、先頭行から最終行へと向かう方向に順番に選択していけばよい。ステップ1000−2においては、識別部0303はステップS1000−1において選択した行間低密度領域に対して、連結黒画素群抽出処理を行う。すなわち、空白行領域内の黒画素群(第2のオブジェクト)を検出する。抽出した連結黒画素群を行間連結黒画素群と呼ぶ。ステップS1000−2の連結黒画素群抽出処理は、ステップS0401と同様に行えばよい。しかし、ステップS0401の処理は入力画像全体に対して行うのに対して、ステップS1000−2の処理は行間低密度領域に対して行うことに注意する。識別部0303は、抽出した連結黒画素群を構成する黒画素のそれぞれの座標を、線情報として比較部0305に提供する。ステップS1000−3では、積算値計算部1601はステップS1000−2で抽出した連結黒画素群の1つを選択する。   Next, details of the process of erasing the line-to-line additional line or a part of the additional line in step S0405 will be described with reference to FIG. First, in step S1000-1, the identification unit 0303 selects one of the row-to-row low density regions. For example, the selection may be made in order from the first line to the last line. In step 1000-2, the identification unit 0303 performs a connected black pixel group extraction process on the low-interline density area selected in step S1000-1. That is, a black pixel group (second object) in the blank row area is detected. The extracted connected black pixel group is referred to as an inter-row connected black pixel group. The connected black pixel group extraction process in step S1000-2 may be performed in the same manner as in step S0401. However, it should be noted that the process in step S0401 is performed on the entire input image, whereas the process in step S1000-2 is performed on the low-density area between lines. The identification unit 0303 provides the coordinates of the extracted black pixels constituting the extracted connected black pixel group to the comparison unit 0305 as line information. In step S1000-3, the integrated value calculation unit 1601 selects one of the connected black pixel groups extracted in step S1000-2.

ステップS1001からステップS1006では、ステップS1000−3で選択した連結黒画素群の長さを求める。ステップS1001からステップS1006の処理は、長さを求める処理の一例である。ステップS1001からステップS1006までの処理は、積算値計算部1601が行う。   In steps S1001 to S1006, the length of the connected black pixel group selected in step S1000-3 is obtained. The processing from step S1001 to step S1006 is an example of processing for obtaining a length. The integrated value calculation unit 1601 performs the processing from step S1001 to step S1006.

まず、変数iを1で初期化し、変数Lを0で初期化する(ステップS1001)。横書きの文書の場合、iは連結黒画素群の上端を1とするy座標を示す。続けて、連結黒画素群のi行目の黒ランの1つを選択する(ステップS1002)。黒ランとは、行方向に連続する黒画素群を示す。1行に黒ランが複数存在する場合も考えられ、この場合は黒ランを1つずつ順番に、例えば左から、黒ランを選択すればよい。   First, the variable i is initialized with 1, and the variable L is initialized with 0 (step S1001). In the case of a horizontally written document, i indicates the y coordinate where the upper end of the connected black pixel group is 1. Subsequently, one of the black runs in the i-th row of the connected black pixel group is selected (step S1002). A black run indicates a group of black pixels continuous in the row direction. There may be a case where a plurality of black runs exist in one row. In this case, the black runs may be selected one by one in order, for example, from the left.

ステップS1003a〜ステップS1003eでは、黒ランに積算値というパラメータ値を割り当てる。積算値は以下のように計算する。まず、ステップS1002で選択した黒ランにi−1行目の黒ランが隣接して存在するか否かを調べる(ステップS1003a)。ステップS1003aでは、黒ラン同士が斜めに接していても隣接しているものと判断する。i−1行目の黒ランが隣接して存在する場合はステップS1003bに進み、隣接して存在しない場合はステップS1003cに進む。ステップS1003bに進んだ場合は、ステップS1002で選択した黒ランの重心と、i−1行目の隣接する黒ランの重心との間の距離に、i−1行目の隣接する黒ランの積算値を加えたものを、ステップS1002で選択した黒ランの積算値とする。ステップS1002で選択した黒ランに、i−1行目の黒ランが2つ以上接している場合には、それぞれのi−1行目の黒ランに対応する積算値を求め、合計した値をステップS1002で選択した黒ランAの積算値とする。例えば、i行目の黒ランAにi−1行目の黒ランB及びCが接している場合を考える。この場合、黒ランAの重心と黒ランBの重心との間の距離に黒ランBの積算値を足した値と、黒ランAの重心と黒ランCの重心との間の距離に黒ランCの積算値を足した値とを合計して、黒ランAの積算値とする。ステップS1003cに進んだ場合は、ステップS1002で選択した黒ランの積算値を1とする。   In steps S1003a to S1003e, a parameter value called an integrated value is assigned to the black run. The integrated value is calculated as follows. First, it is examined whether or not the black run in the (i-1) th row is adjacent to the black run selected in step S1002 (step S1003a). In step S1003a, it is determined that the black runs are adjacent to each other even if they are in contact with each other at an angle. When the black run of the (i-1) th row exists adjacently, the process proceeds to step S1003b, and when it does not exist adjacently, the process proceeds to step S1003c. When the process proceeds to step S1003b, the integration of the black run adjacent to the (i-1) th row is added to the distance between the center of gravity of the black run selected at step S1002 and the barycenter of the black run adjacent to the (i-1) th row. The sum of the values is taken as the integrated value of the black run selected in step S1002. If two or more black runs in the i-1th row are in contact with the black run selected in step S1002, an integrated value corresponding to each black run in the i-1th row is obtained and the total value is obtained. The integrated value of black run A selected in step S1002 is used. For example, consider a case where the black runs A and i-1 are in contact with the black runs A and i. In this case, black is added to the distance between the center of gravity of black run A and the center of gravity of black run B plus the integrated value of black run B and the distance between the center of gravity of black run A and the center of black run C. The sum of the integrated value of run C is added to obtain the integrated value of black run A. When the process proceeds to step S1003c, the integrated value of the black run selected in step S1002 is set to 1.

次にステップS1003dで、ステップS1002で選択した黒ランにi+1行目の黒ランが隣接して存在するか否かを調べる(ステップS1003d)。ステップS1003dでも、黒ラン同士が斜めに接していても隣接しているものと判断する。i+1行目の黒ランが隣接して存在する場合には、ステップS1004に進む。i+1行目の黒ランが隣接して存在しない場合は、ステップS1003eに進み、変数LにステップS1002で選択した黒ランの積算値を加えてから、ステップS1004に進む。   In step S1003d, it is checked whether the black run selected in step S1002 is adjacent to the black run in the (i + 1) th row (step S1003d). Even in step S1003d, it is determined that the black runs are adjacent to each other even if they are in contact with each other at an angle. If there is an adjacent black run on the (i + 1) th row, the process proceeds to step S1004. If the black run in the (i + 1) th row does not exist adjacently, the process proceeds to step S1003e, and the integrated value of the black run selected in step S1002 is added to the variable L, and then the process proceeds to step S1004.

ステップS1004では、i行目にステップS1002で選択していない黒ランがまだ残っているか否かを判断する。まだ残っている場合は、ステップS1002に戻って次の黒ランを選択する。もう残っていない場合は、ステップS1005に進む。次にiをインクリメントし(ステップS1005)、iがステップS1000−3で選択した連結黒画素群中の画素行の数以下であるか否かを、判断する(ステップS1006)。iが連結黒画素群中の画素行の数以下であれば、ステップS1003に戻り、iが連結黒画素群中の画素行の数以下でなければ、ステップS1007へ進む。ステップS1007へ進む時の、変数Lの値が、連結黒画素群の長さに対応するパラメータ値である。   In step S1004, it is determined whether a black run that has not been selected in step S1002 still remains in the i-th row. If it still remains, the process returns to step S1002 to select the next black run. If no more remains, the process proceeds to step S1005. Next, i is incremented (step S1005), and it is determined whether i is equal to or smaller than the number of pixel rows in the connected black pixel group selected in step S1000-3 (step S1006). If i is less than or equal to the number of pixel rows in the connected black pixel group, the process returns to step S1003, and if i is not less than or equal to the number of pixel rows in the connected black pixel group, the process proceeds to step S1007. The value of the variable L when proceeding to step S1007 is a parameter value corresponding to the length of the connected black pixel group.

線幅計算部1602はステップS1007で、ステップS1000−3で選択した連結黒画素群の幅に対応するパラメータ値(線幅)を求める。線幅は、連結黒画素群の黒画素数を、ステップS1001からステップS1006で求めた連結黒画素群の長さで割った数とする。ここで、図9(d)に示すような表が得られる。図9(d)は、線分積算値計算で使用されるテーブルを示す図であり、図5(b)に示される図を基に、各画素行の黒ランの積算値と、各画素行の黒画素数とを計算したものである。各画素行の黒画素数の合計が、線に含まれる黒画素数と一致する。尚、図5(b)は、行間の追記線消去方法を示す図である。   In step S1007, the line width calculation unit 1602 obtains a parameter value (line width) corresponding to the width of the connected black pixel group selected in step S1000-3. The line width is the number obtained by dividing the number of black pixels in the connected black pixel group by the length of the connected black pixel group obtained in steps S1001 to S1006. Here, a table as shown in FIG. 9D is obtained. FIG. 9D is a diagram showing a table used in line segment integrated value calculation. Based on the diagram shown in FIG. 5B, the black run integrated value of each pixel row and each pixel row The number of black pixels is calculated. The total number of black pixels in each pixel row matches the number of black pixels included in the line. FIG. 5 (b) is a diagram showing a method for erasing additional lines between rows.

ステップS1001からステップS1007までの代わりに、線幅を求める他の方法を採用することも可能である。例えばより簡易な方法として、ステップS1000−3で選択した連結黒画素群の外接矩形を用いて推定する方法がある。ステップS1000−3で選択した連結黒画素群の外接矩形の、列方向の幅を連結黒画素群の長さに対応するパラメータ値として用いる。そして、ステップS1000−3で選択した連結黒画素群の黒画素数を、外接矩形の列方向の幅で除した値を、連結黒画素群の線幅として用いてもよい。   Instead of steps S1001 to S1007, other methods for obtaining the line width can be employed. For example, as a simpler method, there is a method of estimating using the circumscribed rectangle of the connected black pixel group selected in step S1000-3. The width in the column direction of the circumscribed rectangle of the connected black pixel group selected in step S1000-3 is used as a parameter value corresponding to the length of the connected black pixel group. A value obtained by dividing the number of black pixels of the connected black pixel group selected in step S1000-3 by the width in the column direction of the circumscribed rectangle may be used as the line width of the connected black pixel group.

ステップS1008では、条件判定部1603はステップS1000−3で選択した連結黒画素群の幅と長さとが条件に合致するか否かを調べる。ここで条件とは、連結黒画素群の幅が入力画像中の文字の線幅(第2の閾値)以下である事と、連結黒画素群の長さが予め定められた値以上(第4の閾値以上)である事と、の2つとする。条件に合致する場合は、ステップS1000−3で選択した連結黒画素群は消去対象の追記線若しくは追記線の一部分であると判断する。そして、連結黒画素群を構成する黒画素の位置情報を、追記線情報として消去部0307に提供し、ステップS1009に進む。条件に合致しない場合は、ステップS1000−3で選択した連結黒画素群は消去対象ではないと判断し、ステップS1010−1に進む。   In step S1008, the condition determination unit 1603 checks whether or not the width and length of the connected black pixel group selected in step S1000-3 match the conditions. Here, the conditions are that the width of the connected black pixel group is equal to or smaller than the line width (second threshold value) of characters in the input image, and that the length of the connected black pixel group is equal to or greater than a predetermined value (fourth). 2) or more. If the condition is met, it is determined that the connected black pixel group selected in step S1000-3 is the additional writing line to be erased or a part of the additional recording line. Then, the position information of the black pixels constituting the connected black pixel group is provided to the erasing unit 0307 as additional writing line information, and the process proceeds to step S1009. If the condition is not met, it is determined that the connected black pixel group selected in step S1000-3 is not an erasure target, and the process proceeds to step S1010-1.

連結黒画素群の幅が入力画像中の文字の線幅以下であることを消去の条件とすることで、入力画像中の文字の線幅以下の細さの追記線若しくは追記線の一部分のみを消去し、最初から印刷されている文字や文字の部分を誤って消去することを防止する。また連結黒画素群の長さがあまりに短い場合には、入力画像中の文字末端の細い部分であることが考えられる。ただし、図5(d)のように、低密度行領域途中で連結黒画素群が終わっているような場合にも、消去対象とできることが好ましい。このため、連結黒画素群の長さが予め定められた値以下の場合は消去対象としない。入力画像中の文字の線幅は既知の検出手段によって、又は文字サイズ推定部0306が推定した文字サイズに基づいて、決定することができる。但し、連結黒画素群を消去対象とするか否かは、国や言語・文化・商習慣等によって異なる印刷文書の慣例にも依るので、ここで示した条件のみには限定されない。少なくとも連結黒画素群の幅が閾値以下(第2の閾値以下)であることが条件であればよい。尚、図5(c)、(d)は、文字間の追記線消去方法を示す図である。   By setting the width of the connected black pixel group to be equal to or smaller than the line width of the character in the input image, the erasure condition is that only a part of the additional writing line or a part of the additional writing line is smaller than the line width of the character in the input image. Erase and prevent accidental erasure of characters and character parts that are printed from the beginning. If the length of the connected black pixel group is too short, it can be considered that the input image has a thin portion at the end of the character. However, as shown in FIG. 5D, it is preferable that an erasure target can be achieved even when the connected black pixel group ends in the middle of the low-density row region. For this reason, when the length of the connected black pixel group is equal to or smaller than a predetermined value, it is not considered as an erasure target. The line width of the character in the input image can be determined by known detection means or based on the character size estimated by the character size estimation unit 0306. However, whether or not the group of connected black pixels is to be erased depends on the custom of the printed document that differs depending on the country, language, culture, business customs, etc., and is not limited to the conditions shown here. It suffices if at least the width of the connected black pixel group is equal to or smaller than the threshold (second threshold or less). 5 (c) and 5 (d) are diagrams showing a method for erasing additional lines between characters.

ステップS1009で、消去部0307は、比較部0305から取得した追記線情報に示される、消去対象の黒画素の位置情報を取得する。また、入力部0101から入力画像を取得する。そして、入力画像中の、追記線情報に示される位置の黒画素の画素値を操作し、白画素に変換する。   In step S <b> 1009, the erasing unit 0307 acquires the position information of the black pixel to be erased, which is indicated by the additional line information acquired from the comparison unit 0305. An input image is acquired from the input unit 0101. Then, the pixel value of the black pixel at the position indicated by the additional line information in the input image is manipulated and converted to a white pixel.

ステップS1010−1で識別部0303は、ステップS1000−2で抽出した連結黒画素群を全て選択したか否かを判断する。全て選択していればステップS1010−2へ進み、選択していない連結黒画素群が残っていればステップS1000−3に戻ってまだ選択していない連結黒画素群を選択する。ステップS1010−2で識別部0303は、全ての行間低密度領域を選択したか否かを判断する。全て選択していればステップS0405の処理を終了する。まだ選択していない行間低密度領域が残っていればステップS1000−1に戻って次の行間低密度領域を選択する。これらの処理によって図6(a)、(b)に示すように、行の間にある追記線若しくは追記線の一部分が消去される。図6(a)、(b)は、行間の線分消去の一例を示す図であり、(a)が処理前、(b)が処理後の一例である。   In step S1010-1, the identification unit 0303 determines whether all the connected black pixel groups extracted in step S1000-2 have been selected. If all of them are selected, the process proceeds to step S1010-2. If there are any unselected connected black pixel groups, the process returns to step S1000-3 to select an unselected connected black pixel group. In step S1010-2, the identification unit 0303 determines whether all the low-density regions between rows have been selected. If all are selected, the process of step S0405 is terminated. If an unselected low-line area between lines remains, the process returns to step S1000-1 to select the next low-line area between lines. By these processes, as shown in FIGS. 6A and 6B, the write-once line or a part of the write-online between the rows is erased. FIGS. 6A and 6B are diagrams showing an example of line segment erasing between rows. FIG. 6A shows an example before processing, and FIG. 6B shows an example after processing.

図8は、ステップS0408の文字間追記線消去処理のフローチャートである。基本的にステップS0408の処理はステップS0405と概ね同じである。しかし、ステップS0405の処理が行間の追記線や追記線の一部分を消去することを目的としているのに対し、ステップS0408の処理は文字間にある追記線や追記線の一部分を消去しているという違いがある。   FIG. 8 is a flowchart of the inter-character writing line erasing process in step S0408. Basically, the processing in step S0408 is substantially the same as that in step S0405. However, the process in step S0405 aims to erase the additional lines between lines and a part of the additional lines, whereas the process in step S0408 erases the additional lines and parts of the additional lines between characters. There is a difference.

まずステップS1100−1において、識別部0303は低密度文字間領域のうち1つを選択する。ステップ1100−2においては、識別部0303はステップS1100−1において選択した低密度文字間領域に対して、ステップS1000−2と同様に連結黒画素群抽出処理を行う。抽出した連結黒画素群を文字間連結黒画素群(第1のオブジェクト)と呼ぶ。識別部0303は、抽出した連結黒画素群を構成する黒画素のそれぞれの座標を、線情報として比較部0305に提供する。ステップS1100−3では、積算値計算部1601はステップS1100−2で抽出した連結黒画素群の1つを選択する。   First, in step S1100-1, the identification unit 0303 selects one of the low density inter-character areas. In step 1100-2, the identification unit 0303 performs a connected black pixel group extraction process on the low-density character space selected in step S1100-1 in the same manner as in step S1000-2. The extracted connected black pixel group is called an inter-character connected black pixel group (first object). The identification unit 0303 provides the coordinates of the extracted black pixels constituting the extracted connected black pixel group to the comparison unit 0305 as line information. In step S1100-3, the integrated value calculation unit 1601 selects one of the connected black pixel groups extracted in step S1100-2.

ステップS1101からステップS1106では、ステップS1100−3で選択した連結黒画素群の長さを求める。ステップS1101からステップS1106の処理は、長さを求める処理の一例である。ステップS1101からステップS1106までの処理は、積算値計算部1601が行う。   In steps S1101 to S1106, the length of the connected black pixel group selected in step S1100-3 is obtained. The processing from step S1101 to step S1106 is an example of processing for obtaining the length. The integrated value calculation unit 1601 performs the processing from step S1101 to step S1106.

まず、変数iを1で初期化し、変数Lを0で初期化する(ステップS1101)。横書きの文書の場合、iは連結黒画素群の左端を1とするx座標を示す。続けて、連結黒画素群のi列目の黒ランの1つを選択する(ステップS1102)。黒ランとは、列方向に連続する黒画素群を示す。1列に黒ランが複数存在する場合も考えられ、この場合は黒ランを1つずつ順番に、例えば上から、黒ランを選択すればよい。   First, the variable i is initialized with 1, and the variable L is initialized with 0 (step S1101). In the case of a horizontally written document, i indicates an x coordinate where the left end of the connected black pixel group is 1. Subsequently, one of the black runs in the i-th column of the connected black pixel group is selected (step S1102). A black run indicates a group of black pixels continuous in the column direction. There may be a case where a plurality of black runs exist in one row. In this case, black runs may be selected one by one in order, for example, from the top.

ステップS1103a〜ステップS1103eでは、黒ランに積算値というパラメータ値を割り当てる。積算値は以下のように計算する。まず、ステップS1102で選択した黒ランにi−1列目の黒ランが隣接して存在するか否かを調べる(ステップS1103a)。ステップS1103aでは、黒ラン同士が斜めに接していても隣接しているものと判断する。i−1列目の黒ランが隣接して存在する場合はステップS1103bに進み、隣接して存在しない場合はステップS1103cに進む。ステップS1103bに進んだ場合は、ステップS1102で選択した黒ランの重心と、i−1列目の隣接する黒ランの重心との間の距離に、i−1列目の隣接する黒ランの積算値を加えたものを、ステップS1102で選択した黒ランの積算値とする。ステップS1102で選択した黒ランに、i−1列目の黒ランが2つ以上接している場合には、それぞれのi−1列目の黒ランに対応する積算値を求め、合計した値をステップS1102で選択した黒ランAの積算値とする。例えば、i列目の黒ランAにi−1列目の黒ランB及びCが接している場合を考える。この場合、黒ランAの重心と黒ランBの重心との間の距離に黒ランBの積算値を足した値と、黒ランAの重心と黒ランCの重心との間の距離に黒ランCの積算値を足した値とを合計して、黒ランAの積算値とする。ステップS1103cに進んだ場合は、ステップS1102で選択した黒ランの積算値を1とする。   In steps S1103a to S1103e, a parameter value called an integrated value is assigned to the black run. The integrated value is calculated as follows. First, it is checked whether or not the black run selected in step S1102 is adjacent to the black run in the (i-1) th column (step S1103a). In step S1103a, it is determined that the black runs are adjacent to each other even if they are in contact with each other at an angle. If the black run in the (i-1) th column exists adjacently, the process proceeds to step S1103b. If the black run does not exist adjacently, the process proceeds to step S1103c. When the process proceeds to step S1103b, the integration of the black run adjacent to the (i-1) th column is added to the distance between the center of gravity of the black run selected at step S1102 and the barycenter of the black run adjacent to the (i-1) th column. The sum of the values is taken as the integrated value of the black run selected in step S1102. When two or more black runs in the (i-1) th column are in contact with the black run selected in step S1102, an integrated value corresponding to each black run in the (i-1) th column is obtained and the total value is obtained. The integrated value of the black run A selected in step S1102 is used. For example, consider a case where black runs A and i-1 are in contact with black runs A and i. In this case, black is added to the distance between the center of gravity of black run A and the center of gravity of black run B plus the integrated value of black run B and the distance between the center of gravity of black run A and the center of black run C. The sum of the integrated value of run C is added to obtain the integrated value of black run A. When the process proceeds to step S1103c, the integrated value of the black run selected in step S1102 is set to 1.

次にステップS1103dで、ステップS1102で選択した黒ランにi+1列目の黒ランが隣接して存在するか否かを調べる(ステップS1103d)。ステップS1103dでも、黒ラン同士が斜めに接していても隣接しているものと判断する。i+1列目の黒ランが隣接して存在する場合には、ステップS1104に進む。i+1列目の黒ランが隣接して存在しない場合は、ステップS1103eに進み、変数LにステップS1102で選択した黒ランの積算値を加えてから、ステップS1104に進む。   Next, in step S1103d, it is checked whether or not the black run selected in step S1102 is adjacent to the black run in the (i + 1) th column (step S1103d). Even in step S1103d, it is determined that the black runs are adjacent to each other even if they are in contact with each other at an angle. If there are adjacent black runs in the (i + 1) th column, the process advances to step S1104. If the black run in the (i + 1) th column does not exist adjacently, the process proceeds to step S1103e, and the integrated value of the black run selected in step S1102 is added to the variable L, and then the process proceeds to step S1104.

ステップS1104では、i列目にステップS1102で選択していない黒ランがまだ残っているか否かを判断する。まだ残っている場合は、ステップS1102に戻って次の黒ランを選択する。もう残っていない場合は、ステップS1105に進む。次にiをインクリメントし(ステップS1105)、iがステップS1100−3で選択した連結黒画素群中の画素列の数以下であるか否かを、判断する(ステップS1106)。iが連結黒画素群中の画素列の数以下であれば、ステップS1103に戻り、iが連結黒画素群中の画素列の数以下でなければ、ステップS1107へ進む。ステップS1107へ進む時の、変数Lの値が、連結黒画素群の長さに対応するパラメータ値を示す。   In step S1104, it is determined whether there is still a black run that has not been selected in step S1102 in the i-th column. If it remains, the process returns to step S1102 to select the next black run. If there is no more left, the process proceeds to step S1105. Next, i is incremented (step S1105), and it is determined whether i is equal to or smaller than the number of pixel columns in the connected black pixel group selected in step S1100-3 (step S1106). If i is less than or equal to the number of pixel columns in the connected black pixel group, the process returns to step S1103. If i is not less than or equal to the number of pixel columns in the connected black pixel group, the process proceeds to step S1107. The value of the variable L when proceeding to step S1107 indicates a parameter value corresponding to the length of the connected black pixel group.

線幅計算部1602はステップS1107で、ステップS1100−3で選択した連結黒画素群の幅に対応するパラメータ値(線幅)を求める。線幅は、連結黒画素群の黒画素数を、ステップS1101からステップS1106で求めた連結黒画素群の長さで割った数とする。   In step S1107, the line width calculation unit 1602 obtains a parameter value (line width) corresponding to the width of the connected black pixel group selected in step S1100-3. The line width is a number obtained by dividing the number of black pixels in the connected black pixel group by the length of the connected black pixel group obtained in steps S1101 to S1106.

低密度行領域における場合と同様、ステップS1101からステップS1107までの代わりに、線幅を求める他の方法を採用することも可能である。例えば、ステップS1100−3で選択した連結黒画素群の外接矩形を用いて推定する方法がある。ステップS1100−3で選択した連結黒画素群の外接矩形の、行方向の幅を連結黒画素群の長さに対応するパラメータ値として用いる。そして、ステップS1100−3で選択した連結黒画素群の黒画素数を、外接矩形の行方向の幅で除した値を、連結黒画素群の幅に対応するパラメータ値としてもよい。   As in the case of the low-density row region, another method for obtaining the line width can be employed instead of steps S1101 to S1107. For example, there is a method of estimating using the circumscribed rectangle of the connected black pixel group selected in step S1100-3. The width in the row direction of the circumscribed rectangle of the connected black pixel group selected in step S1100-3 is used as a parameter value corresponding to the length of the connected black pixel group. Then, a value obtained by dividing the number of black pixels of the connected black pixel group selected in step S1100-3 by the width in the row direction of the circumscribed rectangle may be used as a parameter value corresponding to the width of the connected black pixel group.

ステップS1108では、条件判定部1603はステップS1100−3で選択した連結黒画素群の幅と長さとが条件に合致するか否かを調べる。ここで条件とは、連結黒画素群の幅が入力画像中の文字の線幅(第1の閾値)以下である事と、連結黒画素群の長さが予め定められた値以上(第3の閾値以上)である事と、の2つとする。条件に合致する場合は、条件判定部1603は、ステップS1100−3で選択した連結黒画素群を、消去対象の追記線候補とする(ステップS1109)。条件に合致しない場合は、ステップS1100−3で選択した連結黒画素群は消去対象ではないと判断する。ただし、前述の通り条件はこれには限定されず、少なくとも連結黒画素群の幅が閾値以下(第1の閾値以下)であることが条件であればよい。   In step S1108, the condition determination unit 1603 checks whether or not the width and length of the connected black pixel group selected in step S1100-3 match the conditions. Here, the conditions are that the width of the connected black pixel group is equal to or smaller than the line width (first threshold) of the characters in the input image, and that the length of the connected black pixel group is equal to or greater than a predetermined value (third 2) or more. If the condition is met, the condition determining unit 1603 sets the connected black pixel group selected in step S1100-3 as a candidate for additional writing line to be erased (step S1109). If the condition is not met, it is determined that the connected black pixel group selected in step S1100-3 is not an erasure target. However, as described above, the condition is not limited to this, and it is only necessary that at least the width of the connected black pixel group is equal to or smaller than the threshold value (less than the first threshold value).

次に、その追記線若しくは追記線の一部分の候補を包含する連結黒画素群の幅が、領域毎に異なる、推定文字サイズに基づく計算値以上か否かを、条件判定部1603は判断する(ステップS1110)。この時、追記線若しくは追記線の一部分の候補を包含する連結黒画素群とは、ステップS1100−2で抽出した連結黒画素群のことではなく、ステップS0401で検出した連結黒画素群のことである。   Next, the condition determination unit 1603 determines whether or not the width of the connected black pixel group including the candidate for the additional line or a part of the additional line is equal to or greater than the calculated value based on the estimated character size, which is different for each region ( Step S1110). At this time, the connected black pixel group including the candidate for the additional line or a part of the additional line is not the connected black pixel group extracted in step S1100-2 but the connected black pixel group detected in step S0401. is there.

図9(e)は、連結黒画素領域の幅を示す図である。図9(e)の場合、「密度が低いと判断される部分」の追記線若しくは追記線の一部分の候補を包含する連結黒画素群とは、図9(e)の黒画素全体となる。「密度が低いと判断される部分」に存在する黒画素だけではないことに注意する。密度が低いと判断される部分(文字間)にある線は、ただ単に密度と線の幅のみから判断すると、文字の部分である可能性を否定しきれない。しかし、ステップS1110で追記線若しくは追記線の一部分の候補が属する連結黒画素群の幅を調べる事により、文字の部分である可能性を除外することが出来る。例えば、追記線によって文字が連結されている場合には、連結黒画素群が大きくなり、追記線若しくは追記線の一部分の候補が属する連結黒画素群の幅は推定文字サイズよりも大きくなる。それに対して、追記線を付されていない文字の部分が追記線若しくは追記線の一部分の候補となっている場合、追記線若しくは追記線の一部分の候補が属する連結黒画素群は、文字1文字程度の幅を持ち、およそ推定文字サイズ程度と考えられる。よって、追記線若しくは追記線の一部分の候補を包含する連結黒画素群の幅と、推定文字サイズに基づく計算値とを比較することで、追記線若しくは追記線の一部分の候補を包含する連結黒画素群が追記線を付されていない文字の部分かどうか、を確認できる。   FIG. 9E shows the width of the connected black pixel region. In the case of FIG. 9 (e), the connected black pixel group including the candidate for the additional writing line or the portion of the additional writing line of “part determined to be low in density” is the entire black pixel of FIG. 9 (e). Note that it is not just the black pixels that exist in the “part where the density is judged to be low”. A line in a portion (between characters) determined to be low in density cannot be denied the possibility of being a character portion simply based on the density and line width. However, the possibility of being a character part can be excluded by examining the width of the connected black pixel group to which the candidate for the additional line or a part of the additional line belongs in step S1110. For example, when characters are connected by additional writing lines, the connected black pixel group becomes larger, and the width of the connected black pixel group to which the candidate for the additional writing line or a part of the additional writing line belongs becomes larger than the estimated character size. On the other hand, if the part of the character that is not added with the additional line is a candidate for the additional line or part of the additional line, the connected black pixel group to which the candidate for the additional line or part of the additional line belongs is one character. It is considered to be about the estimated character size. Therefore, by comparing the width of the connected black pixel group that includes the candidate for the additional line or a part of the additional line with the calculated value based on the estimated character size, the connected black that includes the candidate for the additional line or a part of the additional line. It can be confirmed whether or not the pixel group is a portion of a character not provided with an additional writing line.

具体的には、文字サイズ推定部0306が推定した推定文字サイズに、予め定められた値を乗算して得た値を計算値とする。例えば、推定文字サイズが60pixelで、予め定められた値が2であれば、60×2=120ピクセルが、推定文字サイズに基づく計算値となる。推定文字サイズはブロック毎に計算されるから、当然計算値もブロック毎に違う値であってよい。   Specifically, a value obtained by multiplying the estimated character size estimated by the character size estimation unit 0306 by a predetermined value is used as a calculated value. For example, if the estimated character size is 60 pixels and the predetermined value is 2, 60 × 2 = 120 pixels is a calculated value based on the estimated character size. Since the estimated character size is calculated for each block, the calculated value may naturally be a different value for each block.

ステップS1110で、追記線若しくは追記線の一部分の候補が属する連結黒画素群の幅が計算値以上であれば、条件判定部1603は追記線若しくは追記線の一部分の候補は追記線若しくは追記線の一部分であると判断する。そして、追記線若しくは追記線の一部分の候補の線情報を追記線若しくは追記線の一部分の情報として消去部0307に提供する。続けてステップS1111で消去部0307は、比較部0305から取得した追記線情報に示される、消去対象の黒画素の位置情報を取得する。また、入力部0101から入力画像を取得する。そして、入力画像中の、追記線情報に示される位置の黒画素の画素値を操作し、白画素に変換し、ステップS1112−1に進む。また、ステップS1110で、追記線候補が属する連結黒画素群の幅が計算値以上ではなければ、追記線候補は追記線若しくは追記線の一部分ではないと判断し、ステップS1112−1に進む。   In step S1110, if the width of the connected black pixel group to which the candidate of the additional line or a part of the additional line belongs is equal to or greater than the calculated value, the condition determining unit 1603 determines that the candidate of the additional line or the additional line is the additional line or the additional line. Judge as part. Then, the additional line or candidate line information of the additional line is provided to the erasing unit 0307 as additional line or additional line information. Subsequently, in step S <b> 1111, the erasing unit 0307 acquires the position information of the black pixel to be erased, which is indicated by the additional line information acquired from the comparison unit 0305. An input image is acquired from the input unit 0101. Then, the pixel value of the black pixel at the position indicated by the additional line information in the input image is manipulated to convert it to a white pixel, and the process proceeds to step S1112-1. In step S1110, if the width of the connected black pixel group to which the additional line candidate belongs is not equal to or greater than the calculated value, it is determined that the additional line candidate is not the additional line or a part of the additional line, and the process proceeds to step S1112-1.

ステップS1112−1で識別部0303は、ステップS1100−2で抽出した連結黒画素群を全て選択したか否かを判断する。全て選択していればステップS1112−2へ進み、選択していない連結黒画素群が残っていればステップS1100−3に戻ってまだ選択していない連結黒画素群を選択する。ステップS1112−2で識別部0303は、全ての低密度文字間領域を選択したか否かを判断する。全て選択していればステップS0408の処理を終了する。まだ選択していない低密度文字間領域が残っていればステップS1100−1に戻って次の低密度文字間領域を選択する。これらの処理によって、図6(c)、(d)に示すように、文字の間の追記線や追記線の一部分が消去される。図6(c)、(d)は、文字間の線分消去の一例を示す図であり、図6(c)が処理前、図6(d)が処理後の一例である。   In step S1112-1, the identification unit 0303 determines whether all the connected black pixel groups extracted in step S1100-2 have been selected. If all have been selected, the process proceeds to step S1112-2, and if there remains a non-selected connected black pixel group, the process returns to step S1100-3 to select an unselected connected black pixel group. In step S <b> 1112-2, the identification unit 0303 determines whether all the low density inter-character areas have been selected. If all are selected, the process of step S0408 ends. If there is still a low-density character space area that has not yet been selected, the process returns to step S1100-1 to select the next low-density character space area. By these processes, as shown in FIGS. 6C and 6D, the additional writing line between characters and a part of the additional writing line are deleted. 6C and 6D are diagrams showing an example of line segment erasing between characters. FIG. 6C is an example before processing, and FIG. 6D is an example after processing.

図6(e)は、文字間の線分消去と連結画素領域との関係を示す図である。図6(e)を用いて、垂直方向の射影により得られる低密度部分にある線と、その線が属する連結黒画素群の関係について一例を示す。この図で示される連結黒画素領域の部分でもある追記線や追記線の一部分が消去され、文字間の情報が適切に抽出されるようになる。   FIG. 6E is a diagram showing a relationship between line segment erasure between characters and a connected pixel region. FIG. 6E shows an example of the relationship between a line in a low density portion obtained by vertical projection and a connected black pixel group to which the line belongs. The additional lines and part of the additional lines, which are also the connected black pixel areas shown in this figure, are deleted, and the information between characters is appropriately extracted.

以上の処理によって、文字間電子透かし検出性能を向上する前処理である、追記線や追記線の一部分の消去が可能となる。本実施例の方法は、特に文字間又は行間に2本以上の追記線や追記線の一部分が、交わらずに引かれている場合に有効である。射影を行った結果のみから判断すると、追記線は文字の部分と判断される可能性が高くなるが、線の太さを判別することにより、より正確に文字と追記線とを区別することができる。低密度領域を検出する際の閾値は、追記線や追記線の一部分を消去した後に文字矩形を抽出する際の閾値よりも高くすることが好ましい。閾値を高くすることで、文字か追記線、若しくはその部分か判断が難しい部分を低密度領域として太さの判別対象にできる。追記線消去処理によって判断の難しい追記線を消去することができるので、文字矩形を抽出する際に閾値を低くすると、追記線を除外しつつ判断の難しい文字を認識することができる。誤り訂正符号を用いて電子透かしを埋め込む事は、よく行われる事であるが、本実施例の処理は、この誤り訂正符号の技術を用いる事と相反するものではなく、むしろ相互補完的に機能するものである。   With the above processing, it is possible to erase a write-once line and a part of the write-online, which is a pre-process for improving the inter-character digital watermark detection performance. The method of the present embodiment is particularly effective when two or more additional write lines or a part of the additional write line is drawn without crossing between characters or lines. Judging from the result of the projection alone, there is a high possibility that the postscript line is judged to be a character part, but by distinguishing the thickness of the line, it is possible to more accurately distinguish the character and the postscript line. it can. The threshold for detecting the low density region is preferably higher than the threshold for extracting the character rectangle after erasing the postscript line or part of the postscript line. By increasing the threshold value, it is possible to set a character or a postscript line, or a portion where it is difficult to determine whether or not to be a low-density region as a thickness determination target. Since the write-once line that is difficult to determine can be erased by the process of deleting the write-online, if the threshold value is lowered when extracting the character rectangle, it is possible to recognize a character that is difficult to determine while excluding the write-online. Although it is common to embed a digital watermark using an error correction code, the processing of this embodiment does not conflict with the use of this error correction code technology, but rather functions in a mutually complementary manner. To do.

本実施例では、文字の間の空白部分に付された追記線を消去することにより、文字間電子透かしの読取精度を向上させる方法について述べた。しかし、電子透かしを読み取るためには文字間に付された追記線若しくは追記線の一部分、のみを消去すれば十分であることが多い。この場合、行間の処理に関するステップS0404及びステップS0405の処理を省略しても、文字間の追記線若しくは追記線の一部分を消去して文字間電子透かしの読取精度を向上させることが可能である。   In the present embodiment, the method for improving the reading accuracy of the inter-character digital watermark by erasing the additional lines attached to the blank portion between the characters has been described. However, in order to read a digital watermark, it is often sufficient to delete only the additional line or part of the additional line provided between characters. In this case, even if the processing of step S0404 and step S0405 related to the processing between lines is omitted, it is possible to delete the additional writing line between characters or a part of the additional writing line and improve the reading accuracy of the inter-character digital watermark.

また、追記線候補を含む連結黒画素群の幅が一定以上であるかどうかを判断するステップS1110の処理はあることが好ましいが、文字の線幅よりも十分に細い追記線を消去することが目的であれば、省略することも可能である。この場合、ステップS1109及びステップS1110の処理を省略することができる。また、連結画素領域抽出部0304及び文字サイズ推定部0306を省くこともできる。反対に、本実施例では追記線候補を含む連結黒画素群の幅が一定以上であるかどうかを判断する処理は文字間の追記線候補についてのみ行ったが、行間の追記線若しくは追記線の一部分を検出する際に同様に行ってもよい。   Further, although it is preferable that there is a process of step S1110 to determine whether or not the width of the connected black pixel group including the additional writing line candidate is equal to or larger than a certain value, it is possible to delete the additional writing line that is sufficiently narrower than the line width of the character. It can be omitted if desired. In this case, the process of step S1109 and step S1110 can be omitted. Further, the connected pixel region extraction unit 0304 and the character size estimation unit 0306 can be omitted. On the contrary, in this embodiment, the process of determining whether or not the width of the connected black pixel group including the additional line candidate is greater than a certain value is performed only for the additional line candidate between characters. You may perform similarly when detecting a part.

本実施例では、入力画像から、文字の間の空白部分に付された追記線若しくは追記線の一部分を消去した画像を出力し、この画像から電子透かしを読み取る装置について述べた。しかし、文字間電子透かしの読取精度を向上させるという目的に照らせば、必ずしも追記線を消去した画像を出力する必要はない。すなわち、追記線若しくは追記線の一部分であると判断された画素の座標を記憶しておく。そして、文字の間の空白長を検出する際、すなわち外接矩形を検出する際に、追記線若しくは追記線の一部分であると判断された画素群を白画素群であると見なす構成をとれば十分である。この構成においては、出力部0309は必要なく、比較部0305が提供する追記線情報を記憶部0308に格納し、ステップS0203の文字矩形抽出処理において記憶部0308に格納された追記線情報を利用すればよい。   In the present embodiment, an apparatus has been described in which an image obtained by erasing an additional line or a part of an additional line attached to a blank portion between characters from an input image and reading an electronic watermark from the image is described. However, in view of the purpose of improving the reading accuracy of the intercharacter digital watermark, it is not always necessary to output an image from which the additional writing line has been deleted. That is, the coordinates of a pixel determined to be a write-on line or a part of the write-on line are stored. When detecting the space length between characters, that is, when detecting a circumscribed rectangle, it is sufficient to take a configuration in which a pixel group determined to be a write-on line or a part of the write-on line is regarded as a white pixel group. It is. In this configuration, the output unit 0309 is not necessary, the additional line information provided by the comparison unit 0305 is stored in the storage unit 0308, and the additional line information stored in the storage unit 0308 is used in the character rectangle extraction process in step S0203. That's fine.

また、本実施例では、テキスト領域のみからなる画像が入力されることが前提となっているが、前段として、画像や、表、グラフ、テキストといった属性を持つ領域に分割する、領域分割の手段を用いることもできる。領域分割の手段を用いた後に、本実施例で示される構成のシステムに対して、テキスト領域のみを画像として入力する事も、当然のことながら考える事が出来る。また、行間のほぼ水平な線は行の高さを見て除去可能であり、文字間のほぼ垂直な線は、幅を他の文字幅との比較で区別出来る。従って、上述の実施例中において除去する線の対象は、必要ならば、連結要素の外接矩形のパラメータ(幅や高さ)を用いて除去することも可能であることはいうまでもない。   Also, in this embodiment, it is assumed that an image consisting only of a text area is input, but as a preceding stage, an area dividing means for dividing the image into areas having attributes such as an image, a table, a graph, and text. Can also be used. Naturally, it is possible to input only the text area as an image to the system having the configuration shown in the present embodiment after using the area dividing means. In addition, a substantially horizontal line between lines can be removed by looking at the height of the line, and a substantially vertical line between characters can be distinguished by comparing the width with other character widths. Therefore, it goes without saying that the object of the line to be removed in the above-described embodiment can be removed by using the parameters (width and height) of the circumscribed rectangle of the connecting element, if necessary.

なお、上述した実施例においては、文字の線幅の計算方法として以下のような計算手順(1.〜7.)が挙げられる。下にいくほど厳密で、計算量の増大が見込まれる。どの手順を用いるかは、適用対象と実際に運用されるシステムの非機能要件(抽出速度等)に依る。
1.文字の外接矩形内をラスタースキャン(若しくは、その90度単位での回転)して、黒ランを求め、そのヒストグラムを求めて、頻度の高い黒ランの長さを、文字幅とする。
2.文字サイズ及び文字密度を計算し、テーブルから概算値を計算する。(文字サイズ推定部0306とも関連しその結果を利用してもよい。)
3.文字認識、文字サイズ及び文字密度を計算し、テーブルから概算値を計算する。
4.細線化の後、画素数を数え上げ、(細線化前文字画素数/画素数)を計算する。
5.細線化の後、画素間距離を計測し、(細線化前文字画素数/画素間距離合計)を計算する。
6.細線化の後、2次Spline曲線化し、距離計算をして、(細線化前文字画素数又は文字黒い領域面積/文字骨格長さ)を計算する。
7.細線化の後、3次Spline曲線化し、距離計算をして、(細線化前文字画素数又は文字黒い領域面積/文字骨格長さ)を計算する。
8.文字のベクトル化の後、文字のアウトラインの長さを計算(結果をaとする)し、文字の面積を計算(結果をbとする)し、(b/a)×2を文字の線幅として計算する。
In the above-described embodiment, the following calculation procedures (1 to 7) can be cited as a method for calculating the line width of a character. The more accurate it is, the more computational complexity is expected. Which procedure is used depends on the application target and the non-functional requirements (extraction speed, etc.) of the actually operated system.
1. A raster scan (or rotation in units of 90 degrees) of the circumscribed rectangle of the character is performed to obtain a black run, a histogram thereof is obtained, and the length of the frequent black run is set as the character width.
2. The character size and character density are calculated, and an approximate value is calculated from the table. (The result may be used in connection with the character size estimation unit 0306.)
3. Calculate character recognition, character size and character density, and calculate approximate values from the table.
4). After thinning, the number of pixels is counted and (number of character pixels before thinning / number of pixels) is calculated.
5). After thinning, the distance between pixels is measured and (number of character pixels before thinning / total distance between pixels) is calculated.
6). After thinning, a second-order Spline curve is formed, and distance calculation is performed to calculate (number of character pixels before thinning or character black area / character skeleton length).
7). After thinning, a cubic Spline curve is formed, and distance calculation is performed to calculate (number of character pixels before thinning or character black area / character skeleton length).
8). After character vectorization, calculate the length of the outline of the character (result is a), calculate the area of the character (result is b), and (b / a) × 2 is the line width of the character Calculate as

・2.及び3.について
ここで用いるテーブルとは、文字の密度、サイズ、若しくは文字認識結果から、対応する文字線幅を決定するための表である。このテーブルは予め人間が作成してもよいし、機械学習の方法を用いて統計的に作成してもよい。また、このテーブルの部分は、機械学習によって若しくは人間によって、作成された関数であってもよい。また、文字線幅は、文字を幅のない線として表した文字の骨格の長さで、文字の面積を割ったものとする。また、テーブルの作成にあたっては、後述する文字線幅の計算の利用も考えられる。こうした方法は、予め使われる文字フォントが既知であり、限定される場合、特に高速化と結果の信頼性の両立が要求される際に、有効である。
・ 2. And 3. About The table used here is a table for determining the corresponding character line width from the character density, size, or character recognition result. This table may be created in advance by a human or statistically created using a machine learning method. Further, the part of the table may be a function created by machine learning or by a human. In addition, the character line width is obtained by dividing the area of the character by the length of the character skeleton representing the character as a line having no width. In creating the table, it is also possible to use the calculation of the character line width described later. Such a method is effective when a character font used in advance is known and limited, and particularly when both speeding up and reliability of the result are required.

また、追記線若しくは追記線の一部分の線幅計算方法は、上述した方法の替わりに下記のような手順(1.〜5.)を用いる事も考えられる。(上の方が概算で、下にいくほど厳密だが計算量が多くなる。)これについても、実際にどの手順を用いるかは、適用対象と、実際に運用されるシステムの非機能要件(抽出速度等)による。
1.細線化の後、画素数を数え上げ、(細線化前文字画素数/画素数)を計算する。
2.細線化の後、画素間距離を計測し、 (細線化前文字画素数/画素間距離合計)を計算する。
3.細線化の後、2次Spline曲線化し、線の長さを計算して、(細線化前文字画素数or候補線の黒い領域面積/細線化した線の長さ)を計算する。
4.細線化の後、3次Spline曲線化し、線の長さを計算して、(細線化前文字画素数 or 候補線の黒い領域面積/細線化した線の長さ)を計算する。
5.ベクトル化の後、アウトラインの長さを計算(結果をaとする)し、線の面積を計算(結果をbとする)して、(b/a)×2を線幅として計算する。
In addition, as a method for calculating the line width of a write-on line or a part of the write-on line, the following procedure (1-5) may be used instead of the method described above. (The upper one is an approximation, and the lower it is, the more precise it is, but the more it will be, the more computation is required.) Also for this, which procedure is actually used depends on the application target and the non-functional requirements of the system actually operated Speed).
1. After thinning, the number of pixels is counted and (number of character pixels before thinning / number of pixels) is calculated.
2. After thinning, measure the distance between pixels and calculate (number of character pixels before thinning / total distance between pixels).
3. After thinning, a second-order Spline curve is formed and the length of the line is calculated to calculate (number of character pixels before thinning or area of black area of candidate line / length of thinned line).
4). After thinning, a third-order Spline curve is formed, and the length of the line is calculated to calculate (number of character pixels before thinning or area of black area of candidate line / length of thinned line).
5). After vectorization, the length of the outline is calculated (result is a), the area of the line is calculated (result is b), and (b / a) × 2 is calculated as the line width.

以上で用いられる細線化の処理は、「画像処理の基本技法」<技法入門編>長谷川、輿水、中山、横井共著(技術評論社)のp.68〜に記載されている、横井の8連結細線化アルゴリズムを用いてもよい。また、「C言語による画像処理入門」(昭晃堂)に書かれているHildithの細線化法等を用いてもよい。また、何か他の細線化のための処理でもよい。   The thinning process used above is described in “Basic Techniques of Image Processing” <Introduction to Techniques> Hasegawa, Usui, Nakayama, and Yokoi Co. A thinning algorithm may be used. Alternatively, Hildith's thinning method described in “Introduction to Image Processing in C Language” (Shokodo) may be used. Also, some other thinning process may be used.

[実施例2]
実施例1では、図1に示した各部はハードウェアで実装しているものとしているが、記憶部0308以外の各部をソフトウェアで実装してもよい。この場合、係るソフトウェアは、コンピュータが有する各種記憶装置内に保持されており、CPUがこのソフトウェアを実行することで、コンピュータは、図1に示した各部の機能を実現することになる。また、記憶部0308は、主記憶装置又はハードディスク等の記憶装置を用いて実現することができる。
[Example 2]
In the first embodiment, each unit illustrated in FIG. 1 is implemented by hardware, but each unit other than the storage unit 0308 may be implemented by software. In this case, the software is stored in various storage devices included in the computer, and the computer implements the functions of each unit illustrated in FIG. 1 by the CPU executing the software. The storage unit 0308 can be realized using a storage device such as a main storage device or a hard disk.

図10は、本実施形態適用可能なコンピュータのハードウェア構成を示すブロック図である。コンピュータ1801は、一般に普及しているパーソナルコンピュータ等の汎用の情報処理装置である。コンピュータ1801の内部では、バス1807により後述する各ブロックが接続され、種々のデータの受け渡しが可能である。   FIG. 10 is a block diagram showing a hardware configuration of a computer applicable to this embodiment. The computer 1801 is a general-purpose information processing apparatus such as a personal computer that is generally used. Inside the computer 1801, blocks to be described later are connected by a bus 1807, and various data can be transferred.

なお、本コンピュータ1801を適用する装置によっては、図10に示した全ての構成要素は必須なものではないので、適宜省略してもよい。また、同種の機能を有するハードウェアで置換してもよいし、複数のコンピュータ機体によってコンピュータ1801が構成されていてもよい。
図10において1802はCPUで、主記憶装置1803にロードされているプログラムやデータを用いて本コンピュータ1801全体の制御を行うとともに、本コンピュータ1801を適用した画像処理装置が行う上述の各処理を実行する。
Depending on the device to which the computer 1801 is applied, all the components shown in FIG. 10 are not essential, and may be omitted as appropriate. Further, hardware having the same type of function may be replaced, or the computer 1801 may be configured by a plurality of computer bodies.
In FIG. 10, a CPU 1802 controls the entire computer 1801 using programs and data loaded in the main storage device 1803 and executes the above-described processes performed by the image processing apparatus to which the computer 1801 is applied. To do.

1803はRAMに代表される主記憶装置である。主記憶装置1803は、各種記憶装置から読み込んだプログラムやデータを一時的に記憶する為のエリアを有する。記憶装置には、HDD(ハードディスクドライブ)1804、CDドライブ1809、DVDドライブ1810、FDD(フロッピー(登録商標)ディスクドライブ)1811等を含む。さらに主記憶装置1803は、スキャナ1817から、I/F(インターフェース)215を介して取得した画像のデータを一時的に記憶するためのエリアも有する。さらに主記憶装置1803は、CPU1802が各種の処理を実行する際に用いるワークエリアも有する。以上を含め、主記憶装置1803は、各種の情報記録場所を適宜提供することができる。   Reference numeral 1803 denotes a main memory represented by RAM. The main storage device 1803 has an area for temporarily storing programs and data read from various storage devices. The storage device includes an HDD (hard disk drive) 1804, a CD drive 1809, a DVD drive 1810, an FDD (floppy (registered trademark) disk drive) 1811, and the like. Further, the main storage device 1803 also has an area for temporarily storing image data acquired from the scanner 1817 via the I / F (interface) 215. Further, the main storage device 1803 also has a work area that is used when the CPU 1802 executes various processes. Including the above, the main storage device 1803 can provide various information recording locations as appropriate.

1804はHDDで、ここにはOS(オペレーティングシステム)や、各種の画像(文書画像を含む)を保持している。さらにHDD1804には、図10が示す各部の機能をCPU1802に制御させるための、あるいはコンピュータ1801を適用した装置が行う上述の各処理をCPU1802に実行させるためのプログラムやデータも保存されている。HDD1804が保持しているプログラムやデータは、CPU1802による制御に従って主記憶装置1803に適宜ロードされ、CPU1802による処理対象となる。なお、主記憶装置1803に記憶するものとして説明した情報の幾つかについてはHDD1804に保存するようにしてもよい。   An HDD 1804 holds an OS (operating system) and various images (including document images). Further, the HDD 1804 also stores programs and data for causing the CPU 1802 to control the functions of the units illustrated in FIG. 10 or for causing the CPU 1802 to execute the above-described processes performed by an apparatus to which the computer 1801 is applied. Programs and data stored in the HDD 1804 are appropriately loaded into the main storage device 1803 according to control by the CPU 1802 and are processed by the CPU 1802. Note that some of the information described as being stored in the main storage device 1803 may be stored in the HDD 1804.

1805はビデオコントローラで、主記憶装置1803やHDD1804等から受けた画像データや文字データといった表示データを信号としてモニタ1806に送出するものである。モニタ1806はCRTや液晶画面等により構成されており、ビデオコントローラ1805から受けた信号に基づいた画像や文字等を表示する。1808は、コンピュータ1801にプリンタ1816を接続するためのI/Fである。コンピュータ1801はこのI/F1808を介してプリンタ1816に対して印刷データを送信し、プリンタ1816が送信するプリンタ1816の状態情報を受信できる。   Reference numeral 1805 denotes a video controller which sends display data such as image data and character data received from the main storage device 1803 and the HDD 1804 to the monitor 1806 as a signal. A monitor 1806 includes a CRT, a liquid crystal screen, and the like, and displays images, characters, and the like based on signals received from the video controller 1805. Reference numeral 1808 denotes an I / F for connecting the printer 1816 to the computer 1801. The computer 1801 can transmit print data to the printer 1816 via the I / F 1808 and receive status information of the printer 1816 transmitted by the printer 1816.

1809はCDドライブで、記憶媒体としてのCDに記録されているプログラムやデータを読み出し、読み出したプログラムやデータをHDD1804や主記憶装置1803等に送出する。1810はDVDドライブで、記憶媒体としてのDVDに記録されているプログラムやデータを読み出し、読み出したプログラムやデータをHDD1804や主記憶装置1803等に送出する。1811はFDDで、記憶媒体としてのフロッピー(登録商標)ディスクに記録されているプログラムやデータを読み出し、読み出したプログラムやデータをHDD1804や主記憶装置1803等に送出する。   A CD drive 1809 reads programs and data recorded on a CD as a storage medium, and sends the read programs and data to the HDD 1804, the main storage device 1803, and the like. A DVD drive 1810 reads programs and data recorded on a DVD as a storage medium, and sends the read programs and data to the HDD 1804 and the main storage device 1803. Reference numeral 1811 denotes an FDD, which reads out programs and data recorded on a floppy (registered trademark) disk as a storage medium, and sends the read programs and data to the HDD 1804, the main storage device 1803, and the like.

1813、1814はそれぞれ、操作入力装置としてのマウス、キーボードである。本コンピュータ1801のユーザは、このマウス1813やキーボード1814を操作することで、各種の指示をCPU1802に対して入力することができる。1812は、キーボード1814、マウス1813をバスに接続するためのI/Fである。マウス1813やキーボード1814からユーザが入力した操作指示は信号としてI/F1812を介してCPU1802に送出される。   Reference numerals 1813 and 1814 denote a mouse and a keyboard as operation input devices, respectively. A user of the computer 1801 can input various instructions to the CPU 1802 by operating the mouse 1813 and the keyboard 1814. Reference numeral 1812 denotes an I / F for connecting the keyboard 1814 and the mouse 1813 to the bus. An operation instruction input by the user from the mouse 1813 or the keyboard 1814 is sent as a signal to the CPU 1802 via the I / F 1812.

1815は、原稿やフィルム等を読み取ることで画像データを生成するスキャナ1817を本コンピュータ1801に接続するためのものである。スキャナ1817が生成した画像データはこのI/F1815を介してHDD1804や主記憶装置1803等に送出される。   Reference numeral 1815 is for connecting a scanner 1817 that generates image data by reading a document, a film, or the like to the computer 1801. Image data generated by the scanner 1817 is sent to the HDD 1804, the main storage device 1803, and the like via the I / F 1815.

1818は、他のコンピュータ等の電子機器との情報をやりとりするためのI/Fである。CPU1802の指示によりネットワーク1819から取得された画像データを含む情報は、このI/F1818を介してHDD1804や主記憶装置1803等に送出される。   Reference numeral 1818 denotes an I / F for exchanging information with an electronic device such as another computer. Information including image data acquired from the network 1819 according to an instruction from the CPU 1802 is sent to the HDD 1804, the main storage device 1803, and the like via the I / F 1818.

[その他の実施形態]
また、本発明の目的は、以下のようにすることによっても達成されることは言うまでもない。即ち、前述した実施形態の機能を実現するコンピュータプログラムのコードを記録した記録媒体(又は記憶媒体)を、システムあるいは装置に供給する。そして、そのシステムあるいは装置のコンピュータ(又はCPUやMPU)が記録媒体に格納されたプログラムコードを読み出し実行する。この場合、記録媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコード、及びそれを記録した記録媒体は本発明を構成することになる。
[Other Embodiments]
Needless to say, the object of the present invention can also be achieved as follows. That is, a recording medium (or storage medium) that records a computer program code that implements the functions of the above-described embodiments is supplied to a system or apparatus. Then, the computer (or CPU or MPU) of the system or apparatus reads and executes the program code stored in the recording medium. In this case, the program code read from the recording medium itself realizes the functions of the above-described embodiment, and the program code and the recording medium on which the program code is recorded constitute the present invention.

また、コンピュータが読み出したコンピュータプログラムのコードを実行することにより、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているオペレーティングシステム(OS)等が実際の処理の一部又は全部を行う場合がある。その処理によって前述した実施形態の機能が実現される場合も本発明に含まれることは言うまでもない。   Further, when the computer program code read by the computer is executed, an operating system (OS) or the like running on the computer may perform part or all of the actual processing based on the instruction of the program code. is there. Needless to say, the present invention includes the case where the functions of the above-described embodiments are realized by the processing.

さらに、記録媒体から読み出されたコンピュータプログラムのコードが、コンピュータに挿入された機能拡張カードやコンピュータに接続された機能拡張ユニットに備わるメモリに書込まれたとする。その後、そのプログラムコードの指示に基づき、その機能拡張カードや機能拡張ユニットに備わるCPU等が実際の処理の一部又は全部を行い、その処理によって前述した実施形態の機能が実現される場合も本発明に含まれることも言うまでもない。   Further, it is assumed that the computer program code read from the recording medium is written in a memory provided in a function expansion card inserted into the computer or a function expansion unit connected to the computer. Then, based on the instruction of the program code, the CPU or the like provided in the function expansion card or function expansion unit performs part or all of the actual processing, and the functions of the above-described embodiments are realized by the processing. Needless to say, it is included in the invention.

Claims (9)

埋め込み情報に応じて文字間距離を制御することでこの埋め込み情報を埋め込む埋め込み方法に従って埋め込み情報が埋め込まれた文書画像を取得する手段と、
前記文書画像中に記されている文字の並び方向を行方向、行方向と直交する方向を列方向とする場合に、前記文書画像における空白行領域を特定する手段と、
前記文書画像において前記空白行領域以外の領域を文字列領域として特定する手段と、 前記文字列領域において文字間領域を特定する手段と、
前記文書画像において文字部を構成する画素と同じ画素値を有する画素を黒画素、黒画素以外の画素を白画素とする場合に、前記文字間領域内で、隣接する黒画素群で構成されている第1のオブジェクトを検出する手段と、
前記第1のオブジェクトの線幅を、前記第1のオブジェクトに対するパラメータ値として求める手段と、
前記文書画像の行方向、列方向のそれぞれについて射影を求め、求めた射影に基づいて前記文書画像を構成する各文字部の外接矩形を求める計算手段と、
それぞれの外接矩形間の距離に基づいて、前記文書画像に対して埋め込まれた埋め込み情報を抽出する手段とを備え、
前記計算手段は、前記第1のオブジェクトに対するパラメータ値が第1の閾値以下の場合には、前記第1のオブジェクトを、白画素群で構成されている領域として見なした後、前記文書画像の行方向の射影を求め、その結果得られる密度によって行を求め、続いて各行毎に行と直交する方向の射影を求める事により前記文書画像を構成する各文字部の外接矩形を求めることを特徴とする画像処理装置。
Means for acquiring a document image in which the embedded information is embedded in accordance with an embedding method for embedding the embedded information by controlling the distance between characters according to the embedded information;
Means for specifying a blank line area in the document image when the direction of arrangement of characters written in the document image is the row direction and the direction orthogonal to the row direction is the column direction;
Means for specifying an area other than the blank line area in the document image as a character string area; means for specifying an inter-character area in the character string area;
When a pixel having the same pixel value as a pixel constituting the character part in the document image is a black pixel, and a pixel other than the black pixel is a white pixel, the document image is composed of adjacent black pixels in the inter-character area. Means for detecting a first object that is present;
Means for determining a line width of the first object as a parameter value for the first object;
Calculating means for obtaining a projection for each of a row direction and a column direction of the document image, and obtaining a circumscribed rectangle of each character part constituting the document image based on the obtained projection;
Means for extracting embedded information embedded in the document image based on the distance between each circumscribed rectangle;
If the parameter value for the first object is less than or equal to a first threshold value, the calculation means regards the first object as an area composed of white pixel groups, and then calculates the document image Obtaining a projection in the line direction, obtaining a line according to a density obtained as a result, and then obtaining a projection in a direction orthogonal to the line for each line to obtain a circumscribed rectangle of each character part constituting the document image An image processing apparatus.
前記空白行領域内で、隣接する黒画素群で構成されている第2のオブジェクトを検出する手段をさらに備え、
前記第2のオブジェクトの線幅を、前記第2のオブジェクトに対するパラメータ値として求める手段と、
前記計算手段は、前記第1のオブジェクトに対するパラメータ値が第1の閾値以下の場合には、前記第1のオブジェクトを、白画素群で構成されている領域として見なし、前記第2のオブジェクトに対するパラメータ値が第2の閾値以下の場合には、前記第2のオブジェクトを、白画素群で構成されている領域として見なした後、前記文書画像の行方向の射影を求め、その結果得られる密度によって行を求め、続いて各行毎に行と直交する方向の射影を求める事により前記文書画像を構成する各文字部の外接矩形を求めることを特徴とする請求項1に記載の画像処理装置。
Means for detecting a second object composed of a group of adjacent black pixels in the blank row region;
Means for determining a line width of the second object as a parameter value for the second object;
When the parameter value for the first object is less than or equal to a first threshold, the calculation means regards the first object as an area composed of white pixel groups, and sets the parameter for the second object. If the value is less than or equal to the second threshold value, the second object is regarded as an area composed of white pixel groups, and then a projection in the row direction of the document image is obtained, and the resulting density The image processing apparatus according to claim 1, wherein a circumscribing rectangle of each character portion constituting the document image is obtained by obtaining a line by the step and then obtaining a projection in a direction orthogonal to the line for each line.
前記計算手段は、前記第1のオブジェクトからなる線の長さが第3の閾値以上の場合に、前記第1のオブジェクトを白画素群で構成されている領域として見なし、前記第2のオブジェクトからなる線の長さが第4の閾値以上の場合に、前記第2のオブジェクトを白画素群で構成されている領域として見なすことを特徴とする、請求項2に記載の画像処理装置。   The calculation means regards the first object as an area configured by a group of white pixels when the length of the line made of the first object is equal to or greater than a third threshold value, and determines from the second object 3. The image processing apparatus according to claim 2, wherein the second object is regarded as an area composed of a group of white pixels when the length of the line is equal to or greater than a fourth threshold value. 前記文書画像内で、隣接する黒画素群で構成されている第3のオブジェクトを検出する手段をさらに備え、
前記計算手段は、前記第1のオブジェクトを包含する前記第3のオブジェクトの大きさが閾値以下である場合に、前記第1のオブジェクトを白画素群で構成されている領域として見なすことを特徴とする請求項2又は3の何れか1項に記載の画像処理装置。
Means for detecting a third object comprised of adjacent black pixels in the document image;
The calculating means regards the first object as an area composed of a group of white pixels when the size of the third object including the first object is equal to or smaller than a threshold value. The image processing apparatus according to any one of claims 2 and 3.
前記第1のオブジェクトを構成する黒画素の数を、前記第1のオブジェクトの行方向の長さで除した値を、前記第1のオブジェクトの線幅として求め、
前記第2のオブジェクトを構成する黒画素の数を、前記第2のオブジェクトの列方向の長さで除した値を、前記第2のオブジェクトの線幅として求めることを特徴とする、請求項2乃至4の何れか1項に記載の画像処理装置。
A value obtained by dividing the number of black pixels constituting the first object by the length in the row direction of the first object is obtained as a line width of the first object,
3. The value obtained by dividing the number of black pixels constituting the second object by the length in the column direction of the second object is obtained as a line width of the second object. 5. The image processing apparatus according to any one of items 4 to 4.
前記第1の閾値及び前記第2の閾値は、前記文書画像中の文字の線幅に基づいて定められることを特徴とする、請求項2乃至5の何れか1項に記載の画像処理装置。   The image processing apparatus according to claim 2, wherein the first threshold value and the second threshold value are determined based on a line width of characters in the document image. 画像処理装置が行う画像処理方法であって、
埋め込み情報に応じて文字間距離を制御することでこの埋め込み情報を埋め込む埋め込み方法に従って埋め込み情報が埋め込まれた文書画像を取得する工程と、
前記文書画像中に記されている文字の並び方向を行方向、行方向と直交する方向を列方向とする場合に、前記文書画像における空白行領域を特定する工程と、
前記文書画像において前記空白行領域以外の領域を文字列領域として特定する工程と、
前記文字列領域において文字間領域を特定する工程と、
前記文書画像において文字部を構成する画素と同じ画素値を有する画素を黒画素、黒画素以外の画素を白画素とする場合に、前記文字間領域内で、隣接する黒画素群で構成されている第1のオブジェクトを検出する工程と、
前記第1のオブジェクトの線幅を、前記第1のオブジェクトに対するパラメータ値として求める工程と、
前記文書画像の行方向、列方向のそれぞれについて射影を求め、求めた射影に基づいて前記文書画像を構成する各文字部の外接矩形を求める計算工程と、
それぞれの外接矩形間の距離に基づいて、前記文書画像に対して埋め込まれた埋め込み情報を抽出する工程とを備え、
前記計算工程では、前記第1のオブジェクトに対するパラメータ値が第1の閾値以下の場合には、前記第1のオブジェクトを、白画素群で構成されている領域として見なした後、前記文書画像の行方向の射影を求め、その結果得られる密度によって行を求め、続いて各行毎に行と直交する方向の射影を求める事により前記文書画像を構成する各文字部の外接矩形を求めることを特徴とする画像処理方法。
An image processing method performed by an image processing apparatus,
Acquiring a document image in which the embedded information is embedded in accordance with an embedding method for embedding the embedded information by controlling the distance between characters according to the embedded information;
Specifying a blank line area in the document image when the line direction is a line direction of characters written in the document image and the column direction is a direction orthogonal to the line direction;
Identifying an area other than the blank line area as a character string area in the document image;
Identifying an inter-character area in the character string area;
When a pixel having the same pixel value as a pixel constituting the character part in the document image is a black pixel, and a pixel other than the black pixel is a white pixel, the document image is composed of adjacent black pixels in the inter-character area. Detecting a first object that is present;
Obtaining a line width of the first object as a parameter value for the first object;
A calculation step for obtaining a projection for each of the row direction and the column direction of the document image, and obtaining a circumscribed rectangle of each character part constituting the document image based on the obtained projection;
Extracting embedded information embedded in the document image based on a distance between each circumscribed rectangle,
In the calculation step, when the parameter value for the first object is equal to or less than a first threshold value, the first object is regarded as an area composed of a group of white pixels, and then the document image Obtaining a projection in the line direction, obtaining a line according to a density obtained as a result, and then obtaining a projection in a direction orthogonal to the line for each line to obtain a circumscribed rectangle of each character part constituting the document image An image processing method.
コンピュータを、請求項1乃至6の何れか1項に記載の画像処理装置が有する各手段として機能させるためのコンピュータプログラム。   The computer program for functioning a computer as each means which the image processing apparatus of any one of Claims 1 thru | or 6 has. 請求項8に記載のコンピュータプログラムを格納した、コンピュータが読み取り可能な記憶媒体。   A computer-readable storage medium storing the computer program according to claim 8.
JP2009104547A 2009-04-22 2009-04-22 Image processor, image processing method, program, and storage medium Withdrawn JP2010258627A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009104547A JP2010258627A (en) 2009-04-22 2009-04-22 Image processor, image processing method, program, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009104547A JP2010258627A (en) 2009-04-22 2009-04-22 Image processor, image processing method, program, and storage medium

Publications (1)

Publication Number Publication Date
JP2010258627A true JP2010258627A (en) 2010-11-11

Family

ID=43319073

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009104547A Withdrawn JP2010258627A (en) 2009-04-22 2009-04-22 Image processor, image processing method, program, and storage medium

Country Status (1)

Country Link
JP (1) JP2010258627A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017069435A (en) * 2015-09-30 2017-04-06 ファナック株式会社 Machine learning device and magnetization device for electric motor
CN111738898A (en) * 2020-06-17 2020-10-02 友虹(北京)科技有限公司 Text digital watermark embedding \ extracting method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017069435A (en) * 2015-09-30 2017-04-06 ファナック株式会社 Machine learning device and magnetization device for electric motor
US10061276B2 (en) 2015-09-30 2018-08-28 Fanuc Corporation Machine learning system and magnetizer for motor
CN111738898A (en) * 2020-06-17 2020-10-02 友虹(北京)科技有限公司 Text digital watermark embedding \ extracting method and device
CN111738898B (en) * 2020-06-17 2023-09-22 友虹(北京)科技有限公司 Text digital watermark embedding/extracting method and device

Similar Documents

Publication Publication Date Title
JP4310288B2 (en) Image processing apparatus and method, program, and storage medium
US5748809A (en) Active area identification on a machine readable form using form landmarks
JP5616308B2 (en) Document modification detection method by character comparison using character shape feature
JP2006050551A (en) Image processing apparatus, image processing method, program and storage medium
US8064636B2 (en) Image processing apparatus and method of controlling the same
US7209572B2 (en) Digital watermark embedding apparatus, digital watermark extraction apparatus, and methods thereof
CN111626145A (en) Simple and effective incomplete form identification and page-crossing splicing method
CN114299478A (en) Image processing method and device combining RPA and AI and electronic equipment
US8254693B2 (en) Image processing apparatus, image processing method and program
KR102598210B1 (en) Drawing information recognition method of engineering drawings, drawing information recognition system, computer program therefor
JP2002015280A (en) Device and method for image recognition, and computer- readable recording medium with recorded image recognizing program
JPH10171922A (en) Ruled line eraser and recording medium
JP2010258627A (en) Image processor, image processing method, program, and storage medium
JP4706764B2 (en) Image processing apparatus and image processing program
JP4689570B2 (en) Image processing apparatus and image processing method
JP5483467B2 (en) Form reader, square mark detection method, and square mark detection program
JP4804433B2 (en) Image processing apparatus, image processing method, and image processing program
US8990681B2 (en) Method for aligning a modified document and an original document for comparison and difference highlighting
JP6201838B2 (en) Information processing apparatus and information processing program
JP2846486B2 (en) Image input device
JP4803001B2 (en) Image processing apparatus and image processing program
JP3814334B2 (en) Image processing apparatus and method
JP2008269131A (en) Image processor and image processing program
JP2004247883A (en) Image processing method
JPH07230526A (en) Character reader

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20120703