JP4978460B2 - Bar code recognition apparatus and program - Google Patents

Bar code recognition apparatus and program Download PDF

Info

Publication number
JP4978460B2
JP4978460B2 JP2007333278A JP2007333278A JP4978460B2 JP 4978460 B2 JP4978460 B2 JP 4978460B2 JP 2007333278 A JP2007333278 A JP 2007333278A JP 2007333278 A JP2007333278 A JP 2007333278A JP 4978460 B2 JP4978460 B2 JP 4978460B2
Authority
JP
Japan
Prior art keywords
barcode
noise
image
contour position
bar
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
JP2007333278A
Other languages
Japanese (ja)
Other versions
JP2009157532A (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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Fujifilm Business Innovation Corp
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 Fuji Xerox Co Ltd, Fujifilm Business Innovation Corp filed Critical Fuji Xerox Co Ltd
Priority to JP2007333278A priority Critical patent/JP4978460B2/en
Publication of JP2009157532A publication Critical patent/JP2009157532A/en
Application granted granted Critical
Publication of JP4978460B2 publication Critical patent/JP4978460B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、バーコード認識装置及びプログラムに関し、特に、バーコードの認識精度向上に関する。   The present invention relates to a barcode recognition apparatus and program, and more particularly, to improvement of barcode recognition accuracy.

文書を電子化する場合に、電子化する文書と電子化された文書のデータとを関連付けるために、バーコードが使用されることが多くなっている。関連付けに用いられるバーコードを含む電子データは、例えば写真モード等の方式によって画像読取装置の読取処理がなされると、ディザや誤差拡散等の処理が施される場合がある。また、文書の電子化において画像サイズを小さくするために、バーコードの読取処理が低解像度でなされる場合もある。これらの場合に、画像として読み取られたバーコードのバーの輪郭の両面に凹凸が発生することがある。   When a document is digitized, a barcode is often used to associate the document to be digitized with the data of the digitized document. Electronic data including a barcode used for association may be subjected to processing such as dithering or error diffusion when the image reading device is read by a method such as a photo mode. Further, in order to reduce the image size in digitizing a document, the barcode reading process may be performed at a low resolution. In these cases, irregularities may occur on both sides of the bar outline of the barcode read as an image.

ここで、例えば図7(a)は、上記のようにして輪郭に凹凸が生じたバーコードを示している。このバーコードに対して、バーの凹凸を復元する処理を施すと、図7(b)のようにバーが太くなることや、図7(c)のようにバーが細くなることがある。なお、特許文献1では、バーの周辺に現れる凹凸を除去するフィルタをかける等の処理により、ノイズの入ったバーコードを復号する技術が提案されている。
特開平10−171916号公報
Here, for example, FIG. 7 (a) shows a barcode in which the contour is uneven as described above. When this bar code is processed to restore the unevenness of the bar, the bar may become thick as shown in FIG. 7B or the bar as shown in FIG. 7C. Patent Document 1 proposes a technique for decoding a bar code including noise by a process such as applying a filter for removing irregularities appearing around the bar.
Japanese Patent Laid-Open No. 10-171916

このように、上記の写真モード等の方式によって、ディザや誤差拡散等の処理が施されて多くのノイズがバーコードを含む画像に発生する場合や、バーコードを含む画像データの解像度が低い場合には、画像データに含まれるバーコード上のノイズを除去することで認識率が低下するという課題がある。   As described above, when processing such as dithering and error diffusion is performed by the above-described method such as the photo mode and a lot of noise is generated in an image including a barcode, or when the resolution of image data including the barcode is low However, there is a problem that the recognition rate is reduced by removing noise on the barcode included in the image data.

本発明は、上記課題に鑑みてなされたものであって、その目的は、画像データで表されたバーコードの認識率を向上させたバーコードの認識装置及びプログラムを提供することにある。   The present invention has been made in view of the above problems, and an object of the present invention is to provide a barcode recognition apparatus and program that improve the recognition rate of barcodes represented by image data.

請求項1の発明は、バーコードが表された画像からノイズを除去するノイズ除去手段と、前記ノイズ除去手段によりノイズが除去された前記画像に表された前記バーコードをデコードするデコード手段と、を含み、前記ノイズ除去手段は、前記バーコードにおける各バーの輪郭位置を判定する輪郭位置判定手段と、前記輪郭位置判定手段によって判定された前記輪郭位置におけるノイズの除去を制限するノイズ除去制限手段と、を含み、前記デコード手段は、前記バーコードにおける複数の読取線から読み取られるバー及びスペースの配置に基づいてデコードする、ことを特徴とするバーコード認識装置である。   The invention of claim 1 is a noise removing unit that removes noise from an image in which a barcode is represented; a decoding unit that decodes the barcode represented in the image from which noise has been removed by the noise removing unit; The noise removing means includes contour position determining means for determining the contour position of each bar in the barcode, and noise removal restricting means for restricting noise removal at the contour position determined by the contour position determining means. And the decoding means performs decoding based on an arrangement of bars and spaces read from a plurality of reading lines in the barcode.

請求項2の発明は、請求項1記載のバーコード認識装置において、前記バーコードは、前記画像の一部の領域に表され、前記バーコード認識装置は、前記画像の一部の領域に表されたバーコードを抽出するバーコード抽出手段をさらに含むことを特徴とする。   According to a second aspect of the present invention, in the barcode recognition apparatus according to the first aspect, the barcode is represented in a partial area of the image, and the barcode recognition apparatus is represented in a partial area of the image. It further comprises bar code extracting means for extracting the bar code that has been read.

請求項3の発明は、請求項1又は2に記載のバーコード認識装置において、前記輪郭位置判定手段は、前記バーコードの各部分が所定のパターンの画像に該当するか否かに基づいて前記バーコードにおける前記各バーの輪郭位置を判定する、ことを特徴とする。   According to a third aspect of the present invention, in the barcode recognition apparatus according to the first or second aspect, the contour position determination unit is configured to determine whether each portion of the barcode corresponds to an image of a predetermined pattern. The contour position of each bar in the bar code is determined.

請求項4の発明は、請求項1又は2に記載のバーコード認識装置において、前記輪郭位置判定手段は、前記画像において、前記バーコードのバーを表す色情報が付与された画素が互いに隣接することにより形成される複数の画素群のうち、該画素群に含まれる画素数が所定の画素数以上となる画素群に従って、前記各バーの輪郭位置を判定する、ことを特徴とする。   According to a fourth aspect of the present invention, in the barcode recognition apparatus according to the first or second aspect, the contour position determination unit includes pixels in the image to which color information representing the bar of the barcode is attached. The contour position of each bar is determined according to a pixel group in which the number of pixels included in the pixel group is greater than or equal to a predetermined number of pixels among the plurality of pixel groups formed by the above.

請求項5の発明は、請求項1又は2に記載のバーコード認識装置において、前記輪郭位置判定手段は、前記バーコードの長さ方向の各バーにおけるエッジと、その他の方向の各バーにおけるエッジとを検出するとともに、前記画像の各部分において、それら2方向の各エッジを比較することにより、前記各バーの輪郭位置を判定する、ことを特徴とする。   According to a fifth aspect of the present invention, in the barcode recognition apparatus according to the first or second aspect, the contour position determination means includes an edge in each bar in the longitudinal direction of the barcode and an edge in each bar in the other direction. And the contour position of each bar is determined by comparing each edge in the two directions in each part of the image.

請求項6の発明は、請求項3又は5に記載のバーコード認識装置において、前記ノイズ除去手段は、前記輪郭位置判定手段が各部分を判定する毎に、その判定結果に応じてノイズを除去する、ことを特徴とする。   According to a sixth aspect of the present invention, in the barcode recognition apparatus according to the third or fifth aspect, the noise removing unit removes noise according to the determination result each time the contour position determining unit determines each part. It is characterized by.

請求項7の発明は、請求項4に記載のバーコード認識装置において、前記ノイズ除去手段は、前記画素群に含まれる画素数が所定の画素数未満となる画素群に従って、ノイズを除去する、ことを特徴とする。   According to a seventh aspect of the present invention, in the barcode recognition apparatus according to the fourth aspect, the noise removing unit removes noise according to a pixel group in which the number of pixels included in the pixel group is less than a predetermined number of pixels. It is characterized by that.

請求項8の発明は、バーコードが表された画像からノイズを除去するノイズ除去手段、及び前記ノイズ除去手段によりノイズが除去された前記画像に表された前記バーコードをデコードするデコード手段としてコンピュータを機能させるプログラムであって、前記ノイズ除去手段は、前記バーコードにおける各バーの輪郭位置を判定する輪郭位置判定手段と、前記輪郭位置判定手段によって判定された前記輪郭位置におけるノイズの除去を制限するノイズ除去制限手段と、を含み、前記デコード手段は、前記バーコードにおける複数の読取線から読み取られるバー及びスペースの配置に基づいてデコードする、ことを特徴とする。   The invention of claim 8 is a computer as noise removing means for removing noise from an image representing a barcode, and decoding means for decoding the barcode represented in the image from which noise has been removed by the noise removing means. The noise removing means limits the outline position determining means for determining the outline position of each bar in the barcode and the removal of noise at the outline position determined by the outline position determining means. Noise elimination limiting means for performing decoding, wherein the decoding means performs decoding based on an arrangement of bars and spaces read from a plurality of reading lines in the barcode.

請求項1及び請求項8によれば、バーコードが表された画像におけるバーコードの各バーの輪郭位置のノイズ除去を制限するとともに、複数の読取線からバーコードのバー及びスペースの配置を読み取るので、バー及びスペースの本来の配列から生じた情報を有効に活用して、バーコードの認識率を向上させることができる。   According to the first and eighth aspects, the noise removal of the contour position of each bar of the barcode in the image representing the barcode is restricted, and the arrangement of the bar and space of the barcode is read from a plurality of reading lines. Therefore, it is possible to improve the barcode recognition rate by effectively using information generated from the original arrangement of bars and spaces.

請求項2の発明によれば、バーコードが画像の一部の領域に表されている場合に、バーコードが表された領域を抽出するので、バーコードを認識する速度を向上させることができる。   According to the invention of claim 2, when the barcode is represented in a partial region of the image, the region where the barcode is represented is extracted, so that the speed of recognizing the barcode can be improved. .

請求項3の発明によれば、所定のパターンに該当するか否かを判定することにより、バーコードの各バーの輪郭位置を判定できる。   According to the invention of claim 3, it is possible to determine the contour position of each bar of the barcode by determining whether or not it corresponds to a predetermined pattern.

請求項4の発明によれば、所定の画素数以上となる画素群であるか否かを判断して、バーコードの各バーを表す画素群を識別することにより、バーコードの各バーの輪郭位置を判定できる。   According to the invention of claim 4, the contour of each bar of the barcode is determined by determining whether or not the pixel group has a predetermined number of pixels or more and identifying the pixel group representing each bar of the barcode. The position can be determined.

請求項5の発明によれば、バーコードとバーコード以外のノイズによって生じるエッジに着目して、バーコードの各バーの輪郭位置を判定できる。   According to the invention of claim 5, it is possible to determine the contour position of each bar of the bar code by paying attention to the bar code and an edge caused by noise other than the bar code.

請求項6の発明によれば、バーコードが表されている画像の各部分においてバーコードの各バーの輪郭位置を判定しつつ、ノイズを除去することで、バーコードを認識する速度を向上させることができる。   According to the invention of claim 6, the speed of recognizing the barcode is improved by removing the noise while determining the contour position of each bar of the barcode in each part of the image on which the barcode is represented. be able to.

請求項7の発明によれば、バーコードの各バーの輪郭位置を判定しつつノイズを除去するので、バーコードを認識する速度を向上させることができる。   According to the invention of claim 7, since noise is removed while determining the contour position of each bar of the barcode, the speed of recognizing the barcode can be improved.

[第1の実施形態]
以下、本発明の一実施形態について図面に基づき説明する。
[First embodiment]
Hereinafter, an embodiment of the present invention will be described with reference to the drawings.

図1は、本発明の実施形態にかかるバーコード認識装置1におけるハードウェア構成と機能的構成を示すブロック図である。   FIG. 1 is a block diagram showing a hardware configuration and a functional configuration in a barcode recognition apparatus 1 according to an embodiment of the present invention.

バーコード認識装置1は、制御部2、記憶部3、バーコード画像取得部4を含んで構成される。本実施形態におけるバーコード認識装置1は、手持ち型、あるいは据え置き型のいずれのバーコードリーダであってもよいし、パーソナルコンピュータ等の情報処理装置に実装されてもよい。ここで、バーコードは、複数種類の幅を有したバー及びスペースの配列からなり、コンピュータが識別するためのコードである。   The barcode recognition device 1 includes a control unit 2, a storage unit 3, and a barcode image acquisition unit 4. The barcode recognition apparatus 1 in the present embodiment may be either a hand-held type or a stationary type barcode reader, and may be mounted on an information processing apparatus such as a personal computer. Here, the bar code is a code made up of an array of bars and spaces having a plurality of types of widths, and is identified by the computer.

制御部2は、CPU(Central Processing Unit)等のプログラム制御デバイスである。制御部2は、ノイズ除去部21と、バーコード抽出部22と、デコード部23とを機能ブロックとして含んでおり、本発明の実施形態にかかるプログラムを実行することによって各機能が実現される。このプログラムは、例えばCD−ROMやDVD−ROM等のコンピュータ読取可能な各種の情報記憶媒体に格納されて提供されてもよいし、インターネット等の通信手段を介して提供されてもよい。   The control unit 2 is a program control device such as a CPU (Central Processing Unit). The control unit 2 includes a noise removal unit 21, a barcode extraction unit 22, and a decoding unit 23 as functional blocks, and each function is realized by executing a program according to the embodiment of the present invention. This program may be provided by being stored in various computer-readable information storage media such as a CD-ROM and a DVD-ROM, or may be provided via communication means such as the Internet.

記憶部3は、RAM(Random Access Memory)、ROM(Read Only Memory)等のメモリ素子、ならびにハードディスク等によって構成される。この記憶部3は、制御部2が実行するプログラム(ソフトウェア)を格納している。また、この記憶部3は、制御部2の処理の過程で利用される種々のデータを保持するワークメモリとしても動作する。   The storage unit 3 includes a memory element such as a random access memory (RAM) and a read only memory (ROM), a hard disk, and the like. The storage unit 3 stores a program (software) executed by the control unit 2. The storage unit 3 also operates as a work memory that holds various data used in the process of the control unit 2.

バーコード画像取得部4は、イメージスキャナ等によって構成される。そして、このイメージスキャナは、例えば、紙媒体に光を照射するLED等の光源、及び、その反射光を取り込むCCD等の受光素子から構成される。特に、本実施形態におけるバーコード画像取得部4は、画像を含む文書を電子化する際には写真モードが選択されて、文書上に表されたバーコードが2値の画像データとして取得される。バーコード画像取得部4がバーコードを2値の画像データで取得する際には、ディザや誤差拡散等の処理が伴うことによりノイズが発生する。ここで、バーコード画像とは、バーコード認識装置1が認識する対象となるバーコードが、少なくとも一部の領域に表されている画像データのことである。バーコード画像取得部4は、バーコード画像を取得する。バーコード画像取得部4に取得されたバーコード画像は、デコード処理等の対象として制御部2に提供される。また、バーコード画像取得部4と制御部2とが別構成となって、ネットワークを通じてバーコード画像取得部4から取得された画像データが提供されることとしてもよい。   The barcode image acquisition unit 4 is configured by an image scanner or the like. The image scanner includes, for example, a light source such as an LED that irradiates light on a paper medium, and a light receiving element such as a CCD that captures the reflected light. In particular, the barcode image acquisition unit 4 according to the present embodiment selects a photo mode when digitizing a document including an image, and acquires a barcode displayed on the document as binary image data. . When the barcode image acquisition unit 4 acquires a barcode as binary image data, noise is generated due to processing such as dithering and error diffusion. Here, the barcode image is image data in which a barcode to be recognized by the barcode recognition device 1 is represented in at least a partial area. The barcode image acquisition unit 4 acquires a barcode image. The barcode image acquired by the barcode image acquisition unit 4 is provided to the control unit 2 as a target for decoding processing or the like. Further, the barcode image acquisition unit 4 and the control unit 2 may be configured separately to provide image data acquired from the barcode image acquisition unit 4 through a network.

つぎに、バーコード認識装置1の制御部2に含まれる、ノイズ除去部21と、バーコード抽出部22と、デコード部23とが実現する各機能について説明する。   Next, functions realized by the noise removal unit 21, the barcode extraction unit 22, and the decoding unit 23 included in the control unit 2 of the barcode recognition apparatus 1 will be described.

ノイズ除去部21は、バーコード画像取得部4が取得したバーコード画像に発生しているノイズを除去する処理を行う。図2は、バーコード画像に含まれるバーコードの一部に発生しているノイズの一例を示す図である。これらのノイズは、バーコードが示すバー及びスペースの本来の配列以外を示す画素となる。このようなノイズには、バーコードを画像化する際に発生する場合、及び、バーコードの表された媒体上にすでに発生している場合がある。前者は、例えば、紙媒体等に表されたバーコードを2値の画像データとして取得する際に、ディザや誤差拡散等の処理に伴って発生する。また、ノイズを除去するとは、ノイズと判断された画素群を、ノイズの周囲に存在する画素に置換等により調整する処理である。このノイズ除去処理は、バーコード本来の配列を認識しやすくするために実行される。   The noise removing unit 21 performs processing for removing noise generated in the barcode image acquired by the barcode image acquiring unit 4. FIG. 2 is a diagram illustrating an example of noise generated in a part of the barcode included in the barcode image. These noises are pixels that indicate other than the original arrangement of the bar and space indicated by the barcode. Such noise may occur when a barcode is imaged, or may already occur on the medium on which the barcode is represented. The former occurs, for example, with processing such as dithering and error diffusion when acquiring a barcode represented on a paper medium or the like as binary image data. Further, the removal of noise is a process of adjusting a pixel group determined to be noise by replacement with pixels existing around the noise. This noise removal processing is executed to make it easy to recognize the original arrangement of the barcode.

そして、特に本実施形態では、ノイズ除去部21は更に輪郭位置判定部21Aとノイズ除去制限部21Bとを含んで構成される。   And especially in this embodiment, the noise removal part 21 is further comprised including 21 A of outline position determination parts, and the noise removal restriction | limiting part 21B.

輪郭位置判定部21Aは、バーコード画像に含まれる各パターンの境界となる輪郭位置と共に、バーコードを構成するバー及びスペースの境界となる各バーの輪郭位置を判定する。この輪郭位置では、各パターンが有する色情報によって色差が発生している。バーコード画像におけるバーコードの各バーの輪郭位置は、バーコード画像全体に、いわゆるマスク処理のアルゴリズムを適用することによって判定できる。以下では、この処理について詳細に述べる。   The contour position determination unit 21A determines the contour position of each bar serving as the boundary between the bar and the space constituting the barcode, along with the contour position serving as the boundary between the patterns included in the barcode image. At this contour position, a color difference occurs due to the color information of each pattern. The contour position of each bar of the barcode in the barcode image can be determined by applying a so-called mask processing algorithm to the entire barcode image. Hereinafter, this process will be described in detail.

輪郭位置判定部21Aは、バーコード画像におけるバーコードを構成する各部分が、例えば図3(a)〜(f)に示すような3×3のサイズの6種類の画像のいずれかに該当するか否かに基づいて、輪郭位置を判定する。図3は、中心の黒画素に対して上下・左右のうちの少なくとも2画素を黒画素として連結している3×3のパターンを示している。2値化されたバーコード画像であれば、バーコードの各バーが黒画素群で表現され、各バーの輪郭を構成する画素が上下・左右のうち少なくとも2箇所に互いに連結されることとなる。従って、輪郭位置判定部21Aは、バーコード画像における全ての黒画素について、上下・左右のうちの少なくとも2画素を黒画素として連結しているパターンの一部に該当するか否かを判定する。そして、輪郭位置判定部21Aは、当該パターンの一部であると判断される黒画素が白画素と隣接して、黒画素群の外延部を構成する境界を、バーコードの各バー及びその他のパターンの輪郭位置として判定する。   In the contour position determination unit 21A, each part constituting the barcode in the barcode image corresponds to one of six types of images having a size of 3 × 3 as shown in FIGS. 3A to 3F, for example. Whether or not the contour position is determined. FIG. 3 shows a 3 × 3 pattern in which at least two of the upper, lower, left and right pixels are connected as black pixels to the central black pixel. In the case of a binarized barcode image, each bar of the barcode is represented by a black pixel group, and the pixels constituting the outline of each bar are connected to each other in at least two places, upper, lower, left and right. . Accordingly, the contour position determination unit 21A determines whether or not all black pixels in the barcode image correspond to a part of a pattern in which at least two pixels of the upper, lower, left, and right are connected as black pixels. Then, the contour position determination unit 21A adjoins the black pixels that are determined to be a part of the pattern adjacent to the white pixels, and defines the boundary that constitutes the extended portion of the black pixel group. It is determined as the pattern contour position.

なお、上記では輪郭位置判定部21Aが、いわゆるマスク処理を施すことによって輪郭位置を判断することとしているが、いわゆるラベリング処理を施すこととしてもよい。具体的には、輪郭位置判定部21Aは、バーコード画像におけるバーコードのバーを示す階調が付与されて、上下又は左右の少なくとも1方向に隣接する画素が連結することにより一群を構成する画素群が、所定の画素数以上で構成されているか否かに従って、バーコードの各バー及びその他のパターンの輪郭位置を判定する。2値化されたバーコード画像であれば、各バーが黒画素群で表現される。そこで、まず輪郭位置判定部21Aは、バーコード画像上に存在する全ての黒画素を、上下又は左右の少なくとも1方向に隣接する画素が連結することにより一群を構成している画素群に分類する。バーコードのバーを構成する黒画素数は、一般的に、ノイズを構成する黒画素数に比べて多い。従って、輪郭位置判定部21Aは、分類された各画素群が所定の画素数以上で構成されているか否かを判断することにより、バー及びその他のパターンを構成する黒画素群を特定する。さらに、輪郭位置判定部21Aは、所定の画素数以上を有しているとして特定された各黒画素群にいて、黒画素と白画素とが隣接する境界を判定する。そして、輪郭位置判定部21Aは、黒画素の外延に白画素が存在する境界を、バー及びその他のパターンの輪郭位置として判定する。   In the above description, the contour position determination unit 21A determines the contour position by performing a so-called mask process, but may perform a so-called labeling process. Specifically, the contour position determination unit 21A is provided with a gradation indicating a bar of a barcode in a barcode image, and pixels that form a group by connecting adjacent pixels in at least one of the vertical and horizontal directions. The contour position of each bar of the barcode and other patterns is determined according to whether or not the group is composed of a predetermined number of pixels or more. In the case of a binarized barcode image, each bar is represented by a black pixel group. Therefore, first, the contour position determination unit 21A classifies all black pixels existing on the barcode image into a pixel group constituting a group by connecting pixels adjacent in at least one direction, up and down or left and right. . In general, the number of black pixels constituting the bar of the barcode is larger than the number of black pixels constituting the noise. Therefore, the contour position determination unit 21A determines the black pixel group constituting the bar and other patterns by determining whether or not each classified pixel group is configured with a predetermined number of pixels or more. Further, the contour position determination unit 21A determines a boundary where a black pixel and a white pixel are adjacent to each other in each black pixel group specified as having a predetermined number of pixels or more. Then, the contour position determination unit 21A determines the boundary where the white pixel exists in the outer extension of the black pixel as the contour position of the bar and other patterns.

なお、輪郭位置判定部21Aは、いわゆるエッジ検出処理を施すことにより輪郭位置を判断することとしてもよい。具体的には、輪郭位置判定部21Aは、バーコード画像におけるバーコードの各バーの長さ方向と、それ以外の方向とのエッジを検出する処理により、各バーの輪郭位置であるか否かを判定する。ここで、バーコードの長さ方向とは、バーコードにおける各バーが延伸する方向に垂直な方向(バーコードの長手方向)のことをいう。また、エッジとは、所定の方向に色差が存在する場所のことをいう。図4はバーコードが存在する画像におけるバーコードの長さ方向のエッジ(図4(a))と、バーコードの高さ方向(バーコードの短手方向)のエッジ(図4(b))とを検出する処理を施した様子を示す図である。さらに、図4(c)及び図4(d)は、図4(a)及び図4(b)で実行されたそれぞれバーコードの長さ方向と高さ方向のエッジを検出する処理を、バーコードが存在しない画像で適用した様子を示す図である。図4の各図では、それぞれの元画像に、バーコードの長さ方向または高さ方向のエッジを検出する処理を施すことにより、エッジの存在する場所は黒画素に、エッジの存在しない場所は白画素に変換されている。同図で示されるように、バーコードの各バーが存在する部分では、長さ方向のエッジと、高さ方向のエッジの存在する比率が明らかに異なるが、バーコードが存在しない部分では、長さ方向のエッジと、高さ方向のエッジとが存在する比率が同程度となる。そこで、例えば、バーコード画像を10×10の領域毎に仕切った各部分において、バーコードの長さ方向のエッジを検出することによって得られる黒画素の面積を長さ方向のエッジ量とし、高さ方向のエッジを検出することによって得られる白画素の面積を高さ方向のエッジ量として、輪郭位置判定部21Aが各部分毎にこれらを求めて比較する。そして、輪郭位置判定部21Aは、長さ方向のエッジ量が高さ方向のエッジ量よりも、所定の比率を超えて多い部分において、バーコードの長さ方向のエッジが存在する位置にしたがって、バーコードの各バー及びその他のパターンの輪郭位置を判定する。なお、バーコード画像を仕切る各部分の大きさは、少なくとも、バーコードの長さ方向のエッジの一部を認識するために必要なサイズである。   The contour position determination unit 21A may determine the contour position by performing so-called edge detection processing. Specifically, the contour position determination unit 21A determines whether or not each bar has a contour position by a process of detecting an edge between the length direction of each bar of the barcode in the barcode image and the other direction. Determine. Here, the length direction of the bar code means a direction (longitudinal direction of the bar code) perpendicular to the direction in which each bar in the bar code extends. An edge refers to a place where a color difference exists in a predetermined direction. FIG. 4 shows an edge in the length direction of the barcode (FIG. 4A) and an edge in the height direction of the barcode (short direction of the barcode) in the image where the barcode exists (FIG. 4B). It is a figure which shows a mode that the process which detects was performed. Further, FIGS. 4C and 4D show the process of detecting the edge in the length direction and the height direction of the barcode executed in FIGS. 4A and 4B, respectively. It is a figure which shows a mode that it applied with the image which a code does not exist. In each figure of FIG. 4, by performing a process for detecting an edge in the length direction or height direction of the barcode on each original image, a place where the edge exists is a black pixel, and a place where the edge does not exist It has been converted to white pixels. As shown in the figure, the ratio of the edge in the length direction to the edge in the height direction is clearly different in the part where each bar of the barcode exists, but in the part where the barcode does not exist, the length is long. The ratio of the presence of the edge in the vertical direction and the edge in the height direction is approximately the same. Therefore, for example, the area of the black pixel obtained by detecting the edge in the longitudinal direction of the barcode in each part obtained by dividing the barcode image into 10 × 10 regions is defined as the amount of edge in the longitudinal direction, The contour position determination unit 21A obtains and compares these areas for each portion by using the area of the white pixel obtained by detecting the edge in the vertical direction as the edge amount in the height direction. Then, the contour position determination unit 21A determines that the edge in the length direction of the barcode exists in a portion where the edge amount in the length direction exceeds the edge amount in the height direction by a predetermined ratio. The contour position of each bar of the barcode and other patterns is determined. The size of each part that partitions the barcode image is at least a size necessary for recognizing a part of the edge in the length direction of the barcode.

次に、ノイズ除去部21によるノイズ除去処理の際に、ノイズ除去制限部21Bは、輪郭位置判定部21Aで判定された各バー及びその他のパターンの輪郭位置に存在するノイズの少なくとも一部を残すことにより、ノイズ除去部21によるノイズ除去処理を制限する。ノイズ除去部21が、バーコード全体のノイズを除去しつつ、各バーの輪郭位置のノイズの除去を制限することにより、バーコードが示すバーの本来の幅をさらに認識しやすくすることができる。ここで、輪郭位置におけるノイズとは、各バーと各スペースの境界に接して存在するノイズのことであり、例えば、図7(a)等においてその一例が表示されている。また、ノイズの除去を制限するとは、例えば、バーコード画像全体に平滑化等のフィルタを一律にかけてノイズを除去する処理をノイズ除去部21が実行する場合には、輪郭位置判定部21Aで判定された輪郭位置に存在するノイズを、予め当該フィルタによるノイズ除去処理の対象とならないようにすることである。また、例えば、輪郭位置判定部21Aで判定された各バーの輪郭位置以外の部分に存在するノイズだけを除去する処理をノイズ除去部21が行うことによって、ノイズ除去制限部21Bが輪郭位置のノイズの除去を制限することとしてもよい。ノイズ除去制限部21Bによるノイズの除去の制限は、例えば輪郭位置判定部21Aが輪郭位置を判定するのに伴って、輪郭位置以外に存在するノイズが識別されて除去されるのであってもよい。また、輪郭位置に存在するノイズが除去されない方式のノイズ除去処理をノイズ除去部21が実行することによりノイズ除去を制限してもよい。或いは、輪郭位置に存在するノイズのうちの少なくとも一部の除去が制限される処理をノイズ除去部21が実行してもよい。なお、図5(a)は、ノイズ除去部21がバーコードを含む画像全体にかかっているノイズを除去する前の画像の一例を示している。図5(b)は、図5(a)の画像にノイズ除去部21が、バーコード等のパターンの輪郭位置に存在するノイズ除去を制限しつつ、画像全体にかかっているノイズを除去する処理を施した画像の一例を示している。   Next, at the time of noise removal processing by the noise removal unit 21, the noise removal restriction unit 21B leaves at least part of the noise present at the contour positions of the bars and other patterns determined by the contour position determination unit 21A. Thus, the noise removal processing by the noise removal unit 21 is limited. The noise removal unit 21 restricts removal of noise at the contour position of each bar while removing noise of the entire barcode, thereby making it easier to recognize the original width of the bar indicated by the barcode. Here, the noise at the contour position is noise existing in contact with the boundary between each bar and each space. For example, an example thereof is displayed in FIG. Further, restricting noise removal is determined by the contour position determination unit 21A when the noise removal unit 21 performs a process of removing noise by uniformly applying a filter such as smoothing to the entire barcode image. In other words, the noise existing at the contour position is not subjected to the noise removal processing by the filter in advance. In addition, for example, the noise removal restriction unit 21B performs noise removal at the contour position by performing the process of removing only noise existing in a portion other than the contour position of each bar determined by the contour position determination unit 21A. It is good also as restricting the removal of. The noise removal restriction by the noise removal restriction unit 21B may be such that, for example, noise existing other than the contour position is identified and removed as the contour position determination unit 21A determines the contour position. In addition, noise removal may be limited by the noise removal unit 21 executing a noise removal process in which noise existing at the contour position is not removed. Or the noise removal part 21 may perform the process in which removal of at least one part of the noise which exists in an outline position is restrict | limited. FIG. 5A shows an example of an image before the noise removing unit 21 removes noise applied to the entire image including the barcode. FIG. 5B illustrates a process in which the noise removing unit 21 removes noise applied to the entire image while limiting noise removal existing in the contour position of a pattern such as a barcode in the image of FIG. An example of an image subjected to is shown.

また、輪郭位置判定部21Aが上記のマスク処理に従って輪郭位置を判定する際には、輪郭位置判定部21Aが、バーコード画像の各部分を、図3に示すようなパターンの画像に該当するか否か判定する毎に、ノイズ除去部21が、その判定結果に応じて当該部分をノイズとして除去する。具体的には、輪郭位置判定部21Aは、バーコード画像における黒画素であって、上下・左右のうちの少なくとも2画素が黒画素と連結されているパターンの一部に該当しないと判定する場合に、ノイズ除去部21が当該黒画素をノイズであるとして除去する。なお、輪郭位置判定部21Aが上記のラベリング処理に従って輪郭位置を判定する場合であれば、輪郭位置判定部21Aが所定の画素数未満であると判断した画素群に従って、ノイズ除去部21が当該画素群をノイズとして除去する。ここで例えば、所定画素数を5とすれば、バーコード画像において5画素未満で構成される黒画素群が、ノイズとして除去される。また、所定の画素数を、バーコードの下部に記載されている文字列等よりも多く、バーを構成する黒画素群の黒画素数よりも少なく設定することにより、輪郭位置判定部21Aが各バーの輪郭位置を判定しつつ、ノイズ除去部21はこれら文字列等をノイズとして除去する。なお、輪郭位置判定部21Aが上記のエッジ検出処理に従って輪郭位置を判定する場合であれば、輪郭位置判定部21Aが、バーコード画像の各部分を、バーコードの長さ方向と高さ方向のエッジ量を比較して各バーの輪郭位置を判定する毎に、ノイズ除去部21が、その判定結果に応じて当該部分をノイズとして除去する。具体的には、ノイズ除去部21は、長さ方向のエッジ量が高さ方向のエッジ量に対して所定の比率を超えない部分に存在する黒画素をノイズとして除去したり、所定の比率を超える部分においてバーコードの各バーの輪郭位置として判定されなかった位置に存在するパターンをノイズとして除去する。これらのようにして、輪郭位置判定部21Aが輪郭位置を判定するとともに、ノイズ除去部21が輪郭位置のノイズを除去しないようにバーコード画像のノイズを除去することで、バーコード画像のノイズ除去処理が効率化されるとともに、ノイズが除去されたバーコード画像からバーコードを抽出しやすくなり、バーコードを認識する速度の向上につながる。   Further, when the contour position determination unit 21A determines the contour position according to the above mask processing, the contour position determination unit 21A determines whether each part of the barcode image corresponds to an image of a pattern as shown in FIG. Each time the determination is made, the noise removal unit 21 removes the portion as noise according to the determination result. Specifically, the contour position determination unit 21A determines that the black pixel in the barcode image does not correspond to a part of the pattern in which at least two pixels of the upper, lower, left, and right are connected to the black pixel. The noise removing unit 21 removes the black pixel as noise. If the contour position determination unit 21A determines the contour position according to the labeling process, the noise removal unit 21 determines the pixel according to the pixel group determined by the contour position determination unit 21A to be less than the predetermined number of pixels. Remove groups as noise. Here, for example, if the predetermined number of pixels is 5, the black pixel group composed of less than 5 pixels in the barcode image is removed as noise. Further, by setting the predetermined number of pixels to be larger than the character string described at the bottom of the barcode and smaller than the number of black pixels of the black pixel group constituting the bar, the contour position determination unit 21A While determining the contour position of the bar, the noise removing unit 21 removes these character strings and the like as noise. If the contour position determination unit 21A determines the contour position in accordance with the edge detection process described above, the contour position determination unit 21A determines each part of the barcode image in the length direction and height direction of the barcode. Each time the edge position is compared to determine the contour position of each bar, the noise removal unit 21 removes the portion as noise according to the determination result. Specifically, the noise removing unit 21 removes, as noise, black pixels existing in a portion where the edge amount in the length direction does not exceed a predetermined ratio with respect to the edge amount in the height direction, or the predetermined ratio is set. A pattern that exists at a position that is not determined as the contour position of each bar of the barcode in the portion exceeding is removed as noise. In this way, the contour position determination unit 21A determines the contour position, and the noise removal unit 21 removes the noise of the barcode image so as not to remove the noise at the contour position, thereby removing the noise of the barcode image. The processing becomes efficient, and it becomes easier to extract a barcode from a barcode image from which noise has been removed, leading to an improvement in the speed of barcode recognition.

バーコード抽出部22は、ノイズ除去部21がノイズを除去したバーコード画像におけるバーコードが表された領域の画像から、バーコードを抽出する。バーコードが表された領域とは、バーコードの各バー及び各スペースを識別できる画像として切り出すことができる範囲のことをいい、バー及びスペースの全ての部分を切り出しつつバーコード以外のパターンをなるべく含まずに切り出すことができる範囲であることが望ましい。ここで、バーコード抽出部22がバーコードを抽出する処理は、バーコードが所定の方向に並んで配置されるバーの集合であるという特徴を持っていることから、パターンマッチング等の当業者に既知のアルゴリズムを用いて施すことが可能である。ノイズ除去後のバーコード画像ではディザパターン等が除去されているため、ノイズ除去前のバーコード画像からバーコードを抽出するよりも、バーコードがより高速に抽出される。   The barcode extraction unit 22 extracts a barcode from an image of a region where the barcode is represented in the barcode image from which the noise removal unit 21 has removed noise. The area where the bar code is expressed refers to the range where each bar and space of the bar code can be cut out as an image that can be identified. It is desirable that it is a range that can be cut out without being included. Here, the process of extracting the barcode by the barcode extracting unit 22 has a feature that the barcode is a set of bars arranged side by side in a predetermined direction. It can be applied using known algorithms. Since the dither pattern and the like are removed from the barcode image after noise removal, the barcode is extracted faster than the barcode is extracted from the barcode image before noise removal.

デコード部23は、バーコード画像から抽出されたバーコードに対して、バー及びスペースの配置を読み取るための読取線を設定し、複数の読取線から取得されるバー及びスペースの配置を示すラインデータにしたがって、バーコードをデコードする。この読取線は、少なくとも1画素の幅で、バーコードの開始位置からバーコードが終了する位置まで、バーコードの長さ方向に引かれる仮想的な線のことをいう。デコード部23は、バーコード画像の各読取線上に存在する画素の情報から、バー及びスペースの配置を示すラインデータを取得し、複数の読取線から取得されるラインデータに従ってバーコードをデコードする。特に本実施形態では、ノイズ除去制限部21Bの機能によりバーコードの各バーにおける輪郭位置に存在するノイズの除去が制限されている。これにより、デコード部23のデコード処理に用いられる複数の読取線には各バーの輪郭位置の凹凸が残されることとなる。輪郭位置の凹凸が残されたバーコードを複数の読取線に従ってデコードする場合には、凹凸の除去されたバーコードをデコードする場合よりも多様な複数のラインデータが取得されることにより、バーコード画像の情報を有効に活用して、本来のバーコードの配列に近いバー及びスペースの配置を認識することができ、認識率の向上につながる。   The decoding unit 23 sets a reading line for reading the arrangement of the bar and the space for the barcode extracted from the barcode image, and line data indicating the arrangement of the bar and the space obtained from the plurality of reading lines. To decode the barcode. This read line is a virtual line drawn in the length direction of the barcode from the start position of the barcode to the end position of the barcode with a width of at least one pixel. The decoding unit 23 acquires line data indicating the arrangement of bars and spaces from information of pixels existing on each reading line of the barcode image, and decodes the barcode according to the line data acquired from the plurality of reading lines. In particular, in the present embodiment, the function of the noise removal restriction unit 21B restricts the removal of noise present at the contour position in each bar of the barcode. Thereby, the unevenness | corrugation of the outline position of each bar will remain in the some reading line used for the decoding process of the decoding part 23. FIG. When decoding a barcode with irregularities in the contour position according to multiple reading lines, a wider variety of line data is obtained than when decoding a barcode with irregularities removed, so that the barcode By effectively utilizing the information of the image, the arrangement of bars and spaces close to the original barcode arrangement can be recognized, leading to an improvement in recognition rate.

図6は、バーコード画像におけるバー及びその他のパターンの輪郭位置のノイズ除去を制限したノイズ除去処理のフローの一例を示す図である。まずS601では、図4に示すような3×3マスクを用いて、マスクに該当しない黒画素を白画素に調整することによってノイズを除去する。この処理により、例えば、バーコードのスペース上であってバーコードの輪郭位置にない黒画素によるノイズが除去される。次にS602では、S601でノイズが除去されたバーコード画像の白画素を黒画素に、黒画素を白画素に反転する。そして、S601と同様に3×3マスクを用いて、マスクに該当しない黒画素を白画素に調整することによってノイズを除去する(S603)。この処理により、例えば、バーコードのバー上であってバーコードの輪郭位置にないノイズを除去することとなる。そして、S604で再びバーコード画像の白画素を黒画素に、黒画素を白画素に反転して、バーの輪郭位置以外のノイズが除去されたバーコード画像を得る。S605では、いわゆるラベリング処理により、S604で得られた各黒画素群を分類して名称を与え、記憶部3にその名称と当該画素群を構成する画素とを記憶する。そしてS606では、S605で記憶された各画素群を構成する画素の情報に従って、所定の画素数以下の黒画素群を除去する処理を行う。このS606の処理により、バーコードの数字部分の記載や、S602で除去されずに残ったノイズがさらに除去されることとなる。   FIG. 6 is a diagram illustrating an example of a flow of noise removal processing that restricts noise removal of the contour positions of bars and other patterns in a barcode image. First, in step S601, noise is removed by adjusting a black pixel that does not correspond to the mask to a white pixel using a 3 × 3 mask as shown in FIG. By this processing, for example, noise due to black pixels that are on the barcode space and not at the contour position of the barcode is removed. Next, in S602, the white pixel of the barcode image from which noise has been removed in S601 is inverted to a black pixel, and the black pixel is inverted to a white pixel. Then, similarly to S601, using a 3 × 3 mask, noise is removed by adjusting black pixels not corresponding to the mask to white pixels (S603). By this processing, for example, noise that is on the bar of the bar code but not at the outline position of the bar code is removed. In step S604, the barcode image is inverted again to black pixels and the black pixels to white pixels to obtain a barcode image from which noise other than the contour position of the bar has been removed. In S605, each black pixel group obtained in S604 is classified and given a name by so-called labeling processing, and the name and the pixels constituting the pixel group are stored in the storage unit 3. In step S606, a process of removing black pixel groups equal to or less than a predetermined number of pixels is performed according to the information on the pixels constituting each pixel group stored in step S605. By the processing in S606, the description of the numeric part of the barcode and the noise that remains without being removed in S602 are further removed.

なお、上記では、バーコード画像は、少なくとも一部の領域に表されている画像データとしているが、バーコード認識装置1が認識する対象のバーコードのみが表示されている画像データであってもよい。この場合にノイズ除去部21は、上記と同様にバーコードの輪郭位置を判断して輪郭位置のノイズ除去を制限しつつ、ノイズ除去処理を行う。そして、輪郭位置以外のノイズが除去されたバーコードを、デコード部23がデコードする。   In the above description, the barcode image is image data represented in at least a part of the area. However, the barcode image may be image data in which only the barcode to be recognized by the barcode recognition device 1 is displayed. Good. In this case, the noise removing unit 21 performs the noise removing process while determining the barcode contour position and restricting noise removal at the contour position in the same manner as described above. Then, the decoding unit 23 decodes the barcode from which noise other than the contour position is removed.

[第2の実施形態]
第2の実施形態では、バーコード抽出部22は、ノイズ除去前のバーコード画像から、バーコードが表されている領域の画像を抽出し、ノイズ除去部21が、抽出された画像において、バーコードの輪郭位置を判断して輪郭位置のノイズ除去を制限しつつ、ノイズを除去する。以下において、第2の実施形態を説明するが、第1の実施形態と共通する部分は説明を省略する。
[Second Embodiment]
In the second embodiment, the barcode extraction unit 22 extracts an image of the area where the barcode is represented from the barcode image before noise removal, and the noise removal unit 21 performs the barcode extraction on the extracted image. Noise is removed while judging the contour position of the code and restricting noise removal at the contour position. In the following, the second embodiment will be described, but description of parts common to the first embodiment will be omitted.

バーコード抽出部22は、まず、バーコード画像取得部4が取得したバーコード画像の一部の領域に表されているバーコードを抽出する。具体的には、例えば、バーコード抽出部22は、バーコード画像を記憶部3に記憶するとともに、バーコードの各バーの輪郭位置であるか否かに関わらずバーコード画像全体にかかっているノイズを除去し、ノイズの除去されたバーコード画像からバーコードが表された領域を検出する。そしてさらにバーコード抽出部22は、ノイズの除去後のバーコード画像から検出された領域に対応しているノイズ除去前のバーコード画像の領域から、ノイズが除去されていないバーコードが表された画像を抽出する。   The barcode extraction unit 22 first extracts the barcode represented in a partial area of the barcode image acquired by the barcode image acquisition unit 4. Specifically, for example, the barcode extracting unit 22 stores the barcode image in the storage unit 3 and covers the entire barcode image regardless of whether or not the bar is in the contour position of each bar. The noise is removed, and the area where the barcode is expressed is detected from the barcode image from which the noise is removed. Further, the barcode extraction unit 22 displays the barcode from which noise has not been removed from the area of the barcode image before noise removal corresponding to the area detected from the barcode image after noise removal. Extract images.

上記のバーコード画像全体にかかっているノイズを除去する処理は、具体的には、バーコード画像のバーコードが表示されている領域、及び、バーコードが表示されていない領域に対して一律にノイズを除去する平滑化処理等である。この平滑化処理は、例えば膨張・収縮フィルタを画像の全面に適用する処理である。平滑化処理が行われたバーコード画像からは、バーコードが表された領域を判断することが容易となり、バーコード画像におけるバーコード以外のパターン等がバーコードとして判断される可能性が低くなる。なお、バーコード抽出部22が、バーコードが表された領域を検出する処理は、バーコードが所定の方向に並んで配置されるバーの集合であるという特徴を持っていることため、例えば、パターンマッチング等の当業者に既知のアルゴリズムを用いることが可能である。   Specifically, the processing for removing the noise applied to the entire barcode image is uniformly performed on the area where the barcode of the barcode image is displayed and the area where the barcode is not displayed. For example, a smoothing process for removing noise. This smoothing process is a process for applying, for example, an expansion / contraction filter to the entire surface of the image. From the barcode image that has been subjected to the smoothing process, it is easy to determine the area where the barcode is represented, and the possibility that a pattern other than the barcode in the barcode image is determined as the barcode is reduced. . In addition, since the process in which the barcode extracting unit 22 detects the area where the barcode is represented has a feature that the barcode is a set of bars arranged in a predetermined direction, for example, Algorithms known to those skilled in the art, such as pattern matching, can be used.

ノイズ除去部21は、バーコード抽出部22が抽出したバーコードが表された画像に従って、バーコードの輪郭位置を判断し、輪郭位置のノイズ除去を制限しつつ、ノイズを除去する。   The noise removing unit 21 determines the barcode contour position according to the image representing the barcode extracted by the barcode extracting unit 22, and removes noise while restricting noise removal at the contour position.

なお、上述した第一及び第二の実施形態において、ノイズ除去部21、バーコード抽出部22、又は、デコード部23による処理の際には、バーコード画像に対して、あらかじめ回転調整等の他の画像処理を行ってもよい。例えば、バーコード画像を回転調整することで、上述のマスク処理、ラベリング処理、エッジ検出処理において、ノイズ除去部21による処理を円滑化し、処理の精度を向上させることができる。   In the first and second embodiments described above, when the processing by the noise removing unit 21, the barcode extracting unit 22, or the decoding unit 23 is performed, the barcode image is subjected to rotation adjustment or the like in advance. The image processing may be performed. For example, by rotating and adjusting the barcode image, in the above-described mask processing, labeling processing, and edge detection processing, processing by the noise removing unit 21 can be smoothed, and processing accuracy can be improved.

なお、上述した第一及び第二の実施形態において、バーコード画像取得部4が、バーコードを2値の画像データとして取得することとしているが、多値の画像データとして取得してもよい。この場合には、例えば、制御部2が、バーコード画像取得部4から提供される多値の画像データを2値化して、画像ノイズ除去部21等の処理に供される。   In the first and second embodiments described above, the barcode image acquisition unit 4 acquires the barcode as binary image data. However, the barcode image acquisition unit 4 may acquire the barcode as multi-value image data. In this case, for example, the control unit 2 binarizes the multivalued image data provided from the barcode image acquisition unit 4 and is provided to the processing of the image noise removal unit 21 and the like.

本発明の実施形態にかかるバーコード認識装置が実現する機能を示す機能ブロック図である。It is a functional block diagram which shows the function which the barcode recognition apparatus concerning embodiment of this invention implement | achieves. バーコード画像の一部に発生しているノイズの一例を示す図である。It is a figure which shows an example of the noise which has generate | occur | produced in a part of barcode image. バーコード画像の各バーの輪郭位置を判定するための所定のパターンの画像の例を示す図である。It is a figure which shows the example of the image of the predetermined pattern for determining the outline position of each bar of a barcode image. エッジを検出する処理を施した画像の例を示す図である。It is a figure which shows the example of the image which performed the process which detects an edge. バーコードが表された領域を含む画像と、バーコードの輪郭位置のノイズ除去処理を制限してノイズを除去する処理を施した画像の一例を示す図である。It is a figure which shows an example of the image which performed the process which removes the noise which restrict | limits the noise removal process of the outline position of a barcode, and the area | region where the barcode was represented. 本発明の実施形態にかかる、バーコード画像におけるノイズ除去処理のフローの一例を示す図である。It is a figure which shows an example of the flow of the noise removal process in a barcode image concerning embodiment of this invention. 輪郭に凹凸が生じたバーコードと、凹凸を復元する処理を施したバーコードの例を示す図である。It is a figure which shows the example of the barcode which the unevenness | corrugation produced in the outline, and the barcode which performed the process which decompress | restores an unevenness | corrugation.

符号の説明Explanation of symbols

1 バーコード認識装置、2 制御部、3 記憶部、4 バーコード画像取得部、21 ノイズ除去部、21A 輪郭位置判定部、21B ノイズ除去制限部、22 バーコード抽出部、23 デコード部。   DESCRIPTION OF SYMBOLS 1 Barcode recognition apparatus, 2 Control part, 3 Storage part, 4 Barcode image acquisition part, 21 Noise removal part, 21A Contour position determination part, 21B Noise removal restriction part, 22 Barcode extraction part, 23 Decoding part

Claims (8)

バーコードが表された画像からノイズを除去するノイズ除去手段と、
前記ノイズ除去手段によりノイズが除去された前記画像に表された前記バーコードをデコードするデコード手段と、を含み、
前記ノイズ除去手段は、
前記バーコードにおける各バーの輪郭位置を判定する輪郭位置判定手段と、
前記輪郭位置判定手段によって判定された前記輪郭位置におけるノイズの除去を制限するノイズ除去制限手段と、を含み、
前記デコード手段は、前記バーコードにおける複数の読取線から読み取られるバー及びスペースの配置に基づいてデコードする、
ことを特徴とするバーコード認識装置。
Noise removal means for removing noise from the image on which the barcode is represented;
Decoding means for decoding the barcode represented in the image from which noise has been removed by the noise removing means,
The noise removing means is
Contour position determination means for determining the contour position of each bar in the barcode;
Noise removal restriction means for restricting removal of noise at the contour position determined by the contour position determination means,
The decoding means decodes based on the arrangement of bars and spaces read from a plurality of reading lines in the barcode.
A barcode recognition apparatus characterized by the above.
請求項1記載のバーコード認識装置において、
前記バーコードは、前記画像の一部の領域に表され、
前記バーコード認識装置は、
前記画像の一部の領域に表されたバーコードを抽出するバーコード抽出手段をさらに含む、
ことを特徴とするバーコード認識装置。
The barcode recognition device according to claim 1,
The barcode is represented in a partial area of the image,
The bar code recognition device includes:
A barcode extracting means for extracting a barcode represented in a partial area of the image;
A barcode recognition apparatus characterized by the above.
請求項1又は2に記載のバーコード認識装置において、
前記輪郭位置判定手段は、前記画像の各部分が所定のパターンの画像に該当するか否かに基づいて前記バーコードにおける前記各バーの輪郭位置を判定する、
ことを特徴とするバーコード認識装置。
The barcode recognition apparatus according to claim 1 or 2,
The contour position determining means determines the contour position of each bar in the barcode based on whether each part of the image corresponds to an image of a predetermined pattern;
A barcode recognition apparatus characterized by the above.
請求項1又は2に記載のバーコード認識装置において、
前記輪郭位置判定手段は、前記画像において、前記バーコードのバーを表す色情報が付与された画素が互いに隣接することにより形成される複数の画素群のうち、該画素群に含まれる画素数が所定の画素数以上となる画素群に従って、前記各バーの輪郭位置を判定する、
ことを特徴とするバーコード認識装置。
The barcode recognition apparatus according to claim 1 or 2,
In the image, the contour position determination unit includes a pixel group including a plurality of pixel groups formed by adjacent pixels to which color information representing the barcode bar is provided. According to a pixel group having a predetermined number of pixels or more, the contour position of each bar is determined.
A barcode recognition apparatus characterized by the above.
請求項1又は2に記載のバーコード認識装置において、
前記輪郭位置判定手段は、前記バーコードの長さ方向の各バーにおけるエッジと、その他の方向の各バーにおけるエッジとを検出するとともに、前記画像の各部分において、それら2方向の各エッジを比較することにより、前記各バーの輪郭位置を判定する、
ことを特徴とするバーコード認識装置。
The barcode recognition apparatus according to claim 1 or 2,
The contour position determining means detects an edge in each bar in the longitudinal direction of the barcode and an edge in each bar in the other direction, and compares each edge in the two directions in each part of the image. To determine the contour position of each bar,
A barcode recognition apparatus characterized by the above.
請求項3又は5に記載のバーコード認識装置において、
前記ノイズ除去手段は、前記輪郭位置判定手段が各部分を判定する毎に、その判定結果に応じてノイズを除去する、
ことを特徴とするバーコード認識装置。
In the barcode recognition device according to claim 3 or 5,
The noise removing unit removes noise according to the determination result each time the contour position determining unit determines each part.
A barcode recognition apparatus characterized by the above.
請求項4に記載のバーコード認識装置において、
前記ノイズ除去手段は、前記画素群に含まれる画素数が所定の画素数未満となる画素群に従って、ノイズを除去する、
ことを特徴とするバーコード認識装置。
In the barcode recognition device according to claim 4,
The noise removing unit removes noise according to a pixel group in which the number of pixels included in the pixel group is less than a predetermined number of pixels.
A barcode recognition apparatus characterized by the above.
バーコードが表された画像からノイズを除去するノイズ除去手段、及び
前記ノイズ除去手段によりノイズが除去された前記画像に表された前記バーコードをデコードするデコード手段としてコンピュータを機能させるプログラムであって、
前記ノイズ除去手段は、
前記バーコードにおける各バーの輪郭位置を判定する輪郭位置判定手段と、
前記輪郭位置判定手段によって判定された前記輪郭位置におけるノイズの除去を制限するノイズ除去制限手段と、を含み、
前記デコード手段は、前記バーコードにおける複数の読取線から読み取られるバー及びスペースの配置に基づいてデコードする、
ことを特徴とするプログラム。
A program for causing a computer to function as a noise removing unit for removing noise from an image on which a barcode is represented, and a decoding unit for decoding the barcode represented on the image from which noise has been removed by the noise removing unit. ,
The noise removing means is
Contour position determination means for determining the contour position of each bar in the barcode;
Noise removal restriction means for restricting removal of noise at the contour position determined by the contour position determination means,
The decoding means decodes based on the arrangement of bars and spaces read from a plurality of reading lines in the barcode.
A program characterized by that.
JP2007333278A 2007-12-25 2007-12-25 Bar code recognition apparatus and program Expired - Fee Related JP4978460B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007333278A JP4978460B2 (en) 2007-12-25 2007-12-25 Bar code recognition apparatus and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007333278A JP4978460B2 (en) 2007-12-25 2007-12-25 Bar code recognition apparatus and program

Publications (2)

Publication Number Publication Date
JP2009157532A JP2009157532A (en) 2009-07-16
JP4978460B2 true JP4978460B2 (en) 2012-07-18

Family

ID=40961514

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007333278A Expired - Fee Related JP4978460B2 (en) 2007-12-25 2007-12-25 Bar code recognition apparatus and program

Country Status (1)

Country Link
JP (1) JP4978460B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6874606B2 (en) * 2017-08-31 2021-05-19 ブラザー工業株式会社 Control programs, information processing equipment, and scanning systems

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07107689B2 (en) * 1988-07-13 1995-11-15 松下電器産業株式会社 Image signal processor
JPH0896059A (en) * 1994-09-28 1996-04-12 Toshiba Corp Bar code reader
JPH10105640A (en) * 1996-09-27 1998-04-24 Hitachi Maxell Ltd Mark reader
JP3635829B2 (en) * 1996-12-10 2005-04-06 松下電器産業株式会社 Bar code reader
JP3726653B2 (en) * 2000-07-27 2005-12-14 ノーリツ鋼機株式会社 Image processing method, image processing apparatus, and recording medium on which program for executing image processing method is recorded

Also Published As

Publication number Publication date
JP2009157532A (en) 2009-07-16

Similar Documents

Publication Publication Date Title
JP4525787B2 (en) Image extraction apparatus and image extraction program
EP1456816B1 (en) Apparatus and method for recognizing code
JP5566811B2 (en) Deblurring and surveillance adaptive thresholding for image evaluation of printed and scanned documents
US9349237B2 (en) Method of authenticating a printed document
JP6599672B2 (en) Character cutout device, character recognition device, and character cutout method
JP2007272348A (en) Character string recognition method and character string recognition device
JP3774690B2 (en) Method and apparatus for dividing an image into character image lines, and character image recognition method and apparatus
KR101676000B1 (en) Method for Detecting and Security-Processing Fingerprint in Digital Documents made between Bank, Telecommunications Firm or Insurance Company and Private person
JP5630689B2 (en) Character recognition method and character recognition device
JP5335581B2 (en) Image processing apparatus, image processing method, and program
JP4404224B2 (en) Optical recognition code recognition apparatus, method and program
KR20010015025A (en) Character extracting method
JP4978460B2 (en) Bar code recognition apparatus and program
JP4132766B2 (en) Image processing apparatus and method
JP5428935B2 (en) Two-dimensional barcode reader, program, two-dimensional barcode and medium
US20030113019A1 (en) Method for processing document, recorded medium on which document processing program is recorded and document processor
JP7341758B2 (en) Image processing device, image processing method, and program
JP4847378B2 (en) Image processing apparatus, image processing method, program, and computer-readable recording medium
JP4905767B2 (en) Two-dimensional code detection system and two-dimensional code detection program
JP4627845B2 (en) Digital image segmentation method and digital image processing apparatus
JP3545227B2 (en) Image processing method and apparatus, optical character reader
JP4254008B2 (en) Pattern detection apparatus and method
Prachanucroa et al. Marginal noise removal for scanned document images by projection profile based method
JP4439054B2 (en) Character recognition device and character frame line detection method
JP3756660B2 (en) Image recognition method, apparatus and recording medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090825

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120315

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20120321

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120403

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

Free format text: PAYMENT UNTIL: 20150427

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees