JP2013077306A - Targeted object recognition device and targeted object recognition method - Google Patents

Targeted object recognition device and targeted object recognition method Download PDF

Info

Publication number
JP2013077306A
JP2013077306A JP2012259563A JP2012259563A JP2013077306A JP 2013077306 A JP2013077306 A JP 2013077306A JP 2012259563 A JP2012259563 A JP 2012259563A JP 2012259563 A JP2012259563 A JP 2012259563A JP 2013077306 A JP2013077306 A JP 2013077306A
Authority
JP
Japan
Prior art keywords
image
recognition
unit
bar
density value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2012259563A
Other languages
Japanese (ja)
Inventor
Takuma Akagi
琢磨 赤木
Shunji Ariyoshi
俊二 有吉
Morio Nihonmatsu
盛男 二本松
Makoto Nishizono
誠 西園
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2012259563A priority Critical patent/JP2013077306A/en
Publication of JP2013077306A publication Critical patent/JP2013077306A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Character Discrimination (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a barcode recognition device and barcode recognition method capable of efficiently executing barcode recognition processing with high accuracy.SOLUTION: A barcode recognition device 1 has an image interface 11, an image analysis part 12, an image conversion part 13, a bar recognition part 14, or the like. The image interface 11 acquires an image including a barcode photographed by a camera 2. The image analysis part 12 analyzes features in an input image acquired from the camera 2 and determines an image conversion method for converting the input image into an image for recognition processing on the basis of the analysis result. The image conversion part 13 converts the input image into the image for recognition processing by the image conversion method determined by the image analysis part 12. The bar recognition part 14 performs barcode recognition processing of the image for recognition processing acquired by the image conversion part 13.

Description

本発明は、たとえば、紙葉類、文書あるいは物品など媒体に付与されている、文字、記号あるいはバーコードなどの検知対象を認識する被対象認識装置、および、上記被対象認識装置などに適用されている被対象認識方法などに関する。   The present invention is applied to, for example, a target recognition device that recognizes a detection target such as a character, a symbol, or a barcode attached to a medium such as a paper sheet, a document, or an article, and the target recognition device. It is related with the subject recognition method.

従来、紙葉類、文書あるいは物品などを処理するシステムでは、バーコード認識処理あるいは文字認識処理(OCR)が用いられているものがある。たとえば、紙葉類、文書あるいは物品などの区分対象物を区分処理する区分システムには、区分対象物にプリントされている区分情報を示す文字、記号あるいはバーコードを認識して区分処理を行うものがある。また、郵便物を区分する区分システムでは、文字あるいは記号などで示されている宛先情報を文字認識処理により認識し、認識結果として得られた宛先情報をバーコード化して郵便物にプリントする運用形態が実用化されている。すなわち、上記のような区分システムには、文字あるいは記号等を認識する文字認識装置、あるいは、バーコードを認識するためのバーコード認識装置が搭載される。
たとえば、上記のようなバーコード認識装置では、カメラにより撮影されたバーコードのプリント領域を含む画像からバーコードを認識する認識処理(バーコード認識処理)を行う。また、上記のような文字認識装置では、カメラにより撮影された文字あるいは記号の記載領域を含む画像から文字あるいは記号を認識する認識処理(文字認識処理)を行う。これらのような検知対象の認識処理を行うための認識プログラムは、通常、設計段階において、所定の階調数の画像を処理対象とするようになっている。一方、文字、記号の記載領域あるいはバーコードのプリント面を撮影するためのカメラは、近年、撮影性能が向上してきている。たとえば、カメラが撮影する画像は、カメラの性能が向上するのに伴って、階調数などの情報量が多い画像になってきている。
Conventionally, some systems that process paper sheets, documents, articles, and the like use bar code recognition processing or character recognition processing (OCR). For example, in a sorting system that sorts sorting objects such as paper sheets, documents, or articles, the sorting processing is performed by recognizing characters, symbols, or barcodes indicating sorting information printed on the sorting objects. There is. In addition, in the sorting system for sorting mail items, the destination information indicated by characters or symbols is recognized by the character recognition processing, and the destination information obtained as a recognition result is converted into a barcode and printed on the mail piece. Has been put to practical use. That is, in the sorting system as described above, a character recognition device that recognizes characters or symbols or a barcode recognition device that recognizes barcodes is mounted.
For example, the barcode recognition apparatus as described above performs a recognition process (barcode recognition process) for recognizing a barcode from an image including a barcode print area photographed by a camera. Further, the character recognition apparatus as described above performs a recognition process (character recognition process) for recognizing a character or a symbol from an image including a character or symbol description area photographed by the camera. A recognition program for performing such recognition processing of a detection target is normally configured to process an image having a predetermined number of gradations at the design stage. On the other hand, in recent years, the photographing performance of a camera for photographing a character / symbol description region or a barcode print surface has been improved. For example, an image taken by a camera has become an image with a large amount of information such as the number of gradations as the performance of the camera improves.

このような状況では、認識処理の対象となる画像を撮影するためのカメラを高階調な画像を撮影するカメラに変更する場合、カメラが撮影する高階調の画像と低階調の画像を処理する既存の認識プログラムとを効率的に協調させるのが課題となる。たとえば、既存の認識プログラムをカメラが撮影する高階調の画像を処理するものに変更することが考えられる。この場合、認識プログラム等の改造に手間がかかるとともに、情報量の多い画像を処理対象とするために改造後の認識処理自体が重くなってしまう傾向がある。また、認識処理の前段階で、カメラが撮影した高階調の画像を所定の変換方式により認識プログラムに合わせた低階調の画像に変換することも考えられる。この場合、カメラの性能が向上したにもかかわらず、認識処理の精度向上が望めない。   In such a situation, when the camera for capturing an image to be recognized is changed to a camera for capturing a high gradation image, the high gradation image and the low gradation image captured by the camera are processed. The challenge is to efficiently collaborate with existing recognition programs. For example, it is conceivable to change an existing recognition program to one that processes a high gradation image captured by a camera. In this case, it takes time to modify the recognition program and the like, and since the image having a large amount of information is a processing target, the recognition processing itself after the modification tends to be heavy. It is also conceivable to convert a high gradation image captured by the camera into a low gradation image in accordance with the recognition program by a predetermined conversion method at a stage prior to the recognition process. In this case, although the performance of the camera has been improved, the recognition process cannot be improved in accuracy.

特開2005−45606号公報JP-A-2005-45606

この発明の一形態では、検知対象の認識処理を効率良く、高精度で実行することができる被対象認識装置および被対象認識方法を提供することを目的としている。   An object of one aspect of the present invention is to provide an object recognition device and an object recognition method that can execute recognition processing of a detection object efficiently and with high accuracy.

この発明の一形態としての被対象認識装置は、検知対象の画像を含む入力画像を取得する画像取得部と、前記画像取得部により取得した入力画像に対して検知対象の認識処理を行う第1の検知対象認識部と、前記第1の検知対象認識部による検知対象の認識が失敗した場合、前記第1の検知対象認識部における検知対象の認識処理の過程で得られた情報に基づいて前記入力画像を認識処理用の画像に再変換するための画像変換方法を決定する画像分析部と、前記画像分析部により決定した画像変換方法で前記入力画像を認識処理用の画像に変換する画像変換部と、前記画像変換部により得られた認識処理用の画像に対して検知対象の認識処理を行う第2の検知対象認識部とを有する。   An object recognition apparatus according to an aspect of the present invention includes an image acquisition unit that acquires an input image including an image to be detected, and a first process that performs detection target recognition processing on the input image acquired by the image acquisition unit. And when the recognition of the detection target by the first detection target recognition unit fails, based on the information obtained in the process of the recognition process of the detection target in the first detection target recognition unit An image analysis unit for determining an image conversion method for reconverting an input image into an image for recognition processing, and image conversion for converting the input image into an image for recognition processing by the image conversion method determined by the image analysis unit And a second detection target recognition unit that performs a recognition target recognition process on the recognition processing image obtained by the image conversion unit.

この発明の一形態としての被対象認識方法は、被対象認識装置に用いられる方法であって、検知対象の画像を含む入力画像を取得し、前記入力画像に対して検知対象を認識する第1の認識処理を行い、前記第1の認識処理による検知対象の認識が失敗した場合、前記第1の認識処理の過程で得られた情報に基づいて前記入力画像を認識処理用の画像に変換するための画像変換方法を決定し、前記決定した画像変換方法で前記入力画像を認識処理用の画像に変換し、前記画像変換方法による画像変換で得られた認識処理用の画像に対して検知対象を認識する第2の認識処理を行う。   A subject recognition method according to one aspect of the present invention is a method used in a subject recognition device, which obtains an input image including a detection target image and recognizes the detection target with respect to the input image. When the recognition of the detection target by the first recognition process fails, the input image is converted into an image for recognition process based on the information obtained in the process of the first recognition process. An image conversion method is determined, the input image is converted into an image for recognition processing by the determined image conversion method, and a detection target is detected for the image for recognition processing obtained by image conversion by the image conversion method A second recognition process for recognizing is performed.

図1は、バーコード認識装置の構成例を示す図である。FIG. 1 is a diagram illustrating a configuration example of a barcode recognition apparatus. 図2は、バーコード認識装置が適用された区分システムの概略構成例を示す図である。FIG. 2 is a diagram illustrating a schematic configuration example of a sorting system to which the barcode recognition device is applied. 図3は、カメラで撮像した画像の例を示す図である。FIG. 3 is a diagram illustrating an example of an image captured by the camera. 図4は、画像変換処理の一例を説明するための図である。FIG. 4 is a diagram for explaining an example of image conversion processing. 図5は、第1〜第5の画像変換処理の特性(変換テーブル)を示す図である。FIG. 5 is a diagram showing characteristics (conversion tables) of the first to fifth image conversion processes. 図6(a)〜(e)は、第1〜第5の画像変換処理により得られる画像の例を示す図である。6A to 6E are diagrams illustrating examples of images obtained by the first to fifth image conversion processes. 図7は、バーコード認識装置における第1の処理例の流れを説明するためのフローチャートである。FIG. 7 is a flowchart for explaining the flow of the first processing example in the barcode recognition apparatus. 図8は、4096階調の入力画像の全画素に対する濃度ヒストグラムの例を示す図である。FIG. 8 is a diagram illustrating an example of a density histogram for all pixels of an input image having 4096 gradations. 図9は、パーセンタイル方式により判定される媒体濃度値を説明するための図である。FIG. 9 is a diagram for explaining the medium density value determined by the percentile method. 図10は、媒体濃度値に応じた変換テーブルの例を説明するための図である。FIG. 10 is a diagram for explaining an example of the conversion table corresponding to the medium density value. 図11は、バーコード認識装置における第2の処理例の流れを説明するためのフローチャートである。FIG. 11 is a flowchart for explaining the flow of the second processing example in the barcode recognition apparatus. 図12は、パーセンタイル方式により判定されるバー濃度値を説明するための図である。FIG. 12 is a diagram for explaining the bar density value determined by the percentile method. 図13は、バー濃度値に応じた変換テーブルの例を説明するための図である。FIG. 13 is a diagram for explaining an example of the conversion table corresponding to the bar density value. 図14は、バーコード認識装置における第3の処理例の流れを説明するためのフローチャートである。FIG. 14 is a flowchart for explaining the flow of the third processing example in the barcode recognition apparatus. 図15は、バーコード認識装置における第4の処理例の流れを説明するためのフローチャートである。FIG. 15 is a flowchart for explaining the flow of the fourth processing example in the barcode recognition apparatus. 図16は、分離閾値を基準とした変換テーブルの例を説明するための図である。FIG. 16 is a diagram for explaining an example of the conversion table based on the separation threshold. 図17は、バーコード認識装置における第5の処理例の流れを説明するためのフローチャートである。FIG. 17 is a flowchart for explaining the flow of the fifth processing example in the barcode recognition apparatus.

以下、この発明の実施の形態について図面を参照して説明する。
以下の実施の形態では、被対象認識装置および被対象認識方法の例として、バーコード認識装置およびバーコード認識方法について説明する。ただし、以下に説明するバーコード認識装置およびバーコード認識方法は、被対象認識装置および被対象認識方法の他の例としての、文字認識装置および文字認識方法についても同様に適用可能である。
Embodiments of the present invention will be described below with reference to the drawings.
In the following embodiments, a barcode recognition device and a barcode recognition method will be described as examples of the subject recognition device and the subject recognition method. However, the bar code recognition device and the bar code recognition method described below are also applicable to a character recognition device and a character recognition method as other examples of the target recognition device and the target recognition method.

図1は、この発明の実施の形態に係るバーコード認識装置1の構成例を示す図である。
ここでは、バーコード認識装置1の例として、媒体としての紙葉類におけるプリント面に蛍光インクでプリントされたバーコードを認識するものであることを想定するものとする。
図1に示す例では、上記バーコード認識装置1は、画像インターフェース11、画像分析部12、画像変換部13、バー認識部(検知対象認識部)14、フィードバック部15、出力インターフェース16を有している。
FIG. 1 is a diagram showing a configuration example of a barcode recognition apparatus 1 according to an embodiment of the present invention.
Here, as an example of the barcode recognition device 1, it is assumed that a barcode printed with fluorescent ink on a printing surface of a paper sheet as a medium is recognized.
In the example shown in FIG. 1, the barcode recognition apparatus 1 includes an image interface 11, an image analysis unit 12, an image conversion unit 13, a bar recognition unit (detection target recognition unit) 14, a feedback unit 15, and an output interface 16. ing.

上記バーコード認識装置1は、被対象認識装置の一例である。上記被対象認識装置としてのバーコード認識装置1は、たとえば、各種のプログラムにより情報処理を行う機能を有する電子計算機(コンピュータ)などにより実現されるものである。上記バーコード認識装置1としてのコンピュータは、上記画像インターフェース11に対応する画像入力用のインターフェース、出力インターフェース16に対応する認識結果を出力するためのインターフェース、および、各種の処理を実行するための制御部などにより構成される。上記バーコード認識装置1としてのコンピュータの制御部は、CPU、RAM、ROMおよび書換え可能な不揮発性メモリなどにより構成される。このような制御部では、上記CPUは、RAMなどを作業用のメモリとして、ROMあるいは不揮発性メモリに記憶されている種々のプログラムを実行することにより種々の処理を実現している。   The bar code recognition device 1 is an example of an object recognition device. The barcode recognition apparatus 1 as the object recognition apparatus is realized by, for example, an electronic computer (computer) having a function of performing information processing using various programs. The computer as the barcode recognition apparatus 1 includes an image input interface corresponding to the image interface 11, an interface for outputting a recognition result corresponding to the output interface 16, and control for executing various processes. It consists of parts. The control unit of the computer as the barcode recognition device 1 includes a CPU, a RAM, a ROM, a rewritable nonvolatile memory, and the like. In such a control unit, the CPU realizes various processes by executing various programs stored in a ROM or a nonvolatile memory using a RAM or the like as a working memory.

たとえば、バーコード認識装置1としてのコンピュータの制御部は、画像分析用のプログラムを実行することにより画像分析部12として機能する。また、バーコード認識装置1としてのコンピュータの制御部は、画像変換用のプログラムを実行することにより画像変換部13として機能する。バーコード認識装置1としてのコンピュータの制御部は、バーコード認識処理用のプログラムを実行することによりバー認識部14として機能する。バーコード認識装置1としてのコンピュータの制御部は、フィードバック処理用のプログラムを実行することによりフィードバック部15として機能する。なお、上記画像分析部12、画像変換部13、バー認識部14およびフィードバック部15は、集積回路などのハードウエアにより実現するようにしてもよい。   For example, a control unit of a computer as the barcode recognition device 1 functions as the image analysis unit 12 by executing a program for image analysis. Further, the control unit of the computer as the barcode recognition device 1 functions as the image conversion unit 13 by executing a program for image conversion. The control unit of the computer as the barcode recognition device 1 functions as the barcode recognition unit 14 by executing a barcode recognition processing program. The control unit of the computer as the barcode recognition device 1 functions as the feedback unit 15 by executing a program for feedback processing. The image analysis unit 12, the image conversion unit 13, the bar recognition unit 14, and the feedback unit 15 may be realized by hardware such as an integrated circuit.

また、上記バーコード認識装置1には、上記カメラ2が接続されている。上記カメラ2は、紙葉類においてバーコードがプリントされている面の画像を読取るものである。たとえば、蛍光インクで紙葉類にプリントされているバーコードを認識する形態では、上記カメラ2は、蛍光スキャナおよび照明などにより構成される。この場合、照明は、紙葉類のバーコードがプリントされている面に対して、蛍光インクに含まれる蛍光体を励起させるための光を照射する。たとえば、上記照明は、蛍光灯あるいはLEDで構成される。上記蛍光スキャナは、上記照明からの光が照射される紙葉類のバーコードがプリントされている面から発光される蛍光を受光する。つまり、上記蛍光スキャナは、紙葉類の面に蛍光インクでプリントされているバーコードを画像情報(蛍光画像)として取得する。上記蛍光スキャナにより読取った蛍光画像は、上記バーコード認識装置1の画像インターフェース(画像取得部)11へ供給される。   Further, the camera 2 is connected to the barcode recognition device 1. The camera 2 reads an image of a surface on which a barcode is printed on a paper sheet. For example, in the form of recognizing a barcode printed on a paper sheet with fluorescent ink, the camera 2 includes a fluorescent scanner and illumination. In this case, the illumination irradiates the surface on which the barcode of the paper sheet is printed with light for exciting the phosphor contained in the fluorescent ink. For example, the illumination is composed of a fluorescent lamp or an LED. The fluorescence scanner receives fluorescence emitted from a surface on which a barcode of a paper sheet irradiated with light from the illumination is printed. That is, the fluorescent scanner acquires a barcode printed with fluorescent ink on the surface of a paper sheet as image information (fluorescent image). The fluorescence image read by the fluorescence scanner is supplied to the image interface (image acquisition unit) 11 of the barcode recognition device 1.

また、上記カメラ2は、上記バーコード認識装置1内のバー認識部14が処理対象とする画像よりも情報量の多い画像を撮影するものとする。たとえば、上記カメラ2は、バー認識部14が処理対象とする画像の階調(たとえば、8bitの画像)よりも高階調の画像(例えば、12bitの画像、16bitの画像)を撮影するものである。なお、以下の説明では、主に、上記カメラ2が撮影する画像(入力画像)が4096階調の12bit画像であり、上記バー認識部14が処理対象とする画像(認識処理用の画像)が256階調の8bit画像であることを想定するものとする。   The camera 2 captures an image having a larger amount of information than an image to be processed by the bar recognition unit 14 in the barcode recognition apparatus 1. For example, the camera 2 captures an image (for example, a 12-bit image, a 16-bit image) having a higher gradation than the gradation (for example, an 8-bit image) of the image to be processed by the bar recognition unit 14. . In the following description, an image (input image) captured by the camera 2 is a 12-bit image with 4096 gradations, and an image (an image for recognition processing) that is processed by the bar recognition unit 14 is mainly used. Assume an 8-bit image with 256 gradations.

なお、上記画像分析部12あるいは上記画像変換部13は、上記カメラ2に設けるようにしても良い。この場合、バーコード認識装置1には、上記カメラによる画像変換後の画像(8bitの画像)が画像インターフェースを介してバー認識部に供給されるようにすれば良い。また、このような形態は、たとえば、上記カメラ2内の制御部が、画像分析用のプログラムを実行することにより上記画像分析部12と同様な機能を実現したり、画像変換用のプログラムを実行することにより上記画像変換部13と同様な機能を実現したりできる。   The image analysis unit 12 or the image conversion unit 13 may be provided in the camera 2. In this case, the barcode recognition apparatus 1 may be configured to supply an image (8-bit image) after image conversion by the camera to the bar recognition unit via the image interface. Also, in such a configuration, for example, the control unit in the camera 2 executes a program for image analysis, thereby realizing the same function as the image analysis unit 12 or executing a program for image conversion. By doing so, the same function as the image conversion unit 13 can be realized.

上記画像インターフェース11は、検知対象としてのバーコードの画像を含む認識対象となる画像(以下、単に、入力画像とも称する)を取得する画像取得部として機能するものである。すなわち、上記画像インターフェース11は、上記カメラ2により撮像した画像を入力するためのインターフェースである。上記画像インターフェース11により上記カメラ2から取得した入力画像は、上記画像分析部12および上記画像変換部13に供給されるようになっている。   The image interface 11 functions as an image acquisition unit that acquires an image to be recognized (hereinafter also simply referred to as an input image) including a barcode image as a detection target. That is, the image interface 11 is an interface for inputting an image captured by the camera 2. The input image acquired from the camera 2 by the image interface 11 is supplied to the image analysis unit 12 and the image conversion unit 13.

上記画像分析部12は、上記画像インターフェース11により取得した上記カメラ2が撮影した画像(入力画像)を分析し、画像変換方法を決定する処理を行うものである。すなわち、上記画像分析部12は、入力画像における特徴を判定(推定)する処理と、入力画像を認識処理用の画像に変換するための画像変換方法を決定する処理とを行う。また、上記画像分析部12は、入力画像を認識処理用の画像に変換するための変換方法を示す情報を上記画像変換部13へ供給するようになっている。なお、上記画像分析部12は、第1、第2の画像分析部に相当している。   The image analysis unit 12 performs processing for analyzing an image (input image) taken by the camera 2 acquired by the image interface 11 and determining an image conversion method. That is, the image analysis unit 12 performs a process for determining (estimating) a feature in the input image and a process for determining an image conversion method for converting the input image into an image for recognition processing. The image analysis unit 12 supplies information indicating a conversion method for converting the input image into an image for recognition processing to the image conversion unit 13. The image analysis unit 12 corresponds to the first and second image analysis units.

図1に示す例において、上記画像分析部12は、濃度値推定部21、媒体濃度推定部23、バー濃度推定部24、および、変換方法決定部26を有している。   In the example illustrated in FIG. 1, the image analysis unit 12 includes a density value estimation unit 21, a medium density estimation unit 23, a bar density estimation unit 24, and a conversion method determination unit 26.

上記濃度値推定部21、上記バー濃度推定部24および上記媒体濃度推定部23は、それぞれ入力画像における特徴を判定(推定)する処理を行うものである。たとえば、上記濃度値推定部21は、入力画像における特徴として、入力画像における最頻濃度値、平均濃度値、パーセンタイル方式による濃度値などを判定するものである。また、上記バー濃度推定部24は、入力画像における検知要素画像としての検知要素の濃度値を判定するものである。すなわち、上記バー濃度推定部24は、入力画像における特徴として、入力画像における検知対象としてのバーコードを構成する検知要素画像としてのバー画像の濃度値を判定するものである。上記媒体濃度推定部23は、入力画像における背景画像としての媒体の濃度値を判定するものである。   The density value estimator 21, the bar density estimator 24, and the medium density estimator 23 each perform a process of determining (estimating) a feature in the input image. For example, the density value estimation unit 21 determines a mode density value, an average density value, a percentile method density value, and the like in the input image as features in the input image. The bar density estimation unit 24 determines the density value of the detection element as the detection element image in the input image. That is, the bar density estimation unit 24 determines a density value of a bar image as a detection element image constituting a barcode as a detection target in the input image as a feature in the input image. The medium density estimation unit 23 determines the density value of the medium as a background image in the input image.

なお、上記濃度値推定部21、上記バー濃度推定部24および上記媒体濃度推定部23は、画像変換方法を決定するための情報を判定するものである。このため、上記濃度値推定部21、上記バー濃度推定部24、および、上記媒体濃度推定部23は、何れかを選択的に設けるようにしても良い。たとえば、入力画像全体から得られる特徴(最頻濃度値、平均濃度値、パーセンタイル方式による濃度値など)に基づいて画像変換方法を決定する場合、上記画像分析部12は、上記濃度値推定部21が設けられるようにすれば良い。また、入力画像における各バーの濃度値と媒体の濃度値との組合せに基づいて画像変換方法を決定する場合、上記画像分析部12には、上記バー濃度推定部24と上記媒体濃度推定部23とを設けるようにすれば良い。   The density value estimator 21, the bar density estimator 24 and the medium density estimator 23 determine information for determining an image conversion method. Therefore, any one of the density value estimation unit 21, the bar density estimation unit 24, and the medium density estimation unit 23 may be selectively provided. For example, when determining the image conversion method based on the characteristics (mode density value, average density value, density value by percentile method, etc.) obtained from the entire input image, the image analysis unit 12 uses the density value estimation unit 21. Should be provided. When determining an image conversion method based on a combination of the density value of each bar and the density value of the medium in the input image, the image analysis unit 12 includes the bar density estimation unit 24 and the medium density estimation unit 23. Can be provided.

上記変換方法決定部26は、入力画像を認識処理用の画像に変換するための画像変換方法を決定するものである。すなわち、上記変換方法決定部26は、上記濃度値推定部21、バー濃度推定部41あるいは媒体濃度推定部42により得られる入力画像における特徴の分析結果に基づいて、入力画像を認識処理用の画像に変換するための画像変換方法を決定する。たとえば、上記バー認識部14が処理対象とする認識処理用の画像が8bitで、かつ、上記カメラ2が撮影する入力画像が12bitである場合、上記変換方法決定部22は、入力画像の特徴に基づいて12bitの入力画像を8bitの画像に変換するための画像変換方法を決定する。上記変換方法決定部22により決定された画像変換方法を示す情報は、上記画像変換部13に供給されるようになっている。   The conversion method determination unit 26 determines an image conversion method for converting an input image into an image for recognition processing. That is, the conversion method determination unit 26 recognizes the input image based on the analysis result of the feature in the input image obtained by the density value estimation unit 21, the bar density estimation unit 41, or the medium density estimation unit 42. The image conversion method for converting to is determined. For example, when the image for recognition processing to be processed by the bar recognition unit 14 is 8 bits and the input image captured by the camera 2 is 12 bits, the conversion method determination unit 22 determines the characteristics of the input image. Based on this, an image conversion method for converting a 12-bit input image into an 8-bit image is determined. Information indicating the image conversion method determined by the conversion method determination unit 22 is supplied to the image conversion unit 13.

上記画像変換部13は、上記画像インターフェース11により取り込まれる入力画像を上記バー認識部14が処理対象とする認識処理用の画像に変換するものである。上記画像変換部13は、種々の変換方法で画像変換処理を行う機能を有している。上記画像変換部13は、上記画像分析部12により決定された画像変換方法で入力画像を認識処理用の画像に変換する。なお、上記画像変換部13による画像変換処理については、後で詳細に説明するものとする。   The image conversion unit 13 converts the input image captured by the image interface 11 into a recognition processing image to be processed by the bar recognition unit 14. The image conversion unit 13 has a function of performing image conversion processing by various conversion methods. The image conversion unit 13 converts the input image into an image for recognition processing by the image conversion method determined by the image analysis unit 12. The image conversion process by the image conversion unit 13 will be described in detail later.

上記バー認識部14は、検知対象認識部として機能し、検知対象としてのバーコードの認識処理を行うものである。上記バー認識部14は、上記画像変換部13から供給される認識処理用の画像(変換後の画像)に含まれるバーコードを認識する処理を行うものである。上記バー認識部14は、たとえば、バー検出部、復号部及び判定部などにより構成される。なお、上記バー認識部14は、第1、第2のバー認識部に相当している。   The bar recognition unit 14 functions as a detection target recognition unit, and performs a process for recognizing a barcode as a detection target. The bar recognition unit 14 performs a process of recognizing a barcode included in an image for recognition processing (converted image) supplied from the image conversion unit 13. The bar recognition unit 14 includes, for example, a bar detection unit, a decoding unit, and a determination unit. The bar recognition unit 14 corresponds to a first and second bar recognition unit.

上記バー検出部は、検知対象の検出部として機能し、検知対象としてのバーコードを構成する各バーを検出する処理を行う。上記バー検出部は、上記画像変換部13から供給される認識処理用の画像からバーコードを構成する各バーをバー候補として検出する。上記バー検出部は、検出した各バーに対して種類を判別する。上記バー検出部は、バーコードの仕様に従って、各バーの長さおよびバーコード全体における相対的な位置などに基づいて、各バーの種類を判別する。また、上記バー検出部は、検出した各バー候補に位置などに基づいてバーコード全体の領域をバーコード領域の候補として検出する機能も有している。   The bar detection unit functions as a detection target detection unit and performs a process of detecting each bar constituting a barcode as a detection target. The bar detection unit detects each bar constituting the barcode from the image for recognition processing supplied from the image conversion unit 13 as a bar candidate. The bar detection unit determines the type for each detected bar. The bar detection unit determines the type of each bar based on the length of each bar and the relative position in the entire bar code in accordance with the bar code specifications. The bar detection unit also has a function of detecting the entire barcode area as a barcode area candidate based on the position of each detected bar candidate.

たとえば、上記バー検出部では、以下の手順により各バーの検出および認識を行う。
上記画像変換部13から8bit画像が供給されると、上記バー検出部は、当該8bit画像において濃度値が所定の閾値を超える画素を抽出する。
濃度値が所定の閾値を超える画素を抽出すると、上記バー検出部は、抽出した画素が固まって存在する領域をバー候補として選出する。
バー候補を選出すると、上記バー検出部は、各バー候補が横方向(各バー候補の長辺方向に直交する方向)に並んでいる部位をバーコード領域として抽出する。
バーコード領域を抽出すると、上記バー検出部は、バーコード領域において各バー候補の縦方向(各バー候補の長辺方向)の中心位置を判定(推定)する。
For example, the bar detection unit detects and recognizes each bar according to the following procedure.
When an 8-bit image is supplied from the image conversion unit 13, the bar detection unit extracts pixels whose density value exceeds a predetermined threshold in the 8-bit image.
When a pixel whose density value exceeds a predetermined threshold is extracted, the bar detection unit selects a region where the extracted pixels are solid and present as a bar candidate.
When a bar candidate is selected, the bar detection unit extracts a part where the bar candidates are arranged in the horizontal direction (a direction orthogonal to the long side direction of each bar candidate) as a barcode area.
When the bar code area is extracted, the bar detection unit determines (estimates) the center position of each bar candidate in the vertical direction (long side direction of each bar candidate) in the bar code area.

縦方向の中心位置を判定すると、上記バー検出部は、各バー候補をコード化する。すなわち、上記バー検出部は、各バー候補について、上記中心位置を基準にバーの種類を判定し、その判定結果をコード化する。たとえば、認識対象とするバーコードがアセンダバー、ディセンダーバー、ロングバー、タイミングバーの4種類のバーを並べたものである場合、上記バー検出部は、各バー候補がどの種類のバーであるかを判定する。すなわち、上記バー検出部は、中心位置より上にバーが形成されているバー候補をアセンダバーと判定し、中心位置より下にバーが形成されているバー候補をディセンダバーと判定し、中心を基準として上下に長いバーが形成されているバー候補をロングバーと判定し、中心を基準に短いバーが形成されているバー候補をタイミングバーと判定する。
上記バー検出部は、各バー候補の種類を判定すると、各バー候補の判定結果をコード化する。上記バー検出部は、各バー候補の並び順に、コード化した各バー候補の判定結果を並べた情報をバーコードの検出結果として復号部へ供給する。
When the center position in the vertical direction is determined, the bar detection unit encodes each bar candidate. That is, the bar detection unit determines the type of bar for each bar candidate based on the center position, and codes the determination result. For example, when the barcode to be recognized is an array of four types of bars, an ascender bar, a descender bar, a long bar, and a timing bar, the bar detection unit determines which type of bar each bar candidate is. judge. That is, the bar detection unit determines a bar candidate having a bar formed above the center position as an ascender bar, determines a bar candidate having a bar formed below the center position as a descender bar, and sets the center as a reference. The bar candidate in which a long bar is formed vertically is determined as a long bar, and the bar candidate in which a short bar is formed with reference to the center is determined as a timing bar.
When the bar detection unit determines the type of each bar candidate, the bar detection unit encodes the determination result of each bar candidate. The bar detection unit supplies information obtained by arranging the determination results of the encoded bar candidates in the order in which the bar candidates are arranged to the decoding unit as a barcode detection result.

上記復号部は、上記バー検出部により検出されたバーコードを復号化するものである。上記復号部は、上記バー検出部によるバーコードの検出結果としての各バーの種類を示す情報及び各バーの並びを示す情報に基づいてバーコードを復号する。また、上記復号部は、後述する誤り訂正符号に基づいて誤りを訂正する機能を有していても良い。この場合、上記復号部は、上記バー検出部による検出結果に基づいてバーコードが示す情報を復号化すると共に、復号化された情報を誤り訂正符号に基づく誤り訂正処理により訂正する。   The decoding unit decodes the barcode detected by the bar detection unit. The decoding unit decodes the barcode based on the information indicating the type of each bar and the information indicating the arrangement of the bars as the barcode detection result by the bar detection unit. The decoding unit may have a function of correcting an error based on an error correction code described later. In this case, the decoding unit decodes information indicated by the barcode based on the detection result by the bar detection unit, and corrects the decoded information by error correction processing based on the error correction code.

上記判定部は、復号部によるバーコードの復号結果(バーコードの認識結果)を有効とするか否かを判定する。たとえば、上記判定部は、バーコードの認識結果が所定桁数の情報であるか否かにより当該認識結果が有効か否かを判定する。また、上記判定部は、図示しない辞書データベースに記憶されている辞書データとバーコードの認識結果とを比較し、辞書データとして存在する認識結果を有効と判定するようにしても良い。上記判定部は、バーコードの復号結果が有効であると判定した場合、上記復号部により得られた復号結果をバーコードの認識結果として上記出力インターフェース16へ出力する。また、上記判定部は、バーコードの復号結果が有効でないと判定した場合、上記復号部により得られた復号結果、あるいは、上記バー検出部によるバーの検出結果などをフィードバック部15へ供給する。   The determination unit determines whether or not the barcode decoding result (barcode recognition result) by the decoding unit is valid. For example, the determination unit determines whether the recognition result is valid based on whether the barcode recognition result is information of a predetermined number of digits. The determination unit may compare dictionary data stored in a dictionary database (not shown) with a barcode recognition result and determine that the recognition result existing as dictionary data is valid. When the determination unit determines that the barcode decoding result is valid, the determination unit outputs the decoding result obtained by the decoding unit to the output interface 16 as a barcode recognition result. If the determination unit determines that the barcode decoding result is not valid, the determination unit supplies the feedback unit 15 with the decoding result obtained by the decoding unit or the bar detection result by the bar detection unit.

なお、被対象認識装置としての上記バーコード認識装置1を文字認識装置に適用する場合、上記バー認識部14は、所定の認識プログラムにより文字あるいは記号を認識する文字認識部に相当するものである。この場合、上記バー検出部と上記復号部とは、文字候補を検出して各文字候補を認識する処理部に相当し、上記判定部は、文字の認識結果が有効であるか否かを判定する処理部に相当するものと考えれば良い。   When the barcode recognition device 1 as the object recognition device is applied to a character recognition device, the bar recognition unit 14 corresponds to a character recognition unit that recognizes a character or a symbol by a predetermined recognition program. . In this case, the bar detection unit and the decoding unit correspond to a processing unit that detects character candidates and recognizes each character candidate, and the determination unit determines whether the character recognition result is valid. It may be considered that it corresponds to a processing unit.

上記フィードバック部15は、上記バー認識部14による認識処理により得られた情報を画像分析部12へフィードバックするものである。ここで、上記フィードバック部15は、上記バー認識部14による認識処理において得られた情報のうち画像分析に活用できる情報を画像分析部12へフィードバックするものとする。たとえば、上記フィードバック部15は、上記バー認識部14のバー検出部により得られたバー候補の情報に基づいてバーの濃度と背景の濃度との分離閾値を算出し、その算出した分離閾値を画像分析部12にフィードバックする。この場合、上記画像分析部12では、上記フィードバック部15から供給される情報に基づいて画像を再度分析する処理を行う。この処理については、後で詳細に説明するものとする。   The feedback unit 15 feeds back the information obtained by the recognition processing by the bar recognition unit 14 to the image analysis unit 12. Here, the feedback unit 15 feeds back to the image analysis unit 12 information that can be used for image analysis among the information obtained in the recognition processing by the bar recognition unit 14. For example, the feedback unit 15 calculates a separation threshold value between the bar density and the background density based on the candidate bar information obtained by the bar detection unit of the bar recognition unit 14, and uses the calculated separation threshold value as an image. Feedback to the analysis unit 12. In this case, the image analysis unit 12 performs a process of analyzing the image again based on the information supplied from the feedback unit 15. This process will be described in detail later.

上記出力インターフェース16は、上記バー認識部14により得られたバーコードの認識結果を外部へ出力するためのインターフェースである。例えば、上記出力インターフェース16は、上記バー認識部14の判定部によりバーコードの復号結果が有効である判定された場合、上記復号部により得られた復号結果をバーコードの認識結果として外部へ出力する。また、上記出力インターフェース16は、上記バー認識部14の判定部により有効でない判定された場合、上記フィードバック部15によるフィードバック処理を行わないならば、バーコードの認識が失敗した旨を外部へ出力する。   The output interface 16 is an interface for outputting the barcode recognition result obtained by the bar recognition unit 14 to the outside. For example, when the determination unit of the bar recognition unit 14 determines that the barcode decoding result is valid, the output interface 16 outputs the decoding result obtained by the decoding unit to the outside as the barcode recognition result. To do. Further, if the output interface 16 determines that the determination is not valid by the determination unit of the bar recognition unit 14, the output interface 16 outputs to the outside that the barcode recognition has failed if the feedback processing by the feedback unit 15 is not performed. .

図2は、上記バーコード認識装置1が適用された区分システムの概略構成を示す図である。
図2に示す区分システムは、物品(たとえば紙葉類)にプリントされているバーコードに基づいて物品を区分処理するシステムである。なお、ここでは、区分処理の対象となる物品として、第1面に蛍光インクで区分先を示す情報(区分情報)がバーコードがプリントされている紙葉類を想定して説明するものとする。
図2に示す区分システムは、制御装置31、供給装置32、搬送装置33、区分装置34、カメラ2、バーコード認識装置1などにより構成されている。図2に示す構成例において、上記制御装置31には、供給装置32、搬送装置33、区分装置34およびバーコード認識装置1などが接続されている。
FIG. 2 is a diagram showing a schematic configuration of a sorting system to which the barcode recognition apparatus 1 is applied.
The sorting system shown in FIG. 2 is a system that sorts an article based on a bar code printed on the article (for example, paper sheets). Here, the article to be subjected to the sorting process will be described assuming paper sheets on which barcodes are printed with information (sorting information) indicating the sorting destination with fluorescent ink on the first surface. .
The sorting system shown in FIG. 2 includes a control device 31, a feeding device 32, a transport device 33, a sorting device 34, a camera 2, a barcode recognition device 1, and the like. In the configuration example shown in FIG. 2, a supply device 32, a transport device 33, a sorting device 34, a barcode recognition device 1, and the like are connected to the control device 31.

上記制御装置31は、区分システムの全体の制御を司るものである。上記制御装置31は、たとえば、CPU、各種メモリ、各種インターフェースなどを有する電子計算機などにより構成される。上記制御装置31は、メモリに記憶されているプログラムをCPUが実行することにより種々の処理を実行する機能を有している。たとえば、上記制御装置31は、各種インターフェースにより各部と接続して、メモリに記憶されている制御プログラムに基づいて各部の動作制御などを行う。また、上記制御装置31には、オペレータに対して案内を表示したり、オペレータから操作指示が入力されたりする図示しないオペレーティングパネルなども接続されている。   The control device 31 is responsible for overall control of the sorting system. The control device 31 includes, for example, an electronic computer having a CPU, various memories, various interfaces, and the like. The control device 31 has a function of executing various processes when the CPU executes a program stored in the memory. For example, the control device 31 is connected to each unit through various interfaces, and performs operation control of each unit based on a control program stored in the memory. The control device 31 is also connected to an operating panel (not shown) that displays guidance for the operator and receives operation instructions from the operator.

上記供給装置32には、区分処理の対象となる紙葉類が所定の方向に揃えてセットされる。上記供給装置32は、セットされている紙葉類を1通づつ取出し、上記搬送装置33の搬送路へ供給する。上記搬送装置33は、上記制御装置31による制御に基づいて各紙葉類を搬送するものである。たとえば、上記搬送装置33は、上記供給装置32により順次取り出される各紙葉類を一定の搬送速度で搬送するようになっている。   In the supply device 32, paper sheets to be subjected to sorting processing are set in a predetermined direction. The supply device 32 takes out the set paper sheets one by one and supplies them to the conveyance path of the conveyance device 33. The transport device 33 transports each paper sheet based on the control by the control device 31. For example, the transport device 33 transports each paper sheet sequentially taken out by the supply device 32 at a constant transport speed.

上記搬送装置33により搬送される紙葉類の第1面の画像は、上記カメラ2により撮影されるようになっている。上記カメラ2は、上述したように、照明および蛍光スキャナなどにより構成され、紙葉類の第1面に蛍光インクでプリントされているバーコードを含む画像を撮像するようになっている。上記バーコード認識装置1は、上述したような構成により、上記カメラ2で撮像された画像に対してバーコードの認識処理を行う。上記バーコード認識装置1によるバーコードの認識結果は、上記制御装置31へ供給される。上記制御装置31は、上記バーコード認識装置1によるバーコードの認識結果に基づいて、上記搬送装置33および上記区分装置34を制御することにより紙葉類を区分する処理を行う。   An image of the first surface of the paper sheet transported by the transport device 33 is taken by the camera 2. As described above, the camera 2 includes an illumination and a fluorescent scanner, and captures an image including a barcode printed with fluorescent ink on the first surface of the paper sheet. The barcode recognition apparatus 1 performs barcode recognition processing on an image captured by the camera 2 with the above-described configuration. The barcode recognition result by the barcode recognition device 1 is supplied to the control device 31. The control device 31 performs processing for sorting the paper sheets by controlling the transport device 33 and the sorting device 34 based on the barcode recognition result by the barcode recognition device 1.

上記区分装置34は、紙葉類を区分して集積するための複数の区分ポケットを有している。たとえば、上記区分装置34は、複数段および複数列に区画された複数の区分ポケット、複数のゲート機構、および、分岐搬送路などを有している。この場合、上記区分装置34は、上記制御装置31からの制御信号に従って、各ゲート機構などを制御することにより所望の区分ポケットへ各紙葉類を搬送し、集積する。   The sorting device 34 has a plurality of sorting pockets for sorting and accumulating paper sheets. For example, the sorting device 34 has a plurality of sorting pockets, a plurality of gate mechanisms, a branch conveyance path, and the like partitioned into a plurality of stages and a plurality of rows. In this case, the sorting device 34 transports and accumulates each paper sheet into a desired sorting pocket by controlling each gate mechanism in accordance with a control signal from the control device 31.

次に、上記カメラ2により撮像される画像について説明する。
本実施の形態では、蛍光インクでプリントされたバーコードを認識することを想定している。このため、上記カメラ2としての蛍光スキャナが撮像する画像は、バーの部分が明るく、背景が暗い画像となるのが予測される。たとえば、図3は、上記カメラ2で撮像した画像の例を示す図である。図3に示す画像では、バーが明るく、背景(媒体)が暗くなってる。図3に示すように、バーと背景とが明確に区別できるような画像では、バーを確実に抽出することができるため、バーコードの認識精度が高くなる。これに対して、バーと背景とが共に明るかったり、バーと背景とが共に暗かったりすると、バーの検出が困難になるため、バーコードの認識精度が低くなる。
Next, an image captured by the camera 2 will be described.
In the present embodiment, it is assumed that a barcode printed with fluorescent ink is recognized. For this reason, the image captured by the fluorescent scanner as the camera 2 is predicted to be an image with a bright bar and a dark background. For example, FIG. 3 is a diagram illustrating an example of an image captured by the camera 2. In the image shown in FIG. 3, the bar is bright and the background (medium) is dark. As shown in FIG. 3, in an image in which the bar and the background can be clearly distinguished, the bar can be reliably extracted, so that the barcode recognition accuracy is increased. On the other hand, if the bar and the background are both bright, or if the bar and the background are both dark, it is difficult to detect the bar, resulting in low barcode recognition accuracy.

上記バーコード認識装置1では、画像分析部12がカメラ2により撮像された画像(入力画像)の特徴を分析し、その分析結果に基づいて画像変換部13が入力画像をバーコードの認識精度が高くなるような画像に変換(たとえば、バーが検出しやすい画像に変換)する処理を行うものである。なお、ここでは、カメラ2が12bit画像を撮影し、バー認識部が8bit画像に対してバーコード認識処理を行うことを想定している。つまり、本実施の形態では、入力画像の特徴に基づいて、12bitの入力画像を8bitの認識用の画像に変換することを想定している。   In the barcode recognition apparatus 1, the image analysis unit 12 analyzes the characteristics of the image (input image) captured by the camera 2, and the image conversion unit 13 converts the input image into a barcode recognition accuracy based on the analysis result. A process of converting to an image that becomes higher (for example, converting to an image in which a bar can be easily detected) is performed. Here, it is assumed that the camera 2 captures a 12-bit image and the bar recognition unit performs barcode recognition processing on the 8-bit image. That is, in this embodiment, it is assumed that a 12-bit input image is converted into an 8-bit recognition image based on the characteristics of the input image.

次に、上記画像変換部13における画像変換処理について説明する。
図4は、画像変換処理の一例を説明するための図である。図4に示す例では、各画素の濃度値(輝度値)が0〜4095までの値で示される12bit画像(4096階調の画像)を各画素の濃度値(輝度値)が0〜255までの値で示される8bit画像(256階調の画像)に線形変換するものである。図4では、数値が高ければ高いほど明るく、数値が低ければ低いほど暗いことを示している。以下、本実施の形態では、図4に示すように、濃度値が高ければ高いほど明るい画素であるものとする。
Next, the image conversion process in the image conversion unit 13 will be described.
FIG. 4 is a diagram for explaining an example of image conversion processing. In the example shown in FIG. 4, a 12-bit image (an image having 4096 gradations) in which the density value (luminance value) of each pixel is 0 to 4095 is used and the density value (luminance value) of each pixel is 0 to 255. Is linearly converted to an 8-bit image (256-gradation image) indicated by the value of. FIG. 4 shows that the higher the numerical value, the brighter, and the lower the numerical value, the darker. Hereinafter, in the present embodiment, as shown in FIG. 4, the higher the density value, the brighter the pixel.

図4に示すような画像変換では、12bitレンジの画像をむらなく、8bitレンジの画像に変換できる。しかしながら、図4に示すような画像変換では、バーの検出精度などのバーコードの認識精度の向上を期待することができない。すなわち、12bit画像においてバーを構成する各画素の濃度値と背景を構成する各画素の濃度値との差が小さい場合(つまり、バーと背景とが共に明るい場合、あるいは、バーと背景とが共に暗い場合)、図4に示すような画像変換により得られる8bit画像では、バーと背景とが区別し難くなる可能性がある。これは、12bit画像における背景とバーとの濃度差が小さい場合、12bit画像から8bit画像に変換される際に、その濃度差がさらに小さくなったり、無くなったりする可能性があるためである。   In the image conversion as shown in FIG. 4, an image in the 12-bit range can be converted into an image in the 8-bit range without unevenness. However, the image conversion as shown in FIG. 4 cannot be expected to improve the barcode recognition accuracy such as the bar detection accuracy. That is, in the 12-bit image, when the difference between the density value of each pixel constituting the bar and the density value of each pixel constituting the background is small (that is, when both the bar and the background are bright, or both the bar and the background are In the case of dark), in the 8-bit image obtained by the image conversion as shown in FIG. 4, it may be difficult to distinguish the bar from the background. This is because when the density difference between the background and the bar in the 12-bit image is small, the density difference may be further reduced or lost when the 12-bit image is converted to the 8-bit image.

以下、カメラ2が撮影した画像(入力画像とも称する)を認識処理用の画像に変換するための処理例として、第1〜第5の処理例について説明する。
まず、第1の処理例について説明する。
この第1の処理例では、4096階調の12bit画像全体における特徴(濃度値の分布)に基づいて画像変換方法を決定するものとする。また、第1の処理例では、上記画像変換部13は、12bit画像を8bit画像に変換する方法として、以下のような5種類の画像変換処理(第1〜第5の画像変換処理)を行う機能を有しているものとする。ここで、第1〜第5の画像変換処理の例について説明する。
図5は、第1〜第5の画像変換処理の特性(変換テーブル)を示す図である。また、図6は、第1〜第5の画像変換処理により得られる画像の例を示す図である。
Hereinafter, first to fifth processing examples will be described as processing examples for converting an image (also referred to as an input image) taken by the camera 2 into an image for recognition processing.
First, a first processing example will be described.
In this first processing example, the image conversion method is determined based on the characteristics (density value distribution) in the entire 4096-gradation 12-bit image. In the first processing example, the image conversion unit 13 performs the following five types of image conversion processing (first to fifth image conversion processing) as a method of converting a 12-bit image into an 8-bit image. It shall have a function. Here, examples of the first to fifth image conversion processes will be described.
FIG. 5 is a diagram showing characteristics (conversion tables) of the first to fifth image conversion processes. FIG. 6 is a diagram illustrating examples of images obtained by the first to fifth image conversion processes.

(a)第1の画像変換処理は、12bit画像において濃度値が0〜255の画素を256階調の画素とする8bit画像に線形変換する。この場合、12bit画像における濃度値が256以上の画素は濃度値が255に変換される。この第1の画像変換処理は、図5に示す特性aに従った変換処理である。この第1の画像変換処理では、12bit画像において濃度値が0〜255の各画素による階調変化を強調した明るい8bit画像(256階調の画像)が得られる。たとえば、第1の画像変換処理では、図6(a)に示すような明るい画像が得られる。従って、第1の画像変換処理は、濃度値が255未満の画素が多い入力画像(全体が暗い画像)に対する画像変換処理に有効であると考えられる。特に、上記第1の画像変換処理は、4096階調の入力画像における背景の画像を構成する各画素の濃度分布とバーの画像を構成する各画素の濃度分布との差異が濃度値0〜255のレンジで強調できる場合に効果的であると考えられる。   (A) In the first image conversion process, a 12-bit image is linearly converted into an 8-bit image in which pixels having a density value of 0 to 255 are 256 gradation pixels. In this case, pixels having a density value of 256 or more in the 12-bit image are converted to a density value of 255. This first image conversion process is a conversion process according to the characteristic a shown in FIG. In the first image conversion process, a bright 8-bit image (256-gradation image) is obtained by emphasizing the gradation change by each pixel having a density value of 0 to 255 in the 12-bit image. For example, in the first image conversion process, a bright image as shown in FIG. Therefore, the first image conversion process is considered to be effective for an image conversion process for an input image having a large number of pixels having a density value of less than 255 (an image that is entirely dark). In particular, in the first image conversion process, the difference between the density distribution of each pixel constituting the background image and the density distribution of each pixel constituting the bar image in the 4096 gradation input image is a density value of 0-255. It is considered effective when it can be emphasized in the range of.

(b)第2の画像変換処理は、12bit画像において濃度値が0〜511の各画素を256階調の8bit画像に線形変換する。この場合、12bit画像における濃度値が512以上の各画素の濃度値は255に変換される。この第2の画像変換処理は、図5に示す特性bに従った画像変換処理である。この第2の画像変換処理では、12bit画像(4096階調の画像)において濃度値が0〜511の各画素による階調変化を強調した8bit画像(256階調の画像)が得られる。たとえば、第2の画像変換処理では、図6(b)に示すような画像が得られる。従って、第2の画像変換処理は、濃度値が511未満の画素が多い入力画像に対する画像変換処理に有効であると考えられる。すなわち、上記第2の画像変換処理は、4096階調の入力画像における背景画像を構成する各画素の濃度分布とバーの画像を構成する各画素の濃度分布との差異が濃度値0〜511のレンジで強調できる場合に効果的であると考えられる。   (B) In the second image conversion process, each pixel having a density value of 0 to 511 in a 12-bit image is linearly converted into an 8-bit image having 256 gradations. In this case, the density value of each pixel having a density value of 512 or more in the 12-bit image is converted to 255. This second image conversion process is an image conversion process according to the characteristic b shown in FIG. In the second image conversion process, an 8-bit image (256-gradation image) is obtained by emphasizing a gradation change by each pixel having a density value of 0 to 511 in a 12-bit image (4096-gradation image). For example, in the second image conversion process, an image as shown in FIG. 6B is obtained. Therefore, the second image conversion process is considered to be effective for an image conversion process for an input image having many pixels having density values less than 511. That is, in the second image conversion process, the difference between the density distribution of each pixel constituting the background image and the density distribution of each pixel constituting the bar image in the 4096 gradation input image is a density value of 0 to 511. It is considered effective when the range can be emphasized.

(c)第3の画像変換処理は、12bit画像において濃度値が0〜1023の各画素を256階調の8bit画像に線形変換する。この場合、12bit画像における濃度値が1024以上の各画素の濃度値は255に変換される。この第3の画像変換処理は、図5に示す特性cに従った画像変換処理である。この第3の画像変換処理では、12bit画像(4096階調の画像)において濃度値が0〜1023の各画素による階調変化を強調した8bit画像(256階調の画像)が得られる。たとえば、第3の画像変換処理では、図6(c)に示すような画像が得られる。従って、第3の画像変換処理は、濃度値が1023未満の画素が多い入力画像に対する画像変換処理に有効であると考えられる。すなわち、上記第3の画像変換処理は、4096階調の入力画像における背景画像を構成する各画素の濃度分布とバーの画像を構成する各画素の濃度分布との差異が濃度値0〜1023のレンジで強調できる場合に効果的であると考えられる。   (C) The third image conversion processing linearly converts each pixel having a density value of 0 to 1023 into an 8-bit image having 256 gradations in a 12-bit image. In this case, the density value of each pixel having a density value of 1024 or more in the 12-bit image is converted to 255. This third image conversion process is an image conversion process according to the characteristic c shown in FIG. In the third image conversion process, an 8-bit image (256-gradation image) is obtained in which a gradation change by each pixel having a density value of 0 to 1023 is emphasized in a 12-bit image (4096-gradation image). For example, in the third image conversion process, an image as shown in FIG. 6C is obtained. Therefore, the third image conversion process is considered to be effective for an image conversion process for an input image having many pixels with density values less than 1023. That is, in the third image conversion process, the difference between the density distribution of each pixel constituting the background image and the density distribution of each pixel constituting the bar image in the 4096-gradation input image is a density value of 0 to 1023. It is considered effective when the range can be emphasized.

(d)第4の画像変換処理は、12bit画像において濃度値が0〜2047の各画素を256階調の8bit画像に線形変換する。この場合、12bit画像における濃度値が2048以上の各画素の濃度値は255に変換される。この第4の画像変換処理は、図5に示す特性dに従った画像変換処理である。この第4の画像変換処理では、12bit画像(4096階調の画像)において濃度値が0〜2047の各画素による階調変化を強調した8bit画像(256階調の画像)が得られる。たとえば、第4の画像変換処理では、図6(d)に示すような画像が得られる。従って、第4の画像変換処理は、濃度値が2047未満の画素が多い入力画像に対する画像変換処理に有効であると考えられる。すなわち、上記第4の画像変換処理は、4096階調の入力画像における背景画像を構成する各画素の濃度分布とバーの画像を構成する各画素の濃度分布との差異が濃度値0〜2047のレンジで強調できる場合に効果的であると考えられる。   (D) In the fourth image conversion process, each pixel having a density value of 0 to 2047 in a 12-bit image is linearly converted into an 8-bit image having 256 gradations. In this case, the density value of each pixel having a density value of 2048 or more in the 12-bit image is converted to 255. The fourth image conversion process is an image conversion process according to the characteristic d shown in FIG. In the fourth image conversion process, an 8-bit image (256-gradation image) is obtained in which a gradation change by each pixel having a density value of 0 to 2047 is emphasized in a 12-bit image (4096-gradation image). For example, in the fourth image conversion process, an image as shown in FIG. 6D is obtained. Therefore, the fourth image conversion process is considered to be effective for an image conversion process for an input image having many pixels with density values less than 2047. That is, in the fourth image conversion process, the difference between the density distribution of each pixel constituting the background image and the density distribution of each pixel constituting the bar image in the 4096-gradation input image is a density value of 0 to 2047. It is considered effective when the range can be emphasized.

(e)第5の画像変換処理は、12bit画像において濃度値が0〜4095の各画素を256階調の8bit画像に線形変換する。この場合、12bit画像における濃度値が4095以上の各画素の濃度値は255に変換される。この第5の画像変換処理は、図5に示す特性eに従った画像変換処理である。この第5の画像変換処理では、図4に示すように、12bit画像全体における階調変化を変えない8bit画像が得られる。たとえば、第5の画像変換処理では、図6(e)に示すような画像が得られる。従って、第5の画像変換処理は、各画素の濃度値が0〜4095の広いレンジに分布している入力画像、あるいは、濃度値が2047以上の明るい画素が多い入力画像(全体が明るい画像)に対する画像変換処理に有効であると考えられる。   (E) The fifth image conversion process linearly converts each pixel having a density value of 0 to 4095 in a 12-bit image into an 8-bit image having 256 gradations. In this case, the density value of each pixel having a density value of 4095 or higher in the 12-bit image is converted to 255. The fifth image conversion process is an image conversion process according to the characteristic e shown in FIG. In the fifth image conversion process, as shown in FIG. 4, an 8-bit image that does not change the gradation change in the entire 12-bit image is obtained. For example, in the fifth image conversion process, an image as shown in FIG. 6E is obtained. Therefore, the fifth image conversion processing is performed in an input image in which the density value of each pixel is distributed in a wide range of 0 to 4095, or an input image having many bright pixels having a density value of 2047 or more (the entire image is bright). This is considered to be effective for image conversion processing.

これらの第1〜第5の画像変換処理は、それぞれ各画素の濃度値をビットシフト演算することにより実行される処理である。すなわち、上述した第1〜第5の画像変換処理は、複雑な演算処理が不要な処理であり、高速に画像変換処理の結果を得ることが可能な処理である。このため、上記画像変換部13では、入力画像が与えられた時点で第1〜第5の画像変換処理を実行しておくようにしても良い。この場合、上記画像変換部13は、上記画像分析部12から画像変換方法が指定された時点で指定された画像変換方法で画像変換処理した画像をバー認識部14に供給するようにできる。   These first to fifth image conversion processes are processes executed by performing a bit shift operation on the density value of each pixel. That is, the above-described first to fifth image conversion processes are processes that do not require complicated arithmetic processing, and can obtain the result of the image conversion process at high speed. For this reason, the image conversion unit 13 may execute the first to fifth image conversion processes when an input image is given. In this case, the image conversion unit 13 can supply the bar recognition unit 14 with an image subjected to image conversion processing by the designated image conversion method when the image conversion method is designated by the image analysis unit 12.

上記画像分析部12は、入力画像における特徴を分析し、その分析結果に基づいて第1〜第5の画像変換処理のうち何れかを決定する。たとえば、上記画像分析部12において、上記濃度値推定部21は、入力画像における特徴として、入力画像における最頻濃度値を算出するものとする。入力画像において最も頻度が高くなる濃度値(最頻濃度値)は、背景の濃度値であると判定される。これは、バーコードがプリントされている領域周辺の背景がぼぼ均一な濃度値であることが想定されるためである。つまり、最頻濃度値は、背景画像において最も頻度が高い濃度値(媒体の濃度値)であると判定される。
このような最頻濃度値に基づいて画像変換方法を決定すれば、上記画像分析部12では、背景画像の濃度値に応じた画像変換方法を決定することが可能となる。すなわち、上記画像変換部13が上記第1〜第5の画像変換処理の機能を有している場合、上記変換方法決定部26は、上記濃度値推定部21により算出された入力画像における最頻濃度値に基づいて、第1〜第5の画像変換処理の何れかを選択する。
The image analysis unit 12 analyzes a feature in the input image and determines one of the first to fifth image conversion processes based on the analysis result. For example, in the image analysis unit 12, the density value estimation unit 21 calculates the most frequent density value in the input image as a feature in the input image. It is determined that the density value (mode density value) having the highest frequency in the input image is the background density value. This is because it is assumed that the background around the area where the barcode is printed has a substantially uniform density value. That is, the mode density value is determined to be the density value (medium density value) having the highest frequency in the background image.
If the image conversion method is determined based on such a mode density value, the image analysis unit 12 can determine an image conversion method according to the density value of the background image. That is, when the image conversion unit 13 has the functions of the first to fifth image conversion processes, the conversion method determination unit 26 sets the mode in the input image calculated by the density value estimation unit 21. One of the first to fifth image conversion processes is selected based on the density value.

画像変換方法を決定する手法としては、例えば、所定の閾値と上記濃度値推定部21により算出された最頻濃度値とを比較することにより、画像変換方法を決定する手法が考えられる。この場合、画像変換方法を決定するための閾値の設定は、運用形態などに応じて適宜設定される。
たとえば、12bit画像における最頻濃度値に対する閾値として、「100」、「200」、「500」、「1000」の4つの閾値を設定された場合を想定する。この場合、上記変換方法決定部26は、入力画像に対する画像変換方法として、第1〜第5の画像変換処理の何れかを以下のような条件に基づいて決定することが可能である。
As a method of determining the image conversion method, for example, a method of determining the image conversion method by comparing a predetermined threshold value with the most frequent density value calculated by the density value estimation unit 21 can be considered. In this case, the threshold value for determining the image conversion method is appropriately set according to the operation mode.
For example, it is assumed that four threshold values “100”, “200”, “500”, and “1000” are set as threshold values for the most frequent density value in a 12-bit image. In this case, the conversion method determination unit 26 can determine one of the first to fifth image conversion processes as the image conversion method for the input image based on the following conditions.

(a−1)最頻濃度値αが「100」未満(α<100)ならば、画像変換方法として、第1の画像変換処理を選択する。 (A-1) If the mode density value α is less than “100” (α <100), the first image conversion process is selected as the image conversion method.

(b−1)最頻濃度値αが「100」以上かつ「200」未満(100≦α<100)ならば、画像変換方法として、第2の画像変換処理を選択する。 (B-1) If the mode density value α is not less than “100” and less than “200” (100 ≦ α <100), the second image conversion process is selected as the image conversion method.

(c−1)最頻濃度値αが「200」以上かつ「500」未満(200≦α<500)ならば、画像変換方法として、第3の画像変換処理を選択する。 (C-1) If the mode density value α is “200” or more and less than “500” (200 ≦ α <500), the third image conversion process is selected as the image conversion method.

(d−1)最頻濃度値αが「500」以上かつ「1000」未満(500≦α<1000)ならば、画像変換方法として、第4の画像変換処理を選択する。 (D-1) If the mode density value α is not less than “500” and less than “1000” (500 ≦ α <1000), the fourth image conversion process is selected as the image conversion method.

(e−1)最頻濃度値αが「1000」以上(1000≦α)ならば、画像変換方法として、第5の画像変換処理を選択する。 (E-1) If the mode density value α is “1000” or more (1000 ≦ α), the fifth image conversion process is selected as the image conversion method.

なお、上記濃度値推定部21は、上述したような入力画像における最頻濃度値の代りに、入力画像における平均濃度値あるいはパーセンタイル方式により判定(推定)される濃度値などを判定するようにしても良い。平均濃度値は、入力画像における全画素の濃度値の平均値である。また、パーセンタイル方式による濃度値の判定としては、入力画像の濃度ヒストグラムにおいて最も暗い濃度値から順に積分した値が所定の閾値を超えた時点の濃度値を判定することが可能である。   The density value estimation unit 21 determines an average density value in the input image or a density value determined (estimated) by the percentile method instead of the mode density value in the input image as described above. Also good. The average density value is an average value of density values of all pixels in the input image. Further, as the determination of the density value by the percentile method, it is possible to determine the density value when the value integrated in order from the darkest density value in the density histogram of the input image exceeds a predetermined threshold value.

また、上記変換方法決定部26は、複数の画像変換方法を選択するようにしても良い。たとえば、上記変換方法決定部26は、α<100ならば、第1の画像変換処理と第2の画像変換処理とを選択するようにしても良い。このような場合、上記画像変換部13は、第1の画像変換処理により得られる第1の画像と第2の画像変換処理により得られる第2の画像とをバー認識部14に供給するようにする。このため、上記バー認識部14では、上記第1の画像と上記第2の画像とに対してバーコードの認識処理を行うようにすれば良い。   The conversion method determination unit 26 may select a plurality of image conversion methods. For example, the conversion method determination unit 26 may select the first image conversion process and the second image conversion process if α <100. In such a case, the image conversion unit 13 supplies the bar recognition unit 14 with the first image obtained by the first image conversion process and the second image obtained by the second image conversion process. To do. Therefore, the bar recognition unit 14 may perform barcode recognition processing on the first image and the second image.

次に、上記のような第1の処理例による処理の流れについて説明する。
図7は、上記バーコード認識装置1における第1の処理例の流れを説明するためのフローチャートである。ここでは、一例として、上述したように、最頻濃度値αに対して4つの閾値(「100」、「200」、「500」、「1000」)が設定され、それらの閾値に基づいて上記第1〜第5の画像変換処理の何れかを画像変換方法として選択する形態を想定して説明するものとする。
Next, the flow of processing according to the first processing example as described above will be described.
FIG. 7 is a flowchart for explaining the flow of the first processing example in the barcode recognition apparatus 1. Here, as an example, as described above, four threshold values (“100”, “200”, “500”, “1000”) are set for the mode density value α, and based on these threshold values, the above-described threshold values are set. A description will be given assuming that one of the first to fifth image conversion processes is selected as the image conversion method.

まず、上記カメラ2が、バーコードのプリント面を12bit(4096階調)で撮像したものとする。すると、上記バーコード認識装置1の画像インターフェース11は、上記カメラ2が撮像した12bit画像を取得する(ステップS10)。上記画像インターフェース11は、取得した12bit画像を画像分析部12および画像変換部13へ供給する。上記画像インターフェース11から12bit画像が供給されると、上記画像分析部12は、上記濃度値推定部21により当該12bit画像における最頻濃度値αを判定する(ステップS11)。   First, it is assumed that the camera 2 captures the barcode print surface with 12 bits (4096 gradations). Then, the image interface 11 of the barcode recognition device 1 acquires a 12-bit image captured by the camera 2 (step S10). The image interface 11 supplies the acquired 12-bit image to the image analysis unit 12 and the image conversion unit 13. When a 12-bit image is supplied from the image interface 11, the image analysis unit 12 determines the most frequent density value α in the 12-bit image by the density value estimation unit 21 (step S11).

上記濃度値推定部21により最頻濃度値αが判定されると、上記変換方法決定部26は、当該12bit画像に対する画像変換方法として、第1〜第5の画像変換処理の何れかを最頻濃度値αと所定の閾値に基づいて選択する(ステップS12〜S20)。   When the mode value estimator 21 determines the mode density value α, the conversion method determination unit 26 selects one of the first to fifth image conversion processes as the mode conversion method for the 12-bit image. A selection is made based on the density value α and a predetermined threshold (steps S12 to S20).

たとえば、最頻濃度値αが100未満である場合(ステップS12、YES)、上記変換方法決定部26は、当該12bit画像に対する画像変換方法として、第1の画像変換処理(4096階調の濃度値0〜255を255階調の濃度値0〜255に線形変換する処理)を選択する(ステップS13)。最頻濃度値αが100以上かつ200未満である場合(ステップS14、YES)、上記変換方法決定部26は、当該12bit画像に対する画像変換方法として、第2の画像変換処理(4096階調の濃度値0〜511を255階調の濃度値0〜255に線形変換する処理)を選択する(ステップS15)。   For example, when the mode density value α is less than 100 (step S12, YES), the conversion method determination unit 26 uses the first image conversion process (density value of 4096 gradations) as an image conversion method for the 12-bit image. A process of linearly converting 0 to 255 into 255 gradation density values 0 to 255 is selected (step S13). When the most frequent density value α is 100 or more and less than 200 (step S14, YES), the conversion method determination unit 26 uses the second image conversion process (density of 4096 gradations) as an image conversion method for the 12-bit image. A process of linearly converting the values 0 to 511 into 255 gradation density values 0 to 255 is selected (step S15).

最頻濃度値αが200以上かつ500未満である場合(ステップS16、YES)、上記変換方法決定部26は、当該12bit画像に対する画像変換方法として、第3の画像変換処理(4096階調の濃度値0〜1023を255階調の濃度値0〜255に線形変換する処理)を選択する(ステップS17)。最頻濃度値αが500以上かつ1000未満である場合(ステップS18、YES)、上記変換方法決定部26は、当該12bit画像に対する画像変換方法として、第4の画像変換処理(4096階調の濃度値0〜2047を255階調の濃度値0〜255に線形変換する処理)を選択する(ステップS19)。最頻濃度値αが1000以上である場合(ステップS18、NO)、上記変換方法決定部26は、当該12bit画像に対する画像変換方法として、第5の画像変換処理(4096階調の濃度値0〜4095を255階調の濃度値0〜255に線形変換する処理)を選択する(ステップS20)。   If the most frequent density value α is 200 or more and less than 500 (step S16, YES), the conversion method determination unit 26 uses the third image conversion process (density of 4096 gradations) as the image conversion method for the 12-bit image. A process of linearly converting the values 0 to 1023 into the density values 0 to 255 of 255 gradations is selected (step S17). When the mode density value α is 500 or more and less than 1000 (step S18, YES), the conversion method determination unit 26 uses a fourth image conversion process (density of 4096 gradations) as an image conversion method for the 12-bit image. A process of linearly converting the value 0 to 2047 into the density value 0 to 255 of 255 gradations is selected (step S19). When the mode density value α is 1000 or more (step S18, NO), the conversion method determination unit 26 uses the fifth image conversion process (4096 gradation density values 0 to 0) as an image conversion method for the 12-bit image. The process of linearly converting 4095 to 255 gradation density values 0 to 255 is selected (step S20).

上記ステップS12〜S20で、12bit画像に対する画像変換方法が選択されると、上記変換方法決定部26は、選択した画像変換処理を上記画像変換部13に対して指定する(ステップS21)。
上記画像分析部12の変換方法決定部26により当該12bit画像に対する画像変換方法(画像変換処理)が指定されると、上記画像変換部13は、指定された画像変換処理により当該12bit画像を8bit画像に変換する(ステップS22)。上記画像変換部13は、指定された画像変換処理により生成した8bit画像をバー認識部14を供給する。なお、上記画像変換部13は、上記画像分析部12における処理と並行して上記画像インターフェース11から取得する12bit画像に対する第1〜第5の画像変換処理をそれぞれ実行しておくようにしても良い。この場合、上記画像変換部13は、上記画像分析部12により指定された画像変換方法で生成した8bit画像をバー認識部14へ供給するようにする。
When an image conversion method for a 12-bit image is selected in steps S12 to S20, the conversion method determination unit 26 designates the selected image conversion process to the image conversion unit 13 (step S21).
When an image conversion method (image conversion process) for the 12-bit image is specified by the conversion method determination unit 26 of the image analysis unit 12, the image conversion unit 13 converts the 12-bit image into an 8-bit image by the specified image conversion process. (Step S22). The image conversion unit 13 supplies the bar recognition unit 14 with the 8-bit image generated by the designated image conversion process. The image conversion unit 13 may execute the first to fifth image conversion processes on the 12-bit image acquired from the image interface 11 in parallel with the process in the image analysis unit 12. . In this case, the image conversion unit 13 supplies the 8-bit image generated by the image conversion method designated by the image analysis unit 12 to the bar recognition unit 14.

上記バー認識部14は、上記画像変換部13から供給された8bit画像に対してバーコードの認識処理を行う(ステップS23)。上記バー認識部14におけるバーコード認識処理では、たとえば、上述したように、バー候補の検出処理、バー識別処理、バーコードの復号処理、復号結果の判定処理などが行われる。上記バー認識部14は、バーコードの認識処理による処理結果を出力インターフェース16により外部に出力する(ステップS24)。   The bar recognition unit 14 performs barcode recognition processing on the 8-bit image supplied from the image conversion unit 13 (step S23). In the barcode recognition process in the bar recognition unit 14, for example, as described above, a bar candidate detection process, a bar identification process, a barcode decoding process, a decoding result determination process, and the like are performed. The bar recognition unit 14 outputs the processing result of the barcode recognition process to the outside through the output interface 16 (step S24).

たとえば、バーコードの認識が成功した場合(認識結果が有効な情報であると判定された場合)、上記出力インターフェース16は、バーコードの認識結果を外部へ出力する。また、バーコードの認識が失敗した場合(認識結果が有効な情報でないと判定された場合)、上記出力インターフェース16は、バーコードの認識が失敗した旨を示す情報を外部へ出力する。なお、バーコードの認識が失敗した場合、後述する第5の処理例のように、バーコード認識処理の各工程で得られた情報を画像分析部12へフィードバックすることにより、当該入力画像に対する画像変換処理およびバーコード認識処理を再度実行するようにしても良い。   For example, when the barcode recognition is successful (when it is determined that the recognition result is valid information), the output interface 16 outputs the barcode recognition result to the outside. When the barcode recognition fails (when it is determined that the recognition result is not valid information), the output interface 16 outputs information indicating that the barcode recognition has failed to the outside. When the barcode recognition fails, as shown in a fifth processing example to be described later, the information obtained in each step of the barcode recognition processing is fed back to the image analysis unit 12 so that the image corresponding to the input image is displayed. The conversion process and the barcode recognition process may be executed again.

次に、第2の処理例について説明する。
この第2の処理例では、12bit画像における背景(媒体)の濃度値に基づいて画像変換方法を決定するものとする。また、以下に説明する第2〜第5の処理例では、上記画像変換部13は、上記画像分析部12から指定される変換テーブルに基づいて12bit画像を8bit画像に変換する機能を有しているものとする。
Next, a second processing example will be described.
In this second processing example, the image conversion method is determined based on the density value of the background (medium) in the 12-bit image. In the second to fifth processing examples described below, the image conversion unit 13 has a function of converting a 12-bit image into an 8-bit image based on a conversion table specified by the image analysis unit 12. It shall be.

上記画像分析部12の上記媒体濃度推定部23は、カメラ2が撮影した12bit画像における背景画像の濃度値(媒体濃度値)を判定する機能を有している。上記媒体濃度推定部23が判定する背景画像の濃度値は、入力画像における背景画像の特徴を示す情報である。たとえば、上記背景画像の濃度値としては、4096階調の入力画像全体における最頻濃度値あるいは平均濃度値であっても良いし、パーセンタイル方式により判定される濃度値であっても良い。   The medium density estimation unit 23 of the image analysis unit 12 has a function of determining a background image density value (medium density value) in a 12-bit image captured by the camera 2. The density value of the background image determined by the medium density estimation unit 23 is information indicating the characteristics of the background image in the input image. For example, the density value of the background image may be a mode density value or an average density value in the entire input image having 4096 gradations, or a density value determined by a percentile method.

図8は、4096階調の入力画像の全画素に対する濃度ヒストグラムの例を示す図である。
図8に示すように、上記カメラ2が媒体におけるバーコードのプリント面を撮影した画像の濃度ヒストグラムは、背景画像の濃度分布とバー画像の濃度分布とを含むものとなる。本実施の形態では、上述したように、バーコードを構成する各バーが背景よりも明るい画像として撮影されることを想定している。このため、背景画像の濃度分布は、バー画像の濃度分布よりも濃度値が小さい分布となる。つまり、図8に示すヒストグラムの例では、左側(濃度値が小さい方)にピークがある分布が背景画像の濃度分布であり、右側(濃度値が大きい方)にピークがある分布がバー画像の濃度分布であると判定される。ただし、明るい背景に暗いバーコードがプリントされる運用形態(たとえば、白色の背景に黒色のバーコードがプリントされる運用形態)では、背景画像の濃度分布が明るい側に現れ、バー画像の濃度分布が暗い側に現れると推定される。たとえば、図8に示すような濃度値設定では、図8に示す濃度ヒストグラムとは逆に、背景画像の濃度分布が右側に現れ、バー画像の濃度分布が左側に現れると推定される。
FIG. 8 is a diagram illustrating an example of a density histogram for all pixels of an input image having 4096 gradations.
As shown in FIG. 8, the density histogram of an image obtained by photographing the barcode print surface on the medium by the camera 2 includes the density distribution of the background image and the density distribution of the bar image. In the present embodiment, as described above, it is assumed that each bar constituting the barcode is captured as an image brighter than the background. For this reason, the density distribution of the background image has a smaller density value than the density distribution of the bar image. That is, in the example of the histogram shown in FIG. 8, the distribution with the peak on the left side (the smaller density value) is the density distribution of the background image, and the distribution with the peak on the right side (the higher density value) is the bar image. The density distribution is determined. However, in an operation mode in which a dark barcode is printed on a light background (for example, an operation mode in which a black barcode is printed on a white background), the density distribution of the background image appears on the bright side, and the density distribution of the bar image Is estimated to appear on the dark side. For example, in the density value setting as shown in FIG. 8, it is estimated that the density distribution of the background image appears on the right side and the density distribution of the bar image appears on the left side, contrary to the density histogram shown in FIG.

ここでは、図8に示すように、濃度ヒストグラムにおいて左側にピークがある分布が背景画像の濃度分布で、右側にピークがある分布がバー画像の濃度分布であることを想定する。
図8に示すヒストグラムの例では、左側にピークがある分布(つまり、背景画像の濃度分布)の特徴を示す情報が背景画像の濃度値(媒体濃度値)として判定される。たとえば、上記媒体濃度推定部23は、背景画像の濃度分布の特徴を示す情報として、当該分布のピーク値(最頻濃度値)、あるいは、平均値などを判定する。上記最頻濃度値は、ヒストグラムにおける左側の分布において頻度が最大となる値(ピーク値を判定することにより判定される。上記平均値は、ヒストグラムにおける左側のピーク値から判定される背景画像の分布全体における濃度の平均値を算出することにより判定される。
Here, as shown in FIG. 8, it is assumed that the distribution having a peak on the left side in the density histogram is the density distribution of the background image, and the distribution having the peak on the right side is the density distribution of the bar image.
In the example of the histogram shown in FIG. 8, information indicating the characteristics of the distribution having a peak on the left side (that is, the density distribution of the background image) is determined as the density value (medium density value) of the background image. For example, the medium density estimation unit 23 determines a peak value (mode density value) or an average value of the distribution as information indicating the characteristics of the density distribution of the background image. The mode density value is determined by determining the peak value in the distribution on the left side of the histogram (the peak value is determined. The average value is the distribution of the background image determined from the peak value on the left side of the histogram. It is determined by calculating the average value of the density in the whole.

また、上記媒体濃度推定部23は、パーセンタイル方式により判定される媒体濃度値として、ヒストグラムの左側から積分した値が所定の閾値を超える位置の濃度値を判定するようにしても良い。ここでは、背景画像の濃度分布の特徴を示す情報として、パーセンタイル方式により媒体濃度値を判定する例について説明する。
図9は、パーセンタイル方式により判定される媒体濃度値を説明するための図である。
上記パーセンタイル方式により媒体濃度値を判定する場合、上記媒体濃度推定部23は、図9に示すように、背景画像の濃度分布が現れる側(図8に示す例では、左端の濃度値「0」)から積分を行う。上記媒体濃度推定部23は、濃度値「0」から各濃度値までの積分値を算出するごとに、算出した積分値が予め設定されている閾値以上となったか否かを判定する。算出した積分値が上記閾値以上となった場合、上記媒体濃度推定部23は、当該積分値となった濃度値を媒体濃度値として判定する。
Further, the medium density estimation unit 23 may determine a density value at a position where the integrated value from the left side of the histogram exceeds a predetermined threshold as the medium density value determined by the percentile method. Here, an example in which the medium density value is determined by the percentile method as information indicating the characteristics of the density distribution of the background image will be described.
FIG. 9 is a diagram for explaining the medium density value determined by the percentile method.
When the medium density value is determined by the percentile method, the medium density estimation unit 23, as shown in FIG. 9, has a density distribution “0” at the left end in the background image density distribution appearance side as shown in FIG. ) To integrate. The medium density estimation unit 23 determines whether or not the calculated integral value is equal to or greater than a preset threshold value every time the integral value from the density value “0” to each density value is calculated. When the calculated integral value is equal to or greater than the threshold value, the medium density estimation unit 23 determines the density value that is the integral value as the medium density value.

上記パーセンタイル方式により媒体濃度値を判定するための閾値は、想定される背景画像の濃度分布、あるいは、バー画像の濃度分布などに応じて設定されるべきものである。たとえば、図9に示す例では、背景画像の濃度分布と判定される分布のピークとなる濃度値よりも小さい値となるように設定されている。また、上記閾値は、たとえば、濃度ヒストグラム全体に対する積分値の比率(百分率)などにより設定される。   The threshold value for determining the medium density value by the above-mentioned percentile method should be set according to the assumed density distribution of the background image or the density distribution of the bar image. For example, in the example shown in FIG. 9, the density is set to be smaller than the density value that is the peak of the distribution determined as the density distribution of the background image. Further, the threshold value is set by, for example, a ratio (percentage) of an integrated value with respect to the entire density histogram.

上記のように、第2の処理例では、上記媒体濃度推定部23により背景画像の濃度分布の特徴を示す情報としての媒体濃度値が判定される。上記媒体濃度値が判定されると、上記変換方法決定部26は、上記媒体濃度推定部23により判定された媒体濃度値に応じた画像変換方法を決定する。第2の処理例において、上記変換方法決定部26は、媒体濃度値未満の濃度値の各画素を全て濃度値「0」に変換し、媒体濃度値以上の濃度値の各画素を0〜255の濃度値に線形変換する画像変換方法を決定する。このような画像変換方法は、たとえば、変換テーブルとして画像変換部13に対して指定される。   As described above, in the second processing example, the medium density estimation unit 23 determines a medium density value as information indicating the characteristics of the density distribution of the background image. When the medium density value is determined, the conversion method determination unit 26 determines an image conversion method according to the medium density value determined by the medium density estimation unit 23. In the second processing example, the conversion method determination unit 26 converts all pixels having a density value less than the medium density value to a density value “0”, and converts each pixel having a density value equal to or higher than the medium density value to 0 to 255. An image conversion method for linear conversion to the density value is determined. Such an image conversion method is designated to the image conversion unit 13 as a conversion table, for example.

図10は、媒体濃度値に応じた変換テーブルTaの例を説明するための図である。
図10に示すように、第2の処理例では、上記変換方法決定部26は、上記媒体濃度推定部23により判定された媒体濃度値を基点する線形変換となる変換テーブルTaを作成する。図10に示すような変換テーブルTaによる画像変換処理では、上述したように、入力画像において濃度値が媒体濃度値未満の各画素を全て濃度値「0」に変換し、入力画像において濃度値が媒体濃度値以上の各画素を0〜255の濃度値に線形変換する。
上記のような第2の処理例によれば、媒体濃度値よりも暗い部分の情報を落とす代わりに、バー画像を構成する画素を含む媒体濃度値よりも明るい部分の情報を広いレンジの情報(濃度値0〜255)に変換できる。
FIG. 10 is a diagram for explaining an example of the conversion table Ta according to the medium density value.
As shown in FIG. 10, in the second processing example, the conversion method determination unit 26 creates a conversion table Ta that is a linear conversion based on the medium density value determined by the medium density estimation unit 23. In the image conversion process using the conversion table Ta as shown in FIG. 10, as described above, all pixels having a density value less than the medium density value in the input image are converted into the density value “0”, and the density value is changed in the input image. Each pixel having a medium density value or higher is linearly converted to a density value of 0 to 255.
According to the second processing example as described above, instead of dropping the information in the darker area than the medium density value, the information in the brighter area than the medium density value including the pixels constituting the bar image is displayed in a wide range of information ( The density value can be converted to 0-255).

次に、上記のような第2の処理例としての処理の流れについて説明する。
図11は、上記バーコード認識装置1における第2の処理例の流れを説明するためのフローチャートである。
上記カメラ2が撮像した12bit画像を取得すると(ステップS31)。上記画像インターフェース11は、取得した12bit画像を画像分析部12および画像変換部13へ供給する。上記画像インターフェース11から12bit画像が供給されると、上記画像分析部12は、上記媒体濃度推定部23により当該12bit画像における媒体濃度値を判定する処理を行う(ステップS32およびS33)。
Next, the flow of processing as the second processing example will be described.
FIG. 11 is a flowchart for explaining the flow of the second processing example in the barcode recognition apparatus 1.
When a 12-bit image captured by the camera 2 is acquired (step S31). The image interface 11 supplies the acquired 12-bit image to the image analysis unit 12 and the image conversion unit 13. When a 12-bit image is supplied from the image interface 11, the image analysis unit 12 performs a process of determining a medium density value in the 12-bit image by the medium density estimation unit 23 (steps S32 and S33).

ここでは、上述したようなパーセンタイル方式により媒体濃度値を判定するものとする。すなわち、上記媒体濃度推定部23は、当該12bit画像における全画素の濃度分布を示す濃度ヒストグラムを作成する(ステップS32)。ヒストグラムを作成すると、上記媒体濃度推定部23は、当該ヒストグラムにより媒体濃度値を判定する(ステップS33)。媒体濃度値を判定する処理として、上記媒体濃度推定部23は、当該ヒストグラムに対して濃度値「0」から順に各濃度値までの積分した値を算出する。各濃度値までの積分値を算出するごとに、上記媒体濃度推定部23は、積分値が所定の閾値以上であるか否かを判断する。この判断により積分値が所定の閾値以上であると判断した場合、上記媒体濃度推定部23は、当該積分値が得られた濃度値を当該12bit画像における媒体濃度値と判定する。   Here, the medium density value is determined by the percentile method as described above. That is, the medium density estimation unit 23 creates a density histogram indicating the density distribution of all pixels in the 12-bit image (step S32). When the histogram is created, the medium density estimation unit 23 determines a medium density value based on the histogram (step S33). As a process for determining the medium density value, the medium density estimation unit 23 calculates an integrated value from the density value “0” to each density value in order with respect to the histogram. Each time the integral value up to each density value is calculated, the medium density estimation unit 23 determines whether or not the integral value is equal to or greater than a predetermined threshold value. If it is determined that the integrated value is equal to or greater than a predetermined threshold, the medium density estimation unit 23 determines that the density value from which the integrated value is obtained is the medium density value in the 12-bit image.

上記媒体濃度推定部23により当該12bit画像の媒体濃度値が判定されると、上記変換方法決定部26は、当該媒体濃度値に基づいて、当該12bit画像を認識処理用の8bit画像に変換するための画像変換方法を決定する(ステップS34及びS35)。すなわち、上記変換方法決定部26は、上記媒体濃度推定部23により判定された媒体濃度値に応じた画像変換用の変換テーブルTaを作成する(ステップS34)。この変換テーブルTaは、たとえば、上述したように、媒体濃度値を基点に立ち上がる線形変換を指定するものである。画像変換用の変換テーブルTaを作成すると、上記変換方法決定部26は、作成した変換テーブルTaを画像変換方法として上記画像変換部13に指定する(ステップS35)。   When the medium density value of the 12-bit image is determined by the medium density estimation unit 23, the conversion method determination unit 26 converts the 12-bit image into an 8-bit image for recognition processing based on the medium density value. The image conversion method is determined (steps S34 and S35). That is, the conversion method determination unit 26 creates a conversion table Ta for image conversion corresponding to the medium density value determined by the medium density estimation unit 23 (step S34). This conversion table Ta designates, for example, linear conversion that rises from the medium density value as a base point, as described above. When the conversion table Ta for image conversion is created, the conversion method determination unit 26 designates the created conversion table Ta as the image conversion method to the image conversion unit 13 (step S35).

上記画像分析部12の変換方法決定部26により当該12bit画像に対する画像変換方法(変換テーブル)が指定されると、上記画像変換部13は、指定された変換テーブルTaに従って当該12bit画像を8bit画像に変換する処理を行う(ステップS36)。指定された変換テーブルに基づく画像変換処理により生成された8bit画像は、上記画像変換部13から上記バー認識部14に供給される。
上記バー認識部14は、上記画像変換部13から供給された8bit画像に対してバーコードの認識処理を行う(ステップS37)。上記バー認識部14におけるバーコード認識処理では、たとえば、上述したように、バー候補の検出処理、バー識別処理、バーコードの復号処理、復号結果の判定処理などが行われる。上記バー認識部14は、バーコードの認識処理による処理結果を出力インターフェース16により外部に出力する(ステップS38)。
When an image conversion method (conversion table) for the 12-bit image is specified by the conversion method determination unit 26 of the image analysis unit 12, the image conversion unit 13 converts the 12-bit image into an 8-bit image according to the specified conversion table Ta. Conversion processing is performed (step S36). The 8-bit image generated by the image conversion process based on the specified conversion table is supplied from the image conversion unit 13 to the bar recognition unit 14.
The bar recognition unit 14 performs barcode recognition processing on the 8-bit image supplied from the image conversion unit 13 (step S37). In the barcode recognition process in the bar recognition unit 14, for example, as described above, a bar candidate detection process, a bar identification process, a barcode decoding process, a decoding result determination process, and the like are performed. The bar recognition unit 14 outputs the processing result of the barcode recognition process to the outside through the output interface 16 (step S38).

たとえば、バーコードの認識が成功した場合(認識結果が有効な情報であると判定された場合)、上記出力インターフェース16は、バーコードの認識結果を外部へ出力する。また、バーコードの認識が失敗した場合(認識結果が有効な情報でないと判定された場合)、上記出力インターフェース16は、バーコードの認識が失敗した旨を示す情報を外部へ出力する。なお、バーコードの認識が失敗した場合、後述する第5の処理例のように、バーコード認識処理の各工程で得られた情報を画像分析部12にフィードバックすることにより、当該入力画像に対する画像変換処理およびバーコード認識処理を再実行(リトライ)を行うようにしても良い。   For example, when the barcode recognition is successful (when it is determined that the recognition result is valid information), the output interface 16 outputs the barcode recognition result to the outside. When the barcode recognition fails (when it is determined that the recognition result is not valid information), the output interface 16 outputs information indicating that the barcode recognition has failed to the outside. If the barcode recognition fails, an image corresponding to the input image is fed back to the image analysis unit 12 with information obtained in each step of the barcode recognition processing as in a fifth processing example described later. The conversion process and the barcode recognition process may be re-executed (retry).

次に、第3の処理例について説明する。
この第3の処理例では、12bit画像におけるバーコードを構成するバーの濃度値に基づいて画像変換方法を決定するものである。
上記画像分析部12の上記バー濃度推定部24は、上記カメラ2が撮影した12bit画像(12bit画像)におけるバー画像の濃度値(バー濃度値)を判定する機能を有している。上記バー濃度推定部24が判定するバー濃度値は、入力画像におけるバー画像の特徴を示す情報である。たとえば、上記バー濃度値としては、バー画像の濃度分布における最頻濃度値(ピーク値)あるいは平均濃度値であっても良いし、パーセンタイル方式により判定される濃度値であっても良い。
Next, a third processing example will be described.
In the third processing example, the image conversion method is determined based on the density value of the bar constituting the barcode in the 12-bit image.
The bar density estimation unit 24 of the image analysis unit 12 has a function of determining a bar image density value (bar density value) in a 12-bit image (12-bit image) captured by the camera 2. The bar density value determined by the bar density estimation unit 24 is information indicating the characteristics of the bar image in the input image. For example, the bar density value may be a mode density value (peak value) or an average density value in the density distribution of the bar image, or may be a density value determined by a percentile method.

本実施の形態では、上述したように、バーコードを構成する各バーが背景よりも明るい画像として撮影されることを想定している。このため、バー画像の濃度分布は、背景画像の濃度分布よりも濃度値が大きい分布となる。つまり、図8に示すような濃度ヒストグラムの例では、右側(濃度値が大きい方)にピークがある分布がバー画像の濃度分布であると推定される。ただし、明るい背景に暗いバーコードがプリントされる運用形態(たとえば、白色の背景に黒色でバーコードがプリントされている運用形態)では、バー画像の濃度分布が暗い側に現れ、背景画像の濃度分布が明るい側に現れる。たとえば、図8に示すような濃度値設定では、図8に示すヒストグラムとは逆に、バー画像の濃度分布が左側に現れ、背景画像の濃度分布が右側に現れる。   In the present embodiment, as described above, it is assumed that each bar constituting the barcode is captured as an image brighter than the background. For this reason, the density distribution of the bar image has a density value larger than that of the background image. That is, in the example of the density histogram as shown in FIG. 8, it is estimated that the distribution having the peak on the right side (the one with the larger density value) is the density distribution of the bar image. However, in an operation mode in which a dark barcode is printed on a light background (for example, an operation mode in which a black barcode is printed on a white background), the density distribution of the bar image appears on the dark side, and the density of the background image The distribution appears on the bright side. For example, in the density value setting as shown in FIG. 8, the density distribution of the bar image appears on the left side and the density distribution of the background image appears on the right side, contrary to the histogram shown in FIG.

ここでは、図8に示すように、濃度ヒストグラムにおいて右側にピークがある分布がバー画像の濃度分布であることを想定して説明する。
図8に示すヒストグラムの例では、右側にピークがある分布(つまり、バー画像の濃度分布)の特徴を示す情報がバー画像の濃度値(バー濃度値)として判定される。たとえば、上記バー濃度推定部24は、バー画像の濃度分布の特徴を示す情報として、当該分布の最頻濃度値、あるいは、平均値などを判定する。上記最頻濃度値は、ヒストグラムにおける右側の分布において頻度が最大となる値(ピーク値)を判定することにより判定される。上記平均値は、たとえば、ヒストグラムにおける右側のピーク値から推定されるバー画像の分布全体における濃度の平均値を算出することにより判定される。
Here, as shown in FIG. 8, description will be made assuming that the distribution having a peak on the right side in the density histogram is the density distribution of the bar image.
In the example of the histogram shown in FIG. 8, information indicating the characteristics of the distribution having a peak on the right side (that is, the density distribution of the bar image) is determined as the density value (bar density value) of the bar image. For example, the bar density estimation unit 24 determines a mode density value or an average value of the distribution as information indicating the characteristics of the density distribution of the bar image. The mode density value is determined by determining a value (peak value) having the highest frequency in the distribution on the right side of the histogram. The average value is determined, for example, by calculating the average value of the density in the entire bar image distribution estimated from the peak value on the right side of the histogram.

また、上記バー濃度推定部24は、パーセンタイル方式によるバー濃度値の判定としては、ヒストグラムの右端(濃度値「4096」)から各濃度値までを積分した値が所定の閾値を超える位置の濃度値を判定するようにしても良い。ここでは、バー画像の濃度分布の特徴を示す情報として、パーセンタイル方式によりバー濃度値を判定する例について説明する。
図12は、パーセンタイル方式により判定されるバー濃度値を説明するための図である。
上記パーセンタイル方式によりバー濃度値を判定する場合、上記バー濃度推定部24は、図12に示すように、ヒストグラムに対して、バー画像の濃度分布が現れる側(図8に示す例では、右端の濃度値「4096」)から各濃度値までの積分を行う。上記バー濃度推定部24は、各濃度値までの積分値を算出するごとに、算出した積分値が予め設定されている閾値(バー濃度値判定用の閾値)以上となったか否かを判定する。算出した積分値が上記閾値以上となった場合、上記バー濃度推定部24は、当該積分値となった濃度値をバー濃度値として判定する。
The bar density estimation unit 24 determines the bar density value by the percentile method. The density value at the position where the integrated value from the right end of the histogram (density value “4096”) to each density value exceeds a predetermined threshold value. May be determined. Here, an example will be described in which the bar density value is determined by the percentile method as information indicating the characteristics of the density distribution of the bar image.
FIG. 12 is a diagram for explaining the bar density value determined by the percentile method.
When the bar density value is determined by the percentile method, the bar density estimation unit 24, as shown in FIG. 12, has a bar image density distribution side with respect to the histogram (in the example shown in FIG. Integration from density value “4096”) to each density value is performed. Each time the bar density estimation unit 24 calculates an integral value up to each density value, the bar density estimation unit 24 determines whether the calculated integral value is equal to or greater than a preset threshold value (threshold value for bar density value determination). . When the calculated integrated value is equal to or greater than the threshold value, the bar density estimating unit 24 determines the density value that has become the integrated value as the bar density value.

上記パーセンタイル方式によりバー濃度値を判定するための閾値は、想定されるバー画像の濃度分布、あるいは、背景画像の濃度分布などに応じた設定されるべきものである。たとえば、図12に示す例では、バー濃度値が、バー画像の濃度分布におけるピーク値、あるいは、バー画像の濃度分布の最小値よりも小さい濃度値となるように設定されている。また、上記閾値は、たとえば、濃度ヒストグラム全体に対する積分値の比率(百分率)などにより設定される。   The threshold for determining the bar density value by the percentile method should be set according to the assumed density distribution of the bar image or the density distribution of the background image. For example, in the example shown in FIG. 12, the bar density value is set to be a peak value in the density distribution of the bar image or a density value smaller than the minimum value of the density distribution of the bar image. Further, the threshold value is set by, for example, a ratio (percentage) of an integrated value with respect to the entire density histogram.

上記のように、第3の処理例では、上記バー濃度推定部24によりバー画像の濃度分布の特徴を示す情報としてのバー濃度値が判定される。上記バー濃度値が判定されると、上記変換方法決定部26は、上記バー濃度推定部24により判定されたバー濃度値に応じた画像変換方法を決定する。第3の処理例において、上記変換方法決定部26は、バー濃度値以上の濃度値の各画素を全て濃度値「255」に変換し、バー濃度値未満の濃度値の各画素を0〜255の濃度値に線形変換する画像変換方法を決定する。このような画像変換方法を示す情報は、たとえば、変換テーブルとして画像変換部13に対して指定される。   As described above, in the third processing example, the bar density estimation unit 24 determines a bar density value as information indicating the characteristics of the density distribution of the bar image. When the bar density value is determined, the conversion method determination unit 26 determines an image conversion method according to the bar density value determined by the bar density estimation unit 24. In the third processing example, the conversion method determination unit 26 converts all pixels having a density value equal to or higher than the bar density value to a density value “255”, and converts each pixel having a density value less than the bar density value to 0 to 255. An image conversion method for linear conversion to the density value is determined. Information indicating such an image conversion method is designated to the image conversion unit 13 as a conversion table, for example.

図13は、バー濃度値に応じた変換テーブルTbの例を説明するための図である。
図13に示すように、第3の処理例では、上記変換方法決定部26は、上記バー濃度推定部24により判定されたバー濃度値を基点する線形変換となる変換テーブルTbを作成する。図13に示すような変換テーブルTbによる画像変換処理では、上述したように、入力画像において濃度値がバー濃度値以上の各画素を全て濃度値「255」に変換し、入力画像において濃度値がバー濃度値未満の各画素を0〜255の濃度値に線形変換する。
上記のような第3の処理例によれば、バー濃度値よりも明るい部分の情報を落とす(全て最大値とする)代わりに、背景画像を構成する各画素の濃度値を含むバー濃度値よりも暗い部分の情報を広いレンジの情報(濃度値0〜255)に変換できる。
FIG. 13 is a diagram for explaining an example of the conversion table Tb according to the bar density value.
As shown in FIG. 13, in the third processing example, the conversion method determination unit 26 creates a conversion table Tb that is a linear conversion based on the bar density value determined by the bar density estimation unit 24. In the image conversion process using the conversion table Tb as shown in FIG. 13, as described above, all pixels having a density value equal to or higher than the bar density value in the input image are converted to the density value “255”, and the density value is changed in the input image. Each pixel less than the bar density value is linearly converted to a density value of 0 to 255.
According to the third processing example as described above, instead of dropping the information of the brighter part than the bar density value (all are set to the maximum value), the bar density value including the density value of each pixel constituting the background image is used. The information of the dark part can be converted into information in a wide range (density value 0 to 255).

次に、上記のような第3の処理例としての処理の流れについて説明する。
図14は、上記バーコード認識装置1における第3の処理例の流れを説明するためのフローチャートである。
Next, a processing flow as the third processing example will be described.
FIG. 14 is a flowchart for explaining the flow of the third processing example in the barcode recognition apparatus 1.

上記カメラ2が撮像した12bit画像を取得すると(ステップS41)。上記画像インターフェース11は、取得した12bit画像を画像分析部12および画像変換部13へ供給する。上記画像インターフェース11から12bit画像が供給されると、上記画像分析部12は、上記媒体濃度推定部23により当該12bit画像におけるバー濃度値を判定する処理を行う(ステップS42およびS43)。ここでは、上述したようなパーセンタイル方式によりバー濃度値を判定するものとする。すなわち、上記バー濃度推定部24は、当該12bit画像における全画素の濃度分布を示すヒストグラムを作成する(ステップS42)。ヒストグラムを作成すると、上記バー濃度推定部24は、当該ヒストグラムによりバー濃度値を判定する(ステップS43)。すなわち、上記バー濃度推定部24は、当該ヒストグラムに対して最大濃度値「4095」から順に各濃度値までの積分した値を算出する。各濃度値までの積分値を算出するごとに、上記バー濃度推定部24は、積分値が所定の閾値以上であるか否かを判断する。この判断により積分値が所定の閾値以上であると判断した場合、上記バー濃度推定部24は、当該積分値が得られた濃度値を当該12bit画像におけるバー濃度値と判定する。   When a 12-bit image captured by the camera 2 is acquired (step S41). The image interface 11 supplies the acquired 12-bit image to the image analysis unit 12 and the image conversion unit 13. When a 12-bit image is supplied from the image interface 11, the image analysis unit 12 performs a process of determining a bar density value in the 12-bit image by the medium density estimation unit 23 (steps S42 and S43). Here, it is assumed that the bar density value is determined by the percentile method as described above. That is, the bar density estimation unit 24 creates a histogram indicating the density distribution of all pixels in the 12-bit image (step S42). When the histogram is created, the bar density estimation unit 24 determines the bar density value based on the histogram (step S43). That is, the bar density estimation unit 24 calculates an integrated value from the maximum density value “4095” to each density value in order with respect to the histogram. Each time the integrated value up to each density value is calculated, the bar density estimating unit 24 determines whether or not the integrated value is equal to or greater than a predetermined threshold value. If it is determined that the integrated value is greater than or equal to a predetermined threshold value, the bar density estimation unit 24 determines that the density value from which the integrated value is obtained is the bar density value in the 12-bit image.

上記バー濃度推定部24により当該12bit画像のバー濃度値が判定されると、上記変換方法決定部26は、当該バー濃度値に基づいて、当該12bit画像を認識処理用の8bit画像に変換するための画像変換方法を決定する(ステップS44及びS45)。すなわち、上記変換方法決定部26は、上記バー濃度推定部24により判定されたバー濃度値に応じた画像変換用の変換テーブルTbを作成する(ステップS44)。この変換テーブルは、たとえば、上述したように、最小濃度値(「0」)からバー濃度値までの線形変換を指定するものである。画像変換用の変換テーブルTbを作成すると、上記変換方法決定部26は、作成した変換テーブルTbを画像変換方法として上記画像変換部13に指定する(ステップS45)。   When the bar density value of the 12-bit image is determined by the bar density estimating unit 24, the conversion method determining unit 26 converts the 12-bit image into an 8-bit image for recognition processing based on the bar density value. The image conversion method is determined (steps S44 and S45). That is, the conversion method determination unit 26 creates a conversion table Tb for image conversion corresponding to the bar density value determined by the bar density estimation unit 24 (step S44). For example, as described above, this conversion table specifies linear conversion from the minimum density value (“0”) to the bar density value. When the conversion table Tb for image conversion is created, the conversion method determination unit 26 designates the created conversion table Tb as the image conversion method to the image conversion unit 13 (step S45).

上記画像分析部12の変換方法決定部26により当該12bit画像に対する画像変換方法(変換テーブル)が指定されると、上記画像変換部13は、指定された変換テーブルTbに従って当該12bit画像を8bit画像に変換する処理を行う(ステップS46)。指定された変換テーブルに基づく画像変換処理により生成された8bit画像は、上記画像変換部13から上記バー認識部14に供給される。
上記バー認識部14は、上記画像変換部13から供給された8bit画像に対してバーコードの認識処理を行う(ステップS47)。上記バー認識部14におけるバーコード認識処理では、たとえば、上述したように、バー候補の検出処理、バー識別処理、バーコードの復号処理、復号結果の判定処理などが行われる。上記バー認識部14は、バーコードの認識処理による処理結果を出力インターフェース16により外部に出力する(ステップS48)。
When an image conversion method (conversion table) for the 12-bit image is specified by the conversion method determination unit 26 of the image analysis unit 12, the image conversion unit 13 converts the 12-bit image into an 8-bit image according to the specified conversion table Tb. Conversion processing is performed (step S46). The 8-bit image generated by the image conversion process based on the specified conversion table is supplied from the image conversion unit 13 to the bar recognition unit 14.
The bar recognition unit 14 performs barcode recognition processing on the 8-bit image supplied from the image conversion unit 13 (step S47). In the barcode recognition process in the bar recognition unit 14, for example, as described above, a bar candidate detection process, a bar identification process, a barcode decoding process, a decoding result determination process, and the like are performed. The bar recognition unit 14 outputs the processing result of the barcode recognition process to the outside through the output interface 16 (step S48).

たとえば、バーコードの認識が成功した場合(認識結果が有効な情報であると判定された場合)、上記出力インターフェース16は、バーコードの認識結果を外部へ出力する。また、バーコードの認識が失敗した場合(認識結果が有効な情報でないと判定された場合)、上記出力インターフェース16は、バーコードの認識が失敗した旨を示す情報を外部へ出力する。なお、バーコードの認識が失敗した場合、後述する第5の処理例のように、バーコード認識処理の各工程で得られた情報を画像分析部12にフィードバックすることにより、当該入力画像に対する画像変換処理およびバーコード認識処理を再実行(リトライ)するようにしても良い。   For example, when the barcode recognition is successful (when it is determined that the recognition result is valid information), the output interface 16 outputs the barcode recognition result to the outside. When the barcode recognition fails (when it is determined that the recognition result is not valid information), the output interface 16 outputs information indicating that the barcode recognition has failed to the outside. If the barcode recognition fails, an image corresponding to the input image is fed back to the image analysis unit 12 with information obtained in each step of the barcode recognition processing as in a fifth processing example described later. The conversion process and the barcode recognition process may be re-executed (retry).

次に、第4の処理例について説明する。
この第4の処理例では、入力画像における背景(媒体)の濃度値とバーの濃度値との組合せに基づいて画像変換方法を決定するものである。言い換えると、第4の処理例は、第2の処理例で得られる媒体濃度値と第3の処理例で得られるバー濃度値とを組み合わせて画像変換方法を指定するための変換テーブルを作成するものである。
Next, a fourth processing example will be described.
In the fourth processing example, an image conversion method is determined based on a combination of a background (medium) density value and a bar density value in an input image. In other words, the fourth processing example creates a conversion table for designating an image conversion method by combining the medium density value obtained in the second processing example and the bar density value obtained in the third processing example. Is.

すなわち、この第4の処理例では、カメラ2が撮影した12bit画像に対して、上記媒体濃度推定部23により上記第2の処理例で説明したような媒体濃度値を判定し、さらに、上記バー濃度推定部24により上記第3の処理例で説明したようなバー濃度値を判定する。   That is, in the fourth processing example, the medium density estimation unit 23 determines the medium density value as described in the second processing example with respect to the 12-bit image captured by the camera 2, and further, the bar The density estimation unit 24 determines the bar density value as described in the third processing example.

たとえば、図8に示すような濃度ヒストグラムから図9に示すような媒体濃度値と図12に示すようなバー濃度値とが判定されたものとする。この場合、媒体濃度値に基づく変換テーブルTaは、図10に示すように、媒体濃度値から最大濃度値までを線形変換するものが得られる。バー濃度値に基づく変換テーブルTbは、図13に示すように、最小濃度値からバー濃度値までを線形変換するものが得られる。従って、第4の処理例では、上記変換テーブルTaと上記変換テーブルTbとを組み合わせることにより、媒体濃度値とバー濃度値とを考慮した変換テーブルTabが得られると考えられる。   For example, it is assumed that the medium density value as shown in FIG. 9 and the bar density value as shown in FIG. 12 are determined from the density histogram as shown in FIG. In this case, the conversion table Ta based on the medium density value is obtained by linearly converting the medium density value to the maximum density value as shown in FIG. As shown in FIG. 13, the conversion table Tb based on the bar density value is obtained by linear conversion from the minimum density value to the bar density value. Therefore, in the fourth processing example, it is considered that a conversion table Tab considering the medium density value and the bar density value can be obtained by combining the conversion table Ta and the conversion table Tb.

すなわち、上記変換方法決定部26は、上記媒体濃度推定部23により判定された媒体濃度値と上記バー濃度推定部24により判定されたバー濃度値とに基づいて変換テーブルTabを決定する。   That is, the conversion method determining unit 26 determines the conversion table Tab based on the medium density value determined by the medium density estimating unit 23 and the bar density value determined by the bar density estimating unit 24.

上記媒体濃度値と上記バー濃度値との組合せに基づく変換テーブルTabを決定する手法には、種々の手法が考えらえる。変換テーブルTabは、媒体濃度値からバー濃度値までの濃度変化を強調するようなものであれば良い。たとえば、変換テーブルTabは、上記媒体濃度値に基づく変換テーブルTaと上記バー濃度値に基づく変換テーブルTbとを足し合わせて平均化することにより作成しても良いし、媒体濃度値からバー濃度値までの濃度値を線形変換するような変換テーブルであっても良い。前者の場合、媒体濃度値からバー濃度値までの濃度変化を強調しつつ、媒体濃度値未満の濃度値における濃度変化およびバー濃度値以上の濃度値における濃度変化を反映させた画像変換処理が実施できる。また、後者の場合、媒体濃度値からバー濃度値までの濃度変化を最大限に強調(たとえば、256階調の「0」〜「255」に変換)させる画像変換が実施できる。さらに、前者と後者とを組み合わせて変換テーブルTabが決定されるようにしても良い。   Various methods are conceivable for determining the conversion table Tab based on the combination of the medium density value and the bar density value. The conversion table Tab only needs to emphasize density changes from the medium density value to the bar density value. For example, the conversion table Tab may be created by adding and averaging the conversion table Ta based on the medium density value and the conversion table Tb based on the bar density value, or from the medium density value to the bar density value. A conversion table that linearly converts the density values up to the above may be used. In the former case, image conversion processing that reflects density changes at density values less than the medium density value and density values above the bar density value while emphasizing density changes from the media density value to the bar density value is performed. it can. In the latter case, it is possible to perform image conversion in which the density change from the medium density value to the bar density value is enhanced to the maximum (for example, converted from “0” to “255” in 256 gradations). Furthermore, the conversion table Tab may be determined by combining the former and the latter.

次に、上記のような第4の処理例としての処理の流れについて説明する。
図15は、上記バーコード認識装置1における第4の処理例の流れを説明するためのフローチャートである。
Next, a processing flow as the fourth processing example will be described.
FIG. 15 is a flowchart for explaining the flow of the fourth processing example in the barcode recognition apparatus 1.

上記カメラ2が撮像した12bit画像を取得すると(ステップS51)。上記画像インターフェース11は、取得した12bit画像を画像分析部12および画像変換部13へ供給する。上記画像インターフェース11から12bit画像が供給されると、上記画像分析部12は、上記媒体濃度推定部23により当該12bit画像における媒体濃度値を判定するとともに(ステップS52およびS53)、上記バー濃度推定部24により当該12bit画像におけるバー濃度値を判定する(ステップS54)。   When a 12-bit image captured by the camera 2 is acquired (step S51). The image interface 11 supplies the acquired 12-bit image to the image analysis unit 12 and the image conversion unit 13. When a 12-bit image is supplied from the image interface 11, the image analysis unit 12 determines the medium density value in the 12-bit image by the medium density estimation unit 23 (steps S52 and S53), and the bar density estimation unit. 24 determines the bar density value in the 12-bit image (step S54).

当該12bit画像の媒体濃度値とバー濃度値とが判定されると、上記変換方法決定部26は、媒体濃度値とバー濃度値とに基づいて、当該12bit画像を認識処理用の8bit画像に変換するための画像変換方法を決定する(ステップS55及びS56)。すなわち、上記変換方法決定部26は、媒体濃度値とバー濃度値とに応じた画像変換用の変換テーブルTabを作成する(ステップS55)。この変換テーブルTabは、たとえば、上述したように、媒体濃度値からバー濃度値までの濃度変化を強調するような変換を指定するものである。画像変換用の変換テーブルTabを作成すると、上記変換方法決定部26は、作成した変換テーブルTabを画像変換方法として上記画像変換部13に指定する(ステップS56)。   When the medium density value and the bar density value of the 12-bit image are determined, the conversion method determining unit 26 converts the 12-bit image into an 8-bit image for recognition processing based on the medium density value and the bar density value. An image conversion method for determining the image is determined (steps S55 and S56). That is, the conversion method determination unit 26 creates a conversion table Tab for image conversion according to the medium density value and the bar density value (step S55). For example, as described above, the conversion table Tab designates conversion that emphasizes the density change from the medium density value to the bar density value. When the conversion table Tab for image conversion is created, the conversion method determination unit 26 designates the created conversion table Tab as the image conversion method to the image conversion unit 13 (step S56).

上記画像分析部12の変換方法決定部26により当該12bit画像に対する画像変換方法(変換テーブル)が指定されると、上記画像変換部13は、指定された変換テーブルTabに従って当該12bit画像を8bit画像に変換する処理を行う(ステップS57)。指定された変換テーブルに基づく画像変換処理により生成された8bit画像は、上記画像変換部13から上記バー認識部14に供給される。
上記バー認識部14は、上記画像変換部13から供給された8bit画像に対してバーコードの認識処理を行う(ステップS58)。上記バー認識部14におけるバーコード認識処理では、たとえば、上述したように、バー候補の検出処理、バー識別処理、バーコードの復号処理、復号結果の判定処理などが行われる。上記バー認識部14は、バーコードの認識処理による処理結果を出力インターフェース16により外部に出力する(ステップS59)。
When an image conversion method (conversion table) for the 12-bit image is specified by the conversion method determination unit 26 of the image analysis unit 12, the image conversion unit 13 converts the 12-bit image into an 8-bit image according to the specified conversion table Tab. Conversion processing is performed (step S57). The 8-bit image generated by the image conversion process based on the specified conversion table is supplied from the image conversion unit 13 to the bar recognition unit 14.
The bar recognition unit 14 performs barcode recognition processing on the 8-bit image supplied from the image conversion unit 13 (step S58). In the barcode recognition process in the bar recognition unit 14, for example, as described above, a bar candidate detection process, a bar identification process, a barcode decoding process, a decoding result determination process, and the like are performed. The bar recognition unit 14 outputs the processing result of the barcode recognition process to the outside through the output interface 16 (step S59).

たとえば、バーコードの認識が成功した場合(認識結果が有効な情報であると判定された場合)、上記出力インターフェース16は、バーコードの認識結果を外部へ出力する。また、バーコードの認識が失敗した場合(認識結果が有効な情報でないと判定された場合)、上記出力インターフェース16は、バーコードの認識が失敗した旨を示す情報を外部へ出力する。なお、バーコードの認識が失敗した場合、後述する第5の処理例のように、バーコード認識処理の各工程で得られた情報を画像分析部12にフィードバックすることにより、当該入力画像に対する画像変換処理およびバーコード認識処理を再実行するようにしても良い。   For example, when the barcode recognition is successful (when it is determined that the recognition result is valid information), the output interface 16 outputs the barcode recognition result to the outside. When the barcode recognition fails (when it is determined that the recognition result is not valid information), the output interface 16 outputs information indicating that the barcode recognition has failed to the outside. If the barcode recognition fails, an image corresponding to the input image is fed back to the image analysis unit 12 with information obtained in each step of the barcode recognition processing as in a fifth processing example described later. The conversion process and the barcode recognition process may be re-executed.

次に、第5の処理例について説明する。
この第5の処理例では、上記フィードバック部15により上記画像分析部12にフィードバックされた情報に基づいて画像変換処理およびバーコード認識処理を再実行(リトライ)するものである。また、第5の処理例では、上記画像分析部12がフィードバックされた情報に基づいて画像変換方法を決定する機能を有し、画像変換部13が再度入力画像を認識処理用の画像に変換する再変換の機能を有し、バー認識部14が再変換機能により得られた認識処理用の画像に基づいて再度バーコードの認識処理を実行する再試行機能を有する。
Next, a fifth processing example will be described.
In the fifth processing example, the image conversion process and the barcode recognition process are re-executed (retry) based on the information fed back to the image analysis unit 12 by the feedback unit 15. In the fifth processing example, the image analysis unit 12 has a function of determining an image conversion method based on the fed back information, and the image conversion unit 13 converts the input image into an image for recognition processing again. It has a re-conversion function, and the bar recognition unit 14 has a retry function for executing the barcode recognition process again based on the image for recognition processing obtained by the re-conversion function.

すなわち、第5の処理例では、上記バー認識部14によるバーコードの認識結果が有効でないと判定された場合、あるいは、バー認識部14によるバーコードの認識結果が誤りらしいと判定された場合、上記フィードバック部15は、バー認識処理の工程で得られた情報、あるいは、バー認識処理の工程で得られた情報から生成した情報をフィードバック情報として画像分析部12にフィードバックする。上記画像分析部12は、フィードバックされた情報に基づいて画像変換方法を再決定する。この場合、上記画像変換部13は、上記画像分析部12により指定されるフィードバック情報に基づく画像変換方法に従って再度入力画像を認識処理用の画像に変換する処理を実行する。この再変換された認識処理用の画像に対して、上記バー認識部14では、再度バーコード認識処理を行う。   That is, in the fifth processing example, when it is determined that the barcode recognition result by the bar recognition unit 14 is not valid, or when the barcode recognition result by the bar recognition unit 14 is determined to be erroneous, The feedback unit 15 feeds back the information obtained in the bar recognition processing step or the information generated from the information obtained in the bar recognition processing step to the image analysis unit 12 as feedback information. The image analysis unit 12 re-determines an image conversion method based on the fed back information. In this case, the image conversion unit 13 executes a process of converting the input image into an image for recognition processing again according to an image conversion method based on the feedback information specified by the image analysis unit 12. The bar recognition unit 14 performs barcode recognition processing again on the reconverted image for recognition processing.

次に、上記フィードバック情報について説明する。   Next, the feedback information will be described.

上述したように、上記フィードバック情報は、入力画像を認識処理用の画像に再変換するための画像変換方法を決定するための情報である。従って、上記フィードバック情報は、バーコードを精度良く認識できるような画像変換方法を判定するための情報である必要がある。ここでは、上記フィードバック情報は、バー認識処理の工程で得られた情報、あるいは、バー認識処理の工程で得られた情報から判定される情報であるものでとする。なお、バー認識処理の工程で得られた情報からフィードバック情報を判定する場合、フィードバック情報の判定処理は、上記バー認識部14が実行するようにしても良いし、上記フィードバック部15が実行するようにしても良し、上記画像分析部12が実行するようにしても良い。   As described above, the feedback information is information for determining an image conversion method for reconverting an input image into an image for recognition processing. Therefore, the feedback information needs to be information for determining an image conversion method that can accurately recognize a barcode. Here, it is assumed that the feedback information is information obtained in the bar recognition processing step or information determined from the information obtained in the bar recognition processing step. When feedback information is determined from the information obtained in the bar recognition process, the feedback information determination process may be executed by the bar recognition unit 14 or the feedback unit 15. Alternatively, the image analysis unit 12 may execute the process.

次に、フィードバック情報の第1の例について説明する。
まず、フィードバック情報の第1の例として、背景画像とバー画像とを分離するための最適な濃度値(分離閾値)を判定する処理(フィードバック情報の判定処理)について説明する。上記分離閾値は、バー認識処理の工程で得られた情報から判定される情報である。ここでは、上記フィードバック部15がバー認識処理の工程で得られた情報から分離閾値を判定することを想定して説明するものとする。
Next, a first example of feedback information will be described.
First, as a first example of feedback information, a process (feedback information determination process) for determining an optimum density value (separation threshold) for separating a background image and a bar image will be described. The separation threshold is information determined from information obtained in the bar recognition process. Here, it is assumed that the feedback unit 15 determines the separation threshold from the information obtained in the bar recognition process.

上記バー認識部14では、バーコード認識処理の一工程として、上述したようなバー候補の検出処理を行っている。バー候補の検出処理では、認識処理用の画像において背景画像の濃度値とバー画像の濃度値とが接近している場合、全てのバーをバー候補として確実に検出するのが難しい。逆に言えば、入力画像を背景画像の濃度値とバー画像の濃度値との濃度差が強調されるような認識処理用の画像に変換すれば、バー候補の検出精度が高くなると考えられる。上記フィードバック情報として分離閾値は、背景画像とバー画像との濃度差が強調されるような画像変換方法を決定するための情報である。   The bar recognition unit 14 performs bar candidate detection processing as described above as one step of barcode recognition processing. In the bar candidate detection process, when the density value of the background image and the density value of the bar image are close to each other in the image for recognition processing, it is difficult to reliably detect all the bars as bar candidates. In other words, if the input image is converted into an image for recognition processing in which the density difference between the density value of the background image and the density value of the bar image is emphasized, the bar candidate detection accuracy can be improved. The separation threshold as the feedback information is information for determining an image conversion method in which the density difference between the background image and the bar image is emphasized.

上記バー認識部14は、バー候補の検出処理において、全てのバーが検出できなかった場合であっても、一部のバーが検出できていることが多い。このような場合、バー認識部14は、検出したバー候補の領域を示す情報をフィードバック部15に供給する。上記フィードバック部15は、入力画像における検出されたバー候補の領域の画像に基づいて分離閾値を判定する。   In many cases, the bar recognizing unit 14 can detect some bars even if all bars cannot be detected in the bar candidate detection process. In such a case, the bar recognition unit 14 supplies information indicating the detected bar candidate area to the feedback unit 15. The feedback unit 15 determines the separation threshold based on the image of the detected bar candidate region in the input image.

たとえば、上記フィードバック部15は、バー候補の領域の画像からバー濃度値および背景画像の濃度値を判定し、その中間値を分離閾値と判定する。この場合、上記フィードバック部15は、入力画像からバー候補の領域の画像を抽出し、抽出したバー候補の領域の画像から得られる最頻濃度値あるいは平均濃度値などの濃度値をバー候補の画像の濃度値と判定する。背景画像の濃度値としては、上記第1〜第4の処理例で説明したように、入力画像全体から得られる最頻濃度値、平均値、パーセンタイル方式により判定される濃度値を用いることが可能である。   For example, the feedback unit 15 determines the bar density value and the density value of the background image from the image of the bar candidate area, and determines the intermediate value as the separation threshold. In this case, the feedback unit 15 extracts an image of a bar candidate area from the input image, and uses a density value such as a mode density value or an average density value obtained from the extracted bar candidate area image as a bar candidate image. The density value is determined. As the density value of the background image, as described in the first to fourth processing examples, it is possible to use the mode density value obtained from the entire input image, the average value, or the density value determined by the percentile method. It is.

なお、バーの形状および各バーの並び方(たとえば、バーの間隔)が所定の形態である場合、検出されたバー候補の画像領域から背景画像の領域を推定するようにしても良い。この場合、上記フィードバック部15は、バー候補の画像領域から背景画像の領域を推定し、入力画像から推定された背景画像の領域の画像を抽出し、抽出した背景画像から得られる最頻濃度値あるいは平均濃度値などの濃度値を背景画像の濃度値と判定するようにすれば良い。   Note that when the shape of the bars and the arrangement of the bars (for example, the interval between the bars) are in a predetermined form, the background image area may be estimated from the detected bar candidate image areas. In this case, the feedback unit 15 estimates the background image area from the bar candidate image area, extracts the background image area image estimated from the input image, and obtains the mode density value obtained from the extracted background image. Alternatively, a density value such as an average density value may be determined as the density value of the background image.

上記のように、少なくとも1つのバー候補が検出されている場合、当該バー候補の領域を示す情報に基づいて、入力画像におけるバーの濃度値あるいは背景画像の濃度値を推定することが可能である。少なくとも1つのバーがバー候補として検出されている場合、当該バー候補の領域から得られるバー濃度値は、画像全体の濃度ヒストグラムなどから判定されるバー濃度値よりも精度が高いと考えられる。   As described above, when at least one bar candidate is detected, it is possible to estimate the bar density value or the background image density value in the input image based on information indicating the bar candidate region. . When at least one bar is detected as a bar candidate, it is considered that the bar density value obtained from the bar candidate area is more accurate than the bar density value determined from the density histogram of the entire image.

上記のようなバー候補の領域を示す情報に基づいて判定された分離閾値は、画像分析部12へフィードバックされる。フィードバック情報として分離閾値が供給されると、上記画像分析部12は、フィードバックされた分離閾値を基準とした変換テーブルを作成する。分離閾値を基準とした変換テーブルは、背景画像とバー画像との濃度差を強調した認識処理用の画像が得られる画像変換方法を指定するものである。すなわち、画像分析部12は、入力画像において分離閾値の近傍の濃度値を広いレンジの濃度値に変換するような変換テーブルを作成する。   The separation threshold determined based on the information indicating the bar candidate area as described above is fed back to the image analysis unit 12. When a separation threshold value is supplied as feedback information, the image analysis unit 12 creates a conversion table based on the fed back separation threshold value. The conversion table based on the separation threshold specifies an image conversion method for obtaining an image for recognition processing in which the density difference between the background image and the bar image is emphasized. That is, the image analysis unit 12 creates a conversion table that converts density values near the separation threshold in the input image into a wide range of density values.

このような変換テーブルに基づく画像変換処理では、入力画像(たとえば、12bit画像)における分離閾値近傍の濃度変化が強調された認識処理用の画像(たとえば、8bit画像)が得られる。つまり、分離閾値は、背景画像とバー画像とを分離する濃度値である。このため、上記変換テーブルに基づく画像変換処理では、背景画像とバー画像との濃度差が強調された認識処理の画像が得られると考えられる。   In the image conversion process based on such a conversion table, an image for recognition processing (for example, 8-bit image) in which the density change near the separation threshold in the input image (for example, 12-bit image) is emphasized is obtained. That is, the separation threshold is a density value that separates the background image and the bar image. For this reason, it is considered that the image conversion process based on the conversion table provides a recognition process image in which the density difference between the background image and the bar image is emphasized.

図16は、分離閾値を基準とした変換テーブルの例を説明するための図である。
図16に示す例では、分離閾値前後の所定範囲の濃度値を広いレンジの濃度値に変換し、それ以外の濃度値を狭いレンジの濃度値に変換する。たとえば、図16に示すような変換テーブルでは、4096階調の入力画像を256階調の認識処理用の画像に変換する場合、濃度値が分離閾値−100〜分離閾値+100の画素を濃度値27〜227の画素に変換し、濃度値が分離閾値−100以下の画素を濃度値0〜27の画素に変換し、濃度値が分離閾値+100以上の濃度値の画素を濃度値227〜255の画素に変換するような画像変換を指定できる。この場合、入力画像における分離閾値の前後100の濃度変化が強調された認識処理用の画像が得られる。
FIG. 16 is a diagram for explaining an example of the conversion table based on the separation threshold.
In the example shown in FIG. 16, the density value in a predetermined range before and after the separation threshold is converted into a wide range of density values, and the other density values are converted into density values in a narrow range. For example, in the conversion table as shown in FIG. 16, when an input image with 4096 gradations is converted into an image for recognition processing with 256 gradations, pixels whose density values are separation threshold −100 to separation threshold +100 are density values 27. To a pixel having a density value of −100 or less, and a pixel having a density value of the separation value + 100 or more is converted to a pixel having a density value of 227 to 255. You can specify image conversion to convert to. In this case, an image for recognition processing in which the density change before and after the separation threshold in the input image is emphasized is obtained.

次に、フィードバック情報の第2の例について説明する。
フィードバック情報の第2の例としては、バーコード領域の候補内における濃度ヒストグラムを判定する処理について説明する。上記バーコード領域の候補は、バー認識処理の工程で得られる情報である。入力画像におけるバーコード領域候補の画像には、入力画像全体よりも背景のノイズが少なくなると予想される。背景のノイズとは、たとえば、背景画像あるいはバーコードとは無関係な画像であり、たとえば、パーコードのプリント面における印刷された広告などが想定される。つまり、入力画像におけるバーコード領域候補の画像を対象とした濃度ヒストグラムでは、入力画像全体を対象とした濃度ヒストグラムよりも、背景のノイズの影響を軽減できる可能性が高くなる。
Next, a second example of feedback information will be described.
As a second example of feedback information, a process for determining a density histogram in a barcode area candidate will be described. The barcode area candidate is information obtained in the bar recognition process. It is expected that the background area noise is less in the barcode area candidate image in the input image than in the entire input image. Background noise is, for example, an image irrelevant to a background image or a barcode, and for example, a printed advertisement on a printed surface of a percode is assumed. That is, the density histogram for the barcode area candidate image in the input image is more likely to reduce the influence of background noise than the density histogram for the entire input image.

上記バー認識部14では、バーコード認識処理の一工程として、検出したバー候補からバーコード領域の候補を検出する処理を行っている。たとえば、上記バー認識部14では、全てのバーが検出できなかった場合であっても、一部のバーが検出できていれば、バーコード領域、あるいは、バーコード領域の一部を検出できることが多い。このような場合、上記バー認識部14は、検出したバーコード領域を示す情報をフィードバック部15を介して画像分析部12に供給する。これにより、画像分析部12は、バーコード周辺の画像のみを対象とした濃度ヒストグラムを生成でき、その濃度ヒストグラムに応じた画像変換方法の決定を行うことができる。   The bar recognition unit 14 performs a process of detecting a barcode area candidate from the detected bar candidates as one step of the barcode recognition process. For example, the bar recognition unit 14 can detect a bar code area or a part of the bar code area as long as a part of the bars can be detected even if all the bars cannot be detected. Many. In such a case, the bar recognition unit 14 supplies information indicating the detected barcode area to the image analysis unit 12 via the feedback unit 15. Thereby, the image analysis unit 12 can generate a density histogram only for the image around the barcode, and can determine an image conversion method according to the density histogram.

上記画像分析部12では、第1〜第4の処理例で説明したように、濃度ヒストグラムを作成し、作成した濃度ヒストグラムから最頻濃度値、媒体濃度値あるいはバー濃度値などを判定する機能を有している。上記バー認識部14からバーコード領域を示す情報が得られた場合、上記画像分析部12は、入力画像におけるバーコード領域の画像を対象として、第1〜第4の処理例で説明したような処理が可能である。すなわち、上記画像分析部12は、バーコード領域から得られる最頻濃度値、媒体濃度値、バー濃度値、あるいは、媒体濃度値とバー濃度値との組み合わせに基づいて、画像変換方法を決定できる。   As described in the first to fourth processing examples, the image analysis unit 12 has a function of creating a density histogram and determining a mode density value, a medium density value, a bar density value, or the like from the created density histogram. Have. When the information indicating the barcode area is obtained from the bar recognition unit 14, the image analysis unit 12 targets the image of the barcode area in the input image as described in the first to fourth processing examples. Processing is possible. That is, the image analysis unit 12 can determine the image conversion method based on the mode density value, medium density value, bar density value, or combination of medium density value and bar density value obtained from the barcode area. .

次に、上記のような第5の処理例としての処理の流れについて説明する。
図17は、上記バーコード認識装置1における第5の処理例の流れを説明するためのフローチャートである。
上記カメラ2が撮像した入力画像(たとえば、4096階調の12bit画像)を入力画像として取得すると(ステップS61)。上記画像インターフェース11は、取得した入力画像を画像分析部12および画像変換部13へ供給する。上記画像インターフェース11から入力画像が供給されると、上記画像分析部12は、当該入力画像から得られる特徴を判定する画像分析処理を行う(ステップS62)。このステップS62の画像分析処理では、上記画像分析部12は、画像変換方法を決定するための情報として、入力画像全体から最頻濃度値、媒体濃度値、あるいは、バー濃度値を判定し、その判定した情報に基づいて変換テーブルなどの画像変換方法を決定する。このステップS62の処理としては、たとえば、第2〜第4の処理例で説明した処理(ステップS11−S21、S32−S35、S42−S45、S52−S56)が適用可能である。このため、ステップS62の処理については、詳細な説明を省略する。
Next, the flow of processing as the fifth processing example will be described.
FIG. 17 is a flowchart for explaining the flow of the fifth processing example in the barcode recognition apparatus 1.
When an input image (for example, a 4096 gradation 12-bit image) captured by the camera 2 is acquired as an input image (step S61). The image interface 11 supplies the acquired input image to the image analysis unit 12 and the image conversion unit 13. When an input image is supplied from the image interface 11, the image analysis unit 12 performs an image analysis process for determining features obtained from the input image (step S62). In the image analysis processing in step S62, the image analysis unit 12 determines the mode density value, the medium density value, or the bar density value from the entire input image as information for determining the image conversion method. An image conversion method such as a conversion table is determined based on the determined information. For example, the processing described in the second to fourth processing examples (steps S11 to S21, S32 to S35, S42 to S45, and S52 to S56) can be applied as the processing of step S62. For this reason, detailed description of the processing in step S62 is omitted.

上記画像分析部12により画像変換方法が指定されると、上記画像変換部13は、画像分析部12により指定された画像変換方法に従って入力画像を認識処理用の画像(例えば、256階調の8bit画像)に変換する処理を行う(ステップS63)。この画像変換処理の結果として得られる認識処理用の画像は、画像変換部13からバー認識部14に供給される。上記バー認識部14は、画像変換部13から供給された認識処理用の画像に対してバーコード認識処理を実行する(ステップS64)。   When the image conversion method is specified by the image analysis unit 12, the image conversion unit 13 converts the input image into an image for recognition processing (for example, 8 bits of 256 gradations) according to the image conversion method specified by the image analysis unit 12. (Image) is converted (step S63). An image for recognition processing obtained as a result of this image conversion processing is supplied from the image conversion unit 13 to the bar recognition unit 14. The bar recognition unit 14 performs barcode recognition processing on the image for recognition processing supplied from the image conversion unit 13 (step S64).

なお、ステップS61、S62に続いて実行されるステップS63の画像変換処理が、第1の画像変換方法による画像変換処理に対応し、これを実行する画像変換部13が第1の画像変換部に相当している。また、ステップS61−S63に続いて実行されるステップS64のバーコード認識処理が、第1のバーコード認識処理に対応し、これを実行するバー認識部14が第1のバー認識部に相当している。   Note that the image conversion process of step S63 executed subsequent to steps S61 and S62 corresponds to the image conversion process by the first image conversion method, and the image conversion unit 13 that executes this is the first image conversion unit. It corresponds. Further, the barcode recognition process of step S64 executed subsequent to steps S61 to S63 corresponds to the first barcode recognition process, and the bar recognition unit 14 that executes this corresponds to the first bar recognition unit. ing.

上記バー認識部14におけるバーコード認識処理では、たとえば、上述したように、バー候補の検出処理、バー識別処理、バーコードの復号処理、復号結果の判定処理などが行われる。ここで、バーコードの復号処理の結果を得るまでの処理をバーコード認識処理とすると、上記バー認識部14は、バーコード認識処理により得られた認識結果(復号結果)が有効な情報であるか否かを判定する認識結果(復号結果)の判定処理を行う(ステップS65)。   In the barcode recognition process in the bar recognition unit 14, for example, as described above, a bar candidate detection process, a bar identification process, a barcode decoding process, a decoding result determination process, and the like are performed. Here, assuming that the process up to obtaining the result of the barcode decoding process is the barcode recognition process, the bar recognition unit 14 has valid information obtained by the barcode recognition process (decoding result). Whether or not the recognition result (decoding result) is determined is determined (step S65).

この認識結果の判定処理では、バーコード認識処理の認識結果が所望の情報であるか否かを判定する。たとえば、バーコードの認識結果が所定桁数の情報であるか否かにより認識結果が有効であるか否かを判定する。また、バーコードの認識結果が図示しない辞書データベースに登録されている情報と一致するか否かにより認識結果が有効であるか否かを判定するようにしても良い。上記バーコード認識処理により得られた認識結果が有効であると判定した場合(ステップS65、YES)、上記バー認識部14は、バーコードの認識処理による処理結果を出力インターフェース16により外部に出力する(ステップS66)。   In the recognition result determination process, it is determined whether the recognition result of the barcode recognition process is desired information. For example, whether or not the recognition result is valid is determined based on whether or not the barcode recognition result is information of a predetermined number of digits. Further, whether or not the recognition result is valid may be determined based on whether or not the barcode recognition result matches information registered in a dictionary database (not shown). When it is determined that the recognition result obtained by the barcode recognition process is valid (YES in step S65), the bar recognition unit 14 outputs the processing result of the barcode recognition process to the outside through the output interface 16. (Step S66).

上記バーコード認識処理により得られた認識結果が有効でないと判定した場合(ステップS65、NO)、上記バー認識部14は、さらに、当該画像に対するバーコードの認識処理がリトライ可能か否かを判定する(ステップS67)。バーコード認識処理のリトライは、たとえば、リトライの回数が制限されるようにしても良いし、当該入力画像に対する全処理時間が制限されるようにしても良い。上記判定によりリトライ不可と判定した場合(ステップS67、NO)、上記バー認識部14は、上記出力インターフェース16によりバーコードの認識が失敗した旨を示す情報を外部へ出力する。   When it is determined that the recognition result obtained by the barcode recognition process is not valid (NO in step S65), the bar recognition unit 14 further determines whether or not the barcode recognition process for the image can be retried. (Step S67). For the retry of the barcode recognition process, for example, the number of retries may be limited, or the total processing time for the input image may be limited. If it is determined that the retry is impossible by the above determination (NO in step S67), the bar recognition unit 14 outputs information indicating that the barcode recognition has failed through the output interface 16 to the outside.

上記判定によりリトライ可能と判定した場合(ステップS67、YES)、上記バー認識部14は、当該画像に対するバーコードの認識処理を再実行すると判断する。バーコード認識処理を再実行すると判断した場合、上記バー認識部14あるいは上記フィードバック部15は、当該画像に対するバー認識処理の過程で得られた情報あるいはそれらの情報から判定される情報をフィードバック情報として画像分析部12にフィードバックする処理を行う(ステップS68及びS69)。ここでは、フィードバック部15がバー認識処理の過程で得られた情報からフィードバック情報を判定するものとする。この場合、上記フィードバック部15は、上記バー認識部14からバー認識処理の過程で得られた情報を取得し、フィードバック情報を判定する(ステップS68)。たとえば、背景とバーとの分離閾値をフィードバック情報とする場合、上記フィードバック部15は、上述したように、バー認識部14からバー候補の領域を示す情報を取得し、取得したバー候補の領域を示す情報に基づいて分離閾値を判定する。   If it is determined that retry is possible based on the above determination (step S67, YES), the bar recognition unit 14 determines to re-execute the barcode recognition processing for the image. When it is determined that the barcode recognition process is to be re-executed, the bar recognition unit 14 or the feedback unit 15 uses the information obtained in the process of the bar recognition process for the image or information determined from the information as feedback information. A process of feeding back to the image analysis unit 12 is performed (steps S68 and S69). Here, it is assumed that the feedback unit 15 determines feedback information from information obtained in the process of bar recognition processing. In this case, the feedback unit 15 acquires information obtained during the bar recognition process from the bar recognition unit 14, and determines feedback information (step S68). For example, when the separation threshold between the background and the bar is used as feedback information, the feedback unit 15 acquires information indicating the bar candidate area from the bar recognition unit 14 as described above, and the acquired bar candidate area The separation threshold is determined based on the indicated information.

フィードバック情報を判定すると、上記フィードバック部15は、画像分析部12にフィードバック情報をフィードバックする。フィードバック情報がフィードバックされると、上記画像分析部12は、当該フィードバック情報に基づいて当該入力画像に対する画像分析処理を実行する(ステップS70)。この画像分析処理では、フィードバック情報に基づいて、当該入力画像に対する画像変換方法を決定する。このようなフィードバック情報に基づいて決定された画像変換方法は、上記画像変換部13に対して指定される。フィードバック情報に基づく画像変換方法が画像変換部13に指定されると、画像変換部13およびバー認識部14などは、上述したステップS63からの処理を再び実行する。   When the feedback information is determined, the feedback unit 15 feeds back the feedback information to the image analysis unit 12. When the feedback information is fed back, the image analysis unit 12 performs an image analysis process on the input image based on the feedback information (step S70). In this image analysis process, an image conversion method for the input image is determined based on the feedback information. The image conversion method determined based on such feedback information is designated to the image conversion unit 13. When the image conversion method based on the feedback information is designated to the image conversion unit 13, the image conversion unit 13, the bar recognition unit 14, and the like again execute the processing from step S63 described above.

なお、ステップS68−S70に続いて実行されるステップS63の画像変換処理が、第2の画像変換方法による画像変換処理に対応し、これを実行する画像変換部13が第2の画像変換部に相当している。また、ステップS68−S70、S63に続いて実行されるステップS64のバーコード認識処理が、第2のバーコード認識処理に対応し、これを実行するバー認識部14が第2のバー認識部に相当している。   Note that the image conversion process of step S63 executed subsequent to steps S68-S70 corresponds to the image conversion process by the second image conversion method, and the image conversion unit 13 that executes this is the second image conversion unit. It corresponds. In addition, the barcode recognition process in step S64 executed subsequent to steps S68-S70 and S63 corresponds to the second barcode recognition process, and the bar recognition unit 14 that executes the barcode recognition process becomes the second bar recognition unit. It corresponds.

上記のような第5の処理例では、所定のバーコード認識処理では有効なバーコード認識結果が得られなかった場合であったも、バーコードの認識処理の過程で得られた情報に基づいて当該入力画像を分析し、入力画像を認識処理用の画像に変換するための最適な画像変換方法を決定することができる。すなわち、第5の処理例では、第1段階のバーコード認識処理で有効な認識結果が得られなかった場合であっても、高精度でバーコードの認識結果を得ることが可能な第2段階のバーコード認識処理を実行することが可能である。   In the fifth processing example as described above, a valid barcode recognition result is not obtained in the predetermined barcode recognition processing, but based on information obtained in the process of barcode recognition processing. By analyzing the input image, an optimal image conversion method for converting the input image into an image for recognition processing can be determined. That is, in the fifth processing example, even if a valid recognition result cannot be obtained by the first-stage barcode recognition process, the second stage can obtain a barcode recognition result with high accuracy. It is possible to execute the barcode recognition process.

また、上記第5の処理例では、第1段階のバーコード認識処理で認識できなかった入力画像に対して、第2段階のバーコード認識処理により高精度なバーコード認識処理を実行するようになっている。従って、第5の処理例において、第1段階のバーコード認識処理は、上述した処理手順に限定されることなく、様々な処理手順による認識処理を行うようにすることが可能である。たとえば、第5の処理例としては、上記ステップS62を省略し、所定の画像変換方法で変換された画像により第1段階のバーコード認識処理を行うようにしても良い。この場合も、第2段階のバーコード認識処理では、第1段階のバーコード認識処理でバーコードの認識に失敗した入力画像に対して、第1段階のバーコード認識処理で得られた情報を用いて最適化された画像変換方法により入力画像を認識処理用の画像に変換し、その変換した画像に対してバーコード認識処理を実行できる。   In the fifth processing example, a high-precision barcode recognition process is executed by the second-stage barcode recognition process on the input image that cannot be recognized by the first-stage barcode recognition process. It has become. Therefore, in the fifth processing example, the first stage barcode recognition process is not limited to the above-described processing procedure, and can be performed by various processing procedures. For example, as a fifth processing example, step S62 may be omitted, and the first-stage barcode recognition process may be performed using an image converted by a predetermined image conversion method. Also in this case, in the second stage barcode recognition process, the information obtained in the first stage barcode recognition process is applied to the input image that has failed to be recognized in the first stage barcode recognition process. The input image can be converted into an image for recognition processing by the image conversion method optimized by using the method, and the barcode recognition processing can be executed on the converted image.

[1]
検知対象の画像を含む入力画像を取得する画像取得部と、
前記画像取得部により取得した入力画像を分析し、その分析結果に基づいて当該入力画像を認識処理用の形式の画像に変換するための画像変換方法を決定する画像分析部と、
前記画像分析部により決定された画像変換方法により前記画像取得部により取得した入力画像を認識処理用の画像に変換する画像変換部と、
前記画像変換部により得られた認識処理用の画像に対して検知対象の認識処理を行う検知対象認識部と、
を有することを特徴とする被対象認識装置。
[1]
An image acquisition unit for acquiring an input image including an image to be detected;
An image analysis unit that analyzes an input image acquired by the image acquisition unit and determines an image conversion method for converting the input image into an image in a format for recognition processing based on the analysis result;
An image conversion unit that converts an input image acquired by the image acquisition unit into an image for recognition processing by the image conversion method determined by the image analysis unit;
A detection target recognition unit that performs recognition processing of a detection target on the image for recognition processing obtained by the image conversion unit;
An object recognition apparatus comprising:

[2]
前記画像変換部は、複数種類の画像変換方法により入力画像を認識処理用の画像に変換する機能を有し、
前記画像分析部は、前記画像取得部により取得した入力画像の分析結果に基づいて、前記画像変換部が有している複数種類の画像変換方法から少なくとも1つの画像変換方法を選択する、
ことを特徴とする前記[1]に記載の被対象認識装置。
[2]
The image conversion unit has a function of converting an input image into an image for recognition processing by a plurality of types of image conversion methods;
The image analysis unit selects at least one image conversion method from a plurality of types of image conversion methods that the image conversion unit has, based on the analysis result of the input image acquired by the image acquisition unit.
The object recognition device according to [1] above, wherein

[3]
前記画像分析部は、前記画像取得部により取得した入力画像に含まれる背景画像の濃度値を判定し、判定した背景画像の濃度値に基づいて当該入力画像に対する画像変換方法を決定する、
ことを特徴とする前記[1]に記載の被対象認識装置。
[3]
The image analysis unit determines a density value of a background image included in the input image acquired by the image acquisition unit, and determines an image conversion method for the input image based on the determined density value of the background image;
The object recognition device according to [1] above, wherein

[4]
前記画像分析部は、前記画像取得部により取得した入力画像に含まれる検知対象を構成する検知要素画像の濃度値を判定し、判定した検知要素画像の濃度値に基づいて当該入力画像に対する画像変換方法を決定する、
ことを特徴とする前記[1]に記載の被対象認識装置。
[4]
The image analysis unit determines a density value of a detection element image constituting a detection target included in the input image acquired by the image acquisition unit, and performs image conversion on the input image based on the determined density value of the detection element image Decide how,
The object recognition device according to [1] above, wherein

[5]
前記画像分析部は、前記画像取得部により取得した入力画像に含まれる背景画像の濃度値と検知対象を構成する検知要素画像の濃度値とを判定し、判定した背景画像の濃度値と検知要素画像の濃度値とに基づいて当該入力画像に対する画像変換方法を決定する、
ことを特徴とする前記[1]に記載の被対象認識装置。
[5]
The image analysis unit determines a density value of a background image included in the input image acquired by the image acquisition unit and a density value of a detection element image constituting a detection target, and determines the density value of the determined background image and the detection element Determining an image conversion method for the input image based on the density value of the image;
The object recognition device according to [1] above, wherein

[6]
検知対象の画像を含む入力画像を取得する画像取得部と、
前記画像取得部により取得した入力画像を認識処理用の形式の画像に変換する第1の画像変換部と、
前記第1の画像変換部により得られた認識処理用の画像に対して検知対象の認識処理を行う第1の検知対象認識部と、
前記第1の検知対象認識部による検知対象の認識が失敗した場合、前記第1の検知対象認識部における検知対象の認識処理の過程で得られた情報に基づいて当該入力画像を分析し、その分析結果に基づいて入力画像を認識処理用の画像に再変換するための画像変換方法を決定する画像分析部と、
前記画像分析部による分析結果に基づいて、当該入力画像を認識処理用の画像に再変換する第2の画像変換部と、
前記第2の画像変換部により得られた認識処理用の画像に対して検知対象の認識処理を行う第2の検知対象認識部と、
を有することを特徴とする被対象認識装置。
[6]
An image acquisition unit for acquiring an input image including an image to be detected;
A first image conversion unit that converts the input image acquired by the image acquisition unit into an image in a format for recognition processing;
A first detection target recognition unit that performs a detection target recognition process on the recognition processing image obtained by the first image conversion unit;
When recognition of the detection target by the first detection target recognition unit fails, the input image is analyzed based on information obtained in the process of recognition processing of the detection target by the first detection target recognition unit, An image analysis unit that determines an image conversion method for reconverting the input image into an image for recognition processing based on the analysis result;
A second image conversion unit that reconverts the input image into an image for recognition processing based on an analysis result by the image analysis unit;
A second detection target recognition unit that performs a detection target recognition process on the recognition processing image obtained by the second image conversion unit;
An object recognition apparatus comprising:

[7]
被対象認識装置に用いられる被対象認識方法であって、
検知対象の画像を含む入力画像を取得し、
前記取得した入力画像を画像分析し、
前記入力画像に対する分析結果に基づいて当該入力画像を認識処理用の形式の画像に変換するための画像変換方法を決定し、
前記決定された画像変換方法により前記入力画像を認識処理用の画像に変換し、
前記変換により得られた認識処理用の画像に対して検知対象の認識処理を行う、
ことを特徴とする被対象認識方法。
[7]
A target recognition method used in a target recognition device,
Obtain an input image containing the image to be detected,
Image analysis of the acquired input image,
Determining an image conversion method for converting the input image into an image of a format for recognition processing based on an analysis result of the input image;
Converting the input image into an image for recognition processing by the determined image conversion method;
Recognizing the detection target for the image for recognition processing obtained by the conversion,
An object recognition method characterized by the above.

[8]
前記画像変換としては、入力画像を認識処理用の画像に変換するための複数種類の画像変換方法が実行可能であり、
前記画像変換方法の決定は、前記入力画像の分析結果に基づいて、前記画像変換として実行可能な複数種類の画像変換方法から少なくとも1つの画像変換方法を選択する、
ことを特徴とする前記[7]に記載の被対象認識方法。
[8]
As the image conversion, a plurality of types of image conversion methods for converting an input image into an image for recognition processing can be executed.
The determination of the image conversion method is to select at least one image conversion method from a plurality of types of image conversion methods that can be executed as the image conversion based on the analysis result of the input image.
The object recognition method according to [7], wherein the object is recognized.

[9]
前記画像分析は、前記入力画像に含まれる背景画像の濃度値を判定し、
前記画像変換方法の決定は、前記画像分析により判定された背景画像の濃度値に基づいて当該入力画像に対する画像変換方法を決定する、
ことを特徴とする前記[7]に記載の被対象認識方法。
[9]
The image analysis determines a density value of a background image included in the input image,
The determination of the image conversion method determines an image conversion method for the input image based on a density value of a background image determined by the image analysis.
The object recognition method according to [7], wherein the object is recognized.

[10]
前記画像分析は、前記入力画像に含まれる検知対象を構成する検知要素画像の濃度値を判定し、
前記画像変換方法の決定は、前記画像分析により判定された検知要素画像の濃度値に基づいて当該入力画像に対する画像変換方法を決定する、
ことを特徴とする前記[7]に記載の被対象認識方法。
[10]
The image analysis determines a density value of a detection element image constituting a detection target included in the input image,
The determination of the image conversion method determines an image conversion method for the input image based on a density value of the detection element image determined by the image analysis.
The object recognition method according to [7], wherein the object is recognized.

[11]
前記画像分析は、前記入力画像に含まれる背景画像の濃度値と検知対象を構成する検知要素画像の濃度値とを判定し、
前記画像変換方法の決定は、前記画像分析により判定された背景画像の濃度値と検知要素画像の濃度値とに基づいて当該入力画像に対する画像変換方法を決定する、
ことを特徴とする前記[7]に記載の被対象認識方法。
[11]
The image analysis determines a density value of a background image included in the input image and a density value of a detection element image constituting a detection target;
The determination of the image conversion method determines an image conversion method for the input image based on the density value of the background image and the density value of the detection element image determined by the image analysis.
The object recognition method according to [7], wherein the object is recognized.

[12]
被対象認識装置に用いられる被対象認識方法であって、
検知対象の画像を含む入力画像を取得し、
前記入力画像を認識処理用の形式の画像に第1の画像変換方法により変換し、
前記第1の画像変換方法により得られた認識処理用の画像に対して検知対象の認識処理を行い、
前記検知対象の認識が失敗した場合、前記検知対象の認識処理の過程で得られた情報に基づいて当該入力画像を分析し、
前記入力画像に対する分析結果に基づいて入力画像を認識処理用の画像に再変換するための第2の画像変換方法を決定し、
前記第2の画像変換方法により当該入力画像を認識処理用の画像に再変換し、
前記再変換により得られた認識処理用の画像に対して検知対象の認識処理を再度実行する、
ことを特徴とする被対象認識方法。
[12]
A target recognition method used in a target recognition device,
Obtain an input image containing the image to be detected,
Converting the input image into an image in a format for recognition processing by the first image conversion method;
A recognition target recognition process is performed on the recognition process image obtained by the first image conversion method,
When the recognition of the detection target fails, the input image is analyzed based on the information obtained in the process of recognition processing of the detection target,
Determining a second image conversion method for reconverting the input image into an image for recognition processing based on the analysis result of the input image;
Re-converting the input image into an image for recognition processing by the second image conversion method;
Re-execute the recognition processing of the detection target on the recognition processing image obtained by the reconversion,
An object recognition method characterized by the above.

1…バーコード認識装置、2…カメラ、11…画像インターフェース、12…画像分析部、13…画像変換部、14…バー認識部、15…フィードバック部、16…出力インターフェース、21…濃度値推定部、22…変換方法決定部、23…媒体濃度推定部、24…バー濃度推定部、26…変換方法決定部、31…制御装置、32…供給装置、33…搬送装置、34…区分装置、41…バー濃度推定部、42…媒体濃度推定部   DESCRIPTION OF SYMBOLS 1 ... Barcode recognition apparatus, 2 ... Camera, 11 ... Image interface, 12 ... Image analysis part, 13 ... Image conversion part, 14 ... Bar recognition part, 15 ... Feedback part, 16 ... Output interface, 21 ... Density value estimation part , 22 ... Conversion method determining unit, 23 ... Medium density estimating unit, 24 ... Bar density estimating unit, 26 ... Conversion method determining unit, 31 ... Control device, 32 ... Feeding device, 33 ... Conveying device, 34 ... Sorting device, 41 ... Bar density estimation part, 42 ... Medium density estimation part

Claims (15)

検知対象の画像を含む入力画像を取得する画像取得部と、
前記画像取得部により取得した入力画像に対して検知対象の認識処理を行う第1の検知対象認識部と、
前記第1の検知対象認識部による検知対象の認識が失敗した場合、前記第1の検知対象認識部における検知対象の認識処理の過程で得られた情報に基づいて前記入力画像を認識処理用の画像に再変換するための画像変換方法を決定する画像分析部と、
前記画像分析部により決定した画像変換方法で前記入力画像を認識処理用の画像に変換する画像変換部と、
前記画像変換部により得られた認識処理用の画像に対して検知対象の認識処理を行う第2の検知対象認識部と、
を有する被対象認識装置。
An image acquisition unit for acquiring an input image including an image to be detected;
A first detection target recognition unit that performs detection target recognition processing on the input image acquired by the image acquisition unit;
When recognition of the detection target by the first detection target recognition unit fails, the input image is used for recognition processing based on information obtained in the process of recognition processing of the detection target by the first detection target recognition unit. An image analysis unit for determining an image conversion method for re-converting into an image;
An image conversion unit that converts the input image into an image for recognition processing by the image conversion method determined by the image analysis unit;
A second detection target recognition unit that performs a detection target recognition process on the recognition processing image obtained by the image conversion unit;
A target recognition device having
前記第1の検知対象認識部による検知対象の認識が失敗した場合、前記第1の検知対象認識部における検知対象の認識処理の過程で得られた情報からフィードバック情報を判定するフィードバック部を有し、
前記画像分析部は、前記フィードバック部が判定したフィードバック情報に基づいて画像変換方法を決定する、
前記請求項1に記載の被対象認識装置。
A feedback unit that determines feedback information from information obtained in the process of recognition processing of the detection target in the first detection target recognition unit when recognition of the detection target by the first detection target recognition unit fails; ,
The image analysis unit determines an image conversion method based on feedback information determined by the feedback unit;
The subject recognition apparatus according to claim 1.
前記フィードバック情報は、前記入力画像における背景画像と検知対象を構成する検知要素画像とを分離するための分離閾値である、
前記請求項2に記載の被対象認識装置。
The feedback information is a separation threshold for separating a background image in the input image and a detection element image constituting a detection target.
The subject recognition apparatus according to claim 2.
前記画像分析部は、前記フィードバック情報としての前記分離閾値を基準に基づいて画像変換方法を決定する、
前記請求項3に記載の被対象認識装置。
The image analysis unit determines an image conversion method based on the separation threshold as the feedback information;
The subject recognition apparatus according to claim 3.
前記画像分析部は、前記フィードバック情報としての前記分離閾値を基準として作成した変換テーブルに基づいて画像変換方法を決定する、
前記請求項4に記載の被対象認識装置。
The image analysis unit determines an image conversion method based on a conversion table created based on the separation threshold as the feedback information;
The subject recognition apparatus according to claim 4.
前記フィードバック情報は、前記入力画像における検知対象の画像領域候補の画像における濃度ヒストグラムである、
前記請求項2に記載の被対象認識装置。
The feedback information is a density histogram in an image of an image region candidate to be detected in the input image.
The subject recognition apparatus according to claim 2.
前記画像分析部は、前記フィードバック情報としての前記濃度ヒストグラムから検出する複数種類の濃度値に基づいて前記入力画像を認識処理用の画像に再変換するための画像変換方法を決定する、
ことを特徴とする前記請求項6に記載の被対象認識装置。
The image analysis unit determines an image conversion method for reconverting the input image into an image for recognition processing based on a plurality of types of density values detected from the density histogram as the feedback information.
The object recognition apparatus according to claim 6, wherein:
被対象認識装置に用いられる被対象認識方法であって、
検知対象の画像を含む入力画像を取得し、
前記入力画像に対して検知対象を認識する第1の認識処理を行い、
前記第1の認識処理による検知対象の認識が失敗した場合、前記第1の認識処理の過程で得られた情報に基づいて前記入力画像を認識処理用の画像に変換するための画像変換方法を決定し、
前記決定した画像変換方法で前記入力画像を認識処理用の画像に変換し、
前記画像変換方法による画像変換で得られた認識処理用の画像に対して検知対象を認識する第2の認識処理を行う、
被対象認識方法。
A target recognition method used in a target recognition device,
Obtain an input image containing the image to be detected,
Performing a first recognition process for recognizing a detection target for the input image;
An image conversion method for converting the input image into an image for recognition processing based on information obtained in the course of the first recognition processing when recognition of a detection target by the first recognition processing fails. Decide
The input image is converted into an image for recognition processing by the determined image conversion method,
Performing a second recognition process for recognizing a detection target on an image for recognition processing obtained by image conversion by the image conversion method;
Object recognition method.
さらに、前記第1の認識処理による検知対象の認識が失敗した場合、前記画像変換方法を決定するためのフィードバック情報を前記第1の認識処理の過程で得られた情報から判定し、
前記画像変換方法は、前記判定したフィードバック情報に基づいて決定する、
前記請求項1に記載の被対象認識方法。
Further, when the recognition of the detection target by the first recognition process fails, feedback information for determining the image conversion method is determined from information obtained in the course of the first recognition process,
The image conversion method is determined based on the determined feedback information.
The object recognition method according to claim 1.
前記フィードバック情報は、前記入力画像における背景画像と検知対象を構成する検知要素画像とを分離するための分離閾値である、
前記請求項2に記載の被対象認識方法。
The feedback information is a separation threshold for separating a background image in the input image and a detection element image constituting a detection target.
The object recognition method according to claim 2.
前記画像変換方法は、前記フィードバック情報としての前記分離閾値に基づいて決定する、
前記請求項3に記載の被対象認識方法。
The image conversion method is determined based on the separation threshold as the feedback information.
The object recognition method according to claim 3.
前記画像変換方法は、前記フィードバック情報としての前記分離閾値を基準として作成した変換テーブルに基づいて決定する、
前記請求項4に記載の被対象認識方法。
The image conversion method is determined based on a conversion table created based on the separation threshold as the feedback information.
The subject recognition method according to claim 4.
前記フィードバック情報は、前記入力画像における検知対象の画像領域候補の画像における濃度ヒストグラムである、
前記請求項2に記載の被対象認識方法。
The feedback information is a density histogram in an image of an image region candidate to be detected in the input image.
The object recognition method according to claim 2.
前記画像変換方法は、前記フィードバック情報としての前記濃度ヒストグラムから検出する複数種類の濃度値に基づいて決定する、
前記請求項6に記載の被対象認識方法。
The image conversion method is determined based on a plurality of types of density values detected from the density histogram as the feedback information.
The object recognition method according to claim 6.
入力画像に対する検知対象の認識処理で得られる情報に基づいて画像変換方法を決定する画像分析部と、
前記画像分析部により決定した画像変換方法で変換した入力画像に対して検知対象の認識処理を行う検知対象認識部と、
を有する被対象認識装置。
An image analysis unit that determines an image conversion method based on information obtained by recognition processing of a detection target for an input image;
A detection target recognition unit that performs recognition processing of a detection target on an input image converted by the image conversion method determined by the image analysis unit;
A target recognition device having
JP2012259563A 2012-11-28 2012-11-28 Targeted object recognition device and targeted object recognition method Pending JP2013077306A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012259563A JP2013077306A (en) 2012-11-28 2012-11-28 Targeted object recognition device and targeted object recognition method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012259563A JP2013077306A (en) 2012-11-28 2012-11-28 Targeted object recognition device and targeted object recognition method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2008151828A Division JP5148375B2 (en) 2008-06-10 2008-06-10 Object recognition device and object recognition method

Publications (1)

Publication Number Publication Date
JP2013077306A true JP2013077306A (en) 2013-04-25

Family

ID=48480672

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012259563A Pending JP2013077306A (en) 2012-11-28 2012-11-28 Targeted object recognition device and targeted object recognition method

Country Status (1)

Country Link
JP (1) JP2013077306A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7430554B2 (en) 2020-03-19 2024-02-13 株式会社キーエンス Optical information reading device, optical information reading method, optical information reading program, computer readable recording medium, and recording device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008017259A (en) * 2006-07-07 2008-01-24 Matsushita Electric Ind Co Ltd Image recognition camera

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008017259A (en) * 2006-07-07 2008-01-24 Matsushita Electric Ind Co Ltd Image recognition camera

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7430554B2 (en) 2020-03-19 2024-02-13 株式会社キーエンス Optical information reading device, optical information reading method, optical information reading program, computer readable recording medium, and recording device

Similar Documents

Publication Publication Date Title
JP5148375B2 (en) Object recognition device and object recognition method
JP5214330B2 (en) Image processing apparatus, barcode processing apparatus, and image processing method
JP4911340B2 (en) Two-dimensional code detection system and two-dimensional code detection program
KR101783337B1 (en) Methods and apparatus to extract text from imaged documents
EP1330111B1 (en) Automatic image quality evaluation and correction technique
EP2169629B1 (en) Information recognition processing apparatus and information recognition processing method
JP6869208B2 (en) Photoelectric cord reader and optical cord reading method
JP2009157817A (en) Bar code processing apparatus, sorting apparatus and bar code processing method
CN110210467B (en) Formula positioning method of text image, image processing device and storage medium
US20140086473A1 (en) Image processing device, an image processing method and a program to be used to implement the image processing
US20190080130A1 (en) Barcode Identification Method for Improving Decoding Reliability by Correcting Image Distortion
US8503785B2 (en) Dynamic response bubble attribute compensation
US11430235B2 (en) Image processing apparatus, image processing method, and storage medium
JP5630689B2 (en) Character recognition method and character recognition device
JP2013077306A (en) Targeted object recognition device and targeted object recognition method
US20150076229A1 (en) Information recognition processing device and diagnosis method
JP2017038324A (en) Image processing apparatus and image reader and image processing system
JP5264956B2 (en) Two-dimensional code reading apparatus and method
JP4728297B2 (en) Two-dimensional code reading apparatus and method
JP4815423B2 (en) Data code reading apparatus and method
JP5125961B2 (en) Binarization processing apparatus, information processing apparatus, binarization processing method, and binarization processing program
JP2016181211A (en) Label area detection device, label area detection method, label area detection program, and label area detection system
JP2010182219A (en) Image processing apparatus
US20240176970A1 (en) Information reader
JP3163235B2 (en) Optical character reader

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130830

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130903

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20131105

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20131126