JP6403416B2 - Portable optical reader, optical reading method using the portable optical reader, and computer program - Google Patents

Portable optical reader, optical reading method using the portable optical reader, and computer program Download PDF

Info

Publication number
JP6403416B2
JP6403416B2 JP2014089586A JP2014089586A JP6403416B2 JP 6403416 B2 JP6403416 B2 JP 6403416B2 JP 2014089586 A JP2014089586 A JP 2014089586A JP 2014089586 A JP2014089586 A JP 2014089586A JP 6403416 B2 JP6403416 B2 JP 6403416B2
Authority
JP
Japan
Prior art keywords
symbol
reading
area
positioning
character string
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.)
Active
Application number
JP2014089586A
Other languages
Japanese (ja)
Other versions
JP2015210541A (en
Inventor
郁生 山田
郁生 山田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP2014089586A priority Critical patent/JP6403416B2/en
Publication of JP2015210541A publication Critical patent/JP2015210541A/en
Application granted granted Critical
Publication of JP6403416B2 publication Critical patent/JP6403416B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Character Input (AREA)
  • Editing Of Facsimile Originals (AREA)

Description

本発明は、光学的に読み取るまでの処理時間を短縮することができ、作業効率の低下を防止することが可能な携帯型光学式読取装置、該携帯型光学式読取装置を用いる光学式読取方法、及びコンピュータプログラムに関する。   The present invention can reduce a processing time until optical reading, and can prevent a reduction in work efficiency, and an optical reading method using the portable optical reading device And a computer program.

従来、OCR等を用いて、段ボール箱、包装箱等のワーク表面に記載された文字列を光学的に読み取る場合、光学式読取装置とワークとの位置関係が変化する。そのため、実際に撮像している領域をリアルタイムに表示するライブビューと組み合わせつつ、光学式読取装置の画面上に表示された処理領域内に読取対象(シンボル)が含まれるように、光学式読取装置を最適な位置へと移動させる必要がある。   Conventionally, when a character string written on the surface of a workpiece such as a cardboard box or packaging box is optically read using OCR or the like, the positional relationship between the optical reader and the workpiece changes. For this reason, the optical reading device is configured so that the reading target (symbol) is included in the processing region displayed on the screen of the optical reading device while combining the live image display in which the region actually captured is displayed in real time. Must be moved to the optimal position.

処理領域の大きさは、光学的な読取に要する時間の観点からは、可能な限り小さいことが望ましい。例えば特許文献1では、半導体レーザから放射されたレーザ光を照準として使用し、バーコードを読み取るための処理領域の大きさや位置を、コードを読み取る位置や範囲を示す照準近傍に制限するコード読取装置が開示されている。   The size of the processing area is desirably as small as possible from the viewpoint of the time required for optical reading. For example, in Patent Document 1, a laser beam emitted from a semiconductor laser is used as an aim, and the size and position of a processing area for reading a barcode is limited to the vicinity of the aim indicating the position and range for reading the code. Is disclosed.

特開2004−185289号公報JP 2004-185289 A

処理領域の大きさを小さくした場合、文字列のサイズが大きいときには光学式読取装置をワークから遠ざける必要があり、逆に文字列のサイズが小さいときには光学式読取装置をワークに近づける必要がある。倉庫内の商品の棚卸等のように、サイズが多種多様な文字列を大量に読み取る必要がある場合に、光学式読取装置を使用する都度、ワークから遠ざけたり近づけたりすることは、ユーザにとっては煩雑な作業になるという問題点があった。   When the size of the processing area is reduced, the optical reader needs to be moved away from the work when the size of the character string is large. Conversely, when the size of the character string is small, the optical reader needs to be brought closer to the work. When it is necessary to read a large number of character strings of various sizes, such as inventory of goods in a warehouse, it is for the user to keep away from or close to the workpiece each time an optical reader is used. There was a problem that it was a complicated task.

一方、処理領域の大きさを光学式読取装置で撮像された画像が表示されている画面全体に設定する場合には、ユーザは文字列のサイズに応じて光学式読取装置を遠ざけたり近づけたりする必要がない。しかし、文字列が存在しない領域についても画像処理が必要であることから、無駄な演算処理が発生し、光学的に読み取るまでの処理時間を短縮することができないという問題点があった。   On the other hand, when the size of the processing area is set to the entire screen on which the image captured by the optical reader is displayed, the user moves the optical reader away or closes depending on the size of the character string. There is no need. However, since image processing is also required for a region where no character string exists, there is a problem that useless arithmetic processing occurs and processing time until optical reading cannot be shortened.

また、引用文献1ではバーコードが読取対象であることから、処理領域を照準近傍に制限しても支障はないが、文字列が読取対象である場合、文字として認識するのに十分な幅の処理領域を確保する必要がある。   In Cited Document 1, since the barcode is an object to be read, there is no problem even if the processing area is limited to the vicinity of the aim. However, when the character string is the object to be read, the width is sufficient to be recognized as a character. It is necessary to secure a processing area.

本発明は斯かる事情に鑑みてなされたものであり、読取処理に要する時間を増大させることなく、効率良く文字列を読み取ることが可能な携帯型光学式読取装置、該携帯型光学式読取装置を用いる光学式読取方法、及びコンピュータプログラムを提供することを目的とする。   The present invention has been made in view of such circumstances, and a portable optical reader capable of efficiently reading a character string without increasing the time required for the reading process, and the portable optical reader. It is an object of the present invention to provide an optical reading method using a computer and a computer program.

上記目的を達成するために第1発明に係る携帯型光学式読取装置は、読取対象となるシンボルが付されたワークに対して、読取位置を示す照準光を照射する照準光照射手段と、前記読取位置を含んでワークを撮像した撮像画像を取得する撮像手段と、撮像された画像の照準光により定まる読取位置に基づいて、画像内のシンボルの大きさとシンボルの位置を決めるための位置決め領域の大きさとが相対的に変わるように、位置決め領域を複数設定する領域設定手段と、設定された複数の位置決め領域に対して、それぞれシンボルが含まれる領域として適当であるか否かを評価する領域評価手段と、評価結果に基づいて特定された位置決め領域内のシンボルについて読取処理を実行するシンボル読取手段とを備えることを特徴とする。   In order to achieve the above object, a portable optical reader according to a first aspect of the present invention includes an aiming light irradiating unit that irradiates an object with a symbol to be read with an aiming light indicating a reading position; An imaging unit that acquires a captured image of a workpiece including a reading position, and a positioning area for determining a symbol size and a symbol position in the image based on a reading position determined by aiming light of the captured image. Area setting means for setting a plurality of positioning areas so that the size changes relatively, and area evaluation for evaluating whether or not each of the set positioning areas is appropriate as an area including symbols. And symbol reading means for executing a reading process on the symbols in the positioning area specified based on the evaluation result.

また、第2発明に係る携帯型光学式読取装置は、第1発明において、撮像された画像を複数の異なる縮小率で縮小した複数の縮小画像を生成する縮小画像生成手段を備え、前記領域設定手段は、生成された複数の縮小画像に対して、それぞれ表示上の大きさが略同一である位置決め領域を設定することを特徴とする。   According to a second aspect of the present invention, there is provided a portable optical reading apparatus according to the first aspect, further comprising reduced image generation means for generating a plurality of reduced images obtained by reducing a captured image at a plurality of different reduction ratios. The means is characterized in that a positioning area having substantially the same display size is set for each of the generated reduced images.

また、第3発明に係る携帯型光学式読取装置は、第1発明において、前記領域設定手段は、同一の撮像画像に対して、大きさの相違する位置決め領域を複数設定することを特徴とする。   According to a third aspect of the present invention, there is provided the portable optical reader according to the first aspect, wherein the area setting means sets a plurality of positioning areas having different sizes for the same captured image. .

また、第4発明に係る携帯型光学式読取装置は、第2発明において、前記照準光は、シンボルの読取方向に対して略平行な線状光であり、前記領域設定手段は、照射された照準光で形成される基準線に基づいて、該基準線の上方に第一のピクセル数だけ離れた位置に形成された上辺と、前記基準線の下方に第二のピクセル数だけ離れた位置に形成された下辺とを含む矩形領域を前記位置決め領域として設定することを特徴とする。 The portable optical reader according to a fourth aspect of the present invention is the portable optical reader according to the second aspect, wherein the aiming light is linear light substantially parallel to the symbol reading direction, and the region setting means is irradiated. Based on the reference line formed by the aiming light, the upper side formed at a position separated by the first number of pixels above the reference line and the position separated by the second number of pixels below the reference line A rectangular area including the formed lower side is set as the positioning area.

また、第5発明に係る携帯型光学式読取装置は、第4発明において、前記第一のピクセル数と前記第二のピクセル数とが同じであることを特徴とする。   According to a fifth aspect of the present invention, there is provided the portable optical reader according to the fourth aspect, wherein the first number of pixels and the second number of pixels are the same.

また、第6発明に係る携帯型光学式読取装置は、第4又は第5発明において、前記矩形領域の左辺及び右辺は、それぞれ前記縮小画像の左端及び右端に位置するよう設定することを特徴とする。   The portable optical reader according to a sixth invention is characterized in that, in the fourth or fifth invention, the left side and the right side of the rectangular area are set to be positioned at the left end and the right end of the reduced image, respectively. To do.

次に、上記目的を達成するために第7発明に係る光学式読取方法は、読取対象となるシンボルが付されたワークに対して、読取位置を示す照準光を照射する照準光照射手段と、前記読取位置を含んでワークを撮像した撮像画像を取得する撮像手段とを備える携帯型光学式読取装置で実行することが可能な光学式読取方法であって、前記携帯型光学式読取装置が、撮像された画像の照準光により定まる読取位置に基づいて、画像内のシンボルの大きさとシンボルの位置を決めるための位置決め領域の大きさとが相対的に変わるように、位置決め領域を複数設定する第1の工程と、設定された複数の位置決め領域に対して、それぞれシンボルが含まれる領域として適当であるか否かを評価する第2の工程と、評価結果に基づいて特定された位置決め領域内のシンボルについて読取処理を実行する第3の工程とを含むことを特徴とする。   Next, in order to achieve the above object, an optical reading method according to a seventh aspect of the present invention includes an aiming light irradiating unit that irradiates an aiming light indicating a reading position to a work with a symbol to be read. An optical reading method that can be executed by a portable optical reader including an imaging unit that captures an image of a workpiece including the reading position, wherein the portable optical reader includes: First, a plurality of positioning areas are set so that the size of the symbol in the image and the size of the positioning area for determining the position of the symbol are relatively changed based on the reading position determined by the aiming light of the captured image. A second step of evaluating whether each of the set positioning areas is appropriate as an area including a symbol, and a positioning determined based on the evaluation result Characterized in that it comprises a third step of executing a reading process for a symbol in a region.

次に、上記目的を達成するために第8発明に係るコンピュータプログラムは、読取対象となるシンボルが付されたワークに対して、読取位置を示す照準光を照射する照準光照射手段と、前記読取位置を含んでワークを撮像した撮像画像を取得する撮像手段とを備える携帯型光学式読取装置で実行することが可能なコンピュータプログラムであって、前記携帯型光学式読取装置を、撮像された画像の照準光により定まる読取位置に基づいて、画像内のシンボルの大きさとシンボルの位置を決めるための位置決め領域の大きさとが相対的に変わるように、位置決め領域を複数設定する領域設定手段、設定された複数の位置決め領域に対して、それぞれシンボルが含まれる領域として適当であるか否かを評価する領域評価手段、及び評価結果に基づいて特定された位置決め領域内のシンボルについて読取処理を実行するシンボル読取手段として機能させることを特徴とする。   Next, in order to achieve the above object, a computer program according to an eighth aspect of the present invention includes an aiming light irradiating unit that irradiates a workpiece having a symbol to be read with an aiming light indicating a reading position; A computer program that can be executed by a portable optical reader including an imaging unit that captures a captured image of a workpiece including a position, the captured optical reader being captured An area setting means for setting a plurality of positioning areas is set so that the size of the symbol in the image and the size of the positioning area for determining the position of the symbol are relatively changed based on the reading position determined by the aiming light. In addition, based on the evaluation results, an area evaluation means for evaluating whether or not each of the plurality of positioning areas is appropriate as an area including a symbol. Characterized in that to function as a symbol reading means for performing a reading process for symbol alignment in areas specified Te.

第1発明、第7発明及び第8発明では、読取対象となるシンボル(文字列)が付されたワークに対して、読取位置を示す照準光を照射し、読取位置を含んでワークを撮像した撮像画像を取得する。撮像された画像の照準光により定まる読取位置に基づいて、画像内のシンボル(文字列)の大きさとシンボル(文字列)の位置を決めるための位置決め領域の大きさとが相対的に変わるように、位置決め領域を複数設定し、設定された複数の位置決め領域に対して、それぞれシンボル(文字列)が含まれる領域として適当であるか否かを評価する。評価結果に基づいて特定された位置決め領域内のシンボル(文字列)について読取処理を実行する。これにより、照準光により定まる読取位置に基づいて、画像内のシンボル(文字列)の大きさとシンボル(文字列)の位置を決めるための位置決め領域の大きさとが相対的に変わるように、位置決め領域を複数設定することができるので、倉庫内の商品の棚卸等のように、サイズが多種多様なシンボル(文字列)を大量に読み取る必要がある場合であっても、光学式読取装置を使用する都度、ワークから遠ざけたり近づけたりする必要がない。また、画面全体を読取処理の対象領域とする必要がないので、シンボル(文字列)が存在しない領域については読取処理を実行する必要がなく、演算処理負荷を軽減することにより読取時間を短縮することが可能となる。   In the first invention, the seventh invention, and the eighth invention, the workpiece with the symbol (character string) to be read is irradiated with aiming light indicating the reading position, and the workpiece is imaged including the reading position. A captured image is acquired. Based on the reading position determined by the aiming light of the captured image, the size of the symbol (character string) in the image and the size of the positioning region for determining the position of the symbol (character string) are relatively changed. A plurality of positioning areas are set, and it is evaluated whether or not each of the set positioning areas is appropriate as an area including a symbol (character string). A reading process is executed for a symbol (character string) in the positioning area specified based on the evaluation result. Accordingly, the positioning area is configured so that the size of the symbol (character string) in the image and the size of the positioning area for determining the position of the symbol (character string) are relatively changed based on the reading position determined by the aiming light. Since it is possible to set multiple items, it is necessary to use an optical reader even when it is necessary to read a large amount of symbols (character strings) of various sizes, such as inventory of goods in a warehouse. There is no need to keep away from or close to the workpiece each time. In addition, since it is not necessary to set the entire screen as a target area for the reading process, it is not necessary to execute the reading process for an area where no symbol (character string) exists, and the reading time is shortened by reducing the calculation processing load. It becomes possible.

第2発明では、撮像された画像を複数の異なる縮小率で縮小した複数の縮小画像を生成し、生成された複数の縮小画像に対して、それぞれ表示上の大きさが略同一である位置決め領域を設定する。位置決め領域の大きさを変えずに画像の縮小率を変えることにより、位置決め領域内のシンボル(文字列)の占める割合を相対的に変えることができ、効率良く読み取ることができる位置決め領域を選択することが可能となる。   In the second invention, a plurality of reduced images obtained by reducing the captured image at a plurality of different reduction ratios are generated, and a positioning area having substantially the same display size with respect to the generated plurality of reduced images Set. By changing the image reduction ratio without changing the size of the positioning area, the proportion of symbols (character strings) in the positioning area can be changed relatively, and a positioning area that can be read efficiently is selected. It becomes possible.

第3発明では、同一の撮像画像に対して、大きさの相違する位置決め領域を複数設定することにより、縮小画像を生成することなく、相対的にシンボル(文字列)の含まれる割合が読取に適切な位置決め領域を設定することができ、効率良く読み取ることができる位置決め領域を選択することが可能となる。   In the third invention, by setting a plurality of positioning regions having different sizes for the same captured image, the ratio of relatively containing symbols (character strings) can be read without generating a reduced image. An appropriate positioning area can be set, and a positioning area that can be efficiently read can be selected.

第4発明では、照準光は、シンボル(文字列)の読取方向に対して略平行な線状光であり、照射された照準光で形成される基準線に基づいて、該基準線の上方に第一のピクセル数だけ離れた位置に形成された上辺と、基準線の下方に第二のピクセル数だけ離れた位置に形成された下辺とを含む矩形領域を位置決め領域として設定する。これにより、読取対象となるシンボル(文字列)に応じた位置決め領域を設定することができ、効率良く読み取ることが可能となる。   In the fourth aspect of the invention, the aiming light is linear light that is substantially parallel to the reading direction of the symbol (character string), and is above the reference line based on the reference line formed by the irradiated aiming light. A rectangular area including an upper side formed at a position separated by the first number of pixels and a lower side formed at a position separated by the second number of pixels below the reference line is set as a positioning area. Thereby, the positioning area | region according to the symbol (character string) used as reading object can be set, and it becomes possible to read efficiently.

第5発明では、第一のピクセル数と第二のピクセル数とが同じであることにより、線状の照準光をシンボル(文字列)の読取方向に対して垂直方向の中心近傍に合わせることで、確実にシンボル(文字列)を読み取ることが可能となる。   In the fifth aspect of the invention, since the first number of pixels and the second number of pixels are the same, the linear aiming light is adjusted to the vicinity of the center in the direction perpendicular to the reading direction of the symbol (character string). The symbol (character string) can be read reliably.

第6発明では、矩形領域の左辺及び右辺は、それぞれ縮小画像の左端及び右端に位置するよう設定することにより、桁落ちすることなくシンボル(文字列)を読み取ることが可能となる。   In the sixth aspect of the invention, the left side and the right side of the rectangular area are set so as to be positioned at the left end and the right end of the reduced image, respectively, so that symbols (character strings) can be read without dropping digits.

本発明によれば、照準光により定まる読取位置に基づいて、画像内のシンボル(文字列)の大きさとシンボル(文字列)の位置を決めるための位置決め領域の大きさとが相対的に変わるように、位置決め領域を複数設定することができるので、倉庫内の商品の棚卸等のように、サイズが多種多様なシンボル(文字列)を大量に読み取る必要がある場合であっても、光学式読取装置を使用する都度、ワークから遠ざけたり近づけたりする必要がない。また、画面全体を読取処理の対象領域とする必要がないので、シンボル(文字列)が存在しない領域については読取処理を実行する必要がなく、演算処理負荷を軽減することにより読取時間を短縮することが可能となる。   According to the present invention, the size of the symbol (character string) in the image and the size of the positioning area for determining the position of the symbol (character string) are relatively changed based on the reading position determined by the aiming light. Since a plurality of positioning areas can be set, the optical reader can be used even when it is necessary to read a large amount of symbols (character strings) of various sizes, such as inventory of goods in a warehouse. There is no need to keep away from or close to the workpiece each time the is used. In addition, since it is not necessary to set the entire screen as a target area for the reading process, it is not necessary to execute the reading process for an area where no symbol (character string) exists, and the reading time is shortened by reducing the calculation processing load. It becomes possible.

本発明の実施の形態に係るハンディターミナルの外観構成を示す模式図である。It is a schematic diagram which shows the external appearance structure of the handy terminal which concerns on embodiment of this invention. 本発明の実施の形態に係るハンディターミナルの、CPU等の制御部を用いた場合の構成を示すブロック図である。It is a block diagram which shows the structure at the time of using control parts, such as CPU, of the handy terminal which concerns on embodiment of this invention. 本発明の実施の形態に係るハンディターミナルの読取動作の手順を示すフローチャートである。It is a flowchart which shows the procedure of the reading operation | movement of the handy terminal which concerns on embodiment of this invention. 本発明の実施の形態に係るハンディターミナルの読取処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the reading process of the handy terminal which concerns on embodiment of this invention. 本発明の実施の形態1に係るハンディターミナルの機能ブロック図である。It is a functional block diagram of the handy terminal concerning Embodiment 1 of the present invention. 本発明の実施の形態1に係るハンディターミナルの第一の位置決め領域の設定方法の説明図である。It is explanatory drawing of the setting method of the 1st positioning area | region of the handy terminal which concerns on Embodiment 1 of this invention. 元画像M(0)、縮小画像M(1)、M(2)におけるシンボルの高さを元画像での高さに換算した場合の高さを示す一覧表である。It is a table | surface which shows the height at the time of converting the height of the symbol in the original image M (0), the reduced image M (1), and M (2) into the height in an original image. 元画像におけるシンボルの高さに対して、適用するべき位置決め領域を設定した例示図である。It is the example figure which set the positioning area which should be applied to the height of the symbol in an original picture. 本発明の実施の形態1に係るハンディターミナルの第二の位置決め領域の設定方法の説明図である。It is explanatory drawing of the setting method of the 2nd positioning area | region of the handy terminal which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係るハンディターミナルの第三の位置決め領域の設定方法の説明図である。It is explanatory drawing of the setting method of the 3rd positioning area | region of the handy terminal which concerns on Embodiment 1 of this invention. 階調投影波形を生成した例示図である。It is the example figure which produced | generated the gradation projection waveform. シンボル領域S(i)の例示図である。It is an illustration figure of symbol area | region S (i). 本発明の実施の形態1に係るハンディターミナルのCPUの処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of CPU of the handy terminal which concerns on Embodiment 1 of this invention. 本発明の実施の形態2に係るハンディターミナルの機能ブロック図である。It is a functional block diagram of the handy terminal concerning Embodiment 2 of the present invention. 本発明の実施の形態2に係るハンディターミナルの位置決め領域の設定方法の説明図である。It is explanatory drawing of the setting method of the positioning area | region of the handy terminal which concerns on Embodiment 2 of this invention. 位置決め領域R(0)、R(1)、R(2)における位置決め領域の高さと、シンボルの高さ範囲とを示す一覧表である。It is a table | surface which shows the height of the positioning area | region in the positioning area | region R (0), R (1), R (2), and the height range of a symbol. シンボルの高さに対して、適用するべき位置決め領域を設定した例示図である。It is the illustration which set the positioning area | region which should be applied with respect to the height of a symbol. 本発明の実施の形態2に係るハンディターミナルのCPUの処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of CPU of the handy terminal which concerns on Embodiment 2 of this invention.

以下、本発明の実施の形態に係る携帯型光学式読取装置について、図面に基づいて具体的に説明する。本実施の形態では、携帯型光学式読取装置として、CPUを内蔵したハンディターミナルを採用する場合を例に挙げて説明する。   Hereinafter, a portable optical reader according to an embodiment of the present invention will be specifically described with reference to the drawings. In the present embodiment, a case where a handy terminal with a built-in CPU is adopted as a portable optical reader will be described as an example.

図1は、本発明の実施の形態に係るハンディターミナルの外観構成を示す模式図である。図1に示すように、ハンディターミナル100は、略方形である筐体10の外形を一方向に延長した板状である。筐体10の先端部分又は背面部分には、読取対象であるシンボルの光学的読取を行うための読取部(図示せず)が設けられている。読取部は、バーコードを読み取るスキャンモジュール、二次元コードや文字列等のシンボルを読み取るカメラモジュール等で構成される。   FIG. 1 is a schematic diagram showing an external configuration of a handy terminal according to an embodiment of the present invention. As shown in FIG. 1, the handy terminal 100 has a plate shape obtained by extending the outer shape of a substantially rectangular casing 10 in one direction. A reading unit (not shown) for optically reading a symbol to be read is provided at the front end portion or the back surface portion of the housing 10. The reading unit includes a scanning module that reads a barcode, a camera module that reads a symbol such as a two-dimensional code and a character string, and the like.

筐体10の上面には、ディスプレイ部(表示部)30と、キー配置部40とが設けられている。筐体10の一端側にディスプレイ部30が、ディスプレイ部30と反対側の他端側にキー配置部40が、それぞれ設けられている。   A display unit (display unit) 30 and a key arrangement unit 40 are provided on the upper surface of the housing 10. A display unit 30 is provided on one end side of the housing 10, and a key arrangement unit 40 is provided on the other end side opposite to the display unit 30.

筐体10は、ディスプレイ部30を備える表示部分DAと、キー配置部40を備える把持部分HAとで構成されており、ユーザは、把持部分HAを手で把持して、表示部分DAに設けられたディスプレイ部30の表示内容を参照しながら、把持部分HAの表面側に配置されたキー配置部40の各操作キー46を操作する。筐体10は、平面視において表示部分DAを幅広とし、把持部分HAを幅狭とする一方、側面視においては、把持部分HAが厚くなるようにしてある。これにより、把持部分HAを持ちやすくしている。   The housing 10 includes a display part DA including the display unit 30 and a gripping part HA including the key arrangement unit 40. The user grips the gripping part HA by hand and is provided on the display part DA. The respective operation keys 46 of the key arrangement unit 40 arranged on the surface side of the gripping portion HA are operated while referring to the display contents of the display unit 30. The housing 10 is configured such that the display part DA is wide and the grip part HA is narrow in plan view, while the grip part HA is thick in side view. This makes it easier to hold the gripping portion HA.

ディスプレイ部30は、筐体10の一面側に設けられており、読取対象のシンボルをカメラ部で撮像した画像、シンボルを復号化した情報、その他の設定情報といった各種の情報を表示する。ディスプレイ部30は、例えば液晶ディスプレイ(LCD)、有機EL等で構成されている。また、ディスプレイ部30は、タッチパネルとして構成されていても良い。   The display unit 30 is provided on one side of the housing 10 and displays various types of information such as an image obtained by capturing a symbol to be read by the camera unit, information obtained by decoding the symbol, and other setting information. The display unit 30 is configured by, for example, a liquid crystal display (LCD), an organic EL, or the like. The display unit 30 may be configured as a touch panel.

キー配置部40には、各種の操作を行うテンキーや電源キー44、ファンクションキー45といった複数の操作キー46が並べられている。キー配置部40に配置された各入力デバイスは、各種の入力操作を受け付けるキー入力部を構成している。また、ディスプレイ部30のタッチパネルも、キー入力部として機能している。   In the key arrangement unit 40, a plurality of operation keys 46 such as a numeric keypad for performing various operations, a power key 44, and a function key 45 are arranged. Each input device arranged in the key arrangement unit 40 constitutes a key input unit that accepts various input operations. The touch panel of the display unit 30 also functions as a key input unit.

ハンディターミナル100は、携帯性を担保するべく、駆動電力を供給するためのバッテリ(図示せず)を備えている。また、撮像する位置を特定する、すなわち読取位置を示す照準光を照射する照準光照射部、及び撮像部は、筐体10の背面側に設けられている。   The handy terminal 100 includes a battery (not shown) for supplying driving power to ensure portability. In addition, an aiming light irradiating unit that specifies a position to be imaged, that is, irradiates an aiming light that indicates a reading position, and an imaging unit are provided on the back side of the housing 10.

図2は、本発明の実施の形態に係るハンディターミナル100の、CPU等の制御部を用いた場合の構成を示すブロック図である。図2に示すように、本実施の形態に係るハンディターミナル100は、少なくとも動作を制御する制御プログラムを実行するCPU(制御部)101、RAM20、ROM21、表示部(ディスプレイ部)30、操作部(キー配置部)40、通信インタフェース50、撮像部60を備えている。   FIG. 2 is a block diagram showing a configuration of the handy terminal 100 according to the embodiment of the present invention when a control unit such as a CPU is used. As shown in FIG. 2, the handy terminal 100 according to the present embodiment includes a CPU (control unit) 101, a RAM 20, a ROM 21, a display unit (display unit) 30, an operation unit (at least a control program for controlling operations). A key arrangement unit) 40, a communication interface 50, and an imaging unit 60.

CPU101は、内部バス等を介してハンディターミナル100の上述したようなハードウェア各部と接続されており、上述したハードウェア各部の動作を制御するとともに、ROM21に記憶されているコンピュータプログラム200に従って、種々のソフトウェア的機能を実行する。RAM20は、SRAM、SDRAM等の揮発性メモリで構成され、コンピュータプログラム200の実行時にロードモジュールが展開され、コンピュータプログラム200の実行時に発生する一時的なデータ等を記憶する。   The CPU 101 is connected to the above-described hardware units of the handy terminal 100 via an internal bus or the like, controls the operation of the above-described hardware units, and performs various operations according to the computer program 200 stored in the ROM 21. Execute the software function of. The RAM 20 is composed of a volatile memory such as SRAM or SDRAM, and a load module is expanded when the computer program 200 is executed, and stores temporary data generated when the computer program 200 is executed.

ROM21には、ファームウェア211、デコーダ212、文字認識辞書213も記憶されている。ファームウェア211は、接続されている各ハードウェアの動作を制御するドライバソフトウェア等のプログラム群である。デコーダ212は、例えばQRコード(登録商標)やバーコードをデコードする。文字認識辞書213は、撮像された画像を、テキストデータに変換するための辞書である。   The ROM 21 also stores firmware 211, a decoder 212, and a character recognition dictionary 213. The firmware 211 is a group of programs such as driver software that controls the operation of each connected hardware. The decoder 212 decodes, for example, a QR code (registered trademark) or a barcode. The character recognition dictionary 213 is a dictionary for converting a captured image into text data.

通信インタフェース50は内部バスに接続されており、インターネット、LAN、WAN等の外部のネットワーク網に接続されることにより、外部のコンピュータ等とデータ送受信を行うことが可能となっている。操作部(キー配置部)40は、各種の入力操作を受け付けるキー入力部として機能し、キー入力により操作のための入力を受け付ける。   The communication interface 50 is connected to an internal bus, and is connected to an external network such as the Internet, a LAN, or a WAN, so that data can be transmitted / received to / from an external computer or the like. The operation unit (key arrangement unit) 40 functions as a key input unit that accepts various input operations, and accepts input for operations by key input.

撮像部60は、カメラ70と照準光照射部80とで構成されている。カメラ70は、VVDカメラ等、撮像対象を撮像できる撮像手段であれば特に限定されるものではない。また、照準光照射部80は、読取位置を視認できるよう撮像された画像の水平方向に延伸する直線状の光、あるいは水平方向と垂直方向の十字を形成する光等を照射する。   The imaging unit 60 includes a camera 70 and an aiming light irradiation unit 80. The camera 70 is not particularly limited as long as it is an imaging unit that can capture an imaging target, such as a VVD camera. The aiming light irradiation unit 80 irradiates linear light extending in the horizontal direction of an image captured so that the reading position can be visually recognized, or light that forms a cross in the horizontal and vertical directions.

本実施の形態に係るハンディターミナル100の読取動作の手順は以下のとおりである。図3は、本発明の実施の形態に係るハンディターミナル100の読取動作の手順を示すフローチャートである。   The procedure of the reading operation of the handy terminal 100 according to the present embodiment is as follows. FIG. 3 is a flowchart showing the procedure of the reading operation of the handy terminal 100 according to the embodiment of the present invention.

図3において、本実施の形態に係るハンディターミナル100のCPU101は、読取対象の検出の開始を指示するトリガボタンの押下げを検出したか否かを判断する(ステップS301)。CPU101が、トリガボタンの押下げを検出していないと判断した場合(ステップS301:NO)、CPU101は、検出待ち状態となる。CPU101が、トリガボタンの押下げを検出したと判断した場合(ステップS301:YES)、CPU101は、照準光(いわゆるエイマー)を照射し(ステップS302)、照射された近傍を撮像する(ステップS303)。   In FIG. 3, the CPU 101 of the handy terminal 100 according to the present embodiment determines whether or not the depression of the trigger button that instructs the start of detection of the reading target is detected (step S301). When the CPU 101 determines that pressing of the trigger button has not been detected (step S301: NO), the CPU 101 enters a detection waiting state. When the CPU 101 determines that pressing of the trigger button has been detected (step S301: YES), the CPU 101 emits aiming light (so-called aimer) (step S302), and images the irradiated vicinity (step S303). .

CPU101は、撮像された画像に含まれる文字列等の読取処理を実行し、読取に成功したか否かを判断する(ステップS304)。CPU101が、読取に失敗したと判断した場合(ステップS304:NO)、検出時間がタイムアウトになったか否かを判断する(ステップS305)。CPU101が、タイムアウトになっていないと判断した場合(ステップS305:NO)、CPU101は、処理をステップS303へ戻し、上述した処理を繰り返す。   The CPU 101 executes a reading process of a character string or the like included in the captured image, and determines whether the reading is successful (step S304). If the CPU 101 determines that reading has failed (step S304: NO), it determines whether the detection time has timed out (step S305). When the CPU 101 determines that the timeout has not occurred (step S305: NO), the CPU 101 returns the process to step S303 and repeats the above-described process.

CPU101が、タイムアウトになったと判断した場合(ステップS305:YES)、CPU101は、読取に失敗した旨を通知する(ステップS306)。CPU101が、読取に成功したと判断した場合(ステップS304:YES)、CPU101は、読取に成功した旨を通知する(ステップS307)。   When the CPU 101 determines that a time-out has occurred (step S305: YES), the CPU 101 notifies that reading has failed (step S306). When the CPU 101 determines that the reading is successful (step S304: YES), the CPU 101 notifies that the reading is successful (step S307).

読取に成功したか否かは、具体的には以下のような手順で判断する。図4は、本発明の実施の形態に係るハンディターミナル100の読取処理の手順を示すフローチャートである。   Specifically, whether or not the reading is successful is determined by the following procedure. FIG. 4 is a flowchart showing the procedure of the reading process of the handy terminal 100 according to the embodiment of the present invention.

図4において、本実施の形態に係るハンディターミナル100のCPU101は、文字列の読取が成功したか否かを判断する(ステップS401)。「読取が成功する」とは、何らかの文字列を認識したと判定できる状態を意味する。読取が成功した後、認識した文字列をそのまま記憶する、認識した文字列にマスターデータとの照合処理を実施する等の追加処理が考えられる。CPU101が、文字列の読取に失敗したと判断した場合(ステップS401:NO)、CPU101は、読取に失敗した旨を通知する(ステップS402)。   In FIG. 4, the CPU 101 of the handy terminal 100 according to the present embodiment determines whether or not the character string has been successfully read (step S401). “Reading succeeds” means a state in which it can be determined that some character string has been recognized. Additional processing such as storing the recognized character string as it is after the reading is successful, or performing collation processing with the master data on the recognized character string is conceivable. When the CPU 101 determines that reading of the character string has failed (step S401: NO), the CPU 101 notifies that reading has failed (step S402).

CPU101が、文字列の読取に成功したと判断した場合(ステップS401:YES)、CPU101は、読取文字列のマスターデータと照合して(ステップS403)、照合に成功したか否かを判断する(ステップS404)。「照合に成功する」とは、マスターデータに一致する文字が存在することを意味する。   When the CPU 101 determines that the character string has been successfully read (step S401: YES), the CPU 101 checks the master data of the read character string (step S403) and determines whether the matching has been successful (step S403). Step S404). “Successfully collating” means that there is a character that matches the master data.

CPU101が、照合に失敗したと判断した場合(ステップS404:NO)、CPU101は、照合に失敗した旨を通知する(ステップS405)。CPU101が、照合に成功したと判断した場合(ステップS404:YES)、CPU101は、照合に成功した旨を通知する(ステップS406)。この状態で、ハンディターミナル100による読取が正常に終了したことになる。   When the CPU 101 determines that the collation has failed (step S404: NO), the CPU 101 notifies that the collation has failed (step S405). When the CPU 101 determines that the collation is successful (step S404: YES), the CPU 101 notifies that the collation is successful (step S406). In this state, reading by the handy terminal 100 is normally completed.

照合処理としては、様々なバリエーションが考えられる。例えば文字列が一致しているか否かを照合する場合、マスターデータとして文字列を記憶しておき、読み取った文字列と一致する文字列がマスターデータに存在すれば、照合に成功したと判断することができる。   Various variations are conceivable as the verification process. For example, when collating whether or not the character strings match, the character string is stored as master data, and if there is a character string that matches the read character string in the master data, it is determined that the collation is successful. be able to.

また、マスターデータとして日付情報、例えば「2014/02/20」等を記憶しておき、読取文字列が日付として一致しているか否かを照合しても良い。この場合、単なる文字列としてではなく、日付情報として解釈しているので、例えば読取文字列が「14.2.20」であっても、日付として「2014/02/20」と解釈するようにしておくことでマスターデータと一致するとして、照合に成功したと判断することができる。   Further, date information such as “2014/02/20” may be stored as master data, and it may be verified whether or not the read character strings match as the date. In this case, since it is interpreted not as a simple character string but as date information, for example, even if the read character string is “14.2.20”, the date is interpreted as “2014/02/20”. Therefore, it can be determined that the collation has succeeded as matching with the master data.

さらに、マスターデータとして日付情報の範囲、例えば「2014/02/20〜2014/03/20」等を記憶しておき、読取文字列が、この範囲の日付として一致しているか否かを照合しても良い。この場合、読取文字列が「14.2.25」であっても、日付としてはマスターデータに記憶してある範囲内であることから、照合に成功したと判断することができる。   Further, a range of date information such as “2014/02/20 to 2014/03/20” is stored as master data, and it is verified whether or not the read character string matches the date of this range. May be. In this case, even if the read character string is “14.2.25”, since the date is within the range stored in the master data, it can be determined that the collation is successful.

(実施の形態1)
図5は、本発明の実施の形態1に係るハンディターミナル100の機能ブロック図である。本実施の形態1に係るハンディターミナル100の照準光照射手段501は、読取対象となる文字列が付されたワークに対して、読取位置を示す照準光を照射する。
(Embodiment 1)
FIG. 5 is a functional block diagram of the handy terminal 100 according to the first embodiment of the present invention. The aiming light irradiating means 501 of the handy terminal 100 according to the first embodiment irradiates the work attached with the character string to be read with the aiming light indicating the reading position.

撮像手段502は、照準光が照射された読取位置を含んでワークを撮像した撮像画像を取得する。ワーク表面には、読取対象となる文字列、あるいはQRコード(登録商標)、バーコード等が付されている。   The imaging unit 502 acquires a captured image obtained by capturing the workpiece including the reading position irradiated with the aiming light. A character string to be read, or a QR code (registered trademark), a barcode, or the like is attached to the surface of the work.

縮小画像生成手段503は、撮像された画像を複数の異なる縮小率で縮小した複数の縮小画像を生成する。つまり、一つの画像に対して、異なる縮小率で縮小した複数の縮小画像を生成する。   The reduced image generation unit 503 generates a plurality of reduced images obtained by reducing the captured image at a plurality of different reduction ratios. That is, a plurality of reduced images reduced at different reduction ratios are generated for one image.

領域設定手段504は、撮像された画像の照準光により定まる読取位置に基づいて、画像内の文字列の大きさと文字列の位置を決めるための位置決め領域の大きさとが相対的に変わるように、位置決め領域を複数設定する。本実施の形態1では、生成された複数の縮小画像に対して、それぞれ表示上の大きさが略同一である位置決め領域を設定する。   The area setting unit 504 is configured so that the size of the character string in the image and the size of the positioning area for determining the position of the character string change relatively based on the reading position determined by the aiming light of the captured image. Set multiple positioning areas. In the first embodiment, positioning areas having substantially the same display size are set for the plurality of generated reduced images.

例えば文字列の読取方向に略平行な線状の照準光が照射される場合、撮像された画像に対して、縮小率が順次2分の1となるような複数の縮小画像を生成する。ここでは、縮小前の元画像と縮小画像とを合わせて画像群と呼び、それぞれ元画像:M(0)、縮小1回画像:M(1)、縮小2回画像:M(2)、・・・、縮小n回画像:M(n)と符号を付する。   For example, when linear sighting light that is substantially parallel to the reading direction of a character string is irradiated, a plurality of reduced images are generated such that the reduction ratio is sequentially reduced by half with respect to the captured image. Here, the original image before reduction and the reduced image are collectively referred to as an image group, and the original image: M (0), reduced once image: M (1), reduced twice image: M (2),. ... Reduced n times image: M (n) is attached.

画像M(i)(i=0〜n)に対応する位置決め領域をR(i)とした場合、各位置決め領域R(i)は、文字列等の読取対象(以下、シンボル)が位置決めに適した高さ(ピクセル数)となる画像でシンボルを含むことができる範囲となるように設定する。   When the positioning area corresponding to the image M (i) (i = 0 to n) is R (i), each positioning area R (i) is suitable for positioning a reading target (hereinafter referred to as a symbol) such as a character string. The image is set to a range that can include symbols in an image having a height (number of pixels).

例えば、(1)シンボルが位置決めに適した高さ(ピクセル数)をhとし、(2)各辺の方向が画像のxy軸に沿った矩形領域とし、(3)x方向の範囲を、表示されている画像の横方向の最大幅とし、(4)y方向の範囲を、元画像の換算範囲でR(i)がR(i−1)よりも大きくなるように設定する。   For example, (1) the height (number of pixels) suitable for positioning the symbol is h, (2) the direction of each side is a rectangular area along the xy axis of the image, and (3) the range in the x direction is displayed. (4) The range in the y direction is set so that R (i) is larger than R (i-1) in the conversion range of the original image.

図6は、本発明の実施の形態1に係るハンディターミナル100の第一の位置決め領域の設定方法の説明図である。図6(a)に示すように、撮像された元画像M(0)に対して、文字列の読取方向に平行な線状の照準光の位置を読取位置61として、読取位置61を挟んで、文字列の読取方向に垂直な方向の幅2hの矩形領域を位置決め領域R(0)として設定する。   FIG. 6 is an explanatory diagram of a first positioning region setting method for the handy terminal 100 according to the first embodiment of the present invention. As shown in FIG. 6A, with respect to the captured original image M (0), the position of linear aiming light parallel to the reading direction of the character string is set as the reading position 61, and the reading position 61 is sandwiched between them. A rectangular area having a width 2h in a direction perpendicular to the reading direction of the character string is set as the positioning area R (0).

ここで、読取位置61には、文字列の読取方向に対して略平行な線状光である照準光が、基準線として照射されている。領域設定手段504は、照射された照準光で形成される基準線に基づいて、基準線の上方に第一のピクセル数だけ離れた位置に形成された上辺と、基準線の下方に第二のピクセル数だけ離れた位置に形成された下辺とを含む矩形領域を位置決め領域R(0)、R(1)、R(2)として設定している。   Here, the reading position 61 is irradiated with aiming light, which is linear light substantially parallel to the reading direction of the character string, as a reference line. The area setting unit 504 is configured to have an upper side formed at a position separated by the first number of pixels above the reference line and a second line below the reference line based on the reference line formed by the irradiated aiming light. A rectangular area including a lower side formed at a position separated by the number of pixels is set as positioning areas R (0), R (1), and R (2).

もちろん、第一のピクセル数と第二のピクセル数とは同じであっても良いし、異なっていても良い。さらに、位置決め領域を形成する矩形領域は、左辺及び右辺が、それぞれ縮小画像の左端及び右端に位置するよう設定することが好ましい。桁落ちすることなく文字列を読み取ることができるからである。   Of course, the first pixel number and the second pixel number may be the same or different. Further, the rectangular area forming the positioning area is preferably set so that the left side and the right side are positioned at the left end and the right end of the reduced image, respectively. This is because the character string can be read without dropping digits.

そして、図6(b)に示すように、元画像M(0)の縦横を2分の1に縮小した縮小画像M(1)に対して、文字列の読取方向に平行な線状の照準光の位置を読取位置61として、読取位置61を挟んで、元画像M(0)と同様に、文字列の読取方向に垂直な方向の幅2hの矩形領域を位置決め領域R(1)として設定する。   Then, as shown in FIG. 6B, a linear aiming parallel to the reading direction of the character string is applied to the reduced image M (1) obtained by reducing the length and width of the original image M (0) by half. A rectangular area having a width 2h in the direction perpendicular to the reading direction of the character string is set as the positioning area R (1) with the light position as the reading position 61 and the reading position 61 in between, as in the original image M (0). To do.

また、図6(c)に示すように、縮小画像M(1)の縦横を2分の1に縮小した縮小画像M(2)に対して、文字列の読取方向に平行な線状の照準光の位置を読取位置61として、読取位置61を挟んで、縮小画像M(1)と同様に、文字列の読取方向に垂直な方向の幅2hの矩形領域を位置決め領域R(2)として設定する。以下、順次縮小画像M(i)に対して、同様に位置決め領域R(i)を設定する。   Further, as shown in FIG. 6C, a linear aiming parallel to the character string reading direction is applied to the reduced image M (2) obtained by reducing the vertical and horizontal directions of the reduced image M (1) by half. A rectangular area having a width 2h in the direction perpendicular to the reading direction of the character string is set as the positioning area R (2) with the light position as the reading position 61 and the reading position 61 in between, as in the reduced image M (1). To do. Thereafter, the positioning region R (i) is similarly set for the sequentially reduced images M (i).

このように、画像自体は縮小するものの、文字列の読取方向に垂直な方向の幅が一定の2hの矩形領域を位置決め領域として設定することで、位置決め領域に占めるシンボルの大きさ(ここでは文字列の読取方向に垂直な方向であるので高さ)の割合を順次増大させることができる。   In this way, although the image itself is reduced, the size of the symbol occupying the positioning area (here, the character) is set by setting a rectangular area of 2h having a constant width in the direction perpendicular to the reading direction of the character string as the positioning area. Since the direction is perpendicular to the column reading direction, the ratio of height) can be increased sequentially.

このとき、元画像M(0)、縮小画像M(1)、M(2)、・・・、M(n)におけるシンボルの高さ(大きさ)は、各位置決め領域の4分の1〜4分の3の範囲、言い換えればシンボルの高さがh/2〜3h/2の範囲となる。したがって、例えば元画像M(0)、縮小画像M(1)、M(2)におけるシンボルの高さを元画像での高さに換算すると以下のようになる。   At this time, the height (size) of the symbols in the original image M (0), reduced images M (1), M (2),. The range of three quarters, in other words, the symbol height is in the range of h / 2 to 3h / 2. Therefore, for example, the symbol height in the original image M (0), reduced image M (1), M (2) is converted into the height in the original image as follows.

図7は、元画像M(0)、縮小画像M(1)、M(2)におけるシンボルの高さを元画像での高さに換算した場合の高さを示す一覧表である。図7に示すように、元画像M(0)における位置決め領域の高さは、それぞれ2h、4h、8hとなるので、元画像M(0)での高さに換算した元画像M(0)におけるシンボルの高さ範囲は、それぞれh/2〜3h/2、h〜3h、2h〜6hの範囲となる。   FIG. 7 is a list showing the heights when the symbol heights in the original image M (0), the reduced images M (1), and M (2) are converted into the heights in the original image. As shown in FIG. 7, the heights of the positioning regions in the original image M (0) are 2h, 4h, and 8h, respectively, so the original image M (0) converted to the height in the original image M (0). The height ranges of the symbols in h are the ranges of h / 2 to 3h / 2, h to 3h, and 2h to 6h, respectively.

そして、シンボルの高さに応じて、適用するべき位置決め領域を選択する。このとき、適切な位置決め領域を選択することができなくならないよう、シンボルの高さ範囲が重複するよう設定しておく。   Then, the positioning area to be applied is selected according to the height of the symbol. At this time, the height ranges of the symbols are set to overlap so that an appropriate positioning area cannot be selected.

図8は、元画像におけるシンボルの高さに対して、適用するべき位置決め領域を設定した例示図である。図8では、シンボルの高さに応じて、○印の付されている位置決め領域を適用することができることを示している。   FIG. 8 is an exemplary diagram in which a positioning area to be applied is set with respect to the height of the symbol in the original image. FIG. 8 shows that a positioning area marked with a circle can be applied according to the height of the symbol.

図8に示すように、元画像M(0)での高さに換算したシンボルの高さ範囲がh/2〜3h/2の場合には、元画像M(0)における位置決め領域R(0)を、元画像M(0)での高さに換算したシンボルの高さ範囲がh〜3hの場合には、縮小画像M(1)における位置決め領域R(1)を、元画像M(0)での高さに換算したシンボルの高さ範囲が2h〜6hの場合には、縮小画像M(2)における位置決め領域R(2)を、それぞれ適用することで、無駄な演算処理を抑制し、効率的に読取処理を実行することができる。   As shown in FIG. 8, when the symbol height range converted to the height in the original image M (0) is h / 2 to 3h / 2, the positioning region R (0) in the original image M (0). ) Is converted to the height of the original image M (0), and the height range of the symbol is h to 3h, the positioning region R (1) in the reduced image M (1) is changed to the original image M (0). In the case where the height range of the symbol converted into the height in (2) is 2h to 6h, by applying the positioning region R (2) in the reduced image M (2), unnecessary calculation processing is suppressed. The reading process can be executed efficiently.

なお、位置決め領域の高さを一定にすることに限定されるものではない。図9は、本発明の実施の形態1に係るハンディターミナル100の第二の位置決め領域の設定方法の説明図である。図9(a)に示すように、撮像された元画像M(0)に対して、文字列の読取方向に平行な線状の照準光の位置を読取位置61として、読取位置61を挟んで、文字列の読取方向に垂直な方向の幅2hの矩形領域を位置決め領域R(0)として設定する。   Note that the height of the positioning region is not limited to be constant. FIG. 9 is an explanatory diagram of a method for setting the second positioning region of the handy terminal 100 according to the first embodiment of the present invention. As shown in FIG. 9A, with respect to the captured original image M (0), the position of linear aiming light parallel to the reading direction of the character string is set as the reading position 61, and the reading position 61 is sandwiched between them. A rectangular area having a width 2h in a direction perpendicular to the reading direction of the character string is set as the positioning area R (0).

そして、図9(b)に示すように、元画像M(0)の縦横を2分の1に縮小した縮小画像M(1)に対して、文字列の読取方向に平行な線状の照準光の位置を読取位置61として、読取位置61を挟んで、文字列の読取方向に垂直な方向の幅1.5hの矩形領域を位置決め領域R(1)として設定する。これにより、元画像M(0)における位置決め領域R(1)の高さは3hとなる。   Then, as shown in FIG. 9B, a linear aiming parallel to the reading direction of the character string is applied to the reduced image M (1) obtained by reducing the length and width of the original image M (0) by half. A rectangular area having a width of 1.5 h in the direction perpendicular to the reading direction of the character string is set as the positioning area R (1) with the light position as the reading position 61 and the reading position 61 interposed therebetween. As a result, the height of the positioning region R (1) in the original image M (0) is 3h.

同様に、図9(c)に示すように、縮小画像M(1)の縦横を2分の1に縮小した縮小画像M(2)に対して、文字列の読取方向に平行な線状の照準光の位置を読取位置61として、読取位置61を挟んで、文字列の読取方向に垂直な方向の幅hの矩形領域を位置決め領域R(2)として設定する。これにより、元画像M(0)における位置決め領域R(2)の高さは4hとなる。以下、順次縮小画像における位置決め領域の高さの絶対値を小さくする。   Similarly, as shown in FIG. 9C, a linear image parallel to the character string reading direction is obtained with respect to the reduced image M (2) obtained by reducing the vertical and horizontal directions of the reduced image M (1) by half. The position of the aiming light is set as the reading position 61, and a rectangular area having a width h in a direction perpendicular to the reading direction of the character string with the reading position 61 interposed therebetween is set as the positioning area R (2). As a result, the height of the positioning region R (2) in the original image M (0) is 4h. Hereinafter, the absolute value of the height of the positioning area in the reduced image is sequentially reduced.

逆に、順次縮小画像における位置決め領域の高さの絶対値を大きくしても良い。図10は、本発明の実施の形態1に係るハンディターミナル100の第三の位置決め領域の設定方法の説明図である。図10(a)に示すように、撮像された元画像M(0)に対して、文字列の読取方向に平行な線状の照準光の位置を読取位置61として、読取位置61を挟んで、文字列の読取方向に垂直な方向の幅2hの矩形領域を位置決め領域R(0)として設定する。   Conversely, the absolute value of the height of the positioning area in the reduced image may be increased sequentially. FIG. 10 is an explanatory diagram of a third positioning region setting method for the handy terminal 100 according to the first embodiment of the present invention. As shown in FIG. 10A, with respect to the captured original image M (0), the position of linear aiming light parallel to the reading direction of the character string is set as the reading position 61, and the reading position 61 is sandwiched between them. A rectangular area having a width 2h in a direction perpendicular to the reading direction of the character string is set as the positioning area R (0).

そして、図10(b)に示すように、元画像M(0)の縦横を2分の1に縮小した縮小画像M(1)に対して、文字列の読取方向に平行な線状の照準光の位置を読取位置61として、読取位置61を挟んで、文字列の読取方向に垂直な方向の幅2.5hの矩形領域を位置決め領域R(1)として設定する。これにより、元画像M(0)における位置決め領域R(1)の高さは5hとなる。   Then, as shown in FIG. 10B, a linear aiming parallel to the character string reading direction is applied to the reduced image M (1) obtained by reducing the length and width of the original image M (0) by half. A rectangular area having a width of 2.5 h in a direction perpendicular to the reading direction of the character string is set as the positioning area R (1) with the light position as the reading position 61 and the reading position 61 interposed therebetween. As a result, the height of the positioning region R (1) in the original image M (0) is 5h.

同様に、図10(c)に示すように、縮小画像M(1)の縦横を2分の1に縮小した縮小画像M(2)に対して、文字列の読取方向に平行な線状の照準光の位置を読取位置61として、読取位置61を挟んで、文字列の読取方向に垂直な方向の幅3hの矩形領域を位置決め領域R(2)として設定する。これにより、元画像M(0)における位置決め領域R(2)の高さは12hとなる。以下、順次縮小画像における位置決め領域の高さの絶対値を大きくする。   Similarly, as shown in FIG. 10C, a linear image parallel to the character string reading direction is obtained with respect to the reduced image M (2) obtained by reducing the vertical and horizontal directions of the reduced image M (1) by half. The position of the aiming light is set as the reading position 61, and a rectangular area having a width of 3h in a direction perpendicular to the reading direction of the character string is set as the positioning area R (2) with the reading position 61 interposed therebetween. Thereby, the height of the positioning region R (2) in the original image M (0) is 12h. Hereinafter, the absolute value of the height of the positioning region in the reduced image is sequentially increased.

このように、画像自体は縮小するものの、文字列の読取方向に垂直な方向の幅を一定値あるいは適度に順次変化させた矩形領域を位置決め領域として設定することで、位置決め領域に占めるシンボルの大きさ(高さ)の割合を順次増大させることができる。   As described above, although the image itself is reduced, a rectangular area in which the width in the direction perpendicular to the reading direction of the character string is changed to a constant value or sequentially is set as the positioning area, so that the size of the symbol in the positioning area is increased. The ratio of height (height) can be increased sequentially.

なお、位置決め領域R(i)(i=0、1、2、・・・、n)において、シンボルが存在する領域であるシンボル領域S(i)を検出する方法は、特に限定されるものではない。例えば、文字列の読取方向をx方向、文字列の読取方向に垂直な方向をy方向とした場合、x方向の階調投影波形、及びy方向の階調投影波形を、適用された位置決め領域内で生成する。   In the positioning region R (i) (i = 0, 1, 2,..., N), the method for detecting the symbol region S (i) that is a region where the symbol exists is not particularly limited. Absent. For example, when the reading direction of the character string is the x direction and the direction perpendicular to the reading direction of the character string is the y direction, the gradation projection waveform in the x direction and the gradation projection waveform in the y direction are applied to the positioning region applied. Generate within.

図11は、階調投影波形を生成した例示図である。図11の例では、文字列「2014」に対して、位置決め領域R(i)におけるx方向の階調投影波形111、及びy方向の階調投影波形112を、それぞれ生成している。そして、生成された階調投影波形の値が所定の閾値以上である部分が一定以上連続している部分(範囲)を、シンボル領域S(i)として検出する。   FIG. 11 is a view showing an example in which a gradation projection waveform is generated. In the example of FIG. 11, the gradation projection waveform 111 in the x direction and the gradation projection waveform 112 in the y direction in the positioning region R (i) are respectively generated for the character string “2014”. Then, a portion (range) in which a portion where the value of the generated gradation projection waveform is equal to or greater than a predetermined threshold is continued for a certain amount is detected as a symbol region S (i).

すなわちx方向の階調投影波形111の値が所定の閾値以上である部分が一定以上連続している部分である範囲113が、シンボル領域S(i)のy方向の範囲、y方向の階調投影波形112の値が所定の閾値以上である部分が一定以上連続している部分である範囲114が、シンボル領域S(i)のx方向の範囲となり、矩形領域として検出することができる。   That is, a range 113 in which a portion in which the value of the projected gradation waveform 111 in the x direction is equal to or greater than a predetermined threshold is a portion that is continuous for a certain distance is a range in the y direction of the symbol region S (i) A range 114 in which a portion where the value of the projected waveform 112 is equal to or greater than a predetermined threshold is a portion in which a portion of the projection waveform 112 is continuous for a certain amount is a range in the x direction of the symbol region S (i), and can be detected as a rectangular region.

図12は、シンボル領域S(i)の例示図である。図11における範囲113、114で囲まれる矩形領域をシンボル領域S(i)として検出している。ただし、シンボル領域S(i)の高さがh/2〜3h/2の範囲外である場合、位置決め領域R(i)におけるシンボル領域S(i)としては検出しない。つまり、位置決め領域R(i)に対してシンボル領域S(i)として過小である場合には不適切であり、あるいは位置決め領域R(i)内に収まっていない場合には文字列を読み取ることができないので、シンボル領域S(i)として検出しないようにしている。   FIG. 12 is an illustration of the symbol area S (i). A rectangular area surrounded by ranges 113 and 114 in FIG. 11 is detected as a symbol area S (i). However, when the height of the symbol region S (i) is outside the range of h / 2 to 3h / 2, it is not detected as the symbol region S (i) in the positioning region R (i). That is, it is inappropriate when it is too small as the symbol area S (i) relative to the positioning area R (i), or the character string is read when it is not within the positioning area R (i). Since it cannot be performed, the symbol area S (i) is not detected.

図5に戻って、領域評価手段505は、設定された複数の位置決め領域に対して、それぞれ文字列が含まれる領域として適当であるか否かを評価する。位置決め領域の評価方法は、特に限定されるものではない。   Returning to FIG. 5, the area evaluation unit 505 evaluates whether or not each of the set positioning areas is appropriate as an area including a character string. The evaluation method of the positioning area is not particularly limited.

例えば複数のシンボル領域S(i)が有効であると検出された場合、どのシンボル領域S(i)から文字列の読取処理を実行するかを定める必要が生じる。もちろん、iの値の昇順に実行しても良い。しかし、可能な限り文字列が存在する可能性が高いシンボル領域S(i)から読取処理を実行する方が効率が高い。   For example, when it is detected that a plurality of symbol areas S (i) are valid, it is necessary to determine from which symbol area S (i) the character string reading process is executed. Of course, it may be executed in ascending order of the value of i. However, it is more efficient to execute the reading process from the symbol area S (i) where there is a high possibility that a character string exists.

そこで、文字列が存在する可能性を、周波数の高低で判断する。つまり、文字列領域は、他の領域よりも周波数が高くなる、という特徴を利用する。具体的には、まずシンボル領域S(i)を、(式1)に従ってフーリエ変換する。   Therefore, the possibility that a character string exists is determined based on the frequency level. That is, the character string area uses the feature that the frequency is higher than that of other areas. Specifically, first, the symbol region S (i) is Fourier transformed according to (Equation 1).

次に、フーリエ変換された周波数空間における周波数の平均値を算出する。算出された周波数の平均値が所定の閾値以上であるか否かに応じて、文字列が存在するか否かを判断する。文字列が存在すると判断されたシンボル領域については、算出された周波数の平均値を評価値P(i)として記憶する。   Next, an average value of frequencies in the frequency space subjected to Fourier transform is calculated. Whether or not a character string exists is determined according to whether or not the calculated average value of the frequencies is equal to or greater than a predetermined threshold value. For the symbol area where it is determined that a character string exists, the average value of the calculated frequencies is stored as the evaluation value P (i).

文字列が存在しないと判断されたシンボル領域については、評価値P(i)を‘0’とする。文字列の読取処理は、評価値P(i)の大きい順に実行される。   The evaluation value P (i) is set to ‘0’ for the symbol area where it is determined that no character string exists. The character string reading process is executed in descending order of the evaluation value P (i).

図5に戻って、文字列読取手段(シンボル読取手段)506は、評価結果に基づいて特定された位置決め領域内の文字列について読取処理を実行する。具体的には、評価値P(i)の大きいシンボル領域S(i)から順に文字列の読取処理を実行する。読取処理が失敗した場合には、次に評価値の大きいシンボル領域について文字列の読取処理を実行する。   Returning to FIG. 5, the character string reading unit (symbol reading unit) 506 executes a reading process on the character string in the positioning area specified based on the evaluation result. Specifically, the character string reading process is executed in order from the symbol area S (i) having the largest evaluation value P (i). If the reading process fails, the character string reading process is executed for the symbol area having the next highest evaluation value.

図13は、本発明の実施の形態1に係るハンディターミナル100のCPU101の処理手順を示すフローチャートである。ハンディターミナル100のCPU101は、撮像された元画像M(0)を取得する(ステップS1301)。CPU101は、元画像M(0)に基づいて、縮小画像M(1)、M(2)、・・・、M(n)を生成する(ステップS1302)。ここで、nは縮小画像の枚数であり、本実施の形態1ではn=2である。   FIG. 13 is a flowchart showing the processing procedure of the CPU 101 of the handy terminal 100 according to the first embodiment of the present invention. The CPU 101 of the handy terminal 100 acquires the captured original image M (0) (step S1301). The CPU 101 generates reduced images M (1), M (2),..., M (n) based on the original image M (0) (step S1302). Here, n is the number of reduced images, and n = 2 in the first embodiment.

CPU101は、各画像M(0)〜M(n)それぞれに対して、位置決め領域R(0)〜R(n)を設定し(ステップS1303)、引数iを‘0’に設定する(ステップS1304)。CPU101は、位置決め領域R(i)に対して位置決め処理を実行して、シンボル領域S(i)(i=0〜n)を取得する(ステップS1305)。   The CPU 101 sets positioning regions R (0) to R (n) for each of the images M (0) to M (n) (step S1303), and sets an argument i to '0' (step S1304). ). The CPU 101 executes a positioning process on the positioning region R (i) to obtain a symbol region S (i) (i = 0 to n) (step S1305).

CPU101は、シンボル領域S(i)の評価値P(i)を算出し(ステップS1306)、iがnに到達したか否かを判断する(ステップS1307)。CPU101が、iがnより小さいと判断した場合には(ステップS1307:NO)、CPU101は、iを‘1’インクリメントして(ステップS1308)、処理をステップS1305へ戻して上述した処理を繰り返す。   The CPU 101 calculates the evaluation value P (i) of the symbol area S (i) (step S1306), and determines whether i has reached n (step S1307). When the CPU 101 determines that i is smaller than n (step S1307: NO), the CPU 101 increments i by “1” (step S1308), returns the process to step S1305, and repeats the above-described process.

CPU101が、iがnに到達したと判断した場合には(ステップS1307:YES)、CPU101は、シンボル領域S(i)を評価値P(i)の大きさでソートし(ステップS1309)、カウンタkに‘0’を設定する(ステップS1310)。CPU101は、シンボル領域S(k)に対して文字列の読取処理を実行する(ステップS1311)。CPU101は、読取に成功したか否かを判断し(ステップS1312)、CPU101が、読取に成功したと判断した場合には(ステップS1312:YES)、CPU101は、処理を終了する。   If the CPU 101 determines that i has reached n (step S1307: YES), the CPU 101 sorts the symbol areas S (i) by the size of the evaluation value P (i) (step S1309), and the counter “0” is set to k (step S1310). The CPU 101 executes a character string reading process on the symbol area S (k) (step S1311). The CPU 101 determines whether the reading is successful (step S1312). If the CPU 101 determines that the reading is successful (step S1312: YES), the CPU 101 ends the process.

CPU101が、読取に失敗したと判断した場合には(ステップS1312:NO)、CPU101は、kがmに到達したか否かを判断する(ステップS1313)。ここで、mは、文字列の読取対象となるシンボル領域S(i)の数の上限値を意味する。   When the CPU 101 determines that reading has failed (step S1312: NO), the CPU 101 determines whether k has reached m (step S1313). Here, m means an upper limit value of the number of symbol areas S (i) to be read from the character string.

CPU101が、kがmに到達したと判断した場合(ステップS1313:YES)、CPU101は、処理を終了する。CPU101が、kがmより小さいと判断した場合(ステップS1313:NO)、CPU101は、kを‘1’インクリメントし(ステップS1314)、処理をステップS1311に戻して上述した処理を繰り返す。   When the CPU 101 determines that k has reached m (step S1313: YES), the CPU 101 ends the process. When the CPU 101 determines that k is smaller than m (step S1313: NO), the CPU 101 increments k by “1” (step S1314), returns the process to step S1311, and repeats the above-described process.

以上のように本実施の形態1によれば、照準光により定まる読取位置に基づいて、画像内の文字列の大きさと文字列の位置を決めるための位置決め領域の大きさとが相対的に変わるように、生成した縮小画像のそれぞれに対して、表示上の大きさが略同一である位置決め領域を設定する。位置決め領域の大きさを変えずに画像の縮小率を変えることにより、倉庫内の商品の棚卸等のように、サイズが多種多様な文字列を大量に読み取る必要がある場合であっても、光学式読取装置を使用する都度、ワークから遠ざけたり近づけたりする必要がない。また、画面全体を読取処理の対象領域とする必要がないので、文字列が存在しない領域については読取処理を実行する必要がなく、演算処理負荷を軽減することにより読取時間を短縮することが可能となる。   As described above, according to the first embodiment, the size of the character string in the image and the size of the positioning area for determining the position of the character string are relatively changed based on the reading position determined by the aiming light. In addition, a positioning area having substantially the same display size is set for each of the generated reduced images. By changing the image reduction ratio without changing the size of the positioning area, even if it is necessary to read a large number of character strings of various sizes, such as inventory of goods in a warehouse, optical It is not necessary to keep away from or close to the work each time the type reader is used. In addition, since it is not necessary to set the entire screen as the target area for reading processing, it is not necessary to execute reading processing for areas where character strings do not exist, and the reading time can be shortened by reducing the processing load. It becomes.

(実施の形態2)
本発明の実施の形態2に係るハンディターミナル100の構成は、実施の形態1と同様であることから、同一の符号を付することで詳細な説明は省略する。本実施の形態2は、画像を縮小することなく位置決め領域の、文字列の読取方向と垂直な方向の幅を変化させる点で実施の形態1とは相違する。
(Embodiment 2)
Since the configuration of the handy terminal 100 according to the second embodiment of the present invention is the same as that of the first embodiment, detailed description thereof is omitted by attaching the same reference numerals. The second embodiment is different from the first embodiment in that the width of the positioning region in the direction perpendicular to the character string reading direction is changed without reducing the image.

図14は、本発明の実施の形態2に係るハンディターミナル100の機能ブロック図である。本実施の形態2に係るハンディターミナル100の照準光照射手段501は、読取対象となる文字列が付されたワークに対して、読取位置を示す照準光を照射する。   FIG. 14 is a functional block diagram of the handy terminal 100 according to the second embodiment of the present invention. The aiming light irradiating means 501 of the handy terminal 100 according to the second embodiment irradiates the work with the character string to be read with the aiming light indicating the reading position.

撮像手段502は、照準光が照射された読取位置を含んでワークを撮像した撮像画像を取得する。ワーク表面には、読取対象となる文字列、あるいはQRコード(登録商標)、バーコード等が付されている。   The imaging unit 502 acquires a captured image obtained by capturing the workpiece including the reading position irradiated with the aiming light. A character string to be read, or a QR code (registered trademark), a barcode, or the like is attached to the surface of the work.

領域設定手段504は、撮像された画像の照準光により定まる読取位置に基づいて、画像内の文字列の大きさと文字列の位置を決めるための位置決め領域の大きさとが相対的に変わるように、位置決め領域を複数設定する。実施の形態2では、照準光は線状光であり、線状の照準光を文字列の読取方向と略平行になるよう照射し、文字列の読取方向に垂直な方向の位置決め領域の幅を、段階的に相違させている。   The area setting unit 504 is configured so that the size of the character string in the image and the size of the positioning area for determining the position of the character string change relatively based on the reading position determined by the aiming light of the captured image. Set multiple positioning areas. In the second embodiment, the aiming light is linear light, and the linear aiming light is irradiated so as to be substantially parallel to the reading direction of the character string, and the width of the positioning region in the direction perpendicular to the reading direction of the character string is set. The difference is in stages.

例えば領域設定手段504の位置決め領域設定手段507は、文字列の読取方向に垂直な方向の位置決め領域の幅を、単位幅をhとして、文字列の読取方向に略平行に照射された照準光を挟んで幅2h、4h、8h、・・・となるよう、位置決め領域を設定する。図15は、本発明の実施の形態2に係るハンディターミナル100の位置決め領域の設定方法の説明図である。   For example, the positioning area setting means 507 of the area setting means 504 uses the width of the positioning area in the direction perpendicular to the reading direction of the character string as the unit width h, and the aiming light irradiated substantially parallel to the reading direction of the character string. The positioning area is set so that the width is 2h, 4h, 8h,. FIG. 15 is an explanatory diagram of a positioning region setting method for the handy terminal 100 according to the second embodiment of the present invention.

図15(a)に示すように、撮像された画像M(0)に対して、文字列の読取方向に平行な線状の照準光の位置を読取位置61として、読取位置61を挟んで、文字列の読取方向に垂直な方向の幅2hの矩形領域を位置決め領域R(0)として設定する。   As shown in FIG. 15A, with respect to the captured image M (0), the position of linear aiming light parallel to the reading direction of the character string is set as the reading position 61, and the reading position 61 is sandwiched between them. A rectangular area having a width 2h in the direction perpendicular to the reading direction of the character string is set as the positioning area R (0).

そして、図15(b)に示すように、撮像された画像M(0)に対して、文字列の読取方向に平行な線状の照準光の位置を読取位置61として、読取位置61を挟んで、文字列の読取方向に垂直な方向の幅4hの矩形領域を位置決め領域R(1)として設定する。   Then, as shown in FIG. 15B, with respect to the captured image M (0), the position of linear aiming light parallel to the reading direction of the character string is set as the reading position 61, and the reading position 61 is sandwiched. Thus, a rectangular area having a width of 4h in the direction perpendicular to the reading direction of the character string is set as the positioning area R (1).

また、図15(c)に示すように、撮像された画像M(0)に対して、文字列の読取方向に平行な線状の照準光の位置を読取位置61として、読取位置61を挟んで、文字列の読取方向に垂直な方向の幅8hの矩形領域を位置決め領域R(2)として設定する。以下、順次画像M(0)に対して、同様に位置決め領域R(i)を設定する。   Further, as shown in FIG. 15C, with respect to the captured image M (0), the position of the linear aiming light parallel to the reading direction of the character string is set as the reading position 61, and the reading position 61 is sandwiched. Thus, a rectangular area having a width of 8h in the direction perpendicular to the reading direction of the character string is set as the positioning area R (2). Thereafter, the positioning region R (i) is similarly set for the sequential image M (0).

このように、画像を縮小することなく、文字列の読取方向に垂直な方向の幅を変化させた矩形領域を位置決め領域として設定することで、位置決め領域に占めるシンボルの大きさ(ここでは文字列の読取方向に垂直な方向であるので高さ)の割合を変えることができる。   In this way, by setting a rectangular area whose width in the direction perpendicular to the reading direction of the character string is changed as the positioning area without reducing the image, the size of the symbol occupying the positioning area (here, the character string) The height ratio can be changed because the direction is perpendicular to the reading direction.

このとき、画像M(0)におけるシンボルの高さ範囲は、例えば位置決め領域R(0)については、シンボルの高さがh/2〜3h/2の範囲となる。以下、位置決め領域R(i)のシンボルの高さ範囲を事前に定めておく。   At this time, the symbol height range in the image M (0) is, for example, in the positioning region R (0), where the symbol height is in a range of h / 2 to 3h / 2. Hereinafter, the height range of the symbols in the positioning region R (i) is determined in advance.

図16は、位置決め領域R(0)、R(1)、R(2)における位置決め領域の高さと、シンボルの高さ範囲とを示す一覧表である。図16に示すように、位置決め領域R(0)、R(1)、R(2)における位置決め領域の高さは、それぞれ2h、4h、8hとなるので、シンボルの高さ範囲は、それぞれh/2〜3h/2、h〜3h、2h〜6hの範囲となる。   FIG. 16 is a list showing the heights of the positioning areas and the symbol height ranges in the positioning areas R (0), R (1), and R (2). As shown in FIG. 16, the heights of the positioning regions in the positioning regions R (0), R (1), and R (2) are 2h, 4h, and 8h, respectively. / 2 to 3h / 2, h to 3h, 2h to 6h.

そして、シンボルの高さに応じて、適用するべき位置決め領域を選択する。このとき、適切な位置決め領域を選択することができなくならないよう、シンボルの高さ範囲が重複するよう設定しておく。   Then, the positioning area to be applied is selected according to the height of the symbol. At this time, the height ranges of the symbols are set to overlap so that an appropriate positioning area cannot be selected.

図17は、シンボルの高さに対して、適用するべき位置決め領域を設定した例示図である。図17では、シンボルの高さに応じて、○印の付されている位置決め領域を適用することができることを示している。   FIG. 17 is an exemplary diagram in which a positioning area to be applied is set with respect to the height of a symbol. FIG. 17 shows that a positioning area marked with a circle can be applied depending on the height of the symbol.

図17に示すように、シンボルの高さがh/2〜3h/2の範囲の場合には、位置決め領域R(0)を、シンボルの高さがh〜3hの範囲の場合には、位置決め領域R(1)を、シンボルの高さが2h〜6hの範囲の場合には、位置決め領域R(2)を、それぞれ適用することで、無駄な演算処理を抑制し、効率的に読取処理を実行することができる。   As shown in FIG. 17, when the symbol height is in the range of h / 2 to 3h / 2, the positioning region R (0) is set. When the symbol height is in the range of h to 3h, the positioning is set. When the area R (1) is in the range of 2h to 6h in symbol height, the positioning area R (2) is applied to suppress unnecessary calculation processing and efficiently perform reading processing. Can be executed.

例えば、位置決め領域R(0)では小さな図形(文字列)を読み取るために、精緻な読取処理を実行することができる。一方、位置決め領域R(2)では大きな図形(文字列)を読み取るために、全ての画素ではなく、所定の割合で間引き処理した状態で読取処理を実行しても良い。このように読取対象となる図形(文字列)の大きさに応じた位置決め処理を実行することで、大きさに応じた必要最小限の演算処理により読取処理を実行することが可能となる。   For example, in order to read a small figure (character string) in the positioning region R (0), it is possible to execute a precise reading process. On the other hand, in order to read a large figure (character string) in the positioning region R (2), the reading process may be executed in a state where thinning processing is performed at a predetermined ratio instead of all pixels. By executing the positioning process according to the size of the figure (character string) to be read in this way, it is possible to execute the reading process with the minimum necessary arithmetic processing according to the size.

図18は、本発明の実施の形態2に係るハンディターミナル100のCPU101の処理手順を示すフローチャートである。ハンディターミナル100のCPU101は、撮像された画像M(0)を取得する(ステップS1801)。CPU101は、シンボルの高さに応じて、複数の異なるシンボルの高さ範囲を有する位置決め領域R(0)、R(1)、・・・、R(n)を設定する(ステップS1802)。ここで、nは位置決め領域の数であり、本実施の形態2ではn=2である。   FIG. 18 is a flowchart showing a processing procedure of the CPU 101 of the handy terminal 100 according to the second embodiment of the present invention. The CPU 101 of the handy terminal 100 acquires the captured image M (0) (step S1801). The CPU 101 sets positioning regions R (0), R (1),..., R (n) having a plurality of different symbol height ranges according to the symbol height (step S1802). Here, n is the number of positioning regions, and n = 2 in the second embodiment.

CPU101は、引数iを‘1’に設定し(ステップS1803)、位置決め領域R(i)に対して位置決め処理を実行して、シンボル領域S(i)(i=0〜n)を取得する(ステップS1804)。CPU101は、シンボル領域S(i)の評価値P(i)を算出し(ステップS1805)、iがnに到達したか否かを判断する(ステップS1806)。   The CPU 101 sets the argument i to “1” (step S1803), executes the positioning process on the positioning region R (i), and acquires the symbol region S (i) (i = 0 to n) ( Step S1804). The CPU 101 calculates the evaluation value P (i) of the symbol area S (i) (step S1805), and determines whether i has reached n (step S1806).

CPU101が、iがnより小さいと判断した場合には(ステップS1806:NO)、CPU101は、iを‘1’インクリメントして(ステップS1807)、処理をステップS1804へ戻して上述した処理を繰り返す。   When the CPU 101 determines that i is smaller than n (step S1806: NO), the CPU 101 increments i by “1” (step S1807), returns the process to step S1804, and repeats the above-described process.

CPU101が、iがnに到達したと判断した場合には(ステップS1806:YES)、CPU101は、シンボル領域S(i)を評価値P(i)の大きさでソートし(ステップS1808)、カウンタkに‘0’を設定する(ステップS1809)。CPU101は、シンボル領域S(k)に対して文字列の読取処理を実行する(ステップS1810)。   When the CPU 101 determines that i has reached n (step S1806: YES), the CPU 101 sorts the symbol areas S (i) by the size of the evaluation value P (i) (step S1808), and the counter “0” is set to k (step S1809). The CPU 101 executes a character string reading process on the symbol area S (k) (step S1810).

CPU101は、読取に成功したか否かを判断し(ステップS1811)、CPU101が、読取に成功したと判断した場合には(ステップS1811:YES)、CPU101は、処理を終了する。CPU101が、読取に失敗したと判断した場合には(ステップS1811:NO)、CPU101は、kがmに到達したか否かを判断する(ステップS1812)。ここで、mは、文字列の読取対象となるシンボル領域S(i)の数の上限値を意味する。   The CPU 101 determines whether the reading is successful (step S1811). If the CPU 101 determines that the reading is successful (step S1811: YES), the CPU 101 ends the process. When the CPU 101 determines that reading has failed (step S1811: NO), the CPU 101 determines whether k has reached m (step S1812). Here, m means an upper limit value of the number of symbol areas S (i) to be read from the character string.

CPU101が、kがmに到達したと判断した場合(ステップS1812:YES)、CPU101は、処理を終了する。CPU101が、kがmより小さいと判断した場合(ステップS1812:NO)、CPU101は、kを‘1’インクリメントし(ステップS1813)、処理をステップS1810に戻して上述した処理を繰り返す。   When the CPU 101 determines that k has reached m (step S1812: YES), the CPU 101 ends the process. When the CPU 101 determines that k is smaller than m (step S1812: NO), the CPU 101 increments k by “1” (step S1813), returns the process to step S1810, and repeats the above-described process.

以上のように本実施の形態2によれば、同一の撮像画像に対して、大きさの相違する位置決め領域を複数設定することにより、縮小画像を生成することなく、相対的に文字列の含まれる割合が読取に適切な位置決め領域を設定することができ、効率良く読み取ることができる位置決め領域を選択することが可能となる。したがって、演算処理負荷を最小限に抑えることができ、読取時間を短縮することが可能となる。   As described above, according to the second embodiment, a plurality of positioning regions having different sizes are set for the same captured image, so that a character string can be relatively included without generating a reduced image. Therefore, a positioning area suitable for reading can be set, and a positioning area that can be read efficiently can be selected. Therefore, the calculation processing load can be minimized and the reading time can be shortened.

なお、本発明は上記実施例に限定されるものではなく、本発明の趣旨の範囲内であれば多種の変更、改良等が可能である。例えば照準光は、文字列の読取方向に平行な線状の光としているが、特にこれに限定されるものではなく、位置決め領域を特定することができる形態の照準光であれば何でも良い。   The present invention is not limited to the above-described embodiments, and various changes and improvements can be made within the scope of the present invention. For example, the aiming light is linear light parallel to the reading direction of the character string. However, the aiming light is not limited to this, and any aiming light can be used as long as the positioning region can be specified.

また、上記実施例では、撮像された画像から文字列を読み取る場合について説明しているが、バーコードやQRコード(登録商標)などの各種コード読取装置にも適用することが可能であることは言うまでもない。   In the above-described embodiment, the case where a character string is read from a captured image has been described. However, the present invention can also be applied to various code reading devices such as a barcode and a QR code (registered trademark). Needless to say.

20 RAM
21 ROM
30 表示部(ディスプレイ部)
40 操作部(キー配置部)
60 撮像部
70 カメラ
80 照準光照射部
100 ハンディターミナル
101 CPU
20 RAM
21 ROM
30 Display unit (display unit)
40 Operation part (key arrangement part)
60 Imaging unit 70 Camera 80 Aiming light irradiation unit 100 Handy terminal 101 CPU

Claims (8)

読取対象となるシンボルが付されたワークに対して、読取位置を示す照準光を照射する照準光照射手段と、
前記読取位置を含んでワークを撮像した撮像画像を取得する撮像手段と、
撮像された画像の照準光により定まる読取位置に基づいて、画像内のシンボルの大きさとシンボルの位置を決めるための位置決め領域の大きさとが相対的に変わるように、位置決め領域を複数設定する領域設定手段と、
設定された複数の位置決め領域に対して、それぞれシンボルが含まれる領域として適当であるか否かを評価する領域評価手段と、
評価結果に基づいて特定された位置決め領域内のシンボルについて読取処理を実行するシンボル読取手段と
を備えることを特徴とする携帯型光学式読取装置。
Aiming light irradiating means for irradiating the workpiece with the symbol to be read with the aiming light indicating the reading position;
An imaging means for acquiring a captured image obtained by imaging the workpiece including the reading position;
Area setting that sets multiple positioning areas so that the size of the symbol in the image and the size of the positioning area for determining the position of the symbol change relatively based on the reading position determined by the aiming light of the captured image Means,
An area evaluation means for evaluating whether each of the set positioning areas is appropriate as an area including a symbol;
A portable optical reader, comprising: symbol reading means for executing a reading process on a symbol in a positioning area specified based on an evaluation result.
撮像された画像を複数の異なる縮小率で縮小した複数の縮小画像を生成する縮小画像生成手段を備え、
前記領域設定手段は、生成された複数の縮小画像に対して、それぞれ表示上の大きさが略同一である位置決め領域を設定することを特徴とする請求項1に記載の携帯型光学式読取装置。
A reduced image generating means for generating a plurality of reduced images obtained by reducing a captured image at a plurality of different reduction ratios;
The portable optical reader according to claim 1, wherein the area setting unit sets a positioning area having substantially the same display size with respect to the plurality of generated reduced images. .
前記領域設定手段は、同一の撮像画像に対して、大きさの相違する位置決め領域を複数設定することを特徴とする請求項1に記載の携帯型光学式読取装置。   2. The portable optical reader according to claim 1, wherein the area setting unit sets a plurality of positioning areas having different sizes with respect to the same captured image. 前記照準光は、シンボルの読取方向に対して略平行な線状光であり、
前記領域設定手段は、照射された照準光で形成される基準線に基づいて、該基準線の上方に第一のピクセル数だけ離れた位置に形成された上辺と、前記基準線の下方に第二のピクセル数だけ離れた位置に形成された下辺とを含む矩形領域を前記位置決め領域として設定することを特徴とする請求項2に記載の携帯型光学式読取装置。
The aiming light is linear light substantially parallel to the symbol reading direction;
The region setting means is based on a reference line formed by the irradiated aiming light, and an upper side formed at a position separated by a first number of pixels above the reference line and below the reference line. 3. The portable optical reader according to claim 2, wherein a rectangular area including a lower side formed at a position separated by a number of pixels is set as the positioning area.
前記第一のピクセル数と前記第二のピクセル数とが同じであることを特徴とする請求項4に記載の携帯型光学式読取装置。   5. The portable optical reader according to claim 4, wherein the first number of pixels and the second number of pixels are the same. 前記矩形領域の左辺及び右辺は、それぞれ前記縮小画像の左端及び右端に位置するよう設定することを特徴とする請求項4又は5に記載の携帯型光学式読取装置。   The portable optical reader according to claim 4 or 5, wherein a left side and a right side of the rectangular area are set to be positioned at a left end and a right end of the reduced image, respectively. 読取対象となるシンボルが付されたワークに対して、読取位置を示す照準光を照射する照準光照射手段と、
前記読取位置を含んでワークを撮像した撮像画像を取得する撮像手段と
を備える携帯型光学式読取装置で実行することが可能な光学式読取方法であって、
前記携帯型光学式読取装置が、
撮像された画像の照準光により定まる読取位置に基づいて、画像内のシンボルの大きさとシンボルの位置を決めるための位置決め領域の大きさとが相対的に変わるように、位置決め領域を複数設定する第1の工程と、
設定された複数の位置決め領域に対して、それぞれシンボルが含まれる領域として適当であるか否かを評価する第2の工程と、
評価結果に基づいて特定された位置決め領域内のシンボルについて読取処理を実行する第3の工程と
を含むことを特徴とする光学式読取方法。
Aiming light irradiating means for irradiating the workpiece with the symbol to be read with the aiming light indicating the reading position;
An optical reading method that can be executed by a portable optical reading device comprising: an imaging unit that acquires a captured image obtained by imaging a workpiece including the reading position,
The portable optical reader is
First, a plurality of positioning areas are set so that the size of the symbol in the image and the size of the positioning area for determining the position of the symbol are relatively changed based on the reading position determined by the aiming light of the captured image. And the process of
A second step of evaluating whether or not each of the plurality of set positioning regions is appropriate as a region including a symbol;
And a third step of executing a reading process on the symbols in the positioning area specified based on the evaluation result.
読取対象となるシンボルが付されたワークに対して、読取位置を示す照準光を照射する照準光照射手段と、
前記読取位置を含んでワークを撮像した撮像画像を取得する撮像手段と
を備える携帯型光学式読取装置で実行することが可能なコンピュータプログラムであって、
前記携帯型光学式読取装置を、
撮像された画像の照準光により定まる読取位置に基づいて、画像内のシンボルの大きさとシンボルの位置を決めるための位置決め領域の大きさとが相対的に変わるように、位置決め領域を複数設定する領域設定手段、
設定された複数の位置決め領域に対して、それぞれシンボルが含まれる領域として適当であるか否かを評価する領域評価手段、及び
評価結果に基づいて特定された位置決め領域内のシンボルについて読取処理を実行するシンボル読取手段
として機能させることを特徴とするコンピュータプログラム。
Aiming light irradiating means for irradiating the workpiece with the symbol to be read with the aiming light indicating the reading position;
A computer program that can be executed by a portable optical reader comprising: an imaging unit that acquires a captured image obtained by capturing a workpiece including the reading position;
The portable optical reader;
Area setting that sets multiple positioning areas so that the size of the symbol in the image and the size of the positioning area for determining the position of the symbol change relatively based on the reading position determined by the aiming light of the captured image means,
An area evaluation unit that evaluates whether or not each of the set positioning areas is appropriate as an area including a symbol, and a reading process for symbols in the positioning area specified based on the evaluation result A computer program that functions as a symbol reading means.
JP2014089586A 2014-04-23 2014-04-23 Portable optical reader, optical reading method using the portable optical reader, and computer program Active JP6403416B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014089586A JP6403416B2 (en) 2014-04-23 2014-04-23 Portable optical reader, optical reading method using the portable optical reader, and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014089586A JP6403416B2 (en) 2014-04-23 2014-04-23 Portable optical reader, optical reading method using the portable optical reader, and computer program

Publications (2)

Publication Number Publication Date
JP2015210541A JP2015210541A (en) 2015-11-24
JP6403416B2 true JP6403416B2 (en) 2018-10-10

Family

ID=54612711

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014089586A Active JP6403416B2 (en) 2014-04-23 2014-04-23 Portable optical reader, optical reading method using the portable optical reader, and computer program

Country Status (1)

Country Link
JP (1) JP6403416B2 (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3062376B2 (en) * 1993-09-02 2000-07-10 本田技研工業株式会社 Character judgment device
JP3632578B2 (en) * 2000-09-14 2005-03-23 株式会社デンソー Optical information reader
JP2004341977A (en) * 2003-05-19 2004-12-02 Mitsubishi Electric Corp Character recognition device and portable information terminal
JP5439069B2 (en) * 2009-07-08 2014-03-12 三菱重工業株式会社 Character recognition device and character recognition method
JP5617233B2 (en) * 2009-11-30 2014-11-05 ソニー株式会社 Information processing apparatus, information processing method, and program thereof
JP2012073822A (en) * 2010-09-29 2012-04-12 Panasonic Corp Form reading device

Also Published As

Publication number Publication date
JP2015210541A (en) 2015-11-24

Similar Documents

Publication Publication Date Title
JP4746573B2 (en) Projector system
WO2011007746A1 (en) Fingertip-manipulation-type information providing system, interactive manipulation device, computer program, and storage medium
JP6208094B2 (en) Information processing apparatus, information processing system, information processing method, and program thereof
JP2003208604A (en) Image catching device for selecting and catching desired part of text and method therefor
CN103679113A (en) Positioning and focusing method and system of OTP (One Time Password) device in two-dimensional bar code scanning
JP2014215752A (en) Electronic equipment and method for processing handwritten data
CN103632151A (en) Trainable handheld optical character recognition systems and methods
US9607524B2 (en) Method and system for generating and evaluating assessment sheets
JP6171452B2 (en) Image processing apparatus, projector, and image processing method
US20160054806A1 (en) Data processing apparatus, data processing system, control method for data processing apparatus, and storage medium
JP6403416B2 (en) Portable optical reader, optical reading method using the portable optical reader, and computer program
JP2019012546A (en) Information processing device, image processing method and program, and pos terminal device
KR20120130657A (en) calibration device for Deformation of QR-code using camera and thereof.
JP2017199288A (en) Image processing device, image processing method and program
JP6432179B2 (en) Document file generation apparatus and document file generation method
JP5773003B2 (en) Display control apparatus, display control method, and program
JP5310040B2 (en) Imaging processing apparatus and program
JP2014071818A (en) Two-dimensional code reader and two-dimensional code reading method
JP2011022623A (en) Symbol reading device and program
JP5489478B2 (en) Image display device and image display method
JP5310039B2 (en) Imaging processing apparatus and program
JP2010061409A (en) Image processing program and image processing system
CN105975566B (en) Information search method and device based on image
JP6639257B2 (en) Information processing apparatus and control method therefor
US11783622B2 (en) Fingerprint authentication device and fingerprint authentication method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170301

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180208

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180307

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180413

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180911

R150 Certificate of patent or registration of utility model

Ref document number: 6403416

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250