JP3290738B2 - Barcode detection device - Google Patents

Barcode detection device

Info

Publication number
JP3290738B2
JP3290738B2 JP05385493A JP5385493A JP3290738B2 JP 3290738 B2 JP3290738 B2 JP 3290738B2 JP 05385493 A JP05385493 A JP 05385493A JP 5385493 A JP5385493 A JP 5385493A JP 3290738 B2 JP3290738 B2 JP 3290738B2
Authority
JP
Japan
Prior art keywords
barcode
frame memory
dct
image data
block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP05385493A
Other languages
Japanese (ja)
Other versions
JPH06266879A (en
Inventor
千佳子 小宮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Olympus Corp
Original Assignee
Olympus Optic 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 Olympus Optic Co Ltd filed Critical Olympus Optic Co Ltd
Priority to JP05385493A priority Critical patent/JP3290738B2/en
Publication of JPH06266879A publication Critical patent/JPH06266879A/en
Application granted granted Critical
Publication of JP3290738B2 publication Critical patent/JP3290738B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、バーコード像を含む画
像データからバーコードを検出すバーコード検出装置に
関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a bar code detecting device for detecting a bar code from image data including a bar code image.

【0002】[0002]

【従来の技術】近年、スーパーマーケットなどでのPO
S(ポイント・オブ・セールス)システムのめざましい
普及に伴い、バーコードはいたる所で目にするようにな
った。このバーコードの種類は数十種以上もあり、大別
して1次元バーコードと2次元バーコードとに分類され
る。
2. Description of the Related Art In recent years, POs in supermarkets, etc.
With the remarkable spread of point-of-sales (S) systems, barcodes have become ubiquitous. There are dozens or more types of barcodes, which are roughly classified into one-dimensional barcodes and two-dimensional barcodes.

【0003】1次元バーコードは、バーとスペースが交
互に1列に並んだ構成をしており、図3の(A)に示す
ようなJANの他にも、ITF,CODE128,CO
DE39,等の各種コード体系がある。
A one-dimensional bar code has a structure in which bars and spaces are alternately arranged in a line. In addition to JAN as shown in FIG. 3A, ITF, CODE128, CO
There are various code systems such as DE39.

【0004】しかし、これら1次元バーコードに記憶で
きる情報量は十数文字程度と少ないため、特に近年、2
次元バーコードと呼ばれる情報量を多くもつ新しいバー
コードが開発されている。例えば、図3の(B)に示す
ようなPDF417,同図の(C)に示すようなDAT
ACODE,同図の(D)に示すようなVERICOD
E,その他Code16K等の各種コード体系が提案さ
れている。これら2次元バーコードは、1次元バーコー
ドを積み重ねることや、マトリクス状にデータを展開す
ることで、情報量を増加させている。
However, the amount of information that can be stored in these one-dimensional barcodes is as small as about ten and several characters.
A new barcode having a large amount of information called a dimension barcode has been developed. For example, PDF417 as shown in FIG. 3B and DAT as shown in FIG.
ACODE, VERICOD as shown in (D) of FIG.
E and other various code systems such as Code16K have been proposed. These two-dimensional barcodes increase the information amount by stacking one-dimensional barcodes or developing data in a matrix.

【0005】上記各バーコードのデコード方法は、バー
コードの形状により異なっている。例えば、1次元バー
コードでは、一般に、複数方向の走査パターンを有する
レーザのうち、1本がバーコード全体を走査するように
構成させる方法、或はラインセンサがバーコード全体を
走査するように接触させる方法がとられ、バーコードの
両側に存在する余白部を検出して、バーコードデータを
確定して、デコードしている。また、近年では、例えば
特開平2−23484号公報等に開示されているよう
に、バーコード像を含む画像データから輪郭検出などの
画像処理を施して、バーコード領域を抽出し、バーコー
ドを横切る走査線を決定して、デコードする方法も提案
されている。
[0005] The decoding method of each of the above barcodes differs depending on the shape of the barcode. For example, in a one-dimensional barcode, generally, a laser having a scanning pattern in a plurality of directions is configured such that one laser scans the entire barcode, or a line sensor is contacted so as to scan the entire barcode. The bar code data is determined and decoded by detecting margins existing on both sides of the bar code. In recent years, as disclosed in, for example, JP-A-2-23484, image processing such as contour detection is performed from image data including a barcode image to extract a barcode region, A method of determining a scanning line to cross and decoding the scanning line has also been proposed.

【0006】また、PDF417の場合は、エリアセン
サでバーコードを撮像し、一旦フレームメモリに記憶す
る。そして、このフレームメモリのデータを水平,垂直
方向に読み出すことでロウを走査し、PDF417の特
徴あるスタート/ストップコード100,102を検出
して、バーコードの位置を確定し、バーコードの存在す
る領域のみを細かく走査することで効率良くデコードを
行なっている。あるいは、PDF417は、1次元バー
コードを積み重ねた構造をしているので、レーザを2次
元に振らせて、各ロウを走査させることでもデコード可
能である。
In the case of PDF417, a barcode is imaged by an area sensor and is temporarily stored in a frame memory. The row is scanned by reading the data of the frame memory in the horizontal and vertical directions, the start / stop codes 100 and 102 characteristic of the PDF 417 are detected, the position of the bar code is determined, and the bar code exists. Efficient decoding is performed by finely scanning only the area. Alternatively, since the PDF417 has a structure in which one-dimensional barcodes are stacked, it is possible to decode by scanning a row by shaking the laser two-dimensionally.

【0007】DATACODE,VERICODEで
は、エリアセンサでバーコード像を撮像し、フレームメ
モリを走査して、各コードの特徴あるパターン、つま
り、DATACODEのL字枠104、VERICOD
Eの四角い外枠106を検出して、バーコードの位置を
確定してデコードしている。
In DATACODE and VERICODE, a barcode image is picked up by an area sensor, and a frame memory is scanned to obtain a characteristic pattern of each code, that is, an L-shaped frame 104 of DATACODE, VERICOD.
The square outer frame 106 of E is detected, and the position of the barcode is determined and decoded.

【0008】上記のように、エリアセンサでバーコード
を撮像し、フレームメモリにデータを記憶してデコード
する方式では、フレームメモリ内のどの位置にバーコー
ド像が存在するかは不明である。しかし、フレームメモ
リ内をあらゆる方向に全て走査することは不可能であ
り、処理時間も非常にかかり現実的でない。そこでフレ
ームメモリ内でのバーコードの位置を検出し、バーコー
ドの存在する領域のみを走査してデコードする方法が一
般に提案されている。
As described above, in the method in which a barcode is picked up by an area sensor, data is stored in a frame memory, and the data is decoded, it is unknown where the barcode image exists in the frame memory. However, it is impossible to scan the frame memory in all directions in all directions, and the processing time is very long and impractical. Therefore, a method has been generally proposed in which a barcode position in a frame memory is detected, and only a region where the barcode exists is scanned and decoded.

【0009】また、例えばバーコードが印刷又は貼られ
た物品がベルトコンベア上を流れ、所定位置に配置され
たエリアセンサでバーコードを撮像してデコードするシ
ステムでは、一般にデコード処理には時間がかかるた
め、バーコードがきたときにのみデコード処理を行うよ
うにするのが高速化の鍵である。そこで、フレームメモ
リ内でのバーコード自体の存在を検出し、バーコードが
存在するときのみデコードを開始させる方法が各種提案
されている。
For example, in a system in which an article on which a barcode is printed or pasted flows on a belt conveyor, and the barcode is picked up and decoded by an area sensor arranged at a predetermined position, decoding processing generally takes a long time. Therefore, the key to speeding up is to perform decoding only when a barcode comes. Therefore, various methods have been proposed for detecting the presence of the barcode itself in the frame memory and starting decoding only when the barcode exists.

【0010】[0010]

【発明が解決しようとする課題】しかし、フレームメモ
リ内のバーコードの存在或は位置を検出するためにも、
フレームメモリ内を適当に走査する前走査が必要であ
り、これは水平及び垂直方向に数画素おきに粗く全画面
走査する方法が単純で一般的に用いられている。このバ
ーコード検出のための前走査を不適切に行うと、処理時
間が長くかかったり、バーコードが検出できないことが
ある。
However, in order to detect the presence or position of a barcode in the frame memory,
It is necessary to perform a pre-scan for appropriately scanning the inside of the frame memory, and a simple and generally used method is to roughly scan the entire screen every several pixels in the horizontal and vertical directions. If the pre-scan for bar code detection is improperly performed, the processing time may be long or the bar code may not be detected.

【0011】また、バーコード検出方法として、走査デ
ータから各コードの特徴あるパターンを見つけるアルゴ
リズムでは、コード毎に検出アルゴリズムが異なるの
で、デコードしたいバーコードの種類に応じて検出アル
ゴリズムを複数用意する必要がある。
In the barcode detection method, the algorithm for finding a characteristic pattern of each code from the scan data is different for each code. Therefore, it is necessary to prepare a plurality of detection algorithms according to the type of barcode to be decoded. There is.

【0012】さらに、前記アルゴリズムでは、今デコー
ドしようとしているバーコードがどのコードか判明して
いないと、どのパターンを見つけたらよいのか判らない
という問題点がある。
Further, the above-mentioned algorithm has a problem that unless it is known which barcode is to be decoded, it is impossible to know which pattern to find.

【0013】本発明は、上記の点に鑑みてなされたもの
で、フレームメモリ内のバーコードが、どのような種類
であっても同一のアルゴリズムを用いて検出ができ、バ
ーコードの種類が予め判っていなくても検出ができるバ
ーコード検出装置を提供することを目的とする。
The present invention has been made in view of the above points, and can detect any type of barcode in a frame memory using the same algorithm, and the type of barcode can be determined in advance. It is an object of the present invention to provide a barcode detection device that can detect even if it is not known.

【0014】[0014]

【課題を解決するための手段】上記目的を達成するため
に、本発明のバーコード検出装置は、バーコード画像を
含む多値画像データを記憶するフレームメモリと、上記
フレームメモリに記憶された画像データを所定の大きさ
のブロックごとに離散的コサイン変換(DCT)するD
CT手段と、上記DCT手段により得られたDCT変換
係数を記憶する係数記憶手段と、上記係数記憶手段に記
憶された変換係数からバーコードを検出するバーコード
検出手段とを備えることを特徴とするものである。
In order to achieve the above object, a bar code detecting apparatus according to the present invention comprises a frame memory for storing multi-valued image data including a bar code image, and an image stored in the frame memory. D for performing discrete cosine transform (DCT) on the data for each block of a predetermined size
CT means, coefficient storing means for storing DCT transform coefficients obtained by the DCT means, and bar code detecting means for detecting a bar code from the transform coefficients stored in the coefficient storing means. Things.

【0015】[0015]

【作用】即ち、本発明のバーコード検出装置によれば、
DCT手段によって、フレームメモリに記憶された画像
データを所定の大きさのブロックごとに離散的コサイン
変換し、このDCTにより得られたDCT変換係数を係
数記憶手段に記憶する。そして、バーコード検出手段
は、この係数記憶手段に記憶された変換係数からバーコ
ードを検出する。
According to the bar code detecting device of the present invention,
The DCT means performs discrete cosine transform of the image data stored in the frame memory for each block of a predetermined size, and stores the DCT transform coefficients obtained by the DCT in the coefficient storage means. Then, the barcode detection means detects a barcode from the conversion coefficient stored in the coefficient storage means.

【0016】つまり、多値データを2値化することで黒
/白領域内での画素値の振ら付きをなくしてからDCT
を施し、周波数成分に分解をする。そして、その周波数
成分(DCT変換係数)からバーコード領域の特徴を抽
出することでバーコードの検出を行うものである。
That is, by binarizing multi-valued data to eliminate fluctuations in pixel values in the black / white area, the DCT
To decompose into frequency components. Then, barcode detection is performed by extracting features of the barcode area from the frequency components (DCT transform coefficients).

【0017】[0017]

【実施例】本発明の実施例を説明する前に、まず、本発
明のバーコード検出方法の基本的な考え方について説明
する。原理は、画像データの周波数成分から、バーコー
ド領域を検出しようとするものである。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Before describing the embodiments of the present invention, the basic concept of the barcode detecting method of the present invention will be described first. The principle is to detect a barcode area from the frequency components of the image data.

【0018】DCTは、画像データを周波数成分に分
け、成分毎に量子化,符号化を行うことで画像データの
情報量を圧縮する高能率符号化の一種である。このDC
Tは、特に近年、動画像,静止画像のデータ圧縮技術と
して、最もよく用いられている手法である。
DCT is a type of high-efficiency coding that divides image data into frequency components and performs quantization and coding for each component to compress the information amount of the image data. This DC
T is a technique most frequently used in recent years as a data compression technique for moving images and still images.

【0019】画像データをn画素×n画素のブロックに
分割し、各ブロックにDCTを施して得られるDCT変
換係数は、当該ブロック内のデータがどのような周波数
成分を、どのくらいの強さでもっているかを表す。例え
ば、ブロック内のデータが均一であれば、AC成分は全
てゼロ、DC成分(オフセット分)のみが現れる。つま
り、ブロック内が真っ黒或は真っ白ならば、図1の
(B)或は(C)に示すように、DCT変換係数の大き
さの異なるDC成分のみが得られる。一方、ブロック内
に白黒データが混在していると、同図の(D)に示すよ
うに、そのDCT変換係数は複雑な値となる。
The image data is divided into blocks of n pixels × n pixels, and DCT transform coefficients obtained by performing DCT on each block are used to determine what frequency component and how strong the data in the block is. Represents For example, if the data in the block is uniform, all the AC components appear, and only the DC component (offset) appears. That is, if the inside of the block is pure black or pure white, only DC components having different magnitudes of DCT transform coefficients are obtained as shown in FIG. 1 (B) or (C). On the other hand, if black-and-white data is mixed in a block, the DCT transform coefficient becomes a complicated value as shown in FIG.

【0020】そこで、バーコードは黒のバー及び白のス
ペースで構成されているので、このバーコードを含む画
像データにDCTを施すと、DCT変換係数から黒領
域、白領域、白黒混在領域とに分類ができる。つまり、
バーコード,文字等が存在するブロックにはAC成分が
存在するので、背景あるいはバーコードのクワィエット
ゾーンの白い領域と、バーコード,文字等との区別がつ
く。そして、バーコードは四角い形状をもち、バー,ス
ペースは長さを持つので、同じ係数が並ぶのに対して、
文字は様々な形状をもつので、ブロック毎様々な周波数
成分が現われ、特定な係数は得られない、という特徴を
利用すると、バーコードと他の文字等との区別もつくの
で、DCT変換係数からバーコード領域を検出できると
考える。上記考えに従った本発明の実施例について、以
下図面を参照しながら説明する。 (第1実施例)
Therefore, since a bar code is composed of black bars and white spaces, when DCT is applied to image data including the bar code, the DCT transforms the image data into black, white, and black-and-white mixed areas. Can be classified. That is,
Since the AC component exists in the block in which the barcode, the character, and the like exist, the white area of the background or the quiet zone of the barcode is distinguished from the barcode, the character, and the like. The barcode has a square shape, and the bar and space have a length.
Since the character has various shapes, various frequency components appear in each block, and a specific coefficient cannot be obtained. Using the feature that the barcode can be distinguished from other characters, etc. It is assumed that the barcode area can be detected. An embodiment of the present invention based on the above idea will be described below with reference to the drawings. (First embodiment)

【0021】図1の(A)は、本発明の第1実施例のバ
ーコード検出装置10のブロック構成図である。同図に
於いて、参照番号12は画像データ(多値)の入力端子
であり、14は入力した画像データを記憶しておくフレ
ームメモリである。16はフレームメモリ14に記憶さ
れた画像データをn×nブロックに分割し、ブロック内
のデータをあるしきい値で2値化する2値変換部であ
り、18は上記2値化されたn×nブロックデータをD
CTするDCT部、20はこのDCT部18から出力さ
れるDCT変換係数を一画面分記憶する係数メモリであ
る。22は、上記変換係数メモリ20に記憶されたDC
T変換係数からバーコード領域を検出し、このバーコー
ド領域の画像データを上記フレームメモリ14からデコ
ード部24へ読出し供給するバーコード検出部である。
デコード部24は、上記バーコード検出部22によって
上記フレームメモリ14から読み出されたデータから、
バーコード情報をデコードし、不図示ホスト装置などに
デコード結果を転送出力する。次に、この第1実施例の
動作を説明する。
FIG. 1A is a block diagram of a bar code detecting apparatus 10 according to a first embodiment of the present invention. In FIG. 1, reference numeral 12 denotes an input terminal for image data (multi-valued), and reference numeral 14 denotes a frame memory for storing the input image data. Reference numeral 16 denotes a binary conversion unit that divides the image data stored in the frame memory 14 into n × n blocks and binarizes the data in the block with a certain threshold value. Reference numeral 18 denotes the binarized n. × n block data to D
A DCT unit 20 for performing CT is a coefficient memory for storing DCT transform coefficients output from the DCT unit 18 for one screen. Reference numeral 22 denotes a DC stored in the conversion coefficient memory 20.
A barcode detection unit that detects a barcode region from the T-transform coefficient and reads and supplies image data in the barcode region from the frame memory 14 to the decoding unit 24.
The decoding unit 24 converts the data read from the frame memory 14 by the barcode detection unit 22
It decodes the barcode information and transfers and outputs the decoding result to a host device (not shown). Next, the operation of the first embodiment will be described.

【0022】即ち、不図示CCD等で撮像されたバーコ
ード像を含む画像データは、入力端子12より入力さ
れ、フレームメモリ14に図2の(A)に示すように記
憶される。このフレームメモリ14に記憶された画像デ
ータは、2値変換部16によって、例えばフレームメモ
リ14の8×8画素のブロックに分割されて、2値デー
タに変換される。入力画像は多値データであるので、黒
バー或は白スペースでも、その値は画素毎に微妙に振ら
付いている。よって、このままDCTをかけたのでは、
黒とみなせるフロックでもAC成分が現れてしまうの
で、2値変換部16により2値化を行い、データ値の振
ら付きをなくしている。次に、DCT部18にて8×8
画素のブロックのDCTを行い、その変換結果(DCT
変換係数)を係数メモリ20へ記憶する。この2値化,
DCTを全てのブロックについて行い、バーコード検出
部22にて各ブロツクのDCT変換係数からバーコード
領域を検出する。例えば、各ブロックのDC成分から黒
ブロックを抽出し、近隣のブロックでグループ化をし
て、ほぼ四角形を形成する領域を検出、これをバーコー
ド領域と判断する。すると、バーコードを含むブロッ
ク、つまりバーコードの位置が判るので、フレームメモ
リ14よりその領域に相当するデータを読み出して、デ
コード部24にて、従来のデコード処理にてバーコード
情報のデコードを行い、そのデコード結果を転送する。
このように、バーコード像を含む画像データを、周波数
成分に分解し、その周波数成分の特徴を抽出することで
画像内のバーコードを検出できる。 (第2実施例)上記第1実施例の変形例としては、バー
コード検出部22の処理に於いて、各種バーコードの特
徴あるパターンを検出する方法もある。
That is, image data including a barcode image picked up by a CCD or the like (not shown) is input from the input terminal 12 and stored in the frame memory 14 as shown in FIG. The image data stored in the frame memory 14 is divided into, for example, 8 × 8 pixel blocks of the frame memory 14 by the binary conversion unit 16 and converted into binary data. Since the input image is multi-valued data, its value is slightly scattered for each pixel even in a black bar or a white space. Therefore, if DCT is applied as it is,
Since an AC component appears even in a block that can be regarded as black, the binarization is performed by the binary conversion unit 16 to eliminate fluctuations in data values. Next, an 8 × 8
DCT of the block of pixels is performed, and the conversion result (DCT
(Transformation coefficient) is stored in the coefficient memory 20. This binarization,
DCT is performed on all blocks, and a barcode detection unit 22 detects a barcode area from the DCT transform coefficients of each block. For example, a black block is extracted from the DC component of each block, and a group is formed by neighboring blocks to detect a region forming a substantially quadrangle, which is determined as a barcode region. Then, since the position of the block containing the barcode, that is, the position of the barcode is known, the data corresponding to the area is read from the frame memory 14 and the decoding unit 24 decodes the barcode information by the conventional decoding processing. , And transfer the decoding result.
As described above, the barcode in the image can be detected by decomposing the image data including the barcode image into frequency components and extracting the characteristics of the frequency components. (Second Embodiment) As a modification of the first embodiment, there is a method of detecting characteristic patterns of various barcodes in the processing of the barcode detection unit 22.

【0023】具体的には、似た周波数成分をもつブロッ
クが、ある一定方向に並び、さらに、その列が何本も平
行して現れたら、1次元バーコードが存在すると判断す
る。また、バーコード領域と見られる四角い領域中に、
大きな黒バーを表すブロツク群が存在すれば、PDF4
17と判断する。また別に、黒いL字形或は四角い黒枠
を表すブロック群があれば、DATACODE或はVE
RICODEと判断し、各コードに応じたデコード方法
で、フレームメモリ14のデータを読み出してデコード
部24にてデコード処理をする。
More specifically, if blocks having similar frequency components are arranged in a certain direction, and if a number of the columns appear in parallel, it is determined that a one-dimensional barcode exists. Also, in a square area that can be seen as a barcode area,
If there are blocks representing large black bars, PDF4
Judge as 17. Separately, if there is a block group representing a black L-shape or square black frame, DATACODE or VE
It is determined that the code is RICODE, and the data in the frame memory 14 is read out by a decoding method corresponding to each code, and the decoding unit 24 performs a decoding process.

【0024】このように、バーコード像を含む画像デー
タを、周波数成分に分解することで、種種の形状を持つ
バーコードの特徴を周波数成分で表現できるので、その
特徴をとらえることでバーコードの識別が行える。 (第3実施例)
As described above, by decomposing the image data including the barcode image into frequency components, the characteristics of the barcode having various shapes can be expressed by the frequency components. Can be identified. (Third embodiment)

【0025】また別の実施例として、上記第1実施例と
同じ構成で、画像データをCCDなどのイメージセンサ
で繰り返し撮像しており、何か撮像された場合のみバー
コード検出、デコード処理に移るシステムを考える。
In another embodiment, image data is repeatedly picked up by an image sensor such as a CCD with the same structure as that of the first embodiment, and only when any image is picked up, the process shifts to barcode detection and decoding processing. Thinking system.

【0026】何も撮像されていない状態では、画面内は
全て白、或は黒となるので、DCT変換係数のAC成分
はどこにも現れない。よって、上記第1実施例に於け
る、バーコード検出部22の処理に於いて、AC成分が
存在しない場合には、何も撮像していないと判断し、次
の画像取り込みに移る。一方、AC成分が存在すれば、
何か撮像したと判断し、バーコード領域の検出、デコー
ド処理に移る。
In the state where no image is taken, the entire screen is white or black, and the AC component of the DCT transform coefficient does not appear anywhere. Therefore, in the processing of the barcode detection unit 22 in the first embodiment, if there is no AC component, it is determined that nothing has been imaged, and the process proceeds to capture the next image. On the other hand, if an AC component exists,
It is determined that something has been imaged, and the process proceeds to barcode area detection and decoding processing.

【0027】このように、撮像した画像データの周波数
成分を解析することで、画面内に物(バーコード)が入
ったことが検出でき、バーコードの自動読取スタートが
行える。 (第4実施例)別の実施例を、図2の(B)のバーコー
ド検出装置30のブロック構成図を用いて説明する。
As described above, by analyzing the frequency components of the captured image data, it can be detected that an object (bar code) has entered the screen, and the automatic reading of the bar code can be started. (Fourth Embodiment) Another embodiment will be described with reference to the block diagram of the barcode detection device 30 shown in FIG.

【0028】同図に於いて、参照番号12は画像データ
(多値)の入力端子、14は入力した画像データを記憶
しておくフレームメモリである。16はこのフレームメ
モリ14に記憶された入力画像データをフレームメモリ
のm×m画素のブロックに分割し、各ブロック内のデー
タをあるしきい値で2値化する2値変換部であり、32
はバーコードのスペース部分を塗りつぶせる大きさのm
×mサイズで黒を膨張させる膨張処理部である。18は
上記膨張処理部32で黒を膨張されたデータをn×n
(n<=m)ブロックでDCTするDCT部、20はD
CT変換係数を一画面分記憶する係数メモリである。2
2は上記DCT変換係数からバーコード領域を検出する
バーコード検出部であり、24はフレームメモリ14か
ら読み出されたデータからバーコード情報をデコードす
るデコード部である。次に、この第4実施例の動作を説
明する。
Referring to FIG. 1, reference numeral 12 denotes an input terminal for image data (multi-valued), and reference numeral 14 denotes a frame memory for storing the input image data. Reference numeral 16 denotes a binary conversion unit which divides the input image data stored in the frame memory 14 into blocks of m × m pixels of the frame memory and binarizes the data in each block with a certain threshold.
Is m large enough to fill the bar code space
This is an expansion processing unit that expands black with a size of xm. Reference numeral 18 denotes the data obtained by expanding the black in the expansion processing section 32 into n × n
(N <= m) DCT unit for performing DCT in block, 20 is D
This is a coefficient memory for storing CT conversion coefficients for one screen. 2
Reference numeral 2 denotes a barcode detection unit that detects a barcode area from the DCT transform coefficients, and 24 denotes a decoding unit that decodes barcode information from data read from the frame memory 14. Next, the operation of the fourth embodiment will be described.

【0029】入力端子12から入力された画像データ
は、フレームメモリ14に記憶される。このフレームメ
モリ14に記憶された画像データは、2値変換部16に
て2値データに変換される。次に、膨張処理部32にて
m×mサイズの走査窓で、黒膨張処理が施される。これ
は一般的な手法で、走査窓内のデータの論理和をとるこ
とで、黒画素を走査窓の大きさ分だけ膨張させることに
なる。するとバーコード領域は、スペースが黒で塗りつ
ぶされ、黒い大きな一つの四角となる。DCT部18で
は、この真っ黒なバーコード像を含む画像データを、n
×nブロック、この大きさは膨張処理時の走査窓サイズ
m×mより小さいか、同じ大きさで、DCTを施す。す
るとそのDCT変換係数は、バーコード領域の周辺部に
相当する位置に、四角くAC成分が存在するブロックが
現れ、その内部は、黒ブロックを表すDC成分のみのブ
ロック群となる。よって、バーコード検出部22にて、
この四角い黒ブロック群を抽出することで、バーコード
領域の検出が行える。
The image data input from the input terminal 12 is stored in the frame memory 14. The image data stored in the frame memory 14 is converted into binary data by a binary conversion unit 16. Next, black expansion processing is performed by the expansion processing unit 32 through a scanning window of m × m size. This is a general method, in which the black pixel is expanded by the size of the scanning window by taking the logical sum of the data in the scanning window. Then, in the barcode area, the space is filled with black, and a large black square is formed. The DCT unit 18 converts the image data including the black barcode image into n
× n blocks, the size of which is smaller than or the same as the scan window size m × m at the time of expansion processing, and DCT is applied. Then, in the DCT transform coefficient, a square block having an AC component appears at a position corresponding to the peripheral portion of the barcode area, and the inside of the block is a block group including only the DC component representing a black block. Therefore, in the barcode detection unit 22,
The barcode area can be detected by extracting the square black block group.

【0030】このように、バーコード領域を黒膨張さ
せ、四角い真っ黒な領域とすることで、周波数成分の発
生により特徴をもたせることができるので、バーコード
検出の処理が簡単に行える。 (第5実施例)上記第4実施例に於いて、膨張処理の
後、データ間引きを行ってから、DCTを施す。する
と、ブロック数が減るので、演算量が減り、より高速処
理が行える。
As described above, since the barcode area is black-expanded to be a square black area, a characteristic can be given by the generation of a frequency component, so that the barcode detection processing can be easily performed. (Fifth Embodiment) In the fourth embodiment, after expansion processing, data thinning is performed, and then DCT is performed. Then, since the number of blocks is reduced, the amount of calculation is reduced, and higher-speed processing can be performed.

【0031】なお、上記第1乃至第5実施例に於いて、
係数メモリ20に記憶するDCT変換係数は、必ずしも
全ての係数でなくてもよく、DC成分のみ、或はDC成
分とACの低周波成分のみでも構わない。
In the first to fifth embodiments,
The DCT transform coefficients stored in the coefficient memory 20 need not necessarily be all coefficients, and may be only DC components or only DC components and low frequency components of AC.

【0032】[0032]

【発明の効果】以上詳述したように、本発明によれば、
バーコード像を含む画像データを周波数成分に分解し、
周波数成分の特徴を抽出することでバーコード検出を行
うので、フレームメモリ内のバーコードが、どのような
種類であっても同一のアルゴリズムを用いて検出がで
き、バーコードの種類が予め判っていなくても検出がで
きるバーコード検出装置を提供することができる。ま
た、2値変換部16による2値化を省略することもでき
る。
As described in detail above, according to the present invention,
Decompose the image data including the barcode image into frequency components,
Since barcode detection is performed by extracting the characteristics of the frequency components, any type of barcode in the frame memory can be detected using the same algorithm, and the type of barcode is known in advance. It is possible to provide a barcode detection device that can perform detection without using the barcode. Further, the binarization by the binary conversion unit 16 can be omitted.

【図面の簡単な説明】[Brief description of the drawings]

【図1】(A)は本発明の第1実施例のバーコード検出
装置のブロック構成図であり、(B)乃至(D)はそれ
ぞれ離散的コサイン変換(DCT)により得られるDC
T変換係数を説明するための図である。
FIG. 1A is a block diagram of a barcode detection device according to a first embodiment of the present invention, and FIGS. 1B to 1D each show a DC obtained by a discrete cosine transform (DCT).
FIG. 4 is a diagram for explaining a T-transform coefficient.

【図2】(A)はフレームメモリに記憶されたバーコー
ド像を含む画像データの模式図であり、(B)は本発明
の第4実施例のバーコード検出装置のブロック構成図で
ある。
FIG. 2A is a schematic diagram of image data including a barcode image stored in a frame memory, and FIG. 2B is a block configuration diagram of a barcode detection device according to a fourth embodiment of the present invention.

【図3】(A)乃至(D)はそれぞれバーコードを示す
図である。
FIGS. 3A to 3D are diagrams each showing a barcode. FIG.

【符号の説明】[Explanation of symbols]

10,30…バーコード検出装置、12…入力端子、1
4…フレームメモリ、16…2値変換部、18…離散的
コサイン変換(DCT)部、20…係数メモリ、22…
バーコード検出部、24…デコード部、32…膨張処理
部。
10, 30: bar code detecting device, 12: input terminal, 1
4 ... frame memory, 16 ... binary transform unit, 18 ... discrete cosine transform (DCT) unit, 20 ... coefficient memory, 22 ...
Bar code detection unit, 24... Decoding unit, 32.

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 バーコード画像を含む多値画像データを
記憶するフレームメモリと、 前記フレームメモリに記憶された画像データを所定の大
きさのブロックごとに離散的コサイン変換する離散的コ
サイン変換手段と、 前記離散的コサイン変換手段により得られた変換係数を
記憶する係数記憶手段と、 前記係数記憶手段に記憶された変換係数からバーコード
を検出するバーコード検出手段と、 を具備することを特徴とするバーコード検出装置。
1. A frame memory for storing multi-valued image data including a barcode image, and a discrete cosine transform means for performing discrete cosine transform of the image data stored in the frame memory for each block of a predetermined size. A coefficient storage unit that stores a conversion coefficient obtained by the discrete cosine conversion unit; and a barcode detection unit that detects a barcode from the conversion coefficient stored in the coefficient storage unit. Barcode detection device.
JP05385493A 1993-03-15 1993-03-15 Barcode detection device Expired - Fee Related JP3290738B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP05385493A JP3290738B2 (en) 1993-03-15 1993-03-15 Barcode detection device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP05385493A JP3290738B2 (en) 1993-03-15 1993-03-15 Barcode detection device

Publications (2)

Publication Number Publication Date
JPH06266879A JPH06266879A (en) 1994-09-22
JP3290738B2 true JP3290738B2 (en) 2002-06-10

Family

ID=12954362

Family Applications (1)

Application Number Title Priority Date Filing Date
JP05385493A Expired - Fee Related JP3290738B2 (en) 1993-03-15 1993-03-15 Barcode detection device

Country Status (1)

Country Link
JP (1) JP3290738B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4180497B2 (en) 2003-12-05 2008-11-12 富士通株式会社 Code type discrimination method and code boundary detection method
EP4216103A1 (en) * 2005-03-11 2023-07-26 Hand Held Products, Inc. Bar code reading device with global electronic shutter control
US7568628B2 (en) 2005-03-11 2009-08-04 Hand Held Products, Inc. Bar code reading device with global electronic shutter control
US7770799B2 (en) 2005-06-03 2010-08-10 Hand Held Products, Inc. Optical reader having reduced specular reflection read failures
US8196836B2 (en) 2007-06-28 2012-06-12 Fuji Xerox Co., Ltd. Image processing apparatus, image processing method and computer-readable medium
JP5470734B2 (en) * 2007-06-28 2014-04-16 富士ゼロックス株式会社 Image processing apparatus and image processing program

Also Published As

Publication number Publication date
JPH06266879A (en) 1994-09-22

Similar Documents

Publication Publication Date Title
US20020044689A1 (en) Apparatus and method for global and local feature extraction from digital images
US5304787A (en) Locating 2-D bar codes
EP0685809A2 (en) Method and apparatus for decoding two-dimensional bar code
US8469274B2 (en) Method for fast locating decipherable pattern
US10699091B2 (en) Region of interest location and selective image compression
JPH0612515A (en) Method and apparatus for decoding two-dimensional bar code using ccd/cmd camera
JPH0896059A (en) Bar code reader
US20070230784A1 (en) Character string recognition method and device
JP2009266190A (en) Symbol information reading apparatus and symbol information reading method
EP1894141B1 (en) System and method for locating a predetermined pattern within an image
JP3290738B2 (en) Barcode detection device
EP0866415A2 (en) Method of locating a machine-readable marker within an image
JP2746501B2 (en) Barcode reader
US5902987A (en) Apparatus and method of rapidly locating edges of machine-readable symbols or other linear images
JPH05233867A (en) Bar code reader
JP5470734B2 (en) Image processing apparatus and image processing program
JP3302057B2 (en) Symbol information reader
EP1223536A1 (en) Data reader and method of use thereof
JPS62120585A (en) Bar code recognizing device by image scanner
JP2008134710A (en) Optical information reader and optical information reading method
JP2002150213A (en) Bar code reader
JPH0431436B2 (en)
JPH0469788A (en) Optical information reader
JPH06251194A (en) Optical information reader
JPH02125386A (en) Image signal processor

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20020305

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

Free format text: PAYMENT UNTIL: 20090322

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20090322

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20100322

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees