JPH0233685A - Picture signal processor - Google Patents

Picture signal processor

Info

Publication number
JPH0233685A
JPH0233685A JP63184913A JP18491388A JPH0233685A JP H0233685 A JPH0233685 A JP H0233685A JP 63184913 A JP63184913 A JP 63184913A JP 18491388 A JP18491388 A JP 18491388A JP H0233685 A JPH0233685 A JP H0233685A
Authority
JP
Japan
Prior art keywords
image signal
picture signal
run length
pattern area
code
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
JP63184913A
Other languages
Japanese (ja)
Inventor
Kunio Sannomiya
三宮 邦夫
Atsuharu Yamamoto
淳晴 山本
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 JP63184913A priority Critical patent/JPH0233685A/en
Publication of JPH0233685A publication Critical patent/JPH0233685A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To obtain a picture signal string equal to the fact that the orthogonal scanning is executed to a bar code by reading the picture signal including the bar code, obtaining the central line of a bar code area and taking out the picture signal of a prescribed pitch along the central line. CONSTITUTION:A binary picture signal is generated by a binary picture signal generating means 1 from a picture signal including a read bar code and stored into a binary picture signal storing means 2. The code of the prescribed run length is stored into a run length code storing means 4. The thin width and thick width codes prepared by counting the white and black runs of a stored binary picture signal and the longitudinally and horizontally converted binary picture signal are compared with the stored run length code and a pattern area is detected. A central line calculating means 9 calculates the central line of a pattern area picture signal, further, the inclination angle of the central line is decided and the picture signal along the central line is taken out by an inclination picture signal generating means 11. Thus, the picture signal equal to the fact that the orthogonal scanning is executed to the bar code can be obtained.

Description

【発明の詳細な説明】 卒業上の利用分野 本発明はラスクスキャンした画信号の中のバーコードを
解読する画信号処理装置に関するものである。
DETAILED DESCRIPTION OF THE INVENTION FIELD OF THE INVENTION The present invention relates to an image signal processing device for decoding a bar code in a rask-scanned image signal.

従来の技術 近年、電子計算機を使った情報処理システムが世に広く
普及し、これらシステム用のデータエントリー機器とし
てバーコード読み取装置が広く使われている。これらバ
ーコード読み取装置はハンドスキャンタイプで操作者が
バーコードのバーに直交して読み取装置を移動させたり
、あるいは所定の窓内にバーコードを配置し複数方向に
走査線を走らせる等の方法により、バーに直交して溝切
る走査線で走査して得た両信号を解読する方式を取って
いる。
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, and the operator moves the reading device orthogonally to the barcode bar, or the barcode is placed within a predetermined window and scanning lines are run in multiple directions. In this way, a method is adopted in which both signals obtained by scanning with a scanning line cut perpendicularly to the bar are 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 useful to decipher the code and manage and utilize it as image attribute information. The range is also wide.

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

本発明はラスタスキャンして読み取った画信号より、バ
ーコードの傾き角の制限をもうけることなく、バーに直
交して走査した画信号列と等価な両信号列を得ることを
目的としている。
An object of the present invention is to obtain both signal sequences equivalent to an image signal sequence scanned orthogonally to a bar, from an image signal read by raster scanning, without imposing any restrictions on the inclination angle of the bar code.

課題を解決するための手段 所1記課題を解決するために本発明は、その2値画信号
を発生させる2値画信づ発生手段と、2値画信号を記憶
する2個画信号記憶手段と、所定のラン長のコードを記
憶させたラン長コード記憶手段と、前記2個画信号記憶
手段より縦横変換した2値画信号を読み出す縦横変換画
信号読み出し手段と、前記2値画信号の白・黒ランを計
数しラン長データを生成するラン長計数手段と、所定量
のラン長データを細幅と太幅を示すコードに変換する細
幅・太幅コード生成手段と、前記ラン長コードと細幅・
太幅コードを比較し所定のパターン領域か否かを判定す
るパターン領域判定手段と、所定のパターン領域の場合
のみ黒又は白とする画信号を生成するパターン領域画信
号生成手段と、前記パターン領域画信号の中心線を算出
する中心線算出手段と、その中心線の傾き角を判定する
傾き角判定手段と、前記中心線に沿って[)1記2値画
信号記憶手段より画信号を取り出す傾斜画信号生成手段
とを設けたものである。
Means for Solving the Problems In order to solve the first problem, the present invention provides a binary image signal generating means for generating the binary image signal, and a binary image signal storage means for storing the binary image signal. a run length code storage means for storing a code of a predetermined run length; an aspect-converted image signal readout means for reading out the vertically-horizontally converted binary image signal from the two-image signal storage means; run length counting means for counting white and black runs and generating run length data; narrow/thick width code generation means for converting a predetermined amount of run length data into codes indicating narrow width and wide width; and said run length. Cord and narrow width
pattern area determination means for comparing wide codes to determine whether or not the area is a predetermined pattern area; pattern area image signal generation means for generating an image signal that is black or white only in the case of the predetermined pattern area; and the pattern area A center line calculation means for calculating the center line of the image signal, an inclination angle determination means for determining the inclination angle of the center line, and extracting the image signal from the binary image signal storage means described in [) 1 along the center line. A tilted image signal generating means is provided.

1乍     用 本発明は上記構成により、まず、2値画信号発生手段で
生成されだ2値画信号は後段のために、2個画信号記憶
手段で記憶しておく。さらに、予めラン長コード記憶手
段PCおいて、バーコードにおける所定数の黒バーに注
目した場合のラン長の列のパターンをコード化して記憶
しておく。すなわち、バーコードはJIS等の規格によ
りその形状が予め定つられており、その−例においては
バーの幅及び文字間ギヤ、ブの比が 細幅バー    ・・・−10 太幅バー ・ ・・・−・  2111文字間ギヤ、ブ
 、232 であることや、1文字を7本のバーで表現すること、1
文字の中に太幅バーが2個しかないこと等、種々の特徴
を有している。これらの特徴に着目し細幅バー、太幅バ
ー、文字間ギャップの組み合わせの発生するパターンを
例えば細幅バーは01太幅バーと文字間ギヤノブは1と
コード化して記憶しておく。
According to the above configuration, first, the binary image signal generated by the binary image signal generation means is stored in the two-value image signal storage means for the subsequent stage. Further, in advance, the run length code storage means PC encodes and stores a pattern of run length columns when a predetermined number of black bars in the barcode are noted. In other words, the shape of a barcode is predetermined by standards such as JIS, and in the example, the bar width, character spacing gear, and bar ratio are narrow bar...-10 thick bar...・-・ 2111 Character spacing gear, bar, 232, 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 combinations of narrow bars, wide bars, and gaps between characters occur are coded and stored, for example, as 01 for a narrow bar and 1 for a wide bar and a gear knob 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.

次に細幅・太幅コード生成手段において、ラン長データ
を順次取り出し所定個数のラン長データに対して、当該
ランの最初のラフの画素の開始位置と最後のランの終了
位置を計数しパターン領域画信号生成手段に通知すると
共に、所定個数のラン長データを細幅のラン長は0、太
幅のラン長は1とした細幅・太幅コードを生成しパター
ン領域判定手段に通知する。パターン領域判定手段では
前記ラン長コード記憶手段よりラン長コードを読み出し
前記細幅・太幅コードと比較し、適合したか否かの通知
をパターン領域画信号生成手段に通知する。そのパター
ン領域画信号生成手段では予め初期化されたラインバッ
ファに対して、各ラン長データ毎に前段から適合通知を
受けだ場合のみ前記開始位置と終了位置の間を黒画信号
(又は白画信号)に置換しラインの終了まで繰り返し操
翻し画信号を生成しパターン領域画信号とする。
Next, in the narrow width/wide width code generation means, the run length data is sequentially retrieved, and for a predetermined number of run length data, the start position of the first rough pixel of the run and the end position of the last run are counted and patterned. At the same time, it notifies the area image signal generation means, and also generates a narrow/broad code in which a predetermined number of run length data is set to 0 for a narrow run length and 1 for a wide run length, and notifies the pattern region 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 compliance notification is received from the previous stage for each run length data. signal), and a manipulated image signal is generated repeatedly until the end of the line, and is used as a pattern area image signal.

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

次に、縦横変換画信号読み出し手段により、2値画信号
記憶手段から縦横変換を施した2値画信号を読み出し、
これら縦横変換2値画信号に対してラン長計数手段、細
幅・太幅コード生成手段、パターン領域判定手段、パタ
ーン領域画信号生成手段、中心線算出手段において前記
と同様の処理を行ないX軸方向の中心と相関係数rと最
小自乗近似直線 X二aey十b        ・・−・・・(1)を
求め、第(1)式の直線を第2の中心・線とする。
Next, the vertically and horizontally converted image signal reading means reads out the binary image signal subjected to the vertical and horizontal conversion from the binary image signal storage means,
The run length counting means, narrow width/wide width code generation means, pattern area determination means, pattern area image signal generation means, and center line calculation means perform the same processing as described above on these vertical/horizontal converted binary image signals. The center of the direction, the correlation coefficient r, and the least square approximation straight line X2aey1b...(1) are determined, and the straight line in equation (1) is set as the second center/line.

次に、傾き角判定手段において r −;rの場合は第(1)式を中心・線として、r 
(rの場合は第(1)式を中心線として、採用し後段の
傾斜画信号生成手段に通知する。
Next, in the case of r −; r, the inclination angle determining means uses equation (1) as the center and line, and
(In the case of r, Equation (1) is used as the center line and is notified to the subsequent tilt image signal generation means.

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

このようにして本発明はラスクスキャンで読み取った両
信号より、バーに直交した走査線で走査した画信号を得
ることが可能となる。
In this manner, the present invention makes it possible to obtain an image signal scanned by a scanning line perpendicular to the bar from both signals read by the rask scan.

実施例 以下、図面を参照しながら本発明の一実施例について説
明する。
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は2値画伯号記憶手段2から送出された2値画信号
の位置を縦横変更(すなわち、900回転させた位置と
なるように)して読み出しを行なう縦横変換画信号読み
出し手段、4は予め所定のラン長のコードを記憶させた
ラン長コード記憶手段、5は前記2値画信号の白・黒ラ
ンを計数しラン長データを生成するラン長計数手段、6
は所定量のラン長データを細幅と太幅を示すコードに変
換する細幅・太幅コード生成手段、7は前記ラン長コー
ドと部幅・太幅コドを比較し所定のパターン領域か否か
を判定するパターン領域判定手段、8は所定のパターン
領・域の場合のみ黒画信号を生成するパターン領域画信
号生成手段、9はパターン領域画信号の中心線を算出す
る中心線算出手段、9は中心線算出に沿って前記2値画
信号記憶手段2より画信号を取り出す傾斜画信号生成手
段、lOは生成される目的の画信号である。なお、本実
施例におけるラン長コード記憶手段・1、ラン長計数手
段5、細幅・太幅コード生成手段6、パターン領域判定
手段7、パターン領域画信号生成手段8でパターン領域
検出手段を構成する。また、本実施例においては、2値
画信号は白がO黒が1、走査領域は200mmX300
mm、走査線密度は10 ;@ / mm 1 バーコ
ードの主要諸元は第1表に示すごとく仮定している。又
、パターン領域判定手段においては7木のバーに対して
評価するべく全体を構成している。
FIG. 1 is a block diagram of an image signal processing device according to an embodiment of the present invention. In FIG. 1, 1 is a binary image signal generation means for reading an image including a barcode and converting it into a binary image signal, 2 is a binary image signal storage means for storing the binary image signal, and 3 is a binary image signal. Vertical/horizontal conversion image signal readout means for changing the position of the binary image signal sent from the artist number storage means 2 (that is, the position rotated by 900 degrees) and reading it out; 4 is a predetermined run length; Run length code storage means 5 stores a code of , run length counting means 5 counts white and black runs of the binary image signal and generates run length data; 6
7 is a narrow width/wide width code generating means for converting a predetermined amount of run length data into a code indicating narrow width and wide width; 7 is a means for comparing the run length code with the part width/wide width code to determine whether it is a predetermined pattern area. 8, pattern area image signal generation means that generates a black image signal only in the case of a predetermined pattern area/region; 9, center line calculation means that calculates the center line of the pattern area image signal; Reference numeral 9 denotes a tilted image signal generating means for extracting an image signal from the binary image signal storage means 2 along the centerline calculation, and lO denotes an image signal to be generated. In this embodiment, the run length code storage means 1, the run length counting means 5, the narrow/wide code generation means 6, the pattern area determination means 7, and the pattern area image signal generation means 8 constitute the pattern area detection means. do. In addition, in this embodiment, the binary image signal has one for white and one for black, and the scanning area is 200 mm x 300 mm.
mm, and the scanning line density is 10; @/mm 1 The main specifications of the barcode are assumed as shown in Table 1. Further, the pattern area determining means is entirely configured to evaluate seven bars.

第   1   表 まず、2値画信号発生手段1はCCDのアレイセンサに
よるスキャナより構成されており、読み取り開始信号、
ライン同期信号、バーコードを含む画像の2値化された
両信号、画素同期信号が2値画信−づ・記憶手段2及び
ラン長計数手段5に通知される。
Table 1 First, the binary image signal generating means 1 is composed of a scanner using a CCD array sensor, and receives a reading start signal,
The line synchronization signal, both binary signals of the image including the barcode, and the pixel synchronization signal are notified to the binary image signal storage means 2 and the run length counting means 5.

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

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

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

次に、細幅・太幅コード生成手段6とパターン領域判定
手段7の作用についてより詳細な構成を示す第7図を参
照して説明する。第7図において、11ば2値画信号、
4はラン長コード記憶手段、5はラン長計数手段、61
 はラン長データ7本分を遅延させて記憶しておく遅延
ラン長レジスタ、62はラン長データ7本分の合計値を
記憶する合計ラン長レジスタ、63は7本のラン長デー
タのうちの最初のランの画素の開始位置と最後のランの
終了位置を計数し記憶する画素位置カウンタ、6・1は
太幅バーが1個ある場合の細幅・太幅コードを生成する
第1の細幅・太幅コード生成手段、65は太幅バーが2
個ある場合の細幅・太幅コードを生成する第2の細幅・
太幅コード生成手段、66は太幅バーが3個ある場合の
細幅・太幅コードを生成する第3の細幅・太幅コード生
成手段、67は太幅バーが4個ある場合の細幅・太幅コ
ードを生成する第4の細幅・太幅コード生成手段、68
は太幅バーが5個ある場合の細幅・太幅コードを生成す
る第5の細幅・太幅コード生成手段、71 は太幅バー
が1個ある場合の細幅・太幅コードを評価する第1のパ
ターン領域判定手段、 72は太幅バーが2個ある場合
の細幅・太幅コードを評価する第2のパターン領域判定
手段、73は太幅バーが3個ある場合の細幅・太幅コー
ドを評価する第3のパターン領域判定手段、74は大福
バーが4個ある場合の細幅・太幅コードを評価する第4
のパターン領域判定手段、75は太幅バーが5個ある場
合の細幅・太幅コードを評価する第5のパターン領域判
定手段、7はパターン領域画信号生成手段であり、61
.62.63.64.65.66.67.68で細幅・
太幅コード生成手段を構成し、71、72.73.74
.75でパターン領域判定手段を構成している。画素位
置カウンタ63では目標ラン長データ1!(1は偶数)
以前までのラン長の合計を画素の開始位置、富+6番目
のラン長データ差でのラン長の合計を画素の終了位置と
して計数しパターン領域画信号生成手段7に通知する。
Next, the functions of the narrow/wide code generating means 6 and the pattern area determining means 7 will be explained with reference to FIG. 7 showing a more detailed configuration. In FIG. 7, 11 is a binary image signal,
4 is a run length code storage means, 5 is a run length counting means, 61
62 is a delayed run length register that stores the delayed run length data for 7 runs, 62 is a total run length register that stores the total value for 7 run length data, and 63 is a delay run length register that stores the delayed run length data for 7 runs. A pixel position counter that counts and stores the pixel start position of the first run and the end position of the last run, and 6.1 is the first thin bar that generates the thin/broad code when there is one thick bar. Width/thick width code generation means, 65 has 2 thick bars
The second narrow width code that generates the narrow width code and the wide width code when there are
66 is a third narrow/thick code generating means for generating a narrow/thick code when there are three thick bars; 67 is a third narrow/thick code generating means for generating a narrow/thick code when there are four thick bars; Fourth narrow/thick code generation means for generating wide/thick codes, 68
71 is a fifth narrow/thick code generation means for generating a narrow/thick code when there are five thick bars, and 71 evaluates a narrow/thick code when there is one thick bar. 72 is a second pattern area determining means that evaluates the narrow width/thick width code when there are two wide bars; 73 is the narrow width when there are three wide bars;・Third pattern area determination means for evaluating wide code; 74 is a fourth pattern area determining means for evaluating narrow and wide codes when there are four Daifuku bars;
75 is a fifth pattern area determining means for evaluating the narrow/wide code when there are five wide bars; 7 is a pattern area image signal generating means; 61
.. Narrow width with 62.63.64.65.66.67.68
Consists of wide code generation means, 71, 72.73.74
.. 75 constitutes a pattern area determining means. The pixel position counter 63 has target run length data 1! (1 is an even number)
The sum of the previous run lengths is counted as the pixel start position, and the sum of the run lengths at wealth+6th run length data difference is counted as the pixel end position, and the result is notified to the pattern area image signal generation means 7.

次に遅延ラン長レジスタ61は第8図のごとくなってお
り次のごとく作用する。すなわち、遅延レジスタ群は7
個のレジスタrlllr2、r3、[4、r5、「6、
rlからなっておりラン長データの列を11としたとき
rlにば111r2にはli+t、  r3には11+
2、r4には11÷3、r5には11+4、「6には1
1+5、rlにはli+6 ’、H記憶する。又、合計
ラン長レジスタ62 はラン長合計値(ρ)をρ−= 
li+li+t−1−1i+2−4−1i+3−1−1
i+4+li−+−5+li+aと計数し記憶する。次
に、第1の細幅・太幅コード生成手段64において、ま
ずラン長合計値(ρ)が細幅バー・太幅バー判定表の太
幅バーが1個の場合のラン長合計値(ρ)の上限値およ
び下限値を満足するか否かを判定する。満足しない場合
は、2進数のoooooooコードを後段の第1のパタ
ーン領域判定手段71 に通知する。
Next, the delay run length register 61 is as shown in FIG. 8 and operates as follows. In other words, the delay register group is 7.
registers rllllr2, r3, [4, r5, '6,
rl, and when the run length data column is 11, rl is 111, r2 is li+t, r3 is 11+
2, 11÷3 for r4, 11+4 for r5, 1 for 6
1+5, li+6', H is stored in rl. In addition, the total run length register 62 stores the run length total value (ρ) as ρ−=
li+li+t-1-1i+2-4-1i+3-1-1
Count and store i+4+li-+-5+li+a. Next, in the first narrow/wide code generation means 64, the run length total value (ρ) is the run length total value (ρ) when there is one wide bar in the narrow bar/wide bar determination table. It is determined whether the upper limit value and lower limit value of ρ) are satisfied. If not satisfied, the binary oooooooo code is notified to the first pattern area determining means 71 at the subsequent stage.

以下余白 本実施例においてラン長合計値(ρ)の上限値を7本の
バーを直交した走査線が所定の密度で読み取る画素数に
対して、142倍以上の余裕度を持たせた値を設定する
ことで45度以内の傾きのあるバーコードを許容してい
る。満足する場合は、引き続きレジスタrl、 r2、
r3、r4、r5、r6、r7の値が第2表の細幅バー
・太幅バー判定表の太幅バーが1個の場合の細幅バーの
上限値、下限値又は太幅バーの上限値、下限値を満足す
るか否かを判定する。いずれかのレジスタの値がいずれ
の上限地・下限値をも満足しない場合すなわち、いずれ
かのk(15に≦7)に対して [kの値〈ρ/181だは6ρ/13(rkの値の場合
は2進数の0 (100000コードを後段の第1のパ
ターン領域判定手段71に通知する。又、いずれかを満
足する場合は、細幅バーを満足する場合、すなわち ρ/18hrkの値く3ρ/18 の場合はO1太1福パーを満足する場合、すなわち3 
/) / l 3 S  r k の1直s6ρ/18
′/″ilとした7けたの2進コードを後段の第1のパ
ターン領域判定手段71 に通知する。また、第2の細
幅・大福コード生成手段65、第3の細幅。
Margin below In this example, the upper limit of the run length total value (ρ) is set to a value that has a margin of 142 times or more for the number of pixels read at a predetermined density by scanning lines perpendicular to seven bars. This setting allows barcodes that are tilted within 45 degrees. If satisfied, continue registers rl, r2,
The values of r3, r4, r5, r6, and r7 are the upper limit and lower limit of the narrow bar or the upper limit of the thick bar when there is one thick bar in the thin bar/thick bar judgment table in Table 2. It is determined whether the value and the lower limit are satisfied. If the value of any register does not satisfy any of the upper and lower limits, that is, for any k (15≦7), [the value of k <ρ/181 or 6ρ/13 (rk of In the case of the value, the binary 0 (100000 code is notified to the first pattern area determination means 71 at the subsequent stage. Also, if any of the following is satisfied, if the narrow bar is satisfied, that is, the value of ρ/18hrk) In the case of 3ρ/18, if O1 fat 1 luck par is satisfied, that is, 3
/) / l 3 S r k 1 shift s6ρ/18
The 7-digit binary code ``/''il is notified to the first pattern area determination means 71 in the subsequent stage.The second narrow width/Daifuku code generation means 65 and the third narrow width code generation means 65 are also notified.

太幅コード生成手段66、第、1の細幅・太幅コード生
成手段67、第5の細幅・太幅コード生成手段68にお
いても同様な判定を行ない2進数のコードを生成し、後
段の第2のパターン領域判定手段72、第3のパターン
領域判定手段73、第4のパターン領域判定手段7−1
、=sのパターン領域判定手段75に通知する。次に第
1のパターン領域判定手段71 において、ラン長コー
ド記憶手段−1から第2図に示すパターンコードを読み
出し、第1の細幅・太幅コード生成手段64からの細幅
・太幅コードと比較し合致すれば適合、合致しなければ
非適合を後段のパターン領域画信号生成手段8に通知す
る。寸だ、第2のパターン領域判定手段72、m:3の
パターン領域判定手段73、第4のパターン画成判定手
段74、第5のパターン領域判定手段75、においでも
同様の評価を行ない適合、非適合を後段のパターン領域
画信号生成手段8に通知する。
The wide code generation means 66, the first narrow and wide code generation means 67, and the fifth narrow and wide code generation means 68 perform similar determinations and generate binary codes, which are then used in the subsequent stages. Second pattern area determining means 72, third pattern area determining means 73, fourth pattern area determining means 7-1
, =s is notified to the pattern area determination means 75. Next, the first pattern area determining means 71 reads out the pattern code shown in FIG. If they match, the pattern area image signal generating means 8 at the subsequent stage is notified of the conformity, and if they do not match, the non-conformity is notified. The second pattern area determination means 72, the m:3 pattern area determination means 73, the fourth pattern definition determination means 74, and the fifth pattern area determination means 75 perform the same evaluation on odor and determine suitability. The non-conformance is notified to the pattern area image signal generation means 8 in the subsequent stage.

次に、パターン領域画信号生成手段8においては当該ラ
インの最初に出力用ラインバッファ(図示せず)を初期
化しておき、前段の第1のパターン領域判定手段71 
、第2のパターン領域判定手段72、第3のパターン領
域判定手段73、第4のパターン領域判定手段74、第
5のパターン領域判定手段75のいずれかからの適合通
知があった場合に、画素位置カウンタ63の開始位置、
終了位置の範囲のラインバッファを黒に:4換する。
Next, in the pattern area image signal generation means 8, an output line buffer (not shown) is initialized at the beginning of the line, and the first pattern area determination means 71 at the previous stage
, the second pattern area determining means 72, the third pattern area determining means 73, the fourth pattern area determining means 74, and the fifth pattern area determining means 75. the starting position of the position counter 63;
Convert the line buffer in the range of the end position to black:4.

以上の操作を当該ラインが終了するまで繰り返すことに
より、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.

次に、中心線算出手段9においてマイクロコンピュータ
を用いて以下の演算をおこないパターン領域の中心線と
中心で求める。すなわち、前記パターン領域内111″
号を主操作方向をX軸、副走査方向をY@とする座標系
に対応させ、黒の点Pi(xi。
Next, the centerline calculation means 9 uses a microcomputer to perform the following calculations to determine the centerline and center of the pattern area. That is, within the pattern area 111''
The black point Pi(xi.

yi)のX軸方向の中心・Xを 最小自乗近似直線 y=asx+b の係数a、bを ・・(3) ・・・(5) 相関係数rを に従って求め、第(3)式の直線を第1の中心線とする
。第1の中心線は第2表に示す細幅バー・太幅バー判定
表の設定によりその傾きがX軸に対j−て±・15度以
下の傾きを許容している。この演算は第9図に示すプロ
グラムで実現できている。このプログラムでx〔〕は点
列PiのX座標値、9〔〕は点列PiのY座標値、nは
点列の数、x−bardX軸方向の平均値、aは最小自
乗近似直線の傾き係数、bは最小自乗近似直線の変位係
数、rは相関係数である。
yi) center in the X-axis direction/X is the least square approximation straight line y = asx + b The coefficients a and b of the... (3) ... (5) Find the correlation coefficient r according to the straight line of equation (3) Let be the first center line. The first center line is allowed to have an inclination of ±15 degrees or less with respect to the X axis due to the settings of the narrow bar/thick bar determination table shown in Table 2. This calculation can be realized by the program shown in FIG. In this program, x[] is the X coordinate value of the point sequence Pi, 9[] is the Y coordinate value of the point sequence Pi, n is the number of point sequences, the average value of x-bar in the X-axis direction, and a is the least square approximation straight line. The slope coefficient, b is the displacement coefficient of the least square approximation straight line, and r is the correlation coefficient.

次に、縦横変換画信号読み出し手段3において2値画信
号記憶手段2より、点P(x、y)の値をP’(y、x
)の値として読み取ることで縦横変換を施した、すなわ
ち元の画信号に対して900回転させた画信号を得る。
Next, in the vertical/horizontal conversion image signal readout means 3, the value of the point P(x, y) is read from the binary image signal storage means 2 to P'(y, x
) to obtain an image signal that has undergone vertical and horizontal conversion, that is, has been rotated by 900 relative to the original image signal.

これら縦横変換面(3号に対してラン長計数手段、細幅
・太幅コード生成手段、パターン領域判定手段、パター
ン領域画信号生成手段、中心線算出手段において前記と
同様の処理を行ないY11!ll]方向の中心yと最小
自乗近似直線 x = a’・y + b’        ・  ・
(31と相関係数r′を求め、第(31式の直線を第2
の中心線とする。第2の中心線は第2表に示す細幅バー
・太幅バー判定表の設定によりその傾きがY軸に対して
士・15度以下の傾きを許容している。即ちX軸に対し
て45度以上の傾きを許容している。
The same processing as described above is performed on these vertical/horizontal conversion surfaces (No. 3) in the run length counting means, narrow width/wide width code generation means, pattern area determination means, pattern area image signal generation means, and center line calculation means, and Y11! ll] direction center y and least squares approximation straight line x = a'・y + b' ・ ・
(31) and the correlation coefficient r', and the straight line of (31) is
Let the center line be the center line of The setting of the narrow bar/thick bar determination table shown in Table 2 allows the second center line to have an inclination of 15 degrees or less with respect to the Y axis. That is, a tilt of 45 degrees or more with respect to the X axis is allowed.

次に、傾き角判定手段10において第1の中心線の相関
係数「と第2の中心線の相関係数rを評価し、 r≧r′の場合(は式(3)を中心線として、r (r
の場合は式(3)を中心線として、採用し後段の傾斜画
信号生成手段11に通知する。
Next, the inclination angle determining means 10 evaluates the correlation coefficient ``of the first center line and the correlation coefficient r of the second center line, and if r≧r′ (then, using equation (3) as the center line, , r (r
In this case, formula (3) is used as the center line and is notified to the subsequent tilt image signal generation means 11.

最後に、傾斜画信号生成手段11においても以下の記憶
番地演算を行ない2値画信号記憶手段2より画信号を取
り出し本装置の出力信号列とする。
Finally, the tilted image signal generation means 11 also performs the following memory address calculations, and extracts the image signal from the binary image signal storage means 2, using it as an output signal sequence of the apparatus.

すなわち、第1の中心線を採用した場合は、バーコード
の幅、走査線密度、前段で求めたX方向の平均値x1最
小自乗近似直線の係数a、bより読み取り開始点Qo 
(XQO、yqo )と読み取りビノチムX を次の第
(力、(8)式で求める。
That is, when the first center line is adopted, the reading starting point Qo is determined from the barcode width, scanning line density, average value in the X direction obtained in the previous step x1, coefficients a and b of the least square approximation straight line.
(XQO, yqo) is read and binochime X is determined using the following equation (8).

△X==lAr〒「■      ・・ ・(7)点列
Qj (xqJ、 yqJ)は第(9)式で求める。
△X==lAr〒“■... ・(7) The point sequence Qj (xqJ, yqJ) is obtained by equation (9).

このようにして求めた点列QJの座標値(XQJ 1y
qi )に基づき2値画信号記憶手段2より画信号を取
り出し本装置の出力信号列とする。第2の中心線を採用
した場合も同様に、前段で求めたY方向の平均値y、最
小自乗近似直線の係数a、bより読み取り開始点Qo 
(XQOl yqo )  と読み取りピッチ△yを次
の式(75、j85で求める。
The coordinate values of the point sequence QJ obtained in this way (XQJ 1y
qi), an image signal is taken out from the binary image signal storage means 2 and used as an output signal sequence of the present apparatus. Similarly, when the second center line is adopted, the reading starting point Qo is obtained from the average value y in the Y direction obtained in the previous step and the coefficients a and b of the least square approximation straight line.
(XQOl yqo) and the reading pitch Δy are determined using the following equation (75, j85).

△y −1/V’〒]]四    ・・・ ・・ (7
)点列Qj (xqi 、 ym )は第(9)式で求
める。
△y -1/V'〒]]4...... (7
) The point sequence Qj (xqi, ym) is obtained using equation (9).

このようにして求めた点列QJの座標値(XQJ 。The coordinate values of the point sequence QJ obtained in this way (XQJ).

yQj)に基づき2値画信号記憶手段2より画信号を取
り出し本装置の出力信号列とする。
yQj), an image signal is taken out from the binary image signal storage means 2 and used as an output signal sequence of the present apparatus.

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

発明の効果 以上の如く本発明は、予めバーコードのラン長のパター
ンを記録しておき、ラヌタスキャンで読み取った画信号
のラン長を前記の記憶しであるパターンと照合すること
でバーコード領域を検出し、この領域の中心線を求め、
中心線に沿った所定ピッチの画信号を取り出すことによ
り、バーコードに直交定食したと等価な画信号列を得る
ことができる。このようにして得られた画信号列は従来
よりあるバーコードp14読装置の入力信号に採用する
ことで、そのバーコード解読が可能となりその効果は非
常に大きい。
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 LANUTA scan with the above-mentioned stored pattern to scan the barcode area. Detect and find the center line of this area,
By extracting image signals at a predetermined pitch along the center line, it is possible to obtain an image signal sequence equivalent to orthogonal to the barcode. By employing the image signal sequence obtained in this way as an input signal to a conventional barcode P14 reading device, the barcode can be decoded, 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図は同中心および中上・線、相関係数を
もとめるプログラムを示した図である。 12個画信号発生手段、2・2値画信号記憶手段、3・
縦横変換画信号読み出し手段、4・・ラン長コード記憶
手段、5 ・ラン長計数手段、6・・・細幅・太幅コー
ド生成手段、7・・・パターン領域判定手段、8 パタ
ーン領域画信号生成手段、9・・中心線算出手段、10
・・傾き角判定手段、11傾斜画信号生成手段。 代理人の氏名 弁理士 粟 野 重 孝 ほか1名」 ミτ 3 [≧ゴ 芦 図 第 図 第 図 7nt ’nt floa七 f[oの七 +′1o社 flOの七 ン[]; 不χ bar; 年1゜ ネb; ンr′ 3y2 = O; Sxソ : 0゜ 不X  bar  x  (floa、七)Sy/n;
z =  n寧sx2 − 3x亥Sx。 W 二 Hxsy2 −  SyネSγ。 f (と2ンW) 二=  0) +eturn(−1)+ Fir(floa七)(rI木Sxy   SxオSγ
ル2−retrah (0) :
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 of the same wide bar. Figure 4 is a pattern diagram when there are 2 thick bars, Figure 5 is a pattern diagram when there are 4 wide bars, Figure 6 is a pattern diagram when there are 4 wide bars. Pattern diagram when there are 5 pieces,
FIG. 7 is a block diagram of the pattern area detection means, FIG. 8 is a diagram of the relationship between the delay run length register group and the total run length register, and FIG. It is a diagram showing a program to be requested. 12 image signal generation means, 2/binary image signal storage means, 3.
Vertical/horizontal conversion image signal reading means, 4. Run length code storage means, 5. Run length counting means, 6. Narrow width/wide width code generation means, 7. Pattern area determination means, 8. Pattern area image signal. Generation means, 9... Center line calculation means, 10
...Tilt angle determination means, 11 tilted image signal generation means. Name of agent: Patent attorney Shigetaka Awano and 1 other person"Mi; year 1゜neb; nr' 3y2 = O; Sx so: 0゜not
z = nningsx2 − 3x亥Sx. W2Hxsy2-SyneSγ. f (and 2 in W) 2 = 0) + etturn (-1) + Fir (Floa 7) (rI tree Sxy Sx o Sγ
le 2-retrah (0):

Claims (1)

【特許請求の範囲】[Claims] バーコードを含む画信号の読み取り信号から2値画信号
を発生させる2値画信号発生手段と、その2値画信号を
記憶する2値画信号記憶手段と、所定のラン長のコード
を記憶させたラン長コード記憶手段と、前記2値画信号
記憶手段より縦横変換した2値画信号を読み出す縦横変
換画信号読み出し手段と、前記2値画信号及び縦横変換
した2値画信号の白・黒ランを計数しラン長データを生
成するラン長計数手段と、所定量のラン長データを細幅
と太幅を示すコードに変換する細幅・太幅コード生成手
段と、前記ラン長コードと細幅・太幅コードを比較し所
定のパターン領域か否かを判定するパターン領域判定手
段と、所定のパターン領域の場合のみ1又は0とする画
信号を生成するパターン領域画信号生成手段と、前記パ
ターン領域画信号の中心線を算出する中心線算出手段と
、その中心線の傾き角を判定する傾き角判定手段と、前
記中心線に沿って前記2値信号記憶手段より画信号を取
り出す傾斜画信号生成手段を具備する画信号処理装置。
Binary image signal generation means for generating a binary image signal from a read image signal including a barcode; Binary image signal storage means for storing the binary image signal; and Binary image signal storage means for storing a code of a predetermined run length. vertically and horizontally converted image signal readout means for reading out the vertically and horizontally converted binary image signal from the binary image signal storage means; a run length counting means for counting runs and generating run length data; a narrow width/thick width code generating means for converting a predetermined amount of run length data into codes indicating narrow width and wide width; pattern area determination means for comparing the width and thick width codes to determine whether or not the area is a predetermined pattern area; pattern area image signal generation means for generating an image signal that is set to 1 or 0 only in the case of a predetermined pattern area; a centerline calculation means for calculating a centerline of a pattern area image signal; a tilt angle determination means for determining a tilt angle of the centerline; and a tilted image for extracting an image signal from the binary signal storage means along the centerline. An image signal processing device comprising signal generation means.
JP63184913A 1988-07-25 1988-07-25 Picture signal processor Pending JPH0233685A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63184913A JPH0233685A (en) 1988-07-25 1988-07-25 Picture signal processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63184913A JPH0233685A (en) 1988-07-25 1988-07-25 Picture signal processor

Publications (1)

Publication Number Publication Date
JPH0233685A true JPH0233685A (en) 1990-02-02

Family

ID=16161524

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63184913A Pending JPH0233685A (en) 1988-07-25 1988-07-25 Picture signal processor

Country Status (1)

Country Link
JP (1) JPH0233685A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5682030A (en) * 1993-02-02 1997-10-28 Label Vision Systems Inc Method and apparatus for decoding bar code data from a video signal and application thereof
US6135354A (en) * 1997-09-07 2000-10-24 Label Vision Systems, Inc. System and method for facilitating high speed processing of video signals containing images of barcode labels
CN106971213A (en) * 2016-01-13 2017-07-21 王硕腾 Coding method, coding/decoding method and the electronic installation of two-dimensional bar code

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5682030A (en) * 1993-02-02 1997-10-28 Label Vision Systems Inc Method and apparatus for decoding bar code data from a video signal and application thereof
US6135354A (en) * 1997-09-07 2000-10-24 Label Vision Systems, Inc. System and method for facilitating high speed processing of video signals containing images of barcode labels
CN106971213A (en) * 2016-01-13 2017-07-21 王硕腾 Coding method, coding/decoding method and the electronic installation of two-dimensional bar code

Similar Documents

Publication Publication Date Title
US7950589B2 (en) Program, information storage medium, two-dimensional code generation system, image generation system and printed material
US4087788A (en) Data compression system
US20050242186A1 (en) 2D rectangular code symbol scanning device and 2D rectangular code symbol scanning method
JPH06309485A (en) Optical information reader
TWI567654B (en) Picture-based barcode encoding method, picture-based barcode decoding method, picture-based barcode encoding device and picture-based barcode decoding device
JP2670273B2 (en) Image processing device
JPH0749927A (en) Pattern recognizing method
JPH0233685A (en) Picture signal processor
JP4970385B2 (en) Two-dimensional code reader and program thereof
JP3261208B2 (en) Picture information prediction encoding and decoding apparatus
JPH0223488A (en) Picture signal processor
JPH03269780A (en) Fingerprint data binarizing method
JPH0423303B2 (en)
JPH02168363A (en) Image signal processor
JP2002199226A (en) Image data compression device and image data compression method
JPS5830645A (en) Pattern inspecting system
JPH0376066B2 (en)
JP2917461B2 (en) Pattern recognition device
JPH04311278A (en) One-dimensional picture processor
JPH01201788A (en) Character reading method
JPS61125293A (en) Mosaic coding device
JPH0591326A (en) Picture processing device
JPH0429109B2 (en)
JPS6140683A (en) Contour tracking device
JPH09284568A (en) Image compression method