JP2023031715A - Image processing program, image processing method, and image processing apparatus - Google Patents

Image processing program, image processing method, and image processing apparatus Download PDF

Info

Publication number
JP2023031715A
JP2023031715A JP2021137376A JP2021137376A JP2023031715A JP 2023031715 A JP2023031715 A JP 2023031715A JP 2021137376 A JP2021137376 A JP 2021137376A JP 2021137376 A JP2021137376 A JP 2021137376A JP 2023031715 A JP2023031715 A JP 2023031715A
Authority
JP
Japan
Prior art keywords
image
captured
barcode
captured images
camera
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.)
Pending
Application number
JP2021137376A
Other languages
Japanese (ja)
Inventor
義紀 岡田
Yoshinori Okada
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2021137376A priority Critical patent/JP2023031715A/en
Publication of JP2023031715A publication Critical patent/JP2023031715A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Abstract

To improve operation efficiency in reading a bar-code.SOLUTION: A processing unit 1a is configured to: acquire a plurality of captured images captured successively by a camera 2 while a truck 3 loaded with a plurality of boxes passes in front of the camera 2; detect coordinates of a bar-code and a read value of the bar-code from each of the captured images; extracts coordinates of bar-codes in a pair of adjacent captured images having the same read value, out of the multiple captured images, as corresponding feature points; and output read values of the bar-codes arranged on surfaces of the boxes and the number of the bar-codes, on the basis of coordinates of the bar-codes detected from each of the multiple captured images, in a coordinate system of a panorama image to be obtained by synthesizing the multiple captured images based on the coordinates of the extracted corresponding feature points, and the read values of the bar-codes.SELECTED DRAWING: Figure 1

Description

本発明は、画像処理プログラム、画像処理方法および画像処理装置に関する。 The present invention relates to an image processing program, an image processing method, and an image processing apparatus.

バーコードは、各種の情報をコード化して表示するものであり、商品の管理などに広く利用されている。例えば、日本では、商品の識別情報を示すバーコードとして「JAN(Japanese Article Number)コード」が広く利用されている。JANコードは、出荷する商品や販売する商品の管理などに利用されている。 Barcodes are used to encode and display various types of information, and are widely used for product management and the like. For example, in Japan, a "JAN (Japanese Article Number) code" is widely used as a bar code indicating product identification information. The JAN code is used for managing products to be shipped and products to be sold.

また、バーコードの読み取りは、専用のリーダを用いて行われることが多かった。しかし、最近では、一般的なカメラを用いてバーコードを撮影した画像から、PC(Personal Computer)やスマートフォンのアプリケーションを用いて比較的簡単にバーコードを読み取ることも可能になっている。 Moreover, reading of bar codes has often been performed using a dedicated reader. Recently, however, it has become possible to relatively easily read a barcode from an image of the barcode captured with a general camera using an application for a PC (Personal Computer) or a smartphone.

バーコードに関する技術としては、例えば、商品情報に対応するバーコードの位置を撮影画像において視覚的に示すことにより、所望の商品のバーコードの検索を効率化した画像処理装置が提案されている。また、他の例として、商品の販売商品データと、撮影画像により取得されたバーコードのキャプチャ画像データと、販売商品データおよびキャプチャ画像データを合成した合成画像データとのうちのいずれか1つのデータを、ディスプレイの表示面に表示する商品販売登録データ処理装置が提案されている。 As a technique related to barcodes, for example, an image processing apparatus has been proposed that makes searching for the barcode of a desired product more efficient by visually indicating the position of the barcode corresponding to the product information in the photographed image. As another example, any one of the sales product data of the product, the captured image data of the bar code acquired from the photographed image, and the synthesized image data obtained by synthesizing the sales product data and the captured image data. is proposed on the display surface of a product sales registration data processing device.

特開2020-86660号公報Japanese Patent Application Laid-Open No. 2020-86660 特開2008-257462号公報JP 2008-257462 A

ところで、JANコードなどのバーコードは、例えば、商品が梱包された箱(段ボール箱など)の表面に貼付される。また、このような箱が運搬用の台車に積み上げられた状態で、商品検品などを目的として、それぞれの箱のバーコードが読み取られるケースがある。 By the way, a bar code such as a JAN code is, for example, attached to the surface of a box (cardboard box, etc.) in which products are packed. In addition, there is a case in which the bar code of each box is read for the purpose of product inspection or the like while such boxes are stacked on a trolley for transportation.

このようなケースでは、例えば、ハンディ型のリーダを用いてバーコードを1つ1つ読み取る方法を採用すると、作業効率が悪い。このため、カメラによって1枚の画像に複数のバーコードが写り込むように撮影し、得られた画像から複数のバーコードの内容を自動的に読み取ることが考えられる。しかし、箱が運搬されるスペースが狭く、カメラと箱との距離を長くとれない場合には、作業者は、すべてのバーコードが撮影されるように画像を複数枚撮影しなければならず、撮影に手間がかかるという問題がある。 In such a case, for example, if a method of reading barcodes one by one using a handy reader is adopted, work efficiency is poor. For this reason, it is conceivable to photograph a plurality of barcodes in one image with a camera and automatically read the contents of the plurality of barcodes from the obtained image. However, if the space in which the box is to be transported is small and the distance between the camera and the box cannot be long, the operator must take multiple images so that all the barcodes are captured. There is a problem that it takes time to shoot.

1つの側面では、本発明は、バーコードの読み取り作業を効率化することが可能な画像処理プログラム、画像処理方法および画像処理装置を提供することを目的とする。 In one aspect, an object of the present invention is to provide an image processing program, an image processing method, and an image processing apparatus capable of streamlining barcode reading work.

1つの案では、コンピュータに、それぞれ商品が収容され、かつ、収容された商品の情報を示すバーコードがそれぞれの表面に配置された複数の箱が台車に積載された状態で、台車がカメラの前を横切って通過している間に、カメラによって連続的に撮影された複数の撮影画像を取得し、複数の撮影画像のそれぞれからバーコードの座標とバーコードの読み取り値とを検出し、複数の撮影画像のうち隣接する第1撮影画像ペアの間で読み取り値が同一のバーコードの座標を、第1撮影画像ペアの間における対応特徴点として抽出し、抽出された対応特徴点の座標を基に複数の撮影画像を合成して得られるパノラマ画像の座標系における、複数の撮影画像のそれぞれから検出されたバーコードの座標と、当該バーコードの読み取り値とに基づいて、複数の箱の表面に配置されたバーコードの読み取り値と個数とを出力する、処理を実行させる画像処理プログラムが提供される。 In one proposal, a plurality of boxes each containing an item and having a bar code indicating information about the contained item placed on the surface of each box are loaded in the computer, and the trolley is positioned over the camera. A plurality of captured images continuously captured by the camera while passing across the front are acquired, the coordinates of the barcode and the read value of the barcode are detected from each of the plurality of captured images, and a plurality of The coordinates of the barcode having the same read value between the first pair of captured images adjacent to each other among the captured images are extracted as corresponding feature points between the first pair of captured images, and the coordinates of the extracted corresponding feature points are extracted as Based on the barcode coordinates detected from each of the plurality of photographed images in the coordinate system of the panorama image obtained by synthesizing the plurality of photographed images, and the reading value of the barcode, the coordinates of the plurality of boxes are determined. An image processing program is provided that causes the processing to output readings and numbers of barcodes placed on the surface.

また、1つの案では、上記の画像処理プログラムに基づく処理をコンピュータが実行する画像処理方法が提供される。
さらに、1つの案では、上記の画像処理プログラムに基づく処理を実行する画像処理装置が提供される。
Another proposal provides an image processing method in which a computer executes processing based on the above image processing program.
Furthermore, one proposal provides an image processing apparatus that executes processing based on the above image processing program.

1つの側面では、バーコードの読み取り作業を効率化できる。 On one side, it is possible to improve the efficiency of barcode reading work.

第1の実施の形態に係る画像処理装置の構成例および処理例を示す図である。1A and 1B are diagrams illustrating a configuration example and a processing example of an image processing apparatus according to a first embodiment; FIG. 第2の実施形態に係る出荷検品システムの構成例を示す図である。It is a figure which shows the structural example of the shipping inspection system which concerns on 2nd Embodiment. PCのハードウェア構成例を示す図である。It is a figure which shows the hardware structural example of PC. カメラの設置状態の例を示す図である。It is a figure which shows the example of the installation state of a camera. PCが備える処理機能の構成例を示す図である。3 is a diagram illustrating a configuration example of processing functions provided in a PC; FIG. 横方向の画像合成の基本的な処理を示す図である。FIG. 10 is a diagram showing basic processing of image synthesis in the horizontal direction; 同一点の選択処理例を示す第1の図である。FIG. 11 is a first diagram showing an example of processing for selecting the same point; 同一点の選択処理例を示す第2の図である。FIG. 11 is a second diagram showing an example of selection processing for the same point; 読み取り値が同一のJANコードが検出されなかった場合の合成処理例を示す図である。FIG. 10 is a diagram showing an example of synthesis processing when no JAN code with the same read value is detected; カメラの視野角と撮影範囲との関係を示す図である。4 is a diagram showing the relationship between the viewing angle of the camera and the shooting range; FIG. JANコードのサイズと画像サイズとの関係を示す図である。FIG. 4 is a diagram showing the relationship between JAN code size and image size; 撮影画像間の重複幅の算出方法を示す図である。It is a figure which shows the calculation method of the overlapping width|variety between picked-up images. JANコードの垂直サイズの検出算出処理を示す図である。FIG. 10 is a diagram showing a process of detecting and calculating the vertical size of JAN code; JANコードの同定処理について説明するための図である。FIG. 10 is a diagram for explaining JAN code identification processing; JANコード同定のための判定閾値決定方法を説明するための図である。FIG. 10 is a diagram for explaining a determination threshold determination method for JAN code identification; PCの処理の全体を示すフローチャートの例である。It is an example of a flow chart showing the overall processing of a PC. シフト幅算出処理の手順を示すフローチャートの例である。7 is an example of a flowchart showing a procedure of shift width calculation processing; 重複幅算出処理の手順を示すフローチャートの例である。FIG. 11 is an example of a flowchart showing a procedure of overlapping width calculation processing; FIG.

以下、本発明の実施の形態について図面を参照して説明する。
〔第1の実施の形態〕
図1は、第1の実施の形態に係る画像処理装置の構成例および処理例を示す図である。図1に示す画像処理装置1は、処理部1aを備える。処理部1aは、例えば、画像処理装置1が備える図示しないプロセッサである。また、画像処理装置1にはカメラ2が接続されており、画像処理装置1は、カメラ2によって撮影された画像を受信可能になっている。
BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[First Embodiment]
FIG. 1 is a diagram illustrating a configuration example and a processing example of an image processing apparatus according to the first embodiment. The image processing apparatus 1 shown in FIG. 1 includes a processing section 1a. The processing unit 1a is, for example, a processor (not shown) included in the image processing apparatus 1. FIG. A camera 2 is also connected to the image processing device 1 , and the image processing device 1 can receive images captured by the camera 2 .

カメラ2の前には、複数の箱が積載された台車3が横切って通過する。台車3に積載された箱は、例えば段ボール箱であり、箱のそれぞれには商品が収容されている。また、箱のそれぞれの表面には、収容された商品の情報を示すバーコードが配置されている。台車3には、バーコードが配置された面がカメラ2の方を向くように複数の箱が積載され、このような状態の台車3がカメラ2の前を横切るように移動する。図1の例では、カメラ2の撮影方向に対して右方向から左方向へ台車3が移動する。 A truck 3 loaded with a plurality of boxes passes across in front of the camera 2. - 特許庁The boxes loaded on the truck 3 are, for example, cardboard boxes, and each box contains a product. In addition, a bar code indicating information on the contained product is arranged on each surface of the box. A plurality of boxes are loaded on the truck 3 so that the surface on which the bar codes are arranged faces the camera 2, and the truck 3 in such a state moves across the front of the camera 2.例文帳に追加In the example of FIG. 1, the cart 3 moves from right to left with respect to the imaging direction of the camera 2 .

カメラ2は、台車3がカメラ2の前を横切って通過している間に、連続的に複数の撮影画像を撮影し、画像処理装置1に送信する。このとき、カメラ2は、台車3に積載された箱が写り込むように画像を撮影する。画像処理装置1の処理部1aは、このようにして撮影された複数の撮影画像を取得する(ステップS1)。そして、処理部1aは、取得した複数の撮影画像を用いて、積載された箱のそれぞれに配置されたバーコードの読み取り値を出力するための次のような処理を実行する。 The camera 2 continuously takes a plurality of shot images while the carriage 3 is passing across in front of the camera 2 and transmits them to the image processing device 1.例文帳に追加At this time, the camera 2 takes an image so that the boxes loaded on the truck 3 are reflected. The processing unit 1a of the image processing device 1 acquires a plurality of captured images thus captured (step S1). Then, the processing unit 1a executes the following processing for outputting the read values of the barcodes arranged on each of the stacked boxes using the acquired plurality of photographed images.

処理部1aは、取得した複数の撮影画像のそれぞれからバーコードを検出する(ステップS2)。このとき、処理部1aは、バーコードの撮影画像における座標とバーコードの読み取り値とを検出する。 The processing unit 1a detects a barcode from each of the plurality of captured images (step S2). At this time, the processing unit 1a detects the coordinates in the photographed image of the barcode and the read value of the barcode.

次に、処理部1aは、取得した複数の撮影画像のうち、隣接する撮影画像ペアの間で読み取り値が同一のバーコードの各座標を、この撮影画像ペアの間における対応特徴点として抽出する(ステップS3)。この処理により、撮影画像ペアごとに、ペアに含まれる各撮影画像の対応特徴点が抽出される。 Next, the processing unit 1a extracts each coordinate of the barcode having the same reading value between the adjacent pair of captured images among the acquired plurality of captured images as the corresponding feature point between the pair of captured images. (Step S3). Through this processing, corresponding feature points of each captured image included in the pair are extracted for each captured image pair.

次に、処理部1aは、抽出された対応特徴点の座標に基づいて、複数の撮影画像を合成してパノラマ画像を作成する。ただし、パノラマ画像は実際に作成されなくてもよく、少なくとも、各撮影画像で検出されたバーコードの座標が、パノラマ画像の座標系の座標に変換されればよい。処理部1aは、パノラマ画像の座標系における各バーコードの座標と、各バーコードの読み取り値とに基づいて、台車3上の複数の箱の表面に配置されたバーコードの読み取り値と個数(読み取り値が同じバーコードの個数)とを出力する(ステップS4)。 Next, the processing unit 1a creates a panorama image by synthesizing a plurality of photographed images based on the extracted coordinates of the corresponding feature points. However, the panorama image does not have to be actually created, and at least the coordinates of the barcode detected in each captured image should be converted to the coordinates of the coordinate system of the panorama image. Based on the coordinates of each barcode in the coordinate system of the panorama image and the read value of each barcode, the processing unit 1a calculates the read values and the number ( number of bar codes with the same read value) and output (step S4).

このような処理により、積載された複数の箱に配置されたバーコードの内容が自動的に読み取られるので、バーコードの読み取り作業を効率化することができる。
図1の右側には、カメラ2によって撮影された撮影画像の例を示している。図1では例として、撮影画像P1,P2,・・・が順に撮影されている。また、撮影画像P1からは、読み取り値「0001」のバーコード4a1と、読み取り値「0002」のバーコード4bとが検出されている。撮影画像P2からは、読み取り値「0001」のバーコード4a2と、読み取り値「0003」のバーコード4cとが検出されている。
By such processing, the contents of the barcodes arranged on the stacked boxes are automatically read, so that the barcode reading work can be made more efficient.
An example of a captured image captured by the camera 2 is shown on the right side of FIG. In FIG. 1, as an example, captured images P1, P2, . . . are captured in order. Also, from the photographed image P1, a barcode 4a1 with a read value of "0001" and a barcode 4b with a read value of "0002" are detected. A barcode 4a2 with a read value of "0001" and a barcode 4c with a read value of "0003" are detected from the captured image P2.

この場合、撮影画像P1,P2を含む撮影画像ペアの間では、読み取り値が同一であるバーコード4a1,4a2の座標が対応特徴点として抽出される。対応特徴点が抽出されることで、処理部1aは、一方の座標と他方の座標との比較結果を基に、撮影画像P1に対して撮影画像P2を合成する際の撮影画像P2のシフト幅(ズレ幅)を算出できるようになる。処理部1aは、このシフト幅に基づいて撮影画像P1,P2の少なくとも一方の座標を合成画像P0の座標系の座標に変換することで、合成画像P0を合成できる。なお、合成画像P0は、上記のパノラマ画像の一部となる。 In this case, between the captured image pair including the captured images P1 and P2, the coordinates of the barcodes 4a1 and 4a2 having the same read value are extracted as corresponding feature points. By extracting the corresponding feature points, the processing unit 1a determines the shift width of the photographed image P2 when synthesizing the photographed image P2 with the photographed image P1 based on the result of comparison between one coordinate and the other coordinate. (width of deviation) can be calculated. The processing unit 1a can synthesize the synthesized image P0 by transforming the coordinates of at least one of the captured images P1 and P2 into the coordinates of the coordinate system of the synthesized image P0 based on the shift width. Note that the synthesized image P0 is a part of the panoramic image described above.

図1に示す合成画像P0には、バーコード4a,4b,4cが写っている。これらのうちバーコード4aは、バーコード4a1,4a2に対応する。処理部1aは、例えば、合成画像P0上のバーコード4a,4b,4cの読み取り結果から、読み取り値「0001」、「0002」、「0003」の各バーコードが1つずつ検出されたことを示す処理結果を出力することができる。 The barcodes 4a, 4b, and 4c are shown in the composite image P0 shown in FIG. Among these, the barcode 4a corresponds to the barcodes 4a1 and 4a2. For example, the processing unit 1a detects that each barcode with read values "0001", "0002", and "0003" is detected one by one from the results of reading the barcodes 4a, 4b, and 4c on the composite image P0. The processing result shown can be output.

ここで、段ボール箱のような箱は、表面に細かい模様などが描画されることが少なく、外形も単純である。このため、一般的な特徴点抽出方法を用いた場合には特徴点を正確に抽出できず、その結果として、撮影画像ペアの間の対応特徴点の抽出精度が低くなる。これに対して、本実施の形態では、撮影画像ペアの間で読み取り値が同一のバーコードの座標が、対応特徴点として抽出される。これにより、対応特徴点を正確に抽出できるようになる。その結果、パノラマ画像の作成精度、またはパノラマ画像の座標系に対する座標変換精度を高めることができる。最終的に、バーコードの読み取り結果(読み取り値および個数)を正確に出力できる。 Here, a box such as a cardboard box is rarely drawn with fine patterns on its surface and has a simple outer shape. For this reason, when a general feature point extraction method is used, the feature points cannot be extracted accurately, and as a result, the extraction accuracy of the corresponding feature points between the captured image pairs is lowered. On the other hand, in the present embodiment, the coordinates of barcodes having the same read value between the captured image pairs are extracted as the corresponding feature points. This makes it possible to accurately extract corresponding feature points. As a result, it is possible to improve the accuracy of panorama image creation or the accuracy of coordinate conversion with respect to the coordinate system of the panorama image. Finally, the barcode reading results (read value and number) can be output accurately.

以上のように、第1の実施の形態に係る画像処理装置1は、カメラ2によって連続的に撮影された複数の撮影画像を用いて、バーコードの自動読み取りを正確に実行できる。これにより、バーコードの読み取り作業を効率化することができる。 As described above, the image processing apparatus 1 according to the first embodiment can accurately perform automatic barcode reading using a plurality of captured images continuously captured by the camera 2 . As a result, the barcode reading work can be made more efficient.

〔第2の実施の形態〕
次に、図1に示した画像処理装置1を含む商品の出荷検品システムについて説明する。
図2は、第2の実施形態に係る出荷検品システムの構成例を示す図である。この出荷検品システムは、段ボール箱に梱包された商品の出荷時における検品作業を支援するものであり、カメラ10a,10b,10c,・・・、照明20およびPC100を含む。なお、PC100は、図1の画像処理装置1の一例であり、カメラ10a,10b,10c,・・・は、図1のカメラ2の一例である。
[Second embodiment]
Next, a product shipment inspection system including the image processing apparatus 1 shown in FIG. 1 will be described.
FIG. 2 is a diagram showing a configuration example of a shipping inspection system according to the second embodiment. This shipment inspection system supports inspection work at the time of shipment of products packed in corrugated cardboard boxes, and includes cameras 10a, 10b, 10c, . The PC 100 is an example of the image processing apparatus 1 in FIG. 1, and the cameras 10a, 10b, 10c, . . . are examples of the camera 2 in FIG.

カメラ10a,10b,10c,・・・は、段ボール箱の表面を撮影し、撮影された画像のデータをPC100に送信する。後述するように、カメラ10a,10b,10c,・・・は、一定時間間隔で画像を連続撮影する。また、カメラ10a,10b,10c,・・・のそれぞれの間では、撮影動作が同期される。 The cameras 10a, 10b, 10c, . As will be described later, the cameras 10a, 10b, 10c, . . . shoot images continuously at regular time intervals. In addition, photographing operations are synchronized among the cameras 10a, 10b, 10c, . . .

照明20は、カメラ10a,10b,10c,・・・による撮影範囲に光を照射して、撮影画像を明瞭化する。照明20は、複数台設置されてもよい、また、照明20は、PC100に接続されて、PC100から光の照射動作が制御されてもよい。 The illumination 20 irradiates light onto the range photographed by the cameras 10a, 10b, 10c, . . . to clarify the photographed image. A plurality of lights 20 may be installed, or the lights 20 may be connected to the PC 100 and light irradiation operations may be controlled from the PC 100 .

PC100は、カメラ10a,10b,10c,・・・によって撮影された画像から、段ボール箱の表面に表示されたバーコードを読み取り、バーコードの読み取り値および個数を出力する。なお、PC100は、このような処理を実行する情報処理装置の一例であり、PC100の処理は、サーバコンピュータなどの他の種類の情報処理装置で実行されてもよい。 The PC 100 reads the barcode displayed on the surface of the cardboard box from the images captured by the cameras 10a, 10b, 10c, . Note that the PC 100 is an example of an information processing apparatus that executes such processing, and the processing of the PC 100 may be executed by another type of information processing apparatus such as a server computer.

図3は、PCのハードウェア構成例を示す図である。PC100は、例えば、図3に示すようなコンピュータとして実現される。図3に示すPC100は、プロセッサ101、RAM(Random Access Memory)102、HDD(Hard Disk Drive)103、GPU(Graphics Processing Unit)104、入力インタフェース(I/F)105、読み取り装置106、ネットワークインタフェース(I/F)107および通信インタフェース(I/F)108を備える。 FIG. 3 is a diagram showing a hardware configuration example of a PC. The PC 100 is realized as a computer as shown in FIG. 3, for example. The PC 100 shown in FIG. 3 includes a processor 101, a RAM (Random Access Memory) 102, a HDD (Hard Disk Drive) 103, a GPU (Graphics Processing Unit) 104, an input interface (I/F) 105, a reader 106, a network interface ( I/F) 107 and communication interface (I/F) 108 .

プロセッサ101は、PC100全体を統括的に制御する。プロセッサ101は、例えば、CPU(Central Processing Unit)、MPU(Micro Processing Unit)、DSP(Digital Signal Processor)、ASIC(Application Specific Integrated Circuit)またはPLD(Programmable Logic Device)である。また、プロセッサ101は、CPU、MPU、DSP、ASIC、PLDのうちの2以上の要素の組み合わせであってもよい。 A processor 101 centrally controls the entire PC 100 . The processor 101 is, for example, a CPU (Central Processing Unit), MPU (Micro Processing Unit), DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), or PLD (Programmable Logic Device). Also, the processor 101 may be a combination of two or more of CPU, MPU, DSP, ASIC, and PLD.

RAM102は、PC100の主記憶装置として使用される。RAM102には、プロセッサ101に実行させるOS(Operating System)プログラムやアプリケーションプログラムの少なくとも一部が一時的に格納される。また、RAM102には、プロセッサ101による処理に必要な各種データが格納される。 A RAM 102 is used as a main storage device of the PC 100 . The RAM 102 temporarily stores at least part of an OS (Operating System) program and application programs to be executed by the processor 101 . Various data necessary for processing by the processor 101 are stored in the RAM 102 .

HDD103は、PC100の補助記憶装置として使用される。HDD103には、OSプログラム、アプリケーションプログラム、および各種データが格納される。なお、補助記憶装置としては、SSD(Solid State Drive)などの他の種類の不揮発性記憶装置を使用することもできる。 HDD 103 is used as an auxiliary storage device for PC 100 . The HDD 103 stores an OS program, application programs, and various data. Other types of non-volatile storage devices such as SSDs (Solid State Drives) can also be used as auxiliary storage devices.

GPU104には、表示装置104aが接続されている。GPU104は、プロセッサ101からの命令にしたがって、画像を表示装置104aに表示させる。表示装置104aとしては、液晶ディスプレイや有機EL(ElectroLuminescence)ディスプレイなどがある。 A display device 104 a is connected to the GPU 104 . The GPU 104 causes the display device 104a to display an image according to instructions from the processor 101 . Examples of the display device 104a include a liquid crystal display and an organic EL (ElectroLuminescence) display.

入力インタフェース105には、入力装置105aが接続されている。入力インタフェース105は、入力装置105aから出力される信号をプロセッサ101に送信する。入力装置105aとしては、キーボードやポインティングデバイスなどがある。ポインティングデバイスとしては、マウス、タッチパネル、タブレット、タッチパッド、トラックボールなどがある。 An input device 105 a is connected to the input interface 105 . The input interface 105 transmits signals output from the input device 105 a to the processor 101 . The input device 105a includes a keyboard, pointing device, and the like. Pointing devices include mice, touch panels, tablets, touch pads, trackballs, and the like.

読み取り装置106には、可搬型記録媒体106aが脱着される。読み取り装置106は、可搬型記録媒体106aに記録されたデータを読み取ってプロセッサ101に送信する。可搬型記録媒体106aとしては、光ディスク、半導体メモリなどがある。 A portable recording medium 106 a is attached to and detached from the reading device 106 . The reading device 106 reads data recorded on the portable recording medium 106 a and transmits the read data to the processor 101 . As the portable recording medium 106a, there are an optical disk, a semiconductor memory, and the like.

ネットワークインタフェース107は、ネットワーク107aを介して他の装置との間でデータの送受信を行う。
通信インタフェース108は、カメラ10a,10b,10c,・・・との間でデータの送受信を行う。
A network interface 107 transmits and receives data to and from another device via a network 107a.
A communication interface 108 transmits and receives data to and from the cameras 10a, 10b, 10c, .

以上のようなハードウェア構成によって、PC100の処理機能を実現することができる。
なお、以下の説明では、カメラ10a,10b,10c,・・・を個々に特定せずに指し示す場合には「カメラ10」と記載する場合がある。
The processing functions of the PC 100 can be realized by the hardware configuration as described above.
In the following description, the cameras 10a, 10b, 10c, .

図4は、カメラの設置状態の例を示す図である。図4(A)は、カメラ10の設置場所の側面図を示し、図4(B)は、カメラ10の設置場所の平面図を示す。
本実施の形態において、商品の出荷検品は、台車31の上に商品の段ボール箱32が積載された状態で行われる。図4に示すように、台車31には、横方向(台車31の進行方向)に対して段ボール箱32が複数個並列され得る。また、台車31には、縦方向に対しても段ボール箱32が複数個積み上げられ得る。
FIG. 4 is a diagram showing an example of an installation state of cameras. 4A shows a side view of the installation location of the camera 10, and FIG. 4B shows a plan view of the installation location of the camera 10. FIG.
In the present embodiment, shipping inspection of products is performed in a state where the cardboard boxes 32 of the products are loaded on the cart 31 . As shown in FIG. 4, a plurality of cardboard boxes 32 can be arranged side by side on the carriage 31 in the lateral direction (direction of travel of the carriage 31). A plurality of cardboard boxes 32 can also be stacked on the carriage 31 in the vertical direction.

それぞれの段ボール箱32の表面には、商品の識別情報を示すJANコードが印刷されたラベル33が貼付されている。JANコードは、商品の識別情報をコード化したバーコードシンボルである。台車31においては、ラベル33が台車31の進行方向に対する左右方向のうち同じ方向を向くように段ボール箱32が積載される。本実施の形態では例として、図4に示すように、ラベル33が進行方向の左側(図4(B)における下側)を向くように段ボール箱32が積載されるものとする。そして、このような状態において、それぞれの段ボール箱32のラベル33に印刷されたJANコードを読み取ることで、出荷検品が行われる。 A label 33 printed with a JAN code indicating product identification information is attached to the surface of each cardboard box 32 . A JAN code is a bar code symbol that encodes product identification information. The cardboard boxes 32 are loaded on the truck 31 so that the labels 33 are oriented in the same horizontal direction with respect to the traveling direction of the truck 31 . In this embodiment, as an example, as shown in FIG. 4, the cardboard boxes 32 are stacked so that the label 33 faces the left side (lower side in FIG. 4B) in the traveling direction. In such a state, shipping inspection is performed by reading the JAN code printed on the label 33 of each corrugated cardboard box 32 .

このようなケースでは、例えば、ハンディ型のバーコードリーダを用いてJANコードを1つ1つ読み取る方法を採用すると、作業効率が悪い。これに対して、カメラ10によって1枚の画像に複数のJANコードが写り込むように撮影し、得られた画像からPC100の処理によって複数のJANコードを自動的に読み取るという方法により、作業効率を高めることができる。 In such a case, for example, if a method of reading JAN codes one by one using a handy barcode reader is adopted, work efficiency is poor. On the other hand, the work efficiency is improved by a method in which a plurality of JAN codes are captured in one image by the camera 10, and the plurality of JAN codes are automatically read from the obtained image by the processing of the PC 100. can be enhanced.

しかしながら、台車31に積載されたすべての段ボール箱32のJANコードを1枚の画像に収めるには、台車31の進行方向に対する横方向に広いスペースが必要になる。実際の出荷検品の作業のためにこのような広いスペースを用意できることは多くない。例えば、図4(B)に示すように、カメラ10と撮影対象との間に30cm程度の撮影距離しかとれない場合もある。このため、台車31に積載されたすべての段ボール箱32を含む撮影範囲をカバーするように複数の画像が撮影され、それらの撮影画像からすべてのJANコードが自動的に読み取られるようにすることが望まれる。 However, in order to fit the JAN codes of all the cardboard boxes 32 loaded on the truck 31 into one image, a wide space is required in the horizontal direction with respect to the traveling direction of the truck 31 . It is rare that such a large space can be prepared for actual shipping inspection work. For example, as shown in FIG. 4(B), there are cases where only a shooting distance of about 30 cm can be taken between the camera 10 and the shooting target. For this reason, a plurality of images are photographed so as to cover the photographing range including all the cardboard boxes 32 loaded on the cart 31, and all the JAN codes are automatically read from the photographed images. desired.

本実施の形態では、このような目的を達成するために、複数台のカメラ10が縦方向に配列され、これらのカメラ10によって縦方向の撮影範囲がカバーされる。さらに、カメラ10の前に台車31を通過させ、その通過中に画像を連続撮影することで、横方向の撮影範囲がカバーされる。 In this embodiment, in order to achieve such an object, a plurality of cameras 10 are arranged in the vertical direction, and these cameras 10 cover the vertical imaging range. Furthermore, by causing the carriage 31 to pass in front of the camera 10 and continuously photographing images during its passage, the photographing range in the lateral direction is covered.

図4では例として、4台のカメラ10a~10dが設置される。これらのカメラ10a~10dは、縦方向に対して等間隔に設置される。また、カメラ10a~10dは、台車31の進行方向に対して左方向に設置され、このようなカメラ10a~10dの前を、作業者34によって押された台車31が通過する。この場合、カメラ10a~10dの撮影方向に対して台車31が右方向から左方向に移動する。そして、台車31の移動中に、カメラ10a~10dのそれぞれが一定時間間隔で画像を連続撮影する。 In FIG. 4, four cameras 10a to 10d are installed as an example. These cameras 10a to 10d are installed at regular intervals in the vertical direction. The cameras 10a to 10d are installed in the left direction with respect to the traveling direction of the truck 31, and the truck 31 pushed by the worker 34 passes in front of the cameras 10a to 10d. In this case, the carriage 31 moves from the right to the left with respect to the photographing direction of the cameras 10a to 10d. While the carriage 31 is moving, each of the cameras 10a to 10d continuously captures images at regular time intervals.

このようにして、縦方向と横方向のそれぞれに対して複数の撮影画像が得られる。PC100は、得られた複数の撮影画像をパノラマ画像に合成し、パノラマ画像上のJANコードの読み取り値および個数を処理結果として出力する。これにより、台車31上のすべての段ボール箱32のJANコードが自動的に読み取られる。 In this way, a plurality of photographed images are obtained in each of the vertical and horizontal directions. The PC 100 synthesizes a plurality of obtained captured images into a panorama image, and outputs the reading value and the number of JAN codes on the panorama image as a processing result. As a result, the JAN codes of all cardboard boxes 32 on the cart 31 are automatically read.

なお、画像の連続撮影は、例えば、動画撮影によって行われる。この場合、撮影された動画像の中から一定時間間隔の撮影画像(フレーム)が抽出される。また、別の例として、PC100の制御の下で、各カメラ10によって一定時間間隔で静止画像が撮影されてもよい。一方、縦方向に配列されたカメラ10の間では、同期して撮影が行われる。したがって、ある撮影時刻に撮影された画像は、縦方向に配列されたカメラ10のそれぞれから得られる。 Note that continuous shooting of images is performed by, for example, moving image shooting. In this case, captured images (frames) at regular time intervals are extracted from the captured moving images. As another example, each camera 10 may capture still images at regular time intervals under the control of the PC 100 . On the other hand, the cameras 10 arranged in the vertical direction are synchronously photographed. Therefore, an image shot at a certain shooting time is obtained from each of the cameras 10 arranged in the vertical direction.

図5は、PCが備える処理機能の構成例を示す図である。図5に示すように、PC100は、記憶部110、画像受信部121、JANコード読み取り部122、画像合成部123および結果出力処理部124を備える。 FIG. 5 is a diagram showing a configuration example of processing functions provided in a PC. As shown in FIG. 5, the PC 100 includes a storage section 110, an image receiving section 121, a JAN code reading section 122, an image synthesizing section 123 and a result output processing section .

記憶部110は、例えばRAM102やHDD103など、PC100が備える記憶装置の記憶領域である。記憶部110には、カメラ設定情報111、JANコード情報112、画像情報113およびJANコード読み取り情報114が記憶される。 The storage unit 110 is a storage area of a storage device included in the PC 100, such as the RAM 102 and the HDD 103, for example. The storage unit 110 stores camera setting information 111, JAN code information 112, image information 113, and JAN code reading information 114. FIG.

カメラ設定情報111には、カメラ10a,10b,10c,・・・に関する情報があらかじめ設定される。例えば、カメラ設定情報111には、カメラ10a,10b,10c・・・のそれぞれの高さ、撮影画像のサイズ(縦横のピクセル数)、視野角が設定される。 In the camera setting information 111, information regarding the cameras 10a, 10b, 10c, . . . is set in advance. For example, in the camera setting information 111, the height of each of the cameras 10a, 10b, 10c, .

JANコード情報112には、段ボール箱32に貼付されるラベル上のJANコードの縦横サイズと、JANコード間の最短距離とがあらかじめ設定される。JANコード間の最短距離とは、段ボール箱32が積み重ねられたときに、隣接する段ボール箱32のJANコードが最も近づくときの、JANコードの印字領域の中心点間距離を示す。 In the JAN code information 112, the vertical and horizontal sizes of the JAN code on the label attached to the cardboard box 32 and the shortest distance between the JAN codes are set in advance. The shortest distance between JAN codes indicates the distance between the center points of the printed areas of the JAN codes when the JAN codes of adjacent cardboard boxes 32 are closest when the cardboard boxes 32 are stacked.

画像情報113には、カメラ10a,10b,10c,・・・によって撮影されてPC100が受信した各撮影画像(静止画像)の画像データが蓄積される。
JANコード読み取り情報114には、各撮影画像から検出されたJANコードの位置(画像上の座標)および読み取り値が蓄積される。
The image information 113 accumulates image data of each captured image (still image) captured by the cameras 10 a, 10 b, 10 c, . . . and received by the PC 100 .
The JAN code reading information 114 stores the position (coordinates on the image) and reading value of the JAN code detected from each captured image.

画像受信部121、JANコード読み取り部122、画像合成部123および結果出力処理部124の処理は、例えば、プロセッサ101が所定のプログラムを実行することで実現される。 The processes of the image receiving unit 121, the JAN code reading unit 122, the image synthesizing unit 123, and the result output processing unit 124 are realized, for example, by the processor 101 executing a predetermined program.

画像受信部121は、カメラ10a,10b,10c,・・・から撮影画像のデータを受信し、画像情報113に蓄積する。
JANコード読み取り部122は、撮影画像のそれぞれからJANコードの画像領域を検出するとともに、JANコードが示す数値(読み取り値)を読み取る。JANコード読み取り部122は、撮影画像におけるJANコードの位置(座標)とJANコードの読み取り値とを対応付けて、JANコード読み取り情報114に登録する。
The image receiving unit 121 receives data of captured images from the cameras 10a, 10b, 10c, .
The JAN code reading unit 122 detects the image area of the JAN code from each captured image, and reads the numerical value (read value) indicated by the JAN code. The JAN code reading unit 122 associates the position (coordinates) of the JAN code in the captured image with the read value of the JAN code and registers them in the JAN code reading information 114 .

画像合成部123は、撮影画像をつなぎ合わせて合成し、パノラマ画像を作成する。
結果出力処理部124は、作成されたパノラマ画像上のJANコードの読み取り値および個数を、パノラマ画像とともに処理結果として出力する。
The image synthesizing unit 123 joins and synthesizes the photographed images to create a panoramic image.
The result output processing unit 124 outputs the read value and the number of JAN codes on the created panorama image as a processing result together with the panorama image.

次に、パノラマ画像の合成処理について説明する。まず、図6~図9を参照して、横方向の撮影画像の合成処理について説明する。横方向の撮影画像とは、同一のカメラ10によって連続撮影された画像を指す。 Next, synthesizing processing of panoramic images will be described. First, with reference to FIGS. 6 to 9, the process of synthesizing images captured in the horizontal direction will be described. Images captured in the horizontal direction refer to images continuously captured by the same camera 10 .

図6は、横方向の画像合成の基本的な処理を示す図である。
一般的に、パノラマ画像を合成するためには、連続する画像間で同一点(対応点)を検出する必要がある。同一点が検出されると、各画像における同一点の座標を基に、画像同士を合成する際の重複幅を算出できるようになる。
FIG. 6 is a diagram showing basic processing of image composition in the horizontal direction.
In general, it is necessary to detect the same points (corresponding points) between consecutive images in order to synthesize a panoramic image. When the same point is detected, it is possible to calculate the overlap width when combining the images based on the coordinates of the same point in each image.

画像間の同一点を検出する方法としては、例えば、SIFT(Scaled Invariance. Feature Transform)やSURF(Speed Up Robust Feature)などの特徴点抽出アルゴリズムを用いて各画像から特徴点を抽出する方法が考えられる。しかし、本実施の形態で撮影対象となる段ボール箱は、表面に特徴点となるような模様が少なく、外形も単純である。このため、対応点として有効な特徴点が検出されにくく、対応点のミスマッチも発生しやすい。 As a method for detecting the same points between images, for example, a method of extracting feature points from each image using a feature point extraction algorithm such as SIFT (Scaled Invariance. Feature Transform) or SURF (Speed Up Robust Feature) is considered. be done. However, the corrugated cardboard box to be photographed in the present embodiment has few characteristic patterns on the surface and has a simple outer shape. For this reason, feature points that are effective as corresponding points are difficult to detect, and mismatches between corresponding points are likely to occur.

また、別の方法として、台車31の表面に特徴点となるマーカを横方向に並列して取り付ける方法が考えられる。しかし、既存の台車31にマーカを取り付ける、あるいはマーカ付きの台車31を新規に導入するという必要が生じ、導入コストが高くなる。また、既存のどの台車31にもマーカを取り付けられるかが不明であるため、汎用性にも欠ける。 As another method, it is conceivable to attach markers serving as characteristic points on the surface of the carriage 31 in parallel in the lateral direction. However, it is necessary to attach the marker to the existing truck 31 or to introduce a new truck 31 with the marker, which increases the introduction cost. In addition, since it is unknown to which existing carriage 31 the marker can be attached, versatility is also lacking.

そこで、本実施の形態では、JANコード(JANコードのバーコードシンボル)が特徴点として抽出される。そして、少なくとも画像間で読み取り値が同じJANコードが、同一点として検出される。 Therefore, in the present embodiment, JAN codes (barcode symbols of JAN codes) are extracted as feature points. Then, JAN codes having at least the same read value between images are detected as the same point.

前述のように、商品が梱包された段ボール箱の表面には、JANコードが印刷されたラベル33が貼付される。図6の上側に示すように、PC100のJANコード読み取り部122は、画像認識技術により、撮影画像からラベル33内のJANコードの領域35を検出する。JANコード読み取り部122は、撮影画像上のJANコードの位置として、例えば領域35における左上のエッジ点36の座標を出力する。これとともに、JANコード読み取り部122は、JANコードの読み取り値を出力する。 As described above, the label 33 on which the JAN code is printed is attached to the surface of the cardboard box in which the product is packed. As shown in the upper part of FIG. 6, the JAN code reader 122 of the PC 100 detects the JAN code area 35 in the label 33 from the captured image by image recognition technology. The JAN code reading unit 122 outputs, for example, the coordinates of the upper left edge point 36 in the area 35 as the position of the JAN code on the captured image. Along with this, the JAN code reading unit 122 outputs the read value of the JAN code.

図6の下側には、横方向に対するN枚目の撮影画像P11と(N+1)枚目の撮影画像P12の例を示している。
N枚目の撮影画像P11には、読み取り値「JAN001」のJANコード201aと、読み取り値「JAN002」のJANコード202aとが写り込んでいる。また、JANコード201a,202aのいずれについても、JANコード読み取り部122によって位置と読み取り値とが取得されている。
The lower part of FIG. 6 shows an example of the Nth shot image P11 and the (N+1)th shot image P12 in the horizontal direction.
The JAN code 201a with the read value "JAN001" and the JAN code 202a with the read value "JAN002" appear in the Nth shot image P11. In addition, the JAN code reader 122 acquires the position and read value for both the JAN codes 201a and 202a.

(N+1)枚目の撮影画像P12には、読み取り値「JAN001」のJANコード201bと、読み取り値「JAN002」のJANコード202bと、読み取り値「JAN003」のJANコード203bが写り込んでいる。これらのうち、JANコード201b,203bについてはJANコード読み取り部122によって位置と読み取り値とが取得されている。一方、JANコード202bは撮影画像P12に一部だけしか写っておらず、位置や読み取り値はJANコード読み取り部122によって取得されていない。 In the (N+1)th photographed image P12, the JAN code 201b of the read value "JAN001", the JAN code 202b of the read value "JAN002", and the JAN code 203b of the read value "JAN003" appear. Of these, the JAN code reader 122 acquires the positions and reading values of the JAN codes 201b and 203b. On the other hand, the JAN code 202b is only partly shown in the photographed image P12, and the JAN code reading unit 122 has not acquired the position and read value.

画像合成部123は、基本的に、撮影画像P11,P12から位置と読み取り値が取得されたJANコードの中から、撮影画像P11と撮影画像P12との間で読み取り値が同じJANコードを同一点として検出する。図6の例では、撮影画像P11上のJANコード201aと撮影画像P12上のJANコード201bとが同一点として検出される。 The image synthesizing unit 123 basically selects JAN codes having the same read values between the photographed image P11 and the photographed image P12 from among the JAN codes whose positions and read values are obtained from the photographed images P11 and P12. Detect as In the example of FIG. 6, the JAN code 201a on the captured image P11 and the JAN code 201b on the captured image P12 are detected as the same point.

JANコード201aの座標を(x1,y1)とし、JANコード201bの座標を(x2,y2)とする。この場合、画像合成部123は、JANコード201bのX座標x2とJANコード201aのX座標x1との差分|x2-x1|((x2-x1)の絶対値)を、撮影画像P11に対する撮影画像P12の横方向のシフト幅として算出する。そして、画像合成部123は、撮影画像P11の左端から|x2-x1|だけ右側にシフトした位置に撮影画像P12を合成することで、合成画像P13を作成することができる。 Let the coordinates of the JAN code 201a be (x1, y1) and the coordinates of the JAN code 201b be (x2, y2). In this case, the image synthesizing unit 123 calculates the difference |x2−x1| (absolute value of (x2−x1)) between the X coordinate x2 of the JAN code 201b and the X coordinate x1 of the JAN code 201a as the captured image for the captured image P11. It is calculated as the horizontal shift width of P12. Then, the image synthesizing unit 123 can create a synthesized image P13 by synthesizing the photographed image P12 at a position shifted to the right by |x2−x1| from the left end of the photographed image P11.

なお、台車31が撮影方向に対して左側から右側に移動する場合、画像合成部123は、N枚目の撮影画像の右端から|x2-x1|だけ左にシフトした位置に(N+1)枚目の撮影画像を合成することで、合成画像を作成する。 Note that when the carriage 31 moves from the left side to the right side with respect to the photographing direction, the image synthesizing unit 123 places the (N+1)th photographed image at a position shifted to the left by |x2−x1| from the right end of the Nth photographed image. A synthesized image is created by synthesizing the captured images of the

図7は、同一点の選択処理例を示す第1の図である。撮影画像間の同一点は、必ず隣接する撮影画像間で検出されるようにする。連続していない撮影画像の間で読み取り値が同じJANコードが検出されたとしても、それらのJANコードは同一点(同一のJANコード)として選択されない。 FIG. 7 is a first diagram showing an example of processing for selecting the same point. The same point between captured images is always detected between adjacent captured images. Even if JAN codes with the same reading value are detected between discontinuous captured images, those JAN codes are not selected as the same point (same JAN code).

図7の例では、N枚目の撮影画像P21において読み取り値「JAN001」のJANコード211aが検出され、(N+1)枚目の撮影画像P22において読み取り値「JAN001」のJANコード211bが検出されている。また、(N+10)枚目の撮影画像P23において読み取り値「JAN001」のJANコード212aが検出され、(N+11)枚目の撮影画像P24において読み取り値「JAN001」のJANコード212bが検出されている。 In the example of FIG. 7, the JAN code 211a with the reading value "JAN001" is detected in the Nth shot image P21, and the JAN code 211b with the reading value "JAN001" is detected in the (N+1)th shot image P22. there is Also, the JAN code 212a with the reading value "JAN001" is detected in the (N+10)th photographed image P23, and the JAN code 212b with the reading value "JAN001" is detected in the (N+11)th photographed image P24.

この場合、画像合成部123は、JANコード211a,211bを同一点として選択し、JANコード212a,212bを同一点として選択する。しかし、画像合成部123は、例えば、連続していない撮影画像間では検出されていないJANコード211b,212aを、同一点として選択しない。これにより、例えば、撮影画像P22と撮影画像P23とがつなぎ合わされて、(N+2)枚目から(N+9)枚目までの撮影画像が失われることを防止できる。 In this case, the image synthesizing unit 123 selects the JAN codes 211a and 211b as the same point, and selects the JAN codes 212a and 212b as the same point. However, the image synthesizing unit 123 does not select, for example, the JAN codes 211b and 212a that are not detected between discontinuous captured images as the same point. As a result, for example, it is possible to prevent the captured image P22 and the captured image P23 from being joined together and the captured images from the (N+2)th to the (N+9)th images to be lost.

図8は、同一点の選択処理例を示す第2の図である。隣接する撮影画像のそれぞれから、読み取り値が同一である複数のJANコードが検出される場合がある。この場合、正確な合成処理を可能にするためには、各撮影画像のどのJANコードを同一点として選択するかを決定する必要がある。 FIG. 8 is a second diagram showing an example of selection processing for the same point. A plurality of JAN codes having the same read value may be detected from each of adjacent captured images. In this case, it is necessary to determine which JAN code of each photographed image is selected as the same point in order to enable accurate synthesis processing.

図8の例では、N枚目の撮影画像P31において、読み取り値「JAN001」のJANコード221a,222aと、読み取り値「JAN002」のJANコード223aとが検出されている。また、(N+1)枚目の撮影画像P32において、読み取り値「JAN001」のJANコード221b,222bと、読み取り値「JAN002」のJANコード223bとが検出されている。 In the example of FIG. 8, the JAN codes 221a and 222a of the read value "JAN001" and the JAN code 223a of the read value "JAN002" are detected in the Nth shot image P31. Also, in the (N+1)th photographed image P32, the JAN codes 221b and 222b of the reading value "JAN001" and the JAN code 223b of the reading value "JAN002" are detected.

このケースでは、実際には、JANコード221a,221bが同一のJANコードであり、JANコード222a,222bが同一のJANコードである。このため、正確な合成処理のためには、JANコード221a,221bの組み合わせ、またはJANコード222a,222bの組み合わせが、同一点として検出されなければならない。しかし、JANコード221a,222bの組み合わせやJANコード222a,221bの組み合わせが同一点として検出されてしまうと、正確な合成処理が行われず、合成処理によって他のJANコードが失われてしまう可能性がある。 In this case, the JAN codes 221a and 221b are actually the same JAN code, and the JAN codes 222a and 222b are the same JAN code. Therefore, the combination of the JAN codes 221a and 221b or the combination of the JAN codes 222a and 222b must be detected as the same point for accurate synthesis processing. However, if the combination of the JAN codes 221a and 222b or the combination of the JAN codes 222a and 221b are detected as the same point, the correct synthesis processing cannot be performed, and there is a possibility that other JAN codes will be lost due to the synthesis processing. be.

そこで、画像合成部123は、同一の撮影画像から読み取り値が同一である複数のJANコードが検出された場合、それらの中からX座標が最大のJANコードを選択して、同一点の探索を行う。図8のケースでは、撮影画像P31からJANコード222aを選択するとともに、撮影画像P32からJANコード222bを選択し、選択されたJANコード222a,222bを同一点として検出する。一方、例えば、JANコード221a,222bは、同一点でないと判定される。 Therefore, when a plurality of JAN codes having the same read value are detected from the same photographed image, the image synthesizing unit 123 selects the JAN code with the largest X coordinate from among them to search for the same point. conduct. In the case of FIG. 8, the JAN code 222a is selected from the captured image P31, the JAN code 222b is selected from the captured image P32, and the selected JAN codes 222a and 222b are detected as the same point. On the other hand, for example, the JAN codes 221a and 222b are determined not to be the same point.

なお、台車31が撮影方向に対して左側から右側に移動する場合、画像合成部123は、読み取り値が同一である複数のJANコードの中から、X座標が最小のJANコードを選択して、同一点の探索を行う。 Note that when the carriage 31 moves from the left side to the right side with respect to the photographing direction, the image synthesizing unit 123 selects the JAN code with the smallest X coordinate from among a plurality of JAN codes with the same read value, Search for the same point.

また、別の方法として、画像合成部123は、隣接する撮影画像P31,P32でなく、時間的に前側の撮影画像P31から、読み取り値が同一であるJANコード221a,222aのうちX座標が最大のJANコード222aを選択してもよい。この場合、画像合成部123は、時間的に後ろ側の撮影画像P32から検出されたJANコード221b,222bの中から、JANコード222aとの間でY座標が一定範囲内に含まれるJANコードを同一点として検出する。 As another method, the image synthesizing unit 123 selects the maximum X coordinate of the JAN codes 221a and 222a having the same read value from the temporally front captured image P31 instead of the adjacent captured images P31 and P32. , the JAN code 222a may be selected. In this case, the image synthesizing unit 123 selects a JAN code whose Y coordinate is within a certain range with respect to the JAN code 222a from among the JAN codes 221b and 222b detected from the captured image P32 on the rear side in terms of time. Detect as the same point.

図9は、読み取り値が同一のJANコードが検出されなかった場合の合成処理例を示す図である。前述のように、画像合成部123は、連続する撮影画像の間で読み取り値が同じJANコードを同一点として検出する。しかし、連続する撮影画像の間で読み取り値が同じJANコードが必ず検出されるとは限らない。 FIG. 9 is a diagram showing an example of synthesizing processing when JAN codes with the same read value are not detected. As described above, the image synthesizing unit 123 detects JAN codes with the same read value as the same point between successive captured images. However, it is not always the case that a JAN code with the same reading value is detected between successive captured images.

図9の例では、N枚目の撮影画像P41から、読み取り値「JAN001」、座標(x1,y1)のJANコード231aが検出されている。また、(N+1)枚目の撮影画像P42から、読み取り値「JAN001」、座標(x2,y2)のJANコード231bが検出されている。そして、これらのJANコード231a,231bが同一点として検出され、撮影画像P41,P42間のシフト幅が|x2-x1|と算出されている。 In the example of FIG. 9, the JAN code 231a with the read value "JAN001" and the coordinates (x1, y1) is detected from the Nth photographed image P41. Also, the JAN code 231b of the read value "JAN001" and the coordinates (x2, y2) is detected from the (N+1)th photographed image P42. These JAN codes 231a and 231b are detected as the same point, and the shift width between the photographed images P41 and P42 is calculated as |x2-x1|.

また、(N+1)枚目の撮影画像P42から、読み取り値「JAN003」、座標(x3,y3)のJANコード232bが検出されている。さらに、(N+2)枚目の撮影画像P43から、読み取り値「JAN003」、座標(x4,y4)のJANコード232cが検出されている。そして、これらのJANコード232b,232cが同一点として検出され、撮影画像P42,P43間のシフト幅が|x4-x3|と算出されている。 Also, the JAN code 232b of the read value "JAN003" and coordinates (x3, y3) is detected from the (N+1)th photographed image P42. Further, the JAN code 232c of the read value "JAN003" and the coordinates (x4, y4) is detected from the (N+2)th photographed image P43. These JAN codes 232b and 232c are detected as the same point, and the shift width between the photographed images P42 and P43 is calculated as |x4-x3|.

一方、(N+3)枚目の撮影画像P44には、実際にはJANコード232cと同一であるJANコード232dが写り込んでいる。しかし、JANコード232dはその一部しか撮影画像P44に写っておらず、画像合成部123によって検出されていない。さらに、(N+4)枚目の撮影画像P45には、JANコードが写っていない。このようなケースでは、このままでは撮影画像P43,P44間のシフト幅と撮影画像P44,P45間のシフト幅とを算出できず、撮影画像P44,P45を合成できない。 On the other hand, in the (N+3)th shot image P44, the JAN code 232d that is actually the same as the JAN code 232c appears. However, the JAN code 232d is only partly shown in the captured image P44 and is not detected by the image synthesizing section 123. FIG. Furthermore, the JAN code is not shown in the (N+4)th photographed image P45. In such a case, the shift width between the photographed images P43 and P44 and the shift width between the photographed images P44 and P45 cannot be calculated, and the photographed images P44 and P45 cannot be synthesized.

ここで、例えば、台車31を押す作業者34が意図的に止まったり戻ったりしない限り、台車31はほぼ一定の速度で移動すると想定される。そこで、画像合成部123は、ある撮影画像と次の撮影画像との間で読み取り値が同じJANコードを検出できなかった場合、直近の撮影画像間で算出されたシフト幅を、該当する撮影画像間のシフト幅としてそのまま用いる。 Here, for example, unless the operator 34 pushing the carriage 31 intentionally stops or returns, it is assumed that the carriage 31 moves at a substantially constant speed. Therefore, when the image synthesizing unit 123 cannot detect a JAN code with the same reading value between a certain captured image and the next captured image, the shift width calculated between the most recent captured images is added to the corresponding captured image. It is used as it is as the shift width between

図9の例では、撮影画像P43,P44の間におけるシフト幅として、撮影画像P42,P43の間のシフト幅|x4-x3|が流用される。さらに、撮影画像P44,P45の間におけるシフト幅としても、撮影画像P42,P43の間のシフト幅|x4-x3|が流用される。これにより、撮影画像P41~P43だけでなく撮影画像P44,P45を合成して、合成画像P46を作成できるようになる。 In the example of FIG. 9, the shift width |x4-x3| between the photographed images P42 and P43 is used as the shift width between the photographed images P43 and P44. Further, the shift width |x4-x3| between the photographed images P42 and P43 is also used as the shift width between the photographed images P44 and P45. As a result, not only the photographed images P41 to P43 but also the photographed images P44 and P45 can be synthesized to create a synthetic image P46.

この方法では、シフト幅の計算精度が低下して、画像合成精度が劣化する可能性はある。しかし、出荷検品のためにはJANコードの読み取り値と個数がわかればよいので、JANコードが写っていない部分の画像合成精度はあまり重要でない。上記方法により、必要十分な同一点の検出精度を得ることができる。 With this method, there is a possibility that the calculation accuracy of the shift width will be lowered and the image synthesis accuracy will be degraded. However, for shipping inspection, it is sufficient to know the read value and the number of JAN codes, so the image synthesis accuracy of the portion where the JAN code is not shown is not so important. By the above method, it is possible to obtain necessary and sufficient detection accuracy of the same point.

次に、図10~図13を参照して、縦方向の撮影画像の合成処理について説明する。縦方向の撮影画像とは、同一時刻においてカメラ10a,10b,10c,・・・のそれぞれによって撮影された画像を指す。 Synthesis processing of vertically captured images will now be described with reference to FIGS. 10 to 13. FIG. The captured images in the vertical direction refer to images captured by the cameras 10a, 10b, 10c, . . . at the same time.

縦方向の撮影画像についても、撮影画像から検出された、読み取り値が同じJANコードを特徴点として用いることで、連続する(カメラ10が隣接する)撮影画像を合成する方法が考えられる。横方向の撮影画像の合成では、台車31の移動速度の調整によってJANコードの写り方を調整できるのに対し、縦方向ではカメラ10の間隔が固定であるという違いがある。そのため、縦方向に隣接する撮影画像の両方に読み取り値が同じJANコードが写るようにしようとすると、各カメラ10による縦方向の撮影範囲の重複幅が比較的大きくなるように、カメラ10間の高さの差を小さくする必要が生じる。経験的には、撮影範囲が2/3以上重複しないと撮影画像を精度よく合成できない。しかし、カメラ10間の高さの差を小さくすると、カメラ10の設置台数を多くしなければならず、部品コストが増大してしまうという問題がある。したがって、縦方向の撮影画像の合成には、JANコードを特徴点として検出する方法を用いることが難しい。 As for the captured images in the vertical direction, a method of synthesizing successive captured images (where the cameras 10 are adjacent) can be considered by using JAN codes with the same read value detected from the captured images as feature points. In the synthesis of the photographed images in the horizontal direction, the appearance of the JAN code can be adjusted by adjusting the moving speed of the carriage 31. In the vertical direction, however, the interval between the cameras 10 is fixed. Therefore, when attempting to capture the JAN code with the same reading value in both vertically adjacent photographed images, the length of overlap between the photographing ranges in the vertical direction of each camera 10 becomes relatively large. It becomes necessary to reduce the difference in height. Empirically, the photographed images cannot be synthesized with high accuracy unless the photographing ranges overlap by ⅔ or more. However, if the difference in height between the cameras 10 is reduced, the number of installed cameras 10 must be increased, resulting in an increase in component cost. Therefore, it is difficult to use the method of detecting the JAN code as a feature point for synthesizing vertically captured images.

そこで、画像合成部123は、上記方法を用いずに、連続する撮影画像を合成する際の撮影画像間の重複幅を算出する。以下で説明する方法では、縦方向の撮影画像のそれぞれから、読み取り値に関係なく少なくとも1つのJANコードが検出されていれば、重複幅を精度よく算出できるようにする。これにより、カメラ10の台数をできるだけ減らし、装置コストを低減する。 Therefore, the image synthesizing unit 123 calculates the overlapping width between the shot images when synthesizing the consecutive shot images without using the above method. In the method described below, if at least one JAN code is detected from each photographed image in the vertical direction regardless of the reading value, the overlapping width can be calculated with high accuracy. As a result, the number of cameras 10 is reduced as much as possible, and the device cost is reduced.

画像合成部123は、まず、カメラ10と撮影対象面(段ボール箱の表面)との間の距離を求める。ここで、カメラ10と撮影対象面との距離は、カメラ10の設置時点で概ね決まる。しかし、台車31に積載される段ボール箱のサイズや、台車31への積み方によって、カメラ10と撮影対象面との距離は変動し得る。さらに、台車31は人によって押されるので、台車31とカメラ10との距離が常に同一になるとも限らない。 The image synthesizing unit 123 first obtains the distance between the camera 10 and the surface to be photographed (the surface of the cardboard box). Here, the distance between the camera 10 and the surface to be photographed is generally determined when the camera 10 is installed. However, the distance between the camera 10 and the surface to be photographed may vary depending on the size of the cardboard boxes loaded on the cart 31 and how they are stacked on the cart 31 . Furthermore, since the truck 31 is pushed by a person, the distance between the truck 31 and the camera 10 is not always the same.

このため、画像合成部123は、撮影画像におけるJANコードの領域の縦方向のピクセル数(縦サイズ)と、あらかじめ設定されたカメラ設定情報111とに基づいて、カメラ10と撮影対象面との間の距離を推定する。 Therefore, based on the number of pixels in the vertical direction (vertical size) of the JAN code area in the captured image and the preset camera setting information 111, the image synthesizing unit 123 determines the distance between the camera 10 and the surface to be captured. Estimate the distance of

図10は、カメラの視野角と撮影範囲との関係を示す図である。図10において、距離Dは、撮影画像を撮影したカメラ10と撮影対象面37との距離(単位:mm)を示す。視野角θは、縦方向に対するカメラ10の視野角(垂直画角)を示す。この視野角θは、カメラ設定情報111にあらかじめ設定される。高さHは、撮影対象面37における撮影範囲(撮影画像に写る範囲)の縦方向の長さ(単位:mm)を示す。高さhは、高さHの1/2の長さ(単位:mm)を指す。このとき、高さhは次の式(1)で表される。
h=D×tan(θ/2) ・・・(1)
図11は、JANコードのサイズと画像サイズとの関係を示す図である。図11において、垂直サイズIHは、撮影画像P51の縦方向のピクセル数を示す。この垂直サイズIHは、カメラ設定情報111にあらかじめ設定される。垂直サイズPQHは、撮影画像P51におけるJANコード38の領域の縦方向のピクセル数を示す。高さQHは、撮影対象面におけるJANコード38の領域の縦方向の長さ(単位:mm)を示す。このとき、垂直サイズIH,PQHおよび高さH,QHの関係は、次の式(2)で表される。
PQH:QH=IH:H ・・・(2)
そして、この式(2)と前述の式(1)とから、JANコードの垂直サイズPQHは次の式(3)で表される。
PQH=(QH×IH)/H
=(QH×IH)/(2×D×tan(θ/2)) ・・・(3)
したがって、画像合成部123は、撮影画像P51におけるJANコード38の垂直サイズPQHを検出することで、カメラ10からそのJANコード38までの距離Dを次の式(4)を用いて算出することができる。
D=(QH×IH)/(2×tan(θ/2))×1/PQH ・・・(4)
図12は、撮影画像間の重複幅の算出方法を示す図である。図12を参照して、カメラ10aによる撮影画像とカメラ10bによる撮影画像とを合成する際の撮影画像間の重複幅の算出方法について説明する。
FIG. 10 is a diagram showing the relationship between the viewing angle of the camera and the shooting range. In FIG. 10, the distance D indicates the distance (unit: mm) between the camera 10 that captured the captured image and the surface 37 to be captured. The viewing angle θ indicates the viewing angle (vertical viewing angle) of the camera 10 with respect to the vertical direction. This viewing angle θ is preset in the camera setting information 111 . The height H indicates the length (unit: mm) in the vertical direction of the shooting range (the range appearing in the shot image) on the shooting target plane 37 . The height h refers to the half length of the height H (unit: mm). At this time, the height h is represented by the following formula (1).
h=D×tan(θ/2) (1)
FIG. 11 is a diagram showing the relationship between the JAN code size and the image size. In FIG. 11, the vertical size IH indicates the number of pixels in the vertical direction of the captured image P51. This vertical size IH is preset in the camera setting information 111 . The vertical size PQH indicates the number of pixels in the vertical direction of the area of the JAN code 38 in the captured image P51. The height QH indicates the vertical length (unit: mm) of the area of the JAN code 38 on the imaging target plane. At this time, the relationship between the vertical sizes IH, PQH and the heights H, QH is represented by the following equation (2).
PQH:QH=IH:H (2)
Then, the vertical size PQH of the JAN code is expressed by the following equation (3) from this equation (2) and the above equation (1).
PQH=(QH×IH)/H
=(QH×IH)/(2×D×tan(θ/2)) (3)
Therefore, by detecting the vertical size PQH of the JAN code 38 in the captured image P51, the image synthesizing unit 123 can calculate the distance D from the camera 10 to the JAN code 38 using the following equation (4). can.
D=(QH×IH)/(2×tan(θ/2))×1/PQH (4)
FIG. 12 is a diagram showing a method of calculating the overlapping width between captured images. With reference to FIG. 12, a method of calculating the overlapping width between the captured images when synthesizing the captured image by the camera 10a and the captured image by the camera 10b will be described.

図12では、台車31が移動する地表面からのカメラ10a,10bの高さ(単位:mm)を、それぞれSH1,SH2とする。また、カメラ10a,10bの視野角θは同一である。さらに、カメラ10a,10bから撮影対象面37までの距離(単位:mm)を、それぞれD1,D2とする。なお、図12では説明を分かりやすくするために、カメラ10aによる撮影対象面とカメラ10bによる撮影対象面とを同一面として表しているが、実際にはこれらは異なる可能性がある。したがって、距離D1と距離D2とは等しくならない場合がある。 In FIG. 12, the heights (unit: mm) of the cameras 10a and 10b from the ground surface on which the truck 31 moves are assumed to be SH1 and SH2, respectively. Also, the viewing angles θ of the cameras 10a and 10b are the same. Further, the distances (unit: mm) from the cameras 10a and 10b to the imaging target surface 37 are assumed to be D1 and D2, respectively. In FIG. 12, the surface to be photographed by the camera 10a and the surface to be photographed by the camera 10b are represented as the same surface for the sake of easy understanding of the description, but they may actually be different. Therefore, the distance D1 and the distance D2 may not be equal.

画像合成部123は、カメラ10a,10bのそれぞれについての撮影対象面における縦方向の撮影範囲を推定する。これにより、それぞれの撮影範囲が重複する重複幅の算出が可能になる。 The image synthesizing unit 123 estimates the vertical shooting range on the shooting target plane for each of the cameras 10a and 10b. This makes it possible to calculate the overlap width in which the respective imaging ranges overlap.

図12では、カメラ10aの撮影対象面における、カメラ10aの撮影範囲の上端位置および下端位置を、それぞれYH1,YL1とする(単位:mm)。また、この撮影範囲の縦方向の長さの1/2の高さをh1とする(単位:mm)。一方、カメラ10bの撮影対象面における、カメラ10bの撮影範囲の上端位置および下端位置を、それぞれYH2,YL2とする(単位:mm)。また、この撮影範囲の縦方向の長さの1/2の高さをh2とする(単位:mm)。この場合、カメラ10aの撮影範囲の上端位置YH1、カメラ10bの撮影範囲の下端位置YL2は、それぞれ下記の式(5),(6)で表される。したがって、これらの撮影範囲の重複幅W(単位:mm)は、下記の式(7)によって算出される。
YH1=SH1+h1 ・・・(5)
YL2=SH2-h2 ・・・(6)
W=YH1-YL2 ・・・(7)
また、高さh1,h2は、上記の式(1)を用いて、それぞれ下記の式(8),(9)で表される。
h1=D1×tan(θ/2) ・・・(8)
h2=D2×tan(θ/2) ・・・(9)
ここで、撮影画像の垂直サイズIH、撮影範囲の縦方向の長さの1/2を示す高さh、重複幅W、合成時における撮影画像間の重複幅PW(単位:ピクセル)、および撮影範囲の重複幅W(=YH1-YL2)との間には、下記の式(10)のような関係が成立する。したがって、画像合成部123は、下記の式(11)を用いて、撮影画像間の重複幅PWを算出することができる。
IH:2×h=PW:(YH1-YL2) ・・・(10)
PW=(IH×(YH1-YL2))/(2×h) ・・・(11)
なお、式(11)の高さhとしては、例えば、カメラ10aに対応する高さh1とカメラ10bに対応する高さh2との間の平均値を用いることができる。
In FIG. 12, the upper end position and the lower end position of the imaging range of the camera 10a on the imaging target plane of the camera 10a are set to YH1 and YL1, respectively (unit: mm). Also, let h1 be the height that is half the vertical length of the photographing range (unit: mm). On the other hand, the upper end position and the lower end position of the photographing range of the camera 10b on the photographing target plane of the camera 10b are set to YH2 and YL2, respectively (unit: mm). Also, let h2 be the height that is half the vertical length of the photographing range (unit: mm). In this case, the upper end position YH1 of the imaging range of the camera 10a and the lower end position YL2 of the imaging range of the camera 10b are represented by the following equations (5) and (6), respectively. Therefore, the overlapping width W (unit: mm) of these photographing ranges is calculated by the following formula (7).
YH1=SH1+h1 (5)
YL2=SH2-h2 (6)
W=YH1-YL2 (7)
The heights h1 and h2 are expressed by the following formulas (8) and (9), respectively, using the above formula (1).
h1=D1×tan(θ/2) (8)
h2=D2×tan(θ/2) (9)
Here, the vertical size IH of the photographed image, the height h indicating half the length of the photographing range in the vertical direction, the overlap width W, the overlap width PW (unit: pixel) between the photographed images at the time of synthesis, and the photographing A relationship such as the following formula (10) holds with the range overlap width W (=YH1-YL2). Therefore, the image synthesizing unit 123 can calculate the overlapping width PW between the captured images using the following formula (11).
IH: 2×h=PW: (YH1-YL2) (10)
PW=(IH×(YH1−YL2))/(2×h) (11)
As the height h in Equation (11), for example, an average value between the height h1 corresponding to the camera 10a and the height h2 corresponding to the camera 10b can be used.

以上のように、画像合成部123は、縦方向に連続する各撮影画像内のJANコードの垂直サイズPQHを検出する。そして、画像合成部123は、検出された垂直サイズPQHと、カメラ設定情報111に設定された垂直サイズIH、高さQHおよび視野角θとに基づいて、撮影画像ごとに撮影対象面との距離Dを算出する。 As described above, the image synthesizing unit 123 detects the vertical size PQH of the JAN code in each photographed image that is continuous in the vertical direction. Based on the detected vertical size PQH, and the vertical size IH, height QH, and viewing angle θ set in the camera setting information 111, the image synthesizing unit 123 calculates the distance from the shooting target plane for each captured image. Calculate D.

さらに、画像合成部123は、撮影画像ごとに算出された距離Dと各カメラの高さとに基づいて、撮影画像ごとに撮影範囲の上端位置および下端位置を算出し、この算出結果に基づいて、撮影画像間の重複幅PWを算出する。最終的に、画像合成部123は、縦方向に連続する撮影画像間の重複幅PWに基づき、下側の画像に対して、上側の画像を(撮影画像の垂直サイズIH-重複幅PW)だけ上側にシフトした位置に合成することで、合成画像を作成する。 Further, the image synthesizing unit 123 calculates the upper end position and the lower end position of the photographing range for each photographed image based on the distance D calculated for each photographed image and the height of each camera, and based on this calculation result, An overlap width PW between captured images is calculated. Finally, based on the overlapping width PW between the vertically continuous captured images, the image synthesizing unit 123 divides the upper image by (vertical size IH of the captured image - overlapping width PW) with respect to the lower image. A synthesized image is created by synthesizing at the position shifted upward.

ところで、上記の重複幅算出処理では、カメラから撮影対象面までの距離Dを、撮影画像内のJANコードの垂直サイズPQHを基準として算出している。このとき、撮影画像から複数のJANコードが検出されている場合には、例えば、各JANコードの垂直サイズの平均値が、式(4)の垂直サイズPQHとして代入される。ただし、JANコード読み取り部122は、撮影画像にJANコードの縦方向の一部しか写っていなくても、JANコードの領域を検出してその内容を読み取ることができる。このため、そのようなJANコードの垂直サイズが式(4)の計算に利用されると、距離Dを正確に算出できなくなる。 By the way, in the overlapping width calculation process described above, the distance D from the camera to the surface to be photographed is calculated based on the vertical size PQH of the JAN code in the photographed image. At this time, if a plurality of JAN codes are detected from the captured image, for example, the average value of the vertical size of each JAN code is substituted as the vertical size PQH in equation (4). However, the JAN code reading unit 122 can detect the area of the JAN code and read its contents even if only a part of the JAN code is shown in the photographed image in the vertical direction. Therefore, if the vertical size of such a JAN code is used in the calculation of Equation (4), the distance D cannot be calculated accurately.

図13は、JANコードの垂直サイズの検出算出処理を示す図である。図13の上側に示すように、例えば、JANコード読み取り部122によって撮影画像P52からJANコードが7か所検出されたとする。これらのうち、左上に写っているJANコードと左下に写っているJANコードは、縦方向の一部のみが撮影画像P52に写っているが、JANコード読み取り部122は、これらのJANコードの位置を検出し、JANコードの内容を読み取れているとする。 FIG. 13 is a diagram showing the process of detecting and calculating the vertical size of the JAN code. As shown in the upper part of FIG. 13, for example, it is assumed that the JAN code reading unit 122 detects seven JAN codes from the photographed image P52. Of these, the JAN code shown in the upper left and the JAN code shown in the lower left are only partially shown in the photographed image P52 in the vertical direction. is detected and the content of the JAN code is read.

画像合成部123は、撮影画像P52に対応するJANコードの垂直サイズPQHを算出する場合、撮影画像P52から検出された複数のJANコードの垂直サイズを基に平均値を算出し、この平均値を垂直サイズPQHとして利用する。しかし、撮影画像P52上の左上および左下に写っているJANコードの垂直サイズをこのような平均値の計算に利用してしまうと、式(4)による距離Dの計算精度が悪化してしまい、その結果として撮影画像間の重複幅Wの計算精度も悪化してしまう。 When calculating the vertical size PQH of the JAN code corresponding to the captured image P52, the image synthesizing unit 123 calculates an average value based on the vertical sizes of a plurality of JAN codes detected from the captured image P52, and calculates the average value. Used as vertical size PQH. However, if the vertical size of the JAN code appearing in the upper left and lower left of the photographed image P52 is used for calculating such an average value, the calculation accuracy of the distance D by Equation (4) deteriorates. As a result, the calculation accuracy of the overlapping width W between the captured images also deteriorates.

そこで、画像合成部123は、図13の下側に示すように、検出されたJANコードの垂直サイズのヒストグラムを算出する。画像合成部123は、例えば、度数がピークとなる垂直サイズから一定値以上離れた垂直サイズを、上記の平均値計算から除外する。図13のヒストグラムの例では、垂直サイズが60~69ピクセルの範囲において度数がピークとなっている。除外のための距離を例えば20ピクセルとした場合、40ピクセル以下の範囲が平均値計算からの除外範囲となり、40ピクセル以下の垂直サイズが平均値計算の際に使用されなくなる。これにより、距離Dの計算精度が悪化する事態の発生を防止できる。 Therefore, the image synthesizing unit 123 calculates a vertical size histogram of the detected JAN code, as shown in the lower part of FIG. The image synthesizing unit 123, for example, excludes from the average value calculation the vertical size that is apart from the vertical size at which the frequency peaks by a certain value or more. In the histogram example of FIG. 13, the frequency peaks in the vertical size range of 60 to 69 pixels. For example, if the distance for exclusion is 20 pixels, the range of 40 pixels or less becomes the exclusion range from the average value calculation, and the vertical size of 40 pixels or less is not used in the average value calculation. As a result, it is possible to prevent the occurrence of a situation in which the calculation accuracy of the distance D is deteriorated.

実際の処理としては、例えば、画像合成部123は、横方向および縦方向のすべての撮影画像から検出されたJANコードを用いて、JANコードの垂直サイズのヒストグラムを算出する。画像合成部123は、上記手順により、度数がピークとなる垂直サイズから一定値以上離れたピクセル数の領域を、平均値計算から算出外範囲に決定する。その後、画像合成部123は、ある撮影画像についての距離Dを計算する際に、その撮影画像から複数のJANコードが検出されている場合、垂直サイズが除外範囲に含まれるJANコードを除外し、残りのJANコードの垂直サイズの平均値を垂直サイズPQHとして距離Dを算出する。 As an actual process, for example, the image synthesizing unit 123 uses the JAN codes detected from all the captured images in the horizontal direction and the vertical direction to calculate a histogram of the vertical sizes of the JAN codes. The image synthesizing unit 123 uses the above-described procedure to determine, from the average value calculation, an area of the number of pixels separated by a certain value or more from the vertical size at which the frequency peaks as an out-of-calculation range. After that, when calculating the distance D for a certain captured image, if a plurality of JAN codes are detected from the captured image, the image synthesizing unit 123 excludes the JAN code whose vertical size is included in the exclusion range, The distance D is calculated using the average value of the vertical sizes of the remaining JAN codes as the vertical size PQH.

以上説明した手順により、横方向に連続するすべての撮影画像ペアに対応するシフト幅が算出されるとともに、縦方向に連続するすべての撮影画像ペアに対応する重複幅が算出される。続いて、画像合成部123は、シフト幅および重複幅の算出結果を用いて、各撮影画像の各画素の座標を、パノラマ画像(合成画像)の座標系の座標に変換する。 By the procedure described above, the shift widths corresponding to all pairs of photographed images consecutive in the horizontal direction are calculated, and the overlap widths corresponding to all pairs of photographed images consecutive in the vertical direction are calculated. Subsequently, the image synthesizing unit 123 converts the coordinates of each pixel of each captured image into coordinates of the coordinate system of the panorama image (composite image) using the shift width and overlap width calculation results.

ここでは、画像の座標系の原点を左下とする。また、本実施の形態のように、カメラ10の撮影方向に対して台車31が右側から左側に移動する場合、パノラマ画像の座標系の原点は、横方向および縦方向に対する1枚目の撮影画像(左端かつ下端の撮影画像)の原点に設定される。 Here, the origin of the coordinate system of the image is assumed to be the lower left. Further, as in the present embodiment, when the cart 31 moves from the right side to the left side with respect to the photographing direction of the camera 10, the origin of the coordinate system of the panorama image is the first photographed image in the horizontal and vertical directions. It is set to the origin of (photographed image at left end and bottom end).

撮影画像の各画素の座標をパノラマ画像の座標系の座標に変換するための変換式は、次の式(12),(13)のようになる。 Conversion formulas for converting the coordinates of each pixel of the captured image into the coordinates of the coordinate system of the panorama image are given by the following formulas (12) and (13).

Figure 2023031715000002
Figure 2023031715000002

式(12)は、s枚目の撮影画像の画素のX座標psxを、パノラマ画像の座標系におけるX座標wxに変換するための変換式である。式(12)におけるHkは、k枚目の撮影画像と(k+1)枚目の撮影画像との間の特徴点距離(シフト幅)を示す。 Equation (12) is a transformation equation for transforming the X coordinate p s x of the pixel of the sth captured image into the X coordinate wx in the coordinate system of the panorama image. H k in Equation (12) indicates the feature point distance (shift width) between the k-th captured image and the (k+1)-th captured image.

また、式(13)は、下からn番目のカメラによる撮影画像の画素のY座標pnyを、パノラマ画像の座標系におけるY座標wyに変換するための変換式である。式(13)におけるVkは、k番目のカメラの撮影画像と(k+1)番目のカメラの撮影画像との間の特徴点距離(重複幅)を示す。 Expression (13) is a conversion expression for converting the Y coordinate p n y of the pixel of the image captured by the n-th camera from the bottom into the Y coordinate wy in the coordinate system of the panorama image. V k in Equation (13) represents the feature point distance (overlapping width) between the image captured by the k-th camera and the image captured by the (k+1)-th camera.

画像合成部123は、上記の式(12),(13)による変換後の撮影画像の間で重複する領域の各画素値を、アルファブレンド法などの画素値合成法によって合成することで、パノラマ画像を作成する。また、上記の座標変換によって、撮影画像から検出されたJANコードの位置(座標)も変換される。後述するように、変換後のJANコードの座標に基づいてJANコードの重複が排除されることにより、JANコードの読み取り値と個数とが出力される。 The image synthesizing unit 123 synthesizes each pixel value of the overlapping area between the captured images after the conversion by the above formulas (12) and (13) by a pixel value synthesizing method such as the alpha blending method, thereby obtaining a panorama image. Create an image. In addition, the position (coordinates) of the JAN code detected from the captured image is also transformed by the coordinate transformation described above. As will be described later, duplication of the JAN code is eliminated based on the coordinates of the converted JAN code, and the read value and number of the JAN code are output.

なお、本実施の形態では、合成されたパノラマ画像が出力されることから、各撮影画像のすべての画素について、式(12),(13)を用いた座標変換が行われる。ただし、パノラマ画像が出力されずに、JANコードの読み取り値および個数のみが出力されてもよい。この場合、各撮影画像から検出されたJANコードの位置のみが、式(12),(13)を用いて座標変換されればよい。 Note that, in the present embodiment, since a synthesized panoramic image is output, coordinate transformation using equations (12) and (13) is performed for all pixels of each captured image. However, it is also possible to output only the read value and the number of JAN codes without outputting the panorama image. In this case, only the position of the JAN code detected from each captured image should be subjected to coordinate transformation using equations (12) and (13).

図14は、JANコードの同定処理について説明するための図である。上記の式(12),(13)を用いた座標変換により、各撮影画像から検出されたJANコードの座標はパノラマ画像の座標系の座標に変換される。これにより、隣接する撮影画像間で同一のJANコードは、理想的には同一の座標に変換される。結果出力処理部124は、このようにして同一の座標に変換されたJANコードの一方をJANコード読み取り情報114から削除することにより、JANコードの重複を排除する。横方向に隣接する撮影画像間では、例えば、時間的に前側の撮影画像におけるJANコードが削除される。縦方向に隣接する撮影画像間では、例えば、下側の撮影画像におけるJANコードが削除される。 FIG. 14 is a diagram for explaining JAN code identification processing. Coordinates of the JAN code detected from each photographed image are converted into coordinates of the coordinate system of the panorama image by coordinate conversion using the above equations (12) and (13). As a result, identical JAN codes in adjacent captured images are ideally converted to identical coordinates. The result output processing unit 124 eliminates duplication of JAN codes by deleting one of the JAN codes converted to the same coordinates from the JAN code reading information 114 . Between the photographed images adjacent in the horizontal direction, for example, the JAN code in the temporally front photographed image is deleted. Between vertically adjacent captured images, for example, the JAN code in the lower captured image is deleted.

ただし、現実的には、隣接する撮影画像間で同一のJANコードの座標が、座標変換後に完全に同一の座標になることは稀である。その理由としては、例えば、台車31が走行しているときの振動によって撮影範囲がずれる場合があることや、撮影画像におけるJANコードの写り方によってJANコードの検出位置やサイズが変化する場合があることが挙げられる。 However, in reality, it is rare that the coordinates of the same JAN code between adjacent captured images are completely the same coordinates after coordinate conversion. The reasons for this are, for example, that the photographing range may shift due to vibrations when the truck 31 is running, and that the detection position and size of the JAN code may change depending on how the JAN code appears in the photographed image. Things are mentioned.

図14に示すN枚目の撮影画像P61には、読み取り値「JAN001」のJANコード241が写っている。また、(N+1)枚目の撮影画像P62には、読み取り値「JAN001」のJANコード242が写っている。これらのJANコード241,242は、ある段ボール箱に表示された同一のJANコードであるとする。ところが、JANコード241,242の座標が合成画像P63の座標系の座標に変換されたとき、合成画像P63におけるJANコード241,242の変換後の各座標は、完全には一致していない。 The JAN code 241 with the read value "JAN001" appears in the Nth shot image P61 shown in FIG. Also, the JAN code 242 of the read value "JAN001" appears in the (N+1)th photographed image P62. These JAN codes 241 and 242 are assumed to be the same JAN code displayed on a cardboard box. However, when the coordinates of the JAN codes 241 and 242 are converted to the coordinates of the coordinate system of the synthesized image P63, the converted coordinates of the JAN codes 241 and 242 in the synthesized image P63 do not completely match.

そこで、結果出力処理部124は、隣接する撮影画像間における読み取り値が同じJANコードの座標変換後の位置の距離が、所定の判定閾値未満である場合に、それらのJANコードが同一のJANコードであると判定する。ここで、この判定閾値の決定方法について次の図15を用いて説明する。 Therefore, the result output processing unit 124, when the distance between the positions after the coordinate conversion of the JAN codes having the same read value between the adjacent photographed images is less than a predetermined determination threshold, determines that the JAN codes are the same JAN code. It is determined that Here, a method for determining the determination threshold will be described with reference to FIG. 15 below.

図15は、JANコード同定のための判定閾値決定方法を説明するための図である。この判定閾値としては、例えば、段ボール箱を積み重ねたときに実際にJANコード同士が最も接近する場合のJANコード間の距離に基づいて決定されればよい。 FIG. 15 is a diagram for explaining a determination threshold determination method for JAN code identification. This determination threshold may be determined, for example, based on the distance between the JAN codes when the cardboard boxes are actually closest to each other when the cardboard boxes are stacked.

図15では、段ボール箱251の左下端と、段ボール箱252の右下端と、段ボール箱253の左上端と、段ボール箱254の右上端とが合わさるように、段ボール箱251~254が積み重ねられた場合を例示している。段ボール箱251の左下端、段ボール箱252の右下端、段ボール箱253の左上端、および段ボール箱254の右上端には、それぞれJANコードが印刷されたラベル261~264が貼付されている。 In FIG. 15, the cardboard boxes 251 to 254 are stacked such that the lower left edge of the cardboard box 251, the lower right edge of the cardboard box 252, the upper left edge of the cardboard box 253, and the upper right edge of the cardboard box 254 are aligned. is exemplified. Labels 261 to 264 printed with JAN codes are attached to the lower left end of the cardboard box 251, the lower right end of the cardboard box 252, the upper left end of the cardboard box 253, and the upper right end of the cardboard box 254, respectively.

このような場合に、ラベル261~264のJANコード間の距離が最も短くなると考えられる。図15の例では、JANコード間の横方向の距離が90mmであり、縦方向の距離が70mmであったとする。この場合、最小値である70mmが判定閾値としてあらかじめ設定される。 In such a case, it is considered that the distance between the JAN codes of labels 261-264 is the shortest. In the example of FIG. 15, it is assumed that the horizontal distance between JAN codes is 90 mm and the vertical distance is 70 mm. In this case, the minimum value of 70 mm is preset as the determination threshold.

次に、PC100の処理についてフローチャートを用いて説明する。
図16は、PCの処理の全体を示すフローチャートの例である。
[ステップS11]段ボール箱が積載された台車が作業者によって押され、台車の移動が開始される。台車がカメラを横切って移動する間、各カメラによって画像が連続して撮影される。PC100の画像受信部121は、各カメラからの撮影画像を受信し、画像情報113に蓄積する。
Next, processing of the PC 100 will be described using a flowchart.
FIG. 16 is an example of a flowchart showing the overall processing of the PC.
[Step S11] A trolley loaded with cardboard boxes is pushed by the worker, and the trolley starts to move. Images are taken continuously by each camera as the cart moves across the cameras. The image receiving unit 121 of the PC 100 receives captured images from each camera and stores them in the image information 113 .

[ステップS12]JANコード読み取り部122は、画像情報113に蓄積された撮影画像のそれぞれからJANコードを検出する。JANコード読み取り部122は、検出されたJANコードの撮影画像における位置(座標)と、撮影画像におけるJANコードの垂直サイズと特定するとともに、そのJANコードが示す情報を読み取る。JANコード読み取り部122は、検出されたJANコードの位置、垂直サイズおよび読み取り値を、検出された撮影画像を示す識別情報に対応付けてJANコード読み取り情報114に登録する。 [Step S<b>12 ] The JAN code reader 122 detects the JAN code from each captured image stored in the image information 113 . The JAN code reading unit 122 identifies the position (coordinates) of the detected JAN code in the captured image and the vertical size of the JAN code in the captured image, and reads information indicated by the JAN code. The JAN code reading unit 122 registers the detected JAN code position, vertical size, and reading value in the JAN code reading information 114 in association with identification information indicating the detected captured image.

[ステップS13]画像合成部123は、横方向に連続する撮影画像ペアのそれぞれについてのシフト幅を算出する処理を実行する。
[ステップS14]画像合成部123は、縦方向に連続する撮影画像ペアのそれぞれについての重複幅を算出する処理を実行する。
[Step S13] The image synthesizing unit 123 executes a process of calculating a shift width for each pair of photographed images that are consecutive in the horizontal direction.
[Step S14] The image synthesizing unit 123 performs a process of calculating an overlapping width for each pair of shot images that are consecutive in the vertical direction.

[ステップS15]画像合成部123は、算出されたシフト幅および重複幅を用いて、前述の式(12),(13)にしたがい、各撮影画像の各画素の座標をパノラマ画像の座標系の座標に変換する。 [Step S15] Using the calculated shift width and overlap width, the image synthesizing unit 123 converts the coordinates of each pixel of each captured image into the coordinate system of the panorama image in accordance with the above-described equations (12) and (13). Convert to coordinates.

[ステップS16]画像合成部123は、座標の変換結果に基づいて、各撮影画像を合成したパノラマ画像を作成する。このとき、座標変換後の撮影画像の間で重複する領域の画素値が合成される。 [Step S16] The image synthesizing unit 123 creates a panorama image by synthesizing the captured images based on the coordinate conversion result. At this time, the pixel values of overlapping areas between the photographed images after the coordinate transformation are synthesized.

[ステップS17]結果出力処理部124は、隣接する撮影画像間で同一のJANコードを特定し、JANコードの重複を排除する。具体的には、結果出力処理部124は、変換後の座標に基づき、隣接する撮影画像間で、読み取り値が同じであり、かつパノラマ画像の座標系における位置同士の距離が所定の判定閾値未満であるJANコードを、同一のJANコードと判定する。結果出力処理部124は、同一のJANコードのうちの一方をJANコード読み取り情報114から削除する。横方向に隣接する撮影画像間では、例えば、時間的に前側の撮影画像におけるJANコードが削除される。縦方向に隣接する撮影画像間では、例えば、下側の撮影画像におけるJANコードが削除される。 [Step S17] The result output processing unit 124 identifies the same JAN code between adjacent captured images, and eliminates duplication of JAN codes. Specifically, based on the coordinates after conversion, the result output processing unit 124 determines that adjacent captured images have the same read value and that the distance between the positions in the coordinate system of the panoramic image is less than a predetermined determination threshold. is determined to be the same JAN code. The result output processing unit 124 deletes one of the identical JAN codes from the JAN code reading information 114 . Between the photographed images adjacent in the horizontal direction, for example, the JAN code in the temporally front photographed image is deleted. Between vertically adjacent captured images, for example, the JAN code in the lower captured image is deleted.

[ステップS18]結果出力処理部124は、パノラマ画像上のJANコード(すなわち、JANコード読み取り情報114に残ったJANコード)に基づき、JANコードの読み取り値と、読み取り値が同じJANコードの個数と、作成されたパノラマ画像とを最終結果として出力する。 [Step S18] Based on the JAN code on the panorama image (that is, the JAN code remaining in the JAN code reading information 114), the result output processing unit 124 calculates the read value of the JAN code and the number of JAN codes having the same read value. , and the created panorama image as the final result.

なお、ステップS16が実行されず、ステップS18で最終結果としてパノラマ画像が出力されない場合、ステップS15では、各撮影画像から検出されたJANコードの座標のみがパノラマ画像の座標系に変換されればよい。 Note that if step S16 is not executed and no panorama image is output as the final result in step S18, then in step S15 only the coordinates of the JAN code detected from each captured image should be converted into the coordinate system of the panorama image. .

図17は、シフト幅算出処理の手順を示すフローチャートの例である。この図17の処理は、図16のステップS13の処理に対応する。
[ステップS21]ステップS28までの横方向処理ループが、カメラごとに実行される。
FIG. 17 is an example of a flowchart showing the procedure of shift width calculation processing. The processing of FIG. 17 corresponds to the processing of step S13 of FIG.
[Step S21] A horizontal processing loop up to step S28 is executed for each camera.

[ステップS22]ステップS27までの横方向ペア処理ループが、同じカメラによって撮影された撮影画像のうち、連続する撮影画像ペア(横方向に隣接する撮影画像ペア)ごとに実行される。 [Step S22] The horizontal pair processing loop up to step S27 is executed for each continuous photographed image pair (horizontally adjacent photographed image pair) among the photographed images photographed by the same camera.

[ステップS23]画像合成部123は、撮影画像ペア間で読み取り値が同一のJANコードを特定する。ここで、1つの撮影画像に読み取り値が同一のJANコードが複数存在する場合、画像合成部123は、これらのうちX座標が最も大きいJANコードを選択する。 [Step S23] The image synthesizing unit 123 identifies JAN codes having the same read value between the pair of captured images. Here, when a plurality of JAN codes having the same read value exist in one captured image, the image synthesizing unit 123 selects the JAN code having the largest X coordinate among them.

[ステップS24]画像合成部123は、ステップS23で該当するJANコードを特定できたかを判定する。該当するJANコードを特定できた場合、処理がステップS25に進められ、該当するJANコードを特定できなかった場合、処理がステップS26に進められる。 [Step S24] The image synthesizing unit 123 determines whether or not the corresponding JAN code was specified in step S23. If the corresponding JAN code can be specified, the process proceeds to step S25, and if the corresponding JAN code cannot be specified, the process proceeds to step S26.

[ステップS25]画像合成部123は、特定されたJANコードのそれぞれのX座標の差分に基づいて、撮影画像ペアを合成する際のシフト幅を算出する。
[ステップS26]画像合成部123は、処理対象の撮影画像ペアを合成する際のシフト幅として、直近のステップS25の実行時に算出されたシフト幅を流用する。
[Step S25] The image synthesizing unit 123 calculates the shift width for synthesizing the captured image pair based on the difference between the X coordinates of the identified JAN codes.
[Step S26] The image synthesizing unit 123 uses the shift width calculated at the most recent execution of step S25 as the shift width when synthesizing the captured image pair to be processed.

[ステップS27]ステップS23~S26の処理がすべての撮影画像ペアについて実行されると、横方向ペア処理ループが終了する。
[ステップS28]ステップS22~S27の処理がすべてのカメラについて実行されると、横方向処理ループが終了する。
[Step S27] When the processing of steps S23 to S26 has been performed for all pairs of captured images, the horizontal pair processing loop ends.
[Step S28] When the processing of steps S22 to S27 has been executed for all cameras, the horizontal processing loop ends.

図18は、重複幅算出処理の手順を示すフローチャートの例である。この図18の処理は、図16のステップS14の処理に対応する。
[ステップS31]画像合成部123は、各撮影画像から検出されたすべてのJANコードの垂直サイズをJANコード読み取り情報114から取得し、垂直サイズのヒストグラムを算出する。画像合成部123は、ヒストグラムに基づいて、垂直サイズの平均値計算から除外するための除外範囲を決定する。例えば、度数がピークとなっている垂直サイズから一定値以上離れた垂直サイズの範囲が除外範囲に決定される。
FIG. 18 is an example of a flowchart showing the procedure of overlap width calculation processing. The processing of FIG. 18 corresponds to the processing of step S14 of FIG.
[Step S31] The image synthesizing unit 123 acquires the vertical sizes of all JAN codes detected from each captured image from the JAN code reading information 114, and calculates a histogram of the vertical sizes. The image synthesizing unit 123 determines an exclusion range for exclusion from the calculation of the average value of the vertical size based on the histogram. For example, a range of vertical sizes separated by a certain value or more from the vertical size at which the frequency peaks is determined as the excluded range.

[ステップS32]ステップS40までの縦方向処理ループが、同一時刻に各カメラで撮影された撮影画像群ごとに実行される。
[ステップS33]ステップS35までの縦方向画像ループが、撮影画像群に含まれる撮影画像ごとに実行される。
[Step S32] A vertical processing loop up to step S40 is executed for each group of captured images captured by each camera at the same time.
[Step S33] A vertical image loop up to step S35 is executed for each photographed image included in the photographed image group.

[ステップS34]画像合成部123は、撮影画像から検出されたJANコードの垂直サイズPQHを判定する。撮影画像から複数のJANコードが検出されている場合、画像合成部123は、これらのJANコードの中から垂直サイズがステップS31で決定された除外範囲に含まれるJANコードを除外し、残りのJANコードの垂直サイズを平均することで垂直サイズPQHを算出する。 [Step S34] The image synthesizing unit 123 determines the vertical size PQH of the JAN code detected from the captured image. If a plurality of JAN codes are detected from the captured image, the image synthesizing unit 123 excludes the JAN codes whose vertical size is included in the exclusion range determined in step S31 from these JAN codes, and removes the remaining JAN codes. The vertical size PQH is calculated by averaging the vertical sizes of the codes.

画像合成部123は、JANコードの実際の高さQHをJANコード情報112から取得するとともに、撮影画像の垂直サイズIHとカメラの視野角θをカメラ設定情報111から取得する。画像合成部123は、算出された垂直サイズPQHと取得された高さQH、垂直サイズIHおよび視野角θとを用い、式(4)にしたがってカメラから撮影対象面までの距離Dを算出する。 The image synthesizing unit 123 acquires the actual height QH of the JAN code from the JAN code information 112 and also acquires the vertical size IH of the captured image and the viewing angle θ of the camera from the camera setting information 111 . Using the calculated vertical size PQH, the obtained height QH, the vertical size IH, and the viewing angle θ, the image synthesizing unit 123 calculates the distance D from the camera to the object plane according to Equation (4).

[ステップS35]ステップS34の処理が撮影画像群に含まれるすべての撮影画像について実行されると、縦方向画像ループが終了する。
[ステップS36]ステップS39までの縦方向ペア処理ループが、撮影画像群のうち、縦方向に連続する撮影画像ペアごとに実行される。
[Step S35] When the process of step S34 is executed for all the captured images included in the captured image group, the vertical image loop ends.
[Step S36] The vertical pair processing loop up to step S39 is executed for each photographed image pair that is vertically continuous in the photographed image group.

[ステップS37]画像合成部123は、撮影画像ペアに含まれる各撮影画像を撮影したカメラの高さをカメラ設定情報111から取得する。画像合成部123は、取得したカメラの高さを用い、撮影画像ペアに含まれる各撮影画像について、式(5),(6)にしたがって撮影範囲の上端および下端の位置を算出する。 [Step S37] The image synthesizing unit 123 acquires from the camera setting information 111 the height of the camera that captured each captured image included in the captured image pair. The image synthesizing unit 123 uses the acquired height of the camera to calculate the positions of the upper end and the lower end of the photographing range for each photographed image included in the photographed image pair according to equations (5) and (6).

[ステップS38]画像合成部123は、ステップS37の算出結果を用い、式(11)にしたがって撮影画像ペアに対応する重複幅PWを算出する。
[ステップS39]ステップS37,S38の処理がすべての撮影画像ペアについて実行されると、縦方向ペア処理ループが終了する。
[Step S38] The image synthesizing unit 123 uses the calculation result of step S37 to calculate the overlapping width PW corresponding to the captured image pair according to equation (11).
[Step S39] When the processing of steps S37 and S38 has been performed for all pairs of captured images, the vertical pair processing loop ends.

[ステップS40]ステップS33~S39の処理がすべての撮影画像群について実行されると、縦方向処理ループが終了する。
なお、上記の各実施の形態に示した装置(例えば、画像処理装置1、PC100)の処理機能は、コンピュータによって実現することができる。その場合、各装置が有すべき機能の処理内容を記述したプログラムが提供され、そのプログラムをコンピュータで実行することにより、上記処理機能がコンピュータ上で実現される。処理内容を記述したプログラムは、コンピュータで読み取り可能な記録媒体に記録しておくことができる。コンピュータで読み取り可能な記録媒体としては、磁気記憶装置、光ディスク、半導体メモリなどがある。磁気記憶装置には、ハードディスク装置(HDD)、磁気テープなどがある。光ディスクには、CD(Compact Disc)、DVD(Digital Versatile Disc)、ブルーレイディスク(Blu-ray Disc:BD、登録商標)などがある。
[Step S40] When the processes of steps S33 to S39 are executed for all the photographed image groups, the vertical processing loop ends.
Note that the processing functions of the devices (for example, the image processing device 1 and the PC 100) shown in the above embodiments can be realized by a computer. In that case, a program describing the processing contents of the functions that each device should have is provided, and the above processing functions are realized on the computer by executing the program on the computer. A program describing the processing content can be recorded in a computer-readable recording medium. Computer-readable recording media include magnetic storage devices, optical disks, semiconductor memories, and the like. Magnetic storage devices include hard disk drives (HDD) and magnetic tapes. Optical discs include CDs (Compact Discs), DVDs (Digital Versatile Discs), Blu-ray Discs (BD, registered trademark), and the like.

プログラムを流通させる場合には、例えば、そのプログラムが記録されたDVD、CDなどの可搬型記録媒体が販売される。また、プログラムをサーバコンピュータの記憶装置に格納しておき、ネットワークを介して、サーバコンピュータから他のコンピュータにそのプログラムを転送することもできる。 When distributing a program, for example, portable recording media such as DVDs and CDs on which the program is recorded are sold. It is also possible to store the program in the storage device of the server computer and transfer the program from the server computer to another computer via the network.

プログラムを実行するコンピュータは、例えば、可搬型記録媒体に記録されたプログラムまたはサーバコンピュータから転送されたプログラムを、自己の記憶装置に格納する。そして、コンピュータは、自己の記憶装置からプログラムを読み取り、プログラムにしたがった処理を実行する。なお、コンピュータは、可搬型記録媒体から直接プログラムを読み取り、そのプログラムにしたがった処理を実行することもできる。また、コンピュータは、ネットワークを介して接続されたサーバコンピュータからプログラムが転送されるごとに、逐次、受け取ったプログラムにしたがった処理を実行することもできる。 A computer that executes a program stores, for example, a program recorded on a portable recording medium or a program transferred from a server computer in its own storage device. The computer then reads the program from its own storage device and executes processing according to the program. The computer can also read the program directly from the portable recording medium and execute processing according to the program. Also, the computer can execute processing according to the received program every time the program is transferred from a server computer connected via a network.

1 画像処理装置
1a 処理部
2 カメラ
3 台車
4a~4c,4a1,4a2 バーコード
P0 合成画像
P1,P2 撮影画像
S1~S4 ステップ
1 Image processing device 1a Processing unit 2 Camera 3 Cart 4a-4c, 4a1, 4a2 Barcode P0 Synthetic image P1, P2 Photographed image S1-S4 Step

Claims (8)

コンピュータに、
それぞれ商品が収容され、かつ、収容された商品の情報を示すバーコードがそれぞれの表面に配置された複数の箱が台車に積載された状態で、前記台車がカメラの前を横切って通過している間に、前記カメラによって連続的に撮影された複数の撮影画像を取得し、
前記複数の撮影画像のそれぞれから前記バーコードの座標と前記バーコードの読み取り値とを検出し、
前記複数の撮影画像のうち隣接する第1撮影画像ペアの間で読み取り値が同一の前記バーコードの座標を、前記第1撮影画像ペアの間における対応特徴点として抽出し、
抽出された前記対応特徴点の座標を基に前記複数の撮影画像を合成して得られるパノラマ画像の座標系における、前記複数の撮影画像のそれぞれから検出された前記バーコードの座標と、当該バーコードの読み取り値とに基づいて、前記複数の箱の表面に配置された前記バーコードの読み取り値と個数とを出力する、
処理を実行させる画像処理プログラム。
to the computer,
In a state in which a plurality of boxes each containing a product and having a bar code indicating information of the contained product placed on each surface are loaded on a cart, the cart passes across in front of the camera. Obtaining a plurality of captured images continuously captured by the camera during the period of time,
detecting the coordinates of the barcode and the reading value of the barcode from each of the plurality of captured images;
extracting the coordinates of the barcode having the same read value between adjacent first captured image pairs among the plurality of captured images as corresponding feature points between the first captured image pairs;
Coordinates of the barcode detected from each of the plurality of captured images in a coordinate system of a panoramic image obtained by synthesizing the plurality of captured images based on the extracted coordinates of the corresponding feature points; outputting the reading value and the number of the barcodes arranged on the surfaces of the plurality of boxes based on the reading value of the code;
An image processing program that executes processing.
前記対応特徴点の抽出では、前記第1撮影画像ペアのうち一方の撮影画像に読み取り値が同一の前記バーコードが複数存在する場合には、当該バーコードのうち水平方向の座標が最大または最小のものを前記対応特徴点の1つとして抽出する、
請求項1記載の画像処理プログラム。
In the extraction of the corresponding feature points, when a plurality of the barcodes having the same read value exist in one captured image of the first captured image pair, the horizontal coordinates of the barcodes are maximum or minimum. as one of the corresponding feature points,
2. The image processing program according to claim 1.
前記バーコードの読み取り値と個数の出力では、前記第1撮影画像ペアを合成する際の前記第1撮影画像ペアの一方に対する他方の水平方向へのシフト量を、前記対応特徴点の各座標に基づいて算出し、
前記パノラマ画像は、前記第1撮影画像ペアごとの前記シフト量を用いて前記複数の撮影画像を合成することで生成され。
前記シフト量の算出では、前記第1撮影画像ペアのうち一の撮影画像ペアの間で読み取り値が同一の前記バーコードを特定できなかった場合、前記一の撮影画像ペアより前の他の前記第1撮影画像ペアについて直近に算出された前記シフト量を、前記一の撮影画像ペアについての前記シフト量として流用する、
請求項1または2記載の画像処理プログラム。
In outputting the reading value and the number of the barcode, the amount of shift in the horizontal direction of one of the first captured image pairs with respect to the other when combining the first captured image pair is set to each coordinate of the corresponding feature point. calculated based on
The panorama image is generated by synthesizing the plurality of captured images using the shift amount for each of the first captured image pairs.
In the calculation of the shift amount, if the barcode having the same read value cannot be specified between one pair of captured images of the first pair of captured images, the other bar code prior to the one pair of captured images is determined. diverting the shift amount calculated most recently for the first captured image pair as the shift amount for the one captured image pair;
3. The image processing program according to claim 1 or 2.
前記カメラが垂直方向に複数設置され、
前記複数の撮影画像の取得では、複数の前記カメラのそれぞれから前記複数の撮影画像を取得し、
前記パノラマ画像の座標系は、複数の前記カメラのそれぞれから取得された前記複数の撮影画像を合成することで生成される、
請求項1乃至3のいずれか1項に記載の画像処理プログラム。
A plurality of the cameras are installed in the vertical direction,
acquiring the plurality of captured images from each of the plurality of cameras;
The coordinate system of the panoramic image is generated by synthesizing the plurality of captured images obtained from each of the plurality of cameras,
4. The image processing program according to claim 1.
前記バーコードの読み取り値と個数の出力では、複数の前記カメラのそれぞれに対応する前記複数の撮影画像のうち、同時刻に複数の前記カメラによって撮影された撮影画像群の中から、隣接する前記カメラに対応する第2撮影画像ペアを抽出し、前記第2撮影画像ペアごとに、前記第2撮影画像ペアを合成する際の前記第2撮影画像ペアの一方に対する他方の重複幅を算出し、
前記パノラマ画像は、前記第2撮影画像ペアごとの前記重複幅を用いて前記撮影画像群を合成することで生成され、
前記重複幅は、前記第2撮影画像ペアのそれぞれにおいて検出された前記バーコードの垂直画素数と、あらかじめ設定された、前記バーコードの垂直方向の実際のサイズと、前記第2撮影画像ペアをそれぞれ撮影した前記カメラのパラメータとに基づいて算出される、
請求項4記載の画像処理プログラム。
In outputting the reading value and the number of the barcode, among the plurality of photographed images corresponding to each of the plurality of cameras, from among the photographed images photographed by the plurality of cameras at the same time, the adjacent extracting a second captured image pair corresponding to a camera, and calculating, for each second captured image pair, an overlap width of one of the second captured image pairs with respect to the other when synthesizing the second captured image pair;
The panoramic image is generated by synthesizing the captured image group using the overlapping width for each of the second captured image pairs,
The overlap width is the number of vertical pixels of the barcode detected in each of the second captured image pair, the preset actual size of the barcode in the vertical direction, and the second captured image pair. calculated based on the parameters of the camera taken respectively,
5. The image processing program according to claim 4.
前記重複幅の算出では、
前記第2撮影画像ペアのそれぞれにおいて検出された前記バーコードの垂直画素数と、前記バーコードの垂直方向の実際のサイズと、前記第2撮影画像ペアのそれぞれの垂直画素数と、前記カメラの視野角とに基づいて、複数の前記カメラのうち、前記第2撮影画像ペアをそれぞれ撮影したカメラペアのそれぞれと撮影対象面との間の距離を算出し、
前記カメラペアのそれぞれの高さと、前記カメラペアのそれぞれについて算出された前記距離とに基づいて、前記撮影対象面における前記カメラペアのそれぞれによる垂直方向の撮影範囲を算出し、
算出された前記撮影範囲間の重複領域の高さに基づいて前記重複幅を算出する、
請求項5記載の画像処理プログラム。
In calculating the overlap width,
The number of vertical pixels of the barcode detected in each of the second captured image pairs, the actual size of the barcode in the vertical direction, the number of vertical pixels of each of the second captured image pairs, and the camera's calculating the distance between each of the plurality of cameras that captured the second captured image pair and the surface to be captured, based on the viewing angle;
calculating a vertical imaging range of each of the camera pairs on the imaging target plane based on the height of each of the camera pairs and the distance calculated for each of the camera pairs;
calculating the overlap width based on the calculated height of the overlap region between the imaging ranges;
6. The image processing program according to claim 5.
コンピュータが、
それぞれ商品が収容され、かつ、収容された商品の情報を示すバーコードがそれぞれの表面に配置された複数の箱が台車に積載された状態で、前記台車がカメラの前を横切って通過している間に、前記カメラによって連続的に撮影された複数の撮影画像を取得し、
前記複数の撮影画像のそれぞれから前記バーコードの座標と前記バーコードの読み取り値とを検出し、
前記複数の撮影画像のうち隣接する第1撮影画像ペアの間で読み取り値が同一の前記バーコードの座標を、前記第1撮影画像ペアの間における対応特徴点として抽出し、
抽出された前記対応特徴点の座標を基に前記複数の撮影画像を合成して得られるパノラマ画像の座標系における、前記複数の撮影画像のそれぞれから検出された前記バーコードの座標と、当該バーコードの読み取り値とに基づいて、前記複数の箱の表面に配置された前記バーコードの読み取り値と個数とを出力する、
処理を実行させる画像処理方法。
the computer
In a state in which a plurality of boxes each containing a product and having a bar code indicating information of the contained product placed on each surface are loaded on a cart, the cart passes across in front of the camera. Obtaining a plurality of captured images continuously captured by the camera during the period of time,
detecting the coordinates of the barcode and the reading value of the barcode from each of the plurality of captured images;
extracting the coordinates of the barcode having the same read value between adjacent first captured image pairs among the plurality of captured images as corresponding feature points between the first captured image pairs;
Coordinates of the barcode detected from each of the plurality of captured images in a coordinate system of a panoramic image obtained by synthesizing the plurality of captured images based on the extracted coordinates of the corresponding feature points; outputting the reading value and the number of the barcodes arranged on the surfaces of the plurality of boxes based on the reading value of the code;
An image processing method that causes processing to be performed.
それぞれ商品が収容され、かつ、収容された商品の情報を示すバーコードがそれぞれの表面に配置された複数の箱が台車に積載された状態で、前記台車がカメラの前を横切って通過している間に、前記カメラによって連続的に撮影された複数の撮影画像を取得し、
前記複数の撮影画像のそれぞれから前記バーコードの座標と前記バーコードの読み取り値とを検出し、
前記複数の撮影画像のうち隣接する第1撮影画像ペアの間で読み取り値が同一の前記バーコードの座標を、前記第1撮影画像ペアの間における対応特徴点として抽出し、
抽出された前記対応特徴点の座標を基に前記複数の撮影画像を合成して得られるパノラマ画像の座標系における、前記複数の撮影画像のそれぞれから検出された前記バーコードの座標と、当該バーコードの読み取り値とに基づいて、前記複数の箱の表面に配置された前記バーコードの読み取り値と個数とを出力する、処理部、
を有する画像処理装置。
In a state in which a plurality of boxes each containing a product and having a bar code indicating information of the contained product placed on each surface are loaded on a cart, the cart passes across in front of the camera. Obtaining a plurality of captured images continuously captured by the camera during the period of time,
detecting the coordinates of the barcode and the reading value of the barcode from each of the plurality of captured images;
extracting the coordinates of the barcode having the same read value between adjacent first captured image pairs among the plurality of captured images as corresponding feature points between the first captured image pairs;
Coordinates of the barcode detected from each of the plurality of captured images in a coordinate system of a panoramic image obtained by synthesizing the plurality of captured images based on the extracted coordinates of the corresponding feature points; a processing unit that outputs the read values and the number of the barcodes arranged on the surfaces of the plurality of boxes based on the read values of the codes;
An image processing device having
JP2021137376A 2021-08-25 2021-08-25 Image processing program, image processing method, and image processing apparatus Pending JP2023031715A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2021137376A JP2023031715A (en) 2021-08-25 2021-08-25 Image processing program, image processing method, and image processing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2021137376A JP2023031715A (en) 2021-08-25 2021-08-25 Image processing program, image processing method, and image processing apparatus

Publications (1)

Publication Number Publication Date
JP2023031715A true JP2023031715A (en) 2023-03-09

Family

ID=85416238

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2021137376A Pending JP2023031715A (en) 2021-08-25 2021-08-25 Image processing program, image processing method, and image processing apparatus

Country Status (1)

Country Link
JP (1) JP2023031715A (en)

Similar Documents

Publication Publication Date Title
US11587195B2 (en) Image processing methods and arrangements useful in automated store shelf inspections
US10007964B1 (en) Image processing methods and arrangements
JP5783885B2 (en) Information presentation apparatus, method and program thereof
JP5999105B2 (en) Information processing apparatus and method, and program
US8792727B2 (en) Image processing device, image processing method, and program
WO2017163714A1 (en) Projection instruction device, parcel sorting system, and projection instruction method
US20170076428A1 (en) Information processing apparatus
WO2017163710A1 (en) Instruction projecting device, package sorting system and instruction projecting method
WO2017163709A1 (en) Instruction projecting device, package sorting system and instruction projecting method
JP5794427B2 (en) Marker generation device, marker generation detection system, marker generation detection device, marker, marker generation method and program thereof
JP2006279568A (en) Image-pickup device
JP5674933B2 (en) Method and apparatus for locating an object in a warehouse
JP2023031715A (en) Image processing program, image processing method, and image processing apparatus
US8622284B1 (en) Determining and recording the locations of objects
CN107742383B (en) Automatic settlement system and method based on smooth surface imaging
JPWO2017033254A1 (en) Mobile robot operation system, mobile robot, and object extraction method
JP5126124B2 (en) Image processing device
JP6847337B2 (en) Meter detector, meter detection method, and meter detection program
JP7366651B2 (en) Shelf imaging device and information processing device
WO2012127639A1 (en) Image-processing device and image-processing method
WO2020100436A1 (en) Reading system, reading method, program, storage medium, and moving body
WO2019181035A1 (en) Registration system, registration method, and program
JP2016136099A (en) Positioning system and positioning method
JP3016687B2 (en) Image processing device
WO2017163713A1 (en) Projection instruction device, parcel sorting system, and projection instruction method