JP2020161106A - Information reading device and program - Google Patents

Information reading device and program Download PDF

Info

Publication number
JP2020161106A
JP2020161106A JP2019158524A JP2019158524A JP2020161106A JP 2020161106 A JP2020161106 A JP 2020161106A JP 2019158524 A JP2019158524 A JP 2019158524A JP 2019158524 A JP2019158524 A JP 2019158524A JP 2020161106 A JP2020161106 A JP 2020161106A
Authority
JP
Japan
Prior art keywords
information
information code
captured image
code
image
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
JP2019158524A
Other languages
Japanese (ja)
Other versions
JP7283312B2 (en
Inventor
弘樹 高見
Hiroki Takami
弘樹 高見
匡昭 葛谷
Tadaaki Kuzutani
匡昭 葛谷
聡 月安
Satoshi Tsukiyasu
聡 月安
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.)
Denso Wave Inc
Original Assignee
Denso Wave 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 Denso Wave Inc filed Critical Denso Wave Inc
Publication of JP2020161106A publication Critical patent/JP2020161106A/en
Application granted granted Critical
Publication of JP7283312B2 publication Critical patent/JP7283312B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Character Input (AREA)
  • Character Discrimination (AREA)

Abstract

To provide an arrangement which allows for accurately recognizing text information in a capture image of the text information and an information code.SOLUTION: Once an information code (in a captured image captured by an image capturing unit 23) is read through read processing performed by a control unit 21, the captured image is corrected such that an area of the captured image corresponding to the information code is turned into a single color area, and character recognition processing is performed on the corrected image.SELECTED DRAWING: Figure 4

Description

本発明は、撮像した文字情報及び情報コードを読み取る情報読取装置及びプログラムに関するものである。 The present invention relates to an information reading device and a program for reading captured character information and an information code.

近年、バーコードやQRコード(登録商標)などの情報コードを読み取る情報コード読取機能に加えて、撮像した文字情報を認識する文字認識機能を兼ね備えた情報読取装置が多く利用されている。このような情報読取装置は、スマートフォンのように個人が所有する携帯端末に対して所定のアプリケーションプログラムをインストールすることでも実現することができる。 In recent years, in addition to an information code reading function for reading an information code such as a barcode or a QR code (registered trademark), an information reading device having a character recognition function for recognizing captured character information has been widely used. Such an information reading device can also be realized by installing a predetermined application program on a mobile terminal owned by an individual such as a smartphone.

このような情報コードと文字情報との双方を読取対象とする情報読取装置として、例えば、下記特許文献1に開示される光学的文字読取装置が知られている。この光学的文字読取装置では、バーコードとこのバーコードの直下に配置されるバーコード対応文字とを読取対象としており、バーコードの読み取りがエラーとなると、このバーコードの位置を基準にバーコード対応文字の位置を特定して文字認識するための処理を行っている。 As an information reading device that reads both such an information code and character information, for example, an optical character reading device disclosed in Patent Document 1 below is known. This optical character reader targets the barcode and the barcode-compatible characters placed directly under the barcode, and if an error occurs in reading the barcode, the barcode is based on the position of the barcode. Processing is performed to identify the position of the corresponding character and recognize the character.

特開平09−237312号公報Japanese Unexamined Patent Publication No. 09-237312

ところで、撮像した文字情報を認識する際にその撮像画像にバーコードも含まれていると、バーコードのバーの部分が大文字「I」や小文字「l」、数字「1」等に誤認されてしまうという問題がある。この問題は、バーコードだけでなく、QRコードなど他の種別の情報コードでも同様に生じるものであり、文字情報とともに撮像された情報コードに起因して文字誤認が生じてしまう可能性がある。 By the way, if a barcode is also included in the captured image when recognizing the captured character information, the bar portion of the barcode is mistakenly recognized as uppercase letter "I", lowercase letter "l", number "1", etc. There is a problem that it ends up. This problem occurs not only in barcodes but also in other types of information codes such as QR codes, and there is a possibility that character misidentification may occur due to the information code imaged together with the character information.

本発明は、上述した課題を解決するためになされたものであり、その目的とするところは、文字情報と情報コードとが撮像された撮像画像から文字情報を正確に認識し得る構成を提供することにある。 The present invention has been made to solve the above-mentioned problems, and an object of the present invention is to provide a configuration capable of accurately recognizing character information from a captured image in which character information and an information code are captured. There is.

上記目的を達成するため、特許請求の範囲の請求項1に記載の発明は、
撮像部(23)と、
前記撮像部により情報コードが撮像された撮像画像に対して前記情報コードを読み取るためのデコード処理を行う情報コード読取部(21)と、
前記撮像部により文字情報が撮像された撮像画像に対して前記文字情報を読み取るための文字認識処理を行う文字認識部(21)と、
を備える情報読取装置(10)であって、
前記情報コード読取部により前記情報コードが読み取られると、前記撮像画像のうち前記情報コードに相当する範囲が単色の画像範囲となるように当該撮像画像を補正する画像補正部(21)を備え、
前記文字認識部は、前記画像補正部により前記撮像画像が補正されると、当該補正された撮像画像に対して、前記文字認識処理を行うことを特徴とする。
なお、上記各括弧内の符号は、後述する実施形態に記載の具体的手段との対応関係を示すものである。
In order to achieve the above object, the invention according to claim 1 of the claims
Imaging unit (23) and
An information code reading unit (21) that performs decoding processing for reading the information code on an image captured by the imaging unit.
A character recognition unit (21) that performs character recognition processing for reading the character information on the captured image in which the character information is captured by the image pickup unit, and
An information reading device (10) including
When the information code is read by the information code reading unit, an image correction unit (21) for correcting the captured image so that the range corresponding to the information code in the captured image becomes a monochromatic image range is provided.
The character recognition unit is characterized in that when the captured image is corrected by the image correction unit, the character recognition process is performed on the corrected captured image.
The reference numerals in the parentheses indicate the correspondence with the specific means described in the embodiments described later.

請求項1の発明では、情報コード読取部により情報コードが読み取られると、撮像部により撮像された撮像画像のうち情報コードに相当する範囲が単色(例えば、白色)の画像範囲となるように当該撮像画像が画像補正部により補正され、当該補正された撮像画像に対して、文字認識部により文字認識処理が行われる。 According to the first aspect of the present invention, when the information code is read by the information code reading unit, the range corresponding to the information code in the captured image captured by the imaging unit becomes a single color (for example, white) image range. The captured image is corrected by the image correction unit, and the character recognition process is performed on the corrected captured image by the character recognition unit.

これにより、文字情報を認識するために撮像された撮像画像に情報コードが含まれている場合であっても、情報コードに相当する範囲が単色の画像範囲に補正されて実質的に文字認識対象外となる。このため、情報コードに起因する文字誤認が抑制されるので、文字情報と情報コードとが撮像された撮像画像から文字情報を正確に認識することができる。 As a result, even if the captured image captured to recognize the character information contains an information code, the range corresponding to the information code is corrected to a monochromatic image range, and the character recognition target is substantially obtained. Be outside. Therefore, since character misidentification caused by the information code is suppressed, the character information can be accurately recognized from the captured image in which the character information and the information code are captured.

請求項2の発明では、コード判定部により情報コードの一部が撮像されていると判定されると、撮像画像のうち情報コードの一部に相当する範囲が単色の画像範囲となるように当該撮像画像が画像補正部により補正される。 In the invention of claim 2, when it is determined by the code determination unit that a part of the information code is imaged, the range corresponding to a part of the information code in the captured image becomes a monochromatic image range. The captured image is corrected by the image correction unit.

これにより、デコードされた情報コードの部分だけでなく、デコードできなくても情報コードの一部と認識された部分も実質的に文字認識対象外となるため、情報コードに起因する文字誤認をより一層抑制することができる。 As a result, not only the decoded information code part but also the part recognized as a part of the information code even if it cannot be decoded is substantially excluded from the character recognition target, so that the character misidentification caused by the information code is further improved. It can be further suppressed.

請求項3の発明では、3つのファインダパターンの少なくとも1つとタイミングパターンの一部が撮像されることで、情報コードの一部が撮像されているとコード判定部により判定される。ファインダパターン及びタイミングパターンは、その目的から容易に認識できるように形成されているため、QRコードの一部が撮像される場合でもそのQRコードの一部に相当する範囲を容易かつ正確に把握することができる。 In the invention of claim 3, the code determination unit determines that a part of the information code is imaged by imaging at least one of the three finder patterns and a part of the timing pattern. Since the finder pattern and the timing pattern are formed so that they can be easily recognized from the purpose, even if a part of the QR code is imaged, the range corresponding to the part of the QR code can be easily and accurately grasped. be able to.

請求項4の発明では、画像補正部において、情報コード読取部により読み取られた情報コードが反転コードであると明暗反転判定部により判定されると、撮像画像のうち、情報コードに相当する範囲と所定の明暗判定閾値よりも明度が低くなる範囲とが暗色系の単色(例えば、黒色)の画像範囲となるように当該撮像画像が補正される。また、画像補正部において、情報コード読取部により読み取られた情報コードが反転コードでないと明暗反転判定部により判定されると、撮像画像のうち、情報コードに相当する範囲と所定の明暗判定閾値よりも明度が高くなる範囲とが明色系の単色(例えば、白色)の画像範囲となるように当該撮像画像が補正される。 In the invention of claim 4, when the light-dark reversal determination unit determines that the information code read by the information code reading unit is the reversal code in the image correction unit, the range corresponding to the information code in the captured image is obtained. The captured image is corrected so that the range in which the brightness is lower than the predetermined brightness determination threshold is the image range of a single dark color (for example, black). Further, when the image correction unit determines that the information code read by the information code reading unit is not an inversion code, the light / dark inversion determination unit determines that the range corresponding to the information code in the captured image and the predetermined light / dark determination threshold are used. The captured image is corrected so that the range in which the brightness is high is the image range of a single color (for example, white) of a bright color system.

表示媒体に対して反転コードとともに表示されている文字情報は白抜き文字で表示され、この白抜き文字の周囲は暗色系の背景となる可能性が高い。このため、反転コードに相当する範囲に加えて、撮像画像のうち所定の明暗判定閾値よりも明度が低くなる範囲、すなわち、白抜き文字の周囲の暗色系の背景を、暗色系の単色の画像範囲に補正して実質的に文字認識対象外とすることで、情報コード(反転コード)だけでなく背景の模様等に起因する文字誤認が抑制されやすくなる。その一方で、表示媒体に対して明色系セルと暗色系セルとの明暗が反転していない通常の情報コードとともに表示されている文字情報は黒文字で表示され、この黒文字の周囲は明色系の背景となる可能性が高い。このため、情報コードに相当する範囲に加えて、撮像画像のうち所定の明暗判定閾値よりも明度が高くなる範囲、すなわち、黒文字の周囲の明色系の背景を、明色系の単色の画像範囲に補正して実質的に文字認識対象外とすることで、情報コードだけでなく背景の模様等に起因する文字誤認が抑制されやすくなる。したがって、文字認識部による文字認識精度をより一層向上させることができる。 The character information displayed together with the reverse code on the display medium is displayed as outline characters, and there is a high possibility that the surroundings of the outline characters will be a dark background. Therefore, in addition to the range corresponding to the inversion code, the range of the captured image whose brightness is lower than the predetermined brightness determination threshold value, that is, the dark background around the outline characters is set as a dark monochromatic image. By correcting the range to substantially exclude the character recognition target, it becomes easy to suppress character misidentification caused not only by the information code (reversed code) but also by the background pattern and the like. On the other hand, the character information displayed together with the normal information code in which the light and dark cells of the light-colored cell and the dark-colored cell are not reversed with respect to the display medium is displayed in black characters, and the surroundings of the black characters are light-colored. It is likely to be the background of. Therefore, in addition to the range corresponding to the information code, the range in which the brightness is higher than the predetermined brightness determination threshold value in the captured image, that is, the bright color background around the black characters is set as a light color single color image. By correcting the range to substantially exclude the character recognition target, it becomes easy to suppress character misidentification caused not only by the information code but also by the background pattern and the like. Therefore, the character recognition accuracy by the character recognition unit can be further improved.

請求項5の発明では、画像補正部において、情報コード読取部により読み取られた情報コードが反転コードであると明暗反転判定部により判定されることで、一部が暗色系の単色の画像範囲に補正された撮像画像に対して行った文字認識処理が失敗すると、補正前の撮像画像のうち、情報コードに相当する範囲と所定の明暗判定閾値よりも明度が高くなる範囲とが明色系の単色の画像範囲となるように当該撮像画像が補正される。また、画像補正部において、情報コード読取部により読み取られた情報コードが反転コードでないと明暗反転判定部により判定されることで、一部が明色系の単色の画像範囲に補正された撮像画像に対して行った文字認識処理が失敗すると、補正前の撮像画像のうち、情報コードに相当する範囲と所定の明暗判定閾値よりも明度が低くなる範囲とが暗色系の単色の画像範囲となるように当該撮像画像が補正される。 In the invention of claim 5, in the image correction unit, the light / dark inversion determination unit determines that the information code read by the information code reading unit is an inversion code, so that a part of the image is in a dark color monochromatic image range. If the character recognition process performed on the corrected captured image fails, the range corresponding to the information code and the range where the brightness is higher than the predetermined brightness determination threshold of the captured image before correction are bright colors. The captured image is corrected so that the image range is a single color. Further, in the image correction unit, if the information code read by the information code reading unit is not an inversion code, the light / dark inversion determination unit determines that the captured image is partially corrected to a bright color monochromatic image range. If the character recognition process performed on the image fails, the range corresponding to the information code and the range whose brightness is lower than the predetermined brightness determination threshold of the captured image before correction becomes a dark-colored single-color image range. The captured image is corrected as described above.

これにより、反転コードとともに黒文字で表示されている文字情報を撮像しており、黒文字の周囲の背景が暗色系の単色の画像範囲に補正されたために文字認識が失敗しても、その背景が明色系の単色の画像範囲に補正されて再度文字認識処理が行われるので、背景の模様等に起因する文字誤認をさらに抑制することができる。その一方で、明色系セルと暗色系セルとが反転していない通常の情報コードとともに白抜き文字で表示されている文字情報を撮像しており、白抜き文字の周囲の背景が明色系の単色の画像範囲に補正されたために文字認識が失敗しても、その背景が暗色系の単色の画像範囲に補正されて再度文字認識処理が行われるので、背景の模様等に起因する文字誤認をさらに抑制することができる。 As a result, the character information displayed in black characters is imaged together with the inversion code, and even if the character recognition fails because the background around the black characters is corrected to a dark monochromatic image range, the background is clear. Since the character recognition process is performed again after the image range is corrected to a monochromatic image range of the color system, it is possible to further suppress character misidentification due to a background pattern or the like. On the other hand, the character information displayed in outline characters is imaged together with the normal information code in which the light color cells and the dark color cells are not inverted, and the background around the outline characters is light color. Even if character recognition fails because it is corrected to the single color image range of, the background is corrected to the dark color single color image range and the character recognition process is performed again, so the character recognition due to the background pattern etc. Can be further suppressed.

請求項6の発明では、検出部により検出された情報コードのセル配列方向を基準に撮像画像に対して文字認識処理が行われる。これにより、文字情報の文字配列方向と情報コードのセル配列方向とが同じ方向である場合には、文字情報の文字配列方向を特定できることから、検出されたセル配列方向を基準に文字情報が認識しやすくなるように回転補正した撮像画像に対して文字認識処理を行うことで、文字認識部による文字認識精度をより一層向上させることができる。また、文字情報の文字配列方向が情報コードのセル配列方向に対して所定角度ずれている場合でも、検出されたセル配列方向から上記所定角度ずれた方向を基準に文字情報が認識しやすくなるように回転補正した撮像画像に対して文字認識処理を行うことで、文字認識部による文字認識精度をより一層向上させることができる。 In the invention of claim 6, character recognition processing is performed on the captured image based on the cell arrangement direction of the information code detected by the detection unit. As a result, when the character arrangement direction of the character information and the cell arrangement direction of the information code are the same direction, the character arrangement direction of the character information can be specified, so that the character information is recognized based on the detected cell arrangement direction. Character recognition accuracy by the character recognition unit can be further improved by performing character recognition processing on the captured image that has been corrected for rotation so as to be easy to perform. Further, even if the character arrangement direction of the character information deviates from the cell arrangement direction of the information code by a predetermined angle, the character information can be easily recognized based on the direction deviated from the detected cell arrangement direction by the predetermined angle. By performing character recognition processing on the captured image that has been corrected for rotation, the character recognition accuracy by the character recognition unit can be further improved.

請求項7の発明では、画像補正部において、情報コード読取部により情報コードが読み取られると、当該情報コードを構成する明色系セルと暗色系セルとの撮像画像における明暗差が所定の明暗差閾値以上となる場合に、撮像画像のうち情報コードに相当する範囲が単色の画像範囲となるように当該撮像画像が補正される。 In the invention of claim 7, when the information code is read by the information code reading unit in the image correction unit, the difference in brightness between the light-colored cell and the dark-colored cell constituting the information code is a predetermined difference in brightness. When the value exceeds the threshold value, the captured image is corrected so that the range corresponding to the information code in the captured image becomes the monochromatic image range.

例えば、印刷媒体の表面側に文字情報が印刷されるとともに裏面側に情報コードが印刷されており、その表面側の文字情報を撮像して文字認識する際に、その撮像画像に、裏面側の情報コードが薄くかすんだ状態で写り込んでしまう場合がある。このような撮像画像では、情報コードの少なくとも一部が文字情報に重なっている状態で撮像されている場合に、そのデコード処理が成功すると、情報コードに相当する範囲が単色の画像範囲に補正されてしまうために、文字情報の一部が欠損してしまうという問題がある。 For example, character information is printed on the front side of a print medium and an information code is printed on the back side, and when the character information on the front side is imaged and characters are recognized, the captured image is printed on the back side. The information code may be reflected in a faint and hazy state. In such an captured image, when at least a part of the information code is captured in a state where it overlaps with the character information, if the decoding process is successful, the range corresponding to the information code is corrected to the monochromatic image range. Therefore, there is a problem that a part of the character information is lost.

そこで、読み取られた情報コードを構成する明色系セルと暗色系セルとの撮像画像における明暗差が上記所定の明暗差閾値以上となる場合に、撮像画像のうち、情報コードに相当する範囲が単色の画像範囲となるように当該撮像画像を補正する。すなわち、上述のように裏面側の情報コードが薄くかすんだ状態で写り込んでしまうような撮像状態では、上記明暗差が上記所定の明暗差閾値未満となることで、情報コードに相当する範囲が補正対象とならなくなる。このため、意図しない情報コードが薄くかすんだ状態で文字情報に重なるように撮像される場合であっても、画像補正に起因する文字情報の欠損等を防止することができる。 Therefore, when the difference in brightness between the light-colored cell and the dark-colored cell constituting the read information code is equal to or greater than the predetermined brightness-dark difference threshold value, the range corresponding to the information code in the captured image is widened. The captured image is corrected so that the image range is a single color. That is, in an imaging state in which the information code on the back surface side is reflected in a faint and hazy state as described above, the brightness difference becomes less than the predetermined brightness difference threshold value, so that the range corresponding to the information code is widened. It will not be subject to correction. Therefore, even when the unintended information code is imaged so as to overlap the character information in a thin and hazy state, it is possible to prevent the character information from being lost due to the image correction.

請求項8の発明では、画像補正部において、情報コード読取部により情報コードが読み取られると、上記明暗差が上記所定の明暗差閾値未満となる場合には、撮像画像において情報コードに相当する範囲のうち、当該情報コードを構成する明色系セルと同じ明度になる範囲と暗色系セルと同じ明度になる範囲とが単色の画像範囲となるように当該撮像画像が補正される。 In the invention of claim 8, when the information code is read by the information code reading unit in the image correction unit, if the brightness difference is less than the predetermined brightness difference threshold, the range corresponding to the information code in the captured image. Of these, the captured image is corrected so that the range having the same brightness as the light-colored cell constituting the information code and the range having the same brightness as the dark-colored cell become the monochromatic image range.

これにより、上述のように裏面側の情報コードが薄くかすんだ状態で写り込んでしまうような撮像状態では、上記明暗差が上記所定の明暗差閾値未満となることで、情報コードを構成する明色系セルと同じ明度になる範囲と暗色系セルと同じ明度になる範囲とが単色の画像範囲となるように当該撮像画像が補正される。このため、意図しない情報コードが薄くかすんだ状態で文字情報に重なるように撮像される場合であっても、鮮明な文字情報は補正されずに不鮮明でかすれた情報コードの部分のみが補正対象となるため、文字認識部による文字認識精度をより一層向上させることができる。 As a result, in an imaging state in which the information code on the back surface side is reflected in a faint and hazy state as described above, the brightness difference becomes less than the predetermined brightness difference threshold value, thereby forming the information code. The captured image is corrected so that the range having the same brightness as the color cell and the range having the same brightness as the dark cell are the monochromatic image range. Therefore, even if the unintended information code is imaged so as to overlap the character information in a thin and hazy state, the clear character information is not corrected and only the unclear and faint information code part is corrected. Therefore, the character recognition accuracy by the character recognition unit can be further improved.

請求項9の発明では、情報コードは、複数の明色系セル及び暗色系セルを配列してなるコード領域内に明色系セル及び暗色系セルと異なる空き領域を有している。そして、画像補正部では、情報コード読取部により空き領域を有する情報コードが読み取られる場合には、撮像画像のうち、コード領域に相当する範囲が補正対象から除外される。 In the invention of claim 9, the information code has a free area different from the light-color cells and the dark-color cells in the code area formed by arranging a plurality of light-color cells and dark-color cells. Then, in the image correction unit, when the information code reading unit reads the information code having a free area, the range corresponding to the code area in the captured image is excluded from the correction target.

これにより、空き領域内に文字認識すべき文字情報が配置される場合には、その文字情報が情報コードとともに単色の画像範囲となるように補正されてしまうことを防止することができる。 As a result, when the character information to be recognized as a character is arranged in the free area, it is possible to prevent the character information from being corrected so as to be a single color image range together with the information code.

請求項10の発明では、情報コードは、複数の明色系セル及び暗色系セルを配列してなるコード領域内に明色系セル及び暗色系セルと異なる空き領域を有している。そして、画像補正部では、情報コード読取部により空き領域を有する情報コードが読み取られる場合には、撮像画像のうち、コード領域から空き領域を除いた範囲が単色の画像範囲となるように当該撮像画像が補正される。 In the invention of claim 10, the information code has a free area different from the light-colored cell and the dark-colored cell in the code area formed by arranging a plurality of light-colored cells and dark-colored cells. Then, when the information code reading unit reads the information code having a free area, the image correction unit captures the captured image so that the range excluding the free area from the code area becomes the monochromatic image range. The image is corrected.

このようにしても、空き領域内に文字認識すべき文字情報が配置される場合には、その文字情報が単色の画像範囲となるように補正されてしまうことを防止することができる。特に、コード領域から空き領域を除いた範囲が単色の画像範囲となるように補正されるため、文字認識すべき文字情報の周囲が単色の画像範囲となるので、文字認識部による文字認識精度をより一層向上させることができる。 Even in this way, when the character information to be recognized as a character is arranged in the free area, it is possible to prevent the character information from being corrected so as to be an image range of a single color. In particular, since the range excluding the free area from the code area is corrected so as to be a monochromatic image range, the area around the character information to be recognized is a monochromatic image range, so that the character recognition accuracy by the character recognition unit can be improved. It can be further improved.

請求項11の発明によれば、請求項1と同様の効果を奏するプログラムを実現できる。 According to the invention of claim 11, a program having the same effect as that of claim 1 can be realized.

第1実施形態に係る情報読取装置と読取対象となる文字情報及び情報コードとを概略的に示す説明図である。It is explanatory drawing which shows schematicly about the information reading apparatus which concerns on 1st Embodiment, character information to read, and information code. 情報読取装置の電気的構成を概略的に示すブロック図である。It is a block diagram which shows schematic | electrical structure of an information reader. 第1実施形態において制御部にて行われる読取処理の流れを例示するフローチャートである。It is a flowchart which illustrates the flow of the reading process performed in the control part in 1st Embodiment. 図4(A)は、文字情報とともにデコード可能にバーコードが撮像された撮像画像を示す説明図であり、図4(B)は、図4(A)においてバーコードに相当する範囲が補正された撮像画像を示す説明図である。FIG. 4 (A) is an explanatory view showing an captured image in which a barcode is captured so that it can be decoded together with character information, and FIG. 4 (B) is a correction in a range corresponding to the barcode in FIG. 4 (A). It is explanatory drawing which shows the captured image. 図5(A)は、文字情報とともにバーコードの一部が撮像された撮像画像を示す説明図であり、図5(B)は、図5(A)においてバーコードの一部に相当する範囲が補正された撮像画像を示す説明図である。FIG. 5 (A) is an explanatory view showing a captured image in which a part of the barcode is captured together with character information, and FIG. 5 (B) is a range corresponding to a part of the barcode in FIG. 5 (A). It is explanatory drawing which shows the captured image which corrected. 図6(A)は、文字情報とともにマージンが認識されない状態でバーコードが撮像された撮像画像を示す説明図であり、図6(B)は、図6(A)においてバーコードに相当する範囲が補正された撮像画像を示す説明図である。FIG. 6 (A) is an explanatory diagram showing an captured image in which a barcode is captured in a state where a margin is not recognized together with character information, and FIG. 6 (B) is a range corresponding to the barcode in FIG. 6 (A). It is explanatory drawing which shows the captured image which corrected. 図7(A)は、文字情報とともにQRコードの一部が撮像された撮像画像を示す説明図であり、図7(B)は、図7(A)においてQRコードの一部に相当する範囲が補正された撮像画像を示す説明図である。FIG. 7 (A) is an explanatory diagram showing a captured image in which a part of the QR code is captured together with character information, and FIG. 7 (B) is a range corresponding to a part of the QR code in FIG. 7 (A). It is explanatory drawing which shows the captured image which corrected. 第2実施形態において制御部にて行われる読取処理の流れを例示するフローチャートである。It is a flowchart which illustrates the flow of the reading process performed in the control part in 2nd Embodiment. 図9(A)は、文字情報とともに反転コードが撮像された撮像画像を示す説明図であり、図9(B)は、図9(A)において反転コード及び背景等が黒色の画像範囲に補正された撮像画像を示す説明図である。FIG. 9 (A) is an explanatory view showing an captured image in which the inversion code is captured together with the character information, and FIG. 9 (B) shows the image range in which the inversion code and the background are black in FIG. 9 (A). It is explanatory drawing which shows the captured image. 図10(A)は、文字情報とともに非反転コードが撮像された撮像画像を示す説明図であり、図10(B)は、図10(A)において非反転コード及び背景等が白色の画像範囲に補正された撮像画像を示す説明図である。FIG. 10 (A) is an explanatory view showing an captured image in which a non-reversal code is captured together with character information, and FIG. 10 (B) is an image range in which the non-reversal code and the background are white in FIG. It is explanatory drawing which shows the captured image corrected to. バーコードやQRコードのセル配列方向と文字情報の文字配列情報とが読取基準方向に対して傾いた状態を説明する説明図である。It is explanatory drawing explaining the state which the cell arrangement direction of a bar code or QR code and the character arrangement information of a character information are inclined with respect to a reading reference direction. 第3実施形態において制御部にて行われる読取処理の流れを例示するフローチャートである。It is a flowchart which illustrates the flow of the reading process performed in the control part in 3rd Embodiment. 図13(A)は、セル配列方向及び文字配列方向が読取基準方向に対して同じ角度で傾くように情報コード及び文字情報が撮像された撮像画像を示す説明図であり、図13(B)は、セル配列方向に応じて図13(A)の撮像画像を回転補正等した状態の撮像画像を示す説明図である。FIG. 13 (A) is an explanatory diagram showing an captured image in which the information code and character information are captured so that the cell arrangement direction and the character arrangement direction are tilted at the same angle with respect to the reading reference direction, and FIG. 13 (B) is shown. Is an explanatory view showing a captured image in a state in which the captured image of FIG. 13A is corrected for rotation according to the cell arrangement direction. 図14(A)は、文字配列方向がセル配列方向に対して所定角度だけずれるように情報コード及び文字情報が撮像された撮像画像を示す説明図であり、図14(B)は、セル配列方向に応じて図14(A)の撮像画像を回転補正等した状態の撮像画像を示す説明図である。FIG. 14A is an explanatory diagram showing an image captured in which the information code and character information are captured so that the character arrangement direction deviates from the cell arrangement direction by a predetermined angle, and FIG. 14B is a cell arrangement. It is explanatory drawing which shows the captured image in the state which corrected the rotation of the captured image of FIG. 14A according to a direction. 第4実施形態において制御部にて行われる読取処理の流れを例示するフローチャートである。It is a flowchart which illustrates the flow of the reading process performed in the control part in 4th Embodiment. 図16(A)は、薄くかすんだバーコードが文字情報に重なるように撮像された撮像画像を示す説明図であり、図16(B)は、図16(A)においてバーコードに相当する範囲が補正された撮像画像を示す説明図であり、図16(C)は、図16(A)においてバーコードの明色系セルと同じ明度になる範囲と暗色系セルと同じ明度になる範囲とが補正された撮像画像を示す説明図である。FIG. 16 (A) is an explanatory view showing an image captured so that a thin and hazy barcode overlaps character information, and FIG. 16 (B) is a range corresponding to the barcode in FIG. 16 (A). 16 (C) shows a range in which the brightness is the same as that of the light-colored cell of the barcode and a range in which the brightness is the same as that of the dark-colored cell in FIG. 16 (A). It is explanatory drawing which shows the captured image which corrected. 第5実施形態の要部を説明する説明図であり、図17(A)は、空き領域内に文字情報が配置された情報コードを撮像した撮像画像を示し、図17(B)は、図17(A)の撮像画像においてコード領域から空き領域を除いた範囲が補正された状態を示す。It is explanatory drawing explaining the main part of 5th Embodiment, FIG. 17 (A) shows the captured image which imaged the information code which arranged the character information in a free area, and FIG. 17 (B) is a figure. In the captured image of 17 (A), a state in which the range excluding the empty area from the code area is corrected is shown.

以下、本発明に係る情報読取装置及びプログラムを具現化した第1実施形態について、図面を参照して説明する。
図1に示すように、本実施形態に係る情報読取装置10は、ユーザによって携帯されて様々な場所で用いられるスマートフォンなどの携帯型の情報処理端末として構成されている。この情報読取装置10は、図2に示すように、CPU等からなる制御部21、メモリ22、カメラとして構成される撮像部23、制御部21によって表示内容が制御されるタッチパネル24、タッチパネル24に対するタッチ操作やキー操作に信号を制御部21に出力する操作部25、外部機器等と通信するための通信部26などを備えるように構成されている。
Hereinafter, the first embodiment embodying the information reading device and the program according to the present invention will be described with reference to the drawings.
As shown in FIG. 1, the information reading device 10 according to the present embodiment is configured as a portable information processing terminal such as a smartphone that is carried by a user and used in various places. As shown in FIG. 2, the information reading device 10 relates to a control unit 21 composed of a CPU or the like, a memory 22, an imaging unit 23 configured as a camera, a touch panel 24 whose display contents are controlled by the control unit 21, and a touch panel 24. It is configured to include an operation unit 25 that outputs a signal to the control unit 21 for touch operation and key operation, a communication unit 26 for communicating with an external device, and the like.

本実施形態に係る情報読取装置10は、所定のアプリケーションプログラム(以下、読取アプリともいう)がインストールされることで、撮像部23により情報コードが撮像された撮像画像に対してその情報コードを読み取るためのデコード処理を行う機能や撮像部23により文字情報が撮像された撮像画像に対してその文字情報を読み取るための文字認識処理を行う機能(OCR)を有するように構成されている。特に、本実施形態では、読取アプリが起動されることで制御部21にてなされる読取処理により、文字情報を読み取る際に情報コードまで撮像された場合でも、情報コードに起因する文字誤認を抑制して文字情報が認識される。 The information reading device 10 according to the present embodiment reads the information code of the captured image captured by the imaging unit 23 by installing a predetermined application program (hereinafter, also referred to as a reading application). It is configured to have a function of performing decoding processing for the purpose and a function (OCR) of performing character recognition processing for reading the character information on the captured image in which the character information is captured by the imaging unit 23. In particular, in the present embodiment, the reading process performed by the control unit 21 when the reading application is started suppresses character misidentification caused by the information code even when the information code is captured when reading the character information. Character information is recognized.

以下、本実施形態において、制御部21にてなされる読取処理について、図3に示すフローチャートを参照して詳述する。なお、図1に例示するように、表示媒体Rの表示面において、バーコードBが近くに印字されている「2019年03月06日」を文字情報Wとして認識する場合を例に説明する。 Hereinafter, in the present embodiment, the reading process performed by the control unit 21 will be described in detail with reference to the flowchart shown in FIG. As illustrated in FIG. 1, a case where "March 06, 2019" in which the barcode B is printed nearby is recognized as the character information W on the display surface of the display medium R will be described as an example.

操作部25に対する所定の操作に応じて読取アプリが起動されて制御部21により読取処理が開始されると、図3のステップS101の撮像処理がなされる。この処理では、撮像部23の撮像方向を文字情報Wに向けた状態で操作部25に対する読取操作等がなされることで、撮像部23により文字情報Wが撮像される。 When the reading application is started in response to a predetermined operation on the operation unit 25 and the reading process is started by the control unit 21, the imaging process in step S101 of FIG. 3 is performed. In this process, the character information W is imaged by the image pickup unit 23 by performing a reading operation or the like on the operation unit 25 in a state where the image pickup direction of the image pickup unit 23 is directed toward the character information W.

続いて、ステップS103に示す明暗判定閾値設定処理がなされ、上記ステップS101にて撮像された撮像画像の明暗分布に基づいて、情報コードを白セル(明色系セル)と黒セル(暗色系セル)とに区分けする際の基準となる所定の明暗判定閾値が設定される。そして、ステップS105の判定処理にて、上述のように撮像された撮像画像について、情報コードが撮像されているか否かについて判定される。ここで、図4(A)に示す撮像画像P1aのように、文字情報WとともにバーコードBがデコード可能に撮像されていると、ステップS105にてYesと判定される。 Subsequently, the light / darkness determination threshold setting process shown in step S103 is performed, and the information codes are changed to white cells (light color cells) and black cells (dark color cells) based on the light / dark distribution of the captured image captured in step S101. ) And a predetermined light / darkness judgment threshold value as a reference when classifying into. Then, in the determination process of step S105, it is determined whether or not the information code is captured in the captured image captured as described above. Here, if the barcode B is imaged so as to be decodable together with the character information W as in the captured image P1a shown in FIG. 4A, it is determined as Yes in step S105.

この場合には、ステップS107に示すデコード処理がなされ、上述のように設定された明暗判定閾値を基準に、撮像した情報コードを解読するための処理がなされる。なお、上記ステップS107は、「情報コード読取ステップ」の一例に相当し、このステップS107におけるデコード処理を行う制御部21は、「情報コード読取部」の一例に相当し得る。 In this case, the decoding process shown in step S107 is performed, and the process for decoding the captured information code is performed based on the brightness determination threshold value set as described above. The step S107 corresponds to an example of the "information code reading step", and the control unit 21 that performs the decoding process in the step S107 may correspond to an example of the "information code reading unit".

このデコード処理が成功すると(S109でYes)、ステップS111に示す第1画像補正処理がなされる。この処理では、上述のように撮像された撮像画像のうちデコードが成功した情報コードに相当する範囲が周囲との色の境界をなくすように単色の画像範囲に補正(置換)される。図4(A)に示す撮像画像P1aのように、バーコードBの周囲が白色の背景であれば、上記第1画像補正処理により、図4(B)に示す撮像画像P1bのように、補正前の撮像画像P1aにおいて、バーコードBに相当する範囲が白色の画像範囲に補正される。すなわち、デコードに成功した情報コードが取り除かれるように撮像画像が補正される。なお、上記ステップS111及び後述するステップS113は、「画像補正ステップ」の一例に相当し、このステップS111における第1画像補正処理及び後述するステップS113における第2画像補正処理を行う制御部21は、「画像補正部」の一例に相当し得る。 If this decoding process is successful (Yes in S109), the first image correction process shown in step S111 is performed. In this process, the range corresponding to the information code that has been successfully decoded in the captured image captured as described above is corrected (replaced) to a monochromatic image range so as to eliminate the color boundary with the surroundings. If the background of the barcode B is white as in the captured image P1a shown in FIG. 4 (A), the first image correction process corrects the image P1b shown in FIG. 4 (B). In the previous captured image P1a, the range corresponding to the barcode B is corrected to the white image range. That is, the captured image is corrected so that the information code that has been successfully decoded is removed. The step S111 and the step S113 described later correspond to an example of the "image correction step", and the control unit 21 that performs the first image correction process in the step S111 and the second image correction process in the step S113 described later corresponds to an example. It can correspond to an example of "image correction unit".

続いて、ステップS115に示す文字認識処理がなされる。上述のように一部が単色の画像範囲に補正されていると、この補正された撮像画像に対して、公知の文字認識技術(OCR技術)を用いた文字認識処理が行われる。このように、バーコードBがない状態で文字情報Wを認識するため、バーコードBに起因する文字誤認をなくすことができる。なお、上記ステップS115は、「文字認識ステップ」一例に相当し、このステップS115における文字認識処理を行う制御部21は、「文字認識部」の一例に相当し得る。 Subsequently, the character recognition process shown in step S115 is performed. When a part of the corrected image is corrected to a monochromatic image range as described above, character recognition processing using a known character recognition technique (OCR technique) is performed on the corrected captured image. In this way, since the character information W is recognized without the barcode B, it is possible to eliminate the character misidentification caused by the barcode B. The step S115 corresponds to an example of the "character recognition step", and the control unit 21 that performs the character recognition process in the step S115 may correspond to an example of the "character recognition unit".

一方、図5(A)に示す撮像画像P2aのように、バーコードBの一部のみが撮像されている場合には、バー(黒セル)とスペース(白セル)との並びからバーコードが撮像されていると判断されても(S105でYes)、ステップS107でのデコード処理が失敗する(S109でNo)。なお、デコードが失敗する撮像画像について情報コードが撮像されているか否かについて判定することになる上記ステップS105の判定処理を行う制御部21は、デコード処理が失敗した撮像画像について情報コードの一部が撮像されているか否かについて判定する「コード判定部」の一例に相当し得る。 On the other hand, when only a part of the barcode B is imaged as in the captured image P2a shown in FIG. 5 (A), the barcode is displayed from the arrangement of the bar (black cell) and the space (white cell). Even if it is determined that the image has been captured (Yes in S105), the decoding process in step S107 fails (No in S109). The control unit 21 that performs the determination process in step S105, which determines whether or not the information code has been captured for the captured image for which decoding has failed, is a part of the information code for the captured image for which the decoding process has failed. It can correspond to an example of a "code determination unit" that determines whether or not an image is captured.

この場合には、ステップS113に示す第2画像補正処理がなされる。この処理では、上述のように撮像された撮像画像のうちバーコードBの一部(情報コードの一部)に相当する範囲が周囲との色の境界をなくすように単色の画像範囲に補正(置換)される。図5(A)に示す撮像画像P2aのように、情報コードが撮像されていると認識された上でそのデコードに失敗したバーコードBの一部の周囲が白色の背景であれば、図5(B)に示す撮像画像P2bのように、補正前の撮像画像P2aにおいて、バーコードBの一部に相当する範囲が白色の画像範囲に補正される(S113)。すなわち、デコードが失敗したとしても情報コードの一部が撮像されている場合には、その情報コードの撮像されている範囲の全てが取り除かれるように撮像画像が補正される。そして、上述のように補正された撮像画像に対して、上記ステップS115の文字認識処理が行われる。なお、バーコードBを構成するセルの一部が欠損等しているためにバーコードと認識できてもそのデコードが失敗した場合でも、そのバーコードBに相当する範囲が単色の画像範囲に補正される(S113)。 In this case, the second image correction process shown in step S113 is performed. In this process, the range corresponding to a part of the barcode B (a part of the information code) of the captured image captured as described above is corrected to a monochromatic image range so as to eliminate the color boundary with the surroundings ( Will be replaced). As shown in the captured image P2a shown in FIG. 5 (A), if it is recognized that the information code has been captured and a part of the barcode B that fails to be decoded is surrounded by a white background, FIG. Like the captured image P2b shown in (B), in the captured image P2a before correction, a range corresponding to a part of the barcode B is corrected to a white image range (S113). That is, even if the decoding fails, if a part of the information code is captured, the captured image is corrected so that the entire captured range of the information code is removed. Then, the character recognition process of step S115 is performed on the captured image corrected as described above. Even if the barcode can be recognized as a barcode because a part of the cells constituting the barcode B is missing or the decoding fails, the range corresponding to the barcode B is corrected to a monochromatic image range. (S113).

また、図6(A)に示す撮像画像P3aのように、バーコードBの全体が撮像されても、必要なマージンが認識できないように撮像されている場合には、デコード処理が失敗する(S109でNo)。このような場合でも、図6(B)に示す撮像画像P3bのように、補正前の撮像画像P3aにおいて、バーコードBに相当する範囲が単色の画像範囲に補正されて(S113)、この補正された撮像画像に対して、上記ステップS115の文字認識処理が行われる。 Further, as in the captured image P3a shown in FIG. 6A, if the entire barcode B is captured but the required margin cannot be recognized, the decoding process fails (S109). No). Even in such a case, as in the captured image P3b shown in FIG. 6B, in the captured image P3a before correction, the range corresponding to the barcode B is corrected to the monochromatic image range (S113), and this correction is performed. The character recognition process of step S115 is performed on the captured image.

また、上記ステップS101の撮像処理にて情報コードが撮像されていない場合には、ステップS105の判定処理にてNoと判定されて、撮像画像が補正されることなく、上記ステップS115の文字認識処理が行われる。 If the information code is not captured in the imaging process of step S101, the determination process of step S105 determines No, and the captured image is not corrected, and the character recognition process of step S115 is performed. Is done.

以上説明したように、本実施形態に係る情報読取装置10では、制御部21にてなされる読取処理において、情報コードが読み取られると(S109でYes)、撮像部23により撮像された撮像画像のうち情報コードに相当する範囲が単色の画像範囲となるように当該撮像画像が補正され(S111)、当該補正された撮像画像に対して、文字認識処理が行われる(S115)。 As described above, in the information reading device 10 according to the present embodiment, when the information code is read (Yes in S109) in the reading process performed by the control unit 21, the captured image captured by the imaging unit 23 The captured image is corrected so that the range corresponding to the information code is a monochromatic image range (S111), and character recognition processing is performed on the corrected captured image (S115).

そして、本実施形態に係るプログラムは、撮像部23を備えた情報読取装置10に、撮像部23により情報コードが撮像された撮像画像に対して情報コードを読み取るためのデコード処理を行う情報コード読取ステップ(S107)と、情報コード読取ステップにより情報コードが読み取られると、撮像画像のうち情報コードに相当する範囲が単色の画像範囲となるように当該撮像画像を補正する画像補正ステップ(S111,S113)と、画像補正ステップにより撮像画像が補正されると、当該補正された撮像画像に対して、文字情報を読み取るための文字認識処理を行う文字認識ステップ(S115)と、を実行させる。 Then, in the program according to the present embodiment, the information code reading device 10 provided with the imaging unit 23 performs a decoding process for reading the information code on the captured image in which the information code is captured by the imaging unit 23. When the information code is read by the step (S107) and the information code reading step, the image correction step (S111, S113) corrects the captured image so that the range corresponding to the information code in the captured image becomes a monochromatic image range. ), And when the captured image is corrected by the image correction step, the character recognition step (S115) for performing the character recognition process for reading the character information is executed on the corrected captured image.

これにより、文字情報を認識するために撮像された撮像画像に情報コードが含まれている場合であっても、情報コードに相当する範囲が単色の画像範囲に補正されて実質的に文字認識対象外となる。このため、情報コードに起因する文字誤認が抑制されるので、文字情報と情報コードとが撮像された撮像画像から文字情報を正確に認識することができる。 As a result, even if the captured image captured to recognize the character information contains an information code, the range corresponding to the information code is corrected to a monochromatic image range, and the character recognition target is substantially obtained. Be outside. Therefore, since character misidentification caused by the information code is suppressed, the character information can be accurately recognized from the captured image in which the character information and the information code are captured.

さらに、コード判定部により情報コードの一部が撮像されていると判定されると、撮像画像のうち上記情報コードの一部に相当する範囲が単色の画像範囲となるように当該撮像画像が補正される。 Further, when it is determined by the code determination unit that a part of the information code is captured, the captured image is corrected so that the range corresponding to a part of the information code in the captured image becomes a monochromatic image range. Will be done.

これにより、デコードされた情報コードの部分だけでなく、デコードできなくても情報コードの一部と認識された部分も実質的に文字認識対象外となるため、情報コードに起因する文字誤認をより一層抑制することができる。 As a result, not only the decoded information code part but also the part recognized as a part of the information code even if it cannot be decoded is substantially excluded from the character recognition target, so that the character misidentification caused by the information code is further improved. It can be further suppressed.

なお、情報コードに相当する範囲又は情報コードの一部に相当する範囲は、単色の画像範囲として、白色の画像範囲に補正されることに限らず、情報コードの周囲の背景の色等に応じて、明色系の単色の画像範囲に補正されてもよいし、暗色系の単色の画像範囲に補正されてもよい。 The range corresponding to the information code or the range corresponding to a part of the information code is not limited to being corrected to a white image range as a monochromatic image range, but depends on the background color around the information code and the like. Therefore, it may be corrected to a light-colored single-color image range, or may be corrected to a dark-colored single-color image range.

また、文字情報Wとともに撮像される情報コードは、バーコードBに限らず、QRコードなどの他のコード種別の情報コードであってもよい。このような情報コードであっても、デコードに成功した場合には(S109でYes)、撮像画像のうちデコード成功した情報コードに相当する範囲が単色の画像範囲に補正され、上述のようにデコード可能に撮像されていないためにデコード失敗した場合には(S109でNo)、そのデコード失敗した情報コードに相当する範囲が単色の画像範囲に補正されることで、情報コードに起因する文字誤認を抑制することができる。 Further, the information code captured together with the character information W is not limited to the barcode B, and may be an information code of another code type such as a QR code. Even with such an information code, if the decoding is successful (Yes in S109), the range corresponding to the information code that has been successfully decoded in the captured image is corrected to the monochromatic image range, and the image is decoded as described above. If decoding fails because the image is not captured as possible (No in S109), the range corresponding to the decoding-failed information code is corrected to a single-color image range, and character misidentification due to the information code is detected. It can be suppressed.

特に、QRコードは、方形状のコード領域の三隅にファインダパターンFPが配置されるとともにファインダパターンFP間にコード領域の外縁に平行となる2つのタイミングパターンTPが配置される構成である。このため、図7(A)に示す撮像画像P4aのように、3つのファインダパターンFPの少なくとも1つとタイミングパターンTPの一部が撮像された場合には、QRコードの一部が撮像されているとして、上記ステップS113の第2画像補正処理により、図7(B)に示す撮像画像P4bのように、補正前の撮像画像P4aにおいて、QRコードの一部に相当する範囲が単色(図7(B)では白色)の画像範囲に補正される。ここで、撮像画像においてQRコードの一部に相当する範囲は、ファインダパターンFP及びタイミングパターンTPの位置及び配列方向等に基づいて求めることができる。このように、ファインダパターンFP及びタイミングパターンTPは、その目的から容易に認識できるように形成されているため、QRコードの一部が撮像される場合でもそのQRコードの一部に相当する範囲を容易かつ正確に把握することができる。 In particular, the QR code has a configuration in which finder pattern FPs are arranged at three corners of a rectangular code region and two timing pattern TPs parallel to the outer edge of the code region are arranged between the finder pattern FPs. Therefore, as shown in the captured image P4a shown in FIG. 7A, when at least one of the three finder pattern FPs and a part of the timing pattern TP are captured, a part of the QR code is captured. As a result of the second image correction process in step S113, the range corresponding to a part of the QR code is a single color in the captured image P4a before correction as shown in the captured image P4b shown in FIG. 7 (B). In B), the image range is corrected to white). Here, the range corresponding to a part of the QR code in the captured image can be obtained based on the positions and arrangement directions of the finder pattern FP and the timing pattern TP. As described above, since the finder pattern FP and the timing pattern TP are formed so as to be easily recognized from the purpose, even if a part of the QR code is imaged, a range corresponding to a part of the QR code can be obtained. It can be grasped easily and accurately.

[第2実施形態]
次に、第2実施形態に係る情報読取装置及びプログラムについて、図面を参照して説明する。
本第2実施形態では、情報コードを含めた撮像画像全体を補正対象とする点が、上記第1実施形態と主に異なる。したがって、第1実施形態と実質的に同一の構成部分には、同一符号を付し、その説明を省略する。
[Second Embodiment]
Next, the information reading device and the program according to the second embodiment will be described with reference to the drawings.
The second embodiment is mainly different from the first embodiment in that the entire captured image including the information code is the correction target. Therefore, the components substantially the same as those in the first embodiment are designated by the same reference numerals, and the description thereof will be omitted.

文字情報及び情報コードが表示される表示媒体の表示面には、背景として模様等が表示される場合があり、この模様等に起因して文字誤認が生じてしまう可能性がある。このため、例えば、撮像画像において明度が所定値よりも高い範囲を一律に白色の画像範囲となるように補正することで、明色系の模様等を撮像画像から取り除くことができる。その一方で、読み取るべき文字情報が白抜き文字で表示されている場合には、その白抜き文字の周囲も白く補正されてしまうと、文字認識できなくなる。同様に、暗色系の模様等を撮像画像から取り除くために、明度が所定値よりも低い範囲を一律に黒色の画像範囲となるように補正する際、読み取るべき文字情報が黒文字で表示されている場合には、その黒文字の周囲も黒く補正されてしまうと、文字認識できなくなる。 A pattern or the like may be displayed as a background on the display surface of the display medium on which the character information and the information code are displayed, and there is a possibility that character misidentification may occur due to the pattern or the like. Therefore, for example, a bright color pattern or the like can be removed from the captured image by uniformly correcting a range in which the brightness is higher than a predetermined value in the captured image so as to be a white image range. On the other hand, when the character information to be read is displayed as outline characters, if the surroundings of the outline characters are also corrected to white, the characters cannot be recognized. Similarly, in order to remove dark-colored patterns from the captured image, the character information to be read is displayed in black characters when the range where the brightness is lower than the predetermined value is uniformly corrected to be the black image range. In that case, if the periphery of the black character is also corrected to black, the character cannot be recognized.

そこで、本実施形態における読取処理では、読み取った情報コードが明色系セルと暗色系セルとの明暗を反転させた反転コードであるか否かを判定して、反転コードであると判定される場合には、撮像画像において上記明暗判定閾値よりも明度が低くなる範囲を暗色系の単色の画像範囲となるように補正する。表示媒体に対して反転コードとともに表示されている文字情報は白抜き文字で表示され、この白抜き文字の周囲は暗色系の背景となる可能性が高いからである。また、読み取った情報コードが反転コードでないと判定される場合には、撮像画像において上記明暗判定閾値よりも明度が高くなる範囲を明色系の単色の画像範囲となるように補正する。表示媒体に対して明色系セルと暗色系セルとの明暗が反転していない通常の情報コード(以下、非反転コードともいう)とともに表示されている文字情報は黒文字で表示され、この黒文字の周囲は明色系の背景となる可能性が高いからである。 Therefore, in the reading process in the present embodiment, it is determined whether or not the read information code is an inverted code in which the lightness and darkness of the light-colored cell and the dark-colored cell are inverted, and it is determined that the code is an inverted code. In this case, the range in which the brightness of the captured image is lower than the brightness determination threshold is corrected so as to be a dark-colored single-color image range. This is because the character information displayed together with the reverse code on the display medium is displayed as outline characters, and there is a high possibility that the surroundings of the outline characters will be a dark background. When it is determined that the read information code is not an inversion code, the range in which the brightness is higher than the brightness determination threshold value in the captured image is corrected so as to be a bright color monochromatic image range. The character information displayed together with the normal information code (hereinafter, also referred to as non-inverted code) in which the light and darkness of the light-colored cell and the dark-colored cell is not reversed with respect to the display medium is displayed in black characters, and the black characters This is because the surroundings are likely to be a light-colored background.

以下、本実施形態において、制御部21にてなされる読取処理について、図8に示すフローチャートを参照して詳述する。
上記第1実施形態と同様に、撮像画像の明暗分布に基づいて明暗判定閾値が設定され(図8のS103)、そのデコード処理が成功すると(S109でYes)、ステップS117に示す判定処理にて、デコード成功した情報コードが反転コードか否かについて判定される。なお、上記ステップS117の判定処理を行う制御部21は、「明暗反転判定部」の一例に相当し得る。
Hereinafter, in the present embodiment, the reading process performed by the control unit 21 will be described in detail with reference to the flowchart shown in FIG.
Similar to the first embodiment, when the brightness / darkness determination threshold value is set based on the brightness / darkness distribution of the captured image (S103 in FIG. 8) and the decoding process is successful (Yes in S109), the determination process shown in step S117 is performed. , It is determined whether or not the information code that has been successfully decoded is an inverted code. The control unit 21 that performs the determination process in step S117 may correspond to an example of the “bright / dark inversion determination unit”.

ここで、デコード成功した情報コードが反転コードであることから、ステップS117にてYesと判定されると、ステップS119の暗色系画像補正処理がなされる。この処理では、認識すべき文字情報が白抜き文字で表示されていることを前提に、撮像画像において反転コードに相当する範囲と上記明暗判定閾値よりも明度が低くなる範囲とを暗色系の単色(例えば、黒色)の画像範囲となるように補正する。例えば、図9(A)に示す撮像画像P5aのように、明暗が反転したバーコードBが反転コードとして撮像されている場合には、認識すべき文字情報Wが白抜き文字であるとして、上記ステップS119の暗色系画像補正処理により、図9(B)に示す撮像画像P5bのように、補正前の撮像画像P5aにおいて、反転コードに相当する範囲と上記明暗判定閾値よりも明度が低くなる範囲とが、黒色の画像範囲となるように補正される。これにより、文字情報Wと背景部分とのコントラストが大きくなる。そして、このように文字情報Wと背景部分とのコントラストが大きくなるように補正された撮像画像に対して、ステップS121に示す文字認識処理が行われる。 Here, since the information code for which decoding is successful is an inverted code, if Yes is determined in step S117, the dark color image correction process in step S119 is performed. In this process, on the premise that the character information to be recognized is displayed as outline characters, the range corresponding to the inversion code in the captured image and the range in which the brightness is lower than the above-mentioned brightness determination threshold are set to a single dark color system. Correct so that the image range is (for example, black). For example, as in the captured image P5a shown in FIG. 9 (A), when the bar code B whose brightness is reversed is imaged as an inverted code, it is assumed that the character information W to be recognized is an outline character. By the dark color image correction process in step S119, as shown in the captured image P5b shown in FIG. 9B, in the captured image P5a before correction, the range corresponding to the inversion code and the range in which the brightness is lower than the brightness determination threshold. Is corrected so that the image range is black. As a result, the contrast between the character information W and the background portion is increased. Then, the character recognition process shown in step S121 is performed on the captured image corrected so that the contrast between the character information W and the background portion becomes large.

上記ステップS121における文字認識処理が成功すると(S123でYes)、本読取処理が終了する。その一方で、上記ステップS121における文字認識処理が失敗すると(S123でNo)、認識すべき文字情報が白抜き文字ではなく黒文字であるとして、上記ステップS125の明色系画像補正処理により、上記ステップS101にて撮像された撮像画像において、反転コードに相当する範囲と上記明暗判定閾値よりも明度が高くなる範囲とを明色系の単色(例えば、白色)の画像範囲となるように補正する。そして、このように補正された撮像画像に対して、ステップS127に示す文字認識処理が行われる。 When the character recognition process in step S121 is successful (Yes in S123), the main reading process is completed. On the other hand, if the character recognition process in step S121 fails (No in S123), it is assumed that the character information to be recognized is not a white character but a black character, and the light color image correction process in step S125 causes the step. In the captured image captured by S101, the range corresponding to the inversion code and the range in which the brightness is higher than the brightness determination threshold value are corrected so as to be a bright color single color (for example, white) image range. Then, the character recognition process shown in step S127 is performed on the captured image corrected in this way.

また、デコード成功した情報コードが非反転コードであることから、ステップS117にてNoと判定されると、ステップS129の明色系画像補正処理がなされる。この処理では、認識すべき文字情報が黒文字で表示されていることを前提に、撮像画像において非反転コードに相当する範囲と上記明暗判定閾値よりも明度が高くなる範囲とを明色系の単色(例えば、白色)の画像範囲となるように補正する。例えば、図10(A)に示す撮像画像P6aのように、バーコードBが非反転コードとして撮像されている場合には、認識すべき文字情報Wが黒文字であるとして、上記ステップS129の明色系画像補正処理により、図10(B)に示す撮像画像P6bのように、補正前の撮像画像P6aにおいて、非反転コードに相当する範囲と上記明暗判定閾値よりも明度が高くなる範囲とが、白色の画像範囲となるように補正される。これにより、文字情報Wと背景部分とのコントラストが大きくなる。そして、このように文字情報Wと背景部分とのコントラストが大きくなるように補正された撮像画像に対して、ステップS131に示す文字認識処理が行われる。 Further, since the information code for which decoding is successful is a non-inverting code, if No is determined in step S117, the bright color image correction process of step S129 is performed. In this process, on the premise that the character information to be recognized is displayed in black characters, the range corresponding to the non-inverted code in the captured image and the range in which the brightness is higher than the above-mentioned brightness determination threshold are defined as a single color of a bright color system. Correct so that the image range is (for example, white). For example, when the barcode B is imaged as a non-inverted code as in the captured image P6a shown in FIG. 10A, it is assumed that the character information W to be recognized is a black character, and the bright color in step S129 is described above. By the system image correction processing, as in the captured image P6b shown in FIG. 10B, in the captured image P6a before correction, the range corresponding to the non-inverted code and the range in which the brightness is higher than the brightness determination threshold value are determined. It is corrected so that the image range is white. As a result, the contrast between the character information W and the background portion is increased. Then, the character recognition process shown in step S131 is performed on the captured image corrected so that the contrast between the character information W and the background portion becomes large.

上記ステップS131における文字認識処理が成功すると(S133でYes)、本読取処理が終了する。その一方で、上記ステップS131における文字認識処理が失敗すると(S133でNo)、認識すべき文字情報が黒文字ではなく白抜き文字であるとして、上記ステップS135の暗色系画像補正処理により、上記ステップS101にて撮像された撮像画像において、非反転コードに相当する範囲と上記明暗判定閾値よりも明度が低くなる範囲とを暗色系の単色(例えば、黒色)の画像範囲となるように補正する。そして、このように補正された撮像画像に対して、ステップS137に示す文字認識処理が行われる。 When the character recognition process in step S131 is successful (Yes in S133), the main reading process ends. On the other hand, if the character recognition process in step S131 fails (No in S133), it is assumed that the character information to be recognized is not a black character but an outline character, and the dark color image correction process in step S135 causes the step S101. In the captured image captured by the above, the range corresponding to the non-inverted code and the range in which the brightness is lower than the brightness determination threshold value are corrected so as to be a dark color single color (for example, black) image range. Then, the character recognition process shown in step S137 is performed on the captured image corrected in this way.

以上説明したように、本実施形態に係る情報読取装置10では、制御部21にてなされる読取処理において、読み取られた情報コードが反転コードであると判定されると、撮像画像のうち、反転コードに相当する範囲と所定の明暗判定閾値よりも明度が低くなる範囲とが暗色系の単色の画像範囲となるように当該撮像画像が補正される。また、読み取られた情報コードが反転コードでないと判定されると、撮像画像のうち、非反転コードに相当する範囲と所定の明暗判定閾値よりも明度が高くなる範囲とが明色系の単色の画像範囲となるように当該撮像画像が補正される。 As described above, in the information reading device 10 according to the present embodiment, when it is determined in the reading process performed by the control unit 21 that the read information code is an inverted code, the captured image is inverted. The captured image is corrected so that the range corresponding to the code and the range in which the brightness is lower than the predetermined brightness determination threshold are the dark-colored single-color image range. Further, when it is determined that the read information code is not an inversion code, the range corresponding to the non-inversion code and the range in which the brightness is higher than the predetermined brightness determination threshold value in the captured image are monochromatic bright colors. The captured image is corrected so that it falls within the image range.

このように、表示媒体に対して反転コードとともに表示されている文字情報は白抜き文字で表示され、この白抜き文字の周囲は暗色系の背景となる可能性が高いとして、反転コードに相当する範囲に加えて、撮像画像のうち所定の明暗判定閾値よりも明度が低くなる範囲、すなわち、白抜き文字の周囲の暗色系の背景を、暗色系の単色の画像範囲に補正して実質的に文字認識対象外とすることで、反転コードだけでなく背景の模様等に起因する文字誤認が抑制されやすくなる。その一方で、表示媒体に対して非反転コードとともに表示されている文字情報は黒文字で表示され、この黒文字の周囲は明色系の背景となる可能性が高いとして、非反転コードに相当する範囲に加えて、撮像画像のうち所定の明暗判定閾値よりも明度が高くなる範囲、すなわち、黒文字の周囲の明色系の背景を、明色系の単色の画像範囲に補正して実質的に文字認識対象外とすることで、非反転コードだけでなく背景の模様等に起因する文字誤認が抑制されやすくなる。したがって、文字認識処理による文字認識精度をより一層向上させることができる。 In this way, the character information displayed together with the reverse code on the display medium is displayed as outline characters, and the surroundings of the outline characters are likely to be a dark background, which corresponds to the reverse code. In addition to the range, the range of the captured image whose brightness is lower than the predetermined brightness determination threshold, that is, the dark background around the outline characters is corrected to a dark monochromatic image range to substantially reduce the brightness. By excluding the character recognition target, it becomes easy to suppress character misidentification caused not only by the reverse code but also by the background pattern and the like. On the other hand, the character information displayed together with the non-inverted code on the display medium is displayed in black characters, and the area around the black characters is likely to be a bright background, and the range corresponding to the non-inverted code. In addition, in the captured image, the range in which the brightness is higher than the predetermined brightness determination threshold value, that is, the bright color background around the black character is corrected to the light color single color image range to substantially characterize the character. By excluding the recognition target, it becomes easy to suppress character misidentification caused not only by the non-inverted code but also by the background pattern and the like. Therefore, the character recognition accuracy by the character recognition process can be further improved.

特に、読み取られた情報コードが反転コードであると判定されることで、一部が暗色系の単色の画像範囲に補正された撮像画像に対して行った文字認識処理が失敗すると(S123でNo)、補正前の撮像画像のうち、情報コードに相当する範囲と所定の明暗判定閾値よりも明度が高くなる範囲とが明色系の単色の画像範囲となるように当該撮像画像が補正される。また、読み取られた情報コードが反転コードでないと判定されることで、一部が明色系の単色の画像範囲に補正された撮像画像に対して行った文字認識処理が失敗すると(S133でNo)、補正前の撮像画像のうち、情報コードに相当する範囲と所定の明暗判定閾値よりも明度が低くなる範囲とが暗色系の単色の画像範囲となるように当該撮像画像が補正される。 In particular, if the read information code is determined to be an inversion code and the character recognition process performed on the captured image partially corrected to a dark-colored monochromatic image range fails (No. in S123). ), Of the captured images before correction, the captured image is corrected so that the range corresponding to the information code and the range where the brightness is higher than the predetermined brightness determination threshold value are the bright color monochromatic image ranges. .. Further, if it is determined that the read information code is not an inversion code, and the character recognition process performed on the captured image partially corrected to the light-colored single-color image range fails (No. in S133). ), Of the captured images before correction, the captured image is corrected so that the range corresponding to the information code and the range whose brightness is lower than the predetermined brightness determination threshold value are dark-colored single-color image ranges.

これにより、反転コードとともに黒文字で表示されている文字情報を撮像しており、黒文字の周囲の背景が暗色系の単色の画像範囲に補正されたために文字認識が失敗しても、その背景が明色系の単色の画像範囲に補正されて再度文字認識処理が行われるので、背景の模様等に起因する文字誤認をさらに抑制することができる。その一方で、非反転コードとともに白抜き文字で表示されている文字情報を撮像しており、白抜き文字の周囲の背景が明色系の単色の画像範囲に補正されたために文字認識が失敗しても、その背景が暗色系の単色の画像範囲に補正されて再度文字認識処理が行われるので、背景の模様等に起因する文字誤認をさらに抑制することができる。 As a result, the character information displayed in black characters is imaged together with the inversion code, and even if the character recognition fails because the background around the black characters is corrected to a dark monochromatic image range, the background is clear. Since the character recognition process is performed again after the image range is corrected to a monochromatic image range of the color system, it is possible to further suppress character misidentification due to a background pattern or the like. On the other hand, the character information displayed in outline characters is imaged together with the non-inverted code, and the character recognition fails because the background around the outline characters is corrected to a light-colored single-color image range. However, since the background is corrected to a dark-colored single-color image range and the character recognition process is performed again, it is possible to further suppress character misidentification due to the background pattern or the like.

[第3実施形態]
次に、第3実施形態に係る情報読取装置及びプログラムについて、図面を参照して説明する。
本第3実施形態では、情報コードのセル配列方向を基準に撮像画像に対して文字認識処理を行う点が、上記第1実施形態と主に異なる。したがって、第1実施形態と実質的に同一の構成部分には、同一符号を付し、その説明を省略する。
[Third Embodiment]
Next, the information reading device and the program according to the third embodiment will be described with reference to the drawings.
The third embodiment is mainly different from the first embodiment in that character recognition processing is performed on the captured image based on the cell arrangement direction of the information code. Therefore, the components substantially the same as those in the first embodiment are designated by the same reference numerals, and the description thereof will be omitted.

バーコードやQRコード等の情報コードは、そのセル配列方向F1が撮像画像においてどの向きになったとしても問題なくデコードすることができる。これに対して、文字情報は、撮像画像中の文字配列方向F2によっては文字誤認が生じてしまう可能性がある。例えば、図11に例示する撮像画像P7のように、バーコードBのセル配列方向F1やQRコードQのセル配列方向F1が撮像画像においてどの向きになったとしても問題なくデコードすることができる。これに対して、図11に例示するように、文字情報Wとなる「177」の文字配列方向F2が撮像画像での読取基準方向(図11のX方向参照)に対して180°回転するように撮像されていると、例えば、「LLl」のように文字誤認が生じてしまう可能性がある。 Information codes such as barcodes and QR codes can be decoded without any problem regardless of the orientation of the cell arrangement direction F1 in the captured image. On the other hand, in the character information, character misidentification may occur depending on the character arrangement direction F2 in the captured image. For example, as in the captured image P7 illustrated in FIG. 11, decoding can be performed without any problem regardless of the orientation of the cell arrangement direction F1 of the barcode B or the cell arrangement direction F1 of the QR code Q in the captured image. On the other hand, as illustrated in FIG. 11, the character arrangement direction F2 of “177”, which is the character information W, is rotated by 180 ° with respect to the reading reference direction (see the X direction in FIG. 11) in the captured image. When the image is taken in, there is a possibility that a character misidentification such as "LLl" may occur.

このため、文字情報を撮像して読み取る場合には、その文字情報の文字配列方向F2が撮像画像での上記読取基準方向に対して0°近くになるように、撮像する方向を限定する必要がある。そうすると、情報コードを読み取る情報読取装置であっても、文字情報も読取対象とする場合には、読取対象の向き等を意識してその読取対象を撮像する必要があり、情報読取装置の利便性が悪くなるという問題が生じる。 Therefore, when capturing and reading character information, it is necessary to limit the imaging direction so that the character arrangement direction F2 of the character information is close to 0 ° with respect to the reading reference direction in the captured image. is there. Then, even if the information reading device reads the information code, if the character information is also to be read, it is necessary to take an image of the reading target while being aware of the orientation of the reading target, which is convenient for the information reading device. The problem arises that it gets worse.

そこで、本実施形態における読取処理では、文字情報の文字配列方向F2と情報コードのセル配列方向F1とが同じ方向となることを前提に、情報コード及び文字情報が撮像された撮像画像を、情報コードのセル配列方向F1が上記読取基準方向に一致するように撮像画像を回転補正し、この回転補正した撮像画像に対して文字認識処理を行う。 Therefore, in the reading process in the present embodiment, on the premise that the character arrangement direction F2 of the character information and the cell arrangement direction F1 of the information code are in the same direction, the captured image in which the information code and the character information are captured is used as information. The captured image is rotationally corrected so that the cell arrangement direction F1 of the code coincides with the reading reference direction, and character recognition processing is performed on the rotationally corrected captured image.

以下、本実施形態において、制御部21にてなされる読取処理について、図12に示すフローチャートを参照して詳述する。
上記第1実施形態と同様に、撮像画像の明暗分布に基づいて明暗判定閾値が設定され(図12のS103)、そのデコード処理が成功すると(S109でYes)、ステップS141に示すセル配列方向検出処理がなされる。この処理では、デコードに成功した情報コードのセル配列方向F1が検出される。なお、ステップS141のセル配列方向検出処理を行う制御部21は、「検出部」の一例に相当し得る。
Hereinafter, in the present embodiment, the reading process performed by the control unit 21 will be described in detail with reference to the flowchart shown in FIG.
Similar to the first embodiment, when the brightness determination threshold value is set based on the brightness distribution of the captured image (S103 in FIG. 12) and the decoding process is successful (Yes in S109), the cell arrangement direction detection shown in step S141 is detected. Processing is done. In this process, the cell arrangement direction F1 of the information code that has been successfully decoded is detected. The control unit 21 that performs the cell arrangement direction detection process in step S141 can correspond to an example of the “detection unit”.

続いて、ステップS143に示す第3画像補正処理がなされる。この処理では、上述のように検出したセル配列方向F1が上記読取基準方向に一致するように撮像画像が回転補正され、この回転補正された撮像画像のうち情報コードに相当する範囲が周囲との色の境界をなくすように単色の画像範囲に補正(置換)される。そして、ステップS115に示す文字認識処理にて、上述のように回転補正等された撮像画像に対して、文字認識処理が行われる。 Subsequently, the third image correction process shown in step S143 is performed. In this process, the captured image is rotationally corrected so that the cell arrangement direction F1 detected as described above coincides with the reading reference direction, and the range corresponding to the information code in the rotationally corrected captured image is the surrounding area. It is corrected (replaced) to a monochromatic image range so as to eliminate color boundaries. Then, in the character recognition process shown in step S115, the character recognition process is performed on the captured image whose rotation has been corrected as described above.

このため、例えば、図13(A)に示す撮像画像P8aのように、セル配列方向F1及び文字配列方向F2が上記読取基準方向に対して同じ角度で傾くようにバーコードB及び文字情報Wが撮像されている場合には、図13(B)に示す撮像画像P8bのように、セル配列方向F1が上記読取基準方向に一致するように撮像画像P8aが回転補正されて、この回転補正された撮像画像のうち情報コードに相当する範囲が単色(図13(B)では白色)の画像範囲に補正される(S143)。そして、このように回転補正等された撮像画像に対して、文字認識処理が行われる。 Therefore, for example, as shown in the captured image P8a shown in FIG. 13A, the bar code B and the character information W are arranged so that the cell arrangement direction F1 and the character arrangement direction F2 are tilted at the same angle with respect to the reading reference direction. When the image was taken, the captured image P8a was rotationally corrected so that the cell arrangement direction F1 coincided with the reading reference direction as shown in the captured image P8b shown in FIG. 13B, and the rotation was corrected. The range corresponding to the information code in the captured image is corrected to the image range of a single color (white in FIG. 13B) (S143). Then, character recognition processing is performed on the captured image whose rotation is corrected in this way.

以上説明したように、本実施形態に係る情報読取装置10では、上記セル配列方向検出処理により検出された情報コードのセル配列方向F1を基準に、セル配列方向F1が上記読取基準方向に一致するように回転補正等した撮像画像に対して文字認識処理が行われる。これにより、文字情報の文字配列方向F2と情報コードのセル配列方向F1とが同じ方向である場合には、文字情報の文字配列方向F2を特定できることから、検出されたセル配列方向F1を基準に文字情報が認識しやすくなるように回転補正等した撮像画像に対して文字認識処理を行うことで、文字認識精度をより一層向上させることができる。 As described above, in the information reading device 10 according to the present embodiment, the cell arrangement direction F1 coincides with the reading reference direction with reference to the cell arrangement direction F1 of the information code detected by the cell arrangement direction detection process. Character recognition processing is performed on the captured image such as rotation correction. As a result, when the character arrangement direction F2 of the character information and the cell arrangement direction F1 of the information code are in the same direction, the character arrangement direction F2 of the character information can be specified. Therefore, the detected cell arrangement direction F1 is used as a reference. Character recognition accuracy can be further improved by performing character recognition processing on the captured image such as rotation correction so that the character information can be easily recognized.

本実施形態の第1変形例として、文字情報の文字配列方向F2が情報コードのセル配列方向F1に対して所定角度θだけずれていることを事前に把握できる場合には、この所定角度θを利用して撮像画像を回転補正等してもよい。すなわち、検出されたセル配列方向F1から上記所定角度θだけずれた方向が上記読取基準方向に一致するように回転補正等した撮像画像に対して文字認識処理を行うことでも、文字認識精度をより一層向上させることができる。 As a first modification of the present embodiment, when it can be grasped in advance that the character arrangement direction F2 of the character information deviates from the cell arrangement direction F1 of the information code by a predetermined angle θ, this predetermined angle θ is set. It may be used to correct the rotation of the captured image. That is, the character recognition accuracy can be further improved by performing character recognition processing on the captured image such as rotation correction so that the direction deviated from the detected cell arrangement direction F1 by the predetermined angle θ coincides with the reading reference direction. It can be further improved.

具体的には、例えば、図14(A)に示す撮像画像P9aのように、文字配列方向F2がセル配列方向F1に対して所定角度θだけずれるようにバーコードB及び文字情報Wが撮像されている場合には、図14(B)に示す撮像画像P8bのように、検出されたセル配列方向F1から上記所定角度θだけずれた方向が上記読取基準方向に一致するように撮像画像P8aが回転補正される。そして、この回転補正された撮像画像のうち情報コードに相当する範囲が単色の画像範囲に補正されて(S143)、このように補正された撮像画像に対して文字認識処理が行われる。このように、上記所定角度θを考慮して文字情報が認識しやすくなるように回転補正等した撮像画像に対して文字認識処理を行うことでも、文字認識精度をより一層向上させることができる。 Specifically, for example, as in the captured image P9a shown in FIG. 14A, the bar code B and the character information W are imaged so that the character arrangement direction F2 deviates from the cell arrangement direction F1 by a predetermined angle θ. In this case, as shown in the captured image P8b shown in FIG. 14B, the captured image P8a is aligned with the reading reference direction so that the direction deviated from the detected cell arrangement direction F1 by the predetermined angle θ coincides with the reading reference direction. The rotation is corrected. Then, the range corresponding to the information code in the rotation-corrected captured image is corrected to a monochromatic image range (S143), and character recognition processing is performed on the captured image corrected in this way. As described above, the character recognition accuracy can be further improved by performing the character recognition process on the captured image such as rotation correction so that the character information can be easily recognized in consideration of the predetermined angle θ.

また、本実施形態の第2変形例として、上記読取処理においてデコードが失敗した場合でも(S109でNo)、その失敗したデコードのセル配列方向を検出できる場合には、上述したように、検出されたセル配列方向を基準に文字情報が認識しやすくなるように回転補正等した撮像画像に対して文字認識処理を行うことで、文字認識精度をより一層向上させることができる。 Further, as a second modification of the present embodiment, even if decoding fails in the reading process (No in S109), if the cell arrangement direction of the failed decoding can be detected, it is detected as described above. Character recognition accuracy can be further improved by performing character recognition processing on the captured image such as rotation correction so that the character information can be easily recognized based on the cell arrangement direction.

情報コードのセル配列方向F1を基準に回転補正等した撮像画像に対して文字認識処理を行う本実施形態及び変形例等の特徴的構成は、他の実施形態等にも適用することができる。 The characteristic configuration of the present embodiment and the modified example in which the character recognition process is performed on the captured image obtained by rotation correction or the like based on the cell arrangement direction F1 of the information code can be applied to other embodiments and the like.

[第4実施形態]
次に、第4実施形態に係る情報読取装置及びプログラムについて、図面を参照して説明する。
本第4実施形態では、明度差が小さな情報コードを補正対象外とする点が、上記第1実施形態と主に異なる。したがって、第1実施形態と実質的に同一の構成部分には、同一符号を付し、その説明を省略する。
[Fourth Embodiment]
Next, the information reading device and the program according to the fourth embodiment will be described with reference to the drawings.
The fourth embodiment is mainly different from the first embodiment in that the information code having a small difference in brightness is excluded from the correction target. Therefore, the components substantially the same as those in the first embodiment are designated by the same reference numerals, and the description thereof will be omitted.

例えば、印刷媒体の表面側に文字情報が印刷されるとともに裏面側に情報コードが印刷されており、その表面側の文字情報を撮像して文字認識する際に、その撮像画像に、裏面側の情報コードが薄くかすんだ状態で写り込んでしまう場合がある。また、ペットボトル等の透明部材の一面に表示された文字情報を撮像して文字認識する際に、その撮像画像に、透明部材の反対側の面の情報コードが薄くかすんだ状態で写り込んでしまう場合がある。 For example, character information is printed on the front side of a print medium and an information code is printed on the back side, and when the character information on the front side is imaged and characters are recognized, the captured image is printed on the back side. The information code may be reflected in a faint and hazy state. In addition, when character information displayed on one surface of a transparent member such as a PET bottle is imaged and characters are recognized, the information code on the opposite surface of the transparent member is reflected in the captured image in a faint and hazy state. It may end up.

このような撮像画像では、情報コードの少なくとも一部が文字情報に重なっている状態で撮像されている場合に、制御部21にてなされる読取処理においてデコード処理が成功すると、情報コードに相当する範囲が単色の画像範囲に補正されてしまうために、文字情報の一部が欠損してしまうという問題がある。例えば、図16(A)に示すように、薄くかすんだバーコードBが文字情報Wに重なるように撮像画像P10aが撮像されており、このバーコードBのデコードが成功すると、図16(B)に示すように、上記ステップS111の第1画像補正処理にてバーコードBに相当する範囲が白色の画像範囲に補正されるために、文字情報Wの一部が欠損してしまう。 In such an captured image, when at least a part of the information code is captured in a state where it overlaps with the character information, if the decoding process succeeds in the reading process performed by the control unit 21, it corresponds to the information code. Since the range is corrected to a monochromatic image range, there is a problem that a part of the character information is lost. For example, as shown in FIG. 16 (A), the captured image P10a is imaged so that the thinly hazy barcode B overlaps the character information W, and when the decoding of this barcode B is successful, FIG. 16 (B) As shown in the above, since the range corresponding to the barcode B is corrected to the white image range in the first image correction process in step S111, a part of the character information W is lost.

そこで、本実施形態では、読み取られた情報コードを構成する明色系セルと暗色系セルとの撮像画像における明暗差(情報コードの明度差)が所定の明暗差閾値以上となる場合に、撮像画像のうち、情報コードに相当する範囲が単色の画像範囲となるように当該撮像画像を補正する。すなわち、上述のように裏面側の情報コードが薄くかすんだ状態で写り込んでしまうような撮像状態では、情報コードの明度差が上記所定の明暗差閾値未満となることで、情報コードに相当する範囲を補正対象外とする。 Therefore, in the present embodiment, when the brightness difference (brightness difference of the information code) in the captured image between the light-colored cell and the dark-colored cell constituting the read information code becomes equal to or more than a predetermined light-dark difference threshold value, the image is captured. Of the images, the captured image is corrected so that the range corresponding to the information code becomes the monochromatic image range. That is, in an imaging state in which the information code on the back surface side is reflected in a faint and hazy state as described above, the brightness difference of the information code is less than the predetermined brightness difference threshold value, which corresponds to the information code. The range is excluded from the correction target.

以下、本実施形態において、制御部21にてなされる読取処理について、図15に示すフローチャートを参照して詳述する。
上記第1実施形態と同様に、撮像画像の明暗分布に基づいて明暗判定閾値が設定され(図15のS103)、そのデコード処理が成功すると(S109でYes)、ステップS151に示す判定処理がなされる。この判定処理では、デコードに成功した情報コードを構成する明色系セルと暗色系セルとの撮像画像における明暗差(例えば、PCS(Print Contrast Signal)値)が求められて、この情報コードの明暗差が所定の明暗差閾値以上であるか否かについて判定される。
Hereinafter, in the present embodiment, the reading process performed by the control unit 21 will be described in detail with reference to the flowchart shown in FIG.
Similar to the first embodiment, when the light / dark determination threshold value is set based on the light / dark distribution of the captured image (S103 in FIG. 15) and the decoding process is successful (Yes in S109), the determination process shown in step S151 is performed. To. In this determination process, the difference in brightness (for example, PCS (Print Contrast Signal) value) between the captured image of the light-colored cell and the dark-colored cell constituting the information code that has been successfully decoded is obtained, and the brightness of this information code is determined. It is determined whether or not the difference is equal to or greater than a predetermined contrast threshold.

ここで、例えば、図4(A)に示すように、鮮明なバーコードBが撮像されていることから、情報コードの明度差が高くなって上記所定の明暗差閾値以上になると、ステップS151にてYesと判定されて、上記ステップS111以降の処理がなされる。 Here, for example, as shown in FIG. 4A, since the clear barcode B is imaged, when the brightness difference of the information code becomes high and exceeds the predetermined brightness difference threshold value, step S151 is performed. Is determined, and the processing after step S111 is performed.

一方、例えば、図16(A)に示すように、薄くかすむように不鮮明な状態でバーコードBが撮像されていることから、情報コードの明度差が低くなって上記所定の明暗差閾値未満になると、ステップS151にてNoと判定される。この場合には、上記ステップS111の第1画像補正処理がなされることなく、上記ステップS115の文字認識処理がなされる。すなわち、薄くかすむように不鮮明な状態で撮像されたバーコードBが補正対象外となる。 On the other hand, for example, as shown in FIG. 16A, since the barcode B is imaged in a faint and unclear state, the brightness difference of the information code becomes low and becomes less than the predetermined brightness difference threshold value. , No is determined in step S151. In this case, the character recognition process of step S115 is performed without performing the first image correction process of step S111. That is, the barcode B imaged in a thinly blurred state is excluded from the correction target.

このように、本実施形態では、情報コードの明暗差が所定の明暗差閾値以上となる場合に、その情報コードに相当する範囲が補正対象となり、情報コードの明暗差が上記所定の明暗差閾値未満となる場合には、その情報コードに相当する範囲が補正対象とならなくなる。このため、意図しない情報コードが薄くかすんだ状態で文字情報に重なるように撮像される場合であっても、画像補正に起因する文字情報の欠損等を防止することができる。 As described above, in the present embodiment, when the brightness difference of the information code is equal to or larger than the predetermined brightness difference threshold value, the range corresponding to the information code is the correction target, and the brightness difference of the information code is the predetermined brightness difference threshold value. If it is less than, the range corresponding to the information code is not subject to correction. Therefore, even when the unintended information code is imaged so as to overlap the character information in a thin and hazy state, it is possible to prevent the character information from being lost due to the image correction.

なお、本実施形態の変形例として、情報コードの明暗差が上記所定の明暗差閾値未満となる場合には、撮像画像において情報コードに相当する範囲のうち、当該情報コードを構成する明色系セルと同じ明度になる範囲と暗色系セルと同じ明度になる範囲とが単色の画像範囲となるように当該撮像画像が補正されてもよい。この場合には、図16(A)に例示する撮像画像P10aが撮像されていると、図16(C)に示す撮像画像P10cのように、撮像画像P10aのうち、バーコードBの明色系セルと同じ明度になる範囲と暗色系セルと同じ明度になる範囲とが単色の画像範囲となるように当該撮像画像が補正される。 As a modification of the present embodiment, when the brightness difference of the information code is less than the predetermined brightness difference threshold value, the light color system constituting the information code within the range corresponding to the information code in the captured image. The captured image may be corrected so that the range having the same brightness as the cell and the range having the same brightness as the dark cell are the monochromatic image range. In this case, when the captured image P10a illustrated in FIG. 16 (A) is captured, the bright color system of the barcode B in the captured image P10a is shown as in the captured image P10c shown in FIG. 16 (C). The captured image is corrected so that the range having the same brightness as the cell and the range having the same brightness as the dark cell are the monochromatic image range.

これにより、意図しない情報コードが薄くかすんだ状態で文字情報に重なるように撮像される場合であっても、鮮明な文字情報は補正されずに不鮮明でかすれた情報コードの部分のみが補正対象となるため、文字認識部による文字認識精度をより一層向上させることができる。 As a result, even if the unintended information code is imaged so as to overlap the character information in a thin and hazy state, the clear character information is not corrected and only the unclear and faint information code part is corrected. Therefore, the character recognition accuracy by the character recognition unit can be further improved.

なお、明度差が小さな情報コードを補正対象外とする本実施形態の特徴的構成や情報コードの明色系セルと同じ明度になる範囲と暗色系セルと同じ明度になる範囲とが単色の画像範囲となるように撮像画像を補正する変形例の特徴的構成は、他の実施形態等にも適用することができる。 It should be noted that the characteristic configuration of the present embodiment in which the information code having a small difference in brightness is excluded from the correction, and the range in which the brightness is the same as the light color cell of the information code and the range in which the brightness is the same as the dark cell are monochromatic images. The characteristic configuration of the modified example that corrects the captured image so as to be within the range can be applied to other embodiments and the like.

[第5実施形態]
次に、第5実施形態に係る情報読取装置及びプログラムについて、図面を参照して説明する。
本第5実施形態では、情報コードのコード領域内に文字認識すべき文字情報が配置される点が、上記第1実施形態と主に異なる。したがって、第1実施形態と実質的に同一の構成部分には、同一符号を付し、その説明を省略する。
[Fifth Embodiment]
Next, the information reading device and the program according to the fifth embodiment will be described with reference to the drawings.
The fifth embodiment is mainly different from the first embodiment in that the character information to be recognized is arranged in the code area of the information code. Therefore, the components substantially the same as those in the first embodiment are designated by the same reference numerals, and the description thereof will be omitted.

文字認識すべき文字情報は、情報コードの近くに配置されることに限らず、複数の明色系セル及び暗色系セルを配列してなる情報コードのコード領域内に配置される場合がある。例えば、図17(A)に例示する撮像画像P11aの情報コードCのように、コード領域Ca内に明色系セル及び暗色系セルと異なる空き領域Cbが設けられて、この空き領域Cb内に文字情報Wが配置される場合がある。 The character information to be recognized is not limited to being arranged near the information code, but may be arranged in the code area of the information code formed by arranging a plurality of light-color cells and dark-color cells. For example, as in the information code C of the captured image P11a illustrated in FIG. 17A, a free area Cb different from the light-colored cell and the dark-colored cell is provided in the code area Ca, and the free area Cb is filled with the free area Cb. Character information W may be arranged.

このように情報コードのコード領域内に配置される文字情報を撮像した場合、上記第1実施形態における読取処理では、デコードに成功した情報コードに相当する範囲が単色の画像範囲に補正されるため、コード領域内の文字情報も単色の画像範囲に補正されてしまうという問題がある。 When the character information arranged in the code area of the information code is imaged in this way, in the reading process in the first embodiment, the range corresponding to the information code that has been successfully decoded is corrected to the monochromatic image range. , There is a problem that the character information in the code area is also corrected to a single color image range.

そこで、本実施形態における読取処理では、ステップS111の第1画像補正処理において、空き領域を有する情報コードが読み取られている場合には、撮像画像のうち、コード領域に相当する範囲を補正対象から除外する。このため、例えば、空き領域を有する情報コードには、空き領域を有することを示す情報やコード領域に占める空き領域の範囲を示す情報等を読取可能に記録することで、読み取った情報コードが空き領域を有しているか否かや空き領域の範囲等を、情報読取装置10にて容易に把握することができる。 Therefore, in the reading process of the present embodiment, when the information code having the free area is read in the first image correction process of step S111, the range corresponding to the code area of the captured image is corrected from the correction target. exclude. Therefore, for example, in the information code having a free area, the read information code is vacant by readablely recording information indicating that the free area is provided, information indicating the range of the free area occupied in the code area, and the like. The information reading device 10 can easily grasp whether or not the area is possessed, the range of the free area, and the like.

これにより、空き領域内に文字認識すべき文字情報が配置される場合には、その文字情報が情報コードとともに単色の画像範囲となるように補正されてしまうことを防止することができる。 As a result, when the character information to be recognized as a character is arranged in the free area, it is possible to prevent the character information from being corrected so as to be a single color image range together with the information code.

本実施形態の変形例として、空き領域を有する情報コードが読み取られる場合には、ステップS111の第1画像補正処理において、撮像画像のうち、コード領域から空き領域を除いた範囲が単色の画像範囲となるように当該撮像画像が補正されてもよい。この場合には、図17(A)に例示する撮像画像P11aが撮像されていると、図17(B)に示す撮像画像P11bのように、撮像画像P11aのうち、コード領域Caから空き領域Cbを除いた範囲が単色の画像範囲となるように当該撮像画像が補正される。 As a modification of this embodiment, when an information code having a free area is read, in the first image correction process of step S111, the range of the captured image obtained by removing the free area from the code area is a monochromatic image range. The captured image may be corrected so as to be. In this case, when the captured image P11a illustrated in FIG. 17 (A) is captured, as in the captured image P11b shown in FIG. 17 (B), in the captured image P11a, the code region Ca to the empty region Cb The captured image is corrected so that the range excluding is the monochromatic image range.

このようにしても、空き領域内に文字認識すべき文字情報が配置される場合には、その文字情報が単色の画像範囲となるように補正されてしまうことを防止することができる。特に、コード領域から空き領域を除いた範囲が単色の画像範囲となるように補正されるため、文字認識すべき文字情報の周囲が単色の画像範囲となるので(図17(B)参照)、文字認識部による文字認識精度をより一層向上させることができる。 Even in this way, when the character information to be recognized as a character is arranged in the free area, it is possible to prevent the character information from being corrected so as to be an image range of a single color. In particular, since the range excluding the free area from the code area is corrected so as to be a monochromatic image range, the periphery of the character information to be recognized as a character is a monochromatic image range (see FIG. 17B). The character recognition accuracy of the character recognition unit can be further improved.

なお、空き領域を有する情報コードを読み取った際にコード領域に相当する範囲を補正対象から除外する本実施形態の特徴的構成や空き領域を有する情報コードを読み取った際にコード領域から空き領域を除いた範囲が単色の画像範囲となるように撮像画像を補正する変形例の特徴的構成は、他の実施形態等にも適用することができる。 When the information code having a free area is read, the range corresponding to the code area is excluded from the correction target. The characteristic configuration of the present embodiment and the free area are removed from the code area when the information code having a free area is read. The characteristic configuration of the modified example in which the captured image is corrected so that the excluded range becomes a monochromatic image range can be applied to other embodiments and the like.

なお、本発明は上記各実施形態及び変形例等に限定されるものではなく、例えば、以下のように具体化してもよい。
(1)本発明は、情報コードのうちバーコードのみを読取対象とする情報読取装置に適用されてもよい。この場合、上記読取処理におけるデコード処理では、バーコードのみをデコード対象とすることに限らず、他のコード種別の一次元コードをデコード対象としてもよい。一次元コードのデコードに要する時間は、二次元コードに対して短くなるため、全てのコード種別の一次元コードについてデコード処理を行っても、本読取処理に関して読取時間に与える影響が少ないからである。
The present invention is not limited to the above embodiments and modifications, and may be embodied as follows, for example.
(1) The present invention may be applied to an information reading device that reads only a barcode among information codes. In this case, in the decoding process in the reading process, not only the barcode is targeted for decoding, but one-dimensional code of another code type may be targeted for decoding. This is because the time required to decode the one-dimensional code is shorter than that of the two-dimensional code, and even if the decoding process is performed for the one-dimensional code of all code types, the effect on the reading time of the main reading process is small. ..

(2)上記読取処理では、文字認識処理の認識結果にかかわらず、デコード処理のデコード結果を利用した処理を行ってもよい。 (2) In the above reading process, processing using the decoding result of the decoding process may be performed regardless of the recognition result of the character recognition process.

(3)本発明は、スマートフォンなどの携帯型の情報処理端末に対して上記読取アプリがインストールされることで構成される情報読取装置に適用されることに限らず、例えば、RFタグ等の無線タグを読み書き可能な無線タグ処理機能などの他の機能を有する携帯端末に対して上記読取アプリ等がインストールされることで構成される情報読取装置に適用されてもよいし、据え置き型の情報読取装置に適用されてもよい。 (3) The present invention is not limited to being applied to an information reading device configured by installing the reading application on a portable information processing terminal such as a smartphone, and for example, a radio such as an RF tag. It may be applied to an information reading device configured by installing the above reading application or the like on a mobile terminal having another function such as a wireless tag processing function capable of reading and writing tags, or it may be applied to a stationary information reading device. It may be applied to the device.

10…情報読取装置
21…制御部(情報コード読取部,文字認識部,コード判定部,明暗反転判定部,検出部)
23…撮像部
B…バーコード(情報コード)
F1…セル配列方向
F2…文字配列方向
W…文字情報
10 ... Information reading device 21 ... Control unit (information code reading unit, character recognition unit, code determination unit, light / dark inversion determination unit, detection unit)
23 ... Imaging unit B ... Bar code (information code)
F1 ... Cell arrangement direction F2 ... Character arrangement direction W ... Character information

Claims (11)

撮像部と、
前記撮像部により情報コードが撮像された撮像画像に対して前記情報コードを読み取るためのデコード処理を行う情報コード読取部と、
前記撮像部により文字情報が撮像された撮像画像に対して前記文字情報を読み取るための文字認識処理を行う文字認識部と、
を備える情報読取装置であって、
前記情報コード読取部により前記情報コードが読み取られると、前記撮像画像のうち前記情報コードに相当する範囲が単色の画像範囲となるように当該撮像画像を補正する画像補正部を備え、
前記文字認識部は、前記画像補正部により前記撮像画像が補正されると、当該補正された撮像画像に対して、前記文字認識処理を行うことを特徴とする情報読取装置。
Imaging unit and
An information code reading unit that performs decoding processing for reading the information code on an image captured by the imaging unit.
A character recognition unit that performs character recognition processing for reading the character information on the captured image in which the character information is captured by the image pickup unit.
It is an information reader equipped with
When the information code is read by the information code reading unit, an image correction unit that corrects the captured image so that the range corresponding to the information code in the captured image becomes a monochromatic image range is provided.
The character recognition unit is an information reading device characterized in that when the captured image is corrected by the image correction unit, the character recognition process is performed on the corrected captured image.
前記デコード処理が失敗した前記撮像画像について前記情報コードの一部が撮像されているか否かについて判定するコード判定部を備え、
前記画像補正部は、前記コード判定部により前記情報コードの一部が撮像されていると判定されると、前記撮像画像のうち前記情報コードの一部に相当する範囲が単色の画像範囲となるように当該撮像画像を補正することを特徴とする請求項1に記載の情報読取装置。
A code determination unit for determining whether or not a part of the information code is captured for the captured image in which the decoding process has failed is provided.
When the code determination unit determines that a part of the information code is captured by the image correction unit, the range corresponding to a part of the information code in the captured image becomes a monochromatic image range. The information reading device according to claim 1, wherein the captured image is corrected as described above.
前記情報コードは、三隅にファインダパターンが配置されるとともに前記ファインダパターン間に2つのタイミングパターンが配置されるQRコードであり、
前記コード判定部は、3つの前記ファインダパターンの少なくとも1つと前記タイミングパターンの一部が撮像されることで、前記情報コードの一部が撮像されていると判定することを特徴とする請求項2に記載の情報読取装置。
The information code is a QR code in which finder patterns are arranged at three corners and two timing patterns are arranged between the finder patterns.
2. The code determination unit is characterized in that at least one of the three finder patterns and a part of the timing pattern are imaged to determine that a part of the information code is imaged. The information reading device described in 1.
前記情報コード読取部は、所定の明暗判定閾値を基準に明色系セルと暗色系セルとに区分けして前記デコード処理を行い、
前記情報コード読取部により読み取られた情報コードが明色系セルと暗色系セルとの明暗を反転させた反転コードであるか否かについて判定する明暗反転判定部を備え、
前記画像補正部は、
前記情報コード読取部により読み取られた情報コードが前記反転コードであると前記明暗反転判定部により判定されると、前記撮像画像のうち、前記情報コードに相当する範囲と前記所定の明暗判定閾値よりも明度が低くなる範囲とが暗色系の単色の画像範囲となるように当該撮像画像を補正し、
前記情報コード読取部により読み取られた情報コードが前記反転コードでないと前記明暗反転判定部により判定されると、前記撮像画像のうち、前記情報コードに相当する範囲と前記所定の明暗判定閾値よりも明度が高くなる範囲とが明色系の単色の画像範囲となるように当該撮像画像を補正することを特徴とする請求項1〜3のいずれか一項に記載の情報読取装置。
The information code reading unit divides a light-colored cell and a dark-colored cell based on a predetermined light-dark determination threshold value, and performs the decoding process.
A light-dark reversal determination unit for determining whether or not the information code read by the information code reading unit is a reversal code obtained by reversing the light and darkness of a light-color cell and a dark-color cell is provided.
The image correction unit
When the light / dark inversion determination unit determines that the information code read by the information code reading unit is the inversion code, the range corresponding to the information code and the predetermined light / dark determination threshold value in the captured image The captured image is corrected so that the range where the brightness is low is the dark monochromatic image range.
When the light / dark reversal determination unit determines that the information code read by the information code reading unit is not the reverse code, the range corresponding to the information code and the predetermined light / dark determination threshold value in the captured image The information reading device according to any one of claims 1 to 3, wherein the captured image is corrected so that the range in which the brightness becomes high becomes a bright-colored monochromatic image range.
前記画像補正部は、
前記明暗反転判定部により前記情報コード読取部により読み取られた情報コードが前記反転コードであると判定されることで、一部が前記暗色系の単色の画像範囲に補正された前記撮像画像に対して行った前記文字認識処理が失敗すると、補正前の前記撮像画像のうち、前記情報コードに相当する範囲と前記所定の明暗判定閾値よりも明度が高くなる範囲とが明色系の単色の画像範囲となるように当該撮像画像を補正し、
前記明暗反転判定部により前記情報コード読取部により読み取られた情報コードが前記反転コードでないと判定されることで、一部が前記明色系の単色の画像範囲に補正された前記撮像画像に対して行った前記文字認識処理が失敗すると、補正前の前記撮像画像のうち、前記情報コードに相当する範囲と前記所定の明暗判定閾値よりも明度が低くなる範囲とが暗色系の単色の画像範囲となるように当該撮像画像を補正することを特徴とする請求項4に記載の情報読取装置。
The image correction unit
When the information code read by the information code reading unit is determined by the light / dark reversal determination unit to be the reversal code, the captured image is partially corrected to the dark color monochromatic image range. If the character recognition process performed is unsuccessful, in the captured image before correction, a range corresponding to the information code and a range having a brightness higher than the predetermined brightness determination threshold are bright-colored monochromatic images. Correct the captured image so that it is within the range,
When the information code read by the information code reading unit is determined by the light / dark inversion determination unit to be not the inversion code, the captured image is partially corrected to the bright color monochromatic image range. If the character recognition process performed is unsuccessful, the range corresponding to the information code and the range having a brightness lower than the predetermined brightness determination threshold of the captured image before correction are dark-colored single-color image ranges. The information reading device according to claim 4, wherein the captured image is corrected so as to be.
前記情報コードのセル配列方向を検出する検出部を備え、
前記文字認識部は、前記検出部により検出されたセル配列方向を基準に前記撮像画像に対して前記文字認識処理を行うことを特徴とする請求項1〜5のいずれか一項に記載の情報読取装置。
A detection unit for detecting the cell arrangement direction of the information code is provided.
The information according to any one of claims 1 to 5, wherein the character recognition unit performs the character recognition process on the captured image based on the cell arrangement direction detected by the detection unit. Reader.
前記画像補正部は、前記情報コード読取部により前記情報コードが読み取られると、当該情報コードを構成する明色系セルと暗色系セルとの前記撮像画像における明暗差が所定の明暗差閾値以上となる場合に、前記撮像画像のうち前記情報コードに相当する範囲が単色の画像範囲となるように当該撮像画像を補正することを特徴とする請求項1〜6のいずれか一項に記載の情報読取装置。 When the information code is read by the information code reading unit, the image correction unit sets the difference in brightness between the light-colored cell and the dark-colored cell constituting the information code in the captured image to be equal to or greater than a predetermined brightness difference threshold. In this case, the information according to any one of claims 1 to 6, wherein the captured image is corrected so that the range corresponding to the information code in the captured image becomes a monochromatic image range. Reader. 前記画像補正部は、前記情報コード読取部により前記情報コードが読み取られると、前記明暗差が前記所定の明暗差閾値未満となる場合には、前記撮像画像において前記情報コードに相当する範囲のうち、当該情報コードを構成する明色系セルと同じ明度になる範囲と暗色系セルと同じ明度になる範囲とが単色の画像範囲となるように当該撮像画像を補正することを特徴とする請求項7に記載の情報読取装置。 When the information code is read by the information code reading unit, the image correction unit is within the range corresponding to the information code in the captured image when the brightness difference is less than the predetermined brightness difference threshold. The claimed image is characterized in that the captured image is corrected so that the range having the same brightness as the light-colored cell constituting the information code and the range having the same brightness as the dark-colored cell are the monochromatic image range. The information reading device according to 7. 前記情報コードは、複数の明色系セル及び暗色系セルを配列してなるコード領域内に前記明色系セル及び前記暗色系セルと異なる空き領域を有し、
前記画像補正部は、前記情報コード読取部により前記空き領域を有する前記情報コードが読み取られる場合には、前記撮像画像のうち、前記コード領域に相当する範囲を補正対象から除外することを特徴とする請求項1〜8のいずれか一項に記載の情報読取装置。
The information code has a free area different from the light-colored cell and the dark-colored cell in a code area formed by arranging a plurality of light-colored cells and dark-colored cells.
The image correction unit is characterized in that, when the information code having the free area is read by the information code reading unit, the range corresponding to the code area of the captured image is excluded from the correction target. The information reading device according to any one of claims 1 to 8.
前記情報コードは、複数の明色系セル及び暗色系セルを配列してなるコード領域内に前記明色系セル及び前記暗色系セルと異なる空き領域を有し、
前記画像補正部は、前記情報コード読取部により前記空き領域を有する前記情報コードが読み取られる場合には、前記撮像画像のうち、前記コード領域から前記空き領域を除いた範囲が単色の画像範囲となるように当該撮像画像を補正することを特徴とする請求項1〜8のいずれか一項に記載の情報読取装置。
The information code has a free area different from the light-colored cell and the dark-colored cell in a code area formed by arranging a plurality of light-colored cells and dark-colored cells.
When the information code having the free area is read by the information code reading unit, the image correction unit means that the range of the captured image obtained by removing the free area from the code area is a monochromatic image range. The information reading device according to any one of claims 1 to 8, wherein the captured image is corrected so as to be.
撮像部を備えた情報読取装置に、
前記撮像部により情報コードが撮像された撮像画像に対して前記情報コードを読み取るためのデコード処理を行う情報コード読取ステップと、
前記情報コード読取ステップにより前記情報コードが読み取られると、前記撮像画像のうち前記情報コードに相当する範囲が単色の画像範囲となるように当該撮像画像を補正する画像補正ステップと、
前記画像補正ステップにより前記撮像画像が補正されると、当該補正された撮像画像に対して、文字情報を読み取るための文字認識処理を行う文字認識ステップと、
を実行させることを特徴とするプログラム。
For information readers equipped with an imaging unit,
An information code reading step of performing a decoding process for reading the information code on the captured image in which the information code is captured by the imaging unit, and
When the information code is read by the information code reading step, an image correction step of correcting the captured image so that the range corresponding to the information code in the captured image becomes a monochromatic image range.
When the captured image is corrected by the image correction step, a character recognition step for performing character recognition processing for reading character information on the corrected captured image, and a character recognition step.
A program characterized by executing.
JP2019158524A 2019-03-22 2019-08-30 Information reader and program Active JP7283312B2 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2019054173 2019-03-22
JP2019054173 2019-03-22

Publications (2)

Publication Number Publication Date
JP2020161106A true JP2020161106A (en) 2020-10-01
JP7283312B2 JP7283312B2 (en) 2023-05-30

Family

ID=72639572

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019158524A Active JP7283312B2 (en) 2019-03-22 2019-08-30 Information reader and program

Country Status (1)

Country Link
JP (1) JP7283312B2 (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007066000A (en) * 2005-08-31 2007-03-15 Denso Wave Inc Personal digital assistance and image processing method
JP2013138757A (en) * 2011-12-29 2013-07-18 Konami Digital Entertainment Co Ltd Code pattern recording device, gaming apparatus applied with the same, control method used for the same, and computer program
JP2014056382A (en) * 2012-09-12 2014-03-27 Mitsubishi Electric Corp Two-dimensional code reader and two-dimensional code reading method
JP2015099512A (en) * 2013-11-19 2015-05-28 株式会社デンソーウェーブ Information code reading device, and information code utilization system
JP2015176282A (en) * 2014-03-14 2015-10-05 オムロン株式会社 Image processing method, image processor, program for executing the same method, and recording medium for recording the same program
JP2016089292A (en) * 2014-10-31 2016-05-23 株式会社デンソーウェーブ Information code medium manufacturing method and information code medium
JP2016148925A (en) * 2015-02-10 2016-08-18 富士通株式会社 Two-dimensional code reading apparatus and method
JP2017091484A (en) * 2015-11-17 2017-05-25 富士通株式会社 Symbol detection device, image processing device, and symbol detection method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007066000A (en) * 2005-08-31 2007-03-15 Denso Wave Inc Personal digital assistance and image processing method
JP2013138757A (en) * 2011-12-29 2013-07-18 Konami Digital Entertainment Co Ltd Code pattern recording device, gaming apparatus applied with the same, control method used for the same, and computer program
JP2014056382A (en) * 2012-09-12 2014-03-27 Mitsubishi Electric Corp Two-dimensional code reader and two-dimensional code reading method
JP2015099512A (en) * 2013-11-19 2015-05-28 株式会社デンソーウェーブ Information code reading device, and information code utilization system
JP2015176282A (en) * 2014-03-14 2015-10-05 オムロン株式会社 Image processing method, image processor, program for executing the same method, and recording medium for recording the same program
JP2016089292A (en) * 2014-10-31 2016-05-23 株式会社デンソーウェーブ Information code medium manufacturing method and information code medium
JP2016148925A (en) * 2015-02-10 2016-08-18 富士通株式会社 Two-dimensional code reading apparatus and method
JP2017091484A (en) * 2015-11-17 2017-05-25 富士通株式会社 Symbol detection device, image processing device, and symbol detection method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
QIYUE YU: "N.N.を用いた生産情報読み取りシステムの開発", 第74回(平成24年)全国大会講演論文集(2) 人工知能と認知科学, JPN6023004297, 6 March 2012 (2012-03-06), JP, pages 2 - 239, ISSN: 0004982442 *

Also Published As

Publication number Publication date
JP7283312B2 (en) 2023-05-30

Similar Documents

Publication Publication Date Title
US20220012447A1 (en) Systems and methods for decoding two-dimensional matrix symbols with incomplete or absent fixed patterns
EP2921997B1 (en) Two-dimensional code
US7636483B2 (en) Code type determining method and code boundary detecting method
EP1909215B1 (en) Image region detection method, recording medium, and device therefor
US8371505B1 (en) System and method for compensating for motion relative to a barcode
US20110121077A1 (en) Increasing imaging quality of a bar code reader
JP7263423B2 (en) Improved matrix symbol error fix
JP6434118B2 (en) Optical information reading apparatus, optical information reading method and program
KR101259004B1 (en) calibration device for Deformation of QR-code using camera and thereof.
JP5720623B2 (en) Two-dimensional code reader
EP3301616B1 (en) Slip processing device, slip processing method, and recording medium
Yang et al. Accurate localization of four extreme corners for barcode images captured by mobile phones
JP4335229B2 (en) QR code recognition device, QR code recognition device control method, QR code recognition device control program, and computer-readable recording medium recording the same
JP2020161106A (en) Information reading device and program
JP4058478B2 (en) Optical information reading method
CN114444531A (en) Method and system for collecting data for training Machine Learning (ML) models
JP2005025414A (en) Fingerprint collating device
JP2011197856A (en) Optical information reading device
JP2016151800A (en) Code reading learning system
US11880738B1 (en) Visual odometry for optical pattern scanning in a real scene
JP2017084262A (en) Code reader
JP7415399B2 (en) Information code, information code medium, information code generation method, and information code reading device
JP6091018B2 (en) Information reader
WO2024049584A1 (en) 4d barcode mapping for moving objects
JP2020013210A (en) Code reading device and code reading program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20220121

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20230124

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230207

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230331

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230501

R150 Certificate of patent or registration of utility model

Ref document number: 7283312

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150