JP5251096B2 - Two-dimensional code / barcode reading device, two-dimensional code / barcode reading method, program, and recording medium - Google Patents

Two-dimensional code / barcode reading device, two-dimensional code / barcode reading method, program, and recording medium Download PDF

Info

Publication number
JP5251096B2
JP5251096B2 JP2007315532A JP2007315532A JP5251096B2 JP 5251096 B2 JP5251096 B2 JP 5251096B2 JP 2007315532 A JP2007315532 A JP 2007315532A JP 2007315532 A JP2007315532 A JP 2007315532A JP 5251096 B2 JP5251096 B2 JP 5251096B2
Authority
JP
Japan
Prior art keywords
rectangular area
dimensional code
barcode
area
density
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2007315532A
Other languages
Japanese (ja)
Other versions
JP2009140207A (en
Inventor
淳 青木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP2007315532A priority Critical patent/JP5251096B2/en
Publication of JP2009140207A publication Critical patent/JP2009140207A/en
Application granted granted Critical
Publication of JP5251096B2 publication Critical patent/JP5251096B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、2次元コード・バーコード読み取り装置、2次元コード・バーコード読み取り方法、2次元コード・バーコード読み取りプログラムおよびプログラム記録媒体に関する。特に、携帯電話機等の画面に表示された2次元コード・バーコードを専用端末に備えられたフラットベッドスキャナで読み取って各種サービスを行う分野に好適に適用することができる2次元コード・バーコード読み取り装置、2次元コード・バーコード読み取り方法、2次元コード・バーコード読み取りプログラムおよびプログラム記録媒体に関する。   The present invention relates to a two-dimensional code / barcode reading apparatus, a two-dimensional code / barcode reading method, a two-dimensional code / barcode reading program, and a program recording medium. In particular, two-dimensional code / barcode reading that can be suitably applied to the field of performing various services by reading a two-dimensional code / barcode displayed on the screen of a mobile phone or the like with a flatbed scanner provided in a dedicated terminal. The present invention relates to a two-dimensional code / barcode reading method, a two-dimensional code / barcode reading program, and a program recording medium.

携帯電話機等の画面に表示された2次元コード・バーコードを読み取ることは、従来から行われてきている。従来の携帯電話機の画面に表示された2次元コード・バーコードの読み取り方法の一例として、例えば特許文献1の特開2004−54581号公報「情報コード表示方法および情報コード読取方法」や、特許文献2の特開2007−66000号公報「携帯情報端末および画像処理方法」に記載されている方法がある。   Reading a two-dimensional code / bar code displayed on a screen of a mobile phone or the like has been conventionally performed. As an example of a method for reading a two-dimensional code / barcode displayed on a screen of a conventional mobile phone, for example, Japanese Patent Application Laid-Open No. 2004-54581 “Information Code Display Method and Information Code Reading Method” of Patent Document 1 and Patent Document No. 2, JP-A 2007-66000, “Portable Information Terminal and Image Processing Method”.

前記特許文献1に記載の技術においては、携帯電話機の液晶画面に、2次元コード・バーコードを表示した際に、専用の画像回転・表示アプリケーションを用意しており、2次元コード・バーコードの画像を90度刻みで回転・表示させて得られる画像を順次スキャンし、計4枚の画像を用いて、2次元コード・バーコードの読み取りを行うという方法が提案されている。   In the technique disclosed in Patent Document 1, a dedicated image rotation / display application is prepared when a two-dimensional code / barcode is displayed on a liquid crystal screen of a mobile phone. A method has been proposed in which images obtained by rotating and displaying images in 90 degree increments are sequentially scanned, and a two-dimensional code / barcode is read using a total of four images.

また、前記特許文献2に記載の技術においては、2次元コード・バーコードのセルサイズ・バー幅を最初に検出し、その検出結果に基づいて、画像の歪み補正を行うという方法が提案されている。
特開2004−54581号公報(第5−7頁) 特開2007−66000号公報(第6−9頁)
In the technique described in Patent Document 2, a method is proposed in which the cell size / bar width of a two-dimensional code / barcode is first detected and image distortion correction is performed based on the detection result. Yes.
Japanese Patent Laying-Open No. 2004-54581 (page 5-7) JP 2007-66000 (page 6-9)

しかしながら、前述したような従来の技術においては、次のような問題が解決されていない。   However, in the conventional techniques as described above, the following problems are not solved.

第1の問題は、ヒンジを最大180度未満でしか開くことのできない折りたたみ式の携帯電話機においては、携帯電話機の画面とスキャナ面とが平行になっていないため、2次元コード・バーコードの画像が歪んでしまい、2次元コード・バーコードを正しく読み取ることができないという点にある。   The first problem is that in a foldable mobile phone whose hinge can be opened only at a maximum of less than 180 degrees, the screen of the mobile phone and the scanner surface are not parallel, so the image of the two-dimensional code / barcode Is distorted and the two-dimensional code / barcode cannot be read correctly.

第2の問題は、スキャナで読み取った画像が、携帯電話機の画面サイズよりも大きく、携帯電話機の背景も同時に画像内に映り込んでいる場合には、携帯電話機の画面を正しく検出することができなくなるという点にある。   The second problem is that when the image read by the scanner is larger than the screen size of the mobile phone and the background of the mobile phone is also reflected in the image at the same time, the screen of the mobile phone can be detected correctly. It is in the point of disappearing.

第3の問題は、フラットベッド型スキャナのスキャン方式が、1次元センサを副走査方向へ移動させながら2次元画像を取り込む方式からなっている場合、スキャン完了までに数秒の時間を要することから、スキャン途中で、携帯電話機の画面が省エネルギーモードに切り替わって、暗転してしまうと、画像の明るさが2次元コード・バーコードに跨って変化してしまい、携帯電話機の画面に表示された2次元コード・バーコードの読み取りが困難になってしまうという点にある。   The third problem is that when the scanning method of the flatbed scanner is a method of capturing a two-dimensional image while moving the one-dimensional sensor in the sub-scanning direction, it takes several seconds to complete the scan. If the screen of the mobile phone is switched to the energy saving mode and darkens during scanning, the brightness of the image changes across the 2D code / barcode, and the 2D displayed on the screen of the mobile phone. It is difficult to read codes and barcodes.

本発明は、かくのごとき問題を解決するためになされたものであり、携帯電話機等の画面に表示された2次元コード・バーコードを安定して正確に読み取ることが可能な2次元コード・バーコード読み取り装置、2次元コード・バーコード読み取り方法、2次元コード・バーコード読み取りプログラムおよびプログラム記録媒体を提供することを、その目的としている。   The present invention has been made to solve the above problems, and a two-dimensional code bar capable of stably and accurately reading a two-dimensional code bar code displayed on a screen of a mobile phone or the like. The object of the present invention is to provide a code reading device, a two-dimensional code / barcode reading method, a two-dimensional code / barcode reading program, and a program recording medium.

前述の課題を解決するため、本発明による2次元コード・バーコード読み取り装置、2次元コード・バーコード読み取り方法、2次元コード・バーコード読み取りプログラムおよびプログラム記録媒体は、次のような特徴的な構成を採用している。   In order to solve the above-described problems, a two-dimensional code / barcode reading apparatus, a two-dimensional code / barcode reading method, a two-dimensional code / barcode reading program, and a program recording medium according to the present invention have the following characteristic features. The configuration is adopted.

(1)2次元バーコード・バーコードを表示している画面をスキャンした画像データの中から2次元バーコードを読み取る2次元コード・バーコード読み取り装置において、スキャンした画像データから、2次元バーコード・バーコードを表示している画面領域を抽出した後、抽出した該画面領域の歪みおよび傾きを補正し、補正した後の該画面領域の中から2次元コード・バーコードを読み取る2次元コード・バーコード読み取り装置。   (1) In a two-dimensional code / barcode reader that reads a two-dimensional barcode from image data obtained by scanning a screen displaying a two-dimensional barcode / barcode, the two-dimensional barcode is obtained from the scanned image data. After extracting the screen area displaying the barcode, the distortion and inclination of the extracted screen area are corrected, and the two-dimensional code that reads the two-dimensional code barcode from the corrected screen area Bar code reader.

本発明の2次元コード・バーコード読み取り装置、2次元コード・バーコード読み取り方法、2次元コード・バーコード読み取りプログラムおよびプログラム記録媒体によれば、以下のような効果を得ることができる。   According to the two-dimensional code / barcode reading apparatus, the two-dimensional code / barcode reading method, the two-dimensional code / barcode reading program and the program recording medium of the present invention, the following effects can be obtained.

第1の効果は、スキャン画像から携帯電話機等の画面領域を抽出することによって、画像の歪み、傾きや濃度を補正するようにしているので、携帯電話機等の形式(折りたたみ式、ストレート式)、画面サイズ、環境設定状態(省エネルギーモード)の如何によらず、携帯電話機等の画面に表示された2次元コード・バーコードの読み取りを正確に行うことができることである。この結果、2次元コード・バーコードを画面表示する携帯電話機等の機種や利用者が不特定となる状況下であっても、2次元コード・バーコードの読み取りを正確に行うことができる。   The first effect is to correct the distortion, inclination and density of the image by extracting the screen area of the mobile phone or the like from the scanned image, so that the format of the mobile phone or the like (folding type, straight type), Regardless of the screen size and the environment setting state (energy saving mode), the two-dimensional code / bar code displayed on the screen of a mobile phone or the like can be read accurately. As a result, it is possible to accurately read the two-dimensional code / barcode even in a situation where the model or user of the mobile phone or the like that displays the two-dimensional code / barcode on the screen is unspecified.

第2の効果は、スキャナのスキャン方式(1次元センサ、2次元センサ)、スキャナの設置位置(環境光の映り込み)が異なっていても、その差を吸収し、携帯電話機の画面に表示された2次元コード・バーコードの読み取りに対応することができることである。   The second effect is that even if the scanning method of the scanner (one-dimensional sensor, two-dimensional sensor) and the installation position of the scanner (reflection of ambient light) are different, the difference is absorbed and displayed on the screen of the mobile phone. Furthermore, it can cope with reading of a two-dimensional code / bar code.

以下、本発明による2次元コード・バーコード読み取り装置、2次元コード・バーコード読み取り方法、2次元コード・バーコード読み取りプログラムおよびプログラム記録媒体の好適な実施形態について添付図を参照して説明する。なお、以下の説明においては、本発明による2次元コード・バーコード読み取り装置、2次元コード・バーコード読み取り方法について説明するが、かかる2次元コード・バーコード読み取り方法をコンピュータにより実行可能な2次元コード・バーコード読み取りプログラムとして実施するようにしても良いし、あるいは、2次元コード・バーコード読み取りプログラムをコンピュータにより読み取り可能な記録媒体に記録するようにしても良いことは言うまでもない。   Preferred embodiments of a two-dimensional code / barcode reader, a two-dimensional code / barcode reading method, a two-dimensional code / barcode reading program, and a program recording medium according to the present invention will be described below with reference to the accompanying drawings. In the following description, a two-dimensional code / barcode reading apparatus and a two-dimensional code / barcode reading method according to the present invention will be described. The two-dimensional code / barcode reading method can be executed by a computer. Needless to say, the program may be implemented as a code / barcode reading program, or the two-dimensional code / barcode reading program may be recorded on a computer-readable recording medium.

(本発明の特徴)
本発明の実施形態の説明に先立って、本発明の特徴についてその概要をまず説明する。本発明は、携帯電話機の画面に表示した2次元コード・バーコードを読み取る仕組みに関するものであり、スキャンした画像データ内にある携帯電話機等の画面領域をまず検出し、当該画面領域の歪み補正、傾き補正や濃度補正をすることによって、折りたたみ式携帯電話機等のヒンジ角による携帯電話機等の画面とスキャナ面との傾き、環境光の映り込み、携帯電話機等の画面の省エネルギーモード(明るさ変化)の影響を吸収することを可能とすることを特徴としている。
(Features of the present invention)
Prior to the description of the embodiments of the present invention, an outline of the features of the present invention will be described first. The present invention relates to a mechanism for reading a two-dimensional code / barcode displayed on a screen of a mobile phone, and first detects a screen area of a mobile phone or the like in scanned image data, and corrects distortion of the screen area. By tilt correction and density correction, the tilt of the screen of the mobile phone and the scanner surface by the hinge angle of the folding mobile phone, the reflection of the ambient light, the energy saving mode of the screen of the mobile phone (brightness change) It is characterized by making it possible to absorb the effects of.

而して、本発明においては、携帯電話機等の画面に表示された2次元コード・バーコードを、フラットベッド式スキャナ等によって読み取る際に、スキャン方式(1次元スキャナ、2次元スキャナ)、スキャナ設置位置(環境光)、携帯電話機等の形式(折りたたみ式、ストレート式)、スキャン時の携帯電話機等の状態に関わらず、2次元コード・バーコードを正確に読み取ることを可能にしている。   Thus, in the present invention, when a two-dimensional code / bar code displayed on a screen of a mobile phone or the like is read by a flatbed scanner or the like, a scanning method (one-dimensional scanner, two-dimensional scanner), scanner installation Regardless of the position (ambient light), the type of mobile phone (folding type, straight type), and the state of the mobile phone during scanning, the two-dimensional code / barcode can be read accurately.

(第1の実施例の構成)
次に、本発明の実施例の構成について、まず、図1を参照して説明する。図1は、本発明による2次元コード・バーコード読み取り装置のブロック構成の第1の実施例を示すブロック構成図である。図1に示す二次元コード・バーコード読み取り装置10は、入力装置1と、データ処理装置2と、を少なくとも備え、携帯電話機4に画面表示された2次元コード・バーコードを読み取ることを可能としている。
(Configuration of the first embodiment)
Next, the configuration of the embodiment of the present invention will be described with reference to FIG. FIG. 1 is a block configuration diagram showing a first embodiment of a block configuration of a two-dimensional code / barcode reading apparatus according to the present invention. A two-dimensional code / barcode reading device 10 shown in FIG. 1 includes at least an input device 1 and a data processing device 2, and can read a two-dimensional code / barcode displayed on the screen of the mobile phone 4. Yes.

また、入力装置1は、携帯電話機4に画面表示された2次元コード・バーコードをスキャンするスキャナ装置11を少なくとも備え、データ処理装置2は、プログラム制御により動作し、直線検出部21と、矩形領域抽出部22と、歪み・回転補正部23と、2次元コード・バーコードデコード部24とを少なくとも備えている。   The input device 1 includes at least a scanner device 11 that scans a two-dimensional code / barcode displayed on the screen of the mobile phone 4. The data processing device 2 operates under program control, and includes a straight line detection unit 21, a rectangular shape, and the like. At least an area extraction unit 22, a distortion / rotation correction unit 23, and a two-dimensional code / barcode decoding unit 24 are provided.

直線検出部21は、入力装置1のスキャナ装置11から与えられた携帯電話機4の画面に表示された画像データの中から直線を検出する。矩形領域抽出部22は、直線検出部21で検出した直線で囲まれる矩形領域のうち、面積および背景濃度が、携帯画面領域としてあらかじめ定めた一定範囲内となる矩形領域を抽出する。歪み・回転補正部23では、矩形領域抽出部22により抽出された矩形領域(携帯画面領域)を、傾き0度の長方形となるように、歪み補正と、回転補正とを行う。また、2次元コード・バーコードデコード部24では、歪み・回転補正部23において、傾き0度に補正した矩形領域内から、2次元コード・バーコードを検出し、デコード処理を行う。   The straight line detection unit 21 detects a straight line from the image data displayed on the screen of the mobile phone 4 given from the scanner device 11 of the input device 1. The rectangular area extraction unit 22 extracts a rectangular area in which the area and the background density are within a predetermined range determined as a mobile screen area from the rectangular area surrounded by the straight line detected by the straight line detection unit 21. The distortion / rotation correction unit 23 performs distortion correction and rotation correction so that the rectangular area (portable screen area) extracted by the rectangular area extraction unit 22 becomes a rectangle with an inclination of 0 degree. In the two-dimensional code / barcode decoding unit 24, the distortion / rotation correction unit 23 detects a two-dimensional code / barcode from the rectangular area corrected to 0 degree of inclination, and performs decoding processing.

(第1の実施例の動作の説明)
次に、図1に示す2次元コード・バーコード読み取り装置10の動作の一例について、図2のフローチャートを参照して詳細に説明する。図2は、図1に示す携帯電話機10の動作の一例を説明するためのフローチャートである。
(Description of the operation of the first embodiment)
Next, an example of the operation of the two-dimensional code / barcode reader 10 shown in FIG. 1 will be described in detail with reference to the flowchart of FIG. FIG. 2 is a flowchart for explaining an example of the operation of the mobile phone 10 shown in FIG.

図2のフローチャートにおいて、まず、携帯電話機4に画面表示された2次元コード・バーコードを含む画像データを入力装置1のスキャナ装置11によりスキャンして、データ処理装置2の直線検出部21に供給する(ステップA1)。直線検出部21においては、供給された画像データ内に存在するエッジ部を検出し、検出したエッジ部に基づいて画像データ内の直線を検出する(ステップA2)。   In the flowchart of FIG. 2, first, image data including a two-dimensional code and barcode displayed on the screen of the mobile phone 4 is scanned by the scanner device 11 of the input device 1 and supplied to the straight line detection unit 21 of the data processing device 2. (Step A1). The straight line detection unit 21 detects an edge part existing in the supplied image data, and detects a straight line in the image data based on the detected edge part (step A2).

しかる後、矩形領域抽出部22において、直線検出部21によって検出された直線で囲まれる矩形領域のうち、面積および背景濃度が、あらかじめ設定した範囲内となる矩形領域を抽出する(ステップA3)。矩形領域抽出部22において、該当する矩形領域が検出できない場合は(ステップA4のNo)、供給された画像データは異常であるものと判断し、デコード不能を示すエラーコードを出力して、処理を終了する。   Thereafter, the rectangular area extraction unit 22 extracts a rectangular area whose area and background density are within a preset range from the rectangular area surrounded by the straight line detected by the straight line detection unit 21 (step A3). When the rectangular area extraction unit 22 cannot detect the corresponding rectangular area (No in step A4), it determines that the supplied image data is abnormal, outputs an error code indicating that decoding is impossible, and performs processing. finish.

一方、矩形領域抽出部22において、該当する矩形領域が検出できた場合は(ステップA4のYes)、歪み・回転補正部23において、矩形領域抽出部22によって抽出された矩形領域を、傾き0度の長方形となるように、歪み補正と、回転補正とを行う(ステップA5)。しかる後、2次元コード・バーコードデコード部24において、歪み・回転補正部23によって傾き0度の長方形となるように補正された矩形領域内から2次元コード・バーコードを検出し、デコード処理を行う(ステップA6)。   On the other hand, when the corresponding rectangular area can be detected in the rectangular area extracting unit 22 (Yes in step A4), the distortion / rotation correcting unit 23 determines that the rectangular area extracted by the rectangular area extracting unit 22 has an inclination of 0 degree. The distortion correction and the rotation correction are performed so as to form a rectangular shape (step A5). Thereafter, the two-dimensional code / barcode decoding unit 24 detects the two-dimensional code / barcode from the rectangular area corrected to be a rectangle having a tilt of 0 degrees by the distortion / rotation correction unit 23, and performs the decoding process. Perform (Step A6).

次に、図3ないし図5に示す具体例を用いて、第1の実施例の動作についてさらに説明する。図3は、携帯電話機4に画面表示した2次元コード・バーコードから直線を検出する動作の一例を示す説明図であり、図4は、検出された直線の組合せの中から矩形領域を抽出する動作の一例を示す説明図であり、図5は、抽出した矩形領域の歪み・傾きを補正し、2次元コード・バーコードを検出する動作の一例を示す説明図である。   Next, the operation of the first embodiment will be further described with reference to specific examples shown in FIGS. FIG. 3 is an explanatory diagram showing an example of an operation for detecting a straight line from the two-dimensional code / barcode displayed on the screen of the mobile phone 4, and FIG. 4 extracts a rectangular region from the detected combination of straight lines. FIG. 5 is an explanatory diagram illustrating an example of an operation, and FIG. 5 is an explanatory diagram illustrating an example of an operation of correcting a distortion / inclination of an extracted rectangular area and detecting a two-dimensional code / barcode.

まず、図3に示すように、2次元コード・バーコードを表示した携帯電話機4の画像の中からエッジ検出を行い、画像内に含まれる直線を検出する(図2のステップA1およびA2に相当)。次いで、図4に示すように、検出された直線の組み合わせの中から、面積および背景濃度が、携帯電話機4の画面に相当する範囲としてあらかじめ設定した範囲内となる矩形領域を抽出する(図2のステップA3に相当)。ここで、矩形領域として複数の候補がある場合は、画像上方(スキャン開始位置寄り)の矩形領域を採用する。さらに、図5に示すように、矩形領域が回転角0度の長方形になるように、歪み補正および傾き補正を行う(図2のステップA5に相当)。最後に、図5のように歪み・傾きを補正した矩形領域内から、2次元コード・バーコードを検出し、デコード処理を行う(図2のステップA6に相当)。   First, as shown in FIG. 3, edge detection is performed from the image of the mobile phone 4 displaying a two-dimensional code / barcode, and a straight line included in the image is detected (corresponding to steps A1 and A2 in FIG. 2). ). Next, as shown in FIG. 4, a rectangular area whose area and background density are within a preset range as a range corresponding to the screen of the mobile phone 4 is extracted from the detected combination of straight lines (FIG. 2). Equivalent to step A3). Here, when there are a plurality of candidates as the rectangular area, the rectangular area above the image (close to the scan start position) is adopted. Further, as shown in FIG. 5, the distortion correction and the inclination correction are performed so that the rectangular area becomes a rectangle having a rotation angle of 0 degree (corresponding to step A5 in FIG. 2). Finally, a two-dimensional code / barcode is detected from the rectangular area in which the distortion and inclination are corrected as shown in FIG. 5, and the decoding process is performed (corresponding to step A6 in FIG. 2).

(第2の実施例の構成)
次に、本発明の第2の実施例の構成について、図6を参照して説明する。図6は、本発明による2次元コード・バーコード読み取り装置のブロック構成の第2の実施例を示すブロック構成図である。図6に示す2次元コード・バーコード読み取り装置10Aは、図1の場合と同様、入力装置1と、データ処理装置2Aと、を少なくとも備え、携帯電話機4に画面表示された2次元コード・バーコードを読み取ることを可能としている。
(Configuration of the second embodiment)
Next, the configuration of the second embodiment of the present invention will be described with reference to FIG. FIG. 6 is a block diagram showing a second embodiment of the block structure of the two-dimensional code / barcode reader according to the present invention. A two-dimensional code / barcode reading device 10A shown in FIG. 6 includes at least an input device 1 and a data processing device 2A as in the case of FIG. 1, and a two-dimensional code / bar displayed on the mobile phone 4 on the screen. The code can be read.

また、入力装置1は、図1の場合と同様、携帯電話機4に画面表示された2次元コード・バーコードをスキャンするスキャナ装置11を少なくとも備え、データ処理装置2Aは、図1の場合と同様、プログラム制御により動作するが、図1のデータ処理装置2の場合に加えて、さらに、隣接矩形領域抽出部31と、濃度補正部32と、画像合成部33と、を少なくとも備えている。   The input device 1 includes at least a scanner device 11 that scans a two-dimensional code / barcode displayed on the screen of the mobile phone 4 as in the case of FIG. 1, and the data processing device 2A is the same as in FIG. Although operated by program control, in addition to the case of the data processing device 2 of FIG. 1, it further includes at least an adjacent rectangular area extraction unit 31, a density correction unit 32, and an image composition unit 33.

隣接矩形領域抽出部31は、矩形領域抽出部22によって画面領域の候補として抽出した矩形領域の底辺(スキャン終端寄り)に接する隣接矩形領域の有無を検査し、少なくとも面積があらかじめ定めた一定範囲内となる隣接矩形領域が存在すれば、その座標を抽出する。濃度補正部32は、隣接矩形領域抽出部31によって検出した隣接矩形領域の濃度レンジが、矩形領域抽出部22によって検出した矩形領域の濃度レンジと同一になるように、濃度補正を行う。画像合成部33においては、矩形領域抽出部22によって抽出した矩形画像と濃度補正部32において補正した隣接矩形領域とを統合して、2次元コード・バーコードを表示している画面領域として改めて設定する。   The adjacent rectangular area extraction unit 31 inspects whether or not there is an adjacent rectangular area that is in contact with the bottom of the rectangular area extracted as a screen area candidate by the rectangular area extraction unit 22 (near the scan end), and at least the area is within a predetermined range. If there is an adjacent rectangular area, the coordinates are extracted. The density correction unit 32 performs density correction so that the density range of the adjacent rectangular area detected by the adjacent rectangular area extraction unit 31 is the same as the density range of the rectangular area detected by the rectangular area extraction unit 22. In the image composition unit 33, the rectangular image extracted by the rectangular region extraction unit 22 and the adjacent rectangular region corrected by the density correction unit 32 are integrated and set again as a screen region displaying a two-dimensional code / barcode. To do.

(第2の実施例の動作の説明)
次に、図6に示す2次元コード・バーコード読み取り装置10Aの動作の一例について、図7のフローチャートを参照して詳細に説明する。図7は、図6に示す2次元コード・バーコード読み取り装置10Aの動作の一例を説明するためのフローチャートである。
(Description of operation of the second embodiment)
Next, an example of the operation of the two-dimensional code / barcode reader 10A shown in FIG. 6 will be described in detail with reference to the flowchart of FIG. FIG. 7 is a flowchart for explaining an example of the operation of the two-dimensional code / barcode reading apparatus 10A shown in FIG.

図7のフローチャートにおいて、図2の第1の実施例の場合と同様、まず、携帯電話機4に画面表示された2次元コード・バーコードを含む画像データを入力装置1のスキャナ装置11によりスキャンして、データ処理装置2の直線検出部21に供給する(ステップB1)。直線検出部21においては、供給された画像データ内に存在するエッジ部を検出し、検出したエッジ部に基づいて画像データ内の直線を検出する(ステップB2)。   In the flowchart of FIG. 7, as in the first embodiment of FIG. 2, first, image data including a two-dimensional code / barcode displayed on the mobile phone 4 is scanned by the scanner device 11 of the input device 1. Is supplied to the straight line detector 21 of the data processing device 2 (step B1). The straight line detection unit 21 detects an edge part existing in the supplied image data, and detects a straight line in the image data based on the detected edge part (step B2).

しかる後、矩形領域抽出部22において、図2の第1の実施例の場合と同様、直線検出部21によって検出された直線で囲まれる矩形領域のうち、面積および背景濃度が、あらかじめ設定した範囲内となる矩形領域を抽出する(ステップB3)。矩形領域抽出部22において、該当する矩形領域が検出できない場合は(ステップB4のNo)、供給された画像データは異常であるものと判断し、デコード不能を示すエラーコードを出力して、処理を終了する。   Thereafter, in the rectangular area extracting unit 22, as in the case of the first embodiment of FIG. 2, the area and background density of the rectangular area surrounded by the straight line detected by the straight line detecting unit 21 are set in a predetermined range. An inner rectangular area is extracted (step B3). When the rectangular area extraction unit 22 cannot detect the corresponding rectangular area (No in step B4), it determines that the supplied image data is abnormal, outputs an error code indicating that decoding is impossible, and performs processing. finish.

一方、矩形領域抽出部22において、該当する矩形領域が検出できた場合は(ステップA4のYes)、図2に示した第1の実施例の場合とは異なり、まず、隣接矩形領域抽出部31において、矩形領域抽出部22によって画面領域の候補として抽出した矩形領域の底辺(スキャン終端寄り)に接する隣接矩形領域の有無を検査し、面積があらかじめ設定した範囲内となる隣接矩形領域が存在すれば、その座標を抽出する(ステップB5)。ここで、隣接矩形領域が検出できなかった場合は(ステップB6のNo)、ステップB7およびステップB8の処理を省略してステップB9へ移行する。   On the other hand, when the corresponding rectangular area can be detected in the rectangular area extracting unit 22 (Yes in step A4), first, the adjacent rectangular area extracting unit 31 is different from the case of the first embodiment shown in FIG. , The presence or absence of an adjacent rectangular area in contact with the bottom (near the scan end) of the rectangular area extracted as a screen area candidate by the rectangular area extracting unit 22 is checked, and there is an adjacent rectangular area whose area falls within a preset range. If so, the coordinates are extracted (step B5). Here, when the adjacent rectangular area cannot be detected (No in Step B6), the processing in Step B7 and Step B8 is omitted, and the process proceeds to Step B9.

一方、隣接矩形領域抽出部31において、隣接矩形領域を検出することができた場合は(ステップB6のYes)、濃度補正部32において、矩形領域抽出部22によって検出された矩形領域の濃度ヒストグラムを求め、R,G,B各色について最大値と最小値とを計算する。次に、隣接矩形領域抽出部31によって検出された隣接矩形領域の濃度ヒストグラムを求め、R,G,B各色について最大値と最小値とが矩形領域抽出部22によって検出された矩形領域のそれぞれの値と同一になるように濃度変換を行う(ステップB7)。   On the other hand, when the adjacent rectangular area can be detected by the adjacent rectangular area extracting unit 31 (Yes in step B6), the density correction unit 32 displays the density histogram of the rectangular area detected by the rectangular area extracting unit 22. The maximum value and the minimum value are calculated for each of R, G, and B colors. Next, a density histogram of the adjacent rectangular area detected by the adjacent rectangular area extracting unit 31 is obtained, and the maximum value and the minimum value for each color of R, G, B are detected for each of the rectangular areas detected by the rectangular area extracting unit 22. Density conversion is performed so as to be the same as the value (step B7).

しかる後、画像合成部33において、矩形領域抽出部22によって抽出された矩形領域の画像と濃度補正部32によって濃度補正された隣接矩形領域の画像とを統合して、2次元コード・バーコードを表示している画面領域として改めて設定する(ステップB8)。   Thereafter, the image composition unit 33 integrates the image of the rectangular region extracted by the rectangular region extraction unit 22 and the image of the adjacent rectangular region whose density is corrected by the density correction unit 32 to generate a two-dimensional code / barcode. A new screen area is set (step B8).

次いで、歪み・回転補正部23において、画像合成部33において統合された矩形領域または矩形領域抽出部22によって抽出された矩形領域を、傾き0度の長方形となるように、歪み補正と、回転補正とを行う(ステップB9)。しかる後、2次元コード・バーコードデコード部24において、歪み・回転補正部23によって傾き0度の長方形となるように補正された矩形領域内から2次元コード・バーコードを検出し、デコード処理を行う(ステップB10)。   Next, in the distortion / rotation correction unit 23, the distortion correction and the rotation correction are performed so that the rectangular area integrated by the image composition unit 33 or the rectangular area extracted by the rectangular area extraction unit 22 becomes a rectangle with a slope of 0 degree. (Step B9). Thereafter, the two-dimensional code / barcode decoding unit 24 detects the two-dimensional code / barcode from the rectangular area corrected to be a rectangle having a tilt of 0 degrees by the distortion / rotation correction unit 23, and performs the decoding process. Perform (Step B10).

次に、図8ないし図11に示す具体例を用いて、第2の実施例の動作についてさらに説明する。図8は、携帯電話機4に画面表示した2次元コード・バーコードから直線を検出する動作の一例を示す説明図であり、図9は、検出された直線の組合せの中から矩形領域を抽出する動作の一例を示す説明図であり、図10は、矩形領域と隣接矩形領域との濃度を同一にする濃度変換を行い、矩形領域を統合する動作の一例を示す説明図であり、図11は、統合した矩形領域の歪み・傾きを補正し、2次元コード・バーコードを検出する動作の一例を示す説明図である。   Next, the operation of the second embodiment will be further described with reference to specific examples shown in FIGS. FIG. 8 is an explanatory diagram showing an example of an operation for detecting a straight line from a two-dimensional code / barcode displayed on the screen of the mobile phone 4, and FIG. 9 extracts a rectangular region from the detected combination of straight lines. FIG. 10 is an explanatory diagram illustrating an example of the operation. FIG. 10 is an explanatory diagram illustrating an example of an operation for performing density conversion to make the density of the rectangular area and the adjacent rectangular area the same, and integrating the rectangular areas. FIG. 11 is an explanatory diagram illustrating an example of an operation of correcting a distortion / tilt of an integrated rectangular area and detecting a two-dimensional code / barcode.

まず、図8に示すように、2次元コード・バーコードを表示した携帯電話機4の画像の中からエッジ検出を行い、画像内に含まれる直線を検出する(図7のステップB1およびB2に相当)。ここで、2次元コード・バーコードを表示した携帯電話機4の画像をスキャンする際に、フラットベッド型スキャナのスキャン方式が、1次元センサを副走査方向へ移動させながら2次元画像を取り込むものであった場合には、スキャン完了に数秒の時間を要することから、スキャン途中で携帯電話機4の画面が省エネルギーモードに切り替わる状態に移行すると、画面が暗くなり、図8に示すように、携帯電話機4をスキャンして取り込もうとしている画像上、携帯電話機4の画面が明暗の2つの領域に分かれてしまうことになる。   First, as shown in FIG. 8, edge detection is performed from the image of the mobile phone 4 displaying a two-dimensional code / barcode, and a straight line included in the image is detected (corresponding to steps B1 and B2 in FIG. 7). ). Here, when scanning the image of the mobile phone 4 displaying the two-dimensional code / barcode, the scanning method of the flatbed scanner captures the two-dimensional image while moving the one-dimensional sensor in the sub-scanning direction. In such a case, since it takes several seconds to complete the scan, when the screen of the mobile phone 4 is switched to the energy saving mode during the scan, the screen becomes dark, and as shown in FIG. The screen of the mobile phone 4 is divided into two areas of light and dark on the image that is to be scanned and captured.

次いで、図9に示すように、検出された直線の組み合わせの中から、面積および背景濃度が、携帯電話機4の画面に相当する範囲としてあらかじめ設定した範囲内となる矩形領域(以下、矩形領域(明)と称する)を抽出する(図7のステップB3に相当)。ここで、矩形領域として複数の候補がある場合は、画像上方(スキャン開始位置寄り)の矩形領域を画面領域として採用する。しかる後、抽出した矩形領域(明)の底辺(スキャン終端寄り)に接する隣接矩形領域の有無を検査し、図9に示すように、面積があらかじめ設定した範囲内となる隣接矩形領域(省エネルギーモードへの切り替えによって暗転した矩形領域。以下、矩形領域(暗)と称する)が存在している場合には、その座標を抽出する(図7のステップB5に相当)。   Next, as shown in FIG. 9, a rectangular area (hereinafter referred to as a rectangular area (hereinafter referred to as a rectangular area) in which the area and the background density are within a range set in advance as a range corresponding to the screen of the mobile phone 4 from the detected combination of lines. (Referred to as step B3 in FIG. 7). Here, when there are a plurality of candidates as the rectangular area, the rectangular area above the image (close to the scan start position) is adopted as the screen area. Thereafter, the presence or absence of an adjacent rectangular area in contact with the bottom of the extracted rectangular area (bright) (near the scanning end) is inspected, and as shown in FIG. 9, the adjacent rectangular area (energy saving mode) whose area is within a preset range If there is a rectangular area darkened by switching to (hereinafter referred to as a rectangular area (dark)), its coordinates are extracted (corresponding to step B5 in FIG. 7).

さらに、図10に示すように、矩形領域(暗)の濃度ヒストグラムを、R,G,B各色の最大値、最小値が矩形領域(明)におけるR,G,B各色の最大値・最小値と同一になるように濃度変換を行って、矩形領域(明)と濃度変換後の矩形領域(暗)とを統合する(図7のステップB7およびB8に相当)。   Further, as shown in FIG. 10, the density histogram of the rectangular area (dark) is a maximum value / minimum value of each color of R, G, B in the rectangular area (bright). Is converted so that the rectangular area (bright) and the rectangular area after darkness conversion (dark) are integrated (corresponding to steps B7 and B8 in FIG. 7).

しかる後、図11に示すように、統合した矩形領域が回転角0度の長方形になるように、歪み補正および傾き補正を行う(図7のステップB9に相当)。最後に、図11に示すような歪み・傾きを補正した矩形領域内から、2次元コード・バーコードを検出し、デコード処理を行う(図7のステップB10に相当)   Thereafter, as shown in FIG. 11, distortion correction and inclination correction are performed so that the integrated rectangular area becomes a rectangle with a rotation angle of 0 degrees (corresponding to step B9 in FIG. 7). Finally, a two-dimensional code / barcode is detected from the rectangular area in which the distortion and inclination are corrected as shown in FIG. 11, and the decoding process is performed (corresponding to step B10 in FIG. 7).

(実施例の効果の説明)
第1の効果は、スキャン画像から携帯電話機4の画面領域を抽出することによって、画像の歪み、傾きや濃度を補正するようにしているので、携帯電話機4の形式(折りたたみ式、ストレート式)、画面サイズ、環境設定状態(省エネルギーモード)の如何によらず、携帯電話機4の画面に表示された2次元コード・バーコードの読み取りを正確に行うことができることである。この結果、2次元コード・バーコードを画面表示する携帯電話機4の機種や利用者が不特定となる状況下であっても、2次元コード・バーコードの読み取りを正確に行うことができる。
(Explanation of effect of embodiment)
The first effect is to correct the distortion, inclination and density of the image by extracting the screen area of the mobile phone 4 from the scanned image, so the format of the mobile phone 4 (folding type, straight type), The two-dimensional code / barcode displayed on the screen of the mobile phone 4 can be accurately read regardless of the screen size and the environment setting state (energy saving mode). As a result, the two-dimensional code / barcode can be accurately read even in a situation where the model or user of the mobile phone 4 displaying the two-dimensional code / barcode on the screen is unspecified.

第2の効果は、スキャナのスキャン方式(1次元センサ、2次元センサ)、スキャナの設置位置(環境光の映り込み)が異なっていても、その差を吸収し、携帯電話機4の画面に表示された2次元コード・バーコードの読み取りに対応することができることである。   The second effect is that even if the scanning method of the scanner (one-dimensional sensor, two-dimensional sensor) and the installation position of the scanner (reflection of ambient light) are different, the difference is absorbed and displayed on the screen of the mobile phone 4. It is possible to cope with reading of the two-dimensional code / bar code.

以上の説明においては、携帯電話機に画面に表示される2次元コード・バーコードについて説明したが、本発明は、かかる携帯電話機のみに限るものではない。例えば、2次元コード・バーコードの画像表示機能を有するモバイル型の情報端末(PDA、ノートPCなど)についても、全く同様に適用することができる。   In the above description, the two-dimensional code / barcode displayed on the screen of the mobile phone has been described. However, the present invention is not limited to such a mobile phone. For example, the present invention can be applied in the same manner to mobile information terminals (PDA, notebook PC, etc.) having a two-dimensional code / barcode image display function.

以上、本発明の好適実施例の構成を説明した。しかし、斯かる実施例は、本発明の単なる例示に過ぎず、何ら本発明を限定するものではないことに留意されたい。本発明の要旨を逸脱することなく、特定用途に応じて種々の変形変更が可能であることが、当業者には容易に理解できよう。例えば、本発明の実施態様は、課題を解決するための手段における構成(1)に加え、次のような構成として表現できる。   The configuration of the preferred embodiment of the present invention has been described above. However, it should be noted that such examples are merely illustrative of the invention and do not limit the invention in any way. Those skilled in the art will readily understand that various modifications and changes can be made according to a specific application without departing from the gist of the present invention. For example, the embodiment of the present invention can be expressed as the following configuration in addition to the configuration (1) in the means for solving the problems.

(2)スキャンした前記画像データから前記画面領域を抽出する際に、少なくとも面積があらかじめ定めた範囲内にある矩形領域を前記画像データの中から検出することにより、前記画面領域を抽出する上記(1)の2次元コード・バーコード読み取り装置。
(3)前記画像データの中から前記矩形領域を検出する場合、前記画像データ内に存在するエッジ部を抽出して、抽出した該エッジ部により複数の直線を検出し、検出した該直線によって囲まれている領域の形状と面積とに基づいて、前記矩形領域を検出する上記(2)の2次元コード・バーコード読み取り装置。
(4)少なくとも面積があらかじめ定めた範囲内にある前記矩形領域が、前記画像データの中に複数個存在していた場合、最もスキャン開始位置寄りに存在している前記矩形領域を前記画面領域として抽出する上記(2)または(3)の2次元コード・バーコード読み取り装置。
(5)前記画面領域として抽出した前記矩形領域に隣接している隣接矩形領域が存在している場合、該隣接矩形領域を前記矩形領域に統合して、統合後の矩形領域を、2次元バーコード・バーコードを表示している前記画面領域として設定する上記(4)の2次元コード・バーコード読み取り装置。
(6)前記隣接矩形領域を前記矩形領域に統合する際に、前記隣接矩形領域の濃度と前記矩形領域の濃度とを同一の濃度に補正する上記(5)の2次元コード・バーコード読み取り装置。
(7)2次元バーコード・バーコードを表示している画面をスキャンした画像データの中から2次元バーコードを読み取る2次元コード・バーコード読み取り方法において、スキャンした画像データから、2次元バーコード・バーコードを表示している画面領域を抽出した後、抽出した該画面領域の歪みおよび傾きを補正し、補正した後の該画面領域の中から2次元コード・バーコードを読み取る2次元コード・バーコード読み取り方法。
(8)スキャンした前記画像データから前記画面領域を抽出する際に、少なくとも面積があらかじめ定めた範囲内にある矩形領域を前記画像データの中から検出することにより、前記画面領域を抽出する上記(7)の2次元コード・バーコード読み取り方法。
(9)前記画像データの中から前記矩形領域を検出する場合、前記画像データ内に存在するエッジ部を抽出して、抽出した該エッジ部により複数の直線を検出し、検出した該直線によって囲まれている領域の形状と面積とに基づいて、前記矩形領域を検出する上記(8)の2次元コード・バーコード読み取り方法。
(10)少なくとも面積があらかじめ定めた範囲内にある前記矩形領域が、前記画像データの中に複数個存在していた場合、最もスキャン開始位置寄りに存在している前記矩形領域を前記画面領域として抽出する上記(8)または(9)の2次元コード・バーコード読み取り方法。
(11)前記画面領域として抽出した前記矩形領域に隣接している隣接矩形領域が存在している場合、該隣接矩形領域を前記矩形領域に統合して、統合後の矩形領域を、2次元バーコード・バーコードを表示している前記画面領域として設定する上記(10)の2次元コード・バーコード読み取り方法。
(12)前記隣接矩形領域を前記矩形領域に統合する際に、前記隣接矩形領域の濃度と前記矩形領域の濃度とを同一の濃度に補正する上記(11)の2次元コード・バーコード読み取り方法。
(13)上記(7)ないし(12)のいずれかの2次元コード・バーコード読み取り方法を、コンピュータにより実行可能なプログラムとして実施している2次元コード・バーコード読み取りプログラム。
(14)上記(13)の2次元コード・バーコード読み取りプログラムを、コンピュータにより読み取り可能な記録媒体に記録しているプログラム記憶媒体。
(2) When extracting the screen region from the scanned image data, the screen region is extracted by detecting a rectangular region having at least an area within a predetermined range from the image data. 1) Two-dimensional code / barcode reader.
(3) When the rectangular area is detected from the image data, an edge portion existing in the image data is extracted, a plurality of straight lines are detected by the extracted edge portion, and are surrounded by the detected straight lines. The two-dimensional code / barcode reading device according to (2), wherein the rectangular region is detected based on a shape and an area of the region that has been read.
(4) When there are a plurality of the rectangular areas having at least an area within a predetermined range in the image data, the rectangular area closest to the scan start position is set as the screen area. The two-dimensional code / barcode reader of (2) or (3) to be extracted.
(5) When there is an adjacent rectangular area adjacent to the rectangular area extracted as the screen area, the adjacent rectangular area is integrated into the rectangular area, and the combined rectangular area is displayed as a two-dimensional bar. The two-dimensional code / barcode reader according to (4), which is set as the screen area displaying a code / barcode.
(6) The two-dimensional code / barcode reader according to (5), wherein the density of the adjacent rectangular area and the density of the rectangular area are corrected to the same density when the adjacent rectangular areas are integrated into the rectangular area. .
(7) In a two-dimensional code / barcode reading method for reading a two-dimensional barcode from image data obtained by scanning a screen displaying a two-dimensional barcode / barcode, the two-dimensional barcode is obtained from the scanned image data. After extracting the screen area displaying the barcode, the distortion and inclination of the extracted screen area are corrected, and the two-dimensional code that reads the two-dimensional code barcode from the corrected screen area Barcode reading method.
(8) When extracting the screen region from the scanned image data, the screen region is extracted by detecting a rectangular region having at least an area within a predetermined range from the image data. 7) The two-dimensional code / barcode reading method.
(9) When the rectangular area is detected from the image data, an edge portion existing in the image data is extracted, a plurality of straight lines are detected by the extracted edge portion, and are surrounded by the detected straight lines. The two-dimensional code / barcode reading method according to (8), wherein the rectangular area is detected based on a shape and an area of the area being read.
(10) When there are a plurality of the rectangular areas whose area is within a predetermined range in the image data, the rectangular area that is closest to the scan start position is used as the screen area. The two-dimensional code / barcode reading method of (8) or (9) to be extracted.
(11) When there is an adjacent rectangular area adjacent to the rectangular area extracted as the screen area, the adjacent rectangular area is integrated into the rectangular area, and the combined rectangular area is displayed as a two-dimensional bar. The two-dimensional code / barcode reading method according to the above (10), which is set as the screen area displaying a code / barcode.
(12) The two-dimensional code / barcode reading method according to (11), wherein the density of the adjacent rectangular area and the density of the rectangular area are corrected to the same density when the adjacent rectangular areas are integrated into the rectangular area. .
(13) A two-dimensional code / barcode reading program in which the two-dimensional code / barcode reading method according to any one of (7) to (12) is implemented as a program executable by a computer.
(14) A program storage medium in which the two-dimensional code / barcode reading program of (13) is recorded on a computer-readable recording medium.

本発明による2次元コード・バーコード読み取り装置のブロック構成の第1の実施例を示すブロック構成図である。1 is a block configuration diagram showing a first embodiment of a block configuration of a two-dimensional code / bar code reading device according to the present invention; FIG. 図1に示す2次元コード・バーコード読み取り装置の動作の一例を説明するためのフローチャートである。3 is a flowchart for explaining an example of the operation of the two-dimensional code / barcode reading apparatus shown in FIG. 1. 携帯電話機に画面表示した2次元コード・バーコードから直線を検出する動作の一例を示す説明図である。It is explanatory drawing which shows an example of the operation | movement which detects a straight line from the two-dimensional code bar code displayed on the mobile phone screen. 検出された直線の組合せの中から矩形領域を抽出する動作の一例を示す説明図である。It is explanatory drawing which shows an example of the operation | movement which extracts a rectangular area from the combination of the detected straight line. 抽出した矩形領域の歪み・傾きを補正し、2次元コード・バーコードを検出する動作の一例を示す説明図である。It is explanatory drawing which shows an example of the operation | movement which correct | amends distortion and inclination of the extracted rectangular area, and detects a two-dimensional code barcode. 本発明による2次元コード・バーコード読み取り装置のブロック構成の第2の実施例を示すブロック構成図である。It is a block block diagram which shows the 2nd Example of the block configuration of the two-dimensional code barcode reading apparatus by this invention. 図6に示す2次元コード・バーコード読み取り装置の動作の一例を説明するためのフローチャートである。It is a flowchart for demonstrating an example of operation | movement of the two-dimensional code barcode reading apparatus shown in FIG. 携帯電話機に画面表示した2次元コード・バーコードから直線を検出する動作の一例を示す説明図である。It is explanatory drawing which shows an example of the operation | movement which detects a straight line from the two-dimensional code bar code displayed on the mobile phone screen. 検出された直線の組合せの中から矩形領域を抽出する動作の一例を示す説明図である。It is explanatory drawing which shows an example of the operation | movement which extracts a rectangular area from the combination of the detected straight line. 矩形領域と隣接矩形領域との濃度を同一にする濃度変換を行い、矩形領域を統合する動作の一例を示す説明図である。It is explanatory drawing which shows an example of the operation | movement which performs density conversion which makes the density of a rectangular area and an adjacent rectangular area the same, and integrates a rectangular area. 統合した矩形領域の歪み・傾きを補正し、2次元コード・バーコードを検出する動作の一例を示す説明図である。It is explanatory drawing which shows an example of the operation | movement which correct | amends distortion and inclination of the integrated rectangular area, and detects a two-dimensional code | cord | chord.

符号の説明Explanation of symbols

1 入力装置
2 データ処理装置
2A データ処理装置
4 携帯電話機
10 2次元コード・バーコード読み取り装置
10A 2次元コード・バーコード読み取り装置
11 スキャナ装置
21 直線検出部
22 矩形領域抽出部
23 歪み・回転補正部
24 2次元コード・バーコードデコード部
31 隣接矩形領域抽出部
32 濃度補正部
33 画像合成部
DESCRIPTION OF SYMBOLS 1 Input device 2 Data processing device 2A Data processing device 4 Cellular phone 10 Two-dimensional code / bar code reading device 10A Two-dimensional code / bar code reading device 11 Scanner device 21 Straight line detection unit 22 Rectangular area extraction unit 23 Distortion / rotation correction unit 24 Two-dimensional code / barcode decoding unit 31 Adjacent rectangular region extraction unit 32 Density correction unit 33 Image composition unit

Claims (12)

2次元コード・バーコードを表示している画面をスキャンした画像データの中から2次元バーコードを読み取る2次元コード・バーコード読み取り装置において、
矩形領域抽出部により、スキャンした画像データから、2次元コード・バーコードを表示している画面領域の候補として第1矩形領域を抽出した後、
隣接矩形領域抽出部により、前記第1矩形領域のスキャン終端寄りの底辺に接し、且つ、面積の大きさが予め設定した範囲内である第2矩形領域を抽出し、
濃度補正部により、前記第1矩形領域の濃度ヒストグラムを求め、R,G,B各色について最大値と最小値とを計算するとともに、前記第2矩形領域の濃度ヒストグラムを求め、R,G,B各色について最大値と最小値とが、前記第1矩形領域の各値と同一になるように濃度変換を行った後で、
画像合成部により、前記第1矩形領域の画像と前記濃度補正部により濃度変換された前記第2矩形領域の画像とを統合し、2次元コード・バーコードを表示している画面領域として改めて設定し、
歪み・回転補正部により、前記画像合成部において統合された領域の画像に対して歪みおよび傾き補正を行い
2次元コード・バーコードデコード部により、補正された領域の画像から2次元コード・バーコードを検出しデコード処理を行う2次元コード・バーコード読み取り装置。
In a two-dimensional code / barcode reader for reading a two-dimensional barcode from image data obtained by scanning a screen displaying a two-dimensional code / barcode,
After extracting the first rectangular area from the scanned image data as a candidate of the screen area displaying the two-dimensional code / barcode by the rectangular area extracting unit ,
The adjacent rectangular area extraction unit extracts a second rectangular area that is in contact with the bottom of the first rectangular area near the scanning end and that has an area size within a preset range;
A density correction unit obtains a density histogram of the first rectangular area, calculates a maximum value and a minimum value for each color of R, G, and B, and obtains a density histogram of the second rectangular area, and calculates R, G, B. After performing density conversion so that the maximum value and the minimum value for each color are the same as the values of the first rectangular area,
The image composition unit integrates the image of the first rectangular area and the image of the second rectangular area whose density has been converted by the density correction unit, and newly sets it as a screen area displaying a two-dimensional code / barcode. And
The distortion-rotation correction unit performs the distortion and inclination of the correction for the integrated area image in the image synthesis unit,
A two- dimensional code / barcode reader for detecting a two-dimensional code / barcode from an image of a corrected area by a two-dimensional code / barcode decoding unit and performing a decoding process .
スキャンした前記画像データから前記第1矩形領域を抽出する際に、少なくとも面積があらかじめ定めた範囲内にある矩形領域を前記第1矩形領域として検出することを特徴とする請求項1に記載の2次元コード・バーコード読み取り装置。 2. The method according to claim 1, wherein when extracting the first rectangular area from the scanned image data, a rectangular area having at least an area within a predetermined range is detected as the first rectangular area. Dimension code / bar code reader. 前記画像データの中から前記矩形領域を検出する場合、前記画像データ内に存在するエッジ部を抽出して、抽出した該エッジ部により複数の直線を検出し、検出した該直線によって囲まれている領域の形状と面積とに基づいて、前記矩形領域を検出することを特徴とする請求項2に記載の2次元コード・バーコード読み取り装置。   When the rectangular area is detected from the image data, an edge portion existing in the image data is extracted, a plurality of straight lines are detected by the extracted edge portion, and are surrounded by the detected straight lines. 3. The two-dimensional code / bar code reading device according to claim 2, wherein the rectangular area is detected based on a shape and an area of the area. 少なくとも面積があらかじめ定めた範囲内にある前記矩形領域が、前記画像データの中に複数個存在していた場合、最もスキャン開始位置寄りに存在している前記矩形領域を前記第1矩形領域として抽出することを特徴とする請求項2または3に記載の2次元コード・バーコード読み取り装置。   If there are a plurality of rectangular areas in the image data that have at least an area within a predetermined range, the rectangular area that is closest to the scan start position is extracted as the first rectangular area. The two-dimensional code / bar code reader according to claim 2 or 3, wherein 前記第2矩形領域を前記第1矩形領域に統合する際に、前記第2矩形領域の濃度と前記第1矩形領域の濃度とを同一の濃度に補正することを特徴とする請求項1ないし4のいずれか1項に記載の2次元コード・バーコード読み取り装置。   5. The density of the second rectangular area and the density of the first rectangular area are corrected to the same density when the second rectangular area is integrated with the first rectangular area. The two-dimensional code / bar code reader according to any one of the above. 2次元コード・バーコードを表示している画面をスキャンした画像データの中から2次元バーコードを読み取る2次元コード・バーコード読み取り方法において、
スキャンした画像データから、2次元コード・バーコードを表示している画面領域の候補として第1矩形領域を抽出した後、
前記第1矩形領域のスキャン終端寄りの底辺に接し、且つ、面積の大きさが予め設定した範囲内である第2矩形領域を抽出し、
前記第1矩形領域の濃度ヒストグラムを求め、R,G,B各色について最大値と最小値とを計算するとともに、前記第2矩形領域の濃度ヒストグラムを求め、R,G,B各色について最大値と最小値とが、前記第1矩形領域の各値と同一になるように濃度変換を行った後で、
前記第1矩形領域の画像と濃度変換された前記第2矩形領域の画像とを統合し、2次元コード・バーコードを表示している画面領域として改めて設定し、
前記第1矩形領域の画像と濃度変換された前記第2矩形領域の画像とが統合された領域の画像に対して歪みおよび傾き補正を行い
歪みおよび傾きの補正を行った領域の画像から2次元コード・バーコードを検出しデコード処理を行う2次元コード・バーコード読み取り方法。
In a two-dimensional code / barcode reading method for reading a two-dimensional barcode from image data obtained by scanning a screen displaying a two-dimensional code / barcode,
After extracting the first rectangular area from the scanned image data as a candidate of the screen area displaying the two-dimensional code / barcode,
Extracting a second rectangular area in contact with the bottom of the first rectangular area near the scanning end and having a size within a preset range;
The density histogram of the first rectangular area is obtained and the maximum value and the minimum value are calculated for each of the R, G, and B colors, and the density histogram of the second rectangular area is obtained and the maximum value is obtained for each of the R, G, and B colors. After performing density conversion so that the minimum value is the same as each value of the first rectangular area,
The image of the first rectangular area and the image of the second rectangular area whose density has been converted are integrated, and set again as a screen area displaying a two-dimensional code / barcode,
Performs distortion and inclination correction with respect to the first rectangular region of the image and the density converted the second rectangular region of the image and the image of the integrated region,
A two-dimensional code / barcode reading method in which a two-dimensional code / barcode is detected from an image of a region subjected to distortion and inclination correction, and decoding is performed .
スキャンした前記画像データから前記第1矩形領域を抽出する際に、少なくとも面積があらかじめ定めた範囲内にある矩形領域を前記第1矩形領域として検出することを特徴とする請求項6に記載の2次元コード・バーコード読み取り方法。 7. The method according to claim 6, wherein when extracting the first rectangular area from the scanned image data, a rectangular area having at least an area within a predetermined range is detected as the first rectangular area. Dimension code / Bar code reading method. 前記画像データの中から前記矩形領域を検出する場合、前記画像データ内に存在するエッジ部を抽出して、抽出した該エッジ部により複数の直線を検出し、検出した該直線によって囲まれている領域の形状と面積とに基づいて、前記矩形領域を検出することを特徴とする請求項7に記載の2次元コード・バーコード読み取り方法。   When the rectangular area is detected from the image data, an edge portion existing in the image data is extracted, a plurality of straight lines are detected by the extracted edge portion, and are surrounded by the detected straight lines. 8. The two-dimensional code / barcode reading method according to claim 7, wherein the rectangular area is detected based on a shape and an area of the area. 少なくとも面積があらかじめ定めた範囲内にある前記矩形領域が、前記画像データの中に複数個存在していた場合、最もスキャン開始位置寄りに存在している前記矩形領域を前記第1矩形領域として抽出することを特徴とする請求項7または8に記載の2次元コード・バーコード読み取り方法。   If there are a plurality of rectangular areas in the image data that have at least an area within a predetermined range, the rectangular area that is closest to the scan start position is extracted as the first rectangular area. The two-dimensional code / barcode reading method according to claim 7 or 8, wherein: 前記第2矩形領域を前記第1矩形領域に統合する際に、前記第2矩形領域の濃度と前記第1矩形領域の濃度とを同一の濃度に補正することを特徴とする請求項6ないし9のいずれか1項に記載の2次元コード・バーコード読み取り方法。   10. The density of the second rectangular area and the density of the first rectangular area are corrected to the same density when integrating the second rectangular area into the first rectangular area. The two-dimensional code / barcode reading method according to any one of the above. 請求項6ないし10のいずれかに記載の2次元コード・バーコード読み取り方法を、コンピュータにより実行可能なプログラムとして実施していることを特徴とする2次元コード・バーコード読み取りプログラム。   11. A two-dimensional code / barcode reading program, wherein the two-dimensional code / barcode reading method according to claim 6 is implemented as a program executable by a computer. 請求項11に記載の2次元コード・バーコード読み取りプログラムを、コンピュータにより読み取り可能な記録媒体に記録していることを特徴とするプログラム記憶媒体。   12. A program storage medium, wherein the two-dimensional code / bar code reading program according to claim 11 is recorded on a computer-readable recording medium.
JP2007315532A 2007-12-06 2007-12-06 Two-dimensional code / barcode reading device, two-dimensional code / barcode reading method, program, and recording medium Expired - Fee Related JP5251096B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007315532A JP5251096B2 (en) 2007-12-06 2007-12-06 Two-dimensional code / barcode reading device, two-dimensional code / barcode reading method, program, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007315532A JP5251096B2 (en) 2007-12-06 2007-12-06 Two-dimensional code / barcode reading device, two-dimensional code / barcode reading method, program, and recording medium

Publications (2)

Publication Number Publication Date
JP2009140207A JP2009140207A (en) 2009-06-25
JP5251096B2 true JP5251096B2 (en) 2013-07-31

Family

ID=40870756

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007315532A Expired - Fee Related JP5251096B2 (en) 2007-12-06 2007-12-06 Two-dimensional code / barcode reading device, two-dimensional code / barcode reading method, program, and recording medium

Country Status (1)

Country Link
JP (1) JP5251096B2 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3058791B2 (en) * 1994-01-31 2000-07-04 東芝テック株式会社 Method of extracting figure of image recognition device
JP4276972B2 (en) * 2003-03-17 2009-06-10 株式会社リコー Image recognition apparatus and image recognition method
JP2006081593A (en) * 2004-09-14 2006-03-30 Aruze Corp Game machine, control method of game machine, game system, server and portable terminal

Also Published As

Publication number Publication date
JP2009140207A (en) 2009-06-25

Similar Documents

Publication Publication Date Title
US10484610B2 (en) Image-capturing apparatus, captured image processing system, program, and recording medium
US9047531B2 (en) Interactive user interface for capturing a document in an image signal
US8289403B2 (en) Image processing system
US6885776B2 (en) Image merging apparatus
US8174737B2 (en) Image reading apparatus
US8413903B1 (en) Decoding barcodes
US8472727B2 (en) Document comparison and analysis for improved OCR
US20120294528A1 (en) Method of Detecting and Correcting Digital Images of Books in the Book Spine Area
US8331720B2 (en) Image processing device, method, and program
US10694098B2 (en) Apparatus displaying guide for imaging document, storage medium, and information processing method
US8181850B2 (en) Anti-tamper using barcode degradation
JP2013126004A (en) Image processing device, image generation method, and computer program
EP3358816B1 (en) Image-reading device and image-forming device
JP5200786B2 (en) Difference extraction apparatus and difference extraction program
JP4623377B2 (en) Image processing apparatus and image processing program
JP5251096B2 (en) Two-dimensional code / barcode reading device, two-dimensional code / barcode reading method, program, and recording medium
US20100149557A1 (en) Image processing apparatus and image processing method
JP4277768B2 (en) Photo image area extraction device and copy device
JP3582988B2 (en) Non-contact image reader
US20050152616A1 (en) Method and apparatus for automatic scanner defect detection
JP5618664B2 (en) Image processing method, program, image reading apparatus, and information device
JP2011175314A (en) Two-dimensional bar code reader, program, two-dimensional bar code, and medium
JP4901928B2 (en) Image composition method, image composition apparatus, and program
JP2009181594A (en) Image reader
JP4931897B2 (en) Image processing apparatus, image forming apparatus, image processing method, computer program, and recording medium

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20091211

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20091214

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20101105

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20121005

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20121016

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20121127

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20121225

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130222

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: 20130319

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130401

R150 Certificate of patent or registration of utility model

Ref document number: 5251096

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20160426

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees