JP2008282339A - Code detection program, code detection method, and image forming apparatus - Google Patents

Code detection program, code detection method, and image forming apparatus Download PDF

Info

Publication number
JP2008282339A
JP2008282339A JP2007128226A JP2007128226A JP2008282339A JP 2008282339 A JP2008282339 A JP 2008282339A JP 2007128226 A JP2007128226 A JP 2007128226A JP 2007128226 A JP2007128226 A JP 2007128226A JP 2008282339 A JP2008282339 A JP 2008282339A
Authority
JP
Japan
Prior art keywords
extracted
reference line
code
scanned image
edges
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2007128226A
Other languages
Japanese (ja)
Other versions
JP4465723B2 (en
Inventor
Jo Nakajima
丈 中嶋
Hirohiko Yamazaki
博彦 山崎
Koichi Kitamoto
浩一 北本
Takeshi Yoneyama
剛 米山
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.)
Konica Minolta Business Technologies Inc
Original Assignee
Konica Minolta Business Technologies Inc
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 Konica Minolta Business Technologies Inc filed Critical Konica Minolta Business Technologies Inc
Priority to JP2007128226A priority Critical patent/JP4465723B2/en
Priority to US12/114,629 priority patent/US8172144B2/en
Publication of JP2008282339A publication Critical patent/JP2008282339A/en
Application granted granted Critical
Publication of JP4465723B2 publication Critical patent/JP4465723B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a code detection program, a code detection method, and an image forming apparatus, capable of detecting simply and surely a one-dimensional code and a two-dimensional code from a printed matter, even when scanning diagonally the printed matter mixed with image information such as a photograph and text information. <P>SOLUTION: A reference line specifying part extracts an edge by executing one level of binomial wavelet conversion to a scan image, selects the edge with a prescribed value or more of high-frequency intensity, out of the extracted edges, Hough-transforms the selected edge to extract a straight line, and specifies a reference line, out of the extracted straight line, a candidate area specifying part specifies an area with the prescribed number or more of specified-directional straight lines with respect to the reference line, as a candidate area, and a code detecting part detects a code 31 by carrying out pattern-matching to the candidate area, or detects the code 31 by carrying out pattern-matching to the reference line. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、1次元バーコードや2次元コードなどのコードを検出するプログラム及び方法並びにコードを検出する機能を備えた画像形成装置に関する。   The present invention relates to a program and method for detecting a code such as a one-dimensional barcode or a two-dimensional code, and an image forming apparatus having a function for detecting the code.

近年の雑誌やフリーペーパー等の印刷物は、店舗等のURL(Uniform Resource Locator)情報を記録したQRコード(登録商標)等の2次元コードが印刷されているものが多く、ユーザは、携帯電話機の撮影機能を用いて2次元コードを読み込み、ネットワーク接続機能を用いて2次元コードに記録されたURLにアクセスすることにより、割引券等を入手するなどのサービスを受けることができる。しかしながら、例えば、操作を容易にするために機能を簡略化した携帯電話機やビジネス用途の携帯電話機には撮影機能が搭載されていない機種もあり、このような携帯電話機を利用するユーザは上記サービスを受けることができない。   Many printed materials such as magazines and free paper in recent years are printed with a two-dimensional code such as QR code (registered trademark) in which URL (Uniform Resource Locator) information of stores is recorded. By reading the two-dimensional code using the photographing function and accessing the URL recorded in the two-dimensional code using the network connection function, it is possible to receive a service such as obtaining a discount ticket. However, for example, some mobile phones with simplified functions for easy operation and mobile phones for business use do not have a shooting function, and users using such mobile phones cannot use the above services. I can't receive it.

一方、インターネット等の通信ネットワークに接続する機能を備えた画像形成装置が普及しており、様々な場所に設置されていることから、撮影機能の無い携帯電話機を利用するユーザは、コンビニエンスストア等に設置された画像形成装置でフリーペーパー等をスキャンして2次元コードを抽出することにより、上記サービスを受けることが可能となる。この場合、確実に2次元コードを抽出するためには画像形成装置で適切な画像処理を行う必要があり、このような画像処理の例として、例えば、下記特許文献1には、画像エッジを抽出し、ハフ変換、最小2乗近似で交差する2直線を探し、候補領域を決定する方法が開示されている。   On the other hand, since image forming apparatuses having a function of connecting to a communication network such as the Internet are widespread and installed in various places, a user who uses a mobile phone without a photographing function can enter a convenience store or the like. By scanning a free paper or the like with the installed image forming apparatus and extracting a two-dimensional code, the above service can be received. In this case, in order to reliably extract the two-dimensional code, it is necessary to perform appropriate image processing in the image forming apparatus. As an example of such image processing, for example, Patent Document 1 below extracts an image edge. In addition, a method is disclosed in which candidate lines are determined by searching for two straight lines that intersect with the Hough transform and least square approximation.

特開平07−220081号公報Japanese Patent Application Laid-Open No. 07-220081

一般的に、スキャン画像からQRコードを抽出する方法としては、QRコードの角に設けられた「切り出しシンボル」をパターンマッチングで探す方法が用いられるが、QRコードが印刷される領域は一定ではないため、スキャン画像の全ての領域に対してパターンマッチングを実施しなければならず、画像処理に時間がかかるという問題があった。   Generally, as a method of extracting a QR code from a scanned image, a method of searching for “cutout symbols” provided at corners of the QR code by pattern matching is used. However, the area where the QR code is printed is not constant. For this reason, pattern matching has to be performed on all areas of the scanned image, and there is a problem that it takes time for image processing.

また、印刷物をスキャナ上に置いてスキャンする際、印刷物が斜めにセットされる場合もあり、スキャン画像の画角に対してQRコードが必ずしも平行、直角であるとは限らないため、QRコードを確実に抽出するためには、あらゆる角度でパターンマッチングを実施しなければならず、更に、画像処理に時間がかかるという問題があった。   In addition, when the printed material is placed on the scanner and scanned, the printed material may be set obliquely, and the QR code is not necessarily parallel or perpendicular to the angle of view of the scanned image. In order to extract it reliably, pattern matching has to be performed at every angle, and there is a problem that it takes time for image processing.

このような問題に対して、上記特許文献1の画像処理方法を用いることも考えられるが、雑誌やフリーペーパー等の印刷物には写真等の画像情報が印刷されている場合が多く、画像情報には大量のエッジが存在するため、ハフ変換により膨大な量の直線が抽出されてしまい、その結果、解析ができなくなってしまったり、画像処理に膨大な時間がかかってしまうという問題が生じる。   For such a problem, it is conceivable to use the image processing method disclosed in Patent Document 1, but image information such as photographs is often printed on printed matter such as magazines and free paper. Since there are a large number of edges, a huge amount of straight lines are extracted by the Hough transform. As a result, there is a problem that analysis cannot be performed and image processing takes a long time.

本発明は上記問題点に鑑みてなされたものであり、その主たる目的は、写真等の画像情報やテキスト情報が混在する印刷物が斜めにスキャンされた場合であっても、印刷物から1次元バーコードや2次元コードを簡単かつ確実に検出することができるコード検出プログラム及びコード検出方法並びに画像形成装置を提供することにある。   The present invention has been made in view of the above problems, and the main object of the present invention is to provide a one-dimensional barcode from a printed material even when the printed material including image information such as a photograph and text information is scanned obliquely. Another object of the present invention is to provide a code detection program, a code detection method, and an image forming apparatus capable of easily and reliably detecting a two-dimensional code.

上記目的を達成するため、本発明のコード検出プログラムは、コンピュータを、少なくとも1次元バーコード又は2次元コードが印刷された印刷物をスキャンして得られたスキャン画像からエッジを抽出し、抽出したエッジから直線を抽出し、抽出した直線の内、最も長い直線を基準線として特定する基準線特定部、前記基準線に対して特定の向きで前記スキャン画像に対してパターンマッチングを行い、前記1次元バーコード又は前記2次元コードを検出するコード検出部、として機能させるものである。   In order to achieve the above object, the code detection program of the present invention extracts edges from a scan image obtained by scanning a printed material on which a computer is printed with at least a one-dimensional barcode or two-dimensional code. A straight line is extracted from the reference line, a reference line specifying unit that specifies the longest straight line among the extracted straight lines as a reference line, pattern matching is performed on the scanned image in a specific direction with respect to the reference line, and the one-dimensional It functions as a code detection unit that detects a barcode or the two-dimensional code.

また、本発明のコード検出プログラムは、コンピュータを、少なくとも1次元バーコード又は2次元コードが印刷された印刷物をスキャンして得られたスキャン画像からエッジを抽出し、抽出したエッジから直線を抽出し、抽出した直線の内、最も長い直線を基準線として特定する基準線特定部、前記スキャン画像を分割した領域の内、前記基準線に対して特定の向きの直線が所定数以上含まれる領域を候補領域として特定する候補領域特定部、前記スキャン画像の前記候補領域に対してパターンマッチングを行い、前記1次元バーコード又は前記2次元コードを検出するコード検出部、として機能させるものである。   Further, the code detection program of the present invention extracts edges from a scanned image obtained by scanning a printed material on which at least a one-dimensional barcode or two-dimensional code is printed, and extracts a straight line from the extracted edges. A reference line specifying unit for specifying the longest straight line as a reference line among the extracted straight lines; an area including a predetermined number or more of straight lines in a specific direction with respect to the reference line among the divided areas of the scan image It functions as a candidate area specifying unit that specifies as a candidate area, and a code detection unit that performs pattern matching on the candidate area of the scanned image and detects the one-dimensional barcode or the two-dimensional code.

本発明においては、前記特定の向きは、前記基準線に対して略平行及び/又は略直角の方向とすることができる。   In the present invention, the specific direction may be a direction substantially parallel and / or substantially perpendicular to the reference line.

また、本発明においては、前記基準線特定部は、前記スキャン画像に1レベルの二項ウェーブレット変換を行ってエッジを抽出し、抽出したエッジの中から高周波強度が所定値以上のエッジを選別し、選別したエッジにハフ変換を行って直線を抽出し、抽出した直線の中からハフ変換の投票数が最も多い直線を前記基準線として特定する構成とすることができる。   In the present invention, the reference line specifying unit performs one-level binomial wavelet transform on the scanned image to extract edges, and selects edges having a high frequency intensity equal to or higher than a predetermined value from the extracted edges. The selected edge is subjected to Hough transform to extract a straight line, and the straight line having the largest number of Hough transform votes is specified as the reference line from the extracted straight lines.

また、本発明は、印刷物に印刷された1次元バーコード又は2次元コードを検出するコード検出方法であって、前記印刷物をスキャンして、スキャン画像を取得するステップと、抽出したエッジから直線を抽出するステップと、抽出した直線の内、最も長い直線を基準線として特定するステップと、変換した直線の内、最も長い直線を基準線として特定するステップと、前記基準線に対して特定の向きで前記スキャン画像に対してパターンマッチングを行い、前記1次元バーコード又は前記2次元コードを抽出するステップと、を少なくとも有するものである。   The present invention also provides a code detection method for detecting a one-dimensional barcode or two-dimensional code printed on a printed material, the step of scanning the printed material to obtain a scanned image, and a straight line from the extracted edge. Extracting, identifying the longest straight line among the extracted straight lines as a reference line, identifying the longest straight line among the converted straight lines as a reference line, and a specific direction with respect to the reference line And performing pattern matching on the scanned image and extracting the one-dimensional barcode or the two-dimensional code.

また、本発明は、印刷物に印刷された1次元バーコード又は2次元コードを検出するコード検出方法であって、前記印刷物をスキャンして、スキャン画像を取得するステップと、前記スキャン画像からエッジを抽出するステップと、抽出したエッジから直線を抽出するステップと、抽出した直線の内、最も長い直線を基準線として特定するステップと、前記スキャン画像を複数の領域に分割するステップと、前記複数の領域の内、前記基準線に対して特定の向きの直線が所定数以上含まれる領域を候補領域として特定するステップと、前記スキャン画像の前記候補領域に対してパターンマッチングを行い、前記1次元バーコード又は前記2次元コードを抽出するステップと、を少なくとも有するものである。   The present invention also provides a code detection method for detecting a one-dimensional barcode or two-dimensional code printed on a printed material, the step of scanning the printed material to obtain a scanned image, and an edge from the scanned image. Extracting, a step of extracting a straight line from the extracted edges, a step of identifying the longest straight line among the extracted straight lines as a reference line, a step of dividing the scan image into a plurality of regions, Specifying a region that includes a predetermined number or more of straight lines in a specific direction with respect to the reference line, as a candidate region, pattern matching is performed on the candidate region of the scanned image, and the one-dimensional bar Extracting at least a code or the two-dimensional code.

本発明においては、前記エッジを抽出するステップでは、前記スキャン画像に1レベルの二項ウェーブレット変換を行ってエッジを抽出し、前記直線を抽出するステップでは、抽出したエッジの中から高周波強度が所定値以上のエッジを選別し、選別したエッジにハフ変換を行って直線を抽出し、前記基準線を特定するステップでは、抽出した直線の中からハフ変換の投票数が最も多い直線を前記基準線として特定する構成とすることができる。   In the present invention, in the step of extracting the edge, a one-level binomial wavelet transform is performed on the scanned image to extract an edge, and in the step of extracting the straight line, a high frequency intensity is predetermined from the extracted edge. In the step of selecting edges that are equal to or greater than the value, performing a Hough transform on the selected edges to extract a straight line, and identifying the reference line, the straight line having the largest number of votes for the Hough transform is selected from the extracted straight lines. It can be set as the structure specified as.

また、本発明は、少なくともスキャナ部を備える画像形成装置であって、少なくとも1次元バーコード又は2次元コードが印刷された印刷物をスキャンして得られたスキャン画像からエッジを抽出し、抽出したエッジから直線を抽出し、抽出した直線の内、最も長い直線を基準線として特定する基準線特定部と、前記基準線に対して特定の向きで前記スキャン画像に対してパターンマッチングを行い、前記1次元バーコード又は前記2次元コードを検出するコード検出部と、を備えるものである。   The present invention is also an image forming apparatus including at least a scanner unit, and extracts edges from a scanned image obtained by scanning a printed material on which at least a one-dimensional barcode or two-dimensional code is printed. A straight line is extracted from the reference line, a reference line specifying unit that specifies the longest straight line among the extracted straight lines as a reference line, pattern matching is performed on the scanned image in a specific direction with respect to the reference line, and the 1 And a code detector for detecting the two-dimensional code.

また、本発明は、少なくともスキャナ部を備える画像形成装置であって、少なくとも1次元バーコード又は2次元コードが印刷された印刷物をスキャンして得られたスキャン画像からエッジを抽出し、抽出したエッジから直線を抽出し、抽出した直線の内、最も長い直線を基準線として特定する基準線特定部と、前記スキャン画像を分割した領域の内、前記基準線に対して特定の向きの直線が所定数以上含まれる領域を候補領域として特定する候補領域特定部と、前記スキャン画像の前記候補領域に対してパターンマッチングを行い、前記1次元バーコード又は前記2次元コードを検出するコード検出部と、を備えるものである。   The present invention is also an image forming apparatus including at least a scanner unit, and extracts edges from a scanned image obtained by scanning a printed material on which at least a one-dimensional barcode or two-dimensional code is printed. A straight line is extracted from the reference line, a reference line specifying unit that specifies the longest straight line among the extracted straight lines as a reference line, and a straight line in a specific direction with respect to the reference line is predetermined among the divided areas of the scan image A candidate region specifying unit that specifies a region included in a number as a candidate region, a code detection unit that performs pattern matching on the candidate region of the scanned image, and detects the one-dimensional barcode or the two-dimensional code; Is provided.

このように、本発明では、基準線に対して特定の向きでパターンマッチングを行うか、若しくは、その基準線に対して特定の向きの直線が所定数以上含まれる候補領域に対してパターンマッチングを行えばよいため、印刷物から1次元バーコードや2次元コードを簡単かつ確実に検出することができる。   As described above, in the present invention, pattern matching is performed in a specific direction with respect to a reference line, or pattern matching is performed on a candidate region including a predetermined number or more of straight lines with a specific direction with respect to the reference line. Therefore, the one-dimensional barcode and the two-dimensional code can be easily and reliably detected from the printed material.

本発明のコード検出プログラム及びコード検出方法並びに画像形成装置によれば、写真等の画像情報やテキスト情報が混在している印刷物が斜めにスキャンされた場合であっても、印刷物から1次元バーコードや2次元コードを簡単かつ確実に検出することができる。   According to the code detection program, the code detection method, and the image forming apparatus of the present invention, a one-dimensional barcode is printed from a printed material even when the printed material including image information such as a photograph and text information is scanned obliquely. And a two-dimensional code can be detected easily and reliably.

その理由は、1次元バーコードや2次元コード等のコードが印刷された印刷物をスキャンして得たスキャン画像に二項ウェーブレット変換を行ってエッジを抽出し、抽出したエッジの中から高周波強度が所定値以上のエッジを選別し、選別したエッジに対してハフ変換を行って直線を抽出し、抽出した直線の中から基準線を特定し、その基準線に対して特定の向き(例えば、基準線に平行及び/又は直角)でスキャン画像に対してパターンマッチングを行ってコードを検出するため、あらゆる方向に対してパターンマッチングを行う従来方法に比べて、処理を容易にすることができるからである。   The reason is that a scan image obtained by scanning a printed matter on which a code such as a one-dimensional barcode or a two-dimensional code is scanned performs binomial wavelet transform to extract an edge, and the high frequency intensity is extracted from the extracted edge. Edges that exceed a predetermined value are selected, a Hough transform is performed on the selected edges, a straight line is extracted, a reference line is specified from the extracted straight lines, and a specific direction (for example, a reference) is specified with respect to the reference line. Because the code is detected by performing pattern matching on the scanned image in parallel and / or at right angles to the line, the processing can be made easier compared to the conventional method in which pattern matching is performed in all directions. is there.

また、スキャン画像に二項ウェーブレット変換を行ってエッジを抽出し、抽出したエッジの中から高周波強度が所定値以上のエッジを選別し、選別したエッジに対してハフ変換を行って直線を抽出し、抽出した直線の中から基準線を特定し、その基準線に対して特定の向き(例えば、基準線に平行及び/又は直角)の直線が所定数以上含まれる領域を候補領域として特定し、スキャン画像の候補領域に対してパターンマッチングを行ってコードを検出するため、全ての領域に対してパターンマッチングを行う従来方法に比べて、処理を容易にすることができるからである。   Also, the binomial wavelet transform is performed on the scanned image to extract the edges, the edges having a high frequency intensity of a predetermined value or more are selected from the extracted edges, and the Hough transform is performed on the selected edges to extract a straight line. , Specifying a reference line from the extracted straight lines, specifying a region including a predetermined number or more of straight lines in a specific direction (for example, parallel and / or perpendicular to the reference line) as a candidate region, This is because the code is detected by performing pattern matching on the candidate area of the scan image, and therefore, the processing can be facilitated as compared with the conventional method in which pattern matching is performed on all areas.

従来技術で示したように、雑誌やフリーペーパーなどの印刷物に印刷された1次元バーコードや2次元コード等のコードを読み取る用途に画像形成装置が利用されているが、上記印刷物にはコードの他に、画像情報やテキスト情報など、様々な情報が印刷されており、また、印刷物がスキャナ台に斜めにセットされてしまう場合もあるため、画像形成装置では、印刷物をスキャンして得たスキャン画像に対して、あらゆる方向から全領域に対してパターンマッチングを実施する必要が生じ、画像処理に時間がかかってしまうという問題があった。   As shown in the prior art, image forming apparatuses are used for reading codes such as one-dimensional barcodes and two-dimensional codes printed on printed materials such as magazines and free paper. In addition, various information such as image information and text information is printed, and the printed material may be set obliquely on the scanner base, so the image forming apparatus scans the printed material. There is a problem in that it is necessary to perform pattern matching on the entire region from all directions on the image, and image processing takes time.

一方、雑誌やフリーペーパーなどの印刷物には、通常、デザインや見やすさ等を考慮して、境界を示す枠線や仕切り線などの長い直線が印刷されており、1次元バーコードや2次元コードなどは、その直線に対して平行及び/又は直角に印刷されている。従って、スキャンデータに対して適切な画像処理を行って枠線や仕切り線などを検出することができれば、その線を基準にして容易にコードを検出することが可能になる。   On the other hand, printed matter such as magazines and free papers are usually printed with long straight lines such as border lines and dividing lines indicating boundaries, taking into account design and ease of viewing. Are printed parallel and / or perpendicular to the straight line. Accordingly, if appropriate image processing can be performed on the scan data to detect a frame line, a partition line, or the like, a code can be easily detected based on the line.

そこで、本実施形態では、後述する二項ウェーブレット変換及びハフ変換を利用して、スキャン画像に二項ウェーブレット変換を行ってエッジを抽出し、抽出したエッジの中から高周波強度が所定値以上のエッジを選別し、選別したエッジに対してハフ変換を行って直線を抽出し、抽出した直線の中から基準線を特定し、その基準線に対して特定の向きでスキャン画像に対してパターンマッチングを行ってコードを検出する方法、若しくは、スキャン画像に二項ウェーブレット変換を行ってエッジを抽出し、抽出したエッジの中から高周波強度が所定値以上のエッジを選別し、選別したエッジに対してハフ変換を行って直線を抽出し、抽出した直線の中から基準線を特定し、その基準線に対して特定の向きの直線が所定数以上含まれる領域を候補領域として特定し、スキャン画像の候補領域に対してパターンマッチングを行ってコードを検出する方法を採用し、印刷物から簡単かつ確実にコードを検出できるようにする。以下、基準線の特定に利用する二項ウェーブレット変換及びハフ変換について概説する。   Therefore, in the present embodiment, using binomial wavelet transform and Hough transform, which will be described later, an edge is extracted by performing binomial wavelet transform on the scanned image, and an edge whose high-frequency intensity is a predetermined value or more from the extracted edge The selected edge is subjected to Hough transform to extract a straight line, a reference line is specified from the extracted straight line, and pattern matching is performed on the scanned image in a specific direction with respect to the reference line. Or code detection, or by performing binomial wavelet transform on the scanned image and extracting edges, selecting edges with a high-frequency intensity greater than or equal to a predetermined value from the extracted edges, and huffing the selected edges Perform a conversion to extract a straight line, identify a reference line from the extracted straight lines, and select an area that contains a predetermined number or more of straight lines with a specific orientation relative to the reference line Specified as auxiliary region, employs a method of detecting the code performs pattern matching against a candidate region of the scanned image, to be able to detect easily and reliably code from the printed material. Hereinafter, the binomial wavelet transform and the Hough transform used for specifying the reference line will be outlined.

[二項ウェーブレット]
ウェーブレット変換とは図8に示すような有限範囲で振動するウェーブレット関数(式(1))を用いて、入力信号f(x)に対するウェーブレット変換係数〈f,ψa,b〉を式(2)で求める事により、入力信号を式(3)のようなウェーブレット関数の総和に分解する変換である。
[Binary wavelet]
The wavelet transform is a wavelet function (formula (1)) that oscillates in a finite range as shown in FIG. 8, and the wavelet transform coefficients <f, ψa, b> for the input signal f (x) are expressed by formula (2). This is a transformation that decomposes the input signal into the sum of wavelet functions as shown in Equation (3).

Figure 2008282339
Figure 2008282339

Figure 2008282339
Figure 2008282339

Figure 2008282339
Figure 2008282339

上式で、aはウェーブレット関数のスケールを表し、bはウェーブレット関数の位置を示す。図8に例示するように、スケールaの値が大きいほどウェーブレット関数ψa,b(x)の周波数は小さくなり、また、位置bの値に従ってウェーブレット関数ψa,b(x)が振動する位置が移動する。従って式(3)は、入力信号f(x)を種々のスケールと位置を持つウェーブレット関数ψa,b(x)の総和に分解する事を意味している。   In the above formula, a represents the scale of the wavelet function, and b represents the position of the wavelet function. As illustrated in FIG. 8, the larger the value of the scale a, the smaller the frequency of the wavelet function ψa, b (x), and the position where the wavelet function ψa, b (x) oscillates moves according to the value of the position b. To do. Therefore, equation (3) means that the input signal f (x) is decomposed into the sum of wavelet functions ψa, b (x) having various scales and positions.

上記のような変換を可能にするウェーブレット関数は多くのものが知られているが、画像処理分野では計算が高速な直交ウェーブレット(Orthogonal Wavelet)・双直交ウェーブレット(Biorthogonal Wavelet)が広く用いられている。直交ウェーブレット・双直交ウェーブレットのウェーブレット関数は式(4)のように定義される。   There are many known wavelet functions that enable such transformations, but orthogonal wavelets and biorthogonal wavelets are widely used in the image processing field. . The wavelet function of the orthogonal wavelet / biorthogonal wavelet is defined as shown in Equation (4).

Figure 2008282339
Figure 2008282339

式(4)と式(1)を比べると、直交ウェーブレット・双直交ウェーブレットではスケールaの値が2のi乗で離散的に定義され、また、位置bの最小移動単位が2iで離散的に定義されている事が判る。このiの値はレベルと呼ばれる。   Comparing equation (4) and equation (1), in the orthogonal wavelet and biorthogonal wavelet, the value of the scale a is discretely defined as 2 to the power of i, and the minimum moving unit of the position b is discretely 2i. You can see that it is defined. This value of i is called a level.

一方、本発明で利用する二項ウェーブレット(Dyadic Wavelet)のウェーブレット関数は式(5)のように定義される(例えば、特開平9−212623号公報)。   On the other hand, a wavelet function of a binary wavelet (Dyadic Wavelet) used in the present invention is defined as shown in Expression (5) (for example, JP-A-9-212623).

Figure 2008282339
Figure 2008282339

ここで、直交ウェーブレット・双直交ウェーブレットのウェーブレット関数は前述のようにレベルiにおける位置の最小移動単位が2iで離散的に定義されていたのに対し、二項ウェーブレットはレベルiにかかわらず位置の最小移動単位が一定である。この相違により、二項ウェーブレット変換には下記の特徴が生じる。   Here, the wavelet function of the orthogonal wavelet / biorthogonal wavelet is discretely defined with 2i as the minimum moving unit of the position at the level i as described above, whereas the binomial wavelet has the position regardless of the level i. The minimum movement unit is constant. Due to this difference, the binomial wavelet transform has the following characteristics.

特徴1:式(6)に示す1レベルの二項ウェーブレット変換で生成する、高周波数帯域成分Wと低周波数帯域成分Sの各々の信号量は、変換前の信号Si−1と同一である。 Feature 1: The signal amount of each of the high frequency band component W i and the low frequency band component S i generated by the one-level binomial wavelet transform shown in Equation (6) is the same as the signal S i-1 before the conversion. It is.

Figure 2008282339
Figure 2008282339

特徴2:スケーリング関数φi,j(x)とウェーブレット関数ψi,j(x)の間に式(7)の関係が成立する。 Feature 2: The relationship of Expression (7) is established between the scaling function φ i, j (x) and the wavelet function ψ i, j (x).

Figure 2008282339
Figure 2008282339

従って二項ウェーブレット変換で生成する、高周波数帯域成分Wは、低周波数帯域成分Sの一次微分(勾配)を表す。 Therefore, the high frequency band component W i generated by the binomial wavelet transform represents the first derivative (gradient) of the low frequency band component S i .

特徴3:ウェーブレット変換のレベルiに応じて定められた係数γを高周波数帯域成分に乗じたW・γ(以下、これを補正済高周波数帯域成分と呼ぶ。)について、入力信号の信号変化の特異性(singularity)に応じて、前記変換後の補正済高周波数帯域成分W・γの信号強度のレベル間の関係が一定の法則に従う。すなわち、なだらかな(微分可能な)信号変化に対応する補正済高周波数帯域成分W・γはレベル数iが増大するほど信号強度が増大するのに対して、ステップ状の信号変化に対応する補正済高周波数帯域成分W・γはレベル数iに関わらず信号強度が一定となり、δ関数状の信号変化に対応する補正済高周波数帯域成分W・γはレベル数iが増大するほど信号強度が減少する。 Feature 3: With respect to W i · γ i (hereinafter referred to as a corrected high frequency band component) obtained by multiplying a high frequency band component by a coefficient γ i determined according to the level i of the wavelet transform, the input signal Depending on the singularity of the signal change, the relation between the signal intensity levels of the corrected high frequency band components W i · γ i after the conversion follows a certain law. That is, the corrected high frequency band component W i · γ i corresponding to a gentle (differentiable) signal change corresponds to a step-like signal change while the signal intensity increases as the level number i increases. The corrected high frequency band component W i · γ i has a constant signal intensity regardless of the number of levels i, and the corrected high frequency band component W i · γ i corresponding to the δ function-like signal change has the level number i. The signal strength decreases as it increases.

特徴4:画像信号のような2次元信号における1レベルの二項ウェーブレット変換の方法は、前述の直交ウェーブレット・双直交ウェーブレットの方法と異なり、1レベルのウェーブレット変換により、低周波数帯域成分Sn−1は2つの高周波数帯域成分Wx,Wyと1つの低周波数帯域成分Sに分解される。2つの高周波数帯域成分は低周波数帯域成分Sの2次元における変化ベクトルVのx成分とy成分に相当する。変化ベクトルVの大きさMと偏角Aは式(8)、式(9)で与えられる。 Features 4: 1 level dyadic wavelet transform method in the two-dimensional signal such as an image signal is different from the method of orthogonal wavelet biorthogonal wavelets above by one level wavelet transform, the low frequency band component S n- 1 two high frequency band components Wx n, is decomposed into Wy n and one low frequency band component S n. Two high-frequency band component corresponds to the x and y components of the change vector V n in the two-dimensional low frequency band component S n. Deflection angle A n the size M n of change vector V n is given by equation (8), equation (9).

Figure 2008282339
Figure 2008282339

Figure 2008282339
Figure 2008282339

以上の特徴より、処理の対象となる情報の種類に応じて補正済高周波数帯域成分W・γの信号強度の大きさが異なるため、スキャナ画像の中から、なだらかな曲線で構成される画像情報を除外することが可能となる。 From the above characteristics, since the magnitude of the signal intensity of the corrected high frequency band component W i · γ i differs depending on the type of information to be processed, the scanner image is configured with a gentle curve. Image information can be excluded.

[ハフ変換]
ハフ変換とは、特定の点を通る直線の中から、画像の特徴点を最も多く通る直線を決定する処理であり、標準的なハフ変換では、式(10)に示すように、1つの直線は2つのパラメータ(その直線に引いた法線の長さと角度、rとθ)で表される。
[Hough transform]
The Hough transform is a process of determining a straight line that passes through the most feature points of an image from straight lines that pass through a specific point. In the standard Hough transform, as shown in Expression (10), one straight line is obtained. Is represented by two parameters (the length and angle of the normal drawn on the straight line, r and θ).

Figure 2008282339
Figure 2008282339

ここで、θ∈[0、π]かつr∈Rとするか、若しくは、θ∈[0、2π]かつr≧0とすると、ある直線に対する(r、θ)の組は一意に決定する。いいかえれば、θに対して直角で、原点からrの距離にあるものとして直線が表現される。   Here, if θ∈ [0, π] and r∈R, or θ∈ [0, 2π] and r ≧ 0, a set of (r, θ) for a certain straight line is uniquely determined. In other words, a straight line is expressed as being perpendicular to θ and at a distance r from the origin.

そこで、二項ウェーブレット変換で抽出したエッジに対してハフ変換を行い、ハフ変換したデータ上で投票数が少ないデータをカットし、その後、逆変換することにより、特定のエッジを直線として抽出することができ、投票数が最も多いデータを最も長い直線と見なすことにより、二項ウェーブレット変換で抽出したエッジの中から枠線や仕切り線などを基準線として特定することができ、この基準線に基づいてパターンマッチングの方向を設定したり、候補領域を特定することにより、パターンマッチングを迅速且つ容易に実行することが可能となる。   Therefore, Hough transform is performed on the edges extracted by binomial wavelet transform, and data with a small number of votes is cut on the Hough transformed data, and then a specific edge is extracted as a straight line by performing inverse transform. By considering the data with the largest number of votes as the longest straight line, it is possible to identify frame lines, partition lines, etc. as reference lines from the edges extracted by the binomial wavelet transform. Thus, pattern matching can be performed quickly and easily by setting the direction of pattern matching or specifying candidate areas.

上記した本発明の実施の形態についてさらに詳細に説明すべく、本発明の一実施例に係るコード検出プログラム及びコード検出方法並びに画像形成装置について、図1乃至図7を参照して説明する。図1は、本実施例の情報提供システムの構成を模式的に示す図であり、図2は、本実施例の画像形成装置の構成を示すブロック図、図3は、画像形成装置の制御部の構成を示すブロック図である。また、図4は、本実施例の印刷物の構成例を示す図であり、図5は、本実施例の情報提供システムを用いた情報提供方法を示すフローチャート図である。また、図6は、本実施例のコード検出方法における候補領域の特定手順を示すフローチャート図であり、図7は、その具体例を示す図である。   In order to describe the above-described embodiment of the present invention in more detail, a code detection program, a code detection method, and an image forming apparatus according to an embodiment of the present invention will be described with reference to FIGS. FIG. 1 is a diagram schematically illustrating a configuration of an information providing system according to the present exemplary embodiment, FIG. 2 is a block diagram illustrating a configuration of an image forming apparatus according to the present exemplary embodiment, and FIG. 3 is a control unit of the image forming apparatus. It is a block diagram which shows the structure of these. FIG. 4 is a diagram illustrating a configuration example of a printed matter according to the present embodiment, and FIG. 5 is a flowchart illustrating an information providing method using the information providing system according to the present embodiment. FIG. 6 is a flowchart showing a procedure for specifying candidate areas in the code detection method of this embodiment, and FIG. 7 is a diagram showing a specific example thereof.

図1(a)に示すように、本実施例の情報提供システムは、雑誌やフリーペーパーのように、紙やプラスチックなどの印刷媒体に各種情報が印刷された印刷物30をスキャンして、印刷物30に印刷された1次元バーコードや2次元コード、カラー2次元コードなど(以下、これらを総称してコードと呼ぶ。)を検出する、スキャナ機能を備えたコピー機やプリンタなど(以下、これらを総称して画像形成装置10と呼ぶ。)で構成される。また、コードにURLが記録されており、そのURLにアクセスして情報を取得する場合は、図1(b)に示すように、画像形成装置10とユーザに提供する情報を記憶したサーバ20とがWAN(Wide Area Network)やLAN(Local Area Network)などの通信ネットワークで接続されて構成される。   As shown in FIG. 1A, the information providing system according to the present embodiment scans a printed material 30 on which various information is printed on a printing medium such as paper or plastic, such as a magazine or free paper, and prints 30. A copier or printer having a scanner function for detecting a one-dimensional barcode, two-dimensional code, color two-dimensional code, etc. (hereinafter collectively referred to as a code) printed on Collectively referred to as an image forming apparatus 10). Further, when a URL is recorded in the code and information is acquired by accessing the URL, as shown in FIG. 1B, the image forming apparatus 10 and a server 20 storing information to be provided to the user, Are connected by a communication network such as a WAN (Wide Area Network) or a LAN (Local Area Network).

なお、上記1次元バーコードは、JAN、CODE39、ITF、NW-7、CODE128、CODE93などがあり、また、上記2次元コードはスタック型2次元コードとマトリクス型2次元コードに分類され、スタック型2次元コードは、PDF417、CODE49、CODE16Kなどがあり、マトリクス型2次元コードは、QRコード、DATA MATRIX、VERI CODE、MAXI CODE、CP CODE、CODE1、ボックス図形コード、ULTRA CODE、AZTECH CODEなどがあるが、本実施例におけるコードは情報をコード化して記録したものであればよく、その規格は特に限定されない。また、本実施例のコードには、情報を光学的に記録するホログラムなども含むものとする。   The one-dimensional bar code includes JAN, CODE39, ITF, NW-7, CODE128, CODE93, etc. The two-dimensional code is classified into a stack type two-dimensional code and a matrix type two-dimensional code. Two-dimensional codes include PDF417, CODE49, CODE16K, and matrix type two-dimensional codes include QR code, DATA MATRIX, VERI CODE, MAXI CODE, CP CODE, CODE1, box graphic code, ULTRA CODE, AZTECH CODE, etc. However, the code in this embodiment is not particularly limited as long as information is encoded and recorded. Further, the code of this embodiment includes a hologram for optically recording information.

また、図2に示すように、本実施例の画像形成装置10は、制御部11と、操作・表示部12と、スキャナ部13と、画像処理部14と、プリンタ部15と、記憶部16と、ネットワーク接続部17などを備え、各部はバスにより接続されている。   As shown in FIG. 2, the image forming apparatus 10 of this embodiment includes a control unit 11, an operation / display unit 12, a scanner unit 13, an image processing unit 14, a printer unit 15, and a storage unit 16. And a network connection unit 17 and the like, and each unit is connected by a bus.

制御部11は、CPU(Central Processing Unit)、ROM(Read Only Memory)、RAM(Random Access Memory)などにより構成される。CPUは、操作・表示部12の操作により、ROMに記憶されている各種プログラムを読み出してRAMに展開し、展開されたプログラムに従って、画像形成装置10の各部の動作を制御する。   The control unit 11 includes a CPU (Central Processing Unit), a ROM (Read Only Memory), a RAM (Random Access Memory), and the like. The CPU reads various programs stored in the ROM by operating the operation / display unit 12 and develops them in the RAM, and controls the operation of each unit of the image forming apparatus 10 according to the developed programs.

操作・表示部12は、LCD(Liquid Crystal Display)等の表示部上に、透明電極が格子状に配置された感圧式の操作部(タッチパネル)を設けたものであり、制御部11からの表示信号に従って表示部上に各種操作ボタンや装置の状態表示、各機能の動作状況等の表示を行う。また、手指やタッチペン等で押下された力点のXY座標を電圧値で検出し、検出された位置信号を操作信号として制御部11に出力する。なお、ここでは操作・表示部12を表示部と操作部とが一体となった構成としているが、表示部とは別に各種操作ボタンを配置した操作部を設けてもよい。   The operation / display unit 12 is provided with a pressure-sensitive operation unit (touch panel) in which transparent electrodes are arranged in a grid on a display unit such as an LCD (Liquid Crystal Display). In accordance with the signal, various operation buttons, device status display, operation status of each function, etc. are displayed on the display unit. In addition, the XY coordinates of the force point pressed with a finger or a touch pen are detected by a voltage value, and the detected position signal is output to the control unit 11 as an operation signal. Here, the operation / display unit 12 is configured such that the display unit and the operation unit are integrated, but an operation unit in which various operation buttons are arranged may be provided separately from the display unit.

スキャナ部13は、印刷物30を載置するガラスの下部に配置され、印刷物30に記録された情報を読み取るものであり、印刷物30を走査する光源と、印刷物30で反射された光を電気信号に変換するCCD(Charge Coupled Devices)と、電気信号をA/D変換するA/D変換器等により構成される。   The scanner unit 13 is disposed below the glass on which the printed material 30 is placed, and reads information recorded on the printed material 30. The light source that scans the printed material 30 and the light reflected by the printed material 30 are converted into electrical signals. It comprises a CCD (Charge Coupled Devices) for conversion, an A / D converter for A / D converting electrical signals, and the like.

画像処理部14は、スキャナ部13で読み取った画像(以下、スキャン画像と呼ぶ。)に対して、拡大/縮小、回転、周波数変換、RGBデータからYMCKデータへの色変換、階調補正等の各種画像処理を施してプリンタ部15へ出力する。   The image processing unit 14 performs enlargement / reduction, rotation, frequency conversion, color conversion from RGB data to YMCK data, gradation correction, and the like on an image read by the scanner unit 13 (hereinafter referred to as a scan image). Various image processes are performed and output to the printer unit 15.

プリンタ部15は、転写紙に印刷する画像を形成する画像形成部、形成した画像を転写紙に転写する転写部、転写した画像を定着させる定着部、転写紙を搬送する搬送部、画像形成部や転写部、定着部をクリーニングするクリーニング部などを備え、電子写真方式により、入力されたデータに基づいて、転写紙上に画像を形成して出力する。   The printer unit 15 includes an image forming unit that forms an image to be printed on a transfer paper, a transfer unit that transfers the formed image to the transfer paper, a fixing unit that fixes the transferred image, a transport unit that transports the transfer paper, and an image forming unit. And a transfer unit, a cleaning unit for cleaning the fixing unit, and the like, and by electrophotography, an image is formed on a transfer sheet and output based on the input data.

記憶部16は、フラッシュメモリやハードディスク等により構成され、各種データや設定条件等を記憶する。   The storage unit 16 is configured by a flash memory, a hard disk, or the like, and stores various data, setting conditions, and the like.

ネットワーク接続部17は、NIC(Network Interface Card)、モデム、LANアダプタ、ルータ、TA(Terminal Adapter)等により構成され、通信ネットワークを介して接続されたサーバ20等との通信制御を行う。   The network connection unit 17 includes a NIC (Network Interface Card), a modem, a LAN adapter, a router, a TA (Terminal Adapter), and the like, and performs communication control with the server 20 and the like connected via a communication network.

なお、図1は本実施例の画像形成装置10の一例であり、少なくとも印刷物30を読み取ってコードを検出する機能を備えていればよく、印刷機能のないスキャナ装置としてもよいし、自動原稿送り装置(ADF:Auto Document Feeder)や後処理装置(フィニッシャ)などを備えた複合機(MFP:Multi Function Peripheral)としてもよい。   FIG. 1 shows an example of the image forming apparatus 10 according to the present embodiment. The image forming apparatus 10 only needs to have a function of detecting at least a printed matter 30 and detecting a code. A multi function peripheral (MFP) including a device (ADF: Auto Document Feeder), a post-processing device (finisher), and the like may be used.

ここで、図4(a)に示すように、雑誌やフリーペーパー等の印刷物30(1枚であっても複数枚を冊子状に綴じたものでもよい。)には、写真やイラスト、図形などの画像情報32と、ひらがなやカタカナ、漢字、アルファベット、記号などのテキスト情報33とが配置されると共に、所定の場所に特定のマーク(QRコードの場合は左上、右上及び左下に配置された切り出しシンボル31a、DATA MATRIXの場合は左及び下に配置されたL型のガイドセル、以下、切り出しシンボル31aとして説明する。)を備え、切り出しシンボル31aで特定される領域にURL情報などをコード化して記録したパターンが配置されたコード31が印刷され、更に、デザインや見やすさなどを考慮して、これらの周囲に枠線34aが印刷されている。また、図4(b)に示すように、枠線34aに変えて又は枠線34aと共に、仕切り線34bが印刷されている。   Here, as shown in FIG. 4A, a printed matter 30 such as a magazine or a free paper (a single sheet or a plurality of sheets may be bound in a booklet form) includes a photograph, an illustration, a figure, and the like. Image information 32 and text information 33 such as hiragana, katakana, kanji, alphabets, symbols, and the like, and specific marks (cutouts arranged in the upper left, upper right, and lower left in the case of QR codes) In the case of the symbol 31a and DATA MATRIX, there are L-shaped guide cells arranged on the left and below, which will be described as a cut-out symbol 31a), and URL information and the like are encoded in an area specified by the cut-out symbol 31a. A code 31 on which the recorded pattern is arranged is printed, and further, a frame line 34a is printed around these in consideration of the design and visibility. Further, as shown in FIG. 4B, a partition line 34b is printed instead of the frame line 34a or together with the frame line 34a.

そのため、これらの様々な情報が印刷された印刷物30の中からコード31を検出するのは容易ではなく、また、コード31の配置も一定ではないため、確実にコード31を検出するためには、スキャン画像の全ての領域に対してパターンマッチングを行わなければならない。特に、印刷物30がスキャナ部13に斜めにセットされた場合には、スキャン画像の画角に対してコード31が斜めに配置されるため、様々な角度からパターンマッチングを行わなければならず、コード31の検出に時間がかかってしまうという問題があった。   Therefore, it is not easy to detect the code 31 from the printed material 30 on which these various types of information are printed, and the arrangement of the code 31 is not constant. Pattern matching must be performed for all areas of the scanned image. In particular, when the printed material 30 is set obliquely on the scanner unit 13, the code 31 is arranged obliquely with respect to the angle of view of the scanned image. Therefore, pattern matching must be performed from various angles. There was a problem that it took time to detect 31.

そこで、本実施例では、様々な情報が印刷された印刷物30が斜めにスキャンされた場合であってもコード31を簡単且つ確実に検出できるようにするために、上記枠線34aや仕切り線34bを基準線として特定し、その基準線に対して平行及び/又は直角等の特定の向きでのみパターンマッチングを行う構成、又は、その基準線に対して平行及び/又は直角等の特定の向きの直線が所定数以上含まれる領域を候補領域として特定し、候補領域に対してのみパターンマッチングを行う構成とする。   Therefore, in the present embodiment, the frame line 34a and the partition line 34b are provided so that the code 31 can be easily and reliably detected even when the printed matter 30 on which various information is printed is scanned obliquely. Is specified as a reference line, and pattern matching is performed only in a specific direction such as parallel and / or perpendicular to the reference line, or a specific orientation such as parallel and / or perpendicular to the reference line A region including a predetermined number or more of straight lines is specified as a candidate region, and pattern matching is performed only on the candidate region.

具体的には、図3に示すように、制御部11に、上述した二項ウェーブレット変換及びハフ変換を用いて、スキャン画像から基準線を特定する基準線特定部11aと、スキャン画像を複数の領域に分割し、それらの領域の中から基準線に対してほぼ平行やほぼ直角(以下、単に平行及び/又は直角と称す。)等の特定の向きの直線が所定数以上含まれる領域を候補領域として特定する候補領域特定部11bと、スキャン画像の候補領域に対してパターンマッチングを行ったり、基準線に対して平行及び/又は直角等の特定の向きでスキャン画像に対してパターンマッチングを行って切り出しシンボル31aを検出し、コード31に記録された情報を読み取るコード検出部11cとを設ける。   Specifically, as shown in FIG. 3, the control unit 11 uses the above-described binomial wavelet transform and Hough transform to identify a reference line from the scan image, and a plurality of scan images. Candidate regions that are divided into regions and include a predetermined number or more of straight lines in a specific direction such as substantially parallel or substantially perpendicular to the reference line (hereinafter simply referred to as parallel and / or right angle). Pattern matching is performed on the candidate area specifying unit 11b specified as the area and the candidate area of the scan image, or pattern matching is performed on the scan image in a specific direction such as parallel and / or perpendicular to the reference line. And a code detection unit 11c that detects the cut-out symbol 31a and reads information recorded in the code 31.

なお、上記基準線特定部11a、候補領域特定部11b及びコード検出部11cはハードウェアとして構成してもよいし、コンピュータを、基準線特定部11a、候補領域特定部11b及びコード検出部11c、又は、基準線特定部11a及びコード検出部11cとして機能させるコード検出プログラムとして構成し、該コード検出プログラムを制御部11上で動作させる構成としてもよい。   The reference line specifying unit 11a, the candidate area specifying unit 11b, and the code detecting unit 11c may be configured as hardware, or the computer may include a reference line specifying unit 11a, the candidate area specifying unit 11b, and the code detecting unit 11c, Alternatively, it may be configured as a code detection program that functions as the reference line specifying unit 11a and the code detection unit 11c, and the code detection program is operated on the control unit 11.

次に、上記構成の画像形成装置10を用いて、印刷物30を読み取って割引券等をプリントするまでの手順について、図5及び図6のフローチャート図並びに図7の模式図を参照して説明する。   Next, a procedure from reading the printed matter 30 to printing a discount ticket or the like using the image forming apparatus 10 having the above configuration will be described with reference to the flowcharts of FIGS. 5 and 6 and the schematic diagram of FIG. .

まず、図5のステップS101で、コード31が印刷された印刷物30を画像形成装置10にセットし、操作・表示部12を操作してスキャンを指示すると、スキャナ部13は、光源で印刷物30を走査し、印刷物30で反射された光をCCDで受光して電気信号に変換し、その電気信号をA/D変換して印刷物30の情報が記録されたスキャン画像を作成する。このスキャンはモノクロ又はカラーのいずれでもよいが、上記枠線34aや仕切り線34bは通常、黒で印刷されており、また、スキャン画像の処理はモノクロの方が簡易であるため、コード31がカラー2次元コードでなければ、モノクロでスキャンする方が好ましい。   First, in step S101 in FIG. 5, when the printed material 30 on which the code 31 is printed is set in the image forming apparatus 10 and the operation / display unit 12 is operated to instruct scanning, the scanner unit 13 causes the printed material 30 to be scanned with a light source. The light that is scanned and reflected by the printed material 30 is received by the CCD and converted into an electrical signal, and the electrical signal is A / D converted to create a scanned image in which information of the printed material 30 is recorded. This scan may be either monochrome or color, but the frame line 34a and partition line 34b are usually printed in black, and the processing of the scanned image is simpler in monochrome, so the code 31 is color. If it is not a two-dimensional code, it is preferable to scan in monochrome.

次に、ステップS102で、制御部11は、コード31が印刷されていると判断される候補領域を検出する。この候補領域の検出手順について、図6及び図7を参照して詳述する。   Next, in step S102, the control unit 11 detects a candidate area where it is determined that the code 31 is printed. This candidate area detection procedure will be described in detail with reference to FIGS.

まず、ステップS102aで、制御部11は、スキャナ部13からスキャン画像を取得する。このスキャン画像は、輝度、濃度、明度データ等、明るさを表す画像であれば特に限定されず、スキャナ部13で得た画像としてもよいし、画像処理部14で処理した画像としてもよい。   First, in step S <b> 102 a, the control unit 11 acquires a scanned image from the scanner unit 13. The scanned image is not particularly limited as long as it is an image representing brightness, such as luminance, density, and brightness data, and may be an image obtained by the scanner unit 13 or an image processed by the image processing unit 14.

次に、ステップS102bで、基準線特定部11aは、スキャン画像に対して、1レベルのみの二項ウェーブレット変換を行って、水平高周波成分(Wx)、垂直高周波成分(Wy)を取得し、上述した式(8)、(9)に従って、高周波強度(すなわち、変化ベクトルVの大きさM)、エッジ角度(すなわち、偏角A)を演算する。 Next, in step S102b, the reference line specifying unit 11a performs a one-level binomial wavelet transform on the scanned image to obtain a horizontal high-frequency component (Wx) and a vertical high-frequency component (Wy). the formula (8), according to (9), a high frequency intensity (i.e., magnitude M n of the change vector V n), the edge angle (i.e., deflection angle a n) for calculating a.

具体的に説明すると、図7(a)はスキャン画像の構成を模式的に示しており、このスキャン画像に対して二項ウェーブレット変換を行うとエッジが検出されて、図7(b)に示すようなエッジ画像が生成される。その際、枠線34aや仕切り線34b、コード31はほとんど変化しないが、テキスト情報33は、様々な傾きの短い直線群となり、画像情報32はなだらかな曲線となる。   More specifically, FIG. 7A schematically shows the configuration of a scan image, and when binomial wavelet transform is performed on this scan image, an edge is detected and shown in FIG. 7B. Such an edge image is generated. At that time, the frame line 34a, the partition line 34b, and the code 31 hardly change, but the text information 33 becomes a straight line group with various inclinations, and the image information 32 becomes a gentle curve.

次に、ステップS102cで、基準線特定部11aは、二項ウェーブレット変換で得られるエッジの内、高周波強度(すなわち、濃度変動)が所定値以上のエッジを選別する。ここで、画像情報は通常なだらかな曲線であり、上述した二項ウェーブレット変換の特徴により、1レベルの二項ウェーブレット変換では、なだらかな曲線の高周波強度は小さくなるため、図7(c)に示すように、スキャン画像から画像情報32が除外される。   Next, in step S102c, the reference line specifying unit 11a selects an edge whose high-frequency intensity (that is, density fluctuation) is equal to or greater than a predetermined value from edges obtained by the binomial wavelet transform. Here, the image information is usually a gentle curve, and the high-frequency intensity of the gentle curve is small in the one-level binomial wavelet transform due to the characteristics of the above-described binomial wavelet transform. As described above, the image information 32 is excluded from the scanned image.

次に、ステップS102dで、基準線特定部11aは、特定強度以上のエッジに対してハフ変換を行う。このハフ変換において投票数が少ないエッジをカットし、その後、逆変換して直線を抽出すると、図7(d)に示すように、枠線34aや仕切り線34bは長い直線として抽出され、テキスト情報33及びコード31のエッジの内、投票数が規定値以上のエッジは短い直線として抽出される。そして、これらの直線の中から最も長い直線(すなわち、最も投票数が多い直線)を選択することによって枠線34aや仕切り線34bが基準線35として特定される。   Next, in step S102d, the reference line specifying unit 11a performs Hough transform on an edge having a specific intensity or more. In this Hough transform, when an edge with a small number of votes is cut and then a reverse line is extracted to extract a straight line, the frame line 34a and the partition line 34b are extracted as long straight lines as shown in FIG. Among the edges of 33 and the code 31, an edge having a vote count equal to or more than a predetermined value is extracted as a short straight line. Then, by selecting the longest straight line (that is, the straight line with the largest number of votes) from these straight lines, the frame line 34 a and the partition line 34 b are specified as the reference line 35.

次に、ステップS102eで、候補領域特定部11bは、ハフ変換で抽出された複数の直線の中から、上記ステップで特定した基準線35に対して、特定の方向(ここでは、基準線35に平行及び/又は直角)の直線のみを抽出する。この処理により、テキスト情報33の中の斜めの直線が除外されてスキャン画像は図7(e)のようになる。   Next, in step S102e, the candidate area specifying unit 11b selects a specific direction (here, the reference line 35) with respect to the reference line 35 specified in the above step from the plurality of straight lines extracted by the Hough transform. Only straight lines (parallel and / or perpendicular) are extracted. By this process, the oblique line in the text information 33 is excluded and the scanned image becomes as shown in FIG.

次に、ステップS102fで、候補領域特定部11bは、スキャン画像を縦横の線で複数の領域に分割し、ステップS102gで、分割した複数の領域の中から、エッジが所定数以上の領域を選別し、その領域を候補領域として特定する。具体的には、図7(f)に示すように、縦横線で分割した領域の内、網掛けで示した領域が、基準線35に平行及び/又は直角の直線が所定数以上含まれる候補領域となる。なお、候補領域はいくつかの領域の集合となるので、その集合と非候補領域との境目で切り出しシンボル31aを探すことになる。   Next, in step S102f, the candidate area specifying unit 11b divides the scanned image into a plurality of areas by vertical and horizontal lines, and in step S102g, selects an area having a predetermined number of edges or more from the divided areas. Then, the area is specified as a candidate area. Specifically, as shown in FIG. 7F, among the areas divided by the vertical and horizontal lines, the area indicated by shading is a candidate that includes a predetermined number or more of straight lines parallel to and / or perpendicular to the reference line 35. It becomes an area. Since the candidate area is a set of several areas, the cut-out symbol 31a is searched for at the boundary between the set and the non-candidate area.

次に、図5に戻って、ステップS103で、制御部11は、スキャン画像から候補領域が検出されたかを判断し、候補領域が無い場合は、ユーザは印刷物30にコード31が印刷されているか、印刷物30がスキャナ部13に適切にセットされているかを調べ、ステップS104で再スキャンを指示したら、ステップS102に戻って同様の処理を繰り返す。   Next, returning to FIG. 5, in step S <b> 103, the control unit 11 determines whether a candidate area is detected from the scanned image. If there is no candidate area, the user has printed the code 31 on the printed material 30. Then, it is checked whether or not the printed material 30 is properly set in the scanner unit 13. When rescan is instructed in step S104, the process returns to step S102 and the same processing is repeated.

一方、候補領域がある場合は、ステップS105で、制御部11のコード検出部31cは、公知の手法を用いてスキャン画像の候補領域近傍でパターンマッチングを行い、予め設定された図形と切り出しシンボル31aとを比較することによって切り出しシンボル31aを検出する。なお、DATA MATRIXの場合はL型のガイドセルを検出すればよく、他のマークを使用するコードの場合はそのマークを検出すればよい。   On the other hand, if there is a candidate region, in step S105, the code detection unit 31c of the control unit 11 performs pattern matching in the vicinity of the candidate region of the scan image using a known method, and sets the preset figure and the cutout symbol 31a. The cut-out symbol 31a is detected by comparing. In the case of DATA MATRIX, an L-type guide cell may be detected, and in the case of a code using another mark, the mark may be detected.

なお、図5及び図6のフローチャート図では、候補領域を特定し、スキャン画像の候補領域に対してパターンマッチングを行っているが、図6のステップS102dで基準線35を特定した後、その基準線35に対して特定の向き(例えば、基準線35に平行及び/又は直角)でスキャン画像に対してパターンマッチングを行う構成とすることもでき、特定の向きでのみパターンマッチングを行うことにより、コード31を簡単且つ迅速に検出することができる。   In the flowcharts of FIGS. 5 and 6, the candidate area is specified and pattern matching is performed on the candidate area of the scanned image. However, after the reference line 35 is specified in step S102d of FIG. A pattern matching may be performed on the scanned image in a specific direction (for example, parallel and / or perpendicular to the reference line 35) with respect to the line 35, and by performing pattern matching only in a specific direction, The code 31 can be detected easily and quickly.

そして、ステップS106で、コード検出部31cは、パターンマッチングの結果を判断し、パターンマッチングで切り出しシンボル31aが検出できない場合は、ユーザは印刷物30にコード31が印刷されているか、印刷物30がスキャナ部13に適切にセットされているかを調べ、ステップS104で再スキャンを指示したら、ステップS102に戻って同様の処理を繰り返す。   In step S106, the code detection unit 31c determines the pattern matching result. If the cutout symbol 31a cannot be detected by pattern matching, the user has printed the code 31 on the printed material 30 or the printed material 30 is the scanner unit. 13 is checked and if rescan is instructed in step S104, the process returns to step S102 and the same processing is repeated.

一方、パターンマッチングで切り出しシンボル31aが検出できた場合は、ステップS107で、コード検出部31cは、コード31に記録された情報を読み取る。そして、コード31にURL情報が記録されている場合は、ステップS108で、制御部11は、ネットワーク接続部17を用いて通信ネットワークに接続し、URL情報で特定されるサーバ20にアクセスして、サーバ20から割引券等の情報を取得する。なお、コード31に割引券等の情報が記録されている場合は、ステップS108の処理を省略することができる。   On the other hand, if the cutout symbol 31a can be detected by pattern matching, the code detection unit 31c reads the information recorded in the code 31 in step S107. If the URL information is recorded in the code 31, in step S108, the control unit 11 connects to the communication network using the network connection unit 17, accesses the server 20 specified by the URL information, and Information such as discount tickets is acquired from the server 20. If information such as a discount ticket is recorded in the code 31, the process of step S108 can be omitted.

そして、ステップS109で、制御部11はユーザの指示を待ち、割引券等をプリントしないで終了する指示がされた場合(例えば、ユーザが希望する割引券等でない場合)は、一連の処理を終了し、割引券等をプリントする指示がされた場合は、コード31に記録された情報又はサーバ20から取得した情報をプリンタ部15に転送し、ステップS110で、プリンタ部15は割引券等のプリントを実行して処理を終了する。   In step S109, the control unit 11 waits for the user's instruction, and if an instruction to end without printing a discount ticket or the like is given (for example, if the user does not desire a discount ticket or the like), the series of processing ends. If an instruction to print a discount ticket or the like is given, the information recorded in the code 31 or the information acquired from the server 20 is transferred to the printer unit 15 and the printer unit 15 prints the discount ticket or the like in step S110. To finish the process.

このように、画像形成装置10の制御部11に、ハードウェア又はソフトウェアとして基準線特定部11a、候補領域特定部11b及びコード検出部11cを設け、スキャナ部13で印刷物30をスキャンして得たスキャン画像に対して、二項ウェーブレット変換及びハフ変換を行って基準線35を特定し、その基準線35に対して平行及び/又は直角等の特定の向きの直線が所定数以上含まれる領域を候補領域として特定し、スキャン画像の候補領域に対してパターンマッチングを行ってコード31を検出するため、様々な角度で全領域に対してパターンマッチングを行う従来方法に比べて、パターンマッチングに要する時間を格段に短縮し、コード31を簡単且つ確実に検出することができる。   As described above, the control unit 11 of the image forming apparatus 10 is provided with the reference line specifying unit 11a, the candidate area specifying unit 11b, and the code detecting unit 11c as hardware or software, and obtained by scanning the printed material 30 with the scanner unit 13. A reference line 35 is specified by performing binomial wavelet transform and Hough transform on the scanned image, and an area including a predetermined number or more of straight lines in a specific direction such as parallel and / or perpendicular to the reference line 35 Compared to the conventional method in which pattern matching is performed on all regions at various angles, because the pattern 31 is identified as a candidate region and pattern matching is performed on the candidate region of the scanned image to detect the code 31, the time required for pattern matching And the code 31 can be detected easily and reliably.

また、画像形成装置10の制御部11に、ハードウェア又はソフトウェアとして基準線特定部11a及びコード検出部11cを設け、スキャナ部13で印刷物30をスキャンして得たスキャン画像に対して、二項ウェーブレット変換及びハフ変換を行って基準線35を特定し、その基準線35に対して平行及び/又は直角等の特定の向きでスキャン画像に対してパターンマッチングを行ってコード31を検出する方法によっても、パターンマッチングに要する時間を格段に短縮し、コード31を簡単且つ確実に検出することができる。   Further, the control unit 11 of the image forming apparatus 10 is provided with a reference line specifying unit 11a and a code detecting unit 11c as hardware or software, and two items are obtained with respect to a scanned image obtained by scanning the printed matter 30 with the scanner unit 13. By detecting the code 31 by performing wavelet transform and Hough transform to identify the reference line 35 and performing pattern matching on the scanned image in a specific direction such as parallel and / or perpendicular to the reference line 35 However, the time required for pattern matching can be significantly shortened, and the code 31 can be detected easily and reliably.

なお、本実施例では、印刷物30に枠34aや仕切り線34bを備える構成を示したが、これらが印刷されていないものであっても、スキャナ部13で印刷物30をスキャンする際に、用紙のエッジを抽出することができることから、用紙のエッジを基準線35として利用することもできる。   In the present embodiment, the configuration in which the printed material 30 includes the frame 34a and the partition line 34b is shown. However, even when the printed material 30 is not printed, when the printed material 30 is scanned by the scanner unit 13, Since the edge can be extracted, the edge of the sheet can be used as the reference line 35.

また、上記実施例では、印刷物30に印刷されたコード31を検出する場合について説明したが、本発明は上記実施例に限定されるものではなく、画像情報32やテキスト情報33などが混在するスキャン画像から、基準線35に対して平行及び/又は直角な成分を多く含む図形などを検出する場合に対しても同様に適用することができる。   In the above-described embodiment, the case where the code 31 printed on the printed material 30 is detected has been described. However, the present invention is not limited to the above-described embodiment, and the scan includes image information 32, text information 33, and the like. The present invention can be similarly applied to the case of detecting a figure or the like containing many components parallel and / or perpendicular to the reference line 35 from the image.

本発明は、印刷物から1次元バーコードや2次元コードなどのコードを検出するプログラム、方法及び画像形成装置に利用可能である。   The present invention is applicable to a program, a method, and an image forming apparatus for detecting a code such as a one-dimensional barcode or a two-dimensional code from a printed material.

本発明の一実施例に係る情報提供システムの構成を模式的に示す図である。It is a figure which shows typically the structure of the information provision system which concerns on one Example of this invention. 本発明の一実施例に係る画像形成装置の構成を示すブロック図である。1 is a block diagram illustrating a configuration of an image forming apparatus according to an embodiment of the present invention. 本発明の一実施例に係る画像形成装置の制御部の構成を示すブロック図である。FIG. 3 is a block diagram illustrating a configuration of a control unit of the image forming apparatus according to an embodiment of the present invention. 本発明の一実施例に係る印刷物の構成例を示す図である。It is a figure which shows the structural example of the printed matter which concerns on one Example of this invention. 本発明の一実施例に係る情報提供システムを用いた情報提供方法を示すフローチャート図である。It is a flowchart figure which shows the information provision method using the information provision system which concerns on one Example of this invention. 本発明の一実施例に係るコード検出方法における候補領域の特定手順を示すフローチャート図である。It is a flowchart figure which shows the identification procedure of the candidate area | region in the code | cord | chord detection method which concerns on one Example of this invention. 本発明の一実施例に係るコード検出方法における候補領域の特定手順の具体例を示す図である。It is a figure which shows the specific example of the identification procedure of the candidate area | region in the code | cord | chord detection method which concerns on one Example of this invention. ウェーブレット変換関数を示す図である。It is a figure which shows a wavelet transformation function.

符号の説明Explanation of symbols

10 画像形成装置
11 制御部
11a 基準線特定部
11b 候補領域特定部
11c コード検出部
12 操作・表示部
13 スキャナ部
14 画像処理部
15 プリンタ部
16 記憶部
17 ネットワーク接続部
20 サーバ
30 印刷物
31 コード
31a 切り出しシンボル
32 画像情報
33 テキスト情報
34a 枠線
34b 仕切り線
35 基準線
DESCRIPTION OF SYMBOLS 10 Image forming apparatus 11 Control part 11a Base line specific | specification part 11b Candidate area | region specific part 11c Code detection part 12 Operation / display part 13 Scanner part 14 Image processing part 15 Printer part 16 Storage part 17 Network connection part 20 Server 30 Printed matter 31 Code 31a Cutout symbol 32 Image information 33 Text information 34a Frame line 34b Partition line 35 Reference line

Claims (12)

コンピュータを、
少なくとも1次元バーコード又は2次元コードが印刷された印刷物をスキャンして得られたスキャン画像からエッジを抽出し、抽出したエッジから直線を抽出し、抽出した直線の内、最も長い直線を基準線として特定する基準線特定部、
前記基準線に対して特定の向きで前記スキャン画像に対してパターンマッチングを行い、前記1次元バーコード又は前記2次元コードを検出するコード検出部、として機能させることを特徴とするコード検出プログラム。
Computer
Edges are extracted from the scanned image obtained by scanning a printed material on which at least one-dimensional barcode or two-dimensional code is printed, straight lines are extracted from the extracted edges, and the longest straight line among the extracted straight lines is the reference line. Reference line identification part, identified as
A code detection program that performs pattern matching on the scanned image in a specific direction with respect to the reference line and functions as a code detection unit that detects the one-dimensional barcode or the two-dimensional code.
コンピュータを、
少なくとも1次元バーコード又は2次元コードが印刷された印刷物をスキャンして得られたスキャン画像からエッジを抽出し、抽出したエッジから直線を抽出し、抽出した直線の内、最も長い直線を基準線として特定する基準線特定部、
前記スキャン画像を分割した領域の内、前記基準線に対して特定の向きの直線が所定数以上含まれる領域を候補領域として特定する候補領域特定部、
前記スキャン画像の前記候補領域に対してパターンマッチングを行い、前記1次元バーコード又は前記2次元コードを検出するコード検出部、として機能させることを特徴とするコード検出プログラム。
Computer
Edges are extracted from the scanned image obtained by scanning a printed material on which at least one-dimensional barcode or two-dimensional code is printed, straight lines are extracted from the extracted edges, and the longest straight line among the extracted straight lines is the reference line. Reference line identification part, identified as
A candidate area specifying unit that specifies, as a candidate area, an area that includes a predetermined number or more of straight lines in a specific direction with respect to the reference line among the areas obtained by dividing the scan image;
A code detection program that performs pattern matching on the candidate area of the scanned image and functions as a code detection unit that detects the one-dimensional barcode or the two-dimensional code.
前記特定の向きは、前記基準線に対して略平行及び/又は略直角の方向であることを特徴とする請求項1又は2に記載のコード検出プログラム。   The code detection program according to claim 1 or 2, wherein the specific direction is a direction substantially parallel and / or substantially perpendicular to the reference line. 前記基準線特定部は、前記スキャン画像に1レベルの二項ウェーブレット変換を行ってエッジを抽出し、抽出したエッジの中から高周波強度が所定値以上のエッジを選別し、選別したエッジにハフ変換を行って直線を抽出し、抽出した直線の中からハフ変換の投票数が最も多い直線を前記基準線として特定することを特徴とする請求項1乃至3のいずれか一に記載のコード検出プログラム。   The reference line specifying unit performs one-level binomial wavelet transform on the scanned image to extract edges, selects an edge having a high frequency intensity equal to or higher than a predetermined value from the extracted edges, and converts the selected edge to a Hough transform The code detection program according to any one of claims 1 to 3, wherein a straight line having the largest number of Hough transform votes is specified as the reference line from the extracted straight lines. . 印刷物に印刷された1次元バーコード又は2次元コードを検出するコード検出方法であって、
前記印刷物をスキャンして、スキャン画像を取得するステップと、
前記スキャン画像からエッジを抽出するステップと、
抽出したエッジから直線を抽出するステップと、
抽出した直線の内、最も長い直線を基準線として特定するステップと、
前記基準線に対して特定の向きで前記スキャン画像に対してパターンマッチングを行い、前記1次元バーコード又は前記2次元コードを抽出するステップと、を少なくとも有することを特徴とするコード検出方法。
A code detection method for detecting a one-dimensional barcode or two-dimensional code printed on a printed material,
Scanning the printed matter to obtain a scanned image;
Extracting an edge from the scanned image;
Extracting a straight line from the extracted edges;
A step of identifying the longest straight line among the extracted straight lines as a reference line;
A code detection method comprising: performing pattern matching on the scanned image in a specific direction with respect to the reference line, and extracting the one-dimensional barcode or the two-dimensional code.
印刷物に印刷された1次元バーコード又は2次元コードを検出するコード検出方法であって、
前記印刷物をスキャンして、スキャン画像を取得するステップと、
前記スキャン画像からエッジを抽出するステップと、
抽出したエッジから直線を抽出するステップと、
抽出した直線の内、最も長い直線を基準線として特定するステップと、
前記スキャン画像を複数の領域に分割するステップと、
前記複数の領域の内、前記基準線に対して特定の向きの直線が所定数以上含まれる領域を候補領域として特定するステップと、
前記スキャン画像の前記候補領域に対してパターンマッチングを行い、前記1次元バーコード又は前記2次元コードを抽出するステップと、を少なくとも有することを特徴とするコード化情報検出方法。
A code detection method for detecting a one-dimensional barcode or two-dimensional code printed on a printed material,
Scanning the printed matter to obtain a scanned image;
Extracting an edge from the scanned image;
Extracting a straight line from the extracted edges;
Identifying the longest straight line of the extracted straight lines as a reference line;
Dividing the scanned image into a plurality of regions;
Identifying a region including a predetermined number or more of straight lines in a specific direction with respect to the reference line among the plurality of regions as a candidate region;
A coded information detection method comprising: performing pattern matching on the candidate area of the scanned image and extracting the one-dimensional barcode or the two-dimensional code.
前記特定の向きは、前記基準線に対して略平行及び/又は略直角の方向であることを特徴とする請求項5又は6に記載のコード検出方法。   The code detection method according to claim 5 or 6, wherein the specific direction is a direction substantially parallel and / or substantially perpendicular to the reference line. 前記エッジを抽出するステップでは、前記スキャン画像に1レベルの二項ウェーブレット変換を行ってエッジを抽出し、
前記直線を抽出するステップでは、抽出したエッジの中から高周波強度が所定値以上のエッジを選別し、選別したエッジにハフ変換を行って直線を抽出し、
前記基準線を特定するステップでは、抽出した直線の中からハフ変換の投票数が最も多い直線を前記基準線として特定することを特徴とする請求項5乃至7のいずれか一に記載のコード検出方法。
In the step of extracting the edge, an edge is extracted by performing a one-level binomial wavelet transform on the scanned image;
In the step of extracting the straight line, an edge having a high frequency intensity equal to or higher than a predetermined value is selected from the extracted edges, a straight line is extracted by performing a Hough transform on the selected edge,
The code detection according to any one of claims 5 to 7, wherein, in the step of specifying the reference line, a straight line having the largest number of Hough transform votes is specified as the reference line from the extracted straight lines. Method.
少なくともスキャナ部を備える画像形成装置であって、
少なくとも1次元バーコード又は2次元コードが印刷された印刷物をスキャンして得られたスキャン画像からエッジを抽出し、抽出したエッジから直線を抽出し、抽出した直線の内、最も長い直線を基準線として特定する基準線特定部と、
前記基準線に対して特定の向きで前記スキャン画像に対してパターンマッチングを行い、前記1次元バーコード又は前記2次元コードを検出するコード検出部と、を備えることを特徴とする画像形成装置。
An image forming apparatus including at least a scanner unit,
Edges are extracted from the scanned image obtained by scanning a printed material on which at least one-dimensional barcode or two-dimensional code is printed, straight lines are extracted from the extracted edges, and the longest straight line among the extracted straight lines is the reference line. A reference line specifying part to be specified as
An image forming apparatus comprising: a code detection unit configured to perform pattern matching on the scanned image in a specific direction with respect to the reference line and detect the one-dimensional barcode or the two-dimensional code.
少なくともスキャナ部を備える画像形成装置であって、
少なくとも1次元バーコード又は2次元コードが印刷された印刷物をスキャンして得られたスキャン画像からエッジを抽出し、抽出したエッジから直線を抽出し、抽出した直線の内、最も長い直線を基準線として特定する基準線特定部と、
前記スキャン画像を分割した領域の内、前記基準線に対して特定の向きの直線が所定数以上含まれる領域を候補領域として特定する候補領域特定部と、
前記スキャン画像の前記候補領域に対してパターンマッチングを行い、前記1次元バーコード又は前記2次元コードを検出するコード検出部と、を備えることを特徴とする画像形成装置。
An image forming apparatus including at least a scanner unit,
Edges are extracted from the scanned image obtained by scanning a printed material on which at least one-dimensional barcode or two-dimensional code is printed, straight lines are extracted from the extracted edges, and the longest straight line among the extracted straight lines is the reference line. A reference line specifying part to be specified as
A candidate area specifying unit for specifying, as a candidate area, an area that includes a predetermined number or more of straight lines in a specific direction with respect to the reference line among the areas obtained by dividing the scan image;
An image forming apparatus comprising: a code detection unit configured to perform pattern matching on the candidate area of the scan image and detect the one-dimensional barcode or the two-dimensional code.
前記特定の向きは、前記基準線に対して略平行及び/又は略直角の方向であることを特徴とする請求項9又は10に記載の画像形成装置。   The image forming apparatus according to claim 9, wherein the specific direction is a direction substantially parallel and / or substantially perpendicular to the reference line. 前記基準線特定部は、前記スキャン画像に1レベルの二項ウェーブレット変換を行ってエッジを抽出し、抽出したエッジの中から高周波強度が所定値以上のエッジを選別し、選別したエッジにハフ変換を行って直線を抽出し、抽出した直線の中からハフ変換の投票数が最も多い直線を前記基準線として特定することを特徴とする請求項9乃至11のいずれか一に記載の画像形成装置。   The reference line specifying unit performs one-level binomial wavelet transform on the scanned image to extract edges, selects an edge having a high frequency intensity equal to or higher than a predetermined value from the extracted edges, and converts the selected edge to a Hough transform 12. The image forming apparatus according to claim 9, wherein a straight line having the largest number of votes for Hough transform is identified as the reference line from the extracted straight lines. .
JP2007128226A 2007-05-14 2007-05-14 Code detection program, code detection method, and image forming apparatus Active JP4465723B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2007128226A JP4465723B2 (en) 2007-05-14 2007-05-14 Code detection program, code detection method, and image forming apparatus
US12/114,629 US8172144B2 (en) 2007-05-14 2008-05-02 Media storing code detecting program, code detecting method, and image forming apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007128226A JP4465723B2 (en) 2007-05-14 2007-05-14 Code detection program, code detection method, and image forming apparatus

Publications (2)

Publication Number Publication Date
JP2008282339A true JP2008282339A (en) 2008-11-20
JP4465723B2 JP4465723B2 (en) 2010-05-19

Family

ID=40143080

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007128226A Active JP4465723B2 (en) 2007-05-14 2007-05-14 Code detection program, code detection method, and image forming apparatus

Country Status (1)

Country Link
JP (1) JP4465723B2 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010191956A (en) * 2009-01-26 2010-09-02 Hiroyuki Endo Image processing system and program
JP4724800B1 (en) * 2010-07-30 2011-07-13 株式会社シフト Article detection apparatus and program
JP4724802B1 (en) * 2010-07-30 2011-07-13 株式会社シフト 2D code reader and program
JP4724801B1 (en) * 2010-07-30 2011-07-13 株式会社シフト 2D code reader and program
JP2014199487A (en) * 2013-03-29 2014-10-23 日本電産サンキョー株式会社 Symbol information reading device, symbol information reading method, and program
US10872216B2 (en) 2018-12-14 2020-12-22 Seiko Epson Corporation Image output device, image output method, and output image data production method

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4724799B2 (en) * 2009-01-26 2011-07-13 株式会社シフト Image processing system and program
JP2010191956A (en) * 2009-01-26 2010-09-02 Hiroyuki Endo Image processing system and program
JP2012033035A (en) * 2010-07-30 2012-02-16 Shift:Kk Two-dimensional code reader and program
JP2012033033A (en) * 2010-07-30 2012-02-16 Shift:Kk Article detection apparatus and program
JP4724801B1 (en) * 2010-07-30 2011-07-13 株式会社シフト 2D code reader and program
WO2012014265A1 (en) * 2010-07-30 2012-02-02 株式会社シフト Two-dimensional code reader and program
WO2012014263A1 (en) * 2010-07-30 2012-02-02 株式会社シフト Article detection device and program
JP2012033034A (en) * 2010-07-30 2012-02-16 Shift:Kk Two-dimensional code reader and program
JP4724800B1 (en) * 2010-07-30 2011-07-13 株式会社シフト Article detection apparatus and program
JP4724802B1 (en) * 2010-07-30 2011-07-13 株式会社シフト 2D code reader and program
CN103080950A (en) * 2010-07-30 2013-05-01 株式会社希福特 Two-dimensional code reader and program
KR101267216B1 (en) 2010-07-30 2013-05-24 시프트 코. 엘티디. Two-dimensional code reader and program
KR101266663B1 (en) 2010-07-30 2013-05-28 시프트 코. 엘티디. Two-dimensional code reader and program
US8584950B2 (en) 2010-07-30 2013-11-19 Shift Co., Ltd. Two-dimensional code reader and program
CN103080950B (en) * 2010-07-30 2014-11-26 株式会社希福特 Two-dimensional code reader and program
JP2014199487A (en) * 2013-03-29 2014-10-23 日本電産サンキョー株式会社 Symbol information reading device, symbol information reading method, and program
US10872216B2 (en) 2018-12-14 2020-12-22 Seiko Epson Corporation Image output device, image output method, and output image data production method

Also Published As

Publication number Publication date
JP4465723B2 (en) 2010-05-19

Similar Documents

Publication Publication Date Title
JP5262869B2 (en) Image processing system, image processing server, MFP, and image processing method
JP5195519B2 (en) Document management apparatus, document processing system, and document management method
US8640018B2 (en) User interface tag for use in processing a document
US8577118B2 (en) Systems for mobile image capture and remittance processing
US8072620B2 (en) Electronically tagged printed matter, image forming device, image forming method, and image forming program, as well as computer readable recording medium on which the program is recorded
KR100341504B1 (en) Machine readable code for representing information and method and apparatus for encoding/decoding the same
US7640269B2 (en) Image processing system and image processing method
JP4465723B2 (en) Code detection program, code detection method, and image forming apparatus
US8412705B2 (en) Image processing apparatus, image processing method, and computer-readable storage medium
US8687212B2 (en) Method for protecting content of a fax confirmation sheet
US20080278437A1 (en) Copying documents from electronic displays
US7287698B2 (en) Automatic cleanup of machine readable codes during image processing
US20150304521A1 (en) Dynamically generating table of contents for printable or scanned content
US8172144B2 (en) Media storing code detecting program, code detecting method, and image forming apparatus
US8548276B2 (en) Image search apparatus, image scanning apparatus, image search system, database creation method, and database creation program
KR20110040108A (en) Image forming apparatus and document management method thereof
EP1001605B1 (en) Document processing
US20050259872A1 (en) Image processing apparatus, image processing system, and image processing method
US8102572B2 (en) Image processing apparatus and associated method and computer readable storage medium for extracting an embedded marking image
JP2008294581A (en) Image processor and image processing server
JP2010004141A (en) Image processing apparatus
JP2009027243A (en) Image processor, image processing method, and image processing program
JP2009088655A (en) Control program, image processor, and output control system and method
JP2008299781A (en) Control program, control method, and image-forming device
CN111669478A (en) Image processing apparatus, image processing system, storage medium, and image processing method

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090507

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

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

R150 Certificate of patent or registration of utility model

Ref document number: 4465723

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20140305

Year of fee payment: 4

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350