JP2021047541A - Optical information reading device - Google Patents

Optical information reading device Download PDF

Info

Publication number
JP2021047541A
JP2021047541A JP2019168745A JP2019168745A JP2021047541A JP 2021047541 A JP2021047541 A JP 2021047541A JP 2019168745 A JP2019168745 A JP 2019168745A JP 2019168745 A JP2019168745 A JP 2019168745A JP 2021047541 A JP2021047541 A JP 2021047541A
Authority
JP
Japan
Prior art keywords
reading
shape
convex
image
unit
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
JP2019168745A
Other languages
Japanese (ja)
Other versions
JP7306930B2 (en
Inventor
秀祐 大木
Shusuke Oki
秀祐 大木
琢規 中川
Takuki Nakagawa
琢規 中川
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.)
Keyence Corp
Original Assignee
Keyence Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Keyence Corp filed Critical Keyence Corp
Priority to JP2019168745A priority Critical patent/JP7306930B2/en
Publication of JP2021047541A publication Critical patent/JP2021047541A/en
Application granted granted Critical
Publication of JP7306930B2 publication Critical patent/JP7306930B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Input (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

To perform appropriate reading without performing setting or switching regardless of whether a reading target is concave or convex.SOLUTION: An optical information reading device 100 includes: a concave/convex determination unit 33b that obtains a shape of a surface of a reading object based on a normal vector of the surface of the reading object and determines which of a concave shape or a convex shape a concave/convex portion has; a reading image generation unit 33c that generates a reading image in which the shape of the concave/convex portion is emphasized by assigning a pixel value to each pixel so that the shape of a portion other than the concave shape on the surface of the reading object becomes a background when it is determined by the concave/convex determination unit 33b that the concave/convex portion has the concave shape, and by assigning a pixel value to each pixel so that the shape of a portion other than the convex shape on the surface of the reading object becomes a background when it is determined that the concave/convex portion has the convex shape; and a reading unit 34 that reads information corresponding to the shape of the concave/convex portion based on the reading image generated by the reading image generation unit 33c.SELECTED DRAWING: Figure 3

Description

本発明は、バーコードや二次元コード等のシンボルを読み取る光学式情報読取装置に関する。 The present invention relates to an optical information reader that reads symbols such as barcodes and two-dimensional codes.

シンボルを読み取って復号化する手持ち式の光学情報読取装置が用いられている。このような光学式情報読取装置で読み取る、読み取り対象物のワークには、多種多様なものがある。例えば、金属のように表面の反射率が高く、入射光に対して正反射する素材のワークに対し、ラベル等を使用せずに直接、シンボルを刻印やエンボス等の方法でマーキングするダイレクト・パーツ・マーキング(DPM)が用いられている。このようなワークの表面に直接形成されたシンボルを、光学式情報読取装置で読み取るケースがある。 A handheld optical information reader that reads and decodes symbols is used. There are a wide variety of workpieces to be read that are read by such an optical information reader. For example, a direct part that directly marks a symbol by a method such as engraving or embossing on a workpiece of a material such as metal that has high surface reflectance and specularly reflects against incident light without using a label or the like. -Marking (DPM) is used. There are cases where a symbol formed directly on the surface of such a work is read by an optical information reader.

このようなワーク表面に成形された凹凸形状を有する文字列の読み取りにおいては、読み取り対象の文字列が凹文字の場合と、凸文字の場合がある。従来は、文字列が凹文字の場合と凸文字の場合とで、それぞれ読取アルゴリズム等の読み取りの設定を異ならせた上で、読み取りを実行していた。この方法では、文字列の読み取り前に予め、文字列の凹凸の種別を設定する必要があり、手間が掛かる。また、文字列の凹凸が変更されると、これに応じて読取側の設定も変更しなければならない。 In reading a character string having an uneven shape formed on the surface of such a work, the character string to be read may be a concave character or a convex character. Conventionally, reading is executed after different reading settings such as a reading algorithm are used depending on whether the character string is a concave character or a convex character. In this method, it is necessary to set the type of unevenness of the character string in advance before reading the character string, which is troublesome. Further, when the unevenness of the character string is changed, the setting on the reading side must be changed accordingly.

特開2013−156754号公報Japanese Unexamined Patent Publication No. 2013-156754 特開2013−156751号公報Japanese Unexamined Patent Publication No. 2013-156751

本発明の目的の一は、読み取り対象が凹凸のいずれであっても、設定や切り替えを行うことなく適切な読み取りを行えるようにした光学式情報読取装置を提供することにある。 One of an object of the present invention is to provide an optical information reading device capable of performing appropriate reading without setting or switching regardless of whether the reading target is uneven.

課題を解決するための手段及び発明の効果Means for Solving Problems and Effects of Invention

本発明の第1の側面に係る光学式情報読取装置によれば、読取対象物の表面に形成された凹形状又は凸形状を有する凹凸部分の形状を認識し、認識結果に基づいて情報を読み出す光学式情報読取装置であって、読取対象物の表面に異なる3つ以上の方向から個別に光を照射し、該読取対象物の表面を照明する照明手段と、前記照明手段から照射され読取対象物の表面より反射された光を受光し、複数の輝度画像を生成する撮像部と、前記撮像部により生成された複数の輝度画像に基づいて、照度差ステレオの原理により読取対象物の表面の法線ベクトルを求める法線ベクトル導出部と、前記法線ベクトル導出部により求められた読取対象物の表面の法線ベクトルに基づいて、該読取対象物の表面の形状を求め、凹凸部分が凹と凸のいずれの形状であるかを判定する凹凸判定部と、前記凹凸判定部によって、凹凸部分が凹形状であると判定された場合には、読取対象物の表面の凹形状以外の部分の形状が背景となるように各画素に画素値を割り当てると共に、凹凸部分が凸形状であると判定された場合には、読取対象物の表面の凸形状以外の部分の形状が背景となるように各画素に画素値を割り当てることで、該凹凸部分の形状が強調された読取用画像を生成する読取用画像生成部と、前記読取用画像生成部によって生成された読取用画像に基づいて、凹凸部分の形状に対応する情報を読み出す読出部とを備えることができる。上記構成により、凹凸部分を凹凸判定部で自動判定することが可能となり、事前に凹凸部分が凹形状か凸形状かを明示的に指定せずとも、自動判定結果に基づいて読取用画像を生成して読出部でもって高精度に読み取りが可能となる。 According to the optical information reading device according to the first aspect of the present invention, the shape of the concave-convex or convex uneven portion formed on the surface of the object to be read is recognized, and the information is read out based on the recognition result. An optical information reader that illuminates the surface of an object to be read by individually irradiating the surface of the object to be read with light from three or more different directions, and an illuminating means that illuminates the surface of the object to be read. Based on an imaging unit that receives light reflected from the surface of an object and generates a plurality of luminance images and a plurality of luminance images generated by the imaging unit, the surface of the object to be read is based on the principle of illuminance difference stereo. Based on the normal vector deriving unit for obtaining the normal vector and the normal vector on the surface of the reading object obtained by the normal vector deriving unit, the shape of the surface of the reading object is obtained, and the uneven portion is concave. When the unevenness determination unit determines which shape is convex or convex, and the unevenness determination unit determines that the uneven portion has a concave shape, the portion other than the concave shape on the surface of the object to be read. A pixel value is assigned to each pixel so that the shape becomes the background, and when it is determined that the uneven portion has a convex shape, the shape of the portion other than the convex shape on the surface of the reading object becomes the background. By assigning a pixel value to each pixel, a reading image generation unit that generates a reading image in which the shape of the uneven portion is emphasized, and a reading image generated by the reading image generation unit are used as the basis for the unevenness. A reading unit that reads out information corresponding to the shape of the portion can be provided. With the above configuration, the uneven portion can be automatically determined by the uneven portion determination unit, and a reading image is generated based on the automatic determination result without explicitly specifying whether the uneven portion has a concave shape or a convex shape in advance. Then, the reading unit can read with high accuracy.

また、本発明の第2の側面に係る光学式情報読取装置によれば、上記構成に加えて、前記凹凸判定部は、さらに、前記法線ベクトル導出部により求められた読取対象物の表面の法線ベクトルに基づいて読取対象物の表面の形状を求め、該読取対象物の表面の形状を示す中間画像を生成する中間画像生成部を備えており、前記中間画像生成部で生成された中間画像に基づいて、凹凸部分が凹と凸のいずれの形状であるかを判定するよう構成することができる。 Further, according to the optical information reading device according to the second aspect of the present invention, in addition to the above configuration, the unevenness determination unit further comprises the surface of the object to be read obtained by the normal vector derivation unit. It is provided with an intermediate image generation unit that obtains the shape of the surface of the object to be read based on the normal vector and generates an intermediate image showing the shape of the surface of the object to be read, and is provided with an intermediate image generation unit generated by the intermediate image generation unit. Based on the image, it can be configured to determine whether the uneven portion has a concave shape or a convex shape.

さらに、本発明の第3の側面に係る光学式情報読取装置によれば、上記何れかの構成に加えて、前記中間画像生成部が、読取対象物の表面の各部に対応する各画素に、該読取対象物の表面の各部の形状に基づいて、凸部分と凹部分に異なる画素値を割り当てることで、前記中間画像を生成するよう構成できる。 Further, according to the optical information reader according to the third aspect of the present invention, in addition to any of the above configurations, the intermediate image generation unit may be used for each pixel corresponding to each portion of the surface of the object to be read. The intermediate image can be generated by assigning different pixel values to the convex portion and the concave portion based on the shape of each portion of the surface of the reading object.

さらにまた、本発明の第4の側面に係る光学式情報読取装置によれば、上記何れかの構成に加えて、さらに、前記中間画像生成部が生成した中間画像上に、前記読出部が読み出した情報に対応する領域を識別可能に表示する表示部を備えることができる。 Furthermore, according to the optical information reader according to the fourth aspect of the present invention, in addition to any of the above configurations, the reading unit reads out on the intermediate image generated by the intermediate image generating unit. A display unit for identifiablely displaying the area corresponding to the information can be provided.

さらにまた、本発明の第5の側面に係る光学式情報読取装置によれば、上記何れかの構成に加えて、前記凹凸判定部が、前記中間画像の凹凸部分を含む所定の画像領域内における前記凸部分に対応する画素数と、前記凹部分に対応する画素数の割合に基づいて、凹凸部分が凹と凸のいずれの形状であるかを判定するよう構成できる。 Furthermore, according to the optical information reader according to the fifth aspect of the present invention, in addition to any of the above configurations, the unevenness determination unit is within a predetermined image region including the uneven portion of the intermediate image. It can be configured to determine whether the concave-convex portion has a concave or convex shape based on the ratio of the number of pixels corresponding to the convex portion and the number of pixels corresponding to the concave portion.

さらにまた、本発明の第6の側面に係る光学式情報読取装置によれば、上記何れかの構成に加えて、前記凹凸判定部が、前記中間画像において所定の基準値が割り当てられた画素に隣接する画素の内、凸部に対応する画素数と凹部に対応する画素数の割合を求めることで、凹凸部分が凹と凸のいずれの形状であるかを判定するよう構成できる。 Furthermore, according to the optical information reader according to the sixth aspect of the present invention, in addition to any of the above configurations, the unevenness determination unit is assigned to pixels to which a predetermined reference value is assigned in the intermediate image. By obtaining the ratio of the number of pixels corresponding to the convex portion to the number of pixels corresponding to the concave portion among the adjacent pixels, it is possible to determine whether the concave-convex portion has a concave or convex shape.

さらにまた、本発明の第7の側面に係る光学式情報読取装置によれば、上記何れかの構成に加えて、前記読取用画像生成部が、前記凹凸判定部によって、凹凸部分が凹形状であると判定された場合には、前記凹部分に対応する画素以外の画素に統一して画素値を割り当て、凹凸部分が凸形状であると判定された場合には、前記凸部分に対応する画素以外の画素に統一して画素値を割り当てることで、該凹凸部分の形状が強調された前記読取用画像を生成するよう構成できる。 Furthermore, according to the optical information reading device according to the seventh aspect of the present invention, in addition to any of the above configurations, the reading image generation unit has a concave-convex shape due to the unevenness determination unit. When it is determined that there is, a pixel value is uniformly assigned to pixels other than the pixel corresponding to the concave portion, and when it is determined that the uneven portion has a convex shape, the pixel corresponding to the convex portion is used. By uniformly assigning pixel values to pixels other than the above, it is possible to generate the reading image in which the shape of the uneven portion is emphasized.

さらにまた、本発明の第8の側面に係る光学式情報読取装置によれば、上記何れかの構成に加えて、前記読取用画像生成部が、前記凹凸判定部によって、凹凸部分が凹形状であると判定された場合には、読取対象物の表面の平坦な部分に対応する画素に自動で第一の基準値を割り当てると共に、前記凹形状が強調されるように該読取対象物の表面の各部に対応する各画素に画素値を割り当て、凹凸部分が凸形状であると判定された場合には、読取対象物の表面の平坦な部分に対応する画素に自動で前記第一の基準値とは異なる第二の基準値を割り当てると共に、前記凸形状が強調されるように該読取対象物の表面の各部に対応する各画素に画素値を割り当てることで、該凹凸部分の形状が強調された強調された読取用画像を生成するよう構成できる。 Furthermore, according to the optical information reading device according to the eighth aspect of the present invention, in addition to any of the above configurations, the reading image generation unit has a concave-convex shape due to the unevenness determination unit. If it is determined to be present, the first reference value is automatically assigned to the pixels corresponding to the flat portion of the surface of the object to be read, and the concave shape is emphasized on the surface of the object to be read. A pixel value is assigned to each pixel corresponding to each part, and when it is determined that the uneven portion has a convex shape, the pixel corresponding to the flat portion of the surface of the object to be read is automatically set to the first reference value. Assigned a different second reference value and assigned a pixel value to each pixel corresponding to each part of the surface of the reading object so that the convex shape was emphasized, thereby emphasizing the shape of the uneven portion. It can be configured to generate an emphasized reading image.

さらにまた、本発明の第9の側面に係る光学式情報読取装置によれば、上記何れかの構成に加えて、前記読取用画像生成部は、生成した読取用画像における特定の画素について、前記中間画像において該特定の画素に対応する画素値あるいは前記輝度画像において該特定の画素に対応する画素の輝度値に基づいて修正するよう構成できる。 Furthermore, according to the optical information reader according to the ninth aspect of the present invention, in addition to any of the above configurations, the reading image generation unit may use the reading image generator for a specific pixel in the generated reading image. It can be configured to modify based on the pixel value corresponding to the specific pixel in the intermediate image or the brightness value of the pixel corresponding to the specific pixel in the brightness image.

さらにまた、本発明の第10の側面に係る光学式情報読取装置によれば、上記何れかの構成に加えて、さらに、凹凸部分が凹と凸のいずれの形状であるかについてあらかじめ指定を受け付ける凹凸指定部を備え、前記読取用画像生成部は、前記凹凸指定部により凹凸部分の形状が指定されている場合は、該指定された凹凸が強調されるように前記読取用画像を生成し、前記凹凸指定部により凹凸部分の形状が指定されていない場合は、前記凹凸判定部により凹凸部分が凹と凸のいずれの形状であるかを判定して、前記読取用画像を生成するよう構成できる。 Furthermore, according to the optical information reader according to the tenth aspect of the present invention, in addition to any of the above configurations, further designation is received in advance as to whether the concave-convex portion has a concave or convex shape. The reading image generation unit includes a concavo-convex designation portion, and when the shape of the concavo-convex portion is designated by the concavo-convex designation portion, the reading image generation unit generates the reading image so that the designated unevenness is emphasized. When the shape of the concavo-convex portion is not specified by the concavo-convex designation portion, the concavo-convex determination portion can be configured to determine whether the concavo-convex portion has a concave or convex shape and generate the reading image. ..

さらにまた、本発明の第11の側面に係る光学式情報読取装置によれば、上記何れかの構成に加えて、前記読出部は、凹凸部分の形状に対応する情報として、OCRにより文字列を読み出すよう構成できる。 Furthermore, according to the optical information reader according to the eleventh aspect of the present invention, in addition to any of the above configurations, the reading unit uses OCR to generate a character string as information corresponding to the shape of the uneven portion. Can be configured to read.

さらにまた、本発明の第12の側面に係る光学式情報読取装置によれば、上記何れかの構成に加えて、さらに、前記照明手段、撮像部、法線ベクトル導出部、凹凸判定部、読出部を収納すると共に、一方向に延長された一端に、開口された読取口を形成して、該読取口の内面に前記照明手段を配置してなる筐体部と、前記読取口よりも内径を大きくした第二読取口を一旦に開口し、他端を前記読取口と連結自在とし、前記読取口と第二読取口を連通させるように枠状に形成されたアタッチメント部とを備え、前記アタッチメント部は、前記読取口と連結状態において、前記照明手段と光学的に接続されて該照明手段の発光を検出対象物に向けて投光する光学窓を、前記第二読取口の枠状の内面を構成する4面にそれぞれ備えており、前記アタッチメント部を前記筐体部の読取口に連結した状態で、前記光学窓が前記照明手段と光学的に接続されて、前記第二読取口の内面の4面から、読取対象物を4方向から照明可能とできる。上記構成により、アタッチメント部を連結して読取口をより大きくすることが可能となり、読取口に収まりきらない大きな読取対象物であっても、第二読取口で4方向から囲むようにして照明し、読み取りを行うことが可能となる。 Furthermore, according to the optical information reading device according to the twelfth aspect of the present invention, in addition to any of the above configurations, the lighting means, the imaging unit, the normal vector derivation unit, the unevenness determination unit, and the reading are further performed. A housing portion in which an open reading port is formed at one end extending in one direction and the lighting means is arranged on the inner surface of the reading port, and an inner diameter of the reading port is larger than that of the reading port. The second reading port is opened at once, the other end is freely connectable to the reading port, and an attachment portion formed in a frame shape so as to communicate the reading port and the second reading port is provided. The attachment unit has an optical window that is optically connected to the lighting means and emits light emitted from the lighting means toward the detection object in a state of being connected to the reading port, and has a frame shape of the second reading port. Each of the four surfaces constituting the inner surface is provided, and the optical window is optically connected to the lighting means in a state where the attachment portion is connected to the reading port of the housing portion to form the second reading port. The object to be read can be illuminated from four directions from the four inner surfaces. With the above configuration, it is possible to connect the attachment units to make the reading port larger, and even a large reading object that does not fit in the reading port is illuminated and read by surrounding it from four directions with the second reading port. Can be done.

さらにまた、本発明の第13の側面に係る光学式情報読取装置によれば、上記何れかの構成に加えて、前記撮像部は、その受光面を前記読取口の内部において、前記筐体部の長手方向に対して傾斜する姿勢に配置されており、前記筐体部の読取口に連結した前記アタッチメント部の前記第二読取口を、読取対象物を形成した平面に押し当てた状態で、該平面が、前記撮像部の受光面と平行姿勢となるように構成できる。上記構成により、受光面を傾斜姿勢で固定した光学式情報読取装置としつつ、アタッチメント部を利用することで読取対象物に対して正面から撮像した画像を容易に取得することが可能となる。 Furthermore, according to the optical information reader according to the thirteenth aspect of the present invention, in addition to any of the above configurations, the imaging unit has its light receiving surface inside the reading port, and the housing unit. The second reading port of the attachment portion connected to the reading port of the housing portion is pressed against the plane on which the object to be read is formed. The plane can be configured to be parallel to the light receiving surface of the imaging unit. With the above configuration, it is possible to easily acquire an image captured from the front of the object to be read by using the attachment unit while using the optical information reader in which the light receiving surface is fixed in an inclined posture.

さらにまた、本発明の第14の側面に係る光学式情報読取方法によれば、読取対象物の表面に形成された凹形状又は凸形状を有する凹凸部分の形状を認識し、認識結果に基づいて情報を読み出す光学式情報読取方法であって、読取対象物の表面に異なる3つ以上の方向から個別に照明手段でもって光を照射し、該読取対象物の表面を照明する工程と、前記照明手段から照射され読取対象物の表面より反射された光を受光し、複数の輝度画像を撮像部で生成する工程と、前記撮像部により生成された複数の輝度画像に基づいて、照度差ステレオの原理により読取対象物の表面の法線ベクトルを求める工程と、前記求められた読取対象物の表面の法線ベクトルに基づいて、該読取対象物の表面の形状を求め、凹凸部分が凹と凸のいずれの形状であるかを判定すると共に、凹凸部分が凹形状であると判定された場合には、読取対象物の表面の凹形状以外の部分の形状が背景となるように各画素に画素値を割り当てると共に、凹凸部分が凸形状であると判定された場合には、読取対象物の表面の凸形状以外の部分の形状が背景となるように各画素に画素値を割り当てることで、該凹凸部分の形状が強調された読取用画像を生成する工程と、前記読取用画像に基づいて、凹凸部分の形状に対応する情報を読み出す工程とを含むことができる。これにより、凹凸部分を凹凸判定部で自動判定することが可能となり、事前に凹凸部分が凹形状か凸形状かを明示的に指定せずとも、自動判定結果に基づいて読取用画像を生成して読出部でもって高精度に読み取りが可能となる。 Furthermore, according to the optical information reading method according to the fourteenth aspect of the present invention, the shape of the concave-convex or convex uneven portion formed on the surface of the object to be read is recognized, and based on the recognition result. An optical information reading method for reading information, wherein the surface of the object to be read is individually irradiated with light from three or more different directions by an illuminating means to illuminate the surface of the object to be read, and the illumination. Based on the step of receiving the light emitted from the means and reflected from the surface of the object to be read and generating a plurality of luminance images by the imaging unit and the plurality of luminance images generated by the imaging unit, the illuminance difference stereo Based on the step of obtaining the normal vector of the surface of the object to be read by the principle and the normal vector of the surface of the object to be read, the shape of the surface of the object to be read is obtained, and the uneven portion is concave and convex. If it is determined that the uneven portion has a concave shape, each pixel has a pixel so that the shape of the portion other than the concave shape on the surface of the object to be read becomes the background. In addition to assigning a value, when it is determined that the uneven portion has a convex shape, the pixel value is assigned to each pixel so that the shape of the portion other than the convex shape on the surface of the reading object becomes the background. A step of generating a reading image in which the shape of the uneven portion is emphasized and a step of reading information corresponding to the shape of the uneven portion based on the reading image can be included. This makes it possible for the uneven portion to be automatically determined by the uneven portion determination unit, and a reading image is generated based on the automatic determination result without explicitly specifying whether the uneven portion has a concave shape or a convex shape in advance. The reading unit enables high-precision reading.

本発明の実施形態1に係る光学式情報読取装置を示す斜視図である。It is a perspective view which shows the optical information reading apparatus which concerns on Embodiment 1 of this invention. 図1の光学式情報読取装置の先端側斜め下方から見た斜視図である。It is a perspective view seen from diagonally below the tip side of the optical information reader of FIG. 図1の光学式情報読取装置のブロック図である。It is a block diagram of the optical information reader of FIG. 照度差ステレオ法で、同一の領域を同一の視点から、照明の方向を変えながら複数の画像を撮影し、各画像に含まれる各位置の明るさの変化から、当該位置の面の傾きを推定する様子を説明する模式図である。Using the illuminance difference stereo method, multiple images are taken from the same viewpoint in the same area while changing the direction of illumination, and the inclination of the surface at that position is estimated from the change in brightness at each position included in each image. It is a schematic diagram explaining the state of doing. 照明部を矩形状に配置した照明手段を示す斜視図である。It is a perspective view which shows the illuminating means which arranged the illuminating part in a rectangular shape. 図1の光学式情報読取装置の撮像シーケンスを示すタイミングチャートである。It is a timing chart which shows the imaging sequence of the optical information reading apparatus of FIG. 照度差ステレオ法で撮像したシンボルの読み取りを行う手順を示すフローチャートである。It is a flowchart which shows the procedure of reading the symbol imaged by the illuminance difference stereo method. マルチアングル照明で撮像したシンボルの読み取りを行う手順を示すフローチャートである。It is a flowchart which shows the procedure of reading a symbol imaged by multi-angle illumination. 図9Aはワークの表面に光学式情報読取装置を近付ける様子を示す斜視図、図9Bはシンボルを覆うように光学式情報読取装置を配置した様子を示す斜視図である。FIG. 9A is a perspective view showing how the optical information reader is brought close to the surface of the work, and FIG. 9B is a perspective view showing how the optical information reader is arranged so as to cover the symbol. ワークに照明光を照射する様子を示す断面図である。It is sectional drawing which shows the state of irradiating the work with illumination light. 図10のワークに左方向から照明した様子を示す平面図である。It is a top view which shows the state of illuminating the work of FIG. 10 from the left direction. 図10のワークに右方向から照明した様子を示す平面図である。It is a top view which shows the state of illuminating the work of FIG. 10 from the right direction. X方向の傾き推定結果を示す模式断面図である。It is a schematic cross-sectional view which shows the inclination estimation result in the X direction. X方向の処理を行った形状画像を示す模式図である。It is a schematic diagram which shows the shape image which performed the processing in the X direction. X方向及びY方向の処理を行った形状画像を示す模式図である。It is a schematic diagram which shows the shape image which performed the processing in the X direction and the Y direction. 輪郭のみの画像を生成する様子を示す模式図である。It is a schematic diagram which shows how the image of only the outline is generated. 演算部の一例を示すブロック図である。It is a block diagram which shows an example of a calculation part. 読取対象物に形成された凹文字列の光学画像を示すイメージ図である。It is an image diagram which shows the optical image of the concave character string formed on the reading object. 読取対象物に形成された凸文字列の光学画像を示すイメージ図である。It is an image diagram which shows the optical image of the convex character string formed on the reading object. 図18の凹文字列に対する照度差ステレオ画像を示すイメージ図である。It is an image diagram which shows the illuminance difference stereo image with respect to the concave character string of FIG. 図19の凸文字列に対する照度差ステレオ画像を示すイメージ図である。It is an image diagram which shows the illuminance difference stereo image with respect to the convex character string of FIG. 図18の凹文字列のワークに対して、凸部分が白、凹部分が黒、平坦部分が灰色で構成された照度差ステレオ画像を示すイメージ図である。FIG. 5 is an image diagram showing an illuminance difference stereo image in which a convex portion is white, a concave portion is black, and a flat portion is gray with respect to the work of the concave character string of FIG. 図19の凸文字列のワークに対して、凸部分が白、凹部分が黒、平坦部分が灰色で構成された照度差ステレオ画像を示すイメージ図である。FIG. 5 is an image diagram showing an illuminance difference stereo image in which a convex portion is white, a concave portion is black, and a flat portion is gray with respect to the work of the convex character string of FIG. 凹凸形状が凹文字列か凸文字列かを自動判定する自動判定処理を示すフローチャートである。It is a flowchart which shows the automatic determination process which automatically determines whether a concave-convex character string is a concave character string or a convex character string. 凹凸文字で共通の処理を行う文字部強調処理を示すフローチャートである。It is a flowchart which shows the character part emphasis processing which performs the common processing with uneven characters. 図23の照度差ステレオ画像を白黒反転させた反転照度差ステレオ画像を示すイメージ図である。It is an image diagram which shows the inverted illuminance difference stereo image which inverted the illuminance difference stereo image of FIG. 23 in black and white. 文字部基点画素で構成された照度差ステレオ画像の例を示すイメージ図である。It is an image diagram which shows the example of the illuminance difference stereo image composed of the character part base point pixel. 図27から文字部画素を復元した読取用画像を示すイメージ図である。It is an image diagram which shows the reading image which restored the character part pixel from FIG. 27. 凹凸文字で個別の処理を行う文字部強調処理を示すフローチャートである。It is a flowchart which shows the character part emphasis processing which performs individual processing with uneven character. 図22から変換した、凹文字用パラメータ設定により文字部基点画素で構成された照度差ステレオ画像の例を示すイメージ図である。FIG. 5 is an image diagram showing an example of an illuminance difference stereo image composed of character portion base point pixels by setting parameters for concave characters, which is converted from FIG. 22. 図30から文字部画素を復元した読取用画像を示すイメージ図である。It is an image diagram which shows the reading image which restored the character part pixel from FIG. 図23から変換した、凸文字用パラメータ設定により文字部基点画素で構成された照度差ステレオ画像の例を示すイメージ図である。FIG. 3 is an image diagram showing an example of an illuminance difference stereo image composed of character portion base point pixels by setting parameters for convex characters converted from FIG. 23. 図32から文字部画素を復元した読取用画像を示すイメージ図である。It is an image diagram which shows the reading image which restored the character part pixel from FIG. 32. 演算部の他の例を示すブロック図である。It is a block diagram which shows another example of a calculation part. 変形例に係る光学式情報読取装置を示す斜視図である。It is a perspective view which shows the optical information reading apparatus which concerns on a modification. 図35の光学式情報読取装置の先端側斜め下方から見た斜視図である。FIG. 35 is a perspective view seen from diagonally below the tip side of the optical information reader of FIG. 35. 図35の光学式情報読取装置からアタッチメント部を外した分解斜視図である。It is an exploded perspective view which removed the attachment part from the optical information reader of FIG. 35. 図36の光学式情報読取装置からアタッチメント部を外した分解斜視図である。It is an exploded perspective view which removed the attachment part from the optical information reading apparatus of FIG. 36. 図35の光学式情報読取装置を読取対象物に押し当てた状態を示す垂直断面図である。FIG. 3 is a vertical cross-sectional view showing a state in which the optical information reader of FIG. 35 is pressed against an object to be read.

以下、本発明の実施の形態を図面に基づいて説明する。ただし、以下に示す実施の形態は、本発明の技術思想を具体化するための光学式情報読取装置及び光学式情報読取方法を例示するものであって、本発明は光学式情報読取装置及び光学式情報読取方法を以下のものに特定しない。また、本明細書は特許請求の範囲に示される部材を、実施の形態の部材に特定するものでは決してない。特に実施の形態に記載されている構成部品の寸法、材質、形状、その相対的配置等は特に特定的な記載がない限りは、本発明の範囲をそれのみに限定する趣旨ではなく、単なる説明例にすぎない。なお、各図面が示す部材の大きさや位置関係等は、説明を明確にするため誇張していることがある。さらに以下の説明において、同一の名称、符号については同一もしくは同質の部材を示しており、詳細説明を適宜省略する。さらに、本発明を構成する各要素は、複数の要素を同一の部材で構成して一の部材で複数の要素を兼用する態様としてもよいし、逆に一の部材の機能を複数の部材で分担して実現することもできる。
[実施形態1]
Hereinafter, embodiments of the present invention will be described with reference to the drawings. However, the embodiments shown below exemplify an optical information reading device and an optical information reading method for embodying the technical idea of the present invention, and the present invention describes the optical information reading device and optics. The formula information reading method is not specified as follows. In addition, the present specification does not specify the members shown in the claims as the members of the embodiment. In particular, the dimensions, materials, shapes, relative arrangements, etc. of the components described in the embodiments are not intended to limit the scope of the present invention to the specific description unless otherwise specified, and are merely described. It's just an example. The size and positional relationship of the members shown in each drawing may be exaggerated to clarify the explanation. Further, in the following description, members of the same or the same quality are shown with the same name and reference numeral, and detailed description thereof will be omitted as appropriate. Further, each element constituting the present invention may be configured such that a plurality of elements are composed of the same member and the plurality of elements are combined with one member, or conversely, the function of one member is performed by the plurality of members. It can also be shared and realized.
[Embodiment 1]

光学式情報読取装置は、文字列や、バーコード、二次元コード等のシンボルを読み取ってデータの登録、照合を行う部材であり、ハンディターミナル、業務用PDA等とも呼ばれる。特に、シンボルがDPMで読取対象物に直接刻印されている等、シンボルが凹凸を有する場合であっても、安定的に読み取れるようにした光学式情報読取装置である。本発明の実施形態1に係る光学式情報読取装置100を、図1〜図3に示す。これらの図において、図1は本発明の実施形態1に係る光学式情報読取装置100を示す斜視図、図2は図1の光学式情報読取装置100を斜め下方から見た斜視図、図3は図1の光学式情報読取装置100のブロック図を、それぞれ示している。 The optical information reader is a member that reads a character string, a bar code, a symbol such as a two-dimensional code, and registers and collates data, and is also called a handy terminal, a commercial PDA, or the like. In particular, it is an optical information reading device that enables stable reading even when the symbol has irregularities such as the symbol being directly engraved on the object to be read by DPM. The optical information reader 100 according to the first embodiment of the present invention is shown in FIGS. 1 to 3. In these figures, FIG. 1 is a perspective view showing an optical information reading device 100 according to the first embodiment of the present invention, FIG. 2 is a perspective view of the optical information reading device 100 of FIG. 1 viewed from diagonally below, and FIG. 1 shows a block diagram of the optical information reader 100 of FIG. 1, respectively.

これらの図に示す光学式情報読取装置100は、筐体部10と、把持部14と、撮像ユニット20と、演算部30と、表示部50と、操作部54と、電源部56を備える。撮像ユニット20は、撮像部21と、照明手段40を含む。この光学式情報読取装置100は、読み取り対象のシンボルに対して照明手段40を用いて複数の方向から照明光を照射し、それぞれの方向における照明光の照射時に撮像部21で撮像された画像を合成することにより、シンボルの輪郭が強調された画像を取得し、この画像に対してシンボルの読み取りを行う。使用者は把持部14を手で握って、シンボルに向けた姿勢に光学式情報読取装置100を構えて、操作部54に設けられたトリガスイッチを指で操作することにより、シンボルの読み取り等の処理を実行させる。 The optical information reading device 100 shown in these figures includes a housing unit 10, a gripping unit 14, an imaging unit 20, a calculation unit 30, a display unit 50, an operation unit 54, and a power supply unit 56. The image pickup unit 20 includes an image pickup unit 21 and an illumination means 40. The optical information reading device 100 irradiates the symbol to be read with illumination light from a plurality of directions by using the illumination means 40, and captures an image captured by the imaging unit 21 when the illumination light is irradiated in each direction. By synthesizing, an image in which the outline of the symbol is emphasized is acquired, and the symbol is read from this image. The user holds the grip portion 14 by hand, holds the optical information reading device 100 in a posture toward the symbol, and operates the trigger switch provided on the operation portion 54 with a finger to read the symbol or the like. Let the process be executed.

筐体部10は、光学式情報読取装置100の外形を形成する部材である。筐体部10の内部には、撮像ユニット20や表示部50、電源部56等が収納される。ここでは筐体部10は、一方向に延長された形状とし、長手方向に表示部50の表示面と把持部14とが直線状に並ぶように形成している。また筐体部10の内部では、先端側に撮像ユニット20が、後端側で把持部14の内部には電源部56が、それぞれ配置されている。さらに筐体部10は、図1〜図2に示すように、上ケース11と下ケース12に二分割されている。下ケース12は筐体部10の下面を構成し、先端側に斜め下方に開口させた読取口13を形成している。さらに上ケース11は上面を平坦面とし、表示部50の表示面を表出させている。表示部50は、一方向に延長された矩形状の表示面を有する。このような筐体部10は、強度を有する軽量な材質で構成され、例えば樹脂製とする。 The housing portion 10 is a member that forms the outer shape of the optical information reading device 100. The image pickup unit 20, the display unit 50, the power supply unit 56, and the like are housed inside the housing unit 10. Here, the housing portion 10 has a shape extended in one direction, and is formed so that the display surface of the display portion 50 and the grip portion 14 are linearly arranged in the longitudinal direction. Further, inside the housing portion 10, an imaging unit 20 is arranged on the front end side, and a power supply unit 56 is arranged inside the grip portion 14 on the rear end side. Further, as shown in FIGS. 1 and 2, the housing portion 10 is further divided into an upper case 11 and a lower case 12. The lower case 12 constitutes the lower surface of the housing portion 10 and forms a reading port 13 that is opened obliquely downward on the tip side. Further, the upper case 11 has a flat surface on the upper surface so that the display surface of the display unit 50 is exposed. The display unit 50 has a rectangular display surface extended in one direction. Such a housing portion 10 is made of a strong and lightweight material, for example, made of resin.

把持部14は、使用者が把持するための部位であり、筐体部10の一部に設けられている。また把持部14と筐体部10は別部材で構成する他、これらを一体に形成してもよい。把持部14は筐体部10の後端側に一体的に設けられている。さらに把持部14を筐体部10に対して着脱式としてもよい。 The grip portion 14 is a portion for the user to grip, and is provided in a part of the housing portion 10. Further, the grip portion 14 and the housing portion 10 may be formed of separate members or may be integrally formed. The grip portion 14 is integrally provided on the rear end side of the housing portion 10. Further, the grip portion 14 may be detachable from the housing portion 10.

さらにまた把持部には、操作部54を設けている。操作部54には、使用者が指で操作するための各種の操作キーを配置している。使用者は操作キーを操作することで、表示面における表示内容に対して種々の操作を実行したり、照明光やエイミング光の照射、読み取り、画像の撮像等の各種の処理を行う。操作キーには、例えば読み取りを指示するトリガスイッチや、エイミング光を照射するエイミングスイッチが含まれる。なお、操作部54をタッチパネルとすることも可能である。表示部50と別個のタッチパネル式の操作部としてもよいし、表示器50を操作部54が設けられている位置まで設け、その部分を操作入力に用いることで操作部としての機能を実現することもできる。 Further, the grip portion is provided with an operation portion 54. Various operation keys for the user to operate with a finger are arranged on the operation unit 54. By operating the operation keys, the user performs various operations on the display contents on the display surface, and performs various processes such as irradiation and reading of illumination light and aiming light, and image capture. The operation keys include, for example, a trigger switch for instructing reading and an aiming switch for irradiating aiming light. The operation unit 54 can also be a touch panel. It may be a touch panel type operation unit separate from the display unit 50, or the display unit 50 may be provided up to the position where the operation unit 54 is provided, and that portion may be used for operation input to realize the function as the operation unit. You can also.

表示部50は、撮像部21により得られた画像や、読取結果、業務アプリケーション等の各種情報を表示させるための部材である。表示部50では主に業務アプリケーションを表示させながら、画像表示でもって読み取りを分かりやすくするための補助的な役割も果たす。表示部50は、使用者の操作に応じて表示を行う。表示部50の表示は、使用者のキー入力や、タッチパネル入力、サーバからの操作等に応じて行われる。表示部50は、LCDや有機EL等で構成される。また表示部50は一方向に延長された矩形状の表示面を有しており、筐体部10の上面に表出させている。表示面は、読み取った情報や設定情報等を表示させるための面である。この表示面は、タッチパネルとすることができる。 The display unit 50 is a member for displaying various information such as an image obtained by the image pickup unit 21, a reading result, and a business application. The display unit 50 mainly displays the business application and also plays an auxiliary role for making the reading easy to understand by displaying the image. The display unit 50 displays according to the operation of the user. The display unit 50 is displayed in response to a user's key input, touch panel input, operation from a server, or the like. The display unit 50 is composed of an LCD, an organic EL, or the like. Further, the display unit 50 has a rectangular display surface extended in one direction, and is exposed on the upper surface of the housing unit 10. The display surface is a surface for displaying read information, setting information, and the like. This display surface can be a touch panel.

撮像部21は、読み取り対象となるシンボルを含む画像を取得する。撮像部21は、C−MOSやCCD等の撮像素子(イメージセンサ)で構成される。撮像素子は板状に構成される。また撮像部21は、一以上の光学レンズ22を含んでおり、受光された反射光を撮像素子に結像させる。 The imaging unit 21 acquires an image including a symbol to be read. The image pickup unit 21 is composed of an image pickup element (image sensor) such as a C-MOS or a CCD. The image sensor is configured in a plate shape. Further, the image pickup unit 21 includes one or more optical lenses 22, and causes the image pickup element to image the received reflected light.

照明手段40は、撮像部21でシンボルを撮像する際にシンボルを照明するよう、照明光を照射するための部材である。照明手段40は、撮像部21の光軸の周囲に設けられた複数の照明部43を備える。照明部43は、発光ダイオード(LED)や有機EL等で構成される。 The illumination means 40 is a member for irradiating the illumination light so that the symbol is illuminated when the image pickup unit 21 images the symbol. The lighting means 40 includes a plurality of lighting units 43 provided around the optical axis of the imaging unit 21. The illumination unit 43 is composed of a light emitting diode (LED), an organic EL, or the like.

電源部56は、照明手段40や撮像部21、演算部30や表示部50等に駆動電力を供給するための部材である。ここでは電源部56は、充電可能な二次電池で構成されており、コードレスで携行可能な光学式情報読取装置100を実現している。
(演算部30)
The power supply unit 56 is a member for supplying driving power to the lighting means 40, the image pickup unit 21, the calculation unit 30, the display unit 50, and the like. Here, the power supply unit 56 is composed of a rechargeable secondary battery, and realizes a cordless and portable optical information reading device 100.
(Calculation unit 30)

演算部30は、撮像制御部31と、照明制御部32と、画像処理部33と、読出部34を含む。この演算部30は、与えられた信号やデータを処理して各種の演算を行い、演算結果を出力する制御回路や制御素子である。このような演算部30は、CPUやMPU、GPU、TPU、FPGA、ASIC、LSI等のプロセッサやマイコン、あるいはSoC等のチップセット等で構成される。 The calculation unit 30 includes an image pickup control unit 31, a lighting control unit 32, an image processing unit 33, and a reading unit 34. The calculation unit 30 is a control circuit or control element that processes a given signal or data, performs various calculations, and outputs a calculation result. Such a calculation unit 30 is composed of a processor such as a CPU, an MPU, a GPU, a TPU, an FPGA, an ASIC, or an LSI, a microcomputer, a chipset such as a SoC, or the like.

照明制御部32は、複数の照明部43を所定の順序に従って逐次点灯させ、光軸に対する照明方向を変えてシンボルに照明光を照射するよう照明手段40を制御する。 The illumination control unit 32 sequentially lights the plurality of illumination units 43 in a predetermined order, and controls the illumination means 40 so as to irradiate the symbol with the illumination light by changing the illumination direction with respect to the optical axis.

撮像制御部31は、照明制御部32により複数の照明部43を点灯させるタイミングごとに、異なる照明方向の照明光を用いて得られた画像をそれぞれ取得するよう、撮像部21を制御する。このため撮像制御部31は照明制御部32と連動して、照明手段40の点灯と撮像部21による撮像を同期させている。 The image pickup control unit 31 controls the image pickup control unit 21 so as to acquire images obtained by using illumination lights in different illumination directions at each timing when the illumination control unit 32 turns on the plurality of illumination units 43. Therefore, the image pickup control unit 31 synchronizes the lighting of the lighting means 40 with the image pickup by the image pickup unit 21 in conjunction with the illumination control unit 32.

画像処理部33は、異なる照明方向の照明光を用いて得られた複数の画像から、シンボルの凹凸を示す形状画像を生成する。 The image processing unit 33 generates a shape image showing the unevenness of the symbol from a plurality of images obtained by using illumination lights in different illumination directions.

読出部34は、画像処理部33により得られた形状画像を基に、シンボルを読み取る。光学式情報読取装置で読み取る読み取り対象のシンボルには、文字列の他、二次元コードやバーコード等のコードが含まれる。コードには、QRコード、MicroQRコード、tQR、iQR、SQRC(セキュリティ機能搭載QRコード)、CPコード、DataMatrix、GS1Data Matrix、Aztec、PDF417、Micro PDF417、GS1Data Bar14、Limited,Stacked,Expanded+Composite、UPC/EAN/GS1−128/ITF/Codabar、Veri Code、Maxi Code(いずれも商品名又はサービス名)等、規格化されたコードが挙げられる。コードは、各規格に従い、復号化されており、読出部34で各規格に従って復号化される。また、標準化されていない独自規格のコードでもよい。さらに本明細書で文字列というとき、数字や記号も含む意味で使用する。文字列の読み取りの場合は、事前の復号化は不要であり、読出部34は画像中から文字列を抽出してOCRを行う(詳細は後述)。
(照明手段40)
The reading unit 34 reads the symbol based on the shape image obtained by the image processing unit 33. The symbol to be read, which is read by the optical information reader, includes a code such as a two-dimensional code or a bar code in addition to a character string. The code includes QR code, MicroQR code, tQR, iQR, SQRC (QR code with security function), CP code, DataMatrix, GS1DataMatrix, Aztec, PDF417, Micro PDF417, GS1DataDataBar14, Limited + Standard / Standard Standardized codes such as / GS1-128 / ITF / Codabar, Veri Code, and Maxi Code (all are product names or service names) can be mentioned. The code is decoded according to each standard, and is decoded according to each standard by the reading unit 34. In addition, a code of a proprietary standard that is not standardized may be used. Further, when the term "character string" is used in the present specification, it is used to mean including numbers and symbols. In the case of reading a character string, prior decoding is not necessary, and the reading unit 34 extracts the character string from the image and performs OCR (details will be described later).
(Lighting means 40)

照明手段40は、照明部43を撮像部21の光軸の周囲に3つ以上備えている。照明制御部32で3つ以上の照明部43をそれぞれ点灯する際に、撮像制御部31はシンボルを含む画像を撮像部21で取得する。また画像処理部33は、照明方向に応じてシンボルを含む画像を処理し、照明方向に基づき処理された画像を合成することにより、形状画像を生成する。 The lighting means 40 includes three or more lighting units 43 around the optical axis of the imaging unit 21. When the lighting control unit 32 lights three or more lighting units 43, the image pickup control unit 31 acquires an image including a symbol in the image pickup unit 21. Further, the image processing unit 33 generates a shape image by processing an image including a symbol according to the illumination direction and synthesizing the processed image based on the illumination direction.

画像処理部33は、シンボルの凹凸を示す形状画像として照度差ステレオ(フォトメトリックステレオ)の原理に基づく照度差ステレオ画像を合成する。これにより、照度差ステレオ法に基づき、読み取り対象のシンボルの凹凸形状を示した形状画像を、光学式情報読取装置100で簡便に撮像できる利点が得られる。照度差ステレオ法では、図4に示すように、ワークWKの同一の領域を同一の視点から、照明手段40の照明方向を変えながら、すなわち照明部43を切り替えながら複数の画像を撮像部21で撮影し、各画像に含まれる各位置の明るさの変化から、当該位置の面の傾きを推定する。この照度差ステレオ法を用いて、シンボルの形状を取得して読み取りを行う。 The image processing unit 33 synthesizes an illuminance difference stereo image based on the principle of illuminance difference stereo (photometric stereo) as a shape image showing the unevenness of the symbol. This has the advantage that the optical information reader 100 can easily capture a shape image showing the uneven shape of the symbol to be read based on the illuminance difference stereo method. In the illuminance difference stereo method, as shown in FIG. 4, a plurality of images are captured by the image pickup unit 21 while changing the illumination direction of the illumination means 40, that is, switching the illumination unit 43, from the same viewpoint in the same area of the work WK. A photograph is taken, and the inclination of the surface at the position is estimated from the change in the brightness of each position included in each image. Using this illuminance difference stereo method, the shape of the symbol is acquired and read.

照明制御部32は、照明手段40の点灯を制御する照明モードとして、照度差ステレオの原理に従い照明光を照射する照度差ステレオ照明モードに加えて、明視野観察や暗視野観察等、照明方向や照明パターンを変化させることが可能なマルチアングル照明モードを含むことができる。これにより、読み取り対象のシンボルに応じて、マルチアングル照明による画像と照度差ステレオ画像とを、一の光学式情報読取装置100で選択して読み取ることが可能となる。
(照明部43)
The illumination control unit 32 has, as an illumination mode for controlling the illumination of the illumination means 40, in addition to the illumination difference stereo illumination mode in which the illumination light is irradiated according to the principle of the illumination difference stereo, the illumination direction such as bright field observation and dark field observation, etc. It can include a multi-angle illumination mode that can change the illumination pattern. As a result, it is possible to select and read an image by multi-angle illumination and an illuminance difference stereo image by one optical information reading device 100 according to the symbol to be read.
(Lighting unit 43)

マルチアングル照明モードを含む場合、照明手段40は、照度差ステレオ照明用の照明部と、マルチアングル照明用の照明部とを個別に備えている。照明部43を構成する照明群は読取口13を囲むように二重に配置されている。内側に配置された第一照明群41がマルチアングル照明用照明を、外側に配置された第二照明群42が照度差ステレオ用照明を、それぞれ構成している。 When the multi-angle illumination mode is included, the illumination means 40 individually includes an illumination unit for illuminance difference stereo illumination and an illumination unit for multi-angle illumination. The lighting groups constituting the lighting unit 43 are doubly arranged so as to surround the reading port 13. The first illumination group 41 arranged inside constitutes the illumination for multi-angle illumination, and the second illumination group 42 arranged outside constitutes the illumination for illuminance difference stereo.

上述した筐体部10は、図3に示すように第一面1と、この第一面1と反対側の第二面2を有する。把持部14は、筐体部10に設けられている。また操作部54は、第二面2に設けられ、使用者から数字又は文字の入力を受け付ける操作キーを含む。一方、撮像部21は第一面1側に設けられている。撮像部21は光軸を有し、シンボルを含む画像を取得する。 As shown in FIG. 3, the housing portion 10 described above has a first surface 1 and a second surface 2 on the opposite side of the first surface 1. The grip portion 14 is provided on the housing portion 10. Further, the operation unit 54 is provided on the second surface 2 and includes an operation key for receiving input of a number or a character from the user. On the other hand, the imaging unit 21 is provided on the first surface 1 side. The imaging unit 21 has an optical axis and acquires an image including a symbol.

照明手段は、撮像部21の光軸の周囲に円環状又は矩形状に配置されている。この照明手段は、光源群と、反射部46と、同軸照明を備える。光源群は、第一面1側に設けられ、撮像部21の光軸の周囲に環状に配置されている。この光源群は、シンボルの周囲側から照明光をそれぞれ照射する。ここで光源群は、シンボルに対して、相対的に低い角度と、相対的に高い角度の少なくとも2種類以上の異なる天頂角から、それぞれ照明光を照射する。反射部46は、読取口13の内部で、撮像部21の光軸上に配置されて、この撮像部21への入射光を反射させる。同軸照明は、第一面1側に設けられている。この同軸照明は、撮像部21の光軸と同軸状に照明光を照射する。 The illumination means is arranged in an annular shape or a rectangular shape around the optical axis of the imaging unit 21. This illumination means includes a light source group, a reflection unit 46, and coaxial illumination. The light source group is provided on the first surface 1 side, and is arranged in an annular shape around the optical axis of the imaging unit 21. This light source group irradiates the illumination light from the peripheral side of the symbol. Here, the light source group irradiates the symbol with illumination light from at least two different zenith angles, one at a relatively low angle and the other at a relatively high angle. The reflecting unit 46 is arranged inside the reading port 13 on the optical axis of the imaging unit 21 to reflect the incident light on the imaging unit 21. The coaxial illumination is provided on the first surface 1 side. This coaxial illumination irradiates the illumination light coaxially with the optical axis of the imaging unit 21.

筐体部10には、読取口13が開口されている。読取口13は、円環状又は矩形状に配置された照明手段で画成されている。この読取口13は、撮像部21の光軸及び筐体部10から傾斜して開口されている。照明制御部32は、読取口13の周囲から、光源群を点灯させ、光源群の明視野照明光成分と暗視野照明光とを同時にシンボルに照射するよう制御する。また画像処理部33は、光源群から照明光を照射して撮像部21で撮像されたシンボルを含む画像を読み取る。表示部50は、筐体部10の第二面2に設けられている。この表示部50は、操作部54から入力された数字又は文字と、光源群が点灯した状態で撮像部21により得られたシンボルを含む画像を表示する。 A reading port 13 is opened in the housing portion 10. The reading port 13 is defined by lighting means arranged in an annular shape or a rectangular shape. The reading port 13 is opened at an angle from the optical axis of the imaging unit 21 and the housing unit 10. The illumination control unit 32 lights the light source group from the periphery of the reading port 13 and controls the symbol to be simultaneously irradiated with the bright-field illumination light component and the dark-field illumination light of the light source group. Further, the image processing unit 33 irradiates the illumination light from the light source group and reads the image including the symbol captured by the image pickup unit 21. The display unit 50 is provided on the second surface 2 of the housing unit 10. The display unit 50 displays an image including numbers or characters input from the operation unit 54 and symbols obtained by the image pickup unit 21 with the light source group lit.

照明モードの切り替えは、照明切替部で行う。照明切替部の一例として、照明切替画面のGUIを準備してもよい。照明切替画面では、ラジオボタンでマルチアングル照明、下方向照明、照度差ステレオ照明を選択できる。例えば照明Type1、照明Type2、照明Type3を選択可能とする。このような例では照明Type1をマルチアングル照明として、例えば読み取り対象のシンボルを付したワークが鋳肌のざらざらした金属のような場合に、背景部分となる金属表面を除去する場面に好適となる。また照明Type2を下方向照明として、金属やドットピーン等のワークに対して乱反射光で読み取るケースに好適となる。またType3を照度差ステレオ法に基づく照明として、照度差ステレオ処理の画像フィルタを利用して、ワークに刻印されたシンボルの凹凸を浮き上がらせる場合に好適となる。またType3では、凹文字に対応した照明モードと凸文字に対応した照明モードとを有している。
(照度差ステレオ法)
The lighting mode is switched by the lighting switching unit. As an example of the lighting switching unit, a GUI for the lighting switching screen may be prepared. On the lighting switching screen, you can select multi-angle lighting, downward lighting, or illuminance difference stereo lighting with the radio buttons. For example, lighting Type 1, lighting Type 2, and lighting Type 3 can be selected. In such an example, the illumination Type 1 is used as multi-angle illumination, and is suitable for a scene where the metal surface serving as a background portion is removed, for example, when the work with the symbol to be read is a rough metal of a casting surface. Further, it is suitable for a case where the illumination Type 2 is used as downward illumination and the workpiece such as metal or dot peen is read by diffusely reflected light. Further, it is suitable when Type 3 is used as the illumination based on the illuminance difference stereo method and the unevenness of the symbol engraved on the work is highlighted by using the image filter of the illuminance difference stereo processing. Further, Type 3 has a lighting mode corresponding to concave characters and a lighting mode corresponding to convex characters.
(Illuminance difference stereo method)

照度差ステレオ法(photometric stereo)とは、異なる複数の照明方向から照明した画像を撮像して、その陰影情報からワークの法線ベクトルを求める三次元計測の手法の一つである。このような照度差ステレオ法を用いた画像処理装置は、法線ベクトル(傾き画像に相当)からX軸やY軸の成分を輝度値に置き換えた画像や、反射率画像(アルベド画像に相当)を作成して、画像検査に応用している。従来の照度差ステレオ法では、撮像対象のワークに対して、異なる方向から照明光を照射した部分照明画像を複数枚撮像するため、複数方向からの照明を用意する必要があり、装置が大型化すること、またワークの位置と照明の位置を予め正確に規定する必要があり、設営に手間がかかる問題があった。また、撮像に際してはワークが静止した状態とする必要があり、撮像時に手ぶれさせないことが求められる。このように照度差ステレオ法は高さ情報が必要な画像検査に主に用いられており、光学式情報読取装置のような、シンボルの陰影の読み取りを目的とした機器には用いられていなかった。いいかえると、高さ情報が本来的に不要な機器では、そもそも高さ情報の取得に用いられる照度差ステレオ法を適用する理由もなかった。このような理由により、従来は小型で携行可能な光学式情報読取装置で、照度差ステレオ法が採用された例は存在していなかった。 The illuminance difference stereo method (photometric stereo) is one of three-dimensional measurement methods in which images illuminated from a plurality of different illumination directions are imaged and the normal vector of the work is obtained from the shadow information. An image processing device using such an illuminance difference stereo method is an image in which the components of the X-axis and Y-axis are replaced with luminance values from a normal vector (corresponding to a tilted image) and a reflectance image (corresponding to an albed image). Is created and applied to image inspection. In the conventional illuminance difference stereo method, since a plurality of partial illumination images irradiated with illumination light from different directions are captured for the workpiece to be imaged, it is necessary to prepare illuminations from multiple directions, and the device becomes large. In addition, it is necessary to accurately define the position of the work and the position of the lighting in advance, which causes a problem that it takes time and effort to set up. Further, it is necessary to keep the work stationary at the time of imaging, and it is required that the work is not shaken at the time of imaging. In this way, the illuminance difference stereo method is mainly used for image inspection that requires height information, and has not been used for devices such as optical information readers for the purpose of reading the shadow of a symbol. .. In other words, there was no reason to apply the illuminance difference stereo method used to acquire height information in devices that originally do not require height information. For this reason, there has been no conventional example of a compact and portable optical information reader in which the illuminance difference stereo method is adopted.

これに対し本実施形態に係る光学式情報読取装置100では、複数の照明部43を撮像部21の光軸の周囲に環状に配置した照明手段40を、筐体部10に組み込むことで、携行性を維持したまま、照度差ステレオ用の照明を構成している。 On the other hand, in the optical information reading device 100 according to the present embodiment, the lighting means 40 in which a plurality of lighting units 43 are arranged in an annular shape around the optical axis of the imaging unit 21 is carried in the housing unit 10. Illumination for illuminance difference stereo is configured while maintaining the characteristics.

また追加的な工夫として、ワークの撮像時に手ぶれを生じさせにくいよう、このような複数の照明部43で囲まれた読取口13を直接、ワークの表面に押し当てて撮像させることにより、撮像時に光学式情報読取装置100を固定し易くできる。 Further, as an additional device, the reading port 13 surrounded by the plurality of illumination units 43 is directly pressed against the surface of the work to image the work so as not to cause camera shake when the work is imaged. The optical information reading device 100 can be easily fixed.

加えて、撮像を短時間で行えるよう、露光時間を短くすることで、さらに撮像処理を高速化している。また、照明光の光量を増すことで、露光時間を短くしても十分な明るさの部分照明画像が得られる。 In addition, the imaging process is further speeded up by shortening the exposure time so that imaging can be performed in a short time. Further, by increasing the amount of illumination light, a partially illuminated image having sufficient brightness can be obtained even if the exposure time is shortened.

ここでは、照明部40を構成するLEDの駆動電流を増している。一般にLEDの駆動回路で定格電流に制限があり、駆動電流を大きくするには設計変更が必要となる。本実施形態においては、すべての照明部を点灯させた全照明で撮像した全照明画像を撮像可能としており、すべての照明部を同時に点灯させる電流を供給できるように設計されている。一方で部分照明画像の撮像に際しては、照明方向に応じたLEDのみを点灯させれば足りる。いいかえると、全照明画像の撮像時には他のLEDに供給される電流分も、部分照明画像の撮像時には点灯させるLEDに回すことが可能となる。この結果、全照明画像の撮像時よりも多くの電流値をLEDに供給できるので、その分、より光量の多い部分照明画像を撮像できるので、露光時間を短くすることが可能となる。 Here, the drive current of the LEDs constituting the illumination unit 40 is increased. Generally, the LED drive circuit has a limited rated current, and a design change is required to increase the drive current. In the present embodiment, it is possible to capture an all-illumination image captured by all the illuminations in which all the illuminations are turned on, and it is designed so that a current for lighting all the illuminations can be supplied at the same time. On the other hand, when capturing a partial illumination image, it is sufficient to turn on only the LED according to the illumination direction. In other words, the current supplied to the other LEDs when the full illumination image is captured can also be turned to the LED to be turned on when the partial illumination image is captured. As a result, since a larger current value can be supplied to the LED than when the entire illumination image is captured, a partial illumination image having a larger amount of light can be captured by that amount, and the exposure time can be shortened.

さらに、通常のシンボルの読み取りと比べて、前処理となる画像処理が煩雑な照度差ステレオ法を適用することで、処理時間が長くなる結果、シンボルの撮像(スキャン)から読み取り結果の出力(デコード)までの処理時間が長くなって応答性が低下する。そこで、近距離に置かれたワークに対してのみ行わせ、中距離や遠距離に置かれた通常のワークの読み取りにおいては、照度差ステレオ法による画像処理を行わないよう、距離に応じて照度差ステレオ法の実行を選択的に行わせることで、装置全体としてのレスポンスの低下を回避している。以下、各構成について詳述する。 Furthermore, by applying the illuminance difference stereo method, which requires more complicated image processing as preprocessing than normal symbol reading, the processing time becomes longer, and as a result, the symbol is captured (scanned) and the reading result is output (decoded). ) Will be long and the responsiveness will decrease. Therefore, it is performed only on the work placed at a short distance, and when reading a normal work placed at a medium distance or a long distance, the illuminance is adjusted according to the distance so that the image processing by the illuminance difference stereo method is not performed. By selectively executing the difference stereo method, a decrease in the response of the entire device is avoided. Hereinafter, each configuration will be described in detail.

なおこの例では、照度差ステレオ用の照明手段40として、図5に示す第二照明群42のように上方向照明部42a、下方向照明部42b、右方向照明部42d、左方向照明部42cを矩形状に配置した例を説明する。ただ本発明は、照明部を矩形状に配置する構成に限定せず、照度差ステレオ法を実現可能な他の照明部の配置パターンを適宜採用することができる。例えば照明手段を六角形状とする等、多角形状に配置してもよい。あるいは照明手段を円環状に配置してもよい。さらに環状に配置した照明手段は、4つに分割する構成に限られず、例えば5以上に分割してもよいし、あるいは3以下に分割してもよい。一般に照度差ステレオ法では最低3方向の照明が必要とされているところ、本実施形態においては、照明部の分割数の最小を2分割とする。例えば矩形状に配置した照明部を、隅部を挟んでL字状に連結し、左下と右上にそれぞれ配置する構成としてもよい。この例では、左下方向照明部と、右上方向照明部で照明手段を構成している。このような照明手段であれば、X方向成分、Y方向成分は、これら2枚の照明から得られる画像に含まれているので、同様の画像フィルタを用いることで、X方向、Y方向の傾き画像を取得できる。撮像部21内の撮像素子の画素の配列方向と、照明方向が対応すると照明に対応した画像の合成処理をし易いので好ましい。 In this example, as the illumination means 40 for the illuminance difference stereo, as in the second illumination group 42 shown in FIG. 5, the upward illumination unit 42a, the downward illumination unit 42b, the right illumination unit 42d, and the left illumination unit 42c Will be described as an example in which the above are arranged in a rectangular shape. However, the present invention is not limited to the configuration in which the illumination units are arranged in a rectangular shape, and an arrangement pattern of other illumination units capable of realizing the illuminance difference stereo method can be appropriately adopted. For example, the lighting means may be arranged in a polygonal shape such as a hexagonal shape. Alternatively, the lighting means may be arranged in an annular shape. Further, the lighting means arranged in a ring shape is not limited to the configuration of being divided into four, and may be divided into, for example, five or more, or may be divided into three or less. In general, the illuminance difference stereo method requires illumination in at least three directions, but in the present embodiment, the minimum number of divisions of the illumination unit is set to two. For example, the illumination units arranged in a rectangular shape may be connected in an L shape with the corners interposed therebetween and arranged in the lower left and upper right respectively. In this example, the lighting means is composed of the lower left lighting unit and the upper right lighting unit. With such an illumination means, the X-direction component and the Y-direction component are included in the image obtained from these two illuminations. Therefore, by using the same image filter, the inclination in the X-direction and the Y-direction can be achieved. You can get the image. It is preferable that the arrangement direction of the pixels of the image sensor in the image pickup unit 21 and the illumination direction correspond to each other because it is easy to synthesize an image corresponding to the illumination.

照明手段40は、照明部43を撮像部21の光軸の周囲に、円環状又は矩形状に複数の照明部43を配置している。この円環状又は矩形状に配置された複数の照明部43で囲まれた領域を、読取口13としている。
(読取支持部15)
The lighting means 40 arranges a plurality of lighting units 43 in an annular shape or a rectangular shape around the optical axis of the imaging unit 21. The area surrounded by the plurality of illumination units 43 arranged in an annular shape or a rectangular shape is referred to as a reading port 13.
(Reading support 15)

また読取口13には、図3に示すように読取支持部15を設けることが好ましい。読取支持部15は、読み取り対象のシンボルを含む読取対象物の表面に押し当てるための支点を少なくとも2点以上、読取口13の外側に、複数の照明部43よりも外部に突出させて形成している。支点は、読取口13の円環状の周又は矩形状の辺に形成することが好ましい。これにより、動きや手ぶれに弱いとされる照度差ステレオ法において、手持ち式の光学情報読取装置を用いつつ、これを物理的に支点を押し当てることで、手ぶれを防ぎ立体的なステレオ画像を取得し、読み取りを行うことが可能となる。なお支点は、必ずしも照明部よりも突出させる必要はなく、照明部と同一面状に形成することもできる。 Further, it is preferable that the reading port 13 is provided with a reading support portion 15 as shown in FIG. The reading support unit 15 is formed so that at least two or more fulcrums for pressing against the surface of the object to be read including the symbol to be read are projected to the outside of the reading port 13 and to the outside of the plurality of illumination units 43. ing. The fulcrum is preferably formed on the circumferential or rectangular side of the reading port 13. As a result, in the illuminance difference stereo method, which is said to be vulnerable to movement and camera shake, while using a hand-held optical information reader, the fulcrum is physically pressed against it to prevent camera shake and acquire a three-dimensional stereo image. And it becomes possible to read. The fulcrum does not necessarily have to protrude from the illumination unit, and may be formed in the same plane as the illumination unit.

なお、必ずしも読取支持部15をワークの表面に当接させることを要するものでなく、撮像するワークに応じて、手で把持したまま読取支持部をワークの表面に当接させることなく撮像や読み取りを行わせてもよい。例えばDPMでなくワークの表面に印刷されたシンボルやシール等で貼付されたシンボルを読み取る場合は、照度差ステレオ処理は不要であり、通常の読み取り動作で足りる。よってこの場合は、ワークの表面に押し当てる必要はない。また、読取口13の全面をワークに押し当てる他、2点のみで当接させる構成としてもよい。例えば使用者が光学式情報読取装置100を、2点を支点としてワークに押し当て、この2点を結ぶ直線と交差する方向への傾斜が生じ得る場合でも、一軸への傾斜であれば使用者が撮像の瞬間に傾斜しないように手で保持することも比較的容易であり、また一軸方向へのわずかな傾斜であれば、照度差ステレオ処理においても比較的影響が少ない状態として、十分な精度の読み取りが可能と考えられる。
(撮像シーケンス)
It is not always necessary to bring the reading support portion 15 into contact with the surface of the work, and depending on the work to be imaged, imaging or reading without bringing the reading support portion into contact with the surface of the work while being held by hand. May be done. For example, when reading a symbol printed on the surface of a work or a symbol attached with a sticker or the like instead of DPM, the illuminance difference stereo processing is not required, and a normal reading operation is sufficient. Therefore, in this case, it is not necessary to press it against the surface of the work. Further, the entire surface of the reading port 13 may be pressed against the work, or the reading port 13 may be brought into contact with only two points. For example, even if the user presses the optical information reader 100 against the work with two points as fulcrums and tilts in the direction intersecting the straight line connecting the two points, the user can tilt the optical information reader 100 to one axis. It is relatively easy to hold the camera by hand so that it does not tilt at the moment of imaging, and if the tilt is slight in the uniaxial direction, it is sufficiently accurate as a state in which there is relatively little effect on the illuminance difference stereo processing. Is considered to be readable.
(Imaging sequence)

次に、画像を撮像する撮像シーケンスを、図6のタイミングチャート及び図7、図8のフローチャートに基づいて説明する。ここでは、照度差ステレオ処理とライブビュー処理を並行して行っている。すなわち、照度差ステレオ処理によって部分照明画像を撮像して輪郭を抽出し、シンボルを読み取ってその結果を出力すると共に、ライブビュー処理によって、シンボルを含む画像を撮像して表示部50にリアルタイム画像として表示させている。
(照度差ステレオ処理)
Next, an imaging sequence for capturing an image will be described with reference to the timing chart of FIG. 6 and the flowcharts of FIGS. 7 and 8. Here, the illuminance difference stereo processing and the live view processing are performed in parallel. That is, the partial illumination image is imaged by the illuminance difference stereo processing to extract the contour, the symbol is read and the result is output, and the image including the symbol is imaged by the live view processing and displayed as a real-time image on the display unit 50. It is displayed.
(Illuminance difference stereo processing)

まず、照度差ステレオ処理を、図7のフローチャートに基づいて説明する。まず、ステップS701において、トリガスイッチを押下して、読み取り処理を開始する。これに従って、ステップS702において、異なる方向から照明された部分照明画像が複数枚、撮像される。ここでは、上下左右に配置された照明部43をそれぞれ点灯させるように照明制御部32で点灯制御され、図6に示すようにその照明タイミングに従って撮像部21で順に撮像を行う。4方向から順次照明が照射されて、4枚の部分照明画像が撮像される。 First, the illuminance difference stereo processing will be described based on the flowchart of FIG. First, in step S701, the trigger switch is pressed to start the reading process. Accordingly, in step S702, a plurality of partial illumination images illuminated from different directions are captured. Here, the lighting control unit 32 controls the lighting so as to light the lighting units 43 arranged vertically and horizontally, and as shown in FIG. 6, the imaging unit 21 sequentially performs imaging according to the lighting timing. Illumination is sequentially applied from four directions, and four partial illumination images are captured.

次にステップS703において、フィルタ処理を行う。ここでは、撮像した部分照明画像を用いて、照度差ステレオのフィルタ処理を行う。 Next, in step S703, the filtering process is performed. Here, the captured partial illumination image is used to filter the illuminance difference stereo.

次にステップS704において、デコード処理を行う。ここでは、フィルタ処理した画像を用いて、デコード処理を行う。 Next, in step S704, the decoding process is performed. Here, the decoding process is performed using the filtered image.

そしてステップS705において、デコード結果を取得する。さらにステップS706において、読み取り結果が成功か否かを判定し、成功の場合は読み取り処理を終了する。一方成功でない場合、すなわち失敗又は所定時間内に成功が通知されないタイムアウトの場合は、ステップS702に戻って処理を繰り返す。
(ライブビュー処理)
Then, in step S705, the decoding result is acquired. Further, in step S706, it is determined whether or not the reading result is successful, and if it is successful, the reading process is terminated. On the other hand, if it is not successful, that is, if it fails or the timeout is not notified of success within a predetermined time, the process returns to step S702 and the process is repeated.
(Live view processing)

一方で、照度差ステレオ処理でフィルタ処理やデコード処理を実施している間に、ライブビュー処理を行う。ライブビュー処理では、照明部43をすべて点灯させた全照明で撮像した画像を、表示部50に表示させると共に、動画像のようにリアルタイムに表示内容を更新させる。この手順を、図8のフローチャートに基づいて説明する。まず、ステップS801において、トリガスイッチを押下する。これはステップS701と共通である。次にステップS802において、すべての照明部43を点灯させた全照明画像を撮像する。そしてステップS803において、全照明画像を表示部50に表示させる。さらにステップS804において、一定時間スリープ処理を行う。次にステップS805において、読み取りが成功したか否かを判定し、成功の場合は処理を終了する。一方、失敗又はタイムアウトの場合は、ステップS802に戻り、処理を繰り返す。このステップS805は、上述したステップS706と共通であり、シンボルの読み取りが終了した場合はライブビュー処理も終了し、読み取りが失敗等の場合は、ライブビュー処理も継続させる。
ここでライブビュー用の全照明画像の撮像は、照度差ステレオ処理におけるフィルタ処理やデコード処理とは非同期で、周期的に行う。ただし、撮像処理を重複させないよう、撮像部21が部分照明画像を撮像していない間に、全照明画像を撮像させる。なお図6の例では、4枚の部分照明画像を撮像する間に、2枚の全照明画像を撮像しているが、1枚としてもよいし、3枚以上としてもよい。全照明画像の撮像枚数は、ライブビュー画像に要求されるフレームレートや演算部30の処理能力に応じて決定される。例えば、リアルタイム性を持たせるために、10fps以上で全照明画像を更新する。
(ライブビュー画像)
On the other hand, the live view process is performed while the filter process and the decode process are performed in the illuminance difference stereo process. In the live view process, the image captured by all the illuminations in which all the illumination units 43 are turned on is displayed on the display unit 50, and the display contents are updated in real time like a moving image. This procedure will be described with reference to the flowchart of FIG. First, in step S801, the trigger switch is pressed. This is common with step S701. Next, in step S802, an all-illumination image in which all the illumination units 43 are turned on is captured. Then, in step S803, all the illumination images are displayed on the display unit 50. Further, in step S804, the sleep process is performed for a certain period of time. Next, in step S805, it is determined whether or not the reading is successful, and if it is successful, the process is terminated. On the other hand, in the case of failure or timeout, the process returns to step S802 and the process is repeated. This step S805 is common to the above-mentioned step S706, and when the reading of the symbol is completed, the live view processing is also finished, and when the reading is unsuccessful, the live view processing is also continued.
Here, the imaging of the full illumination image for live view is performed periodically, asynchronously with the filter processing and the decoding processing in the illuminance difference stereo processing. However, in order not to duplicate the imaging process, the full illumination image is captured while the imaging unit 21 is not capturing the partial illumination image. In the example of FIG. 6, while two partial illumination images are captured, two full illumination images are captured, but the number may be one or three or more. The number of captured images of all illuminated images is determined according to the frame rate required for the live view image and the processing capacity of the calculation unit 30. For example, in order to have real-time performance, the entire illumination image is updated at 10 fps or more.
(Live view image)

このように、フィルタ処理やデコード処理を行う間に、ライブビュー画像を表示させる。その理由は、照度差ステレオ処理でシンボルの撮像を行う際には、光学式情報読取装置100をシンボルを表示させたワークに覆い被せるようにして撮像するため、使用者がシンボルを目視できなくなるためである。 In this way, the live view image is displayed during the filtering process and the decoding process. The reason is that when the symbol is imaged by the illuminance difference stereo processing, the optical information reading device 100 is covered with the work on which the symbol is displayed for imaging, so that the user cannot see the symbol visually. Is.

図9Aに示すように、ワークWKの表面にDPMによって形成されたシンボルSBを照度差ステレオ処理で読み取る場合を考える。ここで、照度差ステレオ用の最適な撮像を行うためには、光学式情報読取装置100をシンボルSBに対して近距離に近づける必要がある。その際、図9Bに示すようにエイミングモジュール60から出るエイミング光が光学式情報読取装置100の読取口13の陰に入ってしまい、使用者からエイミング位置APが見えなくなってしまう。このままでは、正しくシンボルSBを撮像できる位置に光学式情報読取装置100を配置できているのかを使用者が確認しづらくなる。そこで、ライブビュー処理により表示部50にライブビュー画像をリアルタイムで表示させることにより、使用者は表示部50に表示された画像を参照しながら、位置合わせができるようにしている。ここでライブビュー画像には、全ての照明部43を点灯させた全照明画像を表示することが好ましい。照度差ステレオ処理で用いる部分照明画像では、照明方向が限られているため、シンボルSBの全体像の確認には不向きなことが考えられる。また形状画像では、後述する通り画像の内縦方向を部分的に限定して画像処理しているので視野が狭くなり、位置合わせに使いづらい。よってこれらの画像を利用せず、別途、全照明画像を撮像してリアルタイムに更新するようにしている。特に、全ての照明方向の照明部43を点灯させた画像を用いることで、実際のワークWKの様子を確認し易くなり、見た目で位置合わせができる。 As shown in FIG. 9A, consider a case where the symbol SB formed by DPM on the surface of the work WK is read by illuminance difference stereo processing. Here, in order to perform optimum imaging for illuminance difference stereo, it is necessary to bring the optical information reader 100 closer to the symbol SB. At that time, as shown in FIG. 9B, the aiming light emitted from the aiming module 60 enters the shadow of the reading port 13 of the optical information reading device 100, and the aiming position AP cannot be seen by the user. If nothing is done, it will be difficult for the user to confirm whether the optical information reading device 100 can be arranged at a position where the symbol SB can be correctly imaged. Therefore, by displaying the live view image on the display unit 50 in real time by the live view processing, the user can perform the alignment while referring to the image displayed on the display unit 50. Here, in the live view image, it is preferable to display a full illumination image in which all the illumination units 43 are turned on. Since the partial illumination image used in the illuminance difference stereo processing has a limited illumination direction, it may be unsuitable for confirming the entire image of the symbol SB. Further, in the shape image, as will be described later, since the image processing is performed by partially limiting the inner vertical direction of the image, the field of view is narrowed and it is difficult to use for alignment. Therefore, instead of using these images, all the illumination images are separately captured and updated in real time. In particular, by using an image in which the illumination units 43 in all the illumination directions are turned on, it becomes easy to confirm the actual state of the work WK, and the alignment can be visually aligned.

リアルタイム画像を表示させる表示部50は、リアルタイム画像を表示するリアルタイム画像表示領域を設けることができる。これにより、筐体部10に設けた撮像部21の位置に合わせてリアルタイム画像を表示させることで、図9Bに示すようにシンボルSBに被せるように光学式情報読取装置100を構えた場合でも、使用者に対して感覚的に光学式情報読取装置100を透過させてシンボルSBを視認しているように提示させることができ、直感的な把握が容易となって操作性がよくなる。
(照度差ステレオ処理でシンボルの輪郭を抽出する手順)
The display unit 50 for displaying a real-time image can be provided with a real-time image display area for displaying the real-time image. As a result, by displaying the real-time image in accordance with the position of the imaging unit 21 provided in the housing unit 10, even when the optical information reading device 100 is held so as to cover the symbol SB as shown in FIG. 9B. The user can be made to sensuously pass through the optical information reading device 100 and present the symbol SB as if he / she is visually recognizing it, which facilitates intuitive grasping and improves operability.
(Procedure to extract the outline of the symbol by illuminance difference stereo processing)

画像処理部33は、照度差ステレオ処理により、画像中からシンボルを抽出すると共に、復号化を行う。この照度差ステレオ法を用いて、シンボルを構成する要素CLの輪郭を抽出する手順の一例を、図10〜図16に基づいて説明する。ここで、シンボルを構成する要素CLとは、例えば、読み取り対象のシンボルがQRコードの場合は、QRコードを構成する一セル、バーコードの場合は一バー、文字列の場合は各文字が、それぞれ該当する。 The image processing unit 33 extracts a symbol from the image and decodes it by illuminance difference stereo processing. An example of a procedure for extracting the contour of the element CL constituting the symbol by using this illuminance difference stereo method will be described with reference to FIGS. 10 to 16. Here, the element CL constituting the symbol is, for example, one cell constituting the QR code when the symbol to be read is a QR code, one bar when it is a barcode, and each character when it is a character string. Each applies.

照度差ステレオ処理では、上述の通り照明方向を変えた場合の明るさの変化から、傾きを推定している。この処理では明るさを利用することから、照明により影CSが生じると、傾きを誤って推定する原因となる。ただし本実施形態においては、誤った傾きの結果を逆手にとって、要素CLの輪郭を抽出している。
(物体の輪郭が凸として出る原理)
In the illuminance difference stereo processing, the inclination is estimated from the change in brightness when the illumination direction is changed as described above. Since brightness is used in this process, if shadow CS is generated by lighting, it causes an erroneous estimation of the inclination. However, in the present embodiment, the outline of the element CL is extracted by taking advantage of the result of the wrong inclination.
(Principle that the outline of an object appears as a convex)

形状画像に、要素CLの輪郭が凸として現れるのは、以下の手順による。
(1)影CSによる影響で、傾き画像にステップ変化が現れる。
(2)形状画像内部の差分計算によって、凸と認識される。
以下、これらを順次説明する。
(1:影CSによる影響で、傾き画像にステップ変化が現れる)
The outline of the element CL appears as a convex in the shape image according to the following procedure.
(1) Due to the influence of the shadow CS, a step change appears in the tilted image.
(2) It is recognized as convex by the difference calculation inside the shape image.
Hereinafter, these will be described in order.
(1: Step change appears in the tilt image due to the influence of shadow CS)

ここでは説明を簡単にするため、X方向の傾きのみを扱う。読み取り対象のシンボルを構成する要素CLとして、図10に示すような断面視四角形を考える。このような要素CLに対して、左側から照明を当てた画像を上から見た図は、図11のようになる。また、右側から照明を当てた画像は、図12のようになる。これらの画像に対して、照度差ステレオ処理によって得られた傾き画像のプロファイルは、図13で示すようになる。ここでは、X方向の傾きの推定結果を、矢印で示している。この図において破線で囲んだ領域では、傾き画像のプロファイルが影CSの影響で正確に得られていないことが判る。
(2:形状画像内部の差分計算によって、凸と認識される)
Here, for the sake of simplicity, only the inclination in the X direction is dealt with. As the element CL constituting the symbol to be read, consider a cross-sectional view quadrangle as shown in FIG. An image of such an element CL illuminated from the left side as viewed from above is as shown in FIG. An image illuminated from the right side is as shown in FIG. The profile of the tilted image obtained by the illuminance difference stereo processing with respect to these images is as shown in FIG. Here, the estimation result of the inclination in the X direction is indicated by an arrow. In the area surrounded by the broken line in this figure, it can be seen that the profile of the tilted image is not accurately obtained due to the influence of the shadow CS.
(2: Recognized as convex by the difference calculation inside the shape image)

次に、このような傾き画像に現れる影CSの影響について検討する。読み取り対象のシンボルを含む画像に対して、細かな凸凹を得る積み上げ計算は、傾き画像での微分処理となる。すなわち、傾き画像の各画素の法線ベクトルに対して、X方向に微分処理を施し、表面の傾きの輪郭を示す輪郭画像を生成する。ここで、図13の傾き画像に対して微分処理を施し、得られた輪郭画像を図14に示す。この輪郭画像において、輪郭OLは白線で、影CSの終わりの部分ESは黒線で、それぞれ表れている。また平坦な面FSの階調値は128となる。 Next, the influence of the shadow CS appearing on such a tilted image will be examined. The stacking calculation for obtaining fine irregularities with respect to the image including the symbol to be read is the differential processing on the tilted image. That is, the normal vector of each pixel of the tilted image is subjected to differential processing in the X direction to generate a contour image showing the contour of the tilted surface. Here, the tilt image of FIG. 13 is subjected to differential processing, and the obtained contour image is shown in FIG. In this contour image, the contour OL is represented by a white line, and the end portion ES of the shadow CS is represented by a black line. The gradation value of the flat surface FS is 128.

ここまではX方向のみについて説明したが、実際の形状画像ではX方向とY方向の両方向に処理される。そこで、X方向とY方向の両方で処理を行った輪郭画像を、図15に示す。ここで、影CSの終わりの部分はシンボルの読み取りにおいては必要ないため、レベル調整で影CSの終わりの部分を見えなくする。この結果、図16に示すように、要素CLの輪郭OLのみの形状画像を生成できる。
(画像処理範囲の制限機能)
Up to this point, only the X direction has been described, but in the actual shape image, processing is performed in both the X direction and the Y direction. Therefore, FIG. 15 shows a contour image processed in both the X direction and the Y direction. Here, since the end portion of the shadow CS is not necessary for reading the symbol, the end portion of the shadow CS is made invisible by adjusting the level. As a result, as shown in FIG. 16, a shape image of only the contour OL of the element CL can be generated.
(Image processing range limiting function)

読出部34は、撮像部21の撮像領域のうち、撮像領域の上端及び下端から所定の幅の撮像領域については、読み取りの対象から外し、撮像領域の中央領域を、読み取り対象とするようにしてもよい。これにより、読み取り処理は制限することで処理時間を高速化しつつ、表示自体は広い視野を確保して見易くすることにより、使用者の利便性を向上できる。 Of the imaging region of the imaging unit 21, the reading unit 34 excludes the imaging region having a predetermined width from the upper end and the lower end of the imaging region from the reading target, and sets the central region of the imaging region as the reading target. May be good. As a result, the convenience of the user can be improved by limiting the reading process to speed up the processing time and ensuring a wide field of view for the display itself to make it easier to see.

一方で表示部50は、読出部34により読み取り対象から外した領域も含めて画像を表示するようにしてもよい。これにより、光学式情報読取装置100の内部処理では、画像の一部を除去して高速化を図りつつ、使用者に対して表示部50上で画像を表示させる際には、画像処理では除かれた領域も含めた画像の全体像を表示させることで、視認性を高めている。 On the other hand, the display unit 50 may display the image including the area excluded from the reading target by the reading unit 34. As a result, in the internal processing of the optical information reading device 100, a part of the image is removed to increase the speed, and when the image is displayed on the display unit 50 by the user, the image processing removes the image. Visibility is improved by displaying the entire image including the blurred area.

例えばデコード処理が文字列のOCRの場合、文字列は一般に横方向に書かれているので、画像の縦方向に領域を限定しても、言い換えると横書きの文字列の上下を画像処理の対象から排除しても、文字列の領域に対しては適切にフィルタ処理を行える。また、画像処理の対象領域を制限したことで、処理の簡素化、高速化が図られる。また、画像処理に先立ち、シンボルの領域のみを画像中から抽出して、抽出された領域のみを画像処理の対象としてもよい。この方法であれば、さらに文字列の左右に存在する、読み取りに不要な領域も排除されるため、一層の高速化が図られる。
(照度差ステレオ処理の自動ON/OFF機能)
For example, when the decoding process is OCR of a character string, the character string is generally written in the horizontal direction, so even if the area is limited in the vertical direction of the image, in other words, the top and bottom of the horizontally written character string are processed from the target of the image processing. Even if it is excluded, the character string area can be appropriately filtered. Further, by limiting the target area of image processing, the processing can be simplified and speeded up. Further, prior to the image processing, only the symbol area may be extracted from the image, and only the extracted area may be the target of the image processing. With this method, the areas on the left and right of the character string that are unnecessary for reading are also eliminated, so that the speed can be further increased.
(Automatic ON / OFF function for illuminance difference stereo processing)

画像処理部33は、照度差ステレオ処理を常時適用するのでなく、必要なときにのみ適用するように構成してもよい。いいかえると、読み取り対象のシンボルに応じて、DPMされたシンボルのような凹凸形状が含まれる場合に照度差ステレオ処理を実行させ、一方で印刷されたシンボル等、平面状のシンボルの場合には、通常の照明により反射光の濃淡を検出してシンボルの読み取りを行うようにしてもよい。 The image processing unit 33 may be configured to apply the illuminance difference stereo processing only when necessary, instead of always applying it. In other words, depending on the symbol to be read, the illuminance difference stereo processing is executed when a concave-convex shape such as a DPM symbol is included, while in the case of a flat symbol such as a printed symbol, The symbol may be read by detecting the shade of the reflected light by ordinary lighting.

具体的には、読み取り対象のシンボルと光学式情報読取装置100とのワーキングディスタンスに基づいて、照度差ステレオ法に基づく画像処理の実行のON/OFFを切り替えることが好ましい。具体的には、ワーキングディスタンスが所定値以下の場合に、照度差ステレオ画像の合成処理を実行する。一方、ワーキングディスタンスが所定値以上の場合には、照度差ステレオ画像の合成処理をOFFする。これによって、照度差ステレオ法に基づく重い画像処理を必要時にのみ実行させることで、処理時間の短縮を図ることができる。すなわち、照度差ステレオ法では照明方向の異なる画像を複数枚撮像し、これらから傾き画像やアルベド画像を生成する必要があり、物理的な撮像時間や撮像した画像の処理に時間を要する。このため、光学式情報読取装置100でシンボルを撮像して復号した結果を出力するまでの応答時間が長くなって、レスポンスの低下が懸念される。一方で、照度差ステレオ法を用いた撮像を行う際には、ワークの表面に読取口13を押しつける作業が必要となる。いいかえると、ワーキングディスタンスが短い場合に照度差ステレオ法を適用する必要が生じ、逆に、ワーキングディスタンスが長い場合には通常の照明(マルチアングル照明)でシンボルの読み取りには足りる。そこで、ワーキングディスタンスが長い場合には、照度差ステレオ法に基づく撮像から画像処理までの一連の処理(以下、「照度差ステレオ処理」という)をOFFとすることで、処理時間を短縮してレスポンスの低下を抑制できる。 Specifically, it is preferable to switch ON / OFF of the execution of image processing based on the illuminance difference stereo method based on the working distance between the symbol to be read and the optical information reading device 100. Specifically, when the working distance is equal to or less than a predetermined value, the illuminance difference stereo image compositing process is executed. On the other hand, when the working distance is equal to or greater than a predetermined value, the illuminance difference stereo image compositing process is turned off. As a result, the processing time can be shortened by executing heavy image processing based on the illuminance difference stereo method only when necessary. That is, in the illuminance difference stereo method, it is necessary to capture a plurality of images having different illumination directions and generate a tilt image or an albedo image from these images, which requires a physical imaging time and processing of the captured images. Therefore, the response time until the symbol is imaged and decoded by the optical information reader 100 and the result of decoding is output becomes long, and there is a concern that the response may be deteriorated. On the other hand, when performing imaging using the illuminance difference stereo method, it is necessary to press the reading port 13 against the surface of the work. In other words, when the working distance is short, it becomes necessary to apply the illuminance difference stereo method, and conversely, when the working distance is long, normal lighting (multi-angle lighting) is sufficient for reading the symbol. Therefore, when the working distance is long, a series of processing from imaging to image processing based on the illuminance difference stereo method (hereinafter referred to as "illuminance difference stereo processing") is turned off to shorten the processing time and respond. Can be suppressed.

ワーキングディスタンスに基づいた照度差ステレオ処理のON/OFFは、自動で切り替えるようにすることが好ましい。これにより、使用者はワーキングディスタンスに応じて一々照度差ステレオ処理のON/OFFを切り替えるという煩わしい操作を省き、使い勝手のよい操作環境が得られる。照度差ステレオ処理の自動ON/OFFを実現するため、読み取り対象のシンボルと光学式情報読取装置100とのワーキングディスタンスを測定する距離測定部を備えている。距離測定部としては、光電センサ等の測距センサ等が利用できる。例えば撮像部21に隣接してエイミングモジュールを設け、エイミングモジュールが発するエイミング光の位置でもって、ワーキングディスタンスを判別するように構成してもよい。すなわち、エイミング位置APは、ワーキングディスタンスが近いときは、本来の位置よりも若干左側に移動し、ワーキングディスタンスが遠くなると、右側に移動していく。この現象を利用し、三角測距でワーキングディスタンスを測定している。照度差ステレオ処理をONさせるワーキングディスタンスのしきい値としては、例えば50mm〜70mm等とする。 It is preferable to automatically switch ON / OFF of the illuminance difference stereo processing based on the working distance. As a result, the user can eliminate the troublesome operation of switching ON / OFF of the illuminance difference stereo processing one by one according to the working distance, and can obtain an easy-to-use operating environment. In order to realize automatic ON / OFF of the illuminance difference stereo processing, a distance measuring unit for measuring the working distance between the symbol to be read and the optical information reading device 100 is provided. As the distance measuring unit, a distance measuring sensor such as a photoelectric sensor can be used. For example, an aiming module may be provided adjacent to the imaging unit 21 so as to determine the working distance based on the position of the aiming light emitted by the aiming module. That is, the aiming position AP moves slightly to the left of the original position when the working distance is close, and moves to the right when the working distance is far. Utilizing this phenomenon, the working distance is measured by triangular ranging. The threshold value of the working distance for turning on the illuminance difference stereo processing is, for example, 50 mm to 70 mm.

また、照明手段40で照明を行う際の照明条件や、撮像部21で撮像を行う際の撮影条件(本明細書においては照明条件と撮影条件をまとめて撮像条件と呼ぶことがある。)は、ワーキングディスタンスに応じて変化させてもよい。ここで照明条件を規定する照明パラメータには、例えば照明方向、すなわちどの照明部43をONして、どの照明部43をOFFさせるかの点灯パターン、各照明部43の光量、すなわちLEDの駆動電流、あるいは何秒間点灯させるかを示す点灯時間等が挙げられる。また撮影条件を規定する撮像パラメータとしては、CMOSの露光時間やゲイン等が挙げられる。さらに、ワーキングディスタンスに応じて照明条件や撮影条件を変化させる場合は、近距離用と長距離用の二種類のパラメータセットを予め用意する他、近距離用、中距離用、長距離用の三種類のパラメータセットを予め用意してもよいし、4種類以上としてもよい。この例では、近距離用、中距離用、長距離用の三種類のパラメータセットを予め用意している。そして、ワーキングディスタンスに応じて、デフォルトのパラメータセットが選択され、選択された照明条件及び撮影条件で画像が撮像され、読み取りが行われる。読み取りに失敗した場合は、別のパラメータセットが順次選択され、読み取りが成功するまで撮像と画像処理が行われる。 Further, the illumination conditions when the illumination means 40 illuminates and the imaging conditions when the imaging unit 21 performs imaging (in the present specification, the illumination conditions and the imaging conditions may be collectively referred to as imaging conditions). , May be changed according to the working distance. Here, the lighting parameters that define the lighting conditions include, for example, the lighting direction, that is, the lighting pattern of which lighting unit 43 is turned on and which lighting unit 43 is turned off, the amount of light of each lighting unit 43, that is, the driving current of the LED. , Or the lighting time indicating how many seconds the lamp is lit. Further, as the imaging parameters that define the imaging conditions, CMOS exposure time, gain, and the like can be mentioned. Furthermore, when changing the lighting conditions and shooting conditions according to the working distance, two types of parameter sets, one for short distance and one for long distance, are prepared in advance, and three for short distance, medium distance, and long distance. A type of parameter set may be prepared in advance, or four or more types may be prepared. In this example, three types of parameter sets for short distance, medium distance, and long distance are prepared in advance. Then, a default parameter set is selected according to the working distance, and an image is imaged and read under the selected lighting conditions and shooting conditions. If the reading fails, another parameter set is sequentially selected and imaging and image processing are performed until the reading is successful.

一方で、ワーキングディスタンスの測定に失敗した場合、すなわちワーキングディスタンスが不明の場合には、所定の順序でパラメータセットを切り替えて読み取りを行う。例えば、まず近距離用のパラメータセット、すなわち照度差ステレオ処理を含む撮像と画像処理を行う。読み取りが成功した場合は処理を終了し、失敗した場合は中距離用のパラメータセットに切り替えて、すなわち照度差ステレオ処理を省いた読み取りを行い、さらに失敗した場合は長距離用のパラメータセットに切り替えて同様に読み取りを行う。 On the other hand, when the measurement of the working distance fails, that is, when the working distance is unknown, the parameter set is switched in a predetermined order to read. For example, first, a parameter set for a short distance, that is, imaging and image processing including illuminance difference stereo processing are performed. If the reading succeeds, the process ends, if it fails, the parameter set for medium distance is switched to, that is, the reading without the illumination difference stereo processing is performed, and if the reading fails, the parameter set for long distance is switched to. And read in the same way.

さらに照度差ステレオ処理の実行に際しても、条件の異なる撮像条件を予め複数用意して、これらを順次切り替えて撮像処理及び読取処理を行うように構成してもよい。例えば照明制御部32で、読み取り対象のシンボルの文字サイズ、又はシンボルのドットサイズに関するパラメータである特徴サイズと、シンボルの凹凸の反転とを少なくとも含む第二照明群42に係る調整パラメータを変化させて、照明手段40の点灯を制御する。画像処理部33は、照明手段40により照明光の制御された複数の画像の各デコード結果に基づいて、調整するパラメータを決定する。このように撮像条件として、特徴レベル、オフセット、ノイズレベル等のパラメータを変更することができる。また、撮像した画像の評価結果に基づいて、これらのパラメータを自動で調整することにより、使用者はパラメータの設定といった面倒な作業を意識することなく、シンボルの読み取りを状況に応じて自動で設定を変更させた状態で読み取ることが可能となる。 Further, when executing the illuminance difference stereo processing, a plurality of imaging conditions having different conditions may be prepared in advance, and these may be sequentially switched to perform the imaging processing and the reading processing. For example, the illumination control unit 32 changes the adjustment parameter related to the second illumination group 42 including at least the feature size, which is a parameter related to the character size of the symbol to be read or the dot size of the symbol, and the inversion of the unevenness of the symbol. , Controls the lighting of the lighting means 40. The image processing unit 33 determines the parameters to be adjusted based on the decoding results of the plurality of images whose illumination light is controlled by the illumination means 40. In this way, parameters such as feature level, offset, and noise level can be changed as imaging conditions. In addition, by automatically adjusting these parameters based on the evaluation results of the captured image, the user automatically sets the reading of the symbol according to the situation without being aware of the troublesome work such as setting the parameters. Can be read with the changed state.

例えば、読み取り対象のシンボルが凸文字か凹文字か、太字か細字かの4つの組み合わせに応じて、予め照明部43の照明条件及び撮像部21の撮影条件を変化させた4組のパラメータセットを準備しておく。すなわち、凸文字かつ太字、凸文字かつ細字、凹文字かつ太字、凹文字かつ細字の組み合わせとする。ここで、シンボルが凹文字か凸文字かについては、パラメータセットとして二値化するしきい値を変化させる。またシンボルが太字か細字かについては、パラメータセットとして抽出する画像周波数成分を変化させる。なお、シンボルは文字列に限らず、QRコードのような二次元コードやバーコードといったコードも対象としているが、凹又は凸、細かい又は粗いケースを判り易く表現するため、ここでは凸「文字」や太「字」と表現している。そして、これらのパラメータセット毎に、順次照明制御部32及び撮像制御部31を制御して部分照明画像を4枚撮像して形状画像を生成し、読み取り処理を行っていく。そして、計4枚の形状画像の読み取りを順次行う過程で、何れかの形状画像でシンボルの読み取りに成功した時点で、読取結果を出力すると共に読取処理を終了する。これにより、利用者は特段の設定を行うことなく、DPMのような従来読み取りが困難であったシンボルであっても、通常のシンボルと同様に読み取りを行えるようになる。 For example, four sets of parameter sets in which the lighting conditions of the lighting unit 43 and the shooting conditions of the imaging unit 21 are changed in advance according to the four combinations of whether the symbol to be read is convex or concave, bold or fine, are set. Be prepared. That is, it is a combination of convex characters and bold characters, convex characters and fine characters, concave characters and bold characters, and concave characters and fine characters. Here, regarding whether the symbol is a concave character or a convex character, the threshold value for binarization is changed as a parameter set. As for whether the symbol is bold or fine, the image frequency component extracted as a parameter set is changed. The symbol is not limited to a character string, but a code such as a two-dimensional code such as a QR code or a barcode is also targeted. However, in order to express a concave or convex, fine or rough case in an easy-to-understand manner, a convex "character" is used here. It is expressed as a thick "character". Then, for each of these parameter sets, the illumination control unit 32 and the imaging control unit 31 are sequentially controlled to capture four partial illumination images to generate a shape image, and the reading process is performed. Then, in the process of sequentially reading a total of four shape images, when the symbol is successfully read in any of the shape images, the reading result is output and the reading process is terminated. As a result, the user can read a symbol such as DPM, which has been difficult to read in the past, in the same manner as a normal symbol without making any special setting.

なお、上記構成に限らず、例えば4枚の形状画像を順次生成して、各形状画像の評価を行い、最も評価値の高い形状画像を選択して、読取結果として出力するように構成してもよい。また、このように4つのパラメータセットを順に振ることで、読み取りができるパラメータを自動で探索するように構成してもよい。さらに、演算部30にマルチコアのCPU等を用いてデコード処理させる際には、1コアは凹側の処理(フィルタ処理及びデコード処理)、別の1コアに凸側の処理を行わせるように、処理毎にコアを割り当ててもよい。この場合は、各コアの結果を受けて、読み取りの信頼度が高い方の読み取り結果をデコード結果として出力する。特にフィルタ処理には背景ノイズが載り易いため、複数のフィルタ条件を試して、信頼度の高い結果を選定することで、信頼性が高められる。
(演算部30の一例)
Not limited to the above configuration, for example, four shape images are sequentially generated, each shape image is evaluated, the shape image having the highest evaluation value is selected, and the shape image is output as a reading result. May be good. Further, by shaking the four parameter sets in order in this way, a parameter that can be read may be automatically searched for. Further, when the arithmetic unit 30 is subjected to decoding processing using a multi-core CPU or the like, one core is subjected to concave processing (filter processing and decoding processing), and another one core is subjected to convex processing. A core may be assigned for each process. In this case, the result of each core is received, and the read result having the higher read reliability is output as the decode result. In particular, background noise is likely to appear in the filter processing, so reliability can be improved by trying multiple filter conditions and selecting highly reliable results.
(Example of calculation unit 30)

図3の演算部30の一例を、図17のブロック図に示す。この図に示す演算部30は、撮像制御部31と、照明制御部32と、画像処理部33と、読出部34を含む。画像処理部33は、法線ベクトル導出部33aと、凹凸判定部33bと、読取用画像生成部33cの機能を実現する。 An example of the calculation unit 30 of FIG. 3 is shown in the block diagram of FIG. The calculation unit 30 shown in this figure includes an image pickup control unit 31, a lighting control unit 32, an image processing unit 33, and a reading unit 34. The image processing unit 33 realizes the functions of the normal vector derivation unit 33a, the unevenness determination unit 33b, and the reading image generation unit 33c.

従来、DPM等によりワーク表面に成形された凹凸形状を有する文字列の読み取りにおいては、読み取り対象の文字列が凹文字の場合と、凸文字の場合とで、それぞれ読取アルゴリズム等の読み取りの設定を異ならせた上で、読み取りを実行していた。この方法では、文字列の読み取り前に予め、文字列の凹凸の種別を設定する必要があり、手間が掛かる上、文字列の凹凸が変更されると、これに応じて読取側の設定も変更しなければならない。また、このような凹凸別の設定を行わない場合や、読み取り対象の文字列が凹文字か凸文字かが事前に判明していない場合は、まず凹文字専用の読取アルゴリズムと、凸文字専用の読取アルゴリズムのどちらか一方で読み取りを行い、意味のある文字列を認識できない場合には、他方のアルゴリズムで読み取りを行っていたが、この方法では読み取りに本来の2倍の時間を要するという問題があった。 Conventionally, in reading a character string having an uneven shape formed on the work surface by DPM or the like, the reading setting such as the reading algorithm is set depending on whether the character string to be read is a concave character or a convex character. I was doing a read after making it different. In this method, it is necessary to set the type of unevenness of the character string in advance before reading the character string, which takes time and effort, and when the unevenness of the character string is changed, the setting on the reading side is also changed accordingly. Must. In addition, if such settings for unevenness are not made, or if it is not known in advance whether the character string to be read is concave or convex, first a reading algorithm dedicated to concave characters and a reading algorithm dedicated to convex characters are used. If one of the reading algorithms is used to read and a meaningful character string cannot be recognized, the other algorithm is used for reading, but this method has the problem that it takes twice as long to read as it should. there were.

これに対し本実施形態に係る光学式情報読取装置100では、文字列の読み取りを行う前に、文字列が凹文字であるか凸文字であるかを自動で判定し、判定結果に基づいて文字列が読み取りやすくなるように画像処理を行った後に、判定結果に応じたアルゴリズムで文字列を読み取っている。
(法線ベクトル導出部33a)
On the other hand, in the optical information reading device 100 according to the present embodiment, before reading the character string, it is automatically determined whether the character string is a concave character or a convex character, and the character is based on the determination result. After performing image processing so that the columns are easy to read, the character strings are read by an algorithm according to the judgment result.
(Normal vector derivation unit 33a)

法線ベクトル導出部33aは、撮像部21により生成された複数の輝度画像に基づいて、照度差ステレオの原理により読取対象物の表面の法線ベクトルを求めるための部材である。
(凹凸判定部33b)
The normal vector derivation unit 33a is a member for obtaining the normal vector of the surface of the object to be read by the principle of illuminance difference stereo based on a plurality of luminance images generated by the imaging unit 21.
(Concavo-convex determination unit 33b)

凹凸判定部33bは、法線ベクトル導出部33aにより求められた読取対象物の表面の法線ベクトルに基づいて、該読取対象物の表面の形状を求め、凹凸部分が凹と凸のいずれの形状であるかを判定するための部材である。
(中間画像生成部33b1)
The unevenness determination unit 33b obtains the shape of the surface of the reading object based on the normal vector of the surface of the reading object obtained by the normal vector deriving unit 33a, and the uneven portion has either a concave shape or a convex shape. It is a member for determining whether or not it is.
(Intermediate image generation unit 33b1)

また凹凸判定部33bは、中間画像生成部33b1の機能を実現する。中間画像生成部33b1は、法線ベクトル導出部33aにより求められた読取対象物の表面の法線ベクトルに基づいて読取対象物の表面の形状を求め、この読取対象物の表面の形状を示す中間画像を生成する。中間画像生成部33b1で生成された中間画像に基づいて、凹凸部分が凹と凸のいずれの形状であるかを判定する。具体的には、中間画像生成部33b1は、照度差ステレオ画像の各画素に、読取対象物の表面の各部の形状に基づいて、凸部分と凹部分に異なる画素値を割り当てることで、中間画像を生成する。 Further, the unevenness determination unit 33b realizes the function of the intermediate image generation unit 33b1. The intermediate image generation unit 33b1 obtains the shape of the surface of the object to be read based on the normal vector of the surface of the object to be read obtained by the normal vector derivation unit 33a, and indicates the shape of the surface of the object to be read. Generate an image. Based on the intermediate image generated by the intermediate image generation unit 33b1, it is determined whether the uneven portion has a concave shape or a convex shape. Specifically, the intermediate image generation unit 33b1 assigns different pixel values to the convex portion and the concave portion to each pixel of the illuminance difference stereo image based on the shape of each portion of the surface of the object to be read, thereby assigning different pixel values to the intermediate image. To generate.

ここで凹凸判定部33bは、中間画像の凹凸部分を含む所定の画像領域内における凸部分に対応する画素数と、凹部分に対応する画素数の割合に基づいて、凹凸部分が凹と凸のいずれの形状であるかを判定するよう構成してもよい。特に凹凸判定部33bは、中間画像において基準値が割り当てられた画素に隣接する画素の内、凸部に対応する画素数と凹部に対応する画素数の割合を求めることで、凹凸部分が凹と凸のいずれの形状であるかを判定することができる。 Here, the unevenness determination unit 33b has concave and convex portions based on the ratio of the number of pixels corresponding to the convex portion in the predetermined image region including the uneven portion of the intermediate image and the number of pixels corresponding to the concave portion. It may be configured to determine which shape it has. In particular, the unevenness determination unit 33b determines the ratio of the number of pixels corresponding to the convex portion to the number of pixels corresponding to the concave portion among the pixels adjacent to the pixel to which the reference value is assigned in the intermediate image, so that the uneven portion is concave. It is possible to determine which shape is convex.

そして読取用画像生成部33cは、凹凸判定部33bによって凹凸部分が凹形状であると判定された場合には、凹部分に対応する画素以外の画素に統一して画素値を割り当てる。一方、凹凸部分が凸形状であると判定された場合には、凸部分に対応する画素以外の画素に統一して画素値を割り当てる。これにより、凹凸部分の形状が強調された読取用画像が生成される。 Then, when the unevenness determination unit 33b determines that the concave-convex portion has a concave shape, the reading image generation unit 33c uniformly assigns pixel values to pixels other than the pixels corresponding to the concave-convex portion. On the other hand, when it is determined that the uneven portion has a convex shape, the pixel value is uniformly assigned to the pixels other than the pixels corresponding to the convex portion. As a result, a reading image in which the shape of the uneven portion is emphasized is generated.

あるいは読取用画像生成部33cは、凹凸判定部33bによって凹凸部分が凹形状であると判定された場合には、読取対象物の表面の平坦な部分に対応する画素に自動で第一の基準値を割り当てると共に、凹形状が強調されるように該読取対象物の表面の各部に対応する各画素に画素値を割り当ててもよい。一方で凹凸部分が凸形状であると判定された場合には、読取対象物の表面の平坦な部分に対応する画素に自動で第一の基準値とは異なる第二の基準値を割り当てると共に、凸形状が強調されるように該読取対象物の表面の各部に対応する各画素に画素値を割り当てる。このようにして、凹凸部分の形状が強調された強調された読取用画像を生成することが可能となる。
(基準値)
Alternatively, when the uneven portion is determined by the concave-convex determination unit 33b to have a concave shape, the reading image generation unit 33c automatically sets the first reference value for the pixel corresponding to the flat portion on the surface of the object to be read. And the pixel value may be assigned to each pixel corresponding to each part of the surface of the reading object so that the concave shape is emphasized. On the other hand, when it is determined that the uneven portion has a convex shape, a second reference value different from the first reference value is automatically assigned to the pixel corresponding to the flat portion on the surface of the object to be read, and the second reference value is automatically assigned. Pixel values are assigned to each pixel corresponding to each part of the surface of the object to be read so that the convex shape is emphasized. In this way, it is possible to generate an emphasized reading image in which the shape of the uneven portion is emphasized.
(Reference value)

ここで基準値について説明する。本実施形態においては、基準値は読取対象物の平坦な部分に対応する輝度値として割り当てられる。例えば輝度値を0〜255の256諧調、すなわち28の8ビットで表現する場合、基準値は0〜255のいずれかの値をとることになる。上述した凹凸判定部33bが、中間画像において基準値が割り当てられた画素に隣接する画素から凹凸部分の凹凸を判定する例においては、基準値を、読取対象物の平坦部分の灰色領域にあたる輝度値32〜223に設定する。これにより、平坦部分に隣接する領域の輝度値分布を、凹凸判定に用いることが可能となる。 Here, the reference value will be described. In the present embodiment, the reference value is assigned as a luminance value corresponding to a flat portion of the object to be read. 256 gradations of the luminance values 0 to 255, that is, when expressed by 8-bit 2 8, the reference value will take one of the values 0 to 255. In the example in which the unevenness determination unit 33b described above determines the unevenness of the uneven portion from the pixels adjacent to the pixel to which the reference value is assigned in the intermediate image, the reference value is set to the brightness value corresponding to the gray region of the flat portion of the reading object. Set to 32 to 223. This makes it possible to use the luminance value distribution in the region adjacent to the flat portion for determining the unevenness.

また、読取対象物が凹形状の場合は、読取対象物の表面の平坦な部分に対応する画素に自動で第一の基準値を割り当てる。例えば凹文字の場合は、凹部分の形状に着目したいため、平坦部分の基準値を輝度値の上限である255に設定する。こうすることで、略平坦又は凸部分に対応する画素には255付近の画素値が割り当てられ、凹部分のみが、へこみ具合に応じて0〜255の輝度値で表現される。この結果、凹形状が強調されるように読取対象物の表面の各部に対応する各画素に画素値が割り当てられるようになる。 When the object to be read has a concave shape, the first reference value is automatically assigned to the pixels corresponding to the flat portion of the surface of the object to be read. For example, in the case of concave characters, since it is desired to pay attention to the shape of the concave portion, the reference value of the flat portion is set to 255, which is the upper limit of the luminance value. By doing so, a pixel value of around 255 is assigned to the pixel corresponding to the substantially flat or convex portion, and only the concave portion is represented by a luminance value of 0 to 255 depending on the degree of dent. As a result, pixel values are assigned to each pixel corresponding to each portion of the surface of the object to be read so that the concave shape is emphasized.

一方で、読取対象物が凹形状の場合は、読取対象物の表面の平坦な部分に対応する画素に自動で第一の基準値とは異なる第二の基準値を割り当てる。例えば凸文字の場合は、平坦部分に割り当てる基準値を、輝度値の下限である0に設定する。こうすることで、凸部分のみが0〜255の輝度値で表現されることになる。この結果、凸形状が強調されるように読取対象物の表面の各部に対応する各画素に画素値を割り当てられる。このようにして、読取対象物の凹凸部分の形状が強調された読取用画像が生成される。 On the other hand, when the object to be read has a concave shape, a second reference value different from the first reference value is automatically assigned to the pixels corresponding to the flat portion of the surface of the object to be read. For example, in the case of convex characters, the reference value assigned to the flat portion is set to 0, which is the lower limit of the luminance value. By doing so, only the convex portion is represented by a luminance value of 0 to 255. As a result, pixel values are assigned to each pixel corresponding to each portion of the surface of the object to be read so that the convex shape is emphasized. In this way, a reading image in which the shape of the uneven portion of the object to be read is emphasized is generated.

また中間画像生成部33b1で生成された中間画像上に、読出部34が読み出した情報に対応する領域を識別可能に表示部に表示させてもよい。これにより、読み取り対象が正しく読み取られているか否かをユーザが視覚的に判断できる。 Further, on the intermediate image generated by the intermediate image generation unit 33b1, the area corresponding to the information read by the reading unit 34 may be identifiablely displayed on the display unit. As a result, the user can visually determine whether or not the read target is correctly read.

なお本明細書において、凹形状とは、ワークの表面に対して主に窪んでいる部分でもって、文字列等のシンボルを表現しているものを意味する。また凸形状とは、ワークの表面に対して主に突出している部分でもって、シンボルを表現しているものを意味する。凹形状が一部において突出している部分を含んでいても、概ね窪んでいる部分でもってシンボルを表現している場合は、凹形状として捉え、また凸形状が一部において窪んでいる部分を含んでいても、概ね突出している部分でもってシンボルを表現している場合は、凸形状として捉える。いいかえると、「凹形状又は凸形状を有する凹凸部分」とは、凹形状のみ、又は凸形状のみを有する凹凸部分という意味でなく、概ね凹形状でシンボルを表現している凹凸部分、又は概ね凸形状でシンボルを表現している凹凸部分という意味である。
(読取用画像生成部33c)
In the present specification, the concave shape means a portion that is mainly recessed with respect to the surface of the work and represents a symbol such as a character string. Further, the convex shape means a portion that represents a symbol mainly by a portion that protrudes with respect to the surface of the work. Even if the concave shape includes a part that protrudes, if the symbol is expressed by a part that is generally recessed, it is regarded as a concave shape, and the convex shape includes a part that is recessed. Even so, if the symbol is represented by a generally protruding part, it is regarded as a convex shape. In other words, the "concavo-convex portion having a concave or convex shape" does not mean a concavo-convex portion having only a concave shape or only a convex shape, but a concavo-convex portion expressing a symbol with a substantially concave shape or a substantially convex portion. It means an uneven part that expresses a symbol by its shape.
(Reading image generation unit 33c)

読取用画像生成部33cは、凹凸判定部33bによって判定された凹凸部分の凹又は凸形状の判定結果に従い、この凹凸部分の形状が強調された読取用画像を生成するための部材である。具体的には、凹凸部分が凹形状であると判定された場合には、読取対象物の表面の凹形状以外の部分の形状が背景となるように各画素に画素値を割り当てる。一方、凹凸部分が凸形状であると判定された場合には、読取対象物の表面の凸形状以外の部分の形状が背景となるように各画素に画素値を割り当てる。このような画素値の割り当てに従い、凹凸部分の形状を強調する強調処理を行って読取用画像を生成する。 The reading image generation unit 33c is a member for generating a reading image in which the shape of the uneven portion is emphasized according to the determination result of the concave or convex shape of the uneven portion determined by the unevenness determination unit 33b. Specifically, when it is determined that the uneven portion has a concave shape, a pixel value is assigned to each pixel so that the shape of the portion other than the concave shape on the surface of the object to be read becomes the background. On the other hand, when it is determined that the uneven portion has a convex shape, a pixel value is assigned to each pixel so that the shape of the portion other than the convex shape on the surface of the reading object becomes the background. According to such allocation of pixel values, an enhancement process for emphasizing the shape of the uneven portion is performed to generate a reading image.

読取用画像生成部33cは、読取用画像における特定の画素について、中間画像における特定の画素の画素値に基づいて値を修正する。また、この修正については、中間画像ではなく、輝度画像における特定の画素に対応する画素の輝度値に基づいて行われても良い。 The reading image generation unit 33c corrects the value of a specific pixel in the reading image based on the pixel value of the specific pixel in the intermediate image. Further, this correction may be performed based on the luminance value of the pixel corresponding to the specific pixel in the luminance image instead of the intermediate image.

読取用画像生成部33cは、さらに基点画素抽出部33c1と、画素復元部33c2を備える。基点画素抽出部33c1は、輝度値が0付近の画素を基点画素として抽出し、他の画素を背景画素として一定値に変換する。また画素復元部33c2は、基点画素抽出部33c1で抽出された基点画素を基点と対応する元画像の画素位置の周辺に、輝度値が上限値以外の輝度値を有する画素がある場合に、当該画素を復元する。 The reading image generation unit 33c further includes a base point pixel extraction unit 33c1 and a pixel restoration unit 33c2. The base point pixel extraction unit 33c1 extracts pixels having a brightness value near 0 as base point pixels and converts other pixels into constant values as background pixels. Further, the pixel restoration unit 33c2 corresponds to the case where there is a pixel having a brightness value other than the upper limit value around the pixel position of the original image corresponding to the base point pixel extracted by the base point pixel extraction unit 33c1. Restore pixels.

読出部34は、読取用画像生成部33cによって生成された読取用画像に基づいて、凹凸部分の形状に対応する情報を読み出す。これにより、凹凸部分を凹凸判定部33bで自動判定することが可能となり、事前に凹凸部分が凹形状か凸形状かを明示的に指定せずとも、自動判定結果に基づいて読取用画像を生成して読出部34でもって高精度に読み取りが可能となる。
(照度差ステレオ法の画像処理におけるパラメータ設定)
The reading unit 34 reads information corresponding to the shape of the uneven portion based on the reading image generated by the reading image generation unit 33c. As a result, the uneven portion can be automatically determined by the uneven portion determination unit 33b, and a reading image is generated based on the automatic determination result without explicitly specifying whether the uneven portion has a concave shape or a convex shape in advance. Then, the reading unit 34 can read with high accuracy.
(Parameter setting in image processing of the illuminance difference stereo method)

凹凸部分の形状に対応する情報は、典型的には、凹凸で表現された凹凸文字列である。このような凹凸文字列の読取を行うための画像は、照度差ステレオ法の原理に基づき生成される。読取対象物であるワークに形成された凹凸文字列が、凹文字列か凸文字列かによって、照度差ステレオ法の画像処理における最適なパラメータは異なる。このため、凹凸文字列の読み取りを行うに際しては、読取対象物に形成された凹凸文字列が凹文字列か凸文字列かを、事前に設定する等して、適切なパラメータを選択する必要があった。一例として、読取対象物に形成された凹凸文字列が凹文字列の場合の光学画像の例を図18に、凸文字列の例を図19に、それぞれ示す。また図18の凹文字列に対する照度差ステレオ画像を図20に、図19の凸文字列に対する照度差ステレオ画像を図21に、それぞれ示す。図20と図21とでは、照度差ステレオ法の画像処理におけるパラメータ設定がそれぞれ異なっており、図20は凹文字列用のパラメータ設定を、図21は凸文字列用のパラメータ設定を、それぞれ行った上で画像処理した照度差ステレオ画像を示している。 The information corresponding to the shape of the concavo-convex portion is typically a concavo-convex character string represented by the concavo-convex. An image for reading such an uneven character string is generated based on the principle of the illuminance difference stereo method. The optimum parameters in the image processing of the illuminance difference stereo method differ depending on whether the uneven character string formed on the work to be read is a concave character string or a convex character string. Therefore, when reading a concavo-convex character string, it is necessary to select an appropriate parameter by setting in advance whether the concavo-convex character string formed on the object to be read is a concave character string or a convex character string. there were. As an example, FIG. 18 shows an example of an optical image when the uneven character string formed on the object to be read is a concave character string, and FIG. 19 shows an example of a convex character string. Further, an illuminance difference stereo image for the concave character string of FIG. 18 is shown in FIG. 20, and an illuminance difference stereo image for the convex character string of FIG. 19 is shown in FIG. The parameter settings in the image processing of the illuminance difference stereo method are different between FIGS. 20 and 21, and FIG. 20 shows the parameter setting for the concave character string and FIG. 21 shows the parameter setting for the convex character string. An illuminance difference stereo image that has been image-processed is shown.

一方で、このような凹凸文字列の凹凸別の選択を行うことなく、単一のパラメータ設定として、凹文字列、凸文字列のいずれも認識したい場合がある。このような運用においては、凹文字列、凸文字列の双方の画像に対して順次読取試行することで、凹文字列、凸文字列のいずれの場合にも適切な画像処理を行い、文字列の読み取りを行うことができる。しかしながら、この方法では、凹文字列用のパラメータ設定と、凸文字列用のパラメータ設定の両方で画像処理を行うことから、読取精度や読取速度の面で問題が生じる。すなわち、読取精度の面では、所望でない画像を対象に読み取りを行う場合に、誤認識するリスクがあった。また読取速度の面では、所望でない画像の読み取りも試行しなければならず、その分だけ読取時間が長くなっていた。 On the other hand, there is a case where it is desired to recognize both the concave character string and the convex character string as a single parameter setting without selecting the uneven character string according to the unevenness. In such an operation, by sequentially trying to read both the concave character string and the convex character string image, appropriate image processing is performed in both the concave character string and the convex character string, and the character string is performed. Can be read. However, in this method, since image processing is performed by both the parameter setting for the concave character string and the parameter setting for the convex character string, problems arise in terms of reading accuracy and reading speed. That is, in terms of reading accuracy, there is a risk of erroneous recognition when reading an undesired image. Further, in terms of reading speed, it is necessary to try reading an undesired image, and the reading time is increased accordingly.

そこで、本実施形態に係る光学式読取装置においては、
1.凹文字列、凸文字列の双方の情報を含む1枚の照度差ステレオ画像を生成し、
2.この照度差ステレオ画像に対して、凹文字列か凸文字列かを自動判定する処理を実行し、
3.この結果に基づいて、照度差ステレオ画像に対して、文字部を強調する文字部強調処理を実行している。以下、これら1〜3の詳細について記載する。
(1.照度差ステレオ画像生成処理)
Therefore, in the optical reader according to the present embodiment,
1. 1. Generate one illuminance difference stereo image containing both concave character string and convex character string information,
2. For this illuminance difference stereo image, a process of automatically determining whether it is a concave character string or a convex character string is executed, and the process is executed.
3. 3. Based on this result, the character portion emphasis processing for emphasizing the character portion is executed on the illuminance difference stereo image. The details of these 1 to 3 will be described below.
(1. Illuminance difference stereo image generation processing)

例えば、図18に示すようなワークの光学画像を撮像部21で撮像して取得する。このような光学画像に対して、凹文字列、凸文字列の双方の情報を含む1枚の照度差ステレオ画像を生成する。この処理は法線ベクトル導出部33aで行う。一例として、図18のワークに対して、凸部分が白、凹部分が黒、平坦部分が灰色で構成された照度差ステレオ画像を、図22に示す。
(2.凹凸形状自動判定処理)
For example, an optical image of a work as shown in FIG. 18 is captured and acquired by the imaging unit 21. For such an optical image, one illuminance difference stereo image including both concave character string and convex character string information is generated. This process is performed by the normal vector derivation unit 33a. As an example, FIG. 22 shows an illuminance difference stereo image in which the convex portion is white, the concave portion is black, and the flat portion is gray with respect to the work of FIG.
(2. Concavo-convex shape automatic judgment processing)

次に、照度差ステレオ画像生成処理により得られた照度差ステレオ画像に対して、撮像対象が凹文字列か、凸文字列かを自動判定する処理を実行する。この処理は凹凸判定部33bで行う。ここで、照度差ステレオ画像生成処理により得られた照度差ステレオ画像について、凹文字列、凸文字列のそれぞれに対して以下の特性がある。すなわち凹文字列の場合は、図22の例に示す照度差ステレオ画像のように文字部分は黒色、文字の淵部分は白色となる。一方、図19に示したような凸文字列の場合は、図23の例に示すように、文字部分が白色、文字の淵部分が黒色となる。また平坦部分は、凹文字列、凸文字列共に灰色となる。これらから、「文字部分」、「文字の淵部分」、「平坦部分」は、以下の関係性を持つことになる。まず「文字部分」は、「文字の淵部分」に囲まれる。また「文字の淵部分」は、「平坦部分」に囲まれる。このような特性を利用することで、灰色の平坦部分に隣接する画素の輝度値分布として、黒色の画素が多い場合は、文字の淵部分が黒色ということになり、凸文字列と判断できる。一方で灰色の平坦部分に隣接する画素の輝度値分布として、逆に白色の画素が多い場合は、文字の淵部分が白色ということになり、凹文字列と判定できる。 Next, a process of automatically determining whether the imaging target is a concave character string or a convex character string is executed for the illuminance difference stereo image obtained by the illuminance difference stereo image generation process. This process is performed by the unevenness determination unit 33b. Here, the illuminance difference stereo image obtained by the illuminance difference stereo image generation processing has the following characteristics for each of the concave character string and the convex character string. That is, in the case of a concave character string, the character portion is black and the edge portion of the character is white as in the illuminance difference stereo image shown in the example of FIG. On the other hand, in the case of the convex character string as shown in FIG. 19, as shown in the example of FIG. 23, the character portion is white and the edge portion of the character is black. In the flat portion, both the concave character string and the convex character string are gray. From these, the "character part", the "character edge part", and the "flat part" have the following relationships. First, the "character part" is surrounded by the "character edge part". In addition, the "character edge part" is surrounded by the "flat part". By utilizing such a characteristic, when there are many black pixels as the luminance value distribution of the pixels adjacent to the gray flat portion, the edge portion of the character is black, and it can be determined that the character string is a convex character string. On the other hand, as the brightness value distribution of the pixels adjacent to the gray flat portion, on the contrary, when there are many white pixels, the edge portion of the character is white, and it can be determined as a concave character string.

このような判断基準に従って、凹文字列か凸文字列かを自動判定する自動判定処理のフローチャートを、図24に示す。まずステップS2401において、照度差ステレオ画像を取得する。ここでは上述した1.の照度差ステレオ画像生成処理に従い、法線ベクトル導出部33aで凹文字列、凸文字列の双方の情報を含む1枚の照度差ステレオ画像を生成する。 FIG. 24 shows a flowchart of the automatic determination process for automatically determining whether the character string is a concave character string or a convex character string according to such a determination standard. First, in step S2401, an illuminance difference stereo image is acquired. Here, 1. According to the illuminance difference stereo image generation process of the above, the normal vector derivation unit 33a generates one illuminance difference stereo image including information on both the concave character string and the convex character string.

次にステップS2402において、灰色の画素に隣接する画素の輝度分布を取得する。この処理は凹凸判定部33bの中間画像生成部33b1で行う。中間画像生成部33b1は、照度差ステレオ画像である中間画像を生成する。ここで凹凸判定部33bは、中間画像の凹凸部分を含む所定の画像領域内における凸部分に対応する画素数と、凹部分に対応する画素数の割合に基づいて、凹凸部分が凹と凸のいずれの形状であるかを判定するよう構成してもよい。特に凹凸判定部33bは、中間画像において基準値が割り当てられた画素に隣接する画素の内、凸部に対応する画素数と凹部に対応する画素数の割合を求めることで、凹凸部分が凹と凸のいずれの形状であるかを判定することができる。この例では、輝度分布を規定するしきい値を固定値としている。例えば輝度値を0〜255の256階調(8ビット)で表現する場合、0〜31を黒、224〜255を白として、黒、灰色、白の輝度分布を取得する。 Next, in step S2402, the brightness distribution of the pixels adjacent to the gray pixels is acquired. This process is performed by the intermediate image generation unit 33b1 of the unevenness determination unit 33b. The intermediate image generation unit 33b1 generates an intermediate image which is an illuminance difference stereo image. Here, the unevenness determination unit 33b has concave and convex portions based on the ratio of the number of pixels corresponding to the convex portion in the predetermined image region including the uneven portion of the intermediate image and the number of pixels corresponding to the concave portion. It may be configured to determine which shape it has. In particular, the unevenness determination unit 33b determines the ratio of the number of pixels corresponding to the convex portion to the number of pixels corresponding to the concave portion among the pixels adjacent to the pixel to which the reference value is assigned in the intermediate image, so that the uneven portion is concave. It is possible to determine which shape is convex. In this example, the threshold value that defines the luminance distribution is a fixed value. For example, when the luminance value is expressed by 256 gradations (8 bits) of 0 to 255, the luminance distributions of black, gray, and white are acquired, where 0 to 31 are black and 224 to 255 are white.

次にステップS2403において、黒画素が白画素よりも多いか否かを凹凸判定部33bで判定する。多い場合は、ステップS2404において、「試行極性1」に「凸」をセットし、「試行極性2」に「凹」をセットして、ステップS2406に進む。一方、ステップS2403において、黒画素が白画素以下と判定された場合は、ステップS2405に進み、「試行極性1」に「凹」をセットし、「試行極性2」に「凸」をセットして、ステップS2406に進む。 Next, in step S2403, the unevenness determination unit 33b determines whether or not there are more black pixels than white pixels. If there are many, in step S2404, "convex" is set in "trial polarity 1", "concave" is set in "trial polarity 2", and the process proceeds to step S2406. On the other hand, if it is determined in step S2403 that the black pixel is less than or equal to the white pixel, the process proceeds to step S2405, "concave" is set in "trial polarity 1", and "convex" is set in "trial polarity 2". , Step S2406.

そしてステップS2406において、「試行極性1」に基づいた文字認識処理を実行する。すなわち、「試行極性1」が「凸」の場合は、読出部34が凸文字列用のパラメータ設定にて文字列の読み取り、すなわちOCR処理を行う。あるいは「試行極性1」が「凹」の場合は、読出部34が凹文字列用のパラメータ設定でOCR処理を行う。この結果、ステップS2407において、有効な読取結果の文字列が得られているか否かを判定し、得られている場合はステップS2410に進んで、結果文字列を出力して処理を終了する。一方、ステップS2407において、有効な読取結果の文字列が得られていない場合は、ステップS2408に進んで、「試行極性2」に基づいた文字認識処理を、読出部34で実行する。そしてステップS2409において、有効な読取結果の文字列が得られているか否かを再び判定し、得られている場合はステップS2410に進み、上述の通り結果文字列を出力して処理を終了する。一方、ステップS2409においても、有効な読取結果の文字列が得られていない場合は、ステップS2411に進んで、読み取り失敗を出力して、処理を終了する。このようにして、凹文字列か凸文字列かを自動判定することができる。なお図24の自動判定処理において、有効な読取結果の文字列が得られている場合も、これを正式な読み取り結果とするものではなく、あくまで応答部分が凹文字列か凸文字列かの自動判定における一処理にすぎない。
(3.文字部強調処理)
Then, in step S2406, the character recognition process based on the "trial polarity 1" is executed. That is, when the "trial polarity 1" is "convex", the reading unit 34 reads the character string by setting the parameters for the convex character string, that is, performs OCR processing. Alternatively, when the "trial polarity 1" is "concave", the reading unit 34 performs OCR processing by setting parameters for the concave character string. As a result, in step S2407, it is determined whether or not a character string of a valid reading result is obtained, and if it is obtained, the process proceeds to step S2410, the result character string is output, and the process ends. On the other hand, if a character string of a valid reading result is not obtained in step S2407, the process proceeds to step S2408, and the character recognition process based on the "trial polarity 2" is executed by the reading unit 34. Then, in step S2409, it is determined again whether or not a character string of a valid reading result is obtained, and if it is obtained, the process proceeds to step S2410, and the result character string is output as described above to end the process. On the other hand, even in step S2409, if a valid reading result character string is not obtained, the process proceeds to step S2411, a reading failure is output, and the process ends. In this way, it is possible to automatically determine whether it is a concave character string or a convex character string. Even if a character string of a valid reading result is obtained in the automatic determination process of FIG. 24, this is not used as a formal reading result, and it is automatic whether the response part is a concave character string or a convex character string. It is just one process in the judgment.
(3. Character part emphasis processing)

以上の凹凸形状自動判定処理の結果に基づき、1.で得られた照度差ステレオ画像に対して、文字部強調処理を実行する。ここでは、照度差ステレオ画像を読出部34で文字認識処理を実行するに先立ち、認識精度を向上させるための前処理として、文字部強調処理を実行する。この処理は読取用画像生成部33cで行う。 Based on the result of the above uneven shape automatic judgment processing, 1. The character part enhancement processing is executed on the illuminance difference stereo image obtained in. Here, prior to executing the character recognition process on the reading unit 34 for the stereo image having an illuminance difference, the character portion enhancement process is executed as a preprocess for improving the recognition accuracy. This process is performed by the reading image generation unit 33c.

一般的なOCR認識処理の特性として、1.で得られるような照度差ステレオ画像、すなわち背景部の輝度値の分散が大きい画像に対する認識は難しい。そこでOCR処理で精度の高い認識結果を得るために、背景部の輝度値の分散を小さくして、文字部のみを強調する前処理を行う。ここで、文字部を強調するにあたっては、凹凸形状が凹文字列か凸文字列かが判明している必要がある。このため、2.の凹凸形状自動判定処理の結果に基づいて、文字部強調処理を実行する。文字部強調処理の例を、図25、図29のフローチャートにそれぞれ示す。まず、凹凸文字で共通の文字部基点画素抽出処理と文字部画素復元処理を行う文字部強調処理について、図25に基づいて説明する。
(凹凸文字で共通の処理を行う文字部強調処理)
The characteristics of general OCR recognition processing are as follows: It is difficult to recognize a stereo image having an illuminance difference as obtained in the above, that is, an image having a large dispersion of brightness values in the background portion. Therefore, in order to obtain a highly accurate recognition result by the OCR process, preprocessing is performed in which the variance of the brightness value of the background portion is reduced and only the character portion is emphasized. Here, in order to emphasize the character portion, it is necessary to know whether the uneven shape is a concave character string or a convex character string. Therefore, 2. Based on the result of the uneven shape automatic determination processing of, the character part emphasis processing is executed. Examples of the character portion emphasis processing are shown in the flowcharts of FIGS. 25 and 29, respectively. First, a character portion enhancement process for performing a character portion base point pixel extraction process and a character portion pixel restoration process common to uneven characters will be described with reference to FIG. 25.
(Character part emphasis processing that performs common processing for uneven characters)

ここではステップS2501において、照度差ステレオ画像を入力する。照度差ステレオ画像は上述した1.の照度差ステレオ画像生成処理により生成された画像であり、例えば図22(凹文字列)や図23(凸文字列)に示すような画像である。次にステップS2502において、凹凸判定の結果を参照する。ここでは、上述した2.の凹凸形状自動判定処理の判定結果を取得し、凹文字(図22)の場合はステップS2504に進む。一方、凸文字の場合はステップS2503に進み、画像の白黒を反転させる処理を行う。この処理は、読取用画像生成部33cで行う。例えば図23の照度差ステレオ画像に対して白黒を反転させると、図26の反転照度差ステレオ画像が得られる。その上でステップS2504に進む。
(文字部基点画素の抽出処理)
Here, in step S2501, the illuminance difference stereo image is input. The illuminance difference stereo image is described in 1. It is an image generated by the illuminance difference stereo image generation processing of, for example, an image as shown in FIG. 22 (concave character string) and FIG. 23 (convex character string). Next, in step S2502, the result of the unevenness determination is referred to. Here, the above-mentioned 2. The determination result of the uneven shape automatic determination process of the above is acquired, and in the case of concave characters (FIG. 22), the process proceeds to step S2504. On the other hand, in the case of convex characters, the process proceeds to step S2503 to invert the black and white of the image. This process is performed by the reading image generation unit 33c. For example, when black and white are inverted with respect to the illuminance difference stereo image of FIG. 23, the inverted illuminance difference stereo image of FIG. 26 is obtained. Then, the process proceeds to step S2504.
(Extraction process of character base point pixel)

次にステップS2504において、文字部基点画素を抽出する。この処理は、基点画素抽出部33c1で行う。ここでは、輝度値0付近の画素のみを残して、他を背景色に変換する。背景色としては、所定の輝度値、例えば8ビットの場合は255とする。これにより、図27に示すような文字部基点画素で構成された照度差ステレオ画像が得られる。このような処理により、照度差ステレオ画像の背景部の輝度値の分散を小さくして、文字部のみを強調できる。
(文字部画素の復元処理)
Next, in step S2504, the character portion base point pixel is extracted. This process is performed by the base point pixel extraction unit 33c1. Here, only the pixels near the brightness value 0 are left, and the others are converted into the background color. The background color is a predetermined luminance value, for example, 255 in the case of 8 bits. As a result, an illuminance difference stereo image composed of the character portion base point pixels as shown in FIG. 27 can be obtained. By such processing, it is possible to reduce the dispersion of the brightness value of the background portion of the illuminance difference stereo image and emphasize only the character portion.
(Restoration process of character pixel)

さらにステップS2505において、文字部の画素復元処理を行う。この処理は、画素復元部33c2で行う。画素復元部33c2は、基点画素抽出部33c1で抽出された文字部基点画素を、この文字部基点画素と対応する照度差ステレオ画像の画素位置の周辺に、輝度値が上限値以外の輝度値を有する画素がある場合に、この画素を復元する。輝度値の上限値は、例えば8ビットの場合は255とする。例えば、元の照度差ステレオ画像である図22や図26を見て、輝度値255以外の輝度値を有する画素がある場合に、この画素を復元する処理である。文字部の中にも、平坦部に近い輝度値を有する画素が存在する。このため、単純に輝度値0付近の画素を255に変換するだけでは、安定した読み取りを実現できない。そこでこのような文字部画素の復元処理を行うことで、読み取りの信頼性が向上する。このようにして、図27の文字部基点画素で構成された照度差ステレオ画像から、文字部画素を復元した照度差ステレオ画像である読取用画像を、図28に示す。 Further, in step S2505, the pixel restoration process of the character portion is performed. This process is performed by the pixel restoration unit 33c2. The pixel restoration unit 33c2 uses the character unit base point pixels extracted by the base point pixel extraction unit 33c1 to generate brightness values other than the upper limit value around the pixel positions of the illuminance difference stereo image corresponding to the character unit base point pixels. If there is a pixel to have, this pixel is restored. The upper limit of the brightness value is, for example, 255 in the case of 8 bits. For example, when looking at the original illuminance difference stereo images of FIGS. 22 and 26 and there is a pixel having a luminance value other than the luminance value 255, this is a process of restoring the pixel. In the character portion, there are pixels having a brightness value close to that of the flat portion. Therefore, stable reading cannot be realized by simply converting the pixels near the luminance value 0 to 255. Therefore, by performing such a restoration process of the character portion pixel, the reliability of reading is improved. In this way, FIG. 28 shows a reading image which is an illuminance difference stereo image in which the character portion pixels are restored from the illuminance difference stereo image composed of the character portion base point pixels of FIG. 27.

最後に、ステップS2506において、文字認識処理を行う。この処理は、読出部34で行う。ここでは、読取用画像に対して、読出部34でOCR処理を行う。 Finally, in step S2506, character recognition processing is performed. This process is performed by the reading unit 34. Here, the reading unit 34 performs OCR processing on the reading image.

なお、以上の文字部強調処理では、凹文字に対する文字部基点画素の抽出処理と文字部画素の復元処理を行う方法を基準とし、凸文字の場合に画像の白黒反転を行うことで仮想的に凹文字に変換して同様に処理する手順を説明したが、本発明はこの方法に限らず、例えば凸文字に対する文字部基点画素の抽出処理と文字部画素の復元処理を行う方法を基準とし、凹文字の場合に画像の白黒反転を行うことで仮想的に凸文字に変換して処理するよう構成してもよい。
(凹凸文字で個別の処理を行う文字部強調処理)
In the above character part emphasis processing, the method of extracting the character part base point pixel and the character part pixel restoration processing for the concave character is used as a reference, and in the case of the convex character, the black and white inversion of the image is performed virtually. The procedure for converting to concave characters and processing in the same manner has been described, but the present invention is not limited to this method, and is based on, for example, a method of extracting character portion base point pixels and restoring character portion pixels for convex characters. In the case of concave characters, the image may be inverted in black and white to be virtually converted into convex characters for processing.
(Character part emphasis processing that performs individual processing with uneven characters)

以上の方法では、共通の文字部基点画素の抽出処理と文字部画素の復元処理を行う方法について説明した。ただ文字部強調処理はこの方法に限られず、白黒反転処理を行うことなく、凹文字、凸文字それぞれに対して個別に文字部基点画素の抽出処理と文字部画素の復元処理を行うこともできる。この方法を、図29のフローチャートに基づいて説明する。まず、ステップS2901において、照度差ステレオ画像を入力する。次にステップS2902において、凹凸判定の結果を参照する。凹凸判定結果が凹文字の場合はステップS2903に進み、凹文字用のパラメータ設定にて文字部基点画素を抽出する。例えば、1.の照度差ステレオ画像生成処理により、図22に示す照度差ステレオ画像(凹文字列)が得られている場合は、図30に示す照度差ステレオ画像に変換し、文字部分を強調すると共に、背景画像を一定輝度(例えば255)に変換する。さらにステップS2904において、凹文字用のパラメータ設定にて、文字部画素復元処理を行う。例えば図30の照度差ステレオ画像に対し、文字部基点画素抽出処理によって失われた文字の一部を復元した、図31に示す読取用画像に変換する。そしてステップS2907に進み、文字認識処理を実行する。ここでは、読出部34でもってOCR処理を行い、文字認識結果を出力する。 In the above method, a method of extracting a common character portion base point pixel and performing a character portion pixel restoration process has been described. However, the character part emphasis processing is not limited to this method, and it is also possible to individually perform the character part base point pixel extraction processing and the character part pixel restoration processing for each of the concave character and the convex character without performing the black and white inversion processing. .. This method will be described with reference to the flowchart of FIG. First, in step S2901, an illuminance difference stereo image is input. Next, in step S2902, the result of the unevenness determination is referred to. If the unevenness determination result is a concave character, the process proceeds to step S2903, and the character portion base point pixel is extracted by setting the parameter for the concave character. For example, 1. When the illuminance difference stereo image (concave character string) shown in FIG. 22 is obtained by the illuminance difference stereo image generation process of FIG. 22, it is converted into the illuminance difference stereo image shown in FIG. Converts an image to constant brightness (eg 255). Further, in step S2904, the character portion pixel restoration process is performed by setting the parameters for concave characters. For example, the illuminance difference stereo image of FIG. 30 is converted into a reading image shown in FIG. 31, in which a part of the characters lost by the character portion base point pixel extraction process is restored. Then, the process proceeds to step S2907 to execute the character recognition process. Here, the reading unit 34 performs OCR processing and outputs the character recognition result.

一方、ステップS2902において、凸文字と判定された場合は、ステップS2905に進み、凸文字用のパラメータ設定にて文字部基点画素を抽出する。例えば、図23に示す照度差ステレオ画像(凸文字列)が得られている場合は、図32に示す照度差ステレオ画像に変換し、文字部分を強調すると共に、背景画像を一定輝度(例えば0)に変換する。さらにステップS2906において、凸文字用のパラメータ設定にて、文字部画素復元処理を行う。例えば図32の照度差ステレオ画像を、図33に示す読取用画像に変換し、文字部基点画素抽出処理によって失われた文字の一部を復元する。そしてステップS2907に進み、文字認識処理を実行する。ここでは、読出部34でもってOCR処理を行い、文字認識結果を出力する。このようにして、白黒反転処理を行うことなく、凹文字、凸文字それぞれに応じたパラメータ設定において個別に文字部基点画素の抽出処理と文字部画素の復元処理を行うことで、正確な文字認識結果を得ることが可能となる。
[実施形態2]
(凹凸指定部36)
On the other hand, if it is determined to be a convex character in step S2902, the process proceeds to step S2905, and the character portion base point pixel is extracted by setting the parameter for the convex character. For example, when the illuminance difference stereo image (convex character string) shown in FIG. 23 is obtained, it is converted into the illuminance difference stereo image shown in FIG. 32, the character portion is emphasized, and the background image has a constant brightness (for example, 0). ). Further, in step S2906, the character portion pixel restoration process is performed by setting the parameters for convex characters. For example, the illuminance difference stereo image of FIG. 32 is converted into the reading image shown in FIG. 33, and a part of the characters lost by the character portion base point pixel extraction process is restored. Then, the process proceeds to step S2907 to execute the character recognition process. Here, the reading unit 34 performs OCR processing and outputs the character recognition result. In this way, accurate character recognition is performed by individually extracting the character portion base point pixel and restoring the character portion pixel in the parameter setting corresponding to each of the concave character and the convex character without performing the black and white inversion process. It is possible to obtain results.
[Embodiment 2]
(Concave and convex designation portion 36)

以上の例では、凹凸判定部33bでもって凹凸部分を自動判定して、事前に凹凸部分が凹形状か凸形状かを明示的に指定することなく読取用画像を生成して読み取りを行う例を説明した。ただ本発明は、凹凸部分が凹形状か凸形状かの指示を受け付けるように構成してもよい。このような例を実施形態2に係る光学式情報読取装置200として、図34のブロック図に示す。なおこの図において、上述した部材と同じ部材については、同じ符号を付して詳細説明を適宜省略する。図34に示す光学式情報読取装置200は、凹凸部分が凹と凸のいずれの形状であるかについてあらかじめ指定を受け付ける凹凸指定部36を備える。読取用画像生成部33cは、凹凸指定部36により凹凸部分の形状が指定されている場合は、指定された凹凸が強調されるように読取用画像を生成する。一方で凹凸指定部36により凹凸部分の形状が指定されていない場合は、凹凸判定部33bにより凹凸部分が凹と凸のいずれの形状であるかを自動で判定して、読取用画像を生成する。この構成であれば、読取対象物の凹凸部分が予め凹形状や凸形状に決まっている場合は、予め凹形状や凸形状に応じた読取設定を行うことにより、凹凸形状の自動判別処理を不要として、処理の高速化や軽負荷化を図ることが可能となる。
(光学式情報読取方法)
In the above example, the uneven portion is automatically determined by the unevenness determination unit 33b, and a reading image is generated and read without explicitly specifying whether the uneven portion is concave or convex in advance. explained. However, the present invention may be configured to receive an instruction as to whether the uneven portion has a concave shape or a convex shape. Such an example is shown in the block diagram of FIG. 34 as the optical information reading device 200 according to the second embodiment. In this figure, the same members as those described above are designated by the same reference numerals, and detailed description thereof will be omitted as appropriate. The optical information reading device 200 shown in FIG. 34 includes a concavo-convex design section 36 that receives a pre-designation as to whether the concavo-convex portion has a concave or convex shape. When the shape of the concavo-convex portion is specified by the concavo-convex design unit 36, the scanning image generation unit 33c generates a scanning image so that the designated concavo-convex portion is emphasized. On the other hand, when the shape of the concavo-convex portion is not specified by the concavo-convex designation portion 36, the concavo-convex determination portion 33b automatically determines whether the concavo-convex portion has a concave or convex shape and generates a reading image. .. With this configuration, if the uneven portion of the object to be read is predetermined to have a concave shape or a convex shape, the reading setting according to the concave shape or the convex shape is performed in advance, so that the automatic discrimination process of the uneven shape is unnecessary. Therefore, it is possible to increase the processing speed and reduce the load.
(Optical information reading method)

次に、読取対象物の表面に形成された凹形状又は凸形状を有する凹凸部分の形状を認識し、認識結果に基づいて情報を読み出す光学式情報読取方法について説明する。まず、読取対象物の表面に異なる3つ以上の方向から個別に照明部でもって光を照射し、該読取対象物の表面を照明する。次に、照明部から照射され読取対象物の表面より反射された光を受光し、複数の輝度画像を撮像部21で生成する。そして、撮像部21により生成された複数の輝度画像に基づいて、照度差ステレオ法の原理により読取対象物の表面の法線ベクトルを求める。さらに求められた読取対象物の表面の法線ベクトルに基づいて、該読取対象物の表面の形状を求め、凹凸部分が凹と凸のいずれの形状であるかを判定する。ここで、凹凸部分が凹形状であると判定された場合には、読取対象物の表面の凹形状以外の部分の形状が背景となるように各画素に画素値を割り当てる。一方、凹凸部分が凸形状であると判定された場合には、読取対象物の表面の凸形状以外の部分の形状が背景となるように各画素に画素値を割り当てる。このように、凹凸部分が凹形状、凸形状のいずれであるかの判定結果に基づいて異なる画素値の割り当てを行うことで、凹凸部分の形状が強調された読取用画像を生成する。最後に、読取用画像に基づいて、凹凸部分の形状に対応する情報を読み出す。これにより、凹凸部分を凹凸判定部33bで自動判定することが可能となり、事前に凹凸部分が凹形状か凸形状かを明示的に指定せずとも、自動判定結果に基づいて読取用画像を生成して読出部34でもって高精度に読み取りが可能となる。
(アタッチメント部60)
Next, an optical information reading method for recognizing the shape of the concave-convex or convex portion formed on the surface of the object to be read and reading the information based on the recognition result will be described. First, the surface of the object to be read is individually irradiated with light from three or more different directions by an illuminating unit to illuminate the surface of the object to be read. Next, the image pickup unit 21 generates a plurality of luminance images by receiving the light emitted from the illumination unit and reflected from the surface of the object to be read. Then, based on the plurality of luminance images generated by the imaging unit 21, the normal vector of the surface of the object to be read is obtained by the principle of the illuminance difference stereo method. Further, based on the obtained normal vector of the surface of the object to be read, the shape of the surface of the object to be read is obtained, and it is determined whether the uneven portion has a concave shape or a convex shape. Here, when it is determined that the uneven portion has a concave shape, a pixel value is assigned to each pixel so that the shape of the portion other than the concave shape on the surface of the object to be read becomes the background. On the other hand, when it is determined that the uneven portion has a convex shape, a pixel value is assigned to each pixel so that the shape of the portion other than the convex shape on the surface of the reading object becomes the background. In this way, by assigning different pixel values based on the determination result of whether the uneven portion has a concave shape or a convex shape, a reading image in which the shape of the uneven portion is emphasized is generated. Finally, the information corresponding to the shape of the uneven portion is read out based on the reading image. As a result, the uneven portion can be automatically determined by the uneven portion determination unit 33b, and a reading image is generated based on the automatic determination result without explicitly specifying whether the uneven portion has a concave shape or a convex shape in advance. Then, the reading unit 34 can read with high accuracy.
(Attachment unit 60)

さらに光学式情報読取装置は、筐体部10の一端に開口された読取口13に、アタッチメント部60を連結自在とすることもできる。このような例を、変形例に係る光学式情報読取装置300として、図35〜図39に示す。これらの図において、図35は変形例に係る光学式情報読取装置300を示す斜視図、図36は図35の光学式情報読取装置300の先端側斜め下方から見た斜視図、図37は図35の光学式情報読取装置300からアタッチメント部60を外した分解斜視図、図38は図36の光学式情報読取装置300からアタッチメント部60を外した分解斜視図、図39は図35の光学式情報読取装置300を読取対象物に押し当てた状態を示す垂直断面図を、それぞれ示している。変形例に係る光学式情報読取装置300において、上述した部材と同じ部材については、同じ符号を付して詳細説明を省略する。これらの図に示すアタッチメント部60は、読取口13よりも内径を大きくした第二読取口62を一旦に開口し、他端を読取口13と連結自在とし、読取口13と第二読取口62を連通させるように枠状に形成されている。このアタッチメント部60は、第二読取口62の枠状の内面を構成する4面に、それぞれ光学窓64を備えている。アタッチメント部60を筐体部10の読取口13側と連結した装着状態において、各光学窓64はそれぞれ照明部と光学的に接続されて、照明部の発光を導光する。これにより、アタッチメント部60自体に発光体や電源を設けることなく、照明部の発光を利用して、第二取付口の内部で読取対象物を4方向から照明可能とできる。特に、図36、図38に示すように第二読取口62の内径DR2を、読取口13の内径DR1よりも大きく構成したことで、アタッチメント部60を連結して読取口13をより大きくすることが可能となる。この結果、読取口13に収まりきらない大きな読取対象物であっても、第二読取口62で4方向から囲むようにして照明し、読み取りを行うことが可能となる。 Further, in the optical information reading device, the attachment portion 60 can be freely connected to the reading port 13 opened at one end of the housing portion 10. Such an example is shown in FIGS. 35 to 39 as the optical information reading device 300 according to the modified example. In these figures, FIG. 35 is a perspective view showing an optical information reading device 300 according to a modified example, FIG. 36 is a perspective view seen from diagonally below the tip side of the optical information reading device 300 of FIG. 35, and FIG. 37 is a view. An exploded perspective view in which the attachment unit 60 is removed from the optical information reader 300 of FIG. 35, FIG. 38 is an exploded perspective view in which the attachment unit 60 is removed from the optical information reader 300 of FIG. 36, and FIG. 39 is an optical type of FIG. 35. Vertical cross-sectional views showing a state in which the information reading device 300 is pressed against the object to be read are shown. In the optical information reading device 300 according to the modified example, the same members as those described above are designated by the same reference numerals, and detailed description thereof will be omitted. The attachment portion 60 shown in these figures once opens a second reading port 62 having an inner diameter larger than that of the reading port 13, and allows the other end to be freely connected to the reading port 13, and the reading port 13 and the second reading port 62. Is formed in a frame shape so as to communicate with each other. The attachment unit 60 is provided with optical windows 64 on each of the four surfaces forming the frame-shaped inner surface of the second reading port 62. In the mounted state in which the attachment portion 60 is connected to the reading port 13 side of the housing portion 10, each optical window 64 is optically connected to the illumination unit to guide the light emission of the illumination unit. As a result, the object to be read can be illuminated from four directions inside the second attachment port by utilizing the light emission of the illumination unit without providing a light emitting body or a power source on the attachment unit 60 itself. In particular, as shown in FIGS. 36 and 38, the inner diameter DR2 of the second reading port 62 is configured to be larger than the inner diameter DR1 of the reading port 13, so that the attachment portion 60 is connected to make the reading port 13 larger. Is possible. As a result, even a large object to be read that does not fit in the reading port 13 can be illuminated and read by the second reading port 62 so as to surround it from four directions.

読取口13は、図2に示すように筐体部10の長手方向に対して傾斜して開口されている。また読取口13の内部において、撮像素子21aは図39に示すように、受光面を筐体部10の長手方向に対して傾斜する姿勢に配置されている。ここで、撮像素子21aの受光面と、読取口13の平面のなす角度をθとする。 As shown in FIG. 2, the reading port 13 is opened so as to be inclined with respect to the longitudinal direction of the housing portion 10. Further, inside the reading port 13, as shown in FIG. 39, the image sensor 21a is arranged in a posture in which the light receiving surface is inclined with respect to the longitudinal direction of the housing portion 10. Here, the angle formed by the light receiving surface of the image sensor 21a and the plane of the reading port 13 is defined as θ.

一方で、アタッチメント部60は、第二読取口62を画成する平面と、筐体部10の読取口13と連結する連結面61とを傾斜させて構成している。図36及び図38に示すように、この第二読取口62の面と連結面61との傾斜角をθとする。このように構成することで、筐体部10の読取口13にアタッチメント部60を連結した状態で、図39に示すように第二読取口62は、読取対象物を形成した平面に押し当てると、読取対象物の平面と、撮像素子21aの板状の主面とが、平行姿勢となる。これにより、光学式情報読取装置300単体では、板状の撮像素子21aを長手方向に傾斜姿勢で固定しつつも、アタッチメント部60を利用することで、読取対象物に対して正面から撮像した画像を容易に取得することが可能となる。いいかえると、アタッチメント部60を装着することで、撮像素子21aの受光面の角度を、読取対象物に対して正対する姿勢に補正できる。 On the other hand, the attachment portion 60 is configured such that the flat surface defining the second reading port 62 and the connecting surface 61 connected to the reading port 13 of the housing portion 10 are inclined. As shown in FIGS. 36 and 38, the inclination angle between the surface of the second reading port 62 and the connecting surface 61 is defined as θ. With this configuration, when the attachment unit 60 is connected to the reading port 13 of the housing unit 10, the second reading port 62 is pressed against the plane on which the object to be read is formed, as shown in FIG. 39. The plane of the object to be read and the plate-shaped main surface of the image sensor 21a are in a parallel posture. As a result, in the optical information reader 300 alone, an image captured from the front with respect to the object to be read by using the attachment unit 60 while fixing the plate-shaped image sensor 21a in an inclined posture in the longitudinal direction. Can be easily obtained. In other words, by attaching the attachment unit 60, the angle of the light receiving surface of the image sensor 21a can be corrected to the posture facing the object to be read.

なお撮像素子21aは、必ずしも読取口13において受光面を正対する姿勢に固定する必要はなく、例えば読取口13にミラーなどの光学部材を配置し、ミラーで一回以上光軸を反射させて撮像素子に案内するような光学経路を構成してもよい。この場合は、撮像素子の受光面でなく、撮像素子に光軸を反射させる光学素子の反射面を筐体部10の長手方向に対して傾斜する姿勢に配置する。本発明はこのような光学部材によって反射させる構成も含めており、「撮像部の受光面を筐体部の長手方向に対して傾斜する姿勢に配置する」とは、このような光学部材の反射面も含めた撮像部の受光面を傾斜させる構成を含む意味で使用する。 The image sensor 21a does not necessarily have to be fixed in a posture in which the light receiving surface faces the reading port 13. For example, an optical member such as a mirror is arranged in the reading port 13 and the optical axis is reflected by the mirror one or more times to take an image. An optical path that guides the element may be configured. In this case, instead of the light receiving surface of the image sensor, the reflecting surface of the optical element that reflects the optical axis on the image sensor is arranged in an inclined posture with respect to the longitudinal direction of the housing portion 10. The present invention also includes a configuration in which reflection is performed by such an optical member, and "arranging the light receiving surface of the imaging unit in an inclined posture with respect to the longitudinal direction of the housing portion" means reflection of such an optical member. It is used in the sense that it includes a configuration in which the light receiving surface of the imaging unit including the surface is inclined.

本発明の光学式情報読取装置及び光学式情報読取方法は、倉庫や工場、店舗、病院等で使用される、バーコードや二次元コード等のシンボルを読み取ってデータの登録、照合を行うハンディスキャナやハンディターミナル、業務用PDA等に好適に利用できる。 The optical information reading device and the optical information reading method of the present invention are handy scanners used in warehouses, factories, stores, hospitals, etc. that read symbols such as barcodes and two-dimensional codes to register and collate data. It can be suitably used for handy terminals, commercial PDAs, etc.

100、200、300…光学式情報読取装置
10…筐体部
1…第一面
2…第二面
11…上ケース
12…下ケース
13…読取口
14…把持部
15…読取支持部
20…撮像ユニット
21…撮像部
21a…撮像素子
22…光学レンズ
30…演算部
31…撮像制御部
32…照明制御部
33…画像処理部;33a…法線ベクトル導出部;
33b…凹凸判定部;33b1…中間画像生成部
33c…読取用画像生成部;33c1…基点画素抽出部;33c2…画素復元部
34…読出部
36…凹凸指定部
40…照明手段
41…第一照明群
42…第二照明群
42a…上方向照明部;42b…下方向照明部;42c…左方向照明部;
42d…右方向照明部;42e…左下方向照明部
43…照明部
44…同軸照明
46…反射部
50…表示部
54…操作部
56…電源部
60…アタッチメント部
61…連結面
62…第二読取口
64…光学窓
SB…シンボル
WK…ワーク
AP…エイミング位置
CL…シンボルを構成する要素
CS…影
ES…影の終わりの部分
FS…平坦な面
OL…輪郭
100, 200, 300 ... Optical information reader 10 ... Housing part 1 ... First surface 2 ... Second surface 11 ... Upper case 12 ... Lower case 13 ... Reading port 14 ... Gripping part 15 ... Reading support part 20 ... Image pickup Unit 21 ... Imaging unit 21a ... Image sensor 22 ... Optical lens 30 ... Calculation unit 31 ... Imaging control unit 32 ... Lighting control unit 33 ... Image processing unit; 33a ... Normal vector derivation unit;
33b ... Concavo-convexity determination unit; 33b1 ... Intermediate image generation unit 33c ... Reading image generation unit; 33c1 ... Base point pixel extraction unit; 33c2 ... Pixel restoration unit 34 ... Reading unit 36 ... Concavo-convexity designation unit 40 ... Lighting means 41 ... First lighting Group 42 ... Second lighting group 42a ... Upward illumination unit; 42b ... Downward illumination unit; 42c ... Leftward illumination unit;
42d ... Right direction illumination unit; 42e ... Lower left direction illumination unit 43 ... Illumination unit 44 ... Coaxial illumination 46 ... Reflection unit 50 ... Display unit 54 ... Operation unit 56 ... Power supply unit 60 ... Attachment unit 61 ... Connecting surface 62 ... Second reading Mouth 64 ... Optical window SB ... Symbol WK ... Work AP ... Aiming position CL ... Elements that make up the symbol CS ... Shadow ES ... Shadow end part FS ... Flat surface OL ... Contour

Claims (14)

読取対象物の表面に形成された凹形状又は凸形状を有する凹凸部分の形状を認識し、認識結果に基づいて情報を読み出す光学式情報読取装置であって、
読取対象物の表面に異なる3つ以上の方向から個別に光を照射し、該読取対象物の表面を照明する照明手段と、
前記照明手段から照射され読取対象物の表面より反射された光を受光し、複数の輝度画像を生成する撮像部と、
前記撮像部により生成された複数の輝度画像に基づいて、照度差ステレオの原理により読取対象物の表面の法線ベクトルを求める法線ベクトル導出部と、
前記法線ベクトル導出部により求められた読取対象物の表面の法線ベクトルに基づいて、該読取対象物の表面の形状を求め、凹凸部分が凹と凸のいずれの形状であるかを判定する凹凸判定部と、
前記凹凸判定部によって、
凹凸部分が凹形状であると判定された場合には、読取対象物の表面の凹形状以外の部分の形状が背景となるように各画素に画素値を割り当てると共に、
凹凸部分が凸形状であると判定された場合には、読取対象物の表面の凸形状以外の部分の形状が背景となるように各画素に画素値を割り当てることで、該凹凸部分の形状が強調された読取用画像を生成する読取用画像生成部と、
前記読取用画像生成部によって生成された読取用画像に基づいて、凹凸部分の形状に対応する情報を読み出す読出部と、
を備える光学式情報読取装置。
An optical information reader that recognizes the shape of a concave-convex or convex portion formed on the surface of an object to be read and reads information based on the recognition result.
An illumination means that illuminates the surface of the object to be read by individually irradiating the surface of the object to be read with light from three or more different directions.
An imaging unit that receives light emitted from the illumination means and reflected from the surface of the object to be read and generates a plurality of luminance images.
Based on the plurality of luminance images generated by the imaging unit, a normal vector deriving unit that obtains a normal vector on the surface of the object to be read by the principle of illuminance difference stereo,
Based on the normal vector of the surface of the reading object obtained by the normal vector deriving unit, the shape of the surface of the reading object is obtained, and it is determined whether the uneven portion has a concave shape or a convex shape. Concavo-convexity judgment part and
By the unevenness determination unit
When it is determined that the uneven portion has a concave shape, a pixel value is assigned to each pixel so that the shape of the portion other than the concave shape on the surface of the object to be read becomes the background, and the pixel value is assigned to each pixel.
When it is determined that the uneven portion has a convex shape, the shape of the uneven portion can be changed by assigning a pixel value to each pixel so that the shape of the portion other than the convex shape on the surface of the object to be read becomes the background. A reading image generator that generates an emphasized reading image,
A reading unit that reads out information corresponding to the shape of the uneven portion based on the reading image generated by the reading image generation unit.
An optical information reader comprising.
請求項1に記載の光学式情報読取装置であって、
前記凹凸判定部は、さらに、
前記法線ベクトル導出部により求められた読取対象物の表面の法線ベクトルに基づいて読取対象物の表面の形状を求め、該読取対象物の表面の形状を示す中間画像を生成する中間画像生成部を備えており、
前記中間画像生成部で生成された中間画像に基づいて、凹凸部分が凹と凸のいずれの形状であるかを判定するよう構成してなる光学式情報読取装置。
The optical information reader according to claim 1.
The unevenness determination unit further
An intermediate image generation that obtains the shape of the surface of the object to be read based on the normal vector of the surface of the object to be read obtained by the normal vector derivation unit and generates an intermediate image showing the shape of the surface of the object to be read. It has a part,
An optical information reading device configured to determine whether the concave-convex portion has a concave shape or a convex shape based on the intermediate image generated by the intermediate image generation unit.
請求項2に記載の光学式情報読取装置であって、
前記中間画像生成部が、読取対象物の表面の各部に対応する各画素に、該読取対象物の表面の各部の形状に基づいて、凸部分と凹部分に異なる画素値を割り当てることで、前記中間画像を生成するよう構成してなる光学式情報読取装置。
The optical information reader according to claim 2.
The intermediate image generation unit assigns different pixel values to the convex portion and the concave portion based on the shape of each portion of the surface of the reading object to each pixel corresponding to each portion of the surface of the reading object. An optical information reader configured to generate an intermediate image.
請求項2又は3に記載の光学式情報読取装置であって、さらに、
前記中間画像生成部が生成した中間画像上に、前記読出部が読み出した情報に対応する領域を識別可能に表示する表示部を備える光学式情報読取装置。
The optical information reader according to claim 2 or 3, further comprising.
An optical information reading device including a display unit that identifiablely displays an area corresponding to the information read by the reading unit on the intermediate image generated by the intermediate image generation unit.
請求項3又は4に記載の光学式情報読取装置であって、
前記凹凸判定部が、前記中間画像の凹凸部分を含む所定の画像領域内における前記凸部分に対応する画素数と、前記凹部分に対応する画素数の割合に基づいて、凹凸部分が凹と凸のいずれの形状であるかを判定するよう構成してなる光学式情報読取装置。
The optical information reader according to claim 3 or 4.
The uneven portion is concave and convex based on the ratio of the number of pixels corresponding to the convex portion and the number of pixels corresponding to the concave portion in a predetermined image region including the uneven portion of the intermediate image. An optical information reader configured to determine which shape of the above.
請求項5に記載の光学式情報読取装置であって、
前記凹凸判定部が、前記中間画像において所定の基準値が割り当てられた画素に隣接する画素の内、凸部に対応する画素数と凹部に対応する画素数の割合を求めることで、凹凸部分が凹と凸のいずれの形状であるかを判定するよう構成してなる光学式情報読取装置。
The optical information reader according to claim 5.
The unevenness determination unit obtains the ratio of the number of pixels corresponding to the convex portion and the number of pixels corresponding to the concave portion among the pixels adjacent to the pixels to which the predetermined reference value is assigned in the intermediate image, whereby the uneven portion is formed. An optical information reader configured to determine whether the shape is concave or convex.
請求項2〜6のいずれか一項に記載の光学式情報読取装置であって、
前記読取用画像生成部が、前記凹凸判定部によって
凹凸部分が凹形状であると判定された場合には、前記凹部分に対応する画素以外の画素に統一して画素値を割り当て、
凹凸部分が凸形状であると判定された場合には、前記凸部分に対応する画素以外の画素に統一して画素値を割り当てることで、
該凹凸部分の形状が強調された前記読取用画像を生成するよう構成してなる光学式情報読取装置。
The optical information reader according to any one of claims 2 to 6.
When the reading image generation unit determines that the uneven portion has a concave shape by the unevenness determination unit, a pixel value is uniformly assigned to pixels other than the pixels corresponding to the concave portion.
When it is determined that the uneven portion has a convex shape, the pixel value is uniformly assigned to the pixels other than the pixels corresponding to the convex portion.
An optical information reading device configured to generate the reading image in which the shape of the uneven portion is emphasized.
請求項2〜6のいずれか一項に記載の光学式情報読取装置であって、
前記読取用画像生成部が、前記凹凸判定部によって
凹凸部分が凹形状であると判定された場合には、読取対象物の表面の平坦な部分に対応する画素に自動で第一の基準値を割り当てると共に、前記凹形状が強調されるように該読取対象物の表面の各部に対応する各画素に画素値を割り当て、
凹凸部分が凸形状であると判定された場合には、読取対象物の表面の平坦な部分に対応する画素に自動で前記第一の基準値とは異なる第二の基準値を割り当てると共に、前記凸形状が強調されるように該読取対象物の表面の各部に対応する各画素に画素値を割り当てることで、
該凹凸部分の形状が強調された強調された読取用画像を生成するよう構成してなる光学式情報読取装置。
The optical information reader according to any one of claims 2 to 6.
When the reading image generation unit determines that the uneven portion has a concave shape by the unevenness determination unit, the first reference value is automatically set for the pixel corresponding to the flat portion on the surface of the object to be read. At the same time, the pixel value is assigned to each pixel corresponding to each part of the surface of the reading object so that the concave shape is emphasized.
When it is determined that the uneven portion has a convex shape, a second reference value different from the first reference value is automatically assigned to the pixel corresponding to the flat portion of the surface of the object to be read, and the above-mentioned By assigning a pixel value to each pixel corresponding to each part of the surface of the reading object so that the convex shape is emphasized,
An optical information reading device configured to generate an emphasized reading image in which the shape of the uneven portion is emphasized.
請求項2〜8のいずれか一項に記載の光学式情報読取装置であって、
前記読取用画像生成部は、生成した読取用画像における特定の画素について、前記中間画像において該特定の画素に対応する画素値あるいは前記輝度画像において該特定の画素に対応する画素の輝度値に基づいて修正するよう構成してなる光学式情報読取装置。
The optical information reader according to any one of claims 2 to 8.
The reading image generation unit is based on the pixel value corresponding to the specific pixel in the intermediate image or the brightness value of the pixel corresponding to the specific pixel in the brightness image for a specific pixel in the generated reading image. An optical information reader configured to be modified.
請求項1〜9のいずれか一項に記載の光学式情報読取装置であって、さらに、
凹凸部分が凹と凸のいずれの形状であるかについてあらかじめ指定を受け付ける凹凸指定部を備え、
前記読取用画像生成部は、
前記凹凸指定部により凹凸部分の形状が指定されている場合は、該指定された凹凸が強調されるように前記読取用画像を生成し、
前記凹凸指定部により凹凸部分の形状が指定されていない場合は、前記凹凸判定部により凹凸部分が凹と凸のいずれの形状であるかを判定して、前記読取用画像を生成するよう構成してなる光学式情報読取装置。
The optical information reader according to any one of claims 1 to 9, further comprising:
Equipped with a concavo-convex designation part that accepts pre-designation of whether the concavo-convex part has a concave or convex shape.
The image generation unit for reading
When the shape of the concavo-convex portion is specified by the concavo-convex designated portion, the reading image is generated so that the designated concavo-convex portion is emphasized.
When the shape of the concavo-convex portion is not specified by the concavo-convex designation portion, the concavo-convex determination portion determines whether the concavo-convex portion has a concave or convex shape and is configured to generate the reading image. Optical information reader.
請求項1〜10のいずれか一項に記載の光学式情報読取装置であって、
前記読出部は、凹凸部分の形状に対応する情報として、OCRにより文字列を読み出すよう構成してなる光学式情報読取装置。
The optical information reader according to any one of claims 1 to 10.
The reading unit is an optical information reading device configured to read a character string by OCR as information corresponding to the shape of the uneven portion.
請求項1〜11のいずれか一項に記載の光学式情報読取装置であって、さらに、
前記照明手段、撮像部、法線ベクトル導出部、凹凸判定部、読出部を収納すると共に、一方向に延長された一端に、開口された読取口を形成して、該読取口の内面に前記照明手段を配置してなる筐体部と、
前記読取口よりも内径を大きくした第二読取口を一旦に開口し、他端を前記読取口と連結自在とし、前記読取口と第二読取口を連通させるように枠状に形成されたアタッチメント部と、
を備え、
前記アタッチメント部は、前記読取口と連結状態において、前記照明手段と光学的に接続されて該照明手段の発光を検出対象物に向けて投光する光学窓を、前記第二読取口の枠状の内面を構成する4面にそれぞれ備えており、
前記アタッチメント部を前記筐体部の読取口に連結した状態で、前記光学窓が前記照明手段と光学的に接続されて、前記第二読取口の内面の4面から、読取対象物を4方向から照明可能としてなる光学式情報読取装置。
The optical information reader according to any one of claims 1 to 11, further comprising.
The lighting means, the imaging unit, the normal vector derivation unit, the unevenness determination unit, and the reading unit are housed, and an open reading port is formed at one end extended in one direction, and the reading port is formed on the inner surface of the reading port. The housing part where the lighting means are arranged and
An attachment formed in a frame shape so that a second reading port having an inner diameter larger than that of the reading port is opened at once, the other end is freely connectable to the reading port, and the reading port and the second reading port are communicated with each other. Department and
With
The attachment unit has an optical window that is optically connected to the lighting means and emits light emitted from the lighting means toward a detection object in a state of being connected to the reading port, and has a frame shape of the second reading port. It is provided on each of the four sides that make up the inner surface of the
With the attachment portion connected to the reading port of the housing portion, the optical window is optically connected to the lighting means, and the object to be read is read in four directions from the four inner surfaces of the second reading port. An optical information reader that can be illuminated from.
請求項12に記載の光学式情報読取装置であって、
前記撮像部は、その受光面を前記読取口の内部において、前記筐体部の長手方向に対して傾斜する姿勢に配置されており、
前記筐体部の読取口に連結した前記アタッチメント部の前記第二読取口を、読取対象物を形成した平面に押し当てた状態で、該平面が、前記撮像部の受光面と平行姿勢となるように構成してなる光学式情報読取装置。
The optical information reader according to claim 12.
The imaging unit is arranged so that its light receiving surface is inclined with respect to the longitudinal direction of the housing portion inside the reading port.
In a state where the second reading port of the attachment portion connected to the reading port of the housing portion is pressed against the plane on which the object to be read is formed, the plane is in a posture parallel to the light receiving surface of the imaging unit. An optical information reader configured as described above.
読取対象物の表面に形成された凹形状又は凸形状を有する凹凸部分の形状を認識し、認識結果に基づいて情報を読み出す光学式情報読取方法であって、
読取対象物の表面に異なる3つ以上の方向から個別に照明手段でもって光を照射し、該読取対象物の表面を照明する工程と、
前記照明手段から照射され読取対象物の表面より反射された光を受光し、複数の輝度画像を撮像部で生成する工程と、
前記撮像部により生成された複数の輝度画像に基づいて、照度差ステレオの原理により読取対象物の表面の法線ベクトルを求める工程と、
前記求められた読取対象物の表面の法線ベクトルに基づいて、該読取対象物の表面の形状を求め、凹凸部分が凹と凸のいずれの形状であるかを判定すると共に、
凹凸部分が凹形状であると判定された場合には、読取対象物の表面の凹形状以外の部分の形状が背景となるように各画素に画素値を割り当てると共に、
凹凸部分が凸形状であると判定された場合には、読取対象物の表面の凸形状以外の部分の形状が背景となるように各画素に画素値を割り当てることで、該凹凸部分の形状が強調された読取用画像を生成する工程と、
前記読取用画像に基づいて、凹凸部分の形状に対応する情報を読み出す工程と、
を含む光学式情報読取方法。
An optical information reading method that recognizes the shape of a concave-convex or convex portion formed on the surface of an object to be read and reads information based on the recognition result.
A process of illuminating the surface of the object to be read by individually irradiating the surface of the object to be read with light from three or more different directions by an illuminating means.
A step of receiving light emitted from the illumination means and reflected from the surface of the object to be read, and generating a plurality of luminance images by the imaging unit.
Based on the plurality of luminance images generated by the imaging unit, the step of obtaining the normal vector of the surface of the object to be read by the principle of illuminance difference stereo, and
Based on the obtained normal vector of the surface of the object to be read, the shape of the surface of the object to be read is obtained, and it is determined whether the uneven portion has a concave shape or a convex shape.
When it is determined that the uneven portion has a concave shape, a pixel value is assigned to each pixel so that the shape of the portion other than the concave shape on the surface of the object to be read becomes the background, and the pixel value is assigned to each pixel.
When it is determined that the uneven portion has a convex shape, the shape of the uneven portion can be changed by assigning a pixel value to each pixel so that the shape of the portion other than the convex shape on the surface of the object to be read becomes the background. The process of generating an emphasized reading image and
A process of reading information corresponding to the shape of the uneven portion based on the reading image, and
Optical information reading method including.
JP2019168745A 2019-09-17 2019-09-17 Optical information reader Active JP7306930B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019168745A JP7306930B2 (en) 2019-09-17 2019-09-17 Optical information reader

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019168745A JP7306930B2 (en) 2019-09-17 2019-09-17 Optical information reader

Publications (2)

Publication Number Publication Date
JP2021047541A true JP2021047541A (en) 2021-03-25
JP7306930B2 JP7306930B2 (en) 2023-07-11

Family

ID=74878432

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019168745A Active JP7306930B2 (en) 2019-09-17 2019-09-17 Optical information reader

Country Status (1)

Country Link
JP (1) JP7306930B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113065541A (en) * 2021-04-08 2021-07-02 广州慧扬健康科技有限公司 Steel seal character recognition method, system, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007206797A (en) * 2006-01-31 2007-08-16 Omron Corp Image processing method and image processor
JP2015232482A (en) * 2014-06-09 2015-12-24 株式会社キーエンス Inspection equipment, inspection method and program
JP2018040649A (en) * 2016-09-06 2018-03-15 株式会社キーエンス Image inspection device, image inspection method, image inspection program, computer-readable recording medium and recording apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007206797A (en) * 2006-01-31 2007-08-16 Omron Corp Image processing method and image processor
JP2015232482A (en) * 2014-06-09 2015-12-24 株式会社キーエンス Inspection equipment, inspection method and program
JP2018040649A (en) * 2016-09-06 2018-03-15 株式会社キーエンス Image inspection device, image inspection method, image inspection program, computer-readable recording medium and recording apparatus

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113065541A (en) * 2021-04-08 2021-07-02 广州慧扬健康科技有限公司 Steel seal character recognition method, system, computer equipment and storage medium

Also Published As

Publication number Publication date
JP7306930B2 (en) 2023-07-11

Similar Documents

Publication Publication Date Title
US9076199B2 (en) System and method for determining and controlling focal distance in a vision system camera
CA2288758C (en) Optical scanner and image reader for reading images and decoding optical information including one and two dimensional symbologies at variable depth of field
CN102369539B (en) Exposure control for multi-imaging scanner
EP3089072B1 (en) Image capturing device
US6860428B1 (en) Optical symbologies imager
US8079524B2 (en) Imaging-based scanner including border searching for image acquisition
US10057498B1 (en) Light field vision system camera and methods for using the same
CN108351955B (en) Compact imaging module with rangefinder
US7545722B2 (en) Method and apparatus for optically reading information attached to a target
US20070002163A1 (en) Imager settings
WO2006071467A2 (en) Methods and apparatus for improving direct part mark scanner performance
EP4027635A1 (en) Systems, methods, and appratuses for focus selection using image disparity
JP7306930B2 (en) Optical information reader
CN117480517A (en) Asset verification system and method of using the same
JP2018189420A (en) Color pattern discrimination probe, and color patten discrimination device
US11481568B1 (en) Dome illuminator for vision system camera and method for using the same
US10650205B2 (en) Methods, systems, and apparatuses for scanning and decoding direct part marking indicia
JP7289703B2 (en) handheld optical information reader
EP1041378A1 (en) Produce recognition system including a produce data collector
JP2018077089A (en) Recognition device, determination method, and article manufacturing method
EP1916557B1 (en) Optical scanner and image reader for reading images and decoding optical information including one and two dimensional symbologies at variable depth of field
JP7463247B2 (en) Optical information reading device and optical information reading method
JPH06258224A (en) Sintering condition monitoring method for ceramic substrate and its device
JP2018136858A (en) Optical information reader
JP2018136854A (en) Optical information reader

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20220615

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20230328

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230411

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230531

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230629

R150 Certificate of patent or registration of utility model

Ref document number: 7306930

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150