JPH06266879A - Bar code detector - Google Patents

Bar code detector

Info

Publication number
JPH06266879A
JPH06266879A JP5053854A JP5385493A JPH06266879A JP H06266879 A JPH06266879 A JP H06266879A JP 5053854 A JP5053854 A JP 5053854A JP 5385493 A JP5385493 A JP 5385493A JP H06266879 A JPH06266879 A JP H06266879A
Authority
JP
Japan
Prior art keywords
bar code
dct
barcode
frame memory
coefficient
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.)
Granted
Application number
JP5053854A
Other languages
Japanese (ja)
Other versions
JP3290738B2 (en
Inventor
Chikako Komiya
千佳子 小宮
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 Optical 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 Optical Co Ltd filed Critical Olympus Optical 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

Abstract

PURPOSE:To detect a bar code in a frame memory by the same algorithm independently of the sort of the bar code and to detect the bar code even when its sort is not previously known. CONSTITUTION:A binary transformation part 16 divides picture data stored in the frame memory into blocks each of which consists of 8X8. picture elements and transforms respective blocks into binary data. A discrete cosine transformation (DCT) part 18 applies DCT to each block consisting of 8X8 picture elements and a coefficient memory 20 stores the transformed result (DCT coefficient). The binarization and DCT are applied to all blocks stored in the memory 14. A bar code detecting part 22 detects a bar code area from the DCT coefficient of each block stored in the memory 20.

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 containing 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 the S (Point of Sales) system, barcodes have become ubiquitous. There are several tens of 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 one 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, since the amount of information that can be stored in these one-dimensional bar codes is as small as about a dozen or more characters, especially in recent years
A new barcode with a large amount of information called a dimensional barcode has been developed. For example, PDF417 as shown in FIG. 3B, DAT as shown in FIG.
ACODE, VERICOD as shown in (D) of FIG.
Various code systems such as E and Code16K have been proposed. These two-dimensional barcodes increase the amount of information by stacking one-dimensional barcodes and developing data in a matrix.

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

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

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

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

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

【0010】[0010]

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

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

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

【0013】本発明は、上記の点に鑑みてなされたもの
で、フレームメモリ内のバーコードが、どのような種類
であっても同一のアルゴリズムを用いて検出ができ、バ
ーコードの種類が予め判っていなくても検出ができるバ
ーコード検出装置を提供することを目的とする。
The present invention has been made in view of the above points, and the same algorithm can be used to detect any type of bar code in the frame memory, and the bar code type can be determined in advance. It is an object of the present invention to provide a bar code detecting 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 of 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 that performs discrete cosine transform (DCT) on each block of a predetermined size
It is characterized by comprising CT means, coefficient storage means for storing the DCT transform coefficient obtained by the DCT means, and barcode detection means for detecting a barcode from the transform coefficient stored in the coefficient storage means. It is a thing.

【0015】[0015]

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

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

【0017】[0017]

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

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

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

【0020】そこで、バーコードは黒のバー及び白のス
ペースで構成されているので、このバーコードを含む画
像データにDCTを施すと、DCT変換係数から黒領
域、白領域、白黒混在領域とに分類ができる。つまり、
バーコード,文字等が存在するブロックにはAC成分が
存在するので、背景あるいはバーコードのクワィエット
ゾーンの白い領域と、バーコード,文字等との区別がつ
く。そして、バーコードは四角い形状をもち、バー,ス
ペースは長さを持つので、同じ係数が並ぶのに対して、
文字は様々な形状をもつので、ブロック毎様々な周波数
成分が現われ、特定な係数は得られない、という特徴を
利用すると、バーコードと他の文字等との区別もつくの
で、DCT変換係数からバーコード領域を検出できると
考える。上記考えに従った本発明の実施例について、以
下図面を参照しながら説明する。 (第1実施例)
Therefore, since the bar code is composed of a black bar and a white space, when DCT is applied to the image data including this bar code, the DCT transform coefficient is converted into a black area, a white area, and a black and white mixed area. Can be classified. That is,
Since the AC component exists in the block in which the barcode, characters, etc. exist, it is possible to distinguish the background or the white area of the quiet zone of the barcode from the barcode, characters, etc. And since the bar code has a square shape and the bar and space have a length, the same coefficient is lined up,
Characters have various shapes, so that various frequency components appear in each block and no specific coefficient can be obtained, so that it is possible to distinguish the bar code from other characters. We think that the barcode area can be detected. An embodiment of the present invention according to 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 the bar code detecting apparatus 10 according to the first embodiment of the present invention. In the figure, reference numeral 12 is an input terminal for image data (multi-valued), and 14 is a frame memory for storing the input image data. Reference numeral 16 is 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, and 18 is the binarized n Dxn block data
The DCT unit 20 for CT is a coefficient memory for storing one screen of DCT transform coefficients output from the DCT unit 18. 22 is the DC stored in the conversion coefficient memory 20.
This is a bar code detection unit that detects a bar code area from the T conversion coefficient and reads out and supplies the image data of the bar code area from the frame memory 14 to the decoding unit 24.
The decoding unit 24 uses the data read from the frame memory 14 by the barcode detection unit 22 to
The barcode information is decoded, and the decoding result is transferred and output to a host device (not shown) or the like. 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 bar code image picked up by a CCD (not shown) or the like 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, blocks of 8 × 8 pixels of the frame memory 14 by the binary conversion unit 16 and converted into binary data. Since the input image is multi-valued data, the value is subtly fluctuated for each pixel even if it is a black bar or white space. Therefore, if DCT is applied as it is,
Since the AC component appears even in the flock that can be regarded as black, the binary conversion unit 16 performs binarization to eliminate the fluctuation of the data value. Next, in the DCT unit 18, 8 × 8
DCT of a block of pixels is performed, and the conversion result (DCT
The conversion coefficient) is stored in the coefficient memory 20. This binarization,
The DCT is performed on all blocks, and the barcode detection unit 22 detects the barcode area from the DCT transform coefficient of each block. For example, a black block is extracted from the DC component of each block, the neighboring blocks are grouped, an area forming a substantially quadrangle is detected, and this is determined as a barcode area. Then, since the block including 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 process. , Transfer the decoding result.
In this way, the image data including the barcode image is decomposed into frequency components, and the features of the frequency components are extracted, whereby the barcode in the image can be detected. (Second Embodiment) As a modification of the first embodiment, there is a method of detecting a characteristic pattern of various bar codes in the processing of the bar code detecting section 22.

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

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

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

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

【0027】このように、撮像した画像データの周波数
成分を解析することで、画面内に物(バーコード)が入
ったことが検出でき、バーコードの自動読取スタートが
行える。 (第4実施例)別の実施例を、図2の(B)のバーコー
ド検出装置30のブロック構成図を用いて説明する。
As described above, by analyzing the frequency component of the imaged 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 bar code detecting device 30 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実施例の動作を説
明する。
In the figure, reference numeral 12 is an input terminal for image data (multivalued), and 14 is a frame memory for storing the input image data. Reference numeral 16 denotes a binary conversion unit that divides the input image data stored in the frame memory 14 into m × m pixel blocks of the frame memory and binarizes the data in each block with a certain threshold value.
Is the size of m that can fill the space of the barcode.
It is an expansion processing unit that expands black with a size of × m. Reference numeral 18 denotes n × n data obtained by expanding the black in the expansion processing unit 32.
(N <= m) DCT unit for DCT in block, 20 is D
This is a coefficient memory that stores CT conversion coefficients for one screen. Two
Reference numeral 2 is a bar code detecting section for detecting a bar code area from the DCT transform coefficient, and 24 is a decoding section for decoding bar code information from the 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 the binary conversion unit 16. Next, the expansion processing unit 32 performs black expansion processing on the m × m size scanning window. This is a general method, and 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 becomes one large black square. The DCT unit 18 converts the image data including the black bar code image into n
The DCT is applied to the × n block, the size of which is smaller than or equal to the scanning window size m × m at the time of expansion processing. Then, in the DCT transform coefficient, a block having a square AC component appears at a position corresponding to the peripheral portion of the barcode area, and the inside thereof becomes a block group including only the DC component representing a black block. Therefore, in the barcode detection unit 22,
By extracting the square black block group, the barcode area can be detected.

【0030】このように、バーコード領域を黒膨張さ
せ、四角い真っ黒な領域とすることで、周波数成分の発
生により特徴をもたせることができるので、バーコード
検出の処理が簡単に行える。 (第5実施例)上記第4実施例に於いて、膨張処理の
後、データ間引きを行ってから、DCTを施す。する
と、ブロック数が減るので、演算量が減り、より高速処
理が行える。
As described above, since the bar code area is black-expanded to form a square black area, it is possible to give characteristics by the generation of the frequency component, so that the bar code detection processing can be easily performed. (Fifth Embodiment) In the fourth embodiment, after the 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 described above,
The DCT transform coefficients stored in the coefficient memory 20 do not necessarily have to 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 frequency components, the same algorithm can be used to detect barcodes in the frame memory regardless of the type, and the barcode type is known in advance. It is possible to provide a bar code detection device that can perform detection without the bar code. Further, the binarization by the binary conversion unit 16 can be omitted.

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

【図1】(A)は本発明の第1実施例のバーコード検出
装置のブロック構成図であり、(B)乃至(D)はそれ
ぞれ離散的コサイン変換(DCT)により得られるDC
T変換係数を説明するための図である。
FIG. 1A is a block configuration diagram of a bar code detecting apparatus according to a first embodiment of the present invention, and FIGS. 1B to 1D are DCs obtained by discrete cosine transform (DCT).
It is a figure for demonstrating a T conversion 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 showing barcodes, respectively.

【符号の説明】[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 ... Expansion processing unit.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 バーコード画像を含む多値画像データを
記憶するフレームメモリと、 前記フレームメモリに記憶された画像データを所定の大
きさのブロックごとに離散的コサイン変換する離散的コ
サイン変換手段と、 前記離散的コサイン変換手段により得られた変換係数を
記憶する係数記憶手段と、 前記係数記憶手段に記憶された変換係数からバーコード
を検出するバーコード検出手段と、 を具備することを特徴とするバーコード検出装置。
1. A frame memory for storing multi-valued image data including a bar code 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 the conversion coefficient obtained by the discrete cosine conversion unit; and a bar code detection unit that detects a bar code from the conversion coefficient stored in the coefficient storage unit. Bar code 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 true JPH06266879A (en) 1994-09-22
JP3290738B2 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)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009032236A (en) * 2007-06-28 2009-02-12 Fuji Xerox Co Ltd Image processor and image processing program
US7636483B2 (en) 2003-12-05 2009-12-22 Fujitsu Limited Code type determining method and code boundary detecting method
US8196836B2 (en) 2007-06-28 2012-06-12 Fuji Xerox Co., Ltd. Image processing apparatus, image processing method and computer-readable medium
JP2019003662A (en) * 2005-03-11 2019-01-10 ハンド ヘルド プロダクツ インコーポレーティッド Image reading device with global electronic shutter control
US10691907B2 (en) 2005-06-03 2020-06-23 Hand Held Products, Inc. Apparatus having hybrid monochrome and color image sensor array
US10721429B2 (en) 2005-03-11 2020-07-21 Hand Held Products, Inc. Image reader comprising CMOS based image sensor array

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7636483B2 (en) 2003-12-05 2009-12-22 Fujitsu Limited Code type determining method and code boundary detecting method
US11323649B2 (en) 2005-03-11 2022-05-03 Hand Held Products, Inc. Image reader comprising CMOS based image sensor array
US10721429B2 (en) 2005-03-11 2020-07-21 Hand Held Products, Inc. Image reader comprising CMOS based image sensor array
US11968464B2 (en) 2005-03-11 2024-04-23 Hand Held Products, Inc. Image reader comprising CMOS based image sensor array
US11863897B2 (en) 2005-03-11 2024-01-02 Hand Held Products, Inc. Image reader comprising CMOS based image sensor array
US11323650B2 (en) 2005-03-11 2022-05-03 Hand Held Products, Inc. Image reader comprising CMOS based image sensor array
US10735684B2 (en) 2005-03-11 2020-08-04 Hand Held Products, Inc. Image reader comprising CMOS based image sensor array
US10958863B2 (en) 2005-03-11 2021-03-23 Hand Held Products, Inc. Image reader comprising CMOS based image sensor array
US11317050B2 (en) 2005-03-11 2022-04-26 Hand Held Products, Inc. Image reader comprising CMOS based image sensor array
JP2019003662A (en) * 2005-03-11 2019-01-10 ハンド ヘルド プロダクツ インコーポレーティッド Image reading device with global electronic shutter control
US10949634B2 (en) 2005-06-03 2021-03-16 Hand Held Products, Inc. Apparatus having hybrid monochrome and color image sensor array
US11238252B2 (en) 2005-06-03 2022-02-01 Hand Held Products, Inc. Apparatus having hybrid monochrome and color image sensor array
US11604933B2 (en) 2005-06-03 2023-03-14 Hand Held Products, Inc. Apparatus having hybrid monochrome and color image sensor array
US11625550B2 (en) 2005-06-03 2023-04-11 Hand Held Products, Inc. Apparatus having hybrid monochrome and color image sensor array
US10691907B2 (en) 2005-06-03 2020-06-23 Hand Held Products, Inc. Apparatus having hybrid monochrome and color image sensor array
US11238251B2 (en) 2005-06-03 2022-02-01 Hand Held Products, Inc. Apparatus having hybrid monochrome and color image sensor array
US8196836B2 (en) 2007-06-28 2012-06-12 Fuji Xerox Co., Ltd. Image processing apparatus, image processing method and computer-readable medium
JP2009032236A (en) * 2007-06-28 2009-02-12 Fuji Xerox Co Ltd Image processor and image processing program

Also Published As

Publication number Publication date
JP3290738B2 (en) 2002-06-10

Similar Documents

Publication Publication Date Title
US5304787A (en) Locating 2-D bar codes
US20020044689A1 (en) Apparatus and method for global and local feature extraction from digital images
EP0685809A2 (en) Method and apparatus for decoding two-dimensional bar code
US8469274B2 (en) Method for fast locating decipherable pattern
US5276315A (en) Method and apparatus for processing low resolution images of degraded bar code symbols
US5487115A (en) Method and apparatus for determining the fine angular orientation of bar code symbols in two-dimensional CCD images
CN101443785B (en) Detecting compositing in a previously conpressed image
EP0561334A2 (en) Method and apparatus for decoding two-dimensional bar code using CCD/CMD camera
EP3098757B1 (en) Region of interest location and selective image compression
JP5140820B2 (en) Symbol information reading apparatus and symbol information reading method
JPH0896059A (en) Bar code reader
EP1894141B1 (en) System and method for locating a predetermined pattern within an image
US5974200A (en) Method of locating a machine readable two dimensional barcode within an image
US7506817B2 (en) Location of machine readable codes in compressed representations
JP3290738B2 (en) Barcode detection device
US5902987A (en) Apparatus and method of rapidly locating edges of machine-readable symbols or other linear images
US5438636A (en) Apparatus for simultaneously convolving multiple digital binary images using a single convolver with a binary mask to determine pixel densities
CN116306731A (en) Method and device for identifying bar codes, electronic equipment and storage medium
JPH05233867A (en) Bar code reader
JP5028582B2 (en) Optical information reading apparatus and optical information reading method
JP3302057B2 (en) Symbol information reader
Tseng et al. Retrospective tracking for barcode reading
JP2002150213A (en) Bar code reader
JPH0469788A (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