JP3756660B2 - Image recognition method, apparatus and recording medium - Google Patents
Image recognition method, apparatus and recording medium Download PDFInfo
- Publication number
- JP3756660B2 JP3756660B2 JP09112298A JP9112298A JP3756660B2 JP 3756660 B2 JP3756660 B2 JP 3756660B2 JP 09112298 A JP09112298 A JP 09112298A JP 9112298 A JP9112298 A JP 9112298A JP 3756660 B2 JP3756660 B2 JP 3756660B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- pattern
- extracted
- predetermined
- density
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Lifetime
Links
Images
Landscapes
- Image Processing (AREA)
- Image Analysis (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、入力されたカラー画像中から所定のマークを精度よく抽出する画像認識方法、装置および記録媒体に関する。
【0002】
【従来の技術】
カラー画像における画像認識方法としては、従来から種々の方法が提案されている。例えば、本出願人は先に、カラー画像の内、特に抽出しようとする画像が予め決められた規則に従って描かれているパターンを対象として、カラー画像の認識処理を行なう際に、画像認識に必要な情報量を確保しつつ、回転の影響を受けずに、データ量を圧縮して高速に対象物を認識するカラー画像認識方法を提案した(特開平8−263662号公報を参照)。
【0003】
【発明が解決しようとする課題】
上記した画像認識方法では、入力された画像信号から所定の画像信号を抽出して2値化された画像を生成するときに、入力されたカラー画像信号(R、G、B)から所定の画像信号成分を抜き出して2値化画像を生成している。
【0004】
しかしこの方法では、認識したい画像の背景(例えば印刷してある紙)の画像濃度との差を考慮せずに、各画素ごとの画像信号のレベルのみで2値画像を生成しているので、背景との濃度差があっても画像信号レベルが所定の閾値に達していないときにはマークを抽出できないという問題があった。また、2値化テーブルを用いていないため、詳細な閾値設定ができず、あるいはまた詳細な閾値設定を行なう場合には、多くの条件が必要となり、処理速度が低下するという問題があった。
【0005】
本発明の目的は、2値画像を生成する際に、画素毎の画像信号のレベルだけではなく、近傍の画素との濃度差を考慮することにより、所定のマークを精度よく抽出する画像認識方法、装置および記録媒体を提供することにある。
【0006】
【課題を解決するための手段】
前記目的を達成するために、請求項1記載の発明では、入力されたカラー画像信号から所定の画像信号成分を抽出して2値化された画像を生成し、該2値化された画像から所定のマークを抽出し、該抽出された複数のマークから構成された所定のパターンを抽出し、該抽出されたパターンと、認識すべきパターンを登録した辞書とを照合することにより、該抽出されたパターンを認識する画像認識方法であって、前記入力カラー画像信号から2値画像を生成するとき、前記画像信号を構成する各画素の濃度で参照される2次元以上の2値化テーブルを用いることを特徴としている。
【0007】
請求項2記載の発明では、前記各画素の濃度およびその近傍の画素の濃度で前記2次元以上の2値化テーブルを参照することを特徴としている。
【0008】
請求項3記載の発明では、前記近傍の画素の濃度は、主走査方向の1行のデータから算出することを特徴としている。
【0009】
請求項4記載の発明では、入力されたカラー画像信号から所定の画像信号成分を抽出して2値化された画像を生成する手段と、該2値化された画像から所定のマークを抽出する手段と、該抽出された複数のマークから構成された所定のパターンを抽出する手段と、該抽出されたパターンと、認識すべきパターンを登録した辞書とを照合することにより、該抽出されたパターンを認識する手段を備えた画像認識装置であって、前記入力カラー画像信号から2値画像を生成するとき、前記画像信号を構成する各画素の濃度で参照される2次元以上の2値化テーブルを用いることを特徴としている。
【0010】
請求項5記載の発明では、請求項1乃至3のいずれか1項に記載の画像認識方法をコンピュータに実現させるためのプログラムを記録したコンピュータ読み取り可能な記録媒体であることを特徴としている。
【0011】
【発明の実施の形態】
以下、本発明の一実施例を図面を用いて具体的に説明する。
〈実施例1〉
図1は、本発明の実施例の構成を示す。図において、1は認識対象原稿などを光学的に読み取る画像入力部、2は画像入力部によって入力されるカラー画像から2値化画像を作成する画像2値化部、3は画像2値化部に設けられた2値化テーブル、4は2値化画像から基本マークを抽出する基本マーク抽出部、5は複数の基本マークからなる基本パターンを抽出する基本パターン抽出部、6は抽出された基本パターンと辞書とを照合する基本パターン認識部、7は認識された基本パターンを基に入力原稿が認識対象原稿であるか否かを判定する判定部、8は判定結果を出力する出力部である。
【0012】
図2は、認識対象原稿例と、その基本パターン例を示す。図2に示すように、例えばチケットのように認識対象原稿21の全面に印刷されている繰り返しパターンを検出し、認識する場合を例にして本実施例を説明する。また、繰り返しパターンを構成する基本パターン23としては、図中に破線で示した正三角形の各頂点に基本マーク(黒丸)22があるパターンを例にして説明する。
【0013】
まず始めに、画像2値化部2では、図2の原稿例において、検出対象の繰り返しパターンではない文字部分を除外し(例えば、所定の閾値以上の値を持つ画素を抽出する)、繰り返しパターンのみの2値画像を生成する。
【0014】
次いで、前掲した出願の画像認識方法で説明されている手法などを用いて、基本マーク抽出部4では、基本マーク(この例では黒丸)を抽出し、その中心座標を求め、基本パターン抽出部5は、基本パターン(この例では正三角形)の中心を求める。そして、基本パターン認識部6では、基本パターンの中心から基本マークまでの距離を用いて、基本パターン候補の距離と、辞書内の距離とを照合することにより、基本パターン候補が抽出対象のパターンであるか否かの判定を行なう。
【0015】
判定部7は、上記したようにして抽出された基本パターンの個数が対象原稿中に所定の個数以上あるなどの条件を用いて、認識対象原稿であるか否かの判定を行なう。
【0016】
本実施例では、上記した処理の中で、画像2値化部2では、図3に示すように2値化テーブルを用いて入力カラー画像を2値化処理する。この例では2次元の2値化テーブルを用いて説明するが、3次元(RGBなど)や4次元(YMCKなど)など複数次元のテーブルを用いてもよい。
【0017】
2値化は、例えば、入力画像信号(各色を8ビットで表す)の中からR(0〜255)とG(0〜255)の値を用いて2値化する場合には、図3に示すように、RとGの値でマトリックスを作り、マトリックスの各要素に1または0を設定し、例えば1のときは黒画素、0のときは白画素として2値化する。
【0018】
すなわち、認識対象原稿を読み取った画像データの各画素について、ある画素iの画素値(R、G、B)が、(R、G、B)=(246、66、19)であるとすると、図3の2値化テーブルを参照して、R=246、G=66であるマトリックスの要素の値が1になっているので、上記画素iを黒画素として2値化を行なう。このような処理を認識対象原稿の画像を構成する全ての画素について行う。
【0019】
〈実施例2〉
実施例1では、入力画像の画素値のRとGの値を用いて2値化テーブルを参照したが、本実施例では、これに加えて近傍の画素値も用いる。図4は、本発明の実施例2の構成を示し、画像2値化部32は、フィルタ処理部33と2値化テーブル34からなる。他の構成要素は実施例1と同様である。
【0020】
フィルタ処理部33は次のように処理する。すなわち、現在、2値化する注目画素のGの濃度をG(X0、Y0)とする。このとき、図5に示すように、例えば主走査方向の左右に3画素離れた参照画素G(X0−3、Y0)とG(X0+3、Y0)の画素値も参照し、例えば「−1、0、0、2、0、0、−1」のようなフィルタ処理(−1*G(X0−3、Y0)+2*G(X0、Y0)−1*G(X0+3、Y0))を行なうことにより、Gの濃度の微分値を求めることができる。B濃度の微分値も同様にして求める。
【0021】
このG,Bの微分値を用いて、実施例1で説明したようにして2値化テーブル34を参照することにより、「微分値が所定の値以上であり、濃度値が所定の範囲にある」という、2値化画像を得ることが可能となる。
【0022】
〈実施例3〉
上記した近傍の画素との濃度差を、副走査方向に算出する例を図6を用いて説明する。すなわち、例えば注目画素のGの濃度をG(X0、Y0)とし、前の1行G(X0、Y0−1)と、後の1行G(X0、Y0+1)の画素値を参照するためには、現在行であるY0ラインの画像データの他に、(Y0−1)行目、(Y0+1)行目のデータを保存するためのメモリが必要となる。つまり、副走査方向に、近傍の画素との濃度差を求めると必要なメモリ量が多くなる。
【0023】
そこで、本実施例では、近傍の画素との濃度差を主走査方向に1行のデータから算出することによって、現在処理を行っている1行分の入力信号データをメモリに保存すればよく、つまりラインメモリを不要とし、メモリ量を減らすことが可能になる。
【0024】
〈実施例4〉
図7は、本発明をソフトウェアによって実現する場合の実施例である。本発明をソフトウェアによって実現する場合には、図7に示すように、CPU、メモリ、表示装置、ハードディスク、キーボード、CD−ROMドライブ、スキャナなどからなるコンピュータシステムを用意し、CD−ROMなどのコンピュータ読み取り可能な記録媒体には、本発明の画像認識機能を実現するプログラム、パターン辞書などが記録されている。また、処理対象となる原稿画像などはハードディスクなどに格納されている。そして、該プログラムが起動されると、原稿画像データが読み込まれて、画像認識処理を実行し、その認識結果をディスプレイなどに出力する。
【0025】
【発明の効果】
以上、説明したように、請求項1、4、5記載の発明によれば、2値画像を生成する際に、2値化テーブルを用いているので、詳細な閾値設定が可能となり、また高速に2値画像を生成することができる。
【0026】
請求項2記載の発明によれば、2値画像を生成する際に、近傍の画素との濃度差を用いているので、背景と抽出すべきマークとの間に濃度差があれば精度よく抽出することができる。
【0027】
請求項3記載の発明によれば、近傍の画素との濃度差を主走査方向に1行のデータから算出しているので、現在処理を行なっている1行分の入力画像データをメモリに保存すればよく、使用するメモリ量を削減することができる。
【図面の簡単な説明】
【図1】 本発明の実施例1の構成を示す。
【図2】 認識対象原稿例と、その基本パターン例を示す。
【図3】 2値化テーブルの例を示す。
【図4】 本発明の実施例2の構成を示す。
【図5】 実施例2の処理を説明する図である。
【図6】 近傍の画素との濃度差を副走査方向に算出する例を示す。
【図7】 本発明をソフトウェアによって実現する場合の構成例を示す。
【符号の説明】
1 画像入力部
2 画像2値化部
3 2値化テーブル
4 基本マーク抽出部
5 基本パターン抽出部
6 基本パターン認識部
7 判定部
8 出力部[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image recognition method , apparatus, and recording medium for accurately extracting a predetermined mark from an input color image.
[0002]
[Prior art]
Various methods have been proposed as image recognition methods for color images. For example, the present applicant needs to perform image recognition when performing color image recognition processing on a color image, in particular, a pattern in which an image to be extracted is drawn according to a predetermined rule. A color image recognition method has been proposed that recognizes an object at high speed by compressing the amount of data without affecting the rotation while ensuring a large amount of information (see Japanese Patent Laid-Open No. 8-263661).
[0003]
[Problems to be solved by the invention]
In the image recognition method described above, when a predetermined image signal is extracted from the input image signal to generate a binarized image, the predetermined image is generated from the input color image signal (R, G, B). Signal components are extracted to generate a binary image.
[0004]
However, in this method, a binary image is generated only by the level of the image signal for each pixel without considering the difference from the image density of the background of the image to be recognized (for example, printed paper). There is a problem that even if there is a density difference from the background, the mark cannot be extracted when the image signal level does not reach a predetermined threshold value. In addition, since a binarization table is not used, detailed threshold setting cannot be performed, or when detailed threshold setting is performed, many conditions are required, and there is a problem that processing speed decreases.
[0005]
An object of the present invention is an image recognition method for accurately extracting a predetermined mark by considering not only the level of an image signal for each pixel but also a density difference with neighboring pixels when generating a binary image. An apparatus and a recording medium are provided.
[0006]
[Means for Solving the Problems]
In order to achieve the above object, according to the first aspect of the present invention, a predetermined image signal component is extracted from an input color image signal to generate a binarized image, and the binarized image is used to generate the binarized image. Extracting a predetermined mark, extracting a predetermined pattern composed of the plurality of extracted marks, and comparing the extracted pattern with a dictionary in which a pattern to be recognized is registered An image recognition method for recognizing a pattern, wherein when a binary image is generated from the input color image signal, a two-dimensional or higher binarization table referenced by the density of each pixel constituting the image signal is used. It is characterized by that.
[0007]
The invention according to
[0008]
The invention according to
[0009]
According to the fourth aspect of the present invention, means for extracting a predetermined image signal component from the input color image signal to generate a binarized image, and extracting a predetermined mark from the binarized image The extracted pattern by comparing the means, the means for extracting a predetermined pattern composed of the plurality of extracted marks, and the dictionary in which the extracted pattern is registered with the pattern to be recognized An image recognition apparatus comprising a unit for recognizing image data, wherein when generating a binary image from the input color image signal, a two-dimensional or higher binarization table referred to by the density of each pixel constituting the image signal It is characterized by using .
[0010]
According to a fifth aspect of the present invention, there is provided a computer-readable recording medium on which a program for causing a computer to realize the image recognition method according to any one of the first to third aspects is recorded.
[0011]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings.
<Example 1>
FIG. 1 shows the configuration of an embodiment of the present invention. In the figure, 1 is an image input unit that optically reads a document to be recognized and the like, 2 is an image binarization unit that creates a binarized image from a color image input by the image input unit, and 3 is an image binarization unit. , 4 is a basic mark extraction unit for extracting a basic mark from a binarized image, 5 is a basic pattern extraction unit for extracting a basic pattern composed of a plurality of basic marks, and 6 is an extracted basic A basic pattern recognizing unit that collates a pattern with a dictionary, 7 is a determining unit that determines whether an input document is a recognition target document based on the recognized basic pattern, and 8 is an output unit that outputs a determination result. .
[0012]
FIG. 2 shows an example of a document to be recognized and an example of its basic pattern. As shown in FIG. 2, the present embodiment will be described by taking as an example a case where a repetitive pattern printed on the entire surface of the recognition target document 21 such as a ticket is detected and recognized. The basic pattern 23 constituting the repetitive pattern will be described by taking as an example a pattern having a basic mark (black circle) 22 at each vertex of an equilateral triangle indicated by a broken line in the drawing.
[0013]
First, the
[0014]
Next, the basic
[0015]
The
[0016]
In this embodiment, in the above-described processing, the
[0017]
For example, when binarization is performed using values of R (0 to 255) and G (0 to 255) from an input image signal (each color is represented by 8 bits), FIG. As shown in the figure, a matrix is created with the values of R and G, and 1 or 0 is set for each element of the matrix.
[0018]
That is, for each pixel of image data obtained by reading a document to be recognized, the pixel value (R, G, B) of a certain pixel i is (R, G, B) = (246, 66, 19). Referring to the binarization table of FIG. 3, since the value of the element of the matrix where R = 246 and G = 66 is 1, binarization is performed with the pixel i as a black pixel. Such processing is performed for all the pixels constituting the image of the document to be recognized.
[0019]
<Example 2>
In the first embodiment, the binarization table is referred to by using the R and G values of the pixel values of the input image. However, in this embodiment, nearby pixel values are also used. FIG. 4 shows the configuration of the second embodiment of the present invention. The image binarization unit 32 includes a
[0020]
The
[0021]
By using the G and B differential values and referring to the binarization table 34 as described in the first embodiment, “the differential value is equal to or greater than a predetermined value and the density value is within a predetermined range. ”Can be obtained.
[0022]
<Example 3>
An example of calculating the density difference from the above-described neighboring pixels in the sub-scanning direction will be described with reference to FIG. That is, for example, in order to refer to the pixel values of the previous row G (X0, Y0-1) and the subsequent row G (X0, Y0 + 1) with the G density of the target pixel being G (X0, Y0). Requires a memory for storing the data of the (Y0-1) th and (Y0 + 1) th lines in addition to the image data of the current line Y0. That is, the required amount of memory increases when the density difference with neighboring pixels is obtained in the sub-scanning direction.
[0023]
Therefore, in this embodiment, by calculating the density difference with the neighboring pixels from the data of one row in the main scanning direction, the input signal data for one row that is currently processed may be stored in the memory. That is, the line memory is not required, and the amount of memory can be reduced.
[0024]
<Example 4>
FIG. 7 shows an embodiment in which the present invention is realized by software. When the present invention is implemented by software, as shown in FIG. 7, a computer system including a CPU, a memory, a display device, a hard disk, a keyboard, a CD-ROM drive, a scanner, etc. is prepared, and a computer such as a CD-ROM is prepared. A readable recording medium stores a program for realizing the image recognition function of the present invention, a pattern dictionary, and the like. A document image to be processed is stored in a hard disk or the like. When the program is started, the original image data is read, image recognition processing is executed, and the recognition result is output to a display or the like.
[0025]
【The invention's effect】
As described above, according to the first, fourth , and fifth aspects of the invention, since a binarization table is used when generating a binary image, detailed threshold setting can be performed, and high speed can be set. A binary image can be generated.
[0026]
According to the second aspect of the present invention, since a density difference with neighboring pixels is used when generating a binary image, if there is a density difference between the background and the mark to be extracted, the binary image is accurately extracted. can do.
[0027]
According to the third aspect of the present invention, since the density difference with the neighboring pixels is calculated from one line of data in the main scanning direction, the input image data for one line currently being processed is stored in the memory. What is necessary is to reduce the amount of memory used.
[Brief description of the drawings]
FIG. 1 shows a configuration of
FIG. 2 shows an example of a document to be recognized and an example of its basic pattern.
FIG. 3 shows an example of a binarization table.
FIG. 4 shows a configuration of
FIG. 5 is a diagram illustrating a process according to the second embodiment.
FIG. 6 shows an example of calculating a density difference with neighboring pixels in the sub-scanning direction.
FIG. 7 shows a configuration example when the present invention is realized by software.
[Explanation of symbols]
DESCRIPTION OF
Claims (5)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP09112298A JP3756660B2 (en) | 1998-04-03 | 1998-04-03 | Image recognition method, apparatus and recording medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP09112298A JP3756660B2 (en) | 1998-04-03 | 1998-04-03 | Image recognition method, apparatus and recording medium |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH11288461A JPH11288461A (en) | 1999-10-19 |
JP3756660B2 true JP3756660B2 (en) | 2006-03-15 |
Family
ID=14017731
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP09112298A Expired - Lifetime JP3756660B2 (en) | 1998-04-03 | 1998-04-03 | Image recognition method, apparatus and recording medium |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3756660B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4571758B2 (en) * | 2000-04-03 | 2010-10-27 | 株式会社リコー | Character recognition device, character recognition method, image processing device, image processing method, and computer-readable recording medium |
-
1998
- 1998-04-03 JP JP09112298A patent/JP3756660B2/en not_active Expired - Lifetime
Also Published As
Publication number | Publication date |
---|---|
JPH11288461A (en) | 1999-10-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP3904840B2 (en) | Ruled line extraction device for extracting ruled lines from multi-valued images | |
JP6080259B2 (en) | Character cutting device and character cutting method | |
US7751648B2 (en) | Image processing apparatus, image processing method, and computer program | |
Gebhardt et al. | Document authentication using printing technique features and unsupervised anomaly detection | |
JP4094789B2 (en) | Image processing apparatus and image processing method | |
EP1310912A2 (en) | Image processing method, apparatus and system | |
US20060171587A1 (en) | Image processing apparatus, control method thereof, and program | |
JP4250483B2 (en) | Image processing apparatus, image processing method, program, and storage medium | |
JP2000194850A (en) | Extraction device and extraction method for area encircled by user | |
CN110298353B (en) | Character recognition method and system | |
JP2000207489A (en) | Character extracting method and device and record medium | |
JP4392907B2 (en) | Character extraction method | |
JP2002199206A (en) | Method and device for imbedding and extracting data for document, and medium | |
JP2010074342A (en) | Image processing apparatus, image forming apparatus, and program | |
JP4049560B2 (en) | Halftone dot removal method and system | |
CN115410191B (en) | Text image recognition method, device, equipment and storage medium | |
JP3756660B2 (en) | Image recognition method, apparatus and recording medium | |
JP4116377B2 (en) | Image processing method and image processing apparatus | |
JP3090070B2 (en) | Form identification method and device | |
JP2000331118A (en) | Image processor and recording medium | |
JP4738645B2 (en) | SHADED AREA DETECTING DEVICE, SHATTERED AREA DETECTING METHOD, PROGRAM, AND STORAGE MEDIUM | |
JP3412441B2 (en) | Image processing device | |
JP2894111B2 (en) | Comprehensive judgment method of recognition result in optical type character recognition device | |
JP2001195584A (en) | Image recognizing device | |
US20220406083A1 (en) | Image processing apparatus, control method thereof, and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20050520 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20050524 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20050719 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20051220 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20051222 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110106 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120106 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130106 Year of fee payment: 7 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140106 Year of fee payment: 8 |
|
EXPY | Cancellation because of completion of term |