JP4127187B2 - Code information reading apparatus and program - Google Patents
Code information reading apparatus and program Download PDFInfo
- Publication number
- JP4127187B2 JP4127187B2 JP2003370314A JP2003370314A JP4127187B2 JP 4127187 B2 JP4127187 B2 JP 4127187B2 JP 2003370314 A JP2003370314 A JP 2003370314A JP 2003370314 A JP2003370314 A JP 2003370314A JP 4127187 B2 JP4127187 B2 JP 4127187B2
- Authority
- JP
- Japan
- Prior art keywords
- thinning
- image data
- data
- decoding
- code information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Description
この発明は、コード情報を撮影する撮像手段によって読み取られた画像データをコード変換するコード情報読取装置およびプログラムに関する。 The present invention relates to a code information reading apparatus and a program for converting the code of image data read by an imaging means for photographing code information.
一般に、電荷蓄積型のイメージセンサ(CMOSセンサ)を使用してバーコード、2次元コード等のコード情報を読取るコード情報読取装置においては、ラベル等に記録されているコード情報を光学的に取り込み(以下、キャプチャと称する)、この1面分の画像データを2値化したり、歪補正等の加工を施したり、必要部分の切り出しを行った後に、それをデコードする場合に、CMOSセンサのシャッター時間、つまり、露光時間を現時点の環境に応じて最適化する為に、最初のキャプチャ(以下、プリキャプチャと称する)時に得られた画像データに基づいてシャッター時間の最適値を算出し、この最適値をパラメータとして設定した後に、読み取り動作を再開させることによって画像データをキャプチャ(以下、本キャプチャと称する)し、これによってデコード対象の画像データを得るようにしている。これによってCMOSセンサのシャッター時間を現時点の環境に応じて調整することが可能となり、デコードエラーを効果的に防ぐことが可能となる。 In general, in a code information reading device that reads code information such as a barcode and a two-dimensional code using a charge storage type image sensor (CMOS sensor), the code information recorded on a label or the like is optically captured ( (Hereinafter referred to as “capture”), the shutter time of the CMOS sensor when the image data for one surface is binarized, subjected to processing such as distortion correction, or the necessary portion is cut out and then decoded. That is, in order to optimize the exposure time according to the current environment, the optimum value of the shutter time is calculated based on the image data obtained at the time of the first capture (hereinafter referred to as pre-capture). After setting as a parameter, the image data is captured by restarting the reading operation (hereinafter referred to as the main capture). ), And thereby so as to obtain the image data to be decoded. As a result, the shutter time of the CMOS sensor can be adjusted according to the current environment, and decoding errors can be effectively prevented.
従来、この種のコード情報読取装置としては、イメージセンサのプリ露光動作において水平および垂直方向の両方で間引いた画素の信号だけを読み出し、このプリ露光動作にて読み出した信号に応じて本露光動作を行って全ての画素の信号を読み出すようにしたものが知られている(特許文献1参照)。
しかしながら、この種のコード情報読取装置にあっては、プリ露光時に間引き動作を行うことによって高速化及び低電力化を可能としたものであるが、データの間引きの仕方は、CMOSイメージセンサの水平走査回路ブロックおよび垂直走査回路ブロックへの制御線HMODE、VMODEを用いて行うようにしたものであり、また、データを固定的に間引きくようにしたものであった。
ところで、データキャプチャを行う毎に、1面分の全ての画像データをデコード処理するためにメモリへ転送する場合、高解像度の撮像素子を使用したものにおいては、データ量が極端に多くなるため、それだけデータ転送時間が増加し、デコード処理を開始するまでの時間が長くなる等の問題が残る。
However, in this type of code information reading apparatus, it is possible to increase the speed and reduce the power by performing a thinning operation at the time of pre-exposure. The control lines HMODE and VMODE to the scanning circuit block and the vertical scanning circuit block are used, and data is thinned out in a fixed manner.
By the way, every time data capture is performed, when transferring all of the image data for one surface to the memory for decoding, the amount of data becomes extremely large when using a high-resolution image sensor, As a result, the data transfer time increases and the time until the decoding process starts increases.
この発明の課題は、コード情報を撮影する撮像手段によって読み取られた画像データをメモリへ転送するまでの過程において、必要最小限のデータのみを転送できるようにすると共に、必要最小限のデータであっても、そのコード変換を確実に実行できるようにすることである。 An object of the present invention is to enable transfer of only the minimum necessary data in the process of transferring image data read by an imaging means for capturing code information to a memory, and to provide the minimum necessary data. However, it is to ensure that the code conversion can be executed.
請求項1記載の発明は、コード情報を撮影する撮像手段によって読み取られた画像データをコード変換するコード情報読取装置であって、前記画像データを構成する画素を間引くための間引き数を設定する設定手段と、この設定手段によって設定された間引き数に基づいて前記画像データを間引く処理を行う間引き手段と、この間引き手段によって間引きされた画像データをメモリへ転送する転送手段と、このメモリ内の画像データを解読してコード変換を行う変換手段と、前記変換手段によって画像データの正常解読が不能であることが認識された場合には、前記設定されている間引き数を減らした後に、この新たな間引き数に基づいて当該画像データを間引きながら解読する処理を正常解読されるまで再帰的に繰り返し実行することによって最適間引き数を決定し、この最適間引き数を再設定する再設定手段と、を具備したことを特徴とする。
更に、コンピュータを、上述した請求項1記載の発明に示した主要手段として機能させるためのプログラムを提供する(請求項2記載の発明)。
The invention according to
Furthermore, a program for causing a computer to function as the main means shown in the above-described invention according to
請求項1記載の発明によれば、コード情報を撮影する撮像手段によって読み取られた画像データを構成する画素を間引くための間引き数が設定されている状態において、この間引き数に基づいて画像データを間引く処理を行った後に、間引きされた画像データを解読してコード変換を行った際に、正常解読が不能である場合には、現在設定されている間引き数を減らした後に、この新たな間引き数に基づいて当該画像データを間引きながら解読する処理を正常解読されるまで再帰的に繰り返し実行することによって最適間引き数を決定し、この最適間引き数を再設定するようにしたから、コード情報を撮影する撮像手段によって読み取られた画像データをメモリへ転送するまでの過程において、必要最小限のデータのみを転送することができ、データ転送時間の短縮化と共に、必要最小限のデータであっても、そのコード変換を確実に行うことができる。 According to the first aspect of the present invention, in the state in which a thinning number for thinning out the pixels constituting the image data read by the imaging means for photographing the code information is set, the image data is obtained based on the thinning number. If normal decoding is not possible when the thinned image data is decoded and code conversion is performed after thinning processing is performed, this new thinning is performed after reducing the currently set thinning number. Since the process of decoding while thinning out the image data based on the number is recursively repeated until it is normally decoded, the optimum thinning number is determined, and the optimum thinning number is reset. In the process up to transferring the image data read by the image pickup means to the memory, only the minimum necessary data can be transferred. With shortening the data transfer time, even in the minimum amount of data necessary, it is possible to perform the transcoding reliably.
(実施例1)
以下、図1〜図4を参照して本発明の第1実施例を説明する。
図1は、この実施例におけるコード情報読取装置の全体構成を示したブロック図である。
このコード情報読取装置は、その基本構成要素として、汎用CMOSセンサ部10、照明用LED20、照射用LED30、CMOSセンサ/LEDコントローラ40、CPU50、メモリ60を有している。なお、図中、丸付き数字は、処理の流れを示したシーケンス番号であり、この丸付き数字に従って各処理が順次実行される(以下、同様)。
(Example 1)
Hereinafter, a first embodiment of the present invention will be described with reference to FIGS.
FIG. 1 is a block diagram showing the overall configuration of the code information reading apparatus in this embodiment.
The code information reading apparatus includes a general-purpose
汎用CMOSセンサ部10は、読み取り対象のコード情報(2次元コード情報)が記録されているラベル等を照明用LED20、照射用LED30によって光走査することによりその反射光を取り込む受光素子アレイ(エリアセンサ)11と、このエリアセンサ11を駆動するドライバ12と、エリアセンサ11の読取対象エリアを指定するためのエリア指定用のアドレスバッファ13と、汎用CMOSセンサ部10の全体を制御するためのコントロール&ロジック部14と、受信量(電荷量)をアナログ/デジタル変換するためのADコンバータ15とを有する。
The general-purpose
また、CMOSセンサ/LEDコントローラ40は、CPU50の制御下で汎用CMOSセンサ部10、照明用LED20、照射用LED30を制御するもので、コントローラ部41と、ADコンバータ15からの出力データを取り込むデータバッファ42と、AE用積算回路43とを有する構成となっている。
このAE用積算回路43は、プリキャプチャ時に得られたイメージデータ(ADコンバータ15からの出力データ)に基づいて1面分のデータ積算値を求めることによってシャッター時間の最適値を算出するもので、この最適値をパラメータとして設定した後に、読み取り動作を再開させることによって画像データを本キャプチャするようにしている。つまり、シャッター時間(露光時間)を環境に応じて最適化する為に、プリキャプチャ時に得られた画像データに基づいてシャッター時間の最適値を算出し、この最適値をパラメータとして設定した後に、読み取り動作を再開させることによって画像データを本キャプチャし、この本キャプチャ後の画像データを2値化したり、歪補正等の加工を施した後にデコード処理するようにしている。
The CMOS sensor /
The
メモリ60は、RAM(例えば、スタティックRAM)等であり、プログラム実行領域と作業領域とを有し、この作業領域には、列方向の間引き数Kと行方向の間引き数Lが設定されている。この行列の間引き数K、Lは、汎用CMOSセンサ部10からの画像データの出力時に、1面分の画像データをその列方向および行方向に等間隔にデータを間引くための間引き数であり、予めユーザによって任意にデフォルト設定されたものであるが、行列の間引き数K、Lのうち、その何れかを設定するようにしてもよい。なお、この実施例において、行列の間引き数K、Lは、固定的なデータではなく、正常にデコードすることができたか否かに基づいて変更される変動データである。
The
すなわち、デフォルト設定されている行列の間引き数K、Lに基づいてデータ間引きを行った後に、この間引き後の画像データをデコードした際に、正常にデコードすることができたか否かをチェックし、正常にデコードすることができた場合には、行列の間引き数K、Lを変更しないが、デコードエラーが発生した場合には、現在設定されている行列の間引き数K、Lを段階的に減らした後に、この新たな間引き数に基づいて画像データを間引きながらデコードする処理を正常にデコードされるまで繰り返し実行し、正常にデコードできた時の間引き数を最適間引き数を決定し、これを行列の間引き数K、Lとしてメモリ60に設定し直すようにしている。以降は、この最適間引き数K、Lによってデータの間引きを行うようにしている。
That is, after data thinning is performed based on the matrix thinning numbers K and L set as default, when the image data after the thinning is decoded, it is checked whether or not the decoding can be normally performed. When decoding is successful, the matrix thinning numbers K and L are not changed. However, when a decoding error occurs, the current matrix thinning numbers K and L are gradually reduced. After that, the decoding process while thinning out the image data based on the new thinning number is repeatedly executed until it is normally decoded, and when the decoding is successful, the thinning number is determined as the optimum thinning number. The thinning numbers K and L are set in the
汎用CMOSセンサ部10からの画像データの出力時、つまり、ADコンバータ15から1面分の画像データが出力された際に、行列の間引き数K、Lに基づいて1面分の画像データをその列方向および行方向に等間隔にデータを間引くための処理が実行されるが、その際、例えば、列の間引き数Kとして“2”、行の間引き数Lとして“2”が設定されている場合には、マトリックス構成の画像データは、列方向および行方向共に2画素単位毎に間引かれることによって、元の1面分の画像データは1/9のデータ量に削減されることになる。
When outputting image data from the general-purpose
図2は、汎用CMOSセンサ部10から1面分の画像データが出力された際に、その列方向および行方向に等間隔にデータを間引く際の動作を具体的に説明するための図である。
この場合、汎用CMOSセンサ部10から出力される1面分の画像データは、図示の例では、3n行3m列構成となっており、その1行目の各データは、「A1、1」、「A1、2」、‥‥、「A1、K+1」、‥‥「A1、3m」、また、2行目の各データは、「A2、1」、「A2、2」、‥‥‥‥、「A2、K+1」、‥‥「A2、3m」、更に、3n行目の各データは、「A3n、1」、「A3n、2」、‥‥‥‥、「A3n、K+1」、‥‥「A3n、3m」となっている。
FIG. 2 is a diagram for specifically explaining an operation when data is thinned out at equal intervals in the column direction and the row direction when image data for one surface is output from the general-purpose
In this case, the image data for one surface output from the general-purpose
ここで、列の間引き数Kが「2」、行の間引き数Lが「2」に設定されている場合において、画像データの列方向は、K個(2個)毎に飛ばす間引きが行われるため、1行目のデータは、「A1、1」、「A1、4」、‥‥「A1、3m−2」となる。同様に、画像データの列方向も、L個(2個)毎に飛ばす間引きが行われるため、1行目の後の続く、次の行データは4行目の「A4、1」、「A4、4」、‥‥「A4、3m−2」となり、3n−2行目のデータは、「A3n−2、1」、「A3n−2、4」、‥‥「A3n−2、3m−2」となる。 Here, when the column thinning number K is set to “2” and the row thinning number L is set to “2”, thinning is performed every K (two) in the column direction of the image data. Therefore, the data in the first row are “A1, 1”, “A1, 4”,... “A1, 3m-2”. Similarly, in the column direction of the image data, thinning is performed every L (two), so the next row data following the first row is “A4, 1”, “A4” on the fourth row. 4 ”,...“ A4, 3m-2 ”, and the data on the 3n-2nd line are“ A3n-2, 1 ”,“ A3n-2, 4 ”,. "
次に、この第1実施例におけるコード情報読取装置の動作アルゴリズムを図3に示すフローチャートを参照して説明する。ここで、このフローチャートに記述されている各機能は、読み取り可能なプログラムコードの形態で格納されており、このプログラムコードにしたがった動作を逐次実行する。また、伝送媒体を介して伝送されてきた上述のプログラムコードにしたがった動作を逐次実行することもできる。このことは後述する他の実施形態においても同様であり、記録媒体の他、伝送媒体を介して外部供給されたプログラム/データを利用してこの実施形態特有の動作を実行することもできる。 Next, the operation algorithm of the code information reading apparatus in the first embodiment will be described with reference to the flowchart shown in FIG. Here, each function described in the flowchart is stored in the form of a readable program code, and operations according to the program code are sequentially executed. It is also possible to sequentially execute operations according to the program code transmitted via the transmission medium. The same applies to other embodiments to be described later. In addition to a recording medium, an operation peculiar to this embodiment can be executed using a program / data supplied externally via a transmission medium.
図3は、コード情報を読み取ってデコードするまでのデコードシーケンスを示したフローチャートであり、図4は、データの出力タイミングを示した図である。なお、図中、丸付き数字は、上述と同様、各処理の流れを示したシーケンス番号であり、この丸付き数字に従って各処理が順次実行される。
先ず、CPU50は、CMOSセンサ/LEDコントローラ40を介して汎用CMOSセンサ部10に対して初期化を要求した後(ステップA1)、メモリ60から転送データの間引き数として、列の間引き数Kおよび行の間引き数Lを読み出す(ステップA2)。この状態において、1面分のプリキャプチャ命令を行う(ステップA3)。なお、各コマンドデータ(システムデータ)は、図4(A)に示すシステムCLK(クロック)信号に同期して出力される(図4(B)参照、以下、同様)。
FIG. 3 is a flowchart showing a decoding sequence until the code information is read and decoded, and FIG. 4 is a diagram showing data output timing. In the drawing, circled numbers are sequence numbers indicating the flow of each process, as described above, and each process is sequentially executed according to the circled numbers.
First, the
これによって、汎用CMOSセンサ部10から得られた1面分の画像データをキャプチャし(ステップA4)、この画像データがCMOSセンサ/LEDコントローラ40内のデータバッファ42に転送される際に、列の間引き数K、行の間引き数Lに従ったデータ間引きを行った後に、データバッファ42に転送すると共に、データバッファ42とメモリ60間のデータバスサイズに合わせるために、データバッファ42内の画像データを行単位毎にバスサイジングしてメモリ60へ順次転送する(ステップA5)。なお、図4(C)に示すマスタCLK信号(ADCデータの同期信号)に従ってADコンバータ15から出力されるADCデータ(データバッファ42への入力データ)は、図4(D)に示す如くとなり、従来のプリキャプチャ時のデータ転送量に比べて、(1/K+1)×(1/L+1)倍となり、行列の間引き数K、Lが“2”であれば、間引き後の画像データは、1/9のデータ量となるため、データ転送時間は、AT分の時間が短縮されることになる。
Thus, the image data for one surface obtained from the general-purpose
このようにしてプリキャプチャ時に得られた間引き後の画像データに基づいてAE用積算回路43は、データ積算値を求めて、シャッター時間の最適値を算出すると(ステップA6)、CMOSセンサ/LEDコントローラ40は、汎用CMOSセンサ部10へこの最適値をパラメータとして設定する(ステップA7)。この状態において、CPU50は、CMOSセンサ/LEDコントローラ40を介して汎用CMOSセンサ部10に対して1面分の本キャプチャ命令を行う(ステップA8)。これによって、汎用CMOSセンサ部10から再度得られた画像データを本キャプチャし(ステップA9)、CMOSセンサ/LEDコントローラ40内のデータバッファ42を介してメモリ60へ転送するが、その際、上述したプリキャプチャ時と同様に、列の間引き数K、行の間引き数Lに従ったデータ間引きを行った後に、データバッファ42に転送すると共に、データバッファ42内の画像データを行単位毎にバスサイジングしてメモリ60へ順次転送する(ステップA10)。ここで、図4(D)に示すように、本キャプチャ後の画像データにおいても、従来の本キャプチャ時のデータ転送量に比べて、(1/K+1)×(1/L+1)倍となる。
Based on the thinned image data obtained at the time of pre-capturing in this way, the
そして、この実施例においては、読み取り動作の精度を高める為に、複数回の本キャプチャを繰り返すようにしているが(ステップA8〜A11)、この本キャプチャ毎に得られた各画像データをその都度、列の間引き数K、行の間引き数Lに従ってデータ間引きを行い、間引き後の各画像データに基づいてそれらの一致有無を検出するデータのコンペア処理を実行する(ステップA11)。ここで、各データの一致が検出されたことを条件に(ステップA11でYES)、データ加工処理を開始する(ステップA12)。すなわち、画像データを2値化すると共に、歪補正等を行った後に、更に、コード情報の切り出しを行う。そして、データ加工後の画像データに基づいてデコード処理を実行し(ステップA13)、正常にデコードすることができたか否かをチェックする(ステップA14)。 In this embodiment, in order to increase the accuracy of the reading operation, the main capture is repeated a plurality of times (steps A8 to A11). Each image data obtained for each main capture is obtained each time. Data thinning is performed according to column thinning number K and row thinning number L, and data comparison processing is executed to detect the presence or absence of the matching based on the thinned image data (step A11). Here, on the condition that the coincidence of each data is detected (YES in step A11), the data processing is started (step A12). That is, after binarizing the image data and performing distortion correction or the like, the code information is further cut out. Then, a decoding process is executed based on the image data after the data processing (step A13), and it is checked whether or not the decoding was successful (step A14).
ここで、デコードエラーが発生した場合には(ステップA14でNO)、列の間引き数K、行の間引き数Lから“1”を減算する処理を行ってその値を変更した後に(ステップA15)、この変更後の間引き数K、Lに基づいてプリキャプチャを実行しながら以下、上述の動作を繰り返す(ステップA2〜A14)。この結果、正常にデコードすることができた場合には(ステップA14でYES)、その時の間引き数K、Lを最適間引き数として決定し、以降は、この最適間引き数K、Lに固定してデータの間引きを行う。この場合、最適間引き数K、Lに固定した後のキャプチャデータは、例えば、図4(D)に示す如くとなり、従来の本キャプチャ時のデータ転送量に比べてもかなりのデータ量を削減することができ、データ転送時間は、BT分の時間が短縮されることになる。 If a decoding error has occurred (NO in step A14), a process of subtracting “1” from the column thinning number K and the row thinning number L is performed to change the value (step A15). Subsequently, the above-described operation is repeated while performing pre-capture based on the thinned-out numbers K and L after this change (steps A2 to A14). As a result, if the decoding can be normally performed (YES in step A14), the thinning numbers K and L at that time are determined as the optimum thinning numbers, and thereafter, the optimum thinning numbers K and L are fixed. Decimate data. In this case, the capture data after being fixed to the optimum thinning-out numbers K and L is, for example, as shown in FIG. 4D, and a considerable amount of data is reduced compared to the data transfer amount at the time of conventional main capture. Therefore, the data transfer time is shortened by BT.
以上のように、この第1実施例におけるコード情報読取装置は、画像データを間引くための間引き数K、Lが設定されている状態において、汎用CMOSセンサ部10によって読み取られた画像データを間引き数K、Lに基づいて間引く処理を行った後に、間引き後の画像データをデコードした際に、デコードエラーが発生した場合には、現在設定されている間引き数K、Lを1段階に減らした後、この新たな間引き数に基づいて画像データを間引きながらデコードする処理を正常デコードされるまで繰り返し実行することによって最適間引き数を決定し、この最適な間引き数を再設定するようにしたから、汎用CMOSセンサ部10によって読み取られた画像データをメモリ60へ転送するまでの過程において、必要最小限のデータのみを転送することができ、データ転送時間の短縮化と共に、必要最小限のデータであっても、そのデコードを確実に行うことができる。
As described above, the code information reading apparatus according to the first embodiment uses the thinned-out number of the image data read by the general-purpose
この場合、汎用CMOSセンサ部10から画像データが出力された時点で、この画像データを間引く処理を開始するようにしたから、汎用CMOSセンサ部10から出力された画像データがデータバッファ42に書き込まれる前にデータ間引きを行うことが可能となり、データ転送時間を効率良く短縮化することができる。
また、1面分の画像データの列方向および行方向に対応してその間引き数K、Lを設定し、この列方向の間引き数Kおよび行方向の間引き数Lに基づいて画像データを等間隔に間引くようにしたから、全体として平均的な間引きが可能となり、画像データをデコードする際に、間引きによる悪影響を極力抑えることが可能となる。
In this case, when the image data is output from the general-purpose
Further, the thinning numbers K and L are set corresponding to the column direction and the row direction of the image data for one surface, and the image data are equally spaced based on the thinning number K and the thinning number L in the row direction. Therefore, average thinning is possible as a whole, and adverse effects due to thinning can be suppressed as much as possible when decoding image data.
(第2実施形態)
以下、この発明の第2実施形態について図5〜図7を参照して説明する。なお、上述した第1実施形態は、汎用CMOSセンサ部10から画像データが出力された時点で、この画像データを間引く処理を開始するようにしたが、この第2実施形態においては、汎用CMOSセンサ部10から出力された画像データがデータバッファ42に書き込まれた後に、このデータバッファ42からメモリ60へ画像データを転送する際に、画像データを間引くようにしたものである。
ここで、両実施形態において基本的に同一のものは、同一符号を付して示し、その説明を省略する他、以下、第2実施例の特徴部分を中心に説明するものとする。
(Second Embodiment)
Hereinafter, a second embodiment of the present invention will be described with reference to FIGS. In the first embodiment described above, the processing for thinning out the image data is started when the image data is output from the general-purpose
Here, components that are basically the same in both embodiments are denoted by the same reference numerals, description thereof will be omitted, and the following description will focus on the features of the second embodiment.
図5は、汎用CMOSセンサ部10から出力された画像データがデータバッファ42に書き込まれた後に、このデータバッファ42からメモリ60へ画像データを転送する際に、データ間引きが行われる様子を具体的に示した図である。
図5(A)は、汎用CMOSセンサ部10から出力された1面分の画像データを示し、この1面分の画像データは、データバッファ42にそのまま書き込まれる(図5(B)参照)。なお、この例では、上述した第1実施例と同様に、列の間引き数Kが「2」、行の間引き数Lが「2」に設定されている場合を示している。
FIG. 5 specifically shows how data thinning is performed when image data is transferred from the data buffer 42 to the
FIG. 5A shows image data for one surface output from the general-purpose
この場合、1行目のデータは、メモリ60に転送される対象データとなるために、その全データは、CMOSセンサ/LEDコントローラ40内のワーク用転送領域に送られた後(図5(C)参照)、このワーク用の転送領域内において、メモリ60への転送対象となる列が選択されると、図5(D)に示すように、1行目のデータは、「A1、1」、「A1、4」、‥‥「A1、3m−2」となる。以下、間引き対象外の行が転送対象行として読み出されると共に、この転送対象行内から間引き対象外の列が選択されてメモリ60へ転送される。このような間引き処理が行われることによって、最終的にはデータバッファ42からメモリ60に転送されるデータは、図5(E)に示す如くとなり、1行目の「A1、1」、「A1、4」、‥‥「A1、3m−2」、A3n行目の「A3n−2、1」、「A3n−2、4」、‥‥「A3n−2、3m−2」のデータがメモリ60に書き込まれ、これによって、間引き後の画像データは、元の1面分のデータの1/9のデータ量となる。
In this case, since the data in the first row becomes the target data to be transferred to the
図6は、第2実施例において、コード情報を読み取ってデコードするまでのデコードシーケンスを示したフローチャートであり、図7は、データの出力タイミングを示した図である。
先ず、CPU50は、CMOSセンサ/LEDコントローラ40を介して汎用CMOSセンサ部10に対して初期化を要求した後(ステップB1)、メモリ60から転送データの間引き数として、列の間引き数Kおよび行の間引き数Lを読み出す(ステップB2)。この状態において、1面分のプリキャプチャ命令を行う(ステップB3)。なお、各コマンドデータ(システムデータ)は、図7(A)に示すシステムCLK(クロック)信号に同期して出力される(図7(B)参照、以下、同様)。
FIG. 6 is a flowchart showing a decoding sequence until code information is read and decoded in the second embodiment, and FIG. 7 is a diagram showing data output timing.
First, the
これによって、汎用CMOSセンサ部10から得られた1面分の画像データをキャプチャし(ステップB4)、この1面分の画像データはCMOSセンサ/LEDコントローラ40内のデータバッファ42にそのまま転送された後に、列の間引き数K、行の間引き数Lに従ったデータ間引きが行われてメモリ60に転送される(ステップB5)。
この場合、図7(C)に示すマスタCLK信号に同期してADコンバータ15から出力されるADCデータは、図7(D)に示す如くとなる。また、CMOSセンサ/LEDコントローラ40内のデータバッファ42からメモリ60へデータを転送する際には、行単位に分割して転送されるが、この際、図7(E)に示すように、従来では、行単位毎に分割して1行分の全データを順次転送するのに対し、この第2実施例においては、列の間引き数Kに応じて間引きされたデータが分割転送されるので、図7(F)に示す如く、行単位当たりのデータ量を大幅に削減することができ、また、行単位毎に分割してデータ転送する場合、行の間引き数Lに応じたデータ間引きが行われるために、その分割数も大幅に削減することができる。
Thereby, the image data for one surface obtained from the general-purpose
In this case, the ADC data output from the
このようにしてプリキャプチャされた1面分の画像データがデータバッファ42に転送されている状態において、AE用積算回路43がデータ積算値を求めて、シャッター時間における最適値を算出すると(ステップB6)、CMOSセンサ/LEDコントローラ40は、汎用CMOSセンサ部10へこの最適値をパラメータとして設定する(ステップB7)。この状態において、CPU50は、CMOSセンサ/LEDコントローラ40を介して汎用CMOSセンサ部10に対して1面分の本キャプチャ命令を行う(ステップB8)。これによって、汎用CMOSセンサ部10から再度得られた画像データを本キャプチャする(ステップB9)。
When the image data for one surface pre-captured in this way is transferred to the data buffer 42, the
この1面分の画像データは、CMOSセンサ/LEDコントローラ40内のデータバッファ42にそのまま転送された後に(ステップB10)、このデータバッファ42の画像データはメモリ60へ転送されるが、その際に、上述したプリキャプチャ時と同様に、列の間引き数K、行の間引き数Lに従ってデータ間引きが行われる(ステップB11)。この場合においても、図7(F)に示す如く、行単位当たりのデータ量を大幅に削減することができると共に、その分割数も大幅に削減することができる。その後、読み取り動作の精度を高める為に、複数回の本キャプチャを繰り返し、本キャプチャ毎に得られた各画像データに基づいてそれらの一致を検出するデータのコンペア処理を実行する(ステップB8〜B12)。この場合においても、本キャプチャ毎に得られた各画像データをその都度、列の間引き数K、行の間引き数Lに従ってデータ間引きを行い、間引き後の各画像データに基づいてそれらの一致有無を検出する(ステップB12)。
The image data for one surface is transferred as it is to the data buffer 42 in the CMOS sensor / LED controller 40 (step B10), and then the image data in the data buffer 42 is transferred to the
ここで、各データの一致が検出されたことを条件に(ステップB12でYES)、画像データを2値化すると共に、歪補正等を行った後に、更に、コード情報の切り出しを行うデータ加工処理を開始する(ステップB13)。そして、データ加工後の画像データに基づいてデコード処理を実行し(ステップB14)、正常にデコードすることができたか否かをチェックする(ステップB15)。いま、デコードエラーが発生した場合には(ステップB15でNO)、列の間引き数K、行の間引き数Lから“1”を減算する処理を行ってその値を変更する(ステップB16)。 Here, on condition that a match of each data is detected (YES in step B12), the image data is binarized, and after performing distortion correction and the like, further data processing for extracting code information Is started (step B13). Then, a decoding process is executed based on the image data after the data processing (step B14), and it is checked whether or not the decoding was successful (step B15). If a decoding error occurs (NO in step B15), a process of subtracting “1” from the column thinning number K and the row thinning number L is performed to change the value (step B16).
そして、データバッファ42に転送されている1面分の画像データをそのまま保持した状態で、ステップB11に戻り、データバッファ42の画像データを列の間引き数K、行の間引き数Lに従って間引きながら以下、上述の動作を繰り返す(ステップB11〜B16)。この結果、正常にデコードすることができた場合には(ステップB15でYES)、その時の間引き数K、Lを最適間引き数として決定し、以降は、この最適間引き数K、Lに固定してデータの間引きを行う。この場合、最適間引き数K、Lに固定した後のキャプチャデータは、例えば、図4(F)に示す如くとなり、従来の本キャプチャ時のデータ転送量に比べてもかなりのデータ量を削減することができる。 Then, in a state where the image data for one surface transferred to the data buffer 42 is held as it is, the process returns to Step B11, and the image data in the data buffer 42 is thinned according to the column thinning number K and the row thinning number L below. The above operation is repeated (steps B11 to B16). As a result, if the decoding can be performed normally (YES in step B15), the thinning-out numbers K and L at that time are determined as the optimum thinning-out numbers, and thereafter, the optimum thinning-out numbers K and L are fixed to these. Decimate data. In this case, the capture data after being fixed to the optimum thinning-out numbers K and L is, for example, as shown in FIG. 4 (F), and a considerable amount of data is reduced compared with the data transfer amount at the time of conventional main capture. be able to.
以上のように、この第2実施例におけるコード情報読取装置は、画像データを間引くための間引き数K、Lが設定されている状態において、汎用CMOSセンサ部10によって読み取られた1面分の画像データをコントローラ部41内のデータバッファ42にそのまま転送した後に、このデータバッファ42からメモリ60へ画像データを転送する際に、間引き数K、Lに基づいて間引く処理を行い、この間引き後の画像データをデコードした際に、デコードエラーが発生した場合には、現在設定されている間引き数K、Lを1段階に減らした後、この新たな間引き数に基づいて画像データを間引きながらデコードする処理を正常デコードされるまで繰り返し実行することによって最適間引き数を決定し、この最適間引き数を再設定するようにしたから、汎用CMOSセンサ部10によって読み取られた画像データをメモリ60へ転送するまでの過程において、必要最小限のデータのみを転送することができ、データ転送時間の短縮化と共に、必要最小限のデータであっても、そのデコードを確実に行うことができる他、最適間引き数を再設定する際に、データバッファに保持されている画像データに基づいてデコードを繰り返し実行することができ、データキャプチャを何回もやり直す必要がなくなり、データ転送時間を更に短縮化することができる。
As described above, the code information reading apparatus according to the second embodiment has an image for one surface read by the general-purpose
なお、上述した第1および第2実施例においては、列の間引き数Kとして「2」、行の間引き数Lとして「2」にデフォルト設定されている場合を示したが、このデフォルト設定値は、画像データの高解像度によって任意である。
また、各実施形態のコード情報読取装置は、スタンド・アローン・タイプに限らず、その各構成要素が2以上の筐体に物理的に分離され、通信回線やケーブル等の有線伝送路あるいは電波、マイクロウエーブ、赤外線等の無線伝送路を介してデータを送受信する分散型のコンピュータシステムを構成するものであってもよい。
In the first and second embodiments described above, a case is shown in which the default is set to “2” as the column thinning number K and “2” as the row thinning number L. It is optional depending on the high resolution of the image data.
In addition, the code information reading device of each embodiment is not limited to the stand-alone type, and each component is physically separated into two or more casings, a wired transmission path such as a communication line or a cable, or a radio wave, You may comprise the distributed computer system which transmits / receives data via wireless transmission paths, such as a microwave and infrared rays.
一方、コンピュータに対して、上述した各手段を実行させるためのプログラムコードをそれぞれ記録した記録媒体を提供するようにしてもよい。すなわち、コンピュータが読み取り可能なプログラムコードを有する記録媒体であって、コード情報を撮影する撮像手段によって読み取られた画像データを構成する画素を間引くための間引き数を設定する機能と、設定された間引き数に基づいて前記画像データを間引く処理を行う機能と、間引きされた画像データをメモリへ転送する機能と、このメモリ内の画像データを解読してコード変換を行う機能と、画像データの正常解読が不能であることが認識された場合には、前記設定されている間引き数を減らした後に、この新たな間引き数に基づいて当該画像データを間引きながら解読する処理を正常解読されるまで再帰的に繰り返し実行することによって最適間引き数を決定し、この最適間引き数を再設定する機能とを実現させるためのプログラムを記録したコンピュータが読み取り可能な記録媒体を提供するようにしてもよい。 On the other hand, you may make it provide the recording medium which each recorded the program code for making a computer perform each means mentioned above. That is, a recording medium having a program code readable by a computer, a function for setting a thinning number for thinning out pixels constituting image data read by an imaging means for photographing code information, and a set thinning A function of thinning out the image data based on the number, a function of transferring the thinned image data to the memory, a function of decoding the image data in the memory and performing code conversion, and normal decoding of the image data When it is recognized that the image data cannot be read, after the set thinning number is reduced, the process of decoding the image data while thinning out based on the new thinning number is recursively performed until normal decoding is performed. The process for determining the optimal decimation number by repeatedly executing this function and realizing the function of resetting this optimal decimation number It may be a computer which records a gram to provide a recording medium readable.
10 汎用CMOSセンサ部
11 エリアセンサ
12 ドライバ
14 コントロール&ロジック部
15 ADコンバータ
20 照明用LED
30 照射用LED
40 CMOSセンサ/LEDコントローラ
41 コントローラ部
42 データバッファ42
50 CPU
60 メモリ
DESCRIPTION OF
30 LED for irradiation
40 CMOS sensor /
50 CPU
60 memory
Claims (2)
前記画像データを構成する画素を間引くための間引き数を設定する設定手段と、
この設定手段によって設定された間引き数に基づいて前記画像データを間引く処理を行う間引き手段と、
この間引き手段によって間引きされた画像データをメモリへ転送する転送手段と、
このメモリ内の画像データを解読してコード変換を行う変換手段と、
前記変換手段によって画像データの正常解読が不能であることが認識された場合には、前記設定されている間引き数を減らした後に、この新たな間引き数に基づいて当該画像データを間引きながら解読する処理を正常解読されるまで再帰的に繰り返し実行することによって最適間引き数を決定し、この最適間引き数を再設定する再設定手段と、
を具備することを特徴とするコード情報読取装置。 A code information reading device that converts image data read by an imaging unit that captures code information,
Setting means for setting a thinning number for thinning out pixels constituting the image data;
Thinning means for performing a process of thinning the image data based on the thinning number set by the setting means;
Transfer means for transferring the image data thinned out by the thinning means to a memory;
Conversion means for decoding the image data in the memory and performing code conversion;
If the conversion means recognizes that normal decoding of the image data is impossible, the image data is decoded while being thinned out based on the new thinning number after reducing the set thinning number. Resetting means for determining the optimum thinning number by recursively repetitively executing the process until normal decoding is performed, and resetting the optimum thinning number ;
Code information reading apparatus characterized by comprising a.
コード情報を撮影する撮像手段によって読み取られた画像データを構成する画素を間引くための間引き数を設定する手段、
設定された間引き数に基づいて前記画像データを間引く処理を行う手段、
間引きされた画像データをメモリへ転送する手段、
このメモリ内の画像データを解読してコード変換を行う手段、
画像データの正常解読が不能であることが認識された場合には、前記設定されている間引き数を減らした後に、この新たな間引き数に基づいて当該画像データを間引きながら解読する処理を正常解読されるまで再帰的に繰り返し実行することによって最適間引き数を決定し、この最適間引き数を再設定する手段、
として機能させるためのプログラム。 The computer,
Means for setting a thinning-out number for thinning out pixels constituting the image data read by the image pickup means for photographing the code information,
Means for thinning out the image data based on a set thinning number;
Means for transferring the thinned image data to a memory;
Means for decoding the image data in the memory and performing code conversion;
When it is recognized that normal decoding of the image data is impossible, after the set number of thinnings is reduced, normal decoding is performed while decoding the image data based on the new thinning number Means for determining the optimum thinning-out number by recursively executing until it is reconfigured ,
Program to function as.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2003370314A JP4127187B2 (en) | 2003-10-30 | 2003-10-30 | Code information reading apparatus and program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2003370314A JP4127187B2 (en) | 2003-10-30 | 2003-10-30 | Code information reading apparatus and program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2005135149A JP2005135149A (en) | 2005-05-26 |
| JP4127187B2 true JP4127187B2 (en) | 2008-07-30 |
Family
ID=34647368
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2003370314A Expired - Fee Related JP4127187B2 (en) | 2003-10-30 | 2003-10-30 | Code information reading apparatus and program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4127187B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP7367314B2 (en) * | 2019-03-25 | 2023-10-24 | カシオ計算機株式会社 | Code reading device, code reading method and program |
-
2003
- 2003-10-30 JP JP2003370314A patent/JP4127187B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2005135149A (en) | 2005-05-26 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP6039889B2 (en) | Terminal that outputs monochrome image data and color image data | |
| TWI783316B (en) | Method for performing fingerprint sensing, electronic module capable of performing fingerprint sensing, and computing apparatus | |
| EP3229467A1 (en) | Imaging method, imaging device, and electronic device | |
| US20230105329A1 (en) | Image signal processor and image sensor including the image signal processor | |
| JP2023169254A (en) | Imaging element, operating method for the same, program, and imaging system | |
| JP2005347931A (en) | Imaging device and imaging system | |
| US20240394905A1 (en) | Image processing device and image processing method | |
| US20240430568A1 (en) | Imaging element including processor configured to receive vibration information related to a vibration exerted on the imaging element, imaging apparatus, operation method of imaging element, and program | |
| JP4127187B2 (en) | Code information reading apparatus and program | |
| EP3051798B1 (en) | Photographic apparatus and method for the light leakage correction | |
| US20250200973A1 (en) | Imaging device, imaging method, and imaging program | |
| CN116055905B (en) | Image sensor, camera module and electronic equipment | |
| JP4168731B2 (en) | Information reading apparatus and program | |
| KR101087550B1 (en) | How to reduce image signal processor and shutter rack | |
| WO2009107636A1 (en) | Blinking signal detection circuit, blinking signal detection method, object detection device, object detection method, and imaging system | |
| US20190342470A1 (en) | Image capturing apparatus, image processing apparatus, and control method therefor | |
| JP2011076518A (en) | Optical information reader and method for acquiring image data | |
| JP6467455B2 (en) | IMAGING DEVICE, ITS CONTROL METHOD, PROGRAM, AND RECORDING MEDIUM | |
| JP6218408B2 (en) | Image processing apparatus, image processing method, and program | |
| JP4930172B2 (en) | Optical information reader | |
| JP5968145B2 (en) | Image processing apparatus and control method thereof | |
| KR20090071321A (en) | Imaging device, imaging method and storage medium recording computer program for performing the same | |
| KR20260064115A (en) | Apparatus for detecting pupil area based on cmos image sensor | |
| CN117981342A (en) | System and method for controlling an image sensor | |
| JP2008217206A (en) | Image identification device, image identification method, and imaging device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| RD02 | Notification of acceptance of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7422 Effective date: 20060209 |
|
| RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20060404 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070619 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20070802 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20080422 |
|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20080505 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110523 Year of fee payment: 3 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110523 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120523 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120523 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130523 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130523 Year of fee payment: 5 |
|
| LAPS | Cancellation because of no payment of annual fees |