JPH0223488A - Picture signal processor - Google Patents

Picture signal processor

Info

Publication number
JPH0223488A
JPH0223488A JP63174579A JP17457988A JPH0223488A JP H0223488 A JPH0223488 A JP H0223488A JP 63174579 A JP63174579 A JP 63174579A JP 17457988 A JP17457988 A JP 17457988A JP H0223488 A JPH0223488 A JP H0223488A
Authority
JP
Japan
Prior art keywords
image signal
run length
code
narrow
pattern area
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.)
Pending
Application number
JP63174579A
Other languages
Japanese (ja)
Inventor
Kunio Sannomiya
三宮 邦夫
Atsuharu Yamamoto
淳晴 山本
Katsuo Nakazato
中里 克雄
Hiroyoshi Tsuchiya
博義 土屋
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP63174579A priority Critical patent/JPH0223488A/en
Publication of JPH0223488A publication Critical patent/JPH0223488A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To obtain a picture signal train equivalent to the orthogonal scanning of a bar code and to decode the bar code by collating the run length of a read picture signal with a stored run length and fetching the picture signal along the center line of the bar code and having a prescribed pitch. CONSTITUTION:The output of a binary picture signal generating means 1 is stored in a memory 2. The pattern of the train of the run length is coded and stored in a run length code storing means 3. A run length counting means 4 counts the number of continuous white picture elements and creates white run length data, and a fine/heavy width code generating means 5 counts the start position and the end position of the picture elements of the run and informs a pattern area deciding means 6 of the counted result. The decoding means 6 reads the run length code from the storing means 3, compares the counted result with the read run length code, and generates a propriety signal. A pattern area picture signal generating means 7 replaces the signals between the start position and the end position with black picture signals only when the propriety signal informs the means 7 that the compared result is proper. A center line detecting means 8 obtains the least square approximation straight line from a pattern area picture signal and makes the obtained line into the center line, and finally, the picture signal having the prescribed amount of width is fetched from the storing means 2 along the center line and made into the aimed picture signal in an inclined picture signal generating means 9.

Description

【発明の詳細な説明】 産業上の利用分野 本発明はラスタスキャンした画信号の中のバーコードを
解読する画信号処理装置に関するものである。
DETAILED DESCRIPTION OF THE INVENTION Field of the Invention The present invention relates to an image signal processing device for decoding barcodes in raster scanned image signals.

従来の技術 近年、電子計算機を使った情報処理システムが世に広く
普及し、これらシステム用のデータエントリー機器とし
てバーコード読み取装置が広く使われている。これらバ
ーコード読み取装置はハンドスキャンタイプで操作者が
バーコードのバーに直交して読み取装置を移動させたシ
、あるいは所定の窓内にバーコードを配置し複数方向に
走査線を走らせる等の方法により、バーに直交して横切
る走査線で走査して得た画信号を解読する方式を取って
いる。
2. Description of the Related Art In recent years, information processing systems using electronic computers have become widespread, and barcode reading devices are widely used as data entry devices for these systems. These barcode reading devices are hand-scanned devices in which the operator moves the reading device perpendicular to the bars of the barcode, or the barcode is placed within a predetermined window and scanning lines are run in multiple directions. In this method, an image signal obtained by scanning with a scanning line that crosses the bar perpendicularly is decoded.

発明が解決しようとする課題 一方、画像をラスタスキャンした画信号を取り込み各種
の処理をする画像処理装置やシステムが普及しつつある
。これらの画像処理装置やシステムの原稿画像の中にバ
ーコードがある場合、そのコードを解読して画像の属性
情報として管理・活用することはこれらの画像処理装置
やシステムにおいて非常に有効であシ活用範囲も広い。
Problems to be Solved by the Invention On the other hand, image processing devices and systems that capture image signals obtained by raster scanning an image and perform various types of processing are becoming widespread. When there is a barcode in the document image of these image processing devices and systems, it is very effective and effective for these image processing devices and systems to decipher the code and manage and utilize it as image attribute information. It has a wide range of uses.

しかし、画像処理装置の原稿読み取走査方向と原稿中の
バーコードのバーの方向が直交することは少なく、その
ため、読み域側信号列から直接バーに直交する画信号列
を抽出できる機会は極めて少ない。
However, it is rare for the image processing device's original reading scanning direction to be orthogonal to the direction of the barcode bars in the original, and therefore there are extremely few opportunities to extract an image signal sequence perpendicular to the bars directly from the reading area side signal sequence. .

本発明はラスタスキャンして読み取った画信号より、バ
ーコードが所定1傾いていてもそのバーコード領域を検
出し、バーに直交して走査した画信号列と等価な画信号
列を得ることを目的としている。
The present invention detects the barcode area even if the barcode is tilted by a predetermined angle from the image signal read by raster scanning, and obtains an image signal sequence equivalent to an image signal sequence scanned orthogonally to the bar. The purpose is

課題を解決するための手段 前記課題を解決するだめに本発明は2値画信号を発生さ
せる2値画信号発生手段と、その2値画信号を記憶する
2値画信号記憶手段と、所定のラン長のコードを記憶さ
せたラン長コード記憶手段と、前記2値画信号の白・黒
ランを計数しラン長データを生成するラン長計数手段と
、所定量のラン長データを細幅と大幅を示すコードに変
換する細幅・大幅コード生成手段と、前記ラン長コード
と細幅・大幅コードを比較し所定のパターン領域か否か
を判定するパターン領域判定手段と、所定のパターン領
域の場合のみ黒又は白とする画信号を生成するパターン
領域画信号生成手段と、パターン領域画信号の中心線を
算出する中心線算出手段と・その中心勝算に沿って前記
2値画信号記憶手段より画信号を堰シ出す傾斜画信号生
成手段を具備している。
Means for Solving the Problems In order to solve the above problems, the present invention provides a binary image signal generation means for generating a binary image signal, a binary image signal storage means for storing the binary image signal, and a predetermined method. a run length code storage means for storing a run length code; a run length counting means for counting white and black runs of the binary image signal to generate run length data; narrow/wide code generation means for converting into a code indicating a wide range; pattern area determination means for comparing the run length code with the narrow/wide code to determine whether or not the run length code is a predetermined pattern area; a pattern area image signal generating means for generating an image signal that is black or white only when the image signal is black or white; a center line calculating means for calculating the center line of the pattern area image signal; It is equipped with tilted image signal generation means for outputting an image signal.

作    用 本発明は上記構成により、まず、2値画信号発生手段で
生成された2値画信号は後段のために、2値画信号記憶
手段で記憶しておく。さらに、予めラン長コード記憶手
段において、バーコードにおける所定数の黒バーに注目
した場合のラン長の列のパターンをコード化して記憶し
ておく。すなわち、バーコードはJIS等の規格により
その形状が予め定められておシ、その−例においてはバ
ーの幅及び文字間ギャップの比が 細幅バー−・・・・・・・・・1.0 太幅バー・・・・・・・・・・・・・・・2.14文字
間ギャップ ・・・・2.32 であることや、1文字を7本のバーで表現すること、1
文字の中に大幅バーが2個しかないこと等、種々の特徴
を有している。これらの特徴に着目し細幅バー、太幅バ
ー、文字間ギャップの組み合わせの発生するパターンを
例えば細幅バーは01太幅バーと文字間ギヤツブは1と
コード化して記憶しておく。
Operation According to the above configuration, the present invention first stores the binary image signal generated by the binary image signal generating means in the binary image signal storage means for the subsequent stage. Further, in advance, the run length code storage means encodes and stores a pattern of run length columns when a predetermined number of black bars in the barcode are noted. That is, the shape of a barcode is predetermined by standards such as JIS, and in this example, the ratio of the bar width and the gap between characters is a narrow bar. 0 Thick bar・・・・・・・・・・・・・・・2.14 Gap between characters・・・2.32, and expressing one character with 7 bars, 1
It has various characteristics, such as the fact that there are only two wide bars in the characters. Focusing on these characteristics, patterns in which a combination of a narrow bar, a wide bar, and a gap between characters occur are coded and stored, for example, as 01 for a narrow bar and 1 for a wide bar and a gap between characters.

一方、ラン長計数手段において、2値画信号発生手段か
らの2値画信号の連続した白画素(又は黒画素)の数を
計数し白ラン長(又は黒ラン長)とし、以後当該ライン
に対して終了するまでこの計数を繰シ返しラン長データ
を順次生成する。
On the other hand, the run length counting means counts the number of consecutive white pixels (or black pixels) of the binary pixel signal from the binary pixel signal generating means and sets it as the white run length (or black run length). This counting is repeated until the run length data is sequentially generated.

次に細幅・大幅コード生成手段において、ラン長データ
を順次数シ出し所定個数のラン長データに対して、当該
ランの最初のランの画素の開始位置と最後のランの終了
位置を計数しパターン領域画信号生成手段に通知すると
共に、所定個数のラン長データを細幅のラン長はO1太
幅のラン長は1とした細幅・太幅コードを生成しパター
ン領域判定手段に通知する。パターン領域判定手段では
前記ラン長コード記憶手段よりラン長コードを読み出し
前記細幅・太幅コードと比較し、適合したか否かの通知
をパターン領域画信号生成手段に通知する。そのパター
ン領域画信号生成手段では予め初期化されたラインバッ
ファに対して、各ラン長データ毎に前段から適合通知を
受けた場合のみ前記開始位置と終了位置の間を黒画信号
(又は白画信号)に置換しラインの終了まで繰り返し操
作し画信号を生成しパターン領域画信号とする。
Next, the narrow/wide code generation means sequentially extracts run length data and counts the pixel start position of the first run and the end position of the last run for a predetermined number of run length data. In addition to notifying the pattern area image signal generation means, a narrow/broad code is generated in which a predetermined number of run length data are set to O1 for the narrow run length and 1 for the wide run length, and is notified to the pattern area determination means. . The pattern area determining means reads out the run length code from the run length code storage means, compares it with the narrow and wide codes, and notifies the pattern area image signal generation means of whether or not they match. The pattern area image signal generating means sends a black image signal (or white image signal) to the line buffer initialized in advance between the start position and the end position only when a conformity notification is received from the previous stage for each run length data. signal) and repeats the operation until the end of the line to generate an image signal and use it as a pattern area image signal.

次に、中心線検出手段において、前記パターン領域画信
号を主捜査方向をX軸、副捜査方向をY軸とした座標系
を対応させ、パターン領域を示す信号の点Pi (xi
 、 yi )のX軸方向の中心と最小自乗近似直線 y==a・x+b      ・・・・・・・・・・・
・・(1)を求め、式(1)の直線を中心線とする。
Next, the center line detection means associates the pattern area image signal with a coordinate system in which the main investigation direction is the X axis and the sub investigation direction is the Y axis, and points Pi (xi
, yi) and the least squares approximation straight line y==a・x+b ・・・・・・・・・・・・
...(1) is determined, and the straight line of equation (1) is set as the center line.

最後に傾斜画信号生成手段において、中心線に沿って所
定量幅の画信号を2値画信号記憶手段より取り出し目的
の画信号とする。
Finally, in the tilted image signal generation means, an image signal having a predetermined width along the center line is extracted from the binary image signal storage means and is used as a target image signal.

このようにして本発明はラスクスキャンで読み取った画
信号より、バーコードが所定1傾いていてもそのバーコ
ード領域を検出し、バーに直交した走査線で走査した画
信号を得ることが可能である。
In this way, the present invention can detect the barcode area even if the barcode is tilted by a predetermined angle from the image signal read by the rask scan, and obtain the image signal scanned with the scanning line orthogonal to the bar. be.

実施例 以下、図面を参照しながら本発明の一実施例について説
明する。
Embodiment Hereinafter, an embodiment of the present invention will be described with reference to the drawings.

第1図は本発明の一実施例における画信号処理装置の構
成図である。第1図において、1はツク−コードの読み
取り信号を2値画信号に変換する2値画信号発生手段、
2はその2値画信号を記憶する2値画信号記憶手段、3
は予め所定のラン長のコードを記憶させたラン長コード
記憶手段、4は前記2値画信号の白・黒ランを計数しラ
ン長データを生成するラン長計数手段、5は所定量のラ
ン長データを細幅と大幅を示すコードに変換する細幅・
大幅コード生成手段、6は前記ラン長コードと細幅・太
幅コードを比較し所定のパターン領域か否かを判定する
パターン領域判定手段、7は所定のパターン領域の場合
のみ黒画信号を生成するパターン領域画信号生成手段、
8はパターン領域画信号の中心線を算出する中心線算出
手段、9は中心勝算に沿って2値画信号記憶手段2より
画信号を取り出す傾斜画信号生成手段、10は生成され
る目的の画信号である。なお、本実施例におけるラン長
コード記憶手段3、ラン長計数手段・1、細幅・太幅コ
ード生成手段5、パターン領域判定手段6、パターン領
域画信号生成手段7でパターン領域検出手段を構成する
。また本実施例においては、2値画信号は白が0黒が1
、走査領域は200 mm X 300 M、走査線密
度は10本/順、バーコードの主要諸元は第1表に示す
ごとく仮定している。
FIG. 1 is a block diagram of an image signal processing device according to an embodiment of the present invention. In FIG. 1, reference numeral 1 denotes a binary image signal generating means for converting the reading signal of the Tsukku code into a binary image signal;
2 is a binary image signal storage means for storing the binary image signal; 3;
4 is a run length code storage means in which a code of a predetermined run length is stored in advance; 4 is a run length counting means for counting white and black runs of the binary image signal to generate run length data; 5 is a run length of a predetermined amount. Converts long data into codes indicating narrow and wide widths.
a wide code generation means; 6 a pattern area determination means for comparing the run length code with the narrow/wide width code to determine whether or not it is a predetermined pattern area; 7 generates a black image signal only in the case of a predetermined pattern area; pattern area image signal generation means for
8 is a center line calculation means for calculating the center line of the pattern area image signal; 9 is an inclined image signal generation means for extracting an image signal from the binary image signal storage means 2 along the center probability; 10 is an image to be generated; It's a signal. In this embodiment, the run length code storage means 3, the run length counting means 1, the narrow/wide code generation means 5, the pattern area determination means 6, and the pattern area image signal generation means 7 constitute the pattern area detection means. do. In addition, in this embodiment, the binary image signal has white as 0 and black as 1.
It is assumed that the scanning area is 200 mm x 300 M, the scanning line density is 10 lines/order, and the main specifications of the barcode are as shown in Table 1.

又、パターン領域判定手段においては7本のバーに対し
て評価するべく全体を構成している。
Furthermore, the entire pattern area determining means is configured to evaluate seven bars.

上記構成において、まず、2値画信号発生手段1はCC
Dのアレイセンサによるスキャナで構成されており、読
み取り開始信号、ライン同期信号、2値化された画信号
、画素同期信号が2値画信号記憶手段2及びラン長計数
手段4に通知される。
In the above configuration, first, the binary image signal generating means 1
It is composed of a scanner using a D array sensor, and a reading start signal, a line synchronization signal, a binarized image signal, and a pixel synchronization signal are notified to the binary image signal storage means 2 and the run length counting means 4.

2値画信号記憶手段2においては2値画信号を後段のた
めに記憶しておく。
In the binary image signal storage means 2, the binary image signal is stored for the subsequent stage.

次に、予めラン長コード記憶手段3において黒バーから
始捷る細幅バーと大幅バー(文字間ギャップを含む)の
発生パターンを記憶しておく。そのパターンは大幅バー
が1個の場合は第2図に、大幅バーが2個の場合は第3
図に、大幅バーが3個の場合は第4図に、大幅バーが4
個の場合は第5図に、太幅バーが5個の場合は第6図に
示すごとくなっており、各パターンは細幅バーを0太幅
バーを1とした2進コードの形式で記憶されている。
Next, the occurrence pattern of narrow bars and wide bars (including gaps between characters) starting from a black bar is stored in advance in the run length code storage means 3. The pattern is shown in Figure 2 when there is one large bar, and as shown in Figure 3 when there are two large bars.
In the figure, if there are 3 large bars, in Figure 4 there are 4 large bars.
When there are 5 thick bars, the pattern is shown in Figure 5, and when there are 5 wide bars, it is as shown in Figure 6. Each pattern is stored in the form of a binary code where the narrow bar is 0 and the wide bar is 1. has been done.

次に、ラン長計数手段4において、ラインの最初が白と
して白ラン及び黒ランを計数し細幅・大幅コード生成手
段5に通知される。この場合、奇数番が白ランを意味し
、偶数番が黒ランを意味している。
Next, the run length counting means 4 counts white runs and black runs, assuming that the beginning of the line is white, and notifies the narrow/wide code generation means 5 of the counts. In this case, odd numbers mean white runs, and even numbers mean black runs.

次に、細幅・大幅コード生成手段5とパターン領域判定
手段6の作用についてより詳細な構成を示す第7図を参
照して説明する。第7図において、11は2値画信号、
3はラン長コード記憶手段、4はラン長計数手段、51
はラン長データ7個分を遅延させて記憶しておく遅延ラ
ン長レジスタ群、52はラン長データ7個分の合計値を
記憶する合計ラン長レジスタ、53は7個のラン長デー
タのうちの最初のランの画素の開始位置と最後のランの
終了位置を計数し記憶する画素位置カウンタ、54は太
幅バーが1個ある場合の細幅・大幅コードを生成する第
1の細幅・大幅コード生成手段、55は大幅バーが2個
ある場合の細幅・大幅コードを生成する第2の細幅・大
幅コード生成手段、56は大幅バーが3個ある場合の細
幅・太幅コードを生成する第3の細幅・大幅コード生成
手段、57は大幅バーが4個ある場合の細幅・大幅コー
ドを生成する第4の細幅・太幅コード生成手段、58は
大幅バーが5個ある場合の細幅・大幅コードを生成する
第5の細幅・大幅コード生成手段、61は大幅バーが1
個ある場合の細幅・大幅コードを評価する第1のパター
ン領域判定手段、 62は大幅バー2個ある場合の細幅
・大幅コードを評価する第2のパターン領域判定手段、
63は大幅バーが3個ある場合の細幅・太幅コードを評
価する第3のパターン領域判定手段、64は大幅バーが
4個ある場合の細幅・大幅コードを評価する第4のパタ
ーン領域判定手段、65は太幅バーが5個ある場合の細
幅・太幅コードを評価する第5のパターン領域判定手段
、7はパターン領域画信号生成手段であり、51.52
.53.54.55.56.57.58で細幅・太幅コ
ード生成手段5を構成し、61.62.63.64.6
5でパターン領域判定手段6を構成j−でいる。画素位
置カウンタ53では目標ラン長データ1i(iは偶数)
以前までのラン長の合計を画素の開始位置、i+6番目
のラン長データまでのラン長の合計を画素の終了位置と
して計数しパターン領域画信号生成手段7に通知する。
Next, the functions of the narrow/wide code generating means 5 and the pattern area determining means 6 will be explained with reference to FIG. 7 showing a more detailed configuration. In FIG. 7, 11 is a binary image signal;
3 is a run length code storage means, 4 is a run length counting means, 51
52 is a group of delayed run length registers that stores the delayed run length data of 7 pieces of run length data, 52 is a total run length register that stores the total value of 7 pieces of run length data, and 53 is a group of delayed run length registers that stores the delayed run length data of 7 pieces of run length data. A pixel position counter 54 counts and stores the pixel start position of the first run and the end position of the last run, and 54 is a first narrow bar that generates the narrow bar and wide bar code when there is one thick bar. 55 is a second narrow/wide code generation means for generating a narrow/wide code when there are two wide bars; 56 is a narrow/wide code when there are three wide bars. 57 is a fourth narrow/wide code generation means that generates a narrow/wide code when there are four wide bars; 58 is a code generating means for generating narrow/wide codes when there are four wide bars; A fifth narrow/wide code generation means for generating a narrow/wide code when there is a wide bar;
62 is a second pattern area determining means that evaluates the narrow width/wide code when there are two wide bars;
Reference numeral 63 denotes a third pattern area determining means for evaluating narrow and wide codes when there are three wide bars, and 64 a fourth pattern area for evaluating narrow and wide codes when there are four wide bars. 51.52 is a determining means, 65 is a fifth pattern area determining means for evaluating narrow and wide codes when there are 5 wide bars, 7 is a pattern area image signal generating means, and 51.52
.. 53.54.55.56.57.58 constitutes the narrow/wide code generation means 5, and 61.62.63.64.6
5, the pattern area determining means 6 has a configuration j-. The pixel position counter 53 receives target run length data 1i (i is an even number)
The total run length up to the previous time is counted as the pixel start position, and the total run length up to the i+6th run length data is counted as the pixel end position, and the result is notified to the pattern area image signal generation means 7.

次に遅延ラン長レジスタ群51は第8図のととくなって
おシ次のごとく作用する。すなわち、遅延ラン長レジス
タ群は7個のレジスタr1、r2、r3、r4、r5、
r6、rlからなっており、ラン長データの列をII 
としたときrl には11、r2には11+1、r3に
はI i+2、r4にはl i+a、r5には11+4
、r6には11+5、rlには!i+6  を記憶する
Next, the delay run length register group 51 operates as shown in FIG. 8 as follows. That is, the delay run length register group consists of seven registers r1, r2, r3, r4, r5,
It consists of r6 and rl, and the run length data column is II.
Then 11 for rl, 11+1 for r2, I i+2 for r3, l i+a for r4, 11+4 for r5
, 11+5 for r6, ! for rl! Store i+6.

又、合計ラン長レジスタ52はラン長合計値(ρ)を ρ= ll−1−1i+1−1−1i+z−1−1i+
a+Ii+4−1−1i+5−4−1 i+6 と計数し記憶する。次に、第1の細幅・大幅コード生成
手段54において、まずラン長合計値(ρ)が第2表の
細幅バー・大幅バー判定表の太幅バーが1個の場合のラ
ン長合計値(ρ)の上限値および下限値を満足するか否
かを判定する。満足しない場合は、2進数のooooo
ooコードを後段の第1のパターン領域判定手段61 
に通知する。
In addition, the total run length register 52 stores the run length total value (ρ) as ρ=ll-1-1i+1-1-1i+z-1-1i+
Count and store as a+Ii+4-1-1i+5-4-1 i+6. Next, in the first narrow/wide bar code generation means 54, the run length total value (ρ) is the run length total when there is one wide bar in the narrow bar/wide bar determination table in Table 2. It is determined whether the upper limit and lower limit of the value (ρ) are satisfied. If not satisfied, write oooooo in binary
The oo code is passed to the first pattern area determining means 61 in the subsequent stage.
Notify.

本実施例において、ラン長合計値(ρ)の上限値を7本
のバーを直交した走査線が所定の密度で読み取る画素数
に対して、1.42倍以上の余裕度を持たせた値を設定
することで45度以内の傾きのあるバーコードを許容し
ている。満足する場合は、弓き続きレジスタr1、r2
、r3、r4、r5、r6、r7の値が第2表の細幅バ
ー・太幅バー判定表の大幅バーが1個の場合の細幅バー
の上限値、下限値又は大幅バーの上限値、下限値を満足
するか否かを判定する。いずれかのレジスタの値がいず
れの上限地・下限値をも満足しない場合すなわち、いず
れかのk(l≦に≦7)に対して rkQ値<ρ/18または6ρ/18(rkO値の場合
は2進数のoooooooコードを後段の第1のパター
ン領域判定手段61に通知する。又、いずれかを満足す
る場合は、細幅バーを満足する場合、すなわち ρ/18≦rl(の値(3ρ/18 の場合は01大幅バーを満足する場合、すなわち3ρ/
 is ≦rkO値≦6ρ/18ば1とした7桁の2進
コードを後段の第1のパターン領域判定手段61に通知
する。また、第2の細幅・大幅コード生成手段55、第
3の細幅・太幅コード生成手段56、第4の細幅・大幅
コード生成手段57、第5の細幅・大幅コード生成手段
58においても同様な判定を行ない、2進数のコードを
生成し、後段の第2のパターン領域判定手段62、第3
のパターン領域判定手段63、第4のパターン領域判定
手段64、第5のパターン領域判定手段65に通知する
。次て第1のパターン領域判定手段61において、ラン
長コード記憶手段3から第2図に示すパターンコードを
読み出し、第1の細幅・大幅コード生成手段54からの
細幅・太幅コードと比較し合致すれば適合、合致しなけ
れば非適合を後段のパターン領域画信号生成手段7に通
知する。また、第2のパターン領域判定手段62、第3
のパターン領域判定手段63、第4のパターン領域判定
手段64、第5のパターン領域判定手段65、において
も同様の評価を行ない適合、非適合を後段のパターン領
域画信号生成手段7に通知する。
In this example, the upper limit of the run length total value (ρ) is set to a value that has a margin of at least 1.42 times the number of pixels that can be read at a predetermined density by scanning lines perpendicular to seven bars. By setting , barcodes that are tilted within 45 degrees are allowed. If satisfied, continue arching registers r1, r2
, r3, r4, r5, r6, r7 are the upper and lower limits of narrow bars or the upper limits of wide bars when there is one wide bar in the thin bar/thick bar judgment table in Table 2. , it is determined whether the lower limit value is satisfied. If the value of any register does not satisfy any of the upper and lower limits, that is, for any k (l≦≦7), rkQ value < ρ/18 or 6ρ/18 (rkO value) notifies the binary oooooooo code to the first pattern area determination means 61 at the subsequent stage.Also, if any of the conditions is satisfied, if the narrow bar is satisfied, that is, the value of ρ/18≦rl((3ρ /18 satisfies the 01 large bar, that is, 3ρ/
A 7-digit binary code that satisfies 1 if is≦rkO value≦6ρ/18 is notified to the first pattern area determining means 61 at the subsequent stage. Further, second narrow/wide code generation means 55, third narrow/wide code generation means 56, fourth narrow/wide code generation means 57, fifth narrow/wide code generation means 58 A similar determination is made in the second pattern area determining means 62 and a binary code is generated.
The pattern area determining means 63, the fourth pattern area determining means 64, and the fifth pattern area determining means 65 are notified. Next, the first pattern area determining means 61 reads the pattern code shown in FIG. 2 from the run length code storage means 3 and compares it with the narrow/wide code from the first narrow/wide code generating means 54. If they match, the pattern region image signal generating means 7 at the subsequent stage is notified of the match, and if they do not match, the pattern area image signal generating means 7 at the subsequent stage is notified of the non-match. Further, the second pattern area determining means 62, the third
The pattern area determining means 63, the fourth pattern area determining means 64, and the fifth pattern area determining means 65 perform similar evaluations and notify the subsequent pattern area image signal generating means 7 of conformity or nonconformity.

次に、パターン領域画信号生成手段7においては当該ラ
インの最初に出力用ラインバッファ(図示せず)を初期
化しておき、前段の第1のパターン領域判定手段61、
第2のパターン領域判定手段62、第3のパターン領域
判定手段63、第4のパターン領域判定手段64、第5
のパターン領域判定手段65のいずれかからの適合通知
があった場合に、画素位置カウンタ53の開始位置、終
了位置の範囲のラインバッファを黒に置換する。
Next, in the pattern area image signal generation means 7, an output line buffer (not shown) is initialized at the beginning of the line, and the first pattern area determination means 61 at the previous stage,
Second pattern area determining means 62, third pattern area determining means 63, fourth pattern area determining means 64, fifth
When there is a conformity notification from any of the pattern area determination means 65, the line buffer in the range of the start position and end position of the pixel position counter 53 is replaced with black.

以上の操作を当該ラインが終了するまで繰り返すことに
より、1ライン分のパターン領域画信号が生成し、原稿
の全領域が終了するまでパターン領域画信号の生成を繰
り返す。
By repeating the above operations until the line is completed, a pattern area image signal for one line is generated, and the generation of the pattern area image signal is repeated until the entire area of the document is completed.

次に、中心線検出手段8においてマイクロコンピュータ
を用いて以下の演算をおこないパターン領域の中心線と
中心を求める。すなわち、前記パターン領域画信号を主
操作方向をX軸、副走査方向をY軸とする座標系に対応
させ、黒の点Pi(xi 、 yi )  のX軸方向
の中心マを最小自乗近似直線 y=a・x + b の係数a、bを ・・・・・・・・・・・・・・(3) N(ゞΣx i 2) −(iΣX1)2の記憶番地演
算を行ない2値画信号記憶手段2より画信号を取り出し
本装置の出力信号列とする。
Next, the centerline detection means 8 uses a microcomputer to perform the following calculations to determine the centerline and center of the pattern area. That is, the pattern area image signal is made to correspond to a coordinate system in which the main operation direction is the X-axis and the sub-scanning direction is the Y-axis, and the center of the black point Pi (xi, yi) in the X-axis direction is defined by a least square approximation straight line. The coefficients a and b of y=a・x + b are converted into binary values by performing the memory address calculation of N(ゞΣx i 2) −(iΣX1) 2. An image signal is taken out from the image signal storage means 2 and used as an output signal sequence of the apparatus.

すなわち、バーコードの幅、走査線密度、前段で求めた
X方向の平均値マ、最小自乗近似直線の係数a、bより
読取り開始点Q、 (XQO、yQO) と読取りピッ
チΔXを次の第(6)式、第(7)式で求める。
In other words, from the width of the barcode, the scanning line density, the average value in the It is calculated using equations (6) and (7).

ΔX=l/Vl±a2        ・・・・・・・
・・(6)点列Qj (xQj 、 yqj )は第(
8)式で求める。
ΔX=l/Vl±a2 ・・・・・・・・・
...(6) The point sequence Qj (xQj, yqj) is
8) Calculate using formula.

・・・・・・(5) に従って求める。この演算は第9図に示すマイクロコン
ピュータへのプログラムで実現できている。
...Calculate according to (5). This calculation is realized by a program for the microcomputer shown in FIG.

このプログラムでx〔〕は点列P!のX座標値、y()
は点列P!のX座標値、nは点列の数、XbarはX軸
方向の平均値、aは最小自乗近似直線の傾き係数、bは
最小自乗近似直線の変位係数である。
In this program, x [] is a point sequence P! X coordinate value, y()
is a point sequence P! n is the number of point sequences, Xbar is the average value in the X-axis direction, a is the slope coefficient of the least squares approximation line, and b is the displacement coefficient of the least squares approximation line.

最後に、傾斜画信号生成手段9においても以下このよう
にして求めた点列QJの座標値(XQJ+yqj )に
基づき2値画信号記憶手段2より画信号を取り出し本装
置の出力信号列とする。
Finally, the tilted image signal generation means 9 also extracts image signals from the binary image signal storage means 2 based on the coordinate values (XQJ+yqj) of the point sequence QJ obtained in this way and uses them as the output signal sequence of the apparatus.

なお、本実施例においては走査線密度やバーコードの主
要諸元等に制限を設けているが、これらの制限は変更し
ても充分実現できるし、また、中心線検出手段8や傾斜
画信号生成手段9をマイクロコンピュータを用いて実現
しているが、これらの手段は論理回路や外部記憶装置で
も実現できる。
In this embodiment, limitations are set on the scanning line density and the main specifications of the barcode, but these limitations can be sufficiently implemented even if changed, and the center line detection means 8 and the tilt image signal Although the generating means 9 is implemented using a microcomputer, these means can also be implemented using a logic circuit or an external storage device.

発明の効果 以上の如く本発明は予めバーコードのラン長のパターン
を記録しておき、ラスクスキャンで読み取った画信号の
ラン長を前記の記憶しであるパターンと照合することで
、バーコード領域を検出しこの領域の中心線を求め、中
心線に沿った所定ピッチの画信号を取り出すことにより
、バーコードに直交走査したと等価な画信号列を得るこ
とができる。このようにして得られた画信号列は従来よ
りあるバーコード解読装置の入力信号に採用することで
、そのバーコード解読が可能となり、その効果は非常に
太きい。
Effects of the Invention As described above, the present invention records the barcode run length pattern in advance, and compares the run length of the image signal read by the rask scan with the above-mentioned stored pattern, thereby determining the barcode area. By detecting the area, determining the center line of this area, and extracting image signals at a predetermined pitch along the center line, it is possible to obtain an image signal sequence equivalent to orthogonal scanning to the barcode. By employing the image signal sequence obtained in this way as an input signal to a conventional barcode decoding device, it becomes possible to decode the barcode, and the effect is very large.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明の一実施例における画信号処理装置のブ
ロック構成図、第2図は同装置の要部における大幅バー
が1個の場合のパターン図、第3図は同太幅バーが2個
の場合のパターン図、第4図は同太幅バーが3個の場合
のパターン図、第5図は大幅バーが4個の場合のパター
ン図、第6図は”同太幅バーが5個の場合のパターン図
、第7図は同パターン領域検出手段のブロック構成図、
第8図は同遅延ラン長レジスタ群と合計ラン長レジスタ
との関連図、第9図は同中心および中心および中心線を
もとめるプログラムを示す図である。 1・・・2値画信号発生手段、2・・・2値画信号記憶
手段、3・・・ラン長コード記憶手段、4・・・ラン長
計数手段、5・・・細幅・太幅コード生成手段、6・・
・パターン領域判定手段、7・・・パターン領域画信号
生成手段、8・・・中心線算出手段、9・・・傾斜画信
号生成手段。 代理人の氏名 弁理士 粟 野 重 孝 ほか1名第 図 第 図 おマ 図 第 図 第 図
FIG. 1 is a block configuration diagram of an image signal processing device according to an embodiment of the present invention, FIG. 2 is a pattern diagram when there is one wide bar in the main part of the device, and FIG. 3 is a pattern diagram when the wide bar is one. Figure 4 is a pattern diagram when there are 2 wide bars, Figure 5 is a pattern diagram when there are 4 wide bars, and Figure 6 is a pattern diagram when there are 3 wide bars. A pattern diagram in the case of 5 pieces, FIG. 7 is a block diagram of the same pattern area detection means,
FIG. 8 is a diagram showing the relationship between the delayed run length register group and the total run length register, and FIG. 9 is a diagram showing a program for determining the same center, center, and center line. DESCRIPTION OF SYMBOLS 1... Binary image signal generation means, 2... Binary image signal storage means, 3... Run length code storage means, 4... Run length counting means, 5... Narrow width/wide width Code generation means, 6...
- Pattern area determination means, 7... Pattern area image signal generation means, 8... Center line calculation means, 9... Tilt image signal generation means. Name of agent: Patent attorney Shigetaka Awano and one other person

Claims (5)

【特許請求の範囲】[Claims] (1)バーコードの読み取り信号から2値画信号を発生
させる2値画信号発生手段と、その2値画信号を記憶す
る2値画信号記憶手段と、所定のラン長のコードを記憶
させたラン長コード記憶手段と、前記2値画信号の白・
黒ランを計数しラン長データを生成するラン長計数手段
と、所定量のラン長データを細幅と太幅を示すコードに
変換する細幅・太幅コード生成手段と、前記ラン長コー
ドと細幅・太幅コードを比較し所定のパターン領域か否
かを判定するパターン領域判定手段と、所定のパターン
領域の場合のみ1又は0とする画信号を生成するパター
ン領域画信号生成手段と、パターン領域画信号の中心線
を算出する中心線算出手段と、その中心線算に沿って前
記2値画信号記憶手段より画信号を取り出す傾斜画信号
生成手段を具備する画信号処理装置。
(1) Binary image signal generation means for generating a binary image signal from a barcode reading signal, binary image signal storage means for storing the binary image signal, and a code of a predetermined run length. A run length code storage means and a white/white color of the binary image signal
run length counting means for counting black runs and generating run length data; narrow/thick code generation means for converting a predetermined amount of run length data into codes indicating narrow width and wide width; pattern area determining means for comparing narrow and wide codes to determine whether the area is a predetermined pattern area; pattern area image signal generating means for generating an image signal that is set to 1 or 0 only in the case of a predetermined pattern area; An image signal processing device comprising: center line calculation means for calculating a center line of a pattern area image signal; and tilted image signal generation means for extracting an image signal from the binary image signal storage means along the center line calculation.
(2)ラン長コード記憶手段は、予め定められたバーコ
ードの細幅バーを0、太幅バーを1、文字間ギャップを
1としたnデジットの2進またはn進コードで予め記憶
せしめたことを特徴とする請求項1記載の画信号処理装
置。
(2) The run length code storage means stores in advance an n-digit binary or n-ary code in which the narrow bar of a predetermined barcode is 0, the wide bar is 1, and the character gap is 1. The image signal processing device according to claim 1, characterized in that:
(3)細幅・太幅コード生成手段は、予め定められたバ
ーの数nに対応したラン長の合計値(ρ)の最大値、最
小値、及び細幅バーの最大値、最小値、及び文字間ギャ
ップを含む太幅バーの最大値、最小値をラン長の合計値
(ρ)の関数として定め、2値画信号のn個のランの並
びを前記最大値、最小値で評価し細幅バーに対応する時
0は、文字間ギャップを含む太幅バーに対応する時1と
した2進またはn進コードを生成することを特徴とする
請求項1記載の画信号処理装置。
(3) The narrow/thick code generation means generates the maximum and minimum values of the total run length (ρ) corresponding to the predetermined number n of bars, the maximum and minimum values of the narrow bars, The maximum value and minimum value of the thick bar including the gap between characters are determined as a function of the total value of run length (ρ), and the arrangement of n runs of the binary image signal is evaluated using the maximum value and minimum value. 2. The image signal processing apparatus according to claim 1, wherein the image signal processing apparatus generates a binary or n-ary code in which 0 corresponds to a narrow bar and 1 corresponds to a wide bar including a gap between characters.
(4)ラン長コード記憶手段は、予め定められたバーコ
ードの細幅バーを1、太幅バーを0、文字間ギャップを
1としたnデジットの2進またはn進コードで予め記憶
せしめたことを特徴とする請求項1記載の画信号処理装
置。
(4) The run length code storage means stores in advance an n-digit binary or n-ary code in which the narrow bar of a predetermined barcode is 1, the wide bar is 0, and the character gap is 1. The image signal processing device according to claim 1, characterized in that:
(5)細幅・太幅コード生成手段は、予め定められたバ
ーの数nに対応したラン長の合計値(ρ)の最大値、最
小値、及び細幅バーの最大値、最小値、及び文字間ギャ
ップを含む太幅バーの最大値、最小値を前記ラン長の合
計値(ρ)の関数として定め、2値画信号のnヶのラン
の並びを前記最大値、最小値で評価し細幅バーに対応す
る時1は、文字間ギャップを含む大幅バーに対応する時
0とした2進またはn進コードを生成することを特徴と
する請求項1記載の画信号処理装置。
(5) The narrow/wide code generation means generates the maximum and minimum values of the total run length (ρ) corresponding to the predetermined number n of bars, the maximum and minimum values of the narrow bars, and the maximum value and minimum value of the thick bar including the inter-character gap are determined as a function of the total value of the run length (ρ), and the arrangement of n runs of the binary image signal is evaluated using the maximum value and minimum value. 2. The image signal processing apparatus according to claim 1, wherein the image signal processing apparatus generates a binary or n-ary code in which 1 corresponds to a narrow bar and 0 corresponds to a wide bar including an inter-character gap.
JP63174579A 1988-07-13 1988-07-13 Picture signal processor Pending JPH0223488A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63174579A JPH0223488A (en) 1988-07-13 1988-07-13 Picture signal processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63174579A JPH0223488A (en) 1988-07-13 1988-07-13 Picture signal processor

Publications (1)

Publication Number Publication Date
JPH0223488A true JPH0223488A (en) 1990-01-25

Family

ID=15981024

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63174579A Pending JPH0223488A (en) 1988-07-13 1988-07-13 Picture signal processor

Country Status (1)

Country Link
JP (1) JPH0223488A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE29617413U1 (en) * 1996-10-07 1996-11-21 Mekra Lang Gmbh & Co Kg Monitoring device for difficult or invisible zones around motor vehicles

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE29617413U1 (en) * 1996-10-07 1996-11-21 Mekra Lang Gmbh & Co Kg Monitoring device for difficult or invisible zones around motor vehicles

Similar Documents

Publication Publication Date Title
US4992650A (en) Method and apparatus for barcode recognition in a digital image
JP2940496B2 (en) Pattern matching encoding apparatus and method
US4513442A (en) Method for locating and circumscribing text areas on a master which may contain text, graphics and/or image areas
US20050242186A1 (en) 2D rectangular code symbol scanning device and 2D rectangular code symbol scanning method
CA1089988A (en) Apparatus for producing vectors
KR100264331B1 (en) Apparatus and a method for correction of the skewed document
JPH0157394B2 (en)
EP0552791B1 (en) Apparatus and method for extracting outline data and encoding image data using the outline data
US5245167A (en) Bar-code reading apparatus
JPH0415774A (en) Bar code reader
US4893187A (en) Image processing apparatus
JPH0731714B2 (en) Character component cutting method
JPH0223488A (en) Picture signal processor
JPS6141029B2 (en)
JP2004140749A (en) Image compression method
JPH02168363A (en) Image signal processor
JPH0423303B2 (en)
JPH02125386A (en) Image signal processor
JP2679098B2 (en) Encoding processing device for contour detection image
JPS5856079A (en) Character segmenting device of optical character reader
JPH0378372A (en) Picture compression circuit and picture restoration circuit
JPS6020785B2 (en) Character pattern buffer
JP3018702B2 (en) Barcode demodulator
JP3036559B2 (en) Character recognition device
JPH1040356A (en) Image reader