JP6909360B1 - Object measuring device and measuring device - Google Patents

Object measuring device and measuring device Download PDF

Info

Publication number
JP6909360B1
JP6909360B1 JP2021006668A JP2021006668A JP6909360B1 JP 6909360 B1 JP6909360 B1 JP 6909360B1 JP 2021006668 A JP2021006668 A JP 2021006668A JP 2021006668 A JP2021006668 A JP 2021006668A JP 6909360 B1 JP6909360 B1 JP 6909360B1
Authority
JP
Japan
Prior art keywords
image
measurement
unit
pattern
measuring device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2021006668A
Other languages
Japanese (ja)
Other versions
JP2022110928A (en
Inventor
明男 三水
明男 三水
洋輔 木村
洋輔 木村
Original Assignee
株式会社Nsp
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 株式会社Nsp filed Critical 株式会社Nsp
Priority to JP2021006668A priority Critical patent/JP6909360B1/en
Application granted granted Critical
Publication of JP6909360B1 publication Critical patent/JP6909360B1/en
Publication of JP2022110928A publication Critical patent/JP2022110928A/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Length Measuring Devices By Optical Means (AREA)
  • Image Analysis (AREA)

Abstract

【課題】計測対象物の外観が、任意の形状、任意の色、又は、任意のテクスチャを有する不特定物の寸法計測、形状計測等の物体計測が可能な物体計測装置、及び計測装置を提供する。【解決手段】撮像時に計測対象物10の背後に配置される背景部20と、計測対象物10の画像を取得する撮像部30と、撮像部30により取得した撮像画像に基づいて、計測対象物10の寸法計測、形状計測等の計測処理を実行する制御部40と、を有し、背景部20は、パターン模様を有した物体計測装置1を構成する。また、深度情報も取得可能なカメラを備え、計測対象物の重量を計測可能な構成とすることにより計測装置100を構成する。【選択図】図1PROBLEM TO BE SOLVED: To provide an object measuring device and a measuring device capable of measuring an object such as dimensional measurement and shape measurement of an unspecified object having an arbitrary shape, an arbitrary color, or an arbitrary texture in the appearance of the object to be measured. do. SOLUTION: A measurement object is measured based on a background portion 20 arranged behind a measurement object 10 at the time of imaging, an imaging unit 30 for acquiring an image of the measurement object 10, and an image captured by the imaging unit 30. A control unit 40 that executes measurement processing such as dimension measurement and shape measurement of 10 is included, and a background unit 20 constitutes an object measurement device 1 having a pattern. Further, the measuring device 100 is configured by providing a camera capable of acquiring depth information and having a configuration capable of measuring the weight of the object to be measured. [Selection diagram] Fig. 1

Description

本発明は、物体計測装置、及び計測装置に関する。 The present invention relates to an object measuring device and a measuring device.

従来、閾値の設定に基づく装置ごとの検出精度のバラツキを小さくすることのできる寸法測定装置が提案されている(例えば、特許文献1参照)。 Conventionally, a dimensional measuring device capable of reducing the variation in detection accuracy for each device based on the setting of a threshold value has been proposed (see, for example, Patent Document 1).

この寸法測定装置は、計測対象物を撮像装置により撮像し、撮像した撮像情報から計測対象物のエッジを閾値(スレッシュホールド)に基づいて検出することにより計測対象物の寸法を測定する。閾値を設定する閾値設定モードを設け、閾値設定モードにおいて、計測対象物及び背景を撮像した撮像情報に基づいて閾値を算出するように構成されている。 This dimension measuring device measures the dimension of the measurement object by imaging the object to be measured by the imaging device and detecting the edge of the object to be measured based on the threshold value (threshold) from the captured imaging information. A threshold value setting mode for setting a threshold value is provided, and in the threshold value setting mode, the threshold value is calculated based on the imaging information obtained by imaging the measurement object and the background.

また、外観検査の精度や信頼性等の向上が容易となる撮影装置が提案されている(例えば、特許文献2参照)。 Further, an imaging device has been proposed that facilitates improvement in accuracy and reliability of visual inspection (see, for example, Patent Document 2).

この撮影装置は、制御部による指令に基づき、白棒移動機構部は、白棒をワーク内側に挿入させる。そして、ローラ駆動部がローラ部を用いてワークを60°回転させる。このとき、撮影部は撮影を行うことにより、白色を背景色として、ワークの胴部を周方向全体に亘って撮影することができる。次に、制御部による指令に基づき、白棒移動機構部は、白棒をワーク内側から排出させ、黒棒移動機構部は、黒棒をワーク内側へ挿入させる。そして、ローラ駆動部がローラ部を用いてワークを360°回転させる。このとき、撮影部は撮影を行うことにより、黒色を背景色として、ワークの胴部を周方向全体に亘って撮影するように構成されている。 In this imaging device, the white bar moving mechanism unit inserts the white bar inside the work based on a command from the control unit. Then, the roller drive unit rotates the work by 60 ° using the roller unit. At this time, by taking a picture, the photographing unit can take an image of the body of the work over the entire circumferential direction with white as the background color. Next, based on the command from the control unit, the white bar moving mechanism unit discharges the white bar from the inside of the work, and the black bar moving mechanism unit inserts the black bar inside the work. Then, the roller drive unit rotates the work by 360 ° using the roller unit. At this time, the photographing unit is configured to photograph the body of the work over the entire circumferential direction with black as the background color.

特開平11−325836号公報Japanese Unexamined Patent Publication No. 11-325836 特開2020−51810号公報Japanese Unexamined Patent Publication No. 2020-51810

特許文献1及び特許文献2に開示された寸法測定装置、撮影装置では、一般的な品質検査等における計測において、特定の決められた物体に対する計測には適用が可能である。しかし、任意の計測対象物、すなわち、計測対象物の外観が、任意の形状、任意の色、又は、任意のテクスチャを有する場合には、形状認識のための閾値の設定において十分な精度が出ず、正確な形状抽出、寸法測定ができないという問題があった。 The dimension measuring device and the photographing device disclosed in Patent Document 1 and Patent Document 2 can be applied to the measurement for a specific determined object in the measurement in general quality inspection and the like. However, when an arbitrary measurement object, that is, the appearance of the measurement object has an arbitrary shape, an arbitrary color, or an arbitrary texture, sufficient accuracy is obtained in setting the threshold value for shape recognition. Therefore, there is a problem that accurate shape extraction and dimensional measurement cannot be performed.

したがって、本発明の目的は、計測対象物の外観が、任意の形状、任意の色、又は、任意のテクスチャを有する不特定物の寸法計測、形状計測等の物体計測が可能な物体計測装置、及び計測装置を提供することにある。 Therefore, an object of the present invention is an object measuring device capable of measuring an object such as dimensional measurement or shape measurement of an unspecified object having an arbitrary shape, an arbitrary color, or an arbitrary texture in the appearance of the object to be measured. And to provide a measuring device.

[1]本発明は、撮像時に計測対象物の背後に配置される背景部と、前記計測対象物の画像を取得する撮像部と、前記撮像部により取得した撮像画像に基づいて、前記計測対象物の計測処理を実行する制御部と、を有し、前記背景部は、パターン模様を有している、物体計測装置を提供する。
[2]前記制御部は、前記撮像画像と前記背景部のみの背景画像との差分画像を生成する背景差分法による差分画像生成部を有する構成であってもよい。
[3]また、前記制御部は、前記撮像画像から変換した複数の異なる色空間画像を、それぞれから生成した色空間画像のヒストグラムパターンの評価値に基づいて利用する寸法測定画像を選択する画像選択部を有する構成であってもよい。
[4]また、前記制御部は、前記画像選択部により選択された色空間画像である前記寸法測定画像を使用して外接矩形計測を行なう外接矩形計測部を有する構成であってもよい。
[5]また、前記外接矩形計測部は、前記計測対象物に対してスレッシュホールド値を変化させて得られる、複数のサイズの外接矩形のうち、スレッシュホールドの変化に対し、サイズ変化の少ない区間を選択する構成であってもよい。
[6]前記パターン模様は、2色のチェック模様とされた構成であってもよい。
[7]本発明は、上記[1]に記載の寸法計測装置と、前記計測対象物の重量を計測する重量計測部と、を有し、前記撮像部は、深度情報も取得して、前記計測対象物の計測を行なう、計測装置を提供する。
[1] The present invention is based on a background portion arranged behind a measurement object at the time of imaging, an imaging unit that acquires an image of the measurement object, and an image captured by the imaging unit. Provided is an object measuring device having a control unit for executing an object measurement process, and the background unit having a pattern pattern.
[2] The control unit may have a configuration that includes a difference image generation unit by a background subtraction method that generates a difference image between the captured image and the background image of only the background unit.
[3] Further, the control unit selects a dimensional measurement image to be used based on the evaluation value of the histogram pattern of the color space image generated from each of the plurality of different color space images converted from the captured image. It may have a structure having a part.
[4] Further, the control unit may have a configuration having an circumscribed rectangle measuring unit that performs circumscribed rectangle measurement using the dimension measurement image that is a color space image selected by the image selection unit.
[5] Further, the circumscribed rectangle measuring unit is a section of a plurality of sizes of circumscribed rectangles obtained by changing the threshold value with respect to the measurement object and having a small size change with respect to a change in the threshold. It may be configured to select.
[6] The pattern The pattern may have a two-color check pattern.
[7] The present invention includes the dimension measuring device according to the above [1] and a weight measuring unit for measuring the weight of the object to be measured. Provided is a measuring device for measuring an object to be measured.

本発明の物体計測装置、計測装置によれば、計測対象物の外観が、任意の形状、任意の色、又は、任意のテクスチャを有する不特定物の寸法計測、形状計測等の物体計測が可能となる。 According to the object measuring device and the measuring device of the present invention, it is possible to measure an object such as dimensional measurement or shape measurement of an unspecified object having an arbitrary shape, an arbitrary color, or an arbitrary texture in the appearance of the object to be measured. It becomes.

図1(a)は、本発明の第1の実施の形態に係る物体計測装置の構成を示す構成概略図であり、図1(b)は、図1(a)においてA方向から見た、背景部の上に載置された計測対象物の撮像時の一例を示す図である。FIG. 1 (a) is a schematic configuration diagram showing a configuration of an object measuring device according to the first embodiment of the present invention, and FIG. 1 (b) is a configuration diagram seen from the direction A in FIG. 1 (a). It is a figure which shows an example at the time of imaging of the measurement object placed on the background part. 図2(a)は、図1(a)においてA方向から見た背景部のパターン模様が格子柄(チェック柄)である一例を示す図であり、図2(b)は、格子柄(チェック柄)が45度斜めに配置されたパターン模様の一例を示す図であり、図2(c)は、パターン模様が3角形で構成された一例を示す図である。FIG. 2 (a) is a diagram showing an example in which the pattern pattern of the background portion viewed from the direction A in FIG. 1 (a) is a check pattern (check pattern), and FIG. 2 (b) is a view showing a check pattern (check pattern). FIG. 2C is a diagram showing an example of a pattern pattern in which the pattern) is arranged obliquely at 45 degrees, and FIG. 2C is a diagram showing an example in which the pattern pattern is composed of a triangle. 図3は、本発明の第1の実施の形態に係る物体計測装置を構成する構成要素の接続関係を示すブロック構成図である。FIG. 3 is a block configuration diagram showing a connection relationship of components constituting the object measuring device according to the first embodiment of the present invention. 図4は、本発明の第1の実施の形態に係る物体計測装置の全体の動作を示すフローチャートである。FIG. 4 is a flowchart showing the overall operation of the object measuring device according to the first embodiment of the present invention. 図5(a)〜(c)は、差分画像生成部により背景差分法で計測対象物を抽出する手順を順に説明するための画像の図であり、図5(a)は、計測対象物と背景部が撮影された物体画像であり、図5(b)は、背景部のみが撮影された背景画像であり、図5(c)は、計測対象物が抽出された差分画像である。5 (a) to 5 (c) are images for sequentially explaining a procedure for extracting a measurement object by the background subtraction method by the difference image generation unit, and FIGS. 5 (a) and 5 (a) show the measurement object. The background portion is a photographed object image, FIG. 5 (b) is a background image in which only the background portion is photographed, and FIG. 5 (c) is a difference image in which the measurement object is extracted. 図6(a)〜(e)は、画像選択部による画像選択、決定の動作を説明するための図であって、図6(a)は、背景差分を行なった画像における基本のヒストグラム形状を示す図であり、図6(b)は、RGB差分グレースケールのヒストグラムを示す図であり、図6(c)は、R要素抽出したヒストグラムを示す図であり、図6(d)は、G要素抽出したヒストグラムを示す図であり、図6(e)は、B要素抽出したヒストグラムを示す図である。6 (a) to 6 (e) are diagrams for explaining the operation of image selection and determination by the image selection unit, and FIG. 6 (a) shows the basic histogram shape in the image with background subtraction. 6 (b) is a diagram showing a histogram of RGB subtraction grayscale, FIG. 6 (c) is a diagram showing a histogram extracted from R elements, and FIG. 6 (d) is a diagram showing G. It is a figure which shows the histogram which extracted the element, and FIG. 6 (e) is the figure which shows the histogram which extracted the element B element. 図7(a)〜(d)は、画像選択部による画像選択、決定の動作を説明するための図であって、図7(a)は、背景の山(P1部分)と物体による山(P2部分)を説明するヒストグラムを示す図であり、図7(b)は、スレッシュホールドが0に近いものでは明確に分離することができない場合を示す例の図であり、図7(c)は、スレッシュホールドから右側の物体によって生じたピクセル変化分は、面積が広いほうが分離しやすいことを示す例の図であり、図7(d)は、谷の部分において、分離の難しいピクセルの量が少ないほうがより明確に分離できる場合を示す例の図である。7 (a) to 7 (d) are diagrams for explaining the operation of image selection and determination by the image selection unit, and FIG. 7 (a) shows a mountain in the background (P1 portion) and a mountain in the object (P1 portion). FIG. 7 (b) is a diagram showing a histogram for explaining the P2 portion), FIG. 7 (b) is a diagram showing an example in which a threshold close to 0 cannot be clearly separated, and FIG. 7 (c) is a diagram showing a case where the threshold cannot be clearly separated. , The pixel change caused by the object on the right side from the histogram is an example diagram showing that the larger the area, the easier it is to separate. FIG. 7 (d) shows the amount of pixels that are difficult to separate in the valley part. It is a figure of an example which shows the case where the smaller the number, the more clearly the separation can be made. 図8は、図4で示したStep08のサブルーチン、関数として処理する場合のものであって、撮像画像から、グレースケール,R要素,G要素、B要素,H要素,S要素,V要素の7つの画像について、ヒストグラムパターン評価を行ない、利用する画像を決定する画像選択部の動作を示すフローチャートである。FIG. 8 shows a case where the subroutine and function of Step08 shown in FIG. 4 are processed, and 7 of grayscale, R element, G element, B element, H element, S element, and V element are taken from the captured image. It is a flowchart which shows the operation of the image selection part which evaluates a histogram pattern for one image, and decides an image to use. 図9(a)、(b)は、最適なスレッシュホールドの値を決定するための方法を説明する図である。9 (a) and 9 (b) are diagrams illustrating a method for determining the optimum threshold value. 図10(a)〜(c)は、ピクセル輝度値を等分に分割し、その分割位置による外接矩形のサイズを計測することにより最適なスレッシュホールドの値を決定する方法を説明する図である。10 (a) to 10 (c) are diagrams for explaining a method of dividing the pixel luminance value into equal parts and measuring the size of the circumscribing rectangle according to the divided position to determine the optimum threshold value. .. 図11は、図4で示したStep09のサブルーチン、関数として処理する場合のものであって、決定した画像に対してフィードバック制御によるスレッシュホールドの最適化を行った外接矩形を求める動作を示すフローチャートである。FIG. 11 is a flowchart showing an operation of obtaining an circumscribed rectangle obtained by optimizing the threshold by feedback control for the determined image in the case of processing as a subroutine and function of Step09 shown in FIG. be. 図12は、図11で示したStep96のサブルーチン、関数として処理する場合のものであって、取得した長辺、短辺のスレッシュホールド位置での長さ情報を基に、各々の安定区間を抽出する動作を示すフローチャートである。FIG. 12 shows a case where the subroutine and function of Step 96 shown in FIG. 11 are processed, and each stable section is extracted based on the acquired length information at the threshold positions of the long side and the short side. It is a flowchart which shows the operation to perform. 図13(a)〜(i)は、辺の長さリストからの安定区間の決定動作の一例を各区間の処理毎に説明するための図である。13 (a) to 13 (i) are diagrams for explaining an example of the operation of determining the stable section from the side length list for each process of each section. 図14(a)は、パターン模様を有しない単色の背景部に計測対象物を載置した場合の一例を示す図であり、図14(b)は、本願発明に係るパターン模様の背景部に計測対象物を載置した場合の一例を示す図である。FIG. 14 (a) is a diagram showing an example of a case where the measurement object is placed on a monochromatic background portion having no pattern, and FIG. 14 (b) is a diagram showing an example in the case where the measurement object is placed on the background portion of the pattern pattern according to the present invention. It is a figure which shows an example of the case where the measurement object is placed. 図15(a)は、本発明の第2の実施の形態に係る計測装置の構成を示す構成概略図であり、図15(b)は、本発明の第2の実施の形態に係る計測装置を構成する構成要素の接続関係を示すブロック構成図である。FIG. 15 (a) is a schematic configuration diagram showing the configuration of the measuring device according to the second embodiment of the present invention, and FIG. 15 (b) is a configuration schematic diagram showing the configuration of the measuring device according to the second embodiment of the present invention. It is a block block diagram which shows the connection relation of the component | component which constitutes.

〔本発明の第1の実施の形態〕
図1(a)は、本発明の第1の実施の形態に係る物体計測装置の構成を示す構成概略図であり、図1(b)は、図1(a)においてA方向から見た、背景部の上に載置された計測対象物の撮像時の一例を示す図である。
[First Embodiment of the present invention]
FIG. 1 (a) is a schematic configuration diagram showing a configuration of an object measuring device according to the first embodiment of the present invention, and FIG. 1 (b) is a configuration diagram seen from the direction A in FIG. 1 (a). It is a figure which shows an example at the time of imaging of the measurement object placed on the background part.

図1に示すように、本発明の第1の実施の形態に係る物体計測装置1は、撮像時に計測対象物10の背後に配置される背景部20と、計測対象物10の画像を取得する撮像部30と、撮像部30により取得した撮像画像に基づいて、計測対象物10の寸法計測処理、形状計測処理等の計測を実行する制御部40と、を有し、背景部20は、パターン模様を有して構成されている。なお、撮像時に計測対象物10を照明し、また、影の映り込みを低減するために、照明装置80を適宜配置することが好ましい。本実施の形態に係る物体計測装置1は、上記に示したように、計測対象物10の寸法計測、形状計測等の物体計測を行なうことができる。例えば、複数個所の寸法計測により計測対象物10の寸形計測が可能である。また、計測対象物10の形状を抽出することにより、検出された輪郭から、例えば、パターンマッチングにより形状の特定を行なうことで形状計測が可能である。以下の説明では、計測対象物10の寸法計測を行なう場合について説明する。 As shown in FIG. 1, the object measuring device 1 according to the first embodiment of the present invention acquires an image of a background portion 20 arranged behind the measurement object 10 and an image of the measurement object 10 at the time of imaging. The background unit 20 includes an imaging unit 30 and a control unit 40 that executes measurements such as dimensional measurement processing and shape measurement processing of the measurement object 10 based on the image captured by the imaging unit 30. The background unit 20 has a pattern. It is composed with a pattern. It is preferable to appropriately arrange the lighting device 80 in order to illuminate the measurement object 10 at the time of imaging and to reduce the reflection of shadows. As shown above, the object measuring device 1 according to the present embodiment can perform object measurement such as dimension measurement and shape measurement of the measurement object 10. For example, it is possible to measure the size of the object 10 to be measured by measuring the dimensions at a plurality of places. Further, by extracting the shape of the object to be measured 10, the shape can be measured by specifying the shape from the detected contour by, for example, pattern matching. In the following description, a case where the dimensions of the measurement object 10 are measured will be described.

(計測対象物10)
計測対象物10は、外観が、任意の形状、任意の色、又は、任意のテクスチャを有する不特定物である。一般的な品質検査等における計測では、特定の決められた物体に対する計測となるため、背景、測定方向、距離など、最適化が可能であるが、本実施の形態に係る測定対象は、一般に物流で流れる様々な商品(箱状、袋状、円筒など)であるため、測定対象を特定できない、不特定物である。
(Measurement target 10)
The measurement object 10 is an unspecified object having an arbitrary shape, an arbitrary color, or an arbitrary texture in appearance. In the measurement in general quality inspection and the like, since the measurement is performed on a specific fixed object, it is possible to optimize the background, measurement direction, distance, etc., but the measurement target according to the present embodiment is generally physical distribution. Since it is a variety of products (box-shaped, bag-shaped, cylindrical, etc.) that flow in, it is an unspecified object for which the measurement target cannot be specified.

(背景部20)
背景部20は、図1(a)に示すように、載置台25の上面に設置されている。背景部20は、載置台25の上面に直接パターン模様として印刷等されていてもよく、また、パターン模様が印刷等されたシート等を載置台25の上面に貼り付けたものでもよい。その他、背景のパターンは、直接転写、張り付け、更にはスライド型で複数枚を利用、液晶によるカラー画像等、種々の形態のものが可能である。
(Background part 20)
As shown in FIG. 1A, the background portion 20 is installed on the upper surface of the mounting table 25. The background portion 20 may be printed or the like as a pattern directly on the upper surface of the mounting table 25, or a sheet or the like on which the pattern pattern is printed may be attached to the upper surface of the mounting table 25. In addition, the background pattern can be directly transferred, pasted, slide type, and a plurality of sheets can be used, and various forms such as a color image by liquid crystal can be used.

図2(a)は、図1(a)においてA方向から見た背景部のパターン模様が格子柄(チェック柄)である一例を示す図であり、図2(b)は、格子柄(チェック柄)が45度斜めに配置されたパターン模様の一例を示す図であり、図2(c)は、パターン模様が3角形で構成された一例を示す図である。 FIG. 2 (a) is a diagram showing an example in which the pattern pattern of the background portion viewed from the direction A in FIG. 1 (a) is a check pattern (check pattern), and FIG. 2 (b) is a view showing a check pattern (check pattern). FIG. 2C is a diagram showing an example of a pattern pattern in which the pattern) is arranged obliquely at 45 degrees, and FIG. 2C is a diagram showing an example in which the pattern pattern is composed of a triangle.

背景部20のパターン模様は、図2(a)に示すような、格子柄(チェック柄)、市松模様であり、例えば、2色で構成できる。また、3色以上のパターン模様であってもよい。また、グラデーション画像であってもよい。また、背景部20のパターン模様は、図2(b)に示すような、格子柄(チェック柄)が45度斜めに配置されたパターン模様であってもよい。また、背景部20のパターン模様は、図2(c)に示すような、パターン模様が3角形で構成されたものあってもよい。 The pattern of the background portion 20 is a checkered pattern or a checkered pattern as shown in FIG. 2A, and can be composed of, for example, two colors. Further, it may be a pattern of three or more colors. Moreover, it may be a gradation image. Further, the pattern pattern of the background portion 20 may be a pattern pattern in which the lattice pattern (check pattern) is arranged obliquely by 45 degrees as shown in FIG. 2 (b). Further, the pattern pattern of the background portion 20 may be one in which the pattern pattern is formed of a triangle as shown in FIG. 2 (c).

なお、上記は、パターン模様の一例を示すものであって、直線、曲線、円形、円弧、図形、記号等の組み合わせによるパターン模様が使用可能である。また、パターン模様は、繰り返して表示される模様以外に、ランダムに配置されたパターンの模様であってもよい。 The above is an example of a pattern pattern, and a pattern pattern obtained by combining straight lines, curves, circles, arcs, figures, symbols, and the like can be used. Further, the pattern pattern may be a pattern of a randomly arranged pattern in addition to the pattern displayed repeatedly.

(撮像部30)
撮像部30は、図1(a)に示すように、計測対象物10を撮像するカメラである。撮像部30は、一般に使用される、主に可視光域に感度を有するカメラが使用可能である。撮像部30は、計測対象物10を撮像することにより、撮像画像としての物体画像RGBを取得することができる。
(Imaging unit 30)
As shown in FIG. 1A, the imaging unit 30 is a camera that images the measurement object 10. As the imaging unit 30, a commonly used camera having a sensitivity mainly in the visible light region can be used. The imaging unit 30 can acquire the object image RGB as the captured image by imaging the measurement object 10.

また、本実施の形態における計測対象物10の寸法計測が可能な程度の解像度、1ピクセルの画素寸法を備えたものを使用する。使用する光学系、レンズにより所定の画角とすることにより、撮像部30により取得された撮像画像により、1ピクセルに対応する寸法が算出される。これにより、計測対象物10の長辺、短辺等の寸法の算出が可能となる。なお、1ピクセルに対応する計測対象物10の寸法は、予め、図1(a)に示すような、背景部20、撮像部30の配置後に、キャリブレーションを行なうことにより求めておくことができる。 Further, an object having a resolution capable of measuring the dimensions of the object 10 to be measured in the present embodiment and a pixel dimension of 1 pixel is used. By setting a predetermined angle of view depending on the optical system and lens used, the dimension corresponding to one pixel is calculated from the captured image acquired by the imaging unit 30. This makes it possible to calculate the dimensions of the long side, short side, etc. of the measurement object 10. The dimensions of the measurement object 10 corresponding to one pixel can be obtained in advance by performing calibration after arranging the background portion 20 and the imaging unit 30 as shown in FIG. 1 (a). ..

(制御部40)
図3は、本発明の第1の実施の形態に係る物体計測装置を構成する構成要素の接続関係を示すブロック構成図である。制御部40は、記憶されたプログラムに従って、取得した画像データに演算、加工などを行うCPU(Central Processing Unit)、半導体メモリであるRAM(Random Access Memory)及びROM(Read Only Memory)などから構成されるコンピュータを備える。
(Control unit 40)
FIG. 3 is a block configuration diagram showing a connection relationship of components constituting the object measuring device according to the first embodiment of the present invention. The control unit 40 is composed of a CPU (Central Processing Unit) that performs calculations and processing on the acquired image data according to a stored program, a RAM (Random Access Memory) that is a semiconductor memory, a ROM (Read Only Memory), and the like. Equipped with a computer.

制御部40は、撮像部30、照明装置80等の制御、外部との入出力制御を行なうと共に、後述する、差分画像生成部41、画像選択部42、外接矩形計測部43を備えている。また、制御部40は、外部機器と接続可能であり、例えば、物体計測装置1に対する制御信号S、外部への出力信号Sにより、外部との入出力が可能である。 The control unit 40 controls the image pickup unit 30, the lighting device 80, and the like, and controls input / output with the outside, and also includes a difference image generation unit 41, an image selection unit 42, and a circumscribed rectangle measurement unit 43, which will be described later. The control unit 40 is connectable to an external device, for example, the control signal S C with respect to the object measuring apparatus 1, the output signal S O to the outside, it is possible to input and output to the outside.

差分画像生成部41は、撮像画像と背景部のみの背景画像との差分画像を生成する背景差分法による差分画像を生成する。 The difference image generation unit 41 generates a difference image by the background subtraction method that generates a difference image between the captured image and the background image of only the background part.

画像選択部42は、撮像画像から変換した複数の異なる色空間画像を、それぞれから生成した色空間画像のヒストグラムパターンの評価値に基づいて利用する寸法測定画像を選択する。ここで、色空間画像は、グレースケール画像、RGB画像、HSV画像、HSL画像、CMY画像、YIQ画像等の種々の色空間画像とすることができる。本実施の形態では、複数の異なる色空間画像として、グレースケール画像、RGB画像、HSV画像を使用するものとして説明する。 The image selection unit 42 selects a dimensional measurement image that uses a plurality of different color space images converted from the captured image based on the evaluation value of the histogram pattern of the color space image generated from each. Here, the color space image can be various color space images such as a grayscale image, an RGB image, an HSV image, an HSL image, a CMY image, and a YIQ image. In the present embodiment, it is assumed that a grayscale image, an RGB image, and an HSV image are used as a plurality of different color space images.

外接矩形計測部43は、計測対象物に対してスレッシュホールド値を変化させて得られる、複数のサイズの外接矩形のうち、スレッシュホールドの変化に対し、サイズ変化の少ない区間を選択する。サイズ変化の少ない区間は、サイズ変化の安定区間である。また、より詳しくは、スレッシュホールド位置での長辺、短辺の情報を基に、区間の伸延、短縮を実行しながら、各々の安定区間を抽出して安定区間の決定動作を行なう。 The circumscribed rectangle measuring unit 43 selects a section having a small size change with respect to a change in the threshold among a plurality of sizes of circumscribed rectangles obtained by changing the threshold value with respect to the object to be measured. The section with little size change is the stable section with small size change. More specifically, based on the information on the long side and the short side at the threshold position, each stable section is extracted and the stable section is determined while extending and shortening the section.

プログラム言語としては、C言語、Java、Python等の種々の言語が使用可能であるが、本実施の形態では、プログラム言語としてPython環境で行なう。本実施の形態で使用する、後述する大津の2値化、外接矩形を求める等においては、例えば、OpenCVモジュールとして、ライブラリ化、関数化されており、これらを利用することができる。 As the programming language, various languages such as C language, Java, and Python can be used, but in the present embodiment, the programming language is performed in the Python environment. In the binarization of Otsu, the circumscribing rectangle, etc., which will be described later, which are used in this embodiment, for example, they are made into a library and a function as an OpenCV module, and these can be used.

(物体計測装置1の動作概略)
図4は、本発明の第1の実施の形態に係る物体計測装置の全体の動作を示すフローチャートである。以下において、物体計測装置1の全体の動作を各ステップに従って説明する。
(Outline of operation of object measuring device 1)
FIG. 4 is a flowchart showing the overall operation of the object measuring device according to the first embodiment of the present invention. Hereinafter, the overall operation of the object measuring device 1 will be described according to each step.

(Step01)
処理が開始されると、制御部40は、撮像部30により、背景画像(RGB)を取得する。
(Step01)
When the process is started, the control unit 40 acquires a background image (RGB) by the image pickup unit 30.

(Step02)
制御部40は、終了キーが押下されたかどうかを判断する。終了キーは、制御部40が有する操作キーでも、外部において制御信号Sを生成するための外部操作キーでもよい。制御部40は、終了キーが押下されたかどうかを判断し、終了キーが押下されない場合はStep03へ進み(Step02:No)、終了キーが押下された場合はStep12へ進んで(Step02:Yes)、処理を終了する。
(Step02)
The control unit 40 determines whether or not the end key has been pressed. End key, even operation keys controller 40 has, may be an external operation keys for generating a control signal S C outside. The control unit 40 determines whether or not the end key is pressed, and if the end key is not pressed, the process proceeds to Step 03 (Step 02: No), and if the end key is pressed, the process proceeds to Step 12 (Step 02: Yes). End the process.

(Step03)
制御部40は、撮像部30により、撮像画像としての物体画像(RGB)を取得する。
(Step03)
The control unit 40 acquires an object image (RGB) as an image to be captured by the image pickup unit 30.

(Step04)
制御部40は、物体画像(RGB)と背景部のみの背景画像との差分画像を生成する背景差分法による差分画像生成部41において、背景画像と物体画像(RGB)からRGBの差分を取得する。
(Step04)
The control unit 40 acquires an RGB difference from the background image and the object image (RGB) in the difference image generation unit 41 by the background difference method that generates the difference image between the object image (RGB) and the background image of only the background unit. ..

(Step05)
制御部40は、撮像画像としての物体画像(RGB)から、グレースケール画像、R、G、B、H、S、Vの各色空間画像を生成し、それぞれ生成した色空間画像のヒストグラムパターンの評価値に基づいて利用する寸法測定画像を選択する画像選択部42において、差分画像をグレースケール画像に変換する。
(Step05)
The control unit 40 generates grayscale images, R, G, B, H, S, and V color space images from the object image (RGB) as captured images, and evaluates the histogram pattern of the generated color space images. The image selection unit 42, which selects the dimensional measurement image to be used based on the value, converts the difference image into a grayscale image.

(Step06)
また、制御部40は、画像選択部42において、差分画像から、R,G,Bの各要素のみを抽出した色空間画像を各々生成する。
(Step06)
Further, the control unit 40 generates a color space image in which only each element of R, G, and B is extracted from the difference image in the image selection unit 42.

(Step07)
同様にして、制御部40は、画像選択部42において、背景と物体画像をHSVに各々変換し、差分を取得することにより、差分画像から、H,S,Vの各要素のみを抽出した色空間画像を各々生成する。
(Step07)
Similarly, the control unit 40 converts the background and the object image into HSV in the image selection unit 42, and acquires the difference, thereby extracting only each element of H, S, and V from the difference image. Generate each spatial image.

(Step08)
制御部40は、画像選択部42において、グレースケール、R要素,G要素、B要素、H要素、S要素、V要素の7つの色空間画像(グレー画像、R画像、G画像、B画像、H画像、S画像、V画像)について、ヒストグラムパターン評価を行ない、利用する寸法測定画像を選択して、決定する。
(Step08)
In the image selection unit 42, the control unit 40 has seven color space images (gray image, R image, G image, B image, gray scale, R element, G element, B element, H element, S element, and V element). H image, S image, V image) are evaluated in a histogram pattern, and the dimensional measurement image to be used is selected and determined.

(Step09)
制御部40は、外接矩形計測部43において、決定した色空間画像、すなわち、グレー画像、R画像、G画像、B画像、H画像、S画像、V画像の中から選択、決定された色空間画像に対して、フィードバック制御によるスレッシュホールドの最適化を行った外接矩形を求める。
(Step09)
The control unit 40 selects and determines a color space image, that is, a gray image, an R image, a G image, a B image, an H image, an S image, and a V image in the circumscribing rectangular measurement unit 43. For the image, the circumscribing rectangle obtained by optimizing the threshold by feedback control is obtained.

(Step10)
制御部40は、登録キーが押下されたかどうかを判断する。登録キーは、制御部40が有する操作キーでも、外部において制御信号Sを生成するための外部操作キーでもよい。制御部40は、登録キーが押下されたかどうかを判断し、登録キーが押下されない場合はStep02へ戻って処理を続行し(Step10:No)、登録キーが押下された場合はStep11へ進む(Step10:Yes)。
(Step 10)
The control unit 40 determines whether or not the registration key has been pressed. Registration key, also the operation key controller 40 has, may be an external operation keys for generating a control signal S C outside. The control unit 40 determines whether or not the registration key has been pressed, and if the registration key is not pressed, returns to Step 02 and continues the process (Step 10: No), and if the registration key is pressed, proceeds to Step 11 (Step 10). : Yes).

(Step11)
制御部40は、データ登録を行ない、Step02へ戻って処理を続行する。
(Step 11)
The control unit 40 registers the data, returns to Step 02, and continues the process.

(差分画像生成部41による差分画像生成の動作)
差分画像生成部41による差分画像生成の動作は、図4で示したStep04により実行される。差分画像生成部41は、計測対象物10のテクスチャ(模様)の影響を軽減するための背景差分法を実行する。本実施の形態では、背景部20にパターン模様を持たせることで、計測対象物10が背景に同化し、認識できないという事象を回避することができる。
(Operation of difference image generation by difference image generation unit 41)
The operation of generating the difference image by the difference image generation unit 41 is executed by Step 04 shown in FIG. The difference image generation unit 41 executes a background subtraction method for reducing the influence of the texture (pattern) of the measurement object 10. In the present embodiment, by giving the background portion 20 a pattern, it is possible to avoid the phenomenon that the measurement object 10 is assimilated into the background and cannot be recognized.

図5(a)〜(c)は、差分画像生成部により背景差分法で計測対象物を抽出する手順を順に説明するための画像の図であり、図5(a)は、計測対象物と背景部が撮影された物体画像であり、図5(b)は、背景部のみが撮影された背景画像であり、図5(c)は、計測対象物が抽出された差分画像である。 5 (a) to 5 (c) are images for sequentially explaining a procedure for extracting a measurement object by the background subtraction method by the difference image generation unit, and FIGS. 5 (a) and 5 (a) show the measurement object. The background portion is a photographed object image, FIG. 5 (b) is a background image in which only the background portion is photographed, and FIG. 5 (c) is a difference image in which the measurement object is extracted.

制御部40は、差分画像生成部41において、図5(a)に示す物体画像(RGB)201と、図5(b)に示す背景部のみの背景画像202から、差分をとることにより、図5(c)に示す差分画像203を抽出する。なお、差分画像203には、背景部のパターン模様との差分を取ることにより、色の変化や、テクスチャが現れるが、サイズ計測という目的からは、このパターンの表出は問題にならない。 The control unit 40, in the difference image generation unit 41, takes a difference from the object image (RGB) 201 shown in FIG. 5 (a) and the background image 202 of only the background portion shown in FIG. 5 (b). The difference image 203 shown in 5 (c) is extracted. In the difference image 203, a color change and a texture appear by taking a difference from the pattern of the background portion, but for the purpose of measuring the size, the expression of this pattern does not matter.

差分画像生成部41による差分画像の生成により、背景部のパターン模様を消去し、計測対象物10の画像のみを浮き上がらせることができる。これにより、計測対象物10が背景に同化し、コンピュータが計測対象物10を認識できないという事象は回避することができる。 By generating the difference image by the difference image generation unit 41, the pattern pattern in the background portion can be erased and only the image of the measurement object 10 can be highlighted. As a result, it is possible to avoid the event that the measurement object 10 is assimilated into the background and the computer cannot recognize the measurement object 10.

(画像選択部42による画像選択、決定の動作)
画像選択部42による画像選択、決定の動作は、図4で示したStep05からStep08により実行される。
(Image selection and determination operation by the image selection unit 42)
The operation of image selection and determination by the image selection unit 42 is executed by Step 05 to Step 08 shown in FIG.

本実施の形態で扱う計測対象物10のサイズ測定において、もっとも重要なことは如何に背景部20と計測対象物10の境界を精度良く認識するかにある。背景部20だけの画像と計測対象物10の映った撮像画像の差分を取ることで、理論的には背景部分は全くエネルギーを持たない黒の状態になり、物体の存在する部分は、物体の色や明るさに応じた何らかのエネルギーを持った状態になる。これを、エネルギー強度(ピクセルの持つ輝度値)を横軸に、画像の中でのピクセル数を縦軸に取ったヒストグラムで表すと、図6(a)のような形状になる。このヒストグラムは、物体の色や明るさの影響を受けるため、図6(b)に示すようにカラーカメラで撮った撮像画像(RGB)からRGBの差分をとり、その3つの値から直接グレースケールに変換した場合と、差分のRGBの中から、R、G、Bの各要素を各々独立して抽出した場合を示す図6(c)〜図6(e)とでは、その形状が異なる。また、図示は省略するが、カラーカメラで撮った撮像画像(RGB)からH、S、Vの各要素を各々独立して抽出した場合においてもその形状が異なる。したがって、背景部20と計測対象物10の分離処理では、使う画像(RGBグレー画像、R画像、G画像、B画像、H画像、S画像、V画像)によって精度が異なってくる。 In the size measurement of the measurement object 10 handled in the present embodiment, the most important thing is how to accurately recognize the boundary between the background portion 20 and the measurement object 10. By taking the difference between the image of only the background portion 20 and the captured image of the measurement object 10, theoretically, the background portion becomes a black state having no energy, and the portion where the object exists is the object. It becomes a state with some energy according to the color and brightness. When this is represented by a histogram in which the energy intensity (luminance value of the pixel) is on the horizontal axis and the number of pixels in the image is on the vertical axis, the shape is as shown in FIG. 6A. Since this histogram is affected by the color and brightness of the object, as shown in Fig. 6 (b), the RGB difference is taken from the captured image (RGB) taken by the color camera, and the three values are directly grayscaled. The shapes are different between FIGS. 6 (c) to 6 (e), which show the case where each element of R, G, and B is independently extracted from the difference RGB. Further, although not shown, the shapes are different even when each element of H, S, and V is independently extracted from the captured image (RGB) taken by the color camera. Therefore, in the separation process of the background portion 20 and the measurement object 10, the accuracy differs depending on the image to be used (RGB gray image, R image, G image, B image, H image, S image, V image).

ここで、撮像部30により取得された、撮像画像としての物体画像(RGB)は、各ピクセル(画素)は、R(赤Red)、G(緑Green)、B(青Blue)の成分を有している。ピクセルの成分RGBの内、GとBを0にして、赤み成分Rのみが残った画像として生成された色空間画像をR画像という。同様に、Gのみが残った画像として生成された色空間画像をG画像、Bのみが残った画像として生成された色空間画像をB画像という。また、背景画像(RGB)、物体画像(RGB)を、各々HSV画像に変換し、色相(Hue)のみが残った画像として生成された色空間画像をH画像という。同様に、彩度(Saturation・Chroma)のみが残った画像として生成された色空間画像をS画像、明度(Value・Brightness)のみが残った画像として生成された色空間画像をV画像という。 Here, in the object image (RGB) as the captured image acquired by the imaging unit 30, each pixel has components of R (red Red), G (green Green), and B (blue Blue). is doing. A color space image generated as an image in which G and B are set to 0 and only the reddish component R remains in the pixel component RGB is called an R image. Similarly, a color space image generated as an image in which only G remains is referred to as a G image, and a color space image generated as an image in which only B remains is referred to as a B image. Further, a color space image generated as an image obtained by converting a background image (RGB) and an object image (RGB) into HSV images and leaving only a hue (Hue) is referred to as an H image. Similarly, a color space image generated as an image in which only saturation (Saturation / Chroma) remains is referred to as an S image, and a color space image generated as an image in which only brightness (Value / Brightness) remains is referred to as a V image.

図7(a)に示すように、ヒストグラムにおける、背景の山(P1部分)と物体による山(P2部分)が明確に判別できるヒストグラムのほうが高い精度で分離できる。実際の分離における評価は、図7(b)〜図7(d)に示すようにいくつかの評価を行った値を、総合的な評価値に合成し、その合成値の最も高い値を持つ画像(イメージ)を採用する。 As shown in FIG. 7A, in the histogram, the histogram in which the background peak (P1 portion) and the mountain due to the object (P2 portion) can be clearly discriminated can be separated with higher accuracy. In the evaluation in the actual separation, as shown in FIGS. 7 (b) to 7 (d), the values obtained by performing several evaluations are combined into a comprehensive evaluation value, and the highest value of the combined values is obtained. Adopt an image.

実際の評価値の算出方法としては、図7(b)に示すように、2値化分離スレッシュホールドが規定値以上かどうかを評価する。ヒストグラムを物体と背景に分離する最初の段階として、最初に大津の2値化処理により、まず、初期の分離スレッシュホールドを得る。この結果、図7(b)に示すように、スレッシュホールドの値がピクセル輝度値の0に近い場合は、分離が上手くできない。したがって、このような場合には評価値は0とする。 As an actual method of calculating the evaluation value, as shown in FIG. 7B, it is evaluated whether or not the binarization separation threshold is equal to or higher than the specified value. As the first step of separating the histogram into the object and the background, the initial separation threshold is first obtained by the binarization process of Otsu. As a result, as shown in FIG. 7B, when the threshold value is close to the pixel luminance value of 0, the separation cannot be performed well. Therefore, in such a case, the evaluation value is set to 0.

ここで、大津の2値化処理とは、自動的に閾値T(スレッシュホールド)を決定して2値化処理を行う手法の1つである。この手法では、閾値Tでヒストグラムを2つのクラスに分け、2つの分散から、分離度S(クラス内分散とクラス間分散の比)を求めて、分離度が最大になるときの閾値Tを2値化処理に用いる閾値に決定する、というものである。 Here, the binarization process of Otsu is one of the methods of automatically determining the threshold value T (threshold) and performing the binarization process. In this method, the histogram is divided into two classes by the threshold value T, the degree of separation S (ratio of intraclass variance and interclass variance) is obtained from the two variances, and the threshold value T when the degree of separation is maximized is set to 2. The threshold used for the digitization process is determined.

また、オブジェクトによる変化分ピクセル数の積分結果を評価する。ヒストグラムにおける初期のスレッシュホールドより右の部分は物体によって生じた画像の差分に伴うピクセルの変化分である。図7(c)に示すように、この部分の面積が大きいほうが分離は行い易い。したがって、この部分を積分し、求めた面積を評価値の一つとする。 In addition, the integration result of the number of pixels changed by the object is evaluated. The part to the right of the initial threshold in the histogram is the change in pixels due to the difference in the image caused by the object. As shown in FIG. 7 (c), the larger the area of this portion, the easier the separation. Therefore, this part is integrated and the obtained area is set as one of the evaluation values.

また、背景の山と、物体の山の間に生じる谷の深さによる評価を行なう。ヒストグラムにおける背景の山と、物体の山の間に生じる谷の部分は物体と背景を分離する場合に分離の難しいピクセル(エネルギーを中途半端に持ったピクセル)の量になる。したがって、図7(d)に示すように、この谷が低い位置まで下がっているほうが、物体と背景の分離は明確に行える。この谷の最低値も評価値の一つとする。 In addition, the depth of the valley that occurs between the mountain in the background and the mountain of the object is evaluated. The peaks in the background and the valleys that occur between the peaks of the object in the histogram are the amount of pixels that are difficult to separate when separating the object and the background (pixels that have half-hearted energy). Therefore, as shown in FIG. 7D, the separation of the object and the background can be made more clearly when the valley is lowered to a lower position. The lowest value of this valley is also one of the evaluation values.

以上の評価方法により、スレッシュホールドが大きく、オブジェクトよる変化分が大きく、かつ、背景の山と物体の山に生じる谷の最低値がより低いイメージを物体の輪郭抽出用の画像、寸法測定画像として選択する。実際には、RGBからの派生に加え、人間の色感覚に近いHSVに変換した各々の要素値も使い、RGBグレー、R、G、B、H、S、Vの7種類の色空間画像を評価する。 By the above evaluation method, an image in which the threshold is large, the amount of change due to the object is large, and the minimum value of the valley generated in the background mountain and the object mountain is lower is used as an image for contour extraction of the object and a dimension measurement image. select. Actually, in addition to the derivation from RGB, each element value converted to HSV that is close to the human color sense is also used to create seven types of color space images of RGB gray, R, G, B, H, S, and V. evaluate.

上記の処理は、図4で示したStep08のサブルーチン、関数として処理される。上記の処理を実行して、決定された選択画像に対応する値を戻り値として返す動作を、図8に示すフローチャートで説明する。 The above processing is processed as a subroutine or function of Step 08 shown in FIG. The operation of executing the above processing and returning the value corresponding to the determined selected image as the return value will be described with reference to the flowchart shown in FIG.

(ヒストグラムパターンの評価動作)
図8は、図4で示したStep08のサブルーチン、関数として処理する場合のものであって、撮像画像から、グレースケール,R要素,G要素、B要素,H要素,S要素,V要素の7つの画像について、ヒストグラムパターン評価を行ない、利用する画像を決定する画像選択部の動作を示すフローチャートである。
(Histogram pattern evaluation operation)
FIG. 8 shows a case where the subroutine and function of Step08 shown in FIG. 4 are processed, and 7 of grayscale, R element, G element, B element, H element, S element, and V element are taken from the captured image. It is a flowchart which shows the operation of the image selection part which evaluates a histogram pattern for one image, and decides an image to use.

(Step81)
処理が開始されると、制御部40は、画像選択部42において、画像をヒストグラム(輝度とピクセル数)に変換する。
(Step81)
When the process is started, the control unit 40 converts the image into a histogram (luminance and the number of pixels) in the image selection unit 42.

(Step82)
大津の2値化により、ヒストグラムを背景と物体に分離し、結果の2値化画像とスレッシュホールドを取得する。
(Step82)
By binarizing Otsu, the histogram is separated into a background and an object, and the resulting binarized image and threshold are acquired.

(Step83)
ヒストグラムのうち、スレッシュホールドより大きい部分(物体部分)を積分し、物体部分の面積を求める。
(Step83)
Integrate the portion of the histogram that is larger than the threshold (object portion) to obtain the area of the object portion.

(Step84)
ヒストグラムの最初の山(背景)と2つ目の山(物体)の間にある谷の部分の最低値(分離最低値)を求める。
(Step84)
Find the minimum value (separation minimum value) of the valley between the first peak (background) and the second peak (object) of the histogram.

(Step85)
スレッシュホールドと、物体部分の面積、分離最低値をもとに、画像の評価値を決定する。
(Step85)
The evaluation value of the image is determined based on the threshold, the area of the object part, and the minimum separation value.

(Step86)
制御部40は、画像選択部42において、画像(RGBグレー画像、R画像、G画像、B画像、H画像、S画像、V画像)がまだあるかどうかを判断する。画像がある場合は、次の画像をセットしてStep81に戻って処理を続行し(Step86:Yes)、画像がない場合は、Step87へ進む(Step86:No)。
(Step86)
The control unit 40 determines in the image selection unit 42 whether or not there are still images (RGB gray image, R image, G image, B image, H image, S image, V image). If there is an image, the next image is set and the process returns to Step 81 to continue the process (Step 86: Yes). If there is no image, the process proceeds to Step 87 (Step 86: No).

(Step87)
制御部40は、画像選択部42において、評価値の最も高い画像を選択する。
(Step87)
The control unit 40 selects the image having the highest evaluation value in the image selection unit 42.

(Step88)
制御部40は、選択画像に対応する値を戻り値として、リターン動作を実行し、図4で示す、Step08に戻る。
(Step88)
The control unit 40 executes the return operation with the value corresponding to the selected image as the return value, and returns to Step 08 shown in FIG.

(外接矩形計測部43による外接矩形計測の動作)
外接矩形計測部43による外接矩形計測の動作は、図4で示したStep09により実行される。
(Operation of circumscribing rectangle measurement by circumscribing rectangle measuring unit 43)
The operation of measuring the circumscribing rectangle by the circumscribing rectangle measuring unit 43 is executed by Step 09 shown in FIG.

実際に撮影した計測対象物10の画像では、差分を取った後の画像でも、物体の周りに影の影響で淡い変化が見られる。このため、単純にヒストグラムを使った背景部20と計測対象物10の分離では、この淡い変化分も計測対象物10の一部として認識されてしまう。 In the image of the measurement object 10 actually taken, even in the image after the difference is taken, a faint change can be seen around the object due to the influence of the shadow. Therefore, when the background portion 20 and the measurement target object 10 are simply separated using a histogram, this faint change is also recognized as a part of the measurement target object 10.

図9(a)、(b)は、最適なスレッシュホールドの値を決定するための方法を説明する図である。上記のことを避けるため、図9(a)に示すように、スレッシュホールドを背景の山と、物体の山の間にある谷の最低値の中間位置(A位置)から、物体の山の終わりまでの位置(B位置)で変化させ、最適なスレッシュホールドの値を決定する。スレッシュホールドを動かすと、物体のサイズを示す矩形は、図9(b)に示すように、A位置では、物体の全体と影を含む大きな矩形の状態になり、B位置の近くでは、物体のピクセルのうち、大部分は背景として分離された小さな矩形になる。 9 (a) and 9 (b) are diagrams illustrating a method for determining the optimum threshold value. To avoid the above, as shown in FIG. 9 (a), the threshold is set from the middle position (position A) of the lowest value of the valley between the mountain in the background and the mountain of the object to the end of the mountain of the object. The optimum threshold value is determined by changing the position up to (B position). When the threshold is moved, the rectangle showing the size of the object becomes a large rectangle including the entire object and the shadow at the A position, and the object near the B position, as shown in FIG. 9 (b). Most of the pixels are small rectangles separated as a background.

図10(a)〜(c)は、ピクセル輝度値を等分に分割し、その分割位置による外接矩形のサイズを計測することにより最適なスレッシュホールドの値を決定する方法を説明する図である。最適なスレッシュホールド位置に対する評価は、図10(a)に示すように、A位置からB位置までの間を、等分に分割し、その分割位置による外接矩形のサイズを計測することにより行う。各位置で外接矩形の長辺と短辺の変化は、図10(b)に示すように、スレッシュホールドの変化に対し、大きく変化する位置(物体の外形を外れ、微妙な画像変化の影響を顕著に受ける区間)と、図10(c)に示すように、あまり変化しない場所(物体の外形に接し、淡い変化分に従い緩やかにサイズが変化する部分)が存在する。したがって、最適なスレッシュホールド位置は、図10(c)に示すように、測定値の変化が少ない区間の中央(平均)の値を採用する。このようにすることで、物体による影の影響を抑え、より物体の外形に近い位置に外接矩形をフィットさせることができる。 10 (a) to 10 (c) are diagrams for explaining a method of dividing the pixel luminance value into equal parts and measuring the size of the circumscribing rectangle according to the divided position to determine the optimum threshold value. .. As shown in FIG. 10A, the optimum threshold position is evaluated by dividing the area from the A position to the B position into equal parts and measuring the size of the circumscribed rectangle according to the divided positions. As shown in FIG. 10 (b), the change of the long side and the short side of the circumscribing rectangle at each position greatly changes the position (the outer shape of the object deviates from the outer shape of the object and is affected by the subtle image change) with respect to the change of the threshold. (Remarkably received section) and, as shown in FIG. 10 (c), there is a place that does not change much (a part that touches the outer shape of the object and gradually changes in size according to a slight change). Therefore, as shown in FIG. 10 (c), the optimum threshold position adopts the value at the center (average) of the section where the change in the measured value is small. By doing so, the influence of the shadow caused by the object can be suppressed, and the circumscribed rectangle can be fitted to a position closer to the outer shape of the object.

(フィードバック制御による最適なスレッシュホールド値の決定動作)
図11は、図4で示したStep09をサブルーチン、関数として処理する場合のものであって、決定した画像に対してフィードバック制御によるスレッシュホールドの最適化を行った外接矩形を求める動作を示すフローチャートである。
(Operation to determine the optimum threshold value by feedback control)
FIG. 11 is a flowchart in which Step 09 shown in FIG. 4 is processed as a subroutine or a function, and shows an operation of obtaining an circumscribed rectangle in which the threshold is optimized by feedback control for the determined image. be.

(Step91)
処理が開始されると、制御部40は、外接矩形計測部43において、ヒストグラムの最初の山(背景)の頂点とスレッシュホールド位置の中間値から、物体の山の終端までの間を評価数で等分し、スレッシュホールドとしてのピクセル輝度値を求める。
(Step91)
When the processing is started, the control unit 40 determines the evaluation number from the intermediate value between the apex of the first peak (background) of the histogram and the threshold position to the end of the peak of the object in the circumscribing rectangular measurement unit 43. Divide it into equal parts and find the pixel brightness value as a histogram.

(Step92)
スレッシュホールドとしてのピクセル輝度値を基準に画像を分離し、2値化する。
(Step92)
The image is separated and binarized based on the pixel luminance value as the threshold.

(Step93)
2値化した画像を基に、最も外側になる輪郭に対し、外接矩形(回転含む)を求める。外接矩形(回転含む)を求めるために、エッジ抽出、ノイズフィルタリング、輪郭抽出、最大輪郭選択、外接矩形取得を実行する。これらの処理は、本実施の形態ではプログラム言語としてPython環境で行なうので、例えば、OpenCVモジュールとして、ライブラリ化、関数化されており、これらを利用することができる。
(Step93)
Based on the binarized image, the circumscribing rectangle (including rotation) is obtained for the outermost contour. To find the circumscribing rectangle (including rotation), perform edge extraction, noise filtering, contour extraction, maximum contour selection, and circumscribing rectangle acquisition. Since these processes are performed in the Python environment as a programming language in the present embodiment, for example, they are made into a library and a function as an OpenCV module, and these can be used.

(Step94)
外接矩形の長辺、短辺の長さを評価値として登録する。
(Step94)
Register the lengths of the long and short sides of the circumscribing rectangle as evaluation values.

(Step95)
制御部40は、外接矩形計測部43において、評価位置をすべて処理したかを判断する。評価位置をすべて処理した場合は、Step96へ進み(Step95:Yes)、評価位置をすべて処理していない場合は、次の画像をセットしてStep92に戻って処理を続行する(Step95:No)。
(Step95)
The control unit 40 determines whether or not all the evaluation positions have been processed by the external rectangular measurement unit 43. When all the evaluation positions have been processed, the process proceeds to Step 96 (Step 95: Yes), and when all the evaluation positions have not been processed, the next image is set and the process returns to Step 92 (Step 95: No).

(Step96)
取得した長辺、短辺のスレッシュホールド位置での長さ情報を基に、各々の安定区間を抽出する。
(Step 96)
Based on the acquired length information at the threshold positions of the long side and the short side, each stable section is extracted.

(Step97)
長辺、短辺の各々の安定位置の重なった位置を抽出し、最適スレッシュホールド位置をその真ん中に設定する。
(Step97)
The overlapping positions of the stable positions of the long side and the short side are extracted, and the optimum threshold position is set in the center.

(Step98)
制御部40は、外接矩形計測部43において、決定したスレッシュホールドで外接矩形を求める。
(Step98)
The control unit 40 obtains the circumscribing rectangle with the determined threshold in the circumscribing rectangle measuring unit 43.

(Step99)
制御部40は、外接矩形に対応する値を戻り値として、リターン動作を実行し、図4で示す、Step09に戻る。
(Step99)
The control unit 40 executes the return operation with the value corresponding to the circumscribing rectangle as the return value, and returns to Step 09 shown in FIG.

(辺の長さリストからの安定区間の決定動作)
図12は、図11で示したStep96をサブルーチン、関数として処理する場合のものであって、取得した長辺、短辺のスレッシュホールド位置での長さ情報を基に、各々の安定区間を抽出する動作を示すフローチャートである。また、図13(a)〜(i)は、辺の長さリストからの安定区間の決定動作の一例を各区間の処理毎に説明するための図である。
(Stable interval determination operation from the side length list)
FIG. 12 shows a case where Step 96 shown in FIG. 11 is processed as a subroutine or a function, and each stable section is extracted based on the acquired length information at the threshold positions of the long side and the short side. It is a flowchart which shows the operation to perform. Further, FIGS. 13 (a) to 13 (i) are diagrams for explaining an example of the operation of determining the stable section from the side length list for each process of each section.

(Step961)
制御部40は、初期のスレッシュホールド位置を基に、開始区間を設定する。図13(a)に示すように、例えば、初期スレッシュホールドの入るS2区間から開始する。
(Step 961)
The control unit 40 sets the start section based on the initial threshold position. As shown in FIG. 13A, for example, it starts from the S2 section where the initial threshold is entered.

(Step962)
制御部40は、区間の前後における辺の長さ変化を求める。図13(b)〜図13(h)に示すように、区間の前後における辺の長さ変化を求める。
(Step 962)
The control unit 40 obtains a change in the length of the side before and after the section. As shown in FIGS. 13 (b) to 13 (h), the change in side length before and after the section is obtained.

(Step963)
制御部40は、変化値がいずれも許容範囲を超えるかどうかを判断する。変化値がいずれも許容範囲を超えない場合は、Step965へ進み(Step963:No)、変化値がいずれも許容範囲を超える場合は、Step964へ進む(Step963:Yes)。
(Step963)
The control unit 40 determines whether or not all the change values exceed the permissible range. If none of the change values exceed the permissible range, the process proceeds to Step 965 (Step 963: No), and if none of the change values exceeds the permissible range, the process proceeds to Step 964 (Step 963: Yes).

(Step964)
図13(a)〜(i)に示す処理を実行して安定区間を出力した場合、制御部40は、安定区間に対応する値を戻り値として、リターン動作を実行し、図11で示す、Step96に戻る。
(Step 964)
When the processes shown in FIGS. 13 (a) to 13 (i) are executed and the stable section is output, the control unit 40 executes the return operation with the value corresponding to the stable section as the return value, and is shown in FIG. Return to Step 96.

(Step965)
制御部40は、変化の小さい側に区間を延伸する。例えば、図13(b)に示す例では、D1よりD3が小さいためD3側に伸延する。
(Step 965)
The control unit 40 extends the section to the side where the change is small. For example, in the example shown in FIG. 13B, since D3 is smaller than D1, it extends to the D3 side.

(Step966)
制御部40は、区間の両端にあたる部分の変化値を計算する。
(Step966)
The control unit 40 calculates the change value of the portion corresponding to both ends of the section.

(Step967)
制御部40は、どちらかの変化が許容範囲を超えるかどうかを判断する。どちらかの変化が許容範囲を超える場合は、Step968へ進み(Step967:Yes)、どちらかの変化が許容範囲を超えない場合は、Step962に戻って処理を続行する(Step967:No)。
(Step 967)
The control unit 40 determines whether or not one of the changes exceeds the permissible range. If either change exceeds the permissible range, the process proceeds to Step 968 (Step 967: Yes), and if either change does not exceed the permissible range, the process returns to Step 962 and continues processing (Step 967: No).

(Step968)
制御部40は、大きな変化を起こす側の区間を削除(短縮)する。例えば、図13(c)に示す例では、伸延とは逆側のD2が誤差範囲を超えているためS2区間を削除して短縮する。制御部40は、Step962に戻って処理を続行する。
(Step 968)
The control unit 40 deletes (shortens) the section on the side that causes a large change. For example, in the example shown in FIG. 13C, since D2 on the opposite side of the extension exceeds the error range, the S2 section is deleted and shortened. The control unit 40 returns to Step 962 and continues the process.

上記示したような一連の動作により、本実施の形態に係る物体計測装置1は、一般に物流で流れる様々な商品(箱状、袋状、円筒など)である不特定の計測対象物の外形サイズ(幅W、奥行きD、正確には回転角を持つ外接矩形)を計測することが可能になる。特に、背景部は、パターン模様を有している構成とされていることから、計測対象物の外観が、任意の形状、任意の色、又は、任意のテクスチャを有する不特定物であっても寸法計測が可能となる。 By a series of operations as shown above, the object measuring device 1 according to the present embodiment generally has an external size of an unspecified object to be measured, which is various products (box-shaped, bag-shaped, cylindrical, etc.) flowing in physical distribution. It becomes possible to measure (width W, depth D, to be exact, an circumscribing rectangle having a rotation angle). In particular, since the background portion is configured to have a pattern, even if the appearance of the object to be measured is an unspecified object having an arbitrary shape, an arbitrary color, or an arbitrary texture. Dimension measurement becomes possible.

また、撮像画像から、グレースケール画像、R、G、B、H、S、Vの各色空間画像を生成し、それぞれ生成した色空間画像のヒストグラムパターンの評価値に基づいて利用する寸法測定画像を選択する画像選択部を有する構成としていることから、最適な色空間画像を使用して、スレッシュホールド位置を決定し、外接矩形計測を実行することが可能となる。 Further, a grayscale image, R, G, B, H, S, and V color space images are generated from the captured image, and a dimensional measurement image to be used based on the evaluation value of the histogram pattern of the generated color space image is used. Since the configuration has an image selection unit to be selected, it is possible to determine the threshold position and execute the circumscribing rectangular measurement by using the optimum color space image.

(第1の実施の形態の効果)
図14(a)は、パターン模様を有しない単色の背景部に計測対象物を載置した場合の一例を示す図であり、図14(b)は、本願発明に係るパターン模様の背景部に計測対象物を載置した場合の一例を示す図である。図14(a)の場合は、背景205が単色であり、計測対象物207である物体の輪郭付近208の色が同色、近似する色、又は、近似する輝度を有する色である。このような場合、スレッシュホールドの設定が難しく、計測対象物207である容器の縁の輪郭付近208が背景に同化し、ラベル209のみが検出され、正しい輪郭を検出できないことがある。これに対して、図14(b)に示すような本実施の形態では、計測対象物207である容器の少なくとも一部の縁が輪郭抽出可能であり、複数色パターンを使った輪郭消失の抑止効果が期待できる。
(Effect of the first embodiment)
FIG. 14 (a) is a diagram showing an example of a case where the measurement object is placed on a monochromatic background portion having no pattern, and FIG. 14 (b) is a diagram showing an example in the case where the measurement object is placed on the background portion of the pattern pattern according to the present invention. It is a figure which shows an example of the case where the measurement object is placed. In the case of FIG. 14A, the background 205 is a single color, and the colors of 208 near the contour of the object 207 to be measured are the same color, similar colors, or colors having similar brightness. In such a case, it is difficult to set the threshold, and 208 near the contour of the edge of the container, which is the measurement object 207, is assimilated into the background, only the label 209 is detected, and the correct contour may not be detected. On the other hand, in the present embodiment as shown in FIG. 14B, at least a part of the edge of the container which is the measurement object 207 can be contour-extracted, and the contour disappearance is suppressed by using a plurality of color patterns. The effect can be expected.

背景部20と計測対象物10の分離処理では、使う画像(例えば、RGBグレー画像、R画像、G画像、B画像、H画像、S画像、V画像等)によって分離の精度が異なってくるという問題がある。本実施の形態において、画像選択部42は、撮像画像から変換した複数の異なる色空間画像を、それぞれから生成した色空間画像のヒストグラムパターンの評価を行なう。これにより、スレッシュホールドが大きく、オブジェクトよる変化分が大きく、かつ、背景の山と物体の山に生じる谷の最低値がより低いイメージを物体の輪郭抽出用の画像、寸法測定画像として選択することができる。上記示した画像選択の動作において、撮像画像は、パターン模様の背景部に計測対象物を載置した場合に限られず、単色の背景部に計測対象物を載置した場合においても、物体の輪郭抽出の精度を向上させることができる。 In the separation process of the background portion 20 and the measurement object 10, the separation accuracy differs depending on the image to be used (for example, RGB gray image, R image, G image, B image, H image, S image, V image, etc.). There's a problem. In the present embodiment, the image selection unit 42 evaluates the histogram pattern of the color space image generated from each of a plurality of different color space images converted from the captured image. As a result, an image having a large threshold, a large amount of change due to the object, and a lower minimum value of the valleys generated in the background mountain and the object mountain can be selected as the image for contour extraction of the object and the dimension measurement image. Can be done. In the image selection operation shown above, the captured image is not limited to the case where the measurement object is placed on the background portion of the pattern pattern, and the contour of the object is obtained even when the measurement object is placed on the monochromatic background portion. The accuracy of extraction can be improved.

実際に撮影した計測対象物10の画像では、差分を取った後の画像でも、物体の周りに影の影響で淡い変化が見られ、単純にヒストグラムを使った背景部20と計測対象物10の分離では、この淡い変化分も計測対象物10の一部として認識されてしまうという問題がある。本実施の形態では、外接矩形計測部43は、計測対象物に対してスレッシュホールド値を変化させて得られる、複数のサイズの外接矩形のうち、スレッシュホールドの変化に対し、サイズ変化の少ない区間(安定区間)を選択する。最適なスレッシュホールド位置として、図10(c)に示すように、測定値の変化が少ない区間の中央(平均)の値を採用することで、物体による影の影響を抑え、より物体の外形に近い位置に外接矩形をフィットさせることができる。 In the image of the measurement object 10 actually taken, even in the image after the difference is taken, a faint change is seen due to the influence of the shadow around the object, and the background portion 20 and the measurement object 10 using a histogram are simply used. In the separation, there is a problem that this faint change is also recognized as a part of the measurement object 10. In the present embodiment, the circumscribed rectangle measuring unit 43 is obtained by changing the threshold value with respect to the object to be measured. Select (Stable section). As shown in FIG. 10 (c), as the optimum threshold position, by adopting the value at the center (average) of the section where the change in the measured value is small, the influence of the shadow by the object is suppressed and the outer shape of the object is further improved. The circumscribing rectangle can be fitted to a close position.

〔本発明の第2の実施の形態〕
図15(a)は、本発明の第2の実施の形態に係る計測装置100の構成を示す構成概略図であり、図15(b)は、本発明の第2の実施の形態に係る計測装置100を構成する構成要素の接続関係を示すブロック構成図である。第2の実施の形態では、計測装置100は、計測対象物10の重量を計測する重量計測部125と、撮像部130が深度(高さH)情報の取得も可能な3Dカメラを備えている。これにより、計測対象物10の重量、及び、形状寸法(幅W、奥行きD、高さH)が計測可能となる。
[Second Embodiment of the present invention]
FIG. 15A is a schematic configuration diagram showing the configuration of the measuring device 100 according to the second embodiment of the present invention, and FIG. 15B is a measurement according to the second embodiment of the present invention. It is a block block diagram which shows the connection relationship of the component | component which comprises the apparatus 100. In the second embodiment, the measuring device 100 includes a weight measuring unit 125 that measures the weight of the object 10 to be measured, and a 3D camera in which the imaging unit 130 can also acquire depth (height H) information. .. As a result, the weight and shape dimensions (width W, depth D, height H) of the object to be measured 10 can be measured.

図15(a)、(b)に示すように、背景部20は、重量計測部125の上面に設置されている。計測対象物10は、重量計測部125の上面に載置されて、重量を計測されると共に、パターン模様を背景として撮像部130により撮像される。重量計測部125は、制御部40に接続されており、重量の計測制御、重量計測値の入出力が可能である。 As shown in FIGS. 15A and 15B, the background portion 20 is installed on the upper surface of the weight measuring portion 125. The object 10 to be measured is placed on the upper surface of the weight measuring unit 125, the weight is measured, and the image is taken by the imaging unit 130 against the background of the pattern pattern. The weight measurement unit 125 is connected to the control unit 40, and is capable of weight measurement control and input / output of weight measurement values.

撮像部130は、深度情報も取得可能なカメラである。例えば、撮像部130は、TOFカメラ(トフカメラ、Time-of-Flight Camera)が使用できる。TOFカメラは、被写体に対して照射したパルス光の反射時間を画素毎に計測することで三次元的な情報を計測できる。これにより、計測対象物10の重量、及び、形状寸法(幅W、奥行きD、高さH)が計測可能となる。 The imaging unit 130 is a camera capable of acquiring depth information. For example, a TOF camera (Time-of-Flight Camera) can be used as the imaging unit 130. The TOF camera can measure three-dimensional information by measuring the reflection time of the pulsed light applied to the subject for each pixel. As a result, the weight and shape dimensions (width W, depth D, height H) of the object to be measured 10 can be measured.

制御部40は、差分画像生成部41、画像選択部42、外接矩形計測部43の処理を実行すると共に、重量計測部125、撮像部130の制御も行なう。したがって、計測装置100においては、計測対象物10の重量計測、容積の算出を行なうことが可能となる。 The control unit 40 executes the processes of the difference image generation unit 41, the image selection unit 42, and the circumscribing rectangular measurement unit 43, and also controls the weight measurement unit 125 and the image pickup unit 130. Therefore, the measuring device 100 can measure the weight of the object to be measured 10 and calculate the volume.

なお、上記示した撮像部130による深度情報を含めた情報以外に、計測対象物10の温度、色等の種々の情報取得を行なう各種センサーによる情報に基づいて計測を行なうことも可能である。その他の構成は、第1の実施の形態と同様である。 In addition to the information including the depth information by the imaging unit 130 shown above, it is also possible to perform measurement based on the information obtained by various sensors that acquire various information such as the temperature and color of the object 10 to be measured. Other configurations are the same as in the first embodiment.

本発明の第2の実施の形態によれば、計測装置100は、計測対象物10の重量を計測する重量計測部125と、撮像部130が深度(高さH)情報の取得も可能な3Dカメラを備えているので、物流における商品の外径寸法(幅W、奥行きD、高さH)、及び重量が計測可能となる。これにより、計測装置100は、保管管理、輸送管理等の物流管理に適用可能となる。 According to the second embodiment of the present invention, in the measuring device 100, the weight measuring unit 125 for measuring the weight of the measurement object 10 and the imaging unit 130 can also acquire depth (height H) information in 3D. Since it is equipped with a camera, it is possible to measure the outer diameter dimensions (width W, depth D, height H) and weight of the product in physical distribution. As a result, the measuring device 100 can be applied to physical distribution management such as storage management and transportation management.

以上、本発明の実施の形態を説明したが、本発明は、上記の実施の形態に限定されず、発明の主旨を逸脱しない範囲内において種々変形実施が可能である。また、上記の実施の形態は特許請求の範囲に係る発明を限定するものではない。また、実施の形態の中で説明した特徴の組合せの全てが発明の課題を解決するための手段に必須であるとは限らない点に留意すべきである。 Although the embodiments of the present invention have been described above, the present invention is not limited to the above-described embodiments, and various modifications can be carried out within a range that does not deviate from the gist of the invention. Moreover, the above-described embodiment does not limit the invention according to the claims. It should also be noted that not all combinations of features described in the embodiments are essential to the means for solving the problems of the invention.

1…物体計測装置、計測対象物10…、20…背景部、25…載置台、30…撮像部、40…制御部、41…差分画像生成部、42…画像選択部、43…外接矩形計測部、80…照明装置
100…計測装置、125…重量計測部、130…撮像部
1 ... Object measuring device, measurement object 10 ..., 20 ... Background part, 25 ... Mounting stand, 30 ... Imaging unit, 40 ... Control unit, 41 ... Difference image generation unit, 42 ... Image selection unit, 43 ... External rectangular measurement Unit, 80 ... Lighting device 100 ... Measuring device, 125 ... Weight measuring unit, 130 ... Imaging unit

Claims (6)

撮像時に計測対象物の背後に配置される背景部と、
前記計測対象物の画像を取得する撮像部と、
前記撮像部により取得した撮像画像に基づいて、前記計測対象物の計測処理を実行する
制御部と、を有し、
前記背景部は、パターン模様を有し、
前記制御部は、前記撮像画像から変換した複数の異なる色空間画像を、それぞれから生成した色空間画像のヒストグラムパターンの評価値に基づいて利用する寸法測定画像を選択する画像選択部を有する、物体計測装置。
The background part placed behind the object to be measured at the time of imaging,
An imaging unit that acquires an image of the measurement object, and
It has a control unit that executes measurement processing of the measurement object based on the captured image acquired by the imaging unit.
The background section, have a pattern pattern,
The control unit has an image selection unit that selects a dimensional measurement image to be used based on an evaluation value of a histogram pattern of a color space image generated from a plurality of different color space images converted from the captured image. Measuring device.
前記制御部は、前記撮像画像と前記背景部のみの背景画像との差分画像を生成する背景差分法による差分画像生成部を有する、請求項1に記載の物体計測装置。 The object measuring device according to claim 1, wherein the control unit includes a difference image generation unit by a background subtraction method that generates a difference image between the captured image and the background image of only the background unit. 前記制御部は、前記画像選択部により選択された色空間画像である前記寸法測定画像を使用して外接矩形計測を行なう外接矩形計測部を有する、請求項1又は2に記載の物体計測装置。 The object measuring device according to claim 1 or 2 , wherein the control unit has an extrinsic rectangle measuring unit that measures an extrinsic rectangle using the dimension measurement image that is a color space image selected by the image selection unit. 前記外接矩形計測部は、前記計測対象物に対してスレッシュホールド値を変化させて得られる、複数のサイズの外接矩形のうち、スレッシュホールドの変化に対し、サイズ変化の少ない区間を選択する、請求項に記載の物体計測装置。 The circumscribed rectangle measuring unit selects a section having a small size change with respect to a change in the threshold among a plurality of sizes of circumscribed rectangles obtained by changing the threshold value with respect to the measurement object. Item 3. The object measuring device according to item 3. 前記パターン模様は、2色のチェック模様である、請求項1からのいずれか1項に記載の物体計測装置。 The object measuring device according to any one of claims 1 to 4 , wherein the pattern is a check pattern of two colors. 請求項1から5のいずれか1項に記載の物体計測装置と、
前記計測対象物の重量を計測する重量計測部と、を有し、
前記撮像部は、深度情報も取得して、前記計測対象物の計測を行なう、計測装置。
The object measuring device according to any one of claims 1 to 5.
It has a weight measuring unit for measuring the weight of the object to be measured, and has a weight measuring unit.
The imaging unit is a measuring device that also acquires depth information and measures the measurement object.
JP2021006668A 2021-01-19 2021-01-19 Object measuring device and measuring device Active JP6909360B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2021006668A JP6909360B1 (en) 2021-01-19 2021-01-19 Object measuring device and measuring device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2021006668A JP6909360B1 (en) 2021-01-19 2021-01-19 Object measuring device and measuring device

Publications (2)

Publication Number Publication Date
JP6909360B1 true JP6909360B1 (en) 2021-07-28
JP2022110928A JP2022110928A (en) 2022-07-29

Family

ID=76967289

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2021006668A Active JP6909360B1 (en) 2021-01-19 2021-01-19 Object measuring device and measuring device

Country Status (1)

Country Link
JP (1) JP6909360B1 (en)

Also Published As

Publication number Publication date
JP2022110928A (en) 2022-07-29

Similar Documents

Publication Publication Date Title
US8401274B2 (en) Image processing apparatus and method
US7840064B2 (en) Method and system for automatic identification using digital images
US11069057B2 (en) Skin diagnostic device and skin diagnostic method
US8285039B2 (en) Image processor
US11915516B2 (en) Information processing device and recognition support method
WO2020059565A1 (en) Depth acquisition device, depth acquisition method and program
JP4389602B2 (en) Object detection apparatus, object detection method, and program
US20080063272A1 (en) Character extracting apparatus, method, and program
US11373324B2 (en) Depth acquisition device and depth acquisition method for providing a corrected depth image
JP2019168388A (en) Image inspection method and image inspection device
JP2006023178A5 (en)
CN105787429A (en) Method and apparatus for inspecting an object employing machine vision
JP6909360B1 (en) Object measuring device and measuring device
JP6180889B2 (en) Printing inspection device
TWI677231B (en) Method and system for inspecting display apparatus
JP5509706B2 (en) Image processing apparatus and image processing method
JP4406978B2 (en) Template matching method
JP7137880B1 (en) Image processing device, image processing method, and image processing program
US11842506B2 (en) Apparatus, method, and storage medium
JP5540587B2 (en) Bar code analyzing apparatus and program
CN112444302B (en) Image acquisition device, water level detection device, method and storage medium
US20230334780A1 (en) Three-dimensional modeling method and apparatus using same
JP4639140B2 (en) Image processing device
US20200218928A1 (en) Validation of candidate locations of a boundary
JP2007109121A (en) Image processing device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20210203

A871 Explanation of circumstances concerning accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A871

Effective date: 20210203

A975 Report on accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A971005

Effective date: 20210402

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210420

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210528

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20210629

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210702

R150 Certificate of patent or registration of utility model

Ref document number: 6909360

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250