JP6041641B2 - Dimension estimation apparatus, dimension estimation program, and dimension estimation method - Google Patents
Dimension estimation apparatus, dimension estimation program, and dimension estimation method Download PDFInfo
- Publication number
- JP6041641B2 JP6041641B2 JP2012262394A JP2012262394A JP6041641B2 JP 6041641 B2 JP6041641 B2 JP 6041641B2 JP 2012262394 A JP2012262394 A JP 2012262394A JP 2012262394 A JP2012262394 A JP 2012262394A JP 6041641 B2 JP6041641 B2 JP 6041641B2
- Authority
- JP
- Japan
- Prior art keywords
- vector
- line segment
- reference axis
- unit
- reference line
- 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
Links
Images
Landscapes
- Image Analysis (AREA)
- Length Measuring Devices By Optical Means (AREA)
- Image Processing (AREA)
Description
本発明は、例えば、写真に映っている被写体の寸法を計測するための寸法推定装置、寸法推定プログラムおよび寸法推定方法に関するものである。 The present invention relates to a size estimation device, a size estimation program, and a size estimation method for measuring the size of a subject shown in a photograph, for example.
写真に映った被写体の寸法を計測する方法としてステレオ計測が知られている。ステレオ計測とは、被写体を異なる方向から撮影し、撮影時の視差を利用して三角測量の原理で被写体の寸法を計測する方法である。
しかし、海上の不審船などを監視する監視業務のように監視対象を撮影する回数または角度が限定される場合、適当な視差を確保しながら監視対象を異なる方向から撮影することができない。そのため、ステレオ計測によって監視対象の正確な寸法を計測することは困難である。
Stereo measurement is known as a method for measuring the size of a subject shown in a photograph. Stereo measurement is a method of photographing a subject from different directions and measuring the size of the subject by the principle of triangulation using the parallax at the time of photographing.
However, when the number or angle of shooting of the monitoring target is limited as in a monitoring operation for monitoring a suspicious ship at sea, the monitoring target cannot be shot from different directions while securing an appropriate parallax. Therefore, it is difficult to measure the exact size of the monitoring target by stereo measurement.
また、大きさが既知である比較部分を含んだ被写体が写真に映っている場合、被写体の計測部分と比較部分との大きさを比較することによって、被写体の計測部分の寸法を計測することができる。
但し、被写体が斜め方向から撮影されている場合、被写体の手前側の部分と奥側の部分とで写真に映る大きさが異なるため、被写体の計測部分の寸法を正確に計測することができない。
In addition, when a subject including a comparison portion with a known size is shown in a photograph, the size of the measurement portion of the subject can be measured by comparing the size of the measurement portion of the subject with the comparison portion. it can.
However, when the subject is photographed from an oblique direction, the size of the measurement portion of the subject cannot be accurately measured because the size of the subject is different from the size of the near side portion and the far side portion of the subject.
図36は、従来の寸法計測方法の概要図である。
例えば、被写体の円部分の直径「2メートル」が既知であるものとする(図36の(a))。ここで、被写体は正面から撮像されているものとする(図36の(b))。
この場合、被写体の円部分の画素数「20」と被写体の高さ方向の画素数「40」との比率「2(=40/20)」と、被写体の円部分の直径「2メートル」とを用いて、被写体の高さ「4メートル(=2×2メートル)」を算出することができる(図36の(c)(d))。
同様に、被写体の円部分の画素数「20」と被写体の幅方向の画素数「120」との比率「6(=120/20)」と、被写体の円部分の直径「2メートル」とを用いて、被写体の幅「12メートル(=6×2メートル)」を算出することができる(図36の(c)(d))。
但し、被写体が斜め方向から撮像されている場合(図36の(e))、被写体の手前側の部分d2と奥側の部分d1とで写真に映る大きさが異なるため、被写体の高さまたは幅を正確に計測することができない。
FIG. 36 is a schematic diagram of a conventional dimension measuring method.
For example, it is assumed that the diameter “2 meters” of the circular portion of the subject is known ((a) in FIG. 36). Here, it is assumed that the subject is imaged from the front ((b) of FIG. 36).
In this case, the ratio “2 (= 40/20)” between the number of pixels “20” in the circular portion of the subject and the number of pixels “40” in the height direction of the subject, and the diameter “2 meters” of the circular portion of the subject. Can be used to calculate the height of the subject “4 meters (= 2 × 2 meters)” ((c) and (d) in FIG. 36).
Similarly, the ratio “6 (= 120/20)” between the number of pixels “20” in the circular portion of the subject and the number of pixels “120” in the width direction of the subject, and the diameter “2 meters” of the circular portion of the subject. By using this, the width of the subject “12 meters (= 6 × 2 meters)” can be calculated ((c) and (d) in FIG. 36).
However, when the subject is imaged from an oblique direction ((e) of FIG. 36), the size of the subject is different because the front portion d2 and the back portion d1 of the subject have different sizes. The width cannot be measured accurately.
非特許文献1には、斜め方向から撮影された被写体が映っている1枚の写真から被写体が映っている向きを表す三次元の姿勢ベクトルを算出する方法が開示されている。
しかし、被写体が映っている向きを表す三次元の姿勢ベクトルに基づいて被写体の寸法を計測する方法は開示も示唆もされていない。
Non-Patent
However, there is no disclosure or suggestion of a method for measuring the size of a subject based on a three-dimensional posture vector representing the direction in which the subject is reflected.
特許文献1には、視覚に基づく三次元位置および姿勢の認識方法が開示されている。
本発明は、例えば、対象物を斜め方向から撮像した対象画像を用いて対象物の寸法を正確に計測できるようにすることを目的とする。 An object of the present invention is to make it possible to accurately measure the size of an object using an object image obtained by imaging the object from an oblique direction, for example.
本発明の寸法推定装置は、
対象物を斜め方向から撮像した対象画像に映っている前記対象物の幅方向と高さ方向と奥行き方向とに沿う3つの基準線分を前記対象画像の二次元の座標値を用いて表す基準線分情報を生成する基準線分情報生成部と、
前記基準線分情報生成部によって生成された前記基準線分情報と、前記対象画像の撮像パラメータとに基づいて、前記対象物の前記幅方向と前記高さ方向と前記奥行き方向とを三次元のベクトル値を用いて表す3つの基準軸ベクトルを算出する基準軸ベクトル算出部と、
前記基準軸ベクトル算出部によって算出された前記3つの基準軸ベクトルのうち少なくともいずれかの基準軸ベクトルを用いて、前記対象画像に映っている前記対象物のうち長さが既知の線分であるリファレンス線分のベクトル値を、リファレンス線分ベクトルとして算出するリファレンス線分ベクトル算出部と、
前記基準軸ベクトル算出部によって算出された前記3つの基準軸ベクトルのうち少なくともいずれかの基準軸ベクトルを用いて、前記対象画像に映っている前記対象物のうち長さが未知の線分である計測線分のベクトル値を、計測線分ベクトルとして算出する計測線分ベクトル算出部と、
前記リファレンス線分の既知の長さと、前記リファレンス線分ベクトル算出部によって算出された前記リファレンス線分ベクトルと、前記計測線分ベクトル算出部によって算出された前記計測線分ベクトルとを用いて、前記計測線分の長さを算出する計測線分長算出部とを備える。
The size estimation apparatus of the present invention is
A reference representing three reference line segments along the width direction, the height direction, and the depth direction of the target object shown in the target image obtained by imaging the target object from an oblique direction, using two-dimensional coordinate values of the target image. A reference line segment information generation unit for generating line segment information;
Based on the reference line segment information generated by the reference line segment information generation unit and the imaging parameters of the target image, the width direction, the height direction, and the depth direction of the target object are three-dimensionally displayed. A reference axis vector calculation unit for calculating three reference axis vectors represented using vector values;
Using the reference axis vector of at least one of the three reference axis vectors calculated by the reference axis vector calculation unit, the length of the target object shown in the target image is a known line segment A reference line segment vector calculating unit for calculating a reference line segment vector value as a reference line segment vector;
The length of the object shown in the target image is an unknown line segment using at least one of the three reference axis vectors calculated by the reference axis vector calculation unit. A measurement line vector calculation unit that calculates a vector value of the measurement line segment as a measurement line segment vector;
Using the known length of the reference line segment, the reference line segment vector calculated by the reference line segment vector calculation unit, and the measurement line segment vector calculated by the measurement line segment vector calculation unit, A measurement line segment length calculation unit that calculates the length of the measurement line segment.
前記リファレンス線分ベクトル算出部は、
前記対象画像が撮像された位置を示す座標点Pcから前記リファレンス線分の一方の端点Psへの向きを有する単位ベクトルVsを算出し、
前記座標点Pcから前記リファレンス線分の他方の端点Peへの向きを有する単位ベクトルVeを算出し、
前記単位ベクトルVsと、前記単位ベクトルVeと、前記3つの基準軸ベクトルのうち少なくともいずれかの基準軸ベクトルとを用いて、前記リファレンス線分ベクトルを算出する。
The reference line segment vector calculator is
A unit vector V s having a direction from a coordinate point P c indicating a position where the target image is captured to one end point P s of the reference line segment is calculated;
It calculates a unit vector V e from the coordinate point P c with the direction of the other end point P e of the reference line,
The reference line segment vector is calculated using the unit vector V s , the unit vector V e, and at least one of the three reference axis vectors.
前記リファレンス線分ベクトル算出部は、
前記座標点Pcから前記リファレンス線分の前記端点PsへのベクトルVstsを得るための媒介変数tsを、前記3つの基準軸ベクトルのうちいずれかの基準軸ベクトルを用いて算出し、
前記座標点Pcから前記リファレンス線分の前記端点PeへのベクトルVeteを得るための媒介変数teを、前記いずれかの基準軸ベクトルを用いて算出し、
前記ベクトルVstsと前記ベクトルVeteとを用いて、前記リファレンス線分ベクトルを算出する。
The reference line segment vector calculator is
The parametric t s for from the coordinate point P c to obtain a vector V s t s to the end point P s of the reference line segment, calculated by using one of the reference axis vector of the three reference axis vector And
The parametric t e for obtaining the vector V e t e from the coordinate point P c to the end point P e of the reference line, is calculated by using the one of the reference axis vector,
Wherein the vector V s t s by using the vector V e t e, calculates the reference line segment vector.
前記リファレンス線分ベクトル算出部は、以下の式(101)を計算して前記リファレンス線分ベクトルLrを算出する。 The reference line segment vector calculation unit calculates the reference line segment vector L r by calculating the following equation (101).
前記リファレンス線分ベクトル算出部は、前記3つの基準軸ベクトルの原点P0の座標値を用いると共に基準軸ベクトルOzを前記いずれかの基準軸ベクトルとして用いて以下の式(102)を計算し、前記媒介変数tsと前記媒介変数teとを算出する。 The reference line segment vector calculation unit calculates the following expression (102) using the coordinate value of the origin P 0 of the three reference axis vectors and using the reference axis vector Oz as one of the reference axis vectors, The parameter t s and the parameter t te are calculated.
前記計測線分ベクトル算出部は、
前記対象画像が撮像された位置を示す座標点Pcから前記計測線分の一方の端点Pmsへの向きを有する単位ベクトルVmsを算出し、
前記座標点Pcから前記リファレンス線分の他方の端点Pmeへの向きを有する単位ベクトルVmeを算出し、
前記単位ベクトルVmsと、前記単位ベクトルVmeと、前記3つの基準軸ベクトルのうち少なくともいずれかの基準軸ベクトルとを用いて、前記計測線分ベクトルを算出する。
The measurement line segment vector calculation unit
A unit vector V ms having a direction from the coordinate point P c indicating the position where the target image is captured to one end point P ms of the measurement line segment,
A unit vector V me having a direction from the coordinate point P c to the other end point P me of the reference line segment is calculated;
The measurement line segment vector is calculated using the unit vector V ms , the unit vector V me, and at least one of the three reference axis vectors.
前記計測線分ベクトル算出部は、
前記座標点Pcから前記計測線分の前記端点PmsへのベクトルVmstmsを得るための媒介変数tmsを、前記3つの基準軸ベクトルのうちいずれかの基準軸ベクトルを用いて算出し、
前記座標点Pcから前記計測線分の前記端点PmeへのベクトルVmetmeを得るための媒介変数tmeを、前記いずれかの基準軸ベクトルを用いて算出し、
前記ベクトルVmstmsと前記ベクトルVmetmeとを用いて、前記リファレンス線分ベクトルを算出する。
The measurement line segment vector calculation unit
The parametric t ms for from the coordinate point P c to obtain a vector V ms t ms to the end point P ms of the measurement line segment, calculated by using one of the reference axis vector of the three reference axis vector And
A parametric variable t me for obtaining a vector V me t me from the coordinate point P c to the end point P me of the measurement line segment is calculated using any of the reference axis vectors;
The reference line segment vector is calculated using the vector V ms t ms and the vector V me t me .
前記計測線分ベクトル算出部は、以下の式(103)を計算して前記計測線分ベクトルLmを算出する。 The measurement line segment vector calculation unit calculates the measuring line segment vector L m by calculating the following equation (103).
前記計測線分ベクトル算出部は、前記3つの基準軸ベクトルの原点P0の座標値を用いると共に基準軸ベクトルOxを前記いずれかの基準軸ベクトルとして用いて以下の式(104)を計算し、前記媒介変数tmsと前記媒介変数tmeとを算出する。 The measurement line segment vector calculation unit calculates the following formula (104) using the coordinate value of the origin P 0 of the three reference axis vectors and using the reference axis vector Ox as one of the reference axis vectors, The parameter t ms and the parameter t me are calculated.
前記計測線分長算出部は、前記リファレンス線分ベクトルに対する前記計測線分ベクトルの大きさの比率に前記リファレンス線分の既知の長さを乗じた値を前記計測線分の長さとして算出する。 The measurement line segment length calculation unit calculates, as the length of the measurement line segment, a value obtained by multiplying a ratio of the size of the measurement line segment vector to the reference line segment vector by a known length of the reference line segment. .
前記基準軸ベクトル算出部は、
前記基準線分情報と前記撮像パラメータとに基づいて、前記対象物の前記幅方向と前記高さ方向と前記奥行き方向とを表す3つの単位ベクトルであって、FPM(First Perspective Moving)座標系またはSPM(Second Perspective Moving)座標系の3つの単位ベクトルを算出し、
FPM座標系またはSPM座標系の前記3つの単位ベクトルを用いて、ワールド座標系の3つのベクトルを前記3つの基準軸ベクトルとして算出する。
The reference axis vector calculation unit includes:
Three unit vectors representing the width direction, the height direction, and the depth direction of the object based on the reference line segment information and the imaging parameter, and an FPM (First Perspective Moving) coordinate system or Calculate three unit vectors in the SPM (Second Perspective Moving) coordinate system,
Using the three unit vectors in the FPM coordinate system or the SPM coordinate system, the three vectors in the world coordinate system are calculated as the three reference axis vectors.
本発明の寸法推定プログラムは、
対象物を斜め方向から撮像した対象画像に映っている前記対象物の幅方向と高さ方向と奥行き方向とに沿う3つの基準線分を前記対象画像の二次元の座標値を用いて表す基準線分情報を生成する基準線分情報生成処理と、
前記基準線分情報生成処理によって生成された前記基準線分情報と、前記対象画像の撮像パラメータとに基づいて、前記対象物の前記幅方向と前記高さ方向と前記奥行き方向とを三次元のベクトル値を用いて表す3つの基準軸ベクトルを算出する基準軸ベクトル算出処理と、
前記基準軸ベクトル算出処理によって算出された前記3つの基準軸ベクトルのうち少なくともいずれかの基準軸ベクトルを用いて、前記対象画像に映っている前記対象物のうち長さが既知の線分であるリファレンス線分のベクトル値を、リファレンス線分ベクトルとして算出するリファレンス線分ベクトル算出処理と、
前記基準軸ベクトル算出処理によって算出された前記3つの基準軸ベクトルのうち少なくともいずれかの基準軸ベクトルを用いて、前記対象画像に映っている前記対象物のうち長さが未知の線分である計測線分のベクトル値を、計測線分ベクトルとして算出する計測線分ベクトル算出処理と、
前記リファレンス線分の既知の長さと、前記リファレンス線分ベクトル算出処理によって算出された前記リファレンス線分ベクトルと、前記計測線分ベクトル算出処理によって算出された前記計測線分ベクトルとを用いて、前記計測線分の長さを算出する計測線分長算出処理と
をコンピュータに実行させる。
The size estimation program of the present invention is:
A reference representing three reference line segments along the width direction, the height direction, and the depth direction of the target object shown in the target image obtained by imaging the target object from an oblique direction, using two-dimensional coordinate values of the target image. A reference line segment information generation process for generating line segment information;
Based on the reference line segment information generated by the reference line segment information generation process and the imaging parameters of the target image, the width direction, the height direction, and the depth direction of the target object are three-dimensional. A reference axis vector calculation process for calculating three reference axis vectors represented using vector values;
Using the reference axis vector of at least one of the three reference axis vectors calculated by the reference axis vector calculation process, the length of the object shown in the target image is a known line segment A reference line vector calculation process for calculating a reference line vector value as a reference line vector;
It is a line segment whose length is unknown among the objects shown in the target image using at least one of the three reference axis vectors calculated by the reference axis vector calculation process. A measurement line vector calculation process for calculating a vector value of the measurement line segment as a measurement line segment vector;
Using the known length of the reference line segment, the reference line segment vector calculated by the reference line segment vector calculation process, and the measurement line segment vector calculated by the measurement line segment vector calculation process, A computer executes a measurement line segment length calculation process for calculating the length of the measurement line segment.
前記リファレンス線分ベクトル算出処理は、
前記対象画像が撮像された位置を示す座標点Pcから前記リファレンス線分の一方の端点Psへの向きを有する単位ベクトルVsを算出する処理と、
前記座標点Pcから前記リファレンス線分の他方の端点Peへの向きを有する単位ベクトルVeを算出する処理と、
前記単位ベクトルVsと、前記単位ベクトルVeと、前記3つの基準軸ベクトルのうち少なくともいずれかの基準軸ベクトルとを用いて、前記リファレンス線分ベクトルを算出する処理とを含む。
The reference line segment vector calculation process includes:
A process of calculating a unit vector V s having a direction from a coordinate point P c indicating a position where the target image is captured to one end point P s of the reference line segment;
A process of calculating the unit vector V e from the coordinate point P c with the direction of the other end point P e of the reference line,
Processing for calculating the reference line segment vector using the unit vector V s , the unit vector V e, and at least one of the three reference axis vectors.
前記リファレンス線分ベクトル算出処理は、
前記座標点Pcから前記リファレンス線分の前記端点PsへのベクトルVstsを得るための媒介変数tsを、前記3つの基準軸ベクトルのうちいずれかの基準軸ベクトルを用いて算出する処理と、
前記座標点Pcから前記リファレンス線分の前記端点PeへのベクトルVeteを得るための媒介変数teを、前記いずれかの基準軸ベクトルを用いて算出する処理と、
前記ベクトルVstsと前記ベクトルVeteとを用いて、前記リファレンス線分ベクトルを算出する処理とを含む。
The reference line segment vector calculation process includes:
The parametric t s for from the coordinate point P c to obtain a vector V s t s to the end point P s of the reference line segment, calculated by using one of the reference axis vector of the three reference axis vector Processing to
The parametric t e for obtaining the vector V e t e from the coordinate point P c to the end point P e of the reference line, and processing for calculating using said one of the reference axis vector,
Wherein by using the vector V s t s and the vector V e t e, and a process for calculating the reference line segment vector.
前記リファレンス線分ベクトル算出処理は、以下の式(101)を計算して前記リファレンス線分ベクトルLrを算出する処理を含む。 The reference line segment vector calculation process includes a process of calculating the reference line vector L r by calculating the following equation (101).
前記リファレンス線分ベクトル算出処理は、前記3つの基準軸ベクトルの原点P0の座標値を用いると共に基準軸ベクトルOzを前記いずれかの基準軸ベクトルとして用いて以下の式(102)を計算し、前記媒介変数tsと前記媒介変数teとを算出する処理を含む。 The reference line segment vector calculation process uses the coordinate value of the origin P 0 of the three reference axis vectors and calculates the following formula (102) using the reference axis vector Oz as any of the reference axis vectors, A process for calculating the parameter t s and the parameter t te .
前記計測線分ベクトル算出処理は、
前記対象画像が撮像された位置を示す座標点Pcから前記計測線分の一方の端点Pmsへの向きを有する単位ベクトルVmsを算出する処理と、
前記座標点Pcから前記リファレンス線分の他方の端点Pmeへの向きを有する単位ベクトルVmeを算出する処理と、
前記単位ベクトルVmsと、前記単位ベクトルVmeと、前記3つの基準軸ベクトルのうち少なくともいずれかの基準軸ベクトルとを用いて、前記計測線分ベクトルを算出する処理とを含む。
The measurement line segment vector calculation process includes:
A process of calculating a unit vector V ms having a direction from a coordinate point P c indicating a position where the target image is captured to one end point P ms of the measurement line segment;
A process of calculating a unit vector V me having a direction from the coordinate point P c to the other end point P me of the reference line segment;
Processing for calculating the measurement line segment vector using the unit vector V ms , the unit vector V me, and at least one of the three reference axis vectors.
前記計測線分ベクトル算出処理は、
前記座標点Pcから前記計測線分の前記端点PmsへのベクトルVmstmsを得るための媒介変数tmsを、前記3つの基準軸ベクトルのうちいずれかの基準軸ベクトルを用いて算出する処理と、
前記座標点Pcから前記計測線分の前記端点PmeへのベクトルVmetmeを得るための媒介変数tmeを、前記いずれかの基準軸ベクトルを用いて算出する処理と、
前記ベクトルVmstmsと前記ベクトルVmetmeとを用いて、前記リファレンス線分ベクトルを算出する処理とを含む。
The measurement line segment vector calculation process includes:
The parametric t ms for from the coordinate point P c to obtain a vector V ms t ms to the end point P ms of the measurement line segment, calculated by using one of the reference axis vector of the three reference axis vector Processing to
The parametric t me to obtain a vector V me t me from the coordinate point P c to the end point P me of the measurement line segment, the process of calculating using said one of the reference axis vector,
Processing for calculating the reference line segment vector using the vector V ms t ms and the vector V me t me .
前記計測線分ベクトル算出処理は、以下の式(103)を計算して前記計測線分ベクトルLmを算出する処理を含む。 The measurement line segment vector calculation process includes a process of calculating the measurement line segment vector L m by calculating the following equation (103).
前記計測線分ベクトル算出処理は、前記3つの基準軸ベクトルの原点P0の座標値を用いると共に基準軸ベクトルOxを前記いずれかの基準軸ベクトルとして用いて以下の式(104)を計算し、前記媒介変数tmsと前記媒介変数tmeとを算出する処理を含む。 The measurement line segment vector calculation process uses the coordinate value of the origin P 0 of the three reference axis vectors and calculates the following formula (104) using the reference axis vector Ox as any one of the reference axis vectors, A process of calculating the parameter t ms and the parameter t me .
前記計測線分長算出処理は、前記リファレンス線分ベクトルに対する前記計測線分ベクトルの大きさの比率に前記リファレンス線分の既知の長さを乗じた値を前記計測線分の長さとして算出する処理を含む。 In the measurement line segment length calculation process, a value obtained by multiplying a ratio of the magnitude of the measurement line segment vector to the reference line segment vector by a known length of the reference line segment is calculated as the length of the measurement line segment. Includes processing.
前記基準軸ベクトル算出処理は、
前記基準線分情報と前記撮像パラメータとに基づいて、前記対象物の前記幅方向と前記高さ方向と前記奥行き方向とを表す3つの単位ベクトルであって、FPM(First Perspective Moving)座標系またはSPM(Second Perspective Moving)座標系の3つの単位ベクトルを算出する処理と、
FPM座標系またはSPM座標系の前記3つの単位ベクトルを用いて、ワールド座標系の3つのベクトルを前記3つの基準軸ベクトルとして算出する処理とを含む。
The reference axis vector calculation process includes:
Three unit vectors representing the width direction, the height direction, and the depth direction of the object based on the reference line segment information and the imaging parameter, and an FPM (First Perspective Moving) coordinate system or A process of calculating three unit vectors in an SPM (Second Perspective Moving) coordinate system;
Processing using the three unit vectors in the FPM coordinate system or the SPM coordinate system to calculate the three vectors in the world coordinate system as the three reference axis vectors.
本発明の寸法推定方法は、
基準線分情報生成部が、対象物を斜め方向から撮像した対象画像に映っている前記対象物の幅方向と高さ方向と奥行き方向とに沿う3つの基準線分を前記対象画像の二次元の座標値を用いて表す基準線分情報を生成し、
基準軸ベクトル算出部が、前記基準線分情報生成部によって生成された前記基準線分情報と、前記対象画像の撮像パラメータとに基づいて、前記対象物の前記幅方向と前記高さ方向と前記奥行き方向とを三次元のベクトル値を用いて表す3つの基準軸ベクトルを算出し、
リファレンス線分ベクトル算出部が、前記基準軸ベクトル算出部によって算出された前記3つの基準軸ベクトルのうち少なくともいずれかの基準軸ベクトルを用いて、前記対象画像に映っている前記対象物のうち長さが既知の線分であるリファレンス線分のベクトル値を、リファレンス線分ベクトルとして算出し、
計測線分ベクトル算出部が、前記基準軸ベクトル算出部によって算出された前記3つの基準軸ベクトルのうち少なくともいずれかの基準軸ベクトルを用いて、前記対象画像に映っている前記対象物のうち長さが未知の線分である計測線分のベクトル値を、計測線分ベクトルとして算出し、
計測線分長算出部が、前記リファレンス線分の既知の長さと、前記リファレンス線分ベクトル算出部によって算出された前記リファレンス線分ベクトルと、前記計測線分ベクトル算出部によって算出された前記計測線分ベクトルとを用いて、前記計測線分の長さを算出する。
The size estimation method according to the present invention includes:
A reference line segment information generation unit displays three reference line segments along the width direction, the height direction, and the depth direction of the target object that are reflected in the target image obtained by imaging the target object from an oblique direction. Generate the reference line segment information expressed using the coordinate value of
Based on the reference line segment information generated by the reference line segment information generation unit and the imaging parameters of the target image, a reference axis vector calculation unit is configured to calculate the width direction, the height direction, and the height of the target object. Calculate three reference axis vectors that represent the depth direction using three-dimensional vector values,
The reference line vector calculation unit uses a reference axis vector of at least one of the three reference axis vectors calculated by the reference axis vector calculation unit, and uses the longest of the objects shown in the target image. A vector value of a reference line segment whose length is a known line segment is calculated as a reference line segment vector,
The measurement line segment vector calculation unit uses a reference axis vector of at least one of the three reference axis vectors calculated by the reference axis vector calculation unit, and uses the longest of the objects shown in the target image. The vector value of the measurement line segment whose length is unknown is calculated as the measurement line segment vector,
The measurement line segment length calculation unit includes the known length of the reference line segment, the reference line segment vector calculated by the reference line segment vector calculation unit, and the measurement line calculated by the measurement line segment vector calculation unit. The length of the measurement line segment is calculated using the segment vector.
本発明によれば、例えば、対象物を斜め方向から撮像した対象画像を用いて対象物の寸法を正確に計測することができる。 According to the present invention, for example, the size of an object can be accurately measured using an object image obtained by imaging the object from an oblique direction.
実施の形態1.
被写体を斜め方向から撮像した一枚の画像を用いて被写体の寸法を正確に計測する形態について説明する。
A mode in which the size of the subject is accurately measured using a single image obtained by imaging the subject from an oblique direction will be described.
図1は、実施の形態1における画像寸法推定装置100の機能構成図である。
実施の形態1における画像寸法推定装置100の機能構成について、図1に基づいて説明する。
FIG. 1 is a functional configuration diagram of an image
A functional configuration of the image
画像寸法推定装置100(寸法推定装置の一例)は、写真画像表示部110、姿勢基準軸設定部120(基準線分情報生成部の一例)、撮影パラメータ設定部130、基準軸ベクトル推定部140(基準軸ベクトル算出部の一例)、リファレンス設定部150(リファレンス線分ベクトル算出部の一例)、寸法推定部160(計測線分ベクトル算出部、計測線分長算出部の一例)および推定結果出力部170を備える。
また、画像寸法推定装置100は、写真画像データベース180、装置記憶部190および入力機器109を備える。
The image size estimation device 100 (an example of a size estimation device) includes a photographic
The image
写真画像表示部110は、入力機器109を用いて入力される写真画像101をディスプレイに表示する。
姿勢基準軸設定部120は、写真画像101に映っている被写体の姿勢基準軸を写真画像101の二次元の座標値を用いて示す姿勢基準軸データ129を生成する。
撮影パラメータ設定部130は、写真画像101を撮影した際にカメラに設定された撮影パラメータ139を取得する。
基準軸ベクトル推定部140は、姿勢基準軸データ129と撮影パラメータ139とを用いて、写真画像101に映っている被写体の姿勢を表す三次元の基準軸ベクトル149を算出する。
リファレンス設定部150は、基準軸ベクトル149を用いて、写真画像101に映っている被写体のうち長さが既知の線分であるリファレンス線分を表す三次元のリファレンス線分ベクトル159aを算出する。また、リファレンス設定部150は、リファレンス線分の既知の長さとしてリファレンス線分長159bを取得する。
寸法推定部160は、基準軸ベクトル149とリファレンス線分ベクトル159aとリファレンス線分長159bとを用いて、写真画像101に映っている被写体のうち長さが未知の線分である計測線分の長さを示す計測線分長169を算出する。
推定結果出力部170は、計測線分長169を出力する。
The photographic
The posture reference
The shooting
The reference axis
The
The
The estimation
写真画像データベース180は、写真画像101と計測線分長169とを対応付けて記憶するデータベースである。
The
装置記憶部190は、画像寸法推定装置100で使用するデータを記憶する。
例えば、写真画像101、姿勢基準軸データ129、撮影パラメータ139、基準軸ベクトル149、リファレンス線分ベクトル159a、リファレンス線分長159bおよび計測線分長169は、装置記憶部190に記憶されるデータの一例である。
The
For example, the
図2は、実施の形態1における画像寸法推定方法を示すフローチャートである。
実施の形態1における画像寸法推定方法について、図2に基づいて説明する。
FIG. 2 is a flowchart illustrating an image size estimation method according to the first embodiment.
The image size estimation method in
S110において、利用者は、キーボードまたはマウスなどの入力機器109を用いて写真画像101を指定する。
写真画像表示部110は、利用者の指定に従って、CDドライブまたはスキャナなどの入力機器109から写真画像101を取得する。例えば、写真画像表示部110は、CDドライブに挿入されたCD(コンパクトディスク)から写真画像101を読み出す。または、写真画像表示部110は、写真画像101を読み取ったスキャナから写真画像101を受け取る。但し、写真画像表示部110は、CDドライブまたはスキャナ以外の入力機器109から写真画像101を取得しても構わない。
写真画像表示部110は、取得した写真画像101をディスプレイに表示する。
図3は、実施の形態1における写真画像101の一例を示す図である。
図3に示すように、写真画像101は、被写体102を斜めの方向から撮像して得られた画像である。
S110の後、処理はS120に進む。
In S110, the user designates the
The photographic
The photographic
FIG. 3 is a diagram showing an example of the
As shown in FIG. 3, the
After S110, the process proceeds to S120.
S120において、利用者は、入力機器109を用いて、写真画像101に映っている被写体102の姿勢を表す3つの線分を被写体102の姿勢基準軸として指定する。
被写体102の姿勢を表す3つの線分とは、被写体102の幅方向を表す線分と、被写体102の奥行き方向を表す線分と、被写体102の高さ方向を表す線分との3つの線分のことである。
姿勢基準軸設定部120は、指定された姿勢基準軸を写真画像101の二次元の座標値を用いて特定し、姿勢基準軸を表す姿勢基準軸データ129を生成する。写真画像101の二次元の座標値とは、写真画像101の横方向の座標値および写真画像101の縦方向の座標値である。
図4、図5は、実施の形態1における姿勢基準軸[lx,ly,lz]の一例を示す図である。
図4に示すように、利用者は、マウスを操作することによってマウスカーソル109aを移動し、被写体102の高さ方向の辺に沿った線分lxと、被写体102の奥行き方向の辺に沿った線分lyと、被写体102の幅方向の辺に沿った線分lzとを指定する。但し、利用者は、マウス以外の入力機器109(例えば、キーボード)を用いて3つの線分lx、ly、lzを指定しても構わない。
例えば、姿勢基準軸設定部120は、線分lxの両端の二次元の座標値と、線分lyの両端の二次元の座標値と、線分lzの両端の二次元の座標値とを特定し、特定した各座標値を含んだデータを姿勢基準軸データ129として生成する。
利用者は、図4に示すように1点で交わっている3つの線分lx、ly、lzを指定してもよいし、図5に示すように1点で交わっていない3つの線分lx、ly、lzを指定してもよい。
S120の後、処理はS130に進む。
但し、S120はS130の後に実行してもよいし、S130と並行して実行しても構わない。
In S <b> 120, the user uses the
The three line segments representing the posture of the subject 102 are three lines: a line segment representing the width direction of the subject 102, a line segment representing the depth direction of the subject 102, and a line segment representing the height direction of the subject 102. It's a minute.
The posture reference
4 and 5 are diagrams illustrating an example of the posture reference axis [lx, ly, lz] in the first embodiment.
As shown in FIG. 4, the user moves the
For example, the posture reference
The user may specify three line segments lx, ly, and lz that intersect at one point as shown in FIG. 4, or three line segments lx that do not intersect at one point as shown in FIG. , Ly, and lz may be specified.
After S120, the process proceeds to S130.
However, S120 may be executed after S130 or in parallel with S130.
S130において、撮影パラメータ設定部130は、写真画像101を撮像したカメラの焦点距離、CCD(Charge Coupled Device)の縦方向のサイズまたはレンズの縦方向の視野角などを撮影パラメータ139として取得する。CCDはイメージセンサの一例である。
以下、CCDの縦方向のサイズを縦方向CCDサイズという。また、レンズの縦方向の視野角を縦方向視野角という。
図6は、実施の形態1における撮影パラメータ139の関係図である。焦点距離、縦方向CCDサイズおよび縦方向視野角は、図6に示すような関係にある。
撮影パラメータ設定部130は、焦点距離、縦方向CCDサイズまたは縦方向視野角に相当する他の撮影パラメータ139を取得しても構わない。
In S <b> 130, the shooting
Hereinafter, the vertical size of the CCD is referred to as the vertical CCD size. The vertical viewing angle of the lens is referred to as the vertical viewing angle.
FIG. 6 is a relationship diagram of the imaging parameters 139 according to the first embodiment. The focal length, the vertical CCD size, and the vertical viewing angle are in a relationship as shown in FIG.
The shooting
図7は、実施の形態1における撮影パラメータ設定処理(S130)の一例を示すフローチャートである。
実施の形態1における撮影パラメータ設定処理(S130)について、図7に基づいて説明する。
FIG. 7 is a flowchart illustrating an example of the shooting parameter setting process (S130) according to the first embodiment.
The shooting parameter setting process (S130) in the first embodiment will be described with reference to FIG.
S131において、撮影パラメータ設定部130は、撮影パラメータ139に関する付加情報が写真画像101に付加されているか否かを判定する。
例えば、Exif(Exchangeable image file format)は、写真画像101に付加される付加情報の一例である。
写真画像101に付加情報が付加されている場合(YES)、処理はS132に進む。
写真画像101に付加情報が付加されていない場合(NO)、処理はS136aに進む。
In S <b> 131, the shooting
For example, Exif (Exchangeable image file format) is an example of additional information added to the
If additional information is added to the photographic image 101 (YES), the process proceeds to S132.
When additional information is not added to the photographic image 101 (NO), the process proceeds to S136a.
S132において、撮影パラメータ設定部130は、写真画像101の付加情報に焦点距離が含まれているか否かを判定する。
写真画像101の付加情報に焦点距離が含まれている場合(YES)、処理はS133aに進む。
写真画像101の付加情報に焦点距離が含まれていない場合(NO)、処理はS133bに進む。
In S <b> 132, the shooting
When the focal length is included in the additional information of the photographic image 101 (YES), the process proceeds to S133a.
If the additional information of the
S133aにおいて、撮影パラメータ設定部130は、写真画像101の付加情報から焦点距離を取得する。
S133aの後、処理はS134に進む。
In S133a, the shooting
After S133a, the process proceeds to S134.
S133bにおいて、撮影パラメータ設定部130は、焦点距離の入力を要求するメッセージをディスプレイに表示する。
そして、利用者は入力機器109を用いて焦点距離を入力し、撮影パラメータ設定部130は入力された焦点距離を取得する。
S133bの後、処理はS134に進む。
In S133b, the imaging
Then, the user inputs the focal length using the
After S133b, the process proceeds to S134.
S134において、撮影パラメータ設定部130は、写真画像101の付加情報に縦方向CCDサイズが含まれているか否かを判定する。
写真画像101の付加情報に縦方向CCDサイズが含まれている場合(YES)、処理はS135aに進む。
写真画像101の付加情報に縦方向CCDサイズが含まれていない場合(NO)、処理はS135bに進む。
In S <b> 134, the shooting
If the additional information of the
If the additional information of the
S135aにおいて、撮影パラメータ設定部130は、写真画像101の付加情報から縦方向CCDサイズを取得する。
S135aの後、処理はS137に進む。
In S <b> 135 a, the shooting
After S135a, the process proceeds to S137.
S135bにおいて、撮影パラメータ設定部130は、縦方向CCDサイズの入力を要求するメッセージをディスプレイに表示する。
そして、利用者は入力機器109を用いて縦方向CCDサイズを入力し、撮影パラメータ設定部130は入力された縦方向CCDサイズを取得する。
但し、写真画像101の付加情報に焦点距離が含まれる場合、撮影パラメータ設定部130は、焦点距離に基づいて縦方向CCDサイズを算出してもよい。例えば、焦点距離が35mm換算の値である場合、縦方向CCDサイズは35mmである(mm:ミリメートル)。
S135bの後、処理はS137に進む。
In S135b, the shooting
Then, the user inputs the vertical CCD size using the
However, when the additional information of the
After S135b, the process proceeds to S137.
S136aにおいて、撮影パラメータ設定部130は、S135bと同様に、利用者によって入力された縦方向CCDサイズを取得する。
S136aの後、処理はS136bに進む。
In S136a, the imaging
After S136a, the process proceeds to S136b.
S136bにおいて、撮影パラメータ設定部130は、S133bと同様に、利用者によって入力された焦点距離を取得する。
S136bの後、処理はS137に進む。
In S136b, the imaging
After S136b, the process proceeds to S137.
S137において、撮影パラメータ設定部130は、縦方向CCDサイズと焦点距離とを用いて、縦方向視野角を算出する。
例えば、撮影パラメータ設定部130は、以下の式(1)を計算することによって縦方向視野角を算出する。
In S137, the shooting
For example, the imaging
但し、写真画像101の付加情報に縦方向視野角が含まれる場合、撮影パラメータ設定部130は写真画像101の付加情報から縦方向視野角を取得してもよい。また、撮影パラメータ設定部130は、縦方向視野角の入力を要求するメッセージを表示し、利用者によって入力された縦方向視野角を取得してもよい。
S137により、撮影パラメータ設定処理(S130)は終了する。
However, when the additional information of the
By S137, the shooting parameter setting process (S130) ends.
図2に戻り、画像寸法推定方法の説明を続ける。
S130の後、処理はS140に進む。
Returning to FIG. 2, the description of the image size estimation method will be continued.
After S130, the process proceeds to S140.
S140において、基準軸ベクトル推定部140は、S120で生成された姿勢基準軸データ129と、S130で取得された撮影パラメータ139とを用いて、写真画像101に映っている被写体102の姿勢を表す基準軸ベクトル149を算出する。基準軸ベクトル149とは、被写体102の姿勢を表す三次元のベクトル値である。
例えば、基準軸ベクトル推定部140は、非特許文献1に開示されている技術を適用して基準軸ベクトル149を算出する。
非特許文献1の技術を利用する基準軸ベクトル推定処理(S140)については、別途説明する。
S140の後、処理はS150に進む。
In S140, the reference axis
For example, the reference axis
Reference axis vector estimation processing (S140) using the technique of
After S140, the process proceeds to S150.
S150において、リファレンス設定部150は、基準軸ベクトル149を用いて、写真画像101に映っている被写体102のリファレンス線分を表すリファレンス線分ベクトル159aを算出する。リファレンス線分とは、被写体102のうち長さが既知である線分である。例えば、リファレンス線分は利用者によって指定される。
さらに、リファレンス設定部150は、リファレンス線分の長さ(リファレンス線分長159b)を取得する。
In S150, the
Further, the
リファレンス設定部150およびリファレンス設定処理(S150)の詳細について、以下に説明する。
Details of the
図8は、実施の形態1におけるリファレンス設定部150の構成図である。
実施の形態1におけるリファレンス設定部150の構成について、図8に基づいて説明する。
FIG. 8 is a configuration diagram of the
The configuration of the
リファレンス設定部150は、基準軸ベクトル投影部151、リファレンス線分設定部152、リファレンス線分ベクトル算出部153(リファレンス線分ベクトル算出部の一例)およびリファレンス線分長取得部154を備える。
基準軸ベクトル投影部151は、写真画像101に映っている被写体102に基準軸ベクトル149を投影して表示する。
リファレンス線分設定部152は、リファレンス線分の情報を取得し、写真画像101に映っている被写体102にリファレンス線分を描画する。
リファレンス線分ベクトル算出部153は、被写体102に投影された基準軸ベクトル149を用いて、リファレンス線分ベクトル159aを算出する。
リファレンス線分長取得部154は、既知であるリファレンス線分長159bを取得する。
The
The reference axis
The reference line
The reference line segment
The reference line segment
図9は、実施の形態1におけるリファレンス設定処理(S150)を示すフローチャートである。
実施の形態1におけるリファレンス設定処理(S150)について、図9に基づいて説明する。
FIG. 9 is a flowchart showing the reference setting process (S150) in the first embodiment.
The reference setting process (S150) in the first embodiment will be described with reference to FIG.
S151において、基準軸ベクトル投影部151は、写真画像101に映っている被写体102に、基準軸ベクトル149を投影して表示する(図10参照)。
写真画像101への投影とは、三次元の基準軸ベクトル149を写真画像面の二次元のベクトルに変換することである。写真画像面とは、カメラから焦点距離だけ離れた座標点を含んでカメラの視線方向と直交する平面である。また、写真画像面に被写体102を投影した画像が写真画像101に相当する。
例えば、基準軸ベクトル投影部151は、被写体102の3つの線分(姿勢基準軸)の交点、またはいずれかの線分の端点に基準軸ベクトル149を投影する。
以下、基準軸ベクトル149を表す3つのベクトル[Ox,Oy,Oz]のうち2つのベクトル(例えば、OyとOz)が成す平面を「基準平面」という。
また、被写体102のうち大きさが分かっている部分を「リファレンス」という。
図10は、実施の形態1における基準軸ベクトル投影処理(S151)の概要図である。図10の「P0」は基準軸ベクトル149の原点を示している。
S151の後、処理はS152に進む。
In S151, the reference axis
Projection onto the
For example, the reference axis
Hereinafter, a plane formed by two vectors (for example, Oy and Oz) among the three vectors [Ox, Oy, Oz] representing the
A portion of the subject 102 whose size is known is referred to as “reference”.
FIG. 10 is a schematic diagram of the reference axis vector projection process (S151) in the first embodiment. “P 0 ” in FIG. 10 indicates the origin of the
After S151, the process proceeds to S152.
S152において、利用者は、被写体102のうち大きさが分かっているリファレンスに基準軸ベクトル149が投影されているか否かを判定する。
基準軸ベクトル149がリファレンスに投影されている場合(YES)、処理はS156に進む。
基準軸ベクトル149がリファレンスに投影されていない場合、つまり、基準軸ベクトル149がリファレンス以外の部分に投影されている場合(NO)、処理はS153に進む。
In S152, the user determines whether or not the
If the
If the
S153において、利用者は、マウスを操作し、マウスカーソル109aを用いて基準軸ベクトル149を被写体102のリファレンスに移動させる。但し、利用者は、マウス以外の入力機器109(例えば、キーボード)を用いて、基準軸ベクトル149を移動させても構わない。
基準軸ベクトル投影部151は、利用者による基準軸ベクトル149の移動に従って、基準軸ベクトル149を被写体102のリファレンスに投影して表示する。
In step S153, the user operates the mouse to move the
The reference axis
図11は、実施の形態1における基準軸ベクトル移動処理(S153)の概要図である。
例えば、利用者は、図11の(1)(2)に示す手順で、基準軸ベクトル149を被写体102のリファレンスに移動させる。移動前の基準軸ベクトル149を点線で記し、移動後の基準軸ベクトル149を実線で記す。
(1)利用者は、基準平面(Oy−Oz平面)内で基準軸ベクトル149を移動させる。
基準軸ベクトル投影部151は、基準平面内の移動先に基準軸ベクトル149を投影する。
(2)利用者は、基準平面と直交する法線ベクトル(Ox)の方向に基準軸ベクトル149を移動させる。
基準軸ベクトル投影部151は、移動先のリファレンスに基準軸ベクトル149を投影する。
以下、リファレンスに移動後の基準軸ベクトル149が表す基準平面(Oy−Oz平面)を「リファレンス平面」という。
S153(図9)の後、処理はS154に進む。
FIG. 11 is a schematic diagram of the reference axis vector moving process (S153) in the first embodiment.
For example, the user moves the
(1) The user moves the
The reference axis
(2) The user moves the
The reference axis
Hereinafter, the reference plane (Oy-Oz plane) represented by the
After S153 (FIG. 9), the process proceeds to S154.
S154において、利用者は、マウスを操作し、マウスカーソル109aを用いて被写体102のリファレンスにリファレンス線分を指定する。リファレンス線分とは、リファレンスのうち長さが既知である線分である。利用者は、マウス以外の入力機器109を利用してリファレンス線分を指定しても構わない。
リファレンス線分設定部152は、利用者の指定に従ってリファレンス線分を描画する(図12参照)。
図12は、実施の形態1におけるリファレンス線分設定処理(S154)の概要図である。
S154の後、処理はS156に進む。
In step S154, the user operates the mouse and designates a reference line segment as a reference of the subject 102 using the
The reference line
FIG. 12 is a schematic diagram of the reference line segment setting process (S154) in the first embodiment.
After S154, the process proceeds to S156.
S155において、利用者は、S154と同様に、被写体102のリファレンスにリファレンス線分を指定する。
リファレンス線分設定部152は、利用者の指定に従ってリファレンス線分を描画する(図13参照)。
図13は、実施の形態1におけるリファレンス線分設定処理(S155)の概要図である。
S155の後、処理はS156に進む。
In S155, the user designates the reference line segment as the reference of the subject 102, as in S154.
The reference line
FIG. 13 is a schematic diagram of the reference line segment setting process (S155) in the first embodiment.
After S155, the process proceeds to S156.
S156において、リファレンス線分ベクトル算出部153は、基準軸ベクトル149を用いてリファレンス線分ベクトル159aを算出する。
リファレンス線分ベクトル159aは、リファレンス線分を表す三次元のベクトル値である。
In step S156, the reference line segment
The reference
図14は、実施の形態1におけるリファレンス線分ベクトル算出処理(S156)の概要図である。
例えば、リファレンス線分ベクトル算出部153は、図14の(1)(2)に示す手順で、リファレンス線分ベクトルLrを算出する。
(1)リファレンス線分ベクトル算出部153は、写真画像面lv(Ez)内のリファレンス線分の端点Psおよび端点Peの座標値を取得する。
そして、リファレンス線分ベクトル算出部153は、カメラの中心点Pcから端点Psまたは端点Peへの向きを示す単位ベクトルVsおよび単位ベクトルVeを算出する。カメラの中心点Pcは、写真画像101を撮像したときのカメラの位置を示す座標点、つまり、写真画像101が撮像された位置を示す座標点である。
(2)リファレンス線分ベクトル算出部153は、単位ベクトルVsおよび単位ベクトルVeを用いてリファレンス線分ベクトルLrを算出する。
リファレンス線分ベクトルLrは、以下の各式を用いて算出することができる。
FIG. 14 is a schematic diagram of reference line vector calculation processing (S156) in the first embodiment.
For example, the reference line segment
(1) The reference line segment
Then, the reference line
(2) The reference line segment
The reference line segment vector Lr can be calculated using the following equations.
リファレンスが成すリファレンス平面Γrは、以下の式(2)で表すことができる。 The reference plane Γr formed by the reference can be expressed by the following equation (2).
カメラの座標点Pcとリファレンス線分の端点Psとを通る直線lsは、単位ベクトルVsを用いて、以下の式(3s)で表すことができる。
同様に、カメラの座標点Pcとリファレンス線分の端点Peとを通る直線leは、単位ベクトルVeを用いて、以下の式(3e)で表すことができる。
A straight line ls passing through the camera coordinate point Pc and the end point Ps of the reference line segment can be expressed by the following expression (3s) using the unit vector Vs.
Similarly, a straight line le that passes through the coordinate point Pc of the camera and the end point Pe of the reference line segment can be expressed by the following expression (3e) using the unit vector Ve.
上記の直線lsの式(3s)をxyz成分に分解すると以下の式(4s)が得られる。
同様に、上記の直線leの式(3e)をxyz成分に分解すると以下の式(4e)が得られる。
When the formula (3s) of the straight line ls is decomposed into xyz components, the following formula (4s) is obtained.
Similarly, when the above equation (3e) of the straight line le is decomposed into xyz components, the following equation (4e) is obtained.
上記の直線lsの分解式(4s)を上記のリファレンス平面Γrの式(2)に代入して展開すると、以下の式(5s)が得られる。
同様に、直線leの分解式(4e)を上記のリファレンス平面Γrの式(2)に代入して展開すると、以下の式(5e)が得られる。
When the decomposition formula (4s) of the straight line ls is substituted into the formula (2) of the reference plane Γr and expanded, the following formula (5s) is obtained.
Similarly, when the decomposition equation (4e) of the straight line le is substituted into the equation (2) of the reference plane Γr and expanded, the following equation (5e) is obtained.
但し、上記の式(5s)(5e)において、リファレンス平面ΓrがOx−Oy平面でなく、Ox−Oz平面である場合、基準軸ベクトルOz(xoz,yoz,zoz)は基準軸ベクトルOy(xoy,yoy,zoy)に置き換わる。
同様に、リファレンス平面がOy−Oz平面である場合、基準軸ベクトルOz(xoz,yoz,zoz)は基準軸ベクトルOx(xox,yox,zox)に置き換わる。
However, in the above formulas (5s) and (5e), when the reference plane Γr is not the Ox-Oy plane but the Ox-Oz plane, the reference axis vector Oz (x oz , y oz , z oz ) is the reference axis vector. Replaced by Oy (x oy , y oy , z oy ).
Similarly, when the reference plane is the Oy-Oz plane, the reference axis vector Oz (x oz , y oz , z oz ) is replaced with the reference axis vector Ox (x ox , y ox , z ox ).
リファレンス線分ベクトル算出部153は、上記の式(5s)を計算して媒介変数tsを算出し、上記の式(5e)を計算して媒介変数teを算出する。
Reference line
媒介変数tsは端点Psを得るための変数値である。つまり、媒介変数tsはカメラの中心点Pcから端点PsへのベクトルVstsを得るための変数値である。
同様に、媒介変数teは端点Peを得るための変数値である。つまり、媒介変数teはカメラの中心点Pcから端点PeへのベクトルVeteを得るための変数値である。
The parameter t s is a variable value for obtaining the end point Ps. In other words, the parametric t s is a variable value to obtain a vector V s t s from the center point Pc of the camera to the end point Ps.
Similarly, the parametric t e is a variable value to obtain the end point Pe. That is, the parametric variable t e is a variable value for obtaining a vector V e t e from the camera center point Pc to the end point Pe.
リファレンス線分ベクトル算出部153は、媒介変数値tsと媒介変数値teとを以下の式(6)に代入し、リファレンス線分ベクトルLrを算出する。
Reference line
上記のS156により、リファレンス線分ベクトル159a(Lr)が算出される。
S156(図9)の後、処理はS157に進む。
Through S156 described above, the reference
After S156 (FIG. 9), the process proceeds to S157.
S157において、利用者は、入力機器109を用いて、既知であるリファレンス線分長159bを入力する。
リファレンス線分長取得部154は、入力されたリファレンス線分長159bを取得する。
S157の後、リファレンス設定処理(S150)は終了する。
In S157, the user inputs a known
The reference line segment
After S157, the reference setting process (S150) ends.
図2に戻り、画像寸法推定方法の説明を続ける。
リファレンス設定処理(S150)の後、処理はS160に進む。
Returning to FIG. 2, the description of the image size estimation method will be continued.
After the reference setting process (S150), the process proceeds to S160.
S160において、寸法推定部160は、リファレンス設定処理(S150)と同様に、基準軸ベクトル149を用いて計測線分ベクトルを算出する。
そして、寸法推定部160は、計測線分ベクトルと、リファレンス線分ベクトル159aと、リファレンス線分長159bとを用いて、計測線分長169を算出する。
計測線分ベクトルとは、計測線分を表す三次元のベクトル値である。計測線分とは、被写体102のうち長さが未知である線分、つまり、計測する対象部分の線分である。例えば、計測線分は利用者によって指定される。
In S160, the
Then, the
The measurement line segment vector is a three-dimensional vector value representing the measurement line segment. The measurement line segment is a line segment of the subject 102 whose length is unknown, that is, a line segment of a target portion to be measured. For example, the measurement line segment is specified by the user.
寸法推定部160および寸法推定処理(S160)の詳細について、以下に説明する。
Details of the
図15は、実施の形態1における寸法推定部160の構成図である。
実施の形態1における寸法推定部160の構成について、図15に基づいて説明する。
FIG. 15 is a configuration diagram of the
The configuration of the
寸法推定部160は、基準軸ベクトル投影部161、計測線分設定部162、計測線分ベクトル算出部163(計測線分ベクトル算出部の一例)および計測線分長算出部164(計測線分長算出部の一例)を備える。
基準軸ベクトル投影部161は、写真画像101に映っている被写体102に基準軸ベクトル149を投影して表示する。
計測線分設定部162は、計測線分の情報を取得し、写真画像101に映っている被写体102に計測線分を描画する。
計測線分ベクトル算出部163は、被写体102に投影された基準軸ベクトル149を用いて、計測線分ベクトルを算出する。
計測線分長算出部164は、計測線分ベクトルと、リファレンス線分ベクトル159aと、リファレンス線分長159bとを用いて、計測線分長169を算出する。
The
The reference axis
The measurement line
The measurement line
The measurement line segment
図16は、実施の形態1における寸法推定処理(S160)を示すフローチャートである。
実施の形態1における寸法推定処理(S160)について、図16に基づいて説明する。
FIG. 16 is a flowchart showing the dimension estimation process (S160) in the first embodiment.
The dimension estimation process (S160) in
寸法推定処理(S160)のS161からS166は、リファレンス設定処理(S150)(図9参照)のS151からS156と同様である。
つまり、S151からS156の「リファレンス」を「計測部分」に置き換え、「リファレンス平面」を「計測平面」に置き換え、「リファレンス線分」を「計測線分」に置き換えた処理がS161からS166である。
Steps S161 to S166 in the dimension estimation process (S160) are the same as steps S151 to S156 in the reference setting process (S150) (see FIG. 9).
That is, the processing in which “reference” in S151 to S156 is replaced with “measurement part”, “reference plane” is replaced with “measurement plane”, and “reference line segment” is replaced with “measurement line segment” is S161 to S166. .
図17は、実施の形態1におけるS161からS165の概要図である。
S161からS165の処理概要を図17に示す。図17はS151からS155の概要図(図11から図13)に相当する。
基準軸ベクトル投影部161は、写真画像101に映っている被写体102に基準軸ベクトル149を投影して表示する(S161)。
基準軸ベクトル149が被写体102の計測部分に投影されていない場合(S162:YES)、基準軸ベクトル投影部161は、基準軸ベクトル149を被写体102の計測部分に移動する(S163)。
計測線分設定部162は、利用者の指定に従って計測線分を描画する(S164、S165)。
FIG. 17 is a schematic diagram of S161 to S165 in the first embodiment.
FIG. 17 shows an outline of processing from S161 to S165. FIG. 17 corresponds to a schematic diagram (FIGS. 11 to 13) of S151 to S155.
The reference axis
When the
The measurement line
図18は、実施の形態1におけるS166の概要図である。
S166の処理概要を図18に示す。図18はS156の概要図(図14)に相当する。
計測線分ベクトル算出部163は、計測部分に投影された基準軸ベクトル149を用いて、計測線分ベクトルLmを算出する(S166)。
FIG. 18 is a schematic diagram of S166 in the first embodiment.
FIG. 18 shows an outline of the processing in S166. FIG. 18 corresponds to a schematic diagram (FIG. 14) of S156.
The measurement line segment
つまり、計測線分ベクトル算出部163は、カメラの中心点Pcから計測線分の端点Pmsへの単位ベクトルVmsと、カメラの中心点Pcから計測線分の端点Pmeへの単位ベクトルVmeとを算出する。
また、計測線分ベクトル算出部163は、以下の式(7s)を計算して媒介変数tmsを算出し、以下の式(7e)を計算して媒介変数tmeを算出する。
そして、計測線分ベクトル算出部163は、媒介変数tmsと媒介変数tmeとを用いて以下の式(7m)を計算し、計測線分ベクトルLmを算出する。
That is, the measurement line
Also, measurement line segment
Then, the measurement line
但し、上記の式(7s)(7e)において、計測平面ΓmがOy−Oz平面でなく、Ox−Oz平面である場合、基準軸ベクトルOx(xox,yox,zox)は基準軸ベクトルOy(xoy,yoy,zoy)に置き換わる。
同様に、リファレンス平面がOx−Oy平面である場合、基準軸ベクトルOx(xox,yox,zox)は基準軸ベクトルOz(xoz,yoz,zoz)に置き換わる。
However, in the above formulas (7s) and (7e), when the measurement plane Γm is not the Oy-Oz plane but the Ox-Oz plane, the reference axis vector Ox (x ox , y ox , z ox ) is the reference axis vector. Replaced by Oy (x oy , y oy , z oy ).
Similarly, when the reference plane is the Ox-Oy plane, the reference axis vector Ox (x ox , y ox , z ox ) is replaced with the reference axis vector Oz (x oz , y oz , z oz ).
媒介変数tmsは端点Pmsを得るための変数値である。つまり、媒介変数tmsはカメラの中心点Pcから端点PmsへのベクトルVmstmsを得るための変数値である。
同様に、媒介変数tmeは端点Pmeを得るための変数値である。つまり、媒介変数tmeはカメラの中心点Pcから端点PmeへのベクトルVmetmeを得るための変数値である。
The parameter t ms is a variable value for obtaining the end point Pms. That is, the parameter t ms is a variable value for obtaining a vector V ms t ms from the camera center point Pc to the end point Pms.
Similarly, the parameter t me is a variable value for obtaining the end point Pme. That is, the parameter t me is a variable value for obtaining a vector V me t me from the camera center point Pc to the end point Pme.
S167(図16参照)において、計測線分長算出部164は、S166で算出した計測線分ベクトルと、リファレンス設定部150によって算出されたリファレンス線分ベクトル159aと、リファレンス設定部150によって取得されたリファレンス線分長159bとを用いて、計測線分長169を算出する。
In S167 (see FIG. 16), the measurement line segment
以下に、計測線分長lm_trueを算出するための式(8)を示す。
以下の式(8)において、「Lm」は計測線分ベクトルであり、「Lr」はリファレンス線分ベクトル159aであり、「lr_true」はリファレンス線分長159bである。
In the following, equation (8) for calculating the measurement line segment length l m_true is shown.
In the following equation (8), “Lm” is a measurement line segment vector, “Lr” is a reference
つまり、計測線分長算出部164は、リファレンス線分ベクトルに対する計測線分ベクトルの大きさの比率をリファレンス線分長に乗じた値を計測線分長169として算出する。
S167の後、寸法推定処理(S160)は終了する。
That is, the measurement line segment
After S167, the dimension estimation process (S160) ends.
図2に戻り、画像寸法推定方法の説明を続ける。
寸法推定処理(S160)の後、処理はS170に進む。
Returning to FIG. 2, the description of the image size estimation method will be continued.
After the dimension estimation process (S160), the process proceeds to S170.
S170において、推定結果出力部170は、S160で算出された計測線分長169を出力する。
例えば、推定結果出力部170は、計測線分長169をディスプレイ911に表示する。
また、推定結果出力部170は、計測線分長169と写真画像101(計測線分または計測線分ベクトルなどの情報を含む)とを対応付けて写真画像データベース180に記憶する。
計測部分は新たなリファレンスとして利用することができ、計測線分長169は新たな既知のリファレンス線分長として利用することができる。
In S170, the estimation
For example, the estimation
Further, the estimation
The measurement part can be used as a new reference, and the measurement
次に、非特許文献1の技術を利用する基準軸ベクトル推定処理(S140)について説明する。
Next, reference axis vector estimation processing (S140) using the technique of
図19は、実施の形態1における基準軸ベクトル推定処理(S140)を示すフローチャートである。
実施の形態1における基準軸ベクトル推定処理(S140)について、図19に基づいて説明する。
FIG. 19 is a flowchart showing the reference axis vector estimation process (S140) in the first embodiment.
The reference axis vector estimation process (S140) in the first embodiment will be described with reference to FIG.
S141において、基準軸ベクトル推定部140は、姿勢基準軸データ129に基づいて、被写体102の姿勢基準軸[lx,ly,lz]が図4のように一点で交わっているか、または図5のように一点で交わっていないか判定する。
姿勢基準軸[lx,ly,lz]が一点で交わる場合(YES)、処理はS142に進む。
姿勢基準軸[lx,ly,lz]が一点で交わらない場合(NO)、処理はS143に進む。
In S141, the reference axis
If the posture reference axes [lx, ly, lz] intersect at one point (YES), the process proceeds to S142.
If the posture reference axes [lx, ly, lz] do not intersect at one point (NO), the process proceeds to S143.
S142において、基準軸ベクトル推定部140は、非特許文献1で定義されたFPM座標系を用いて基準軸ベクトル149を算出する。
FPMはFirst Perspective Movingの略である。
基準軸ベクトル算出処理[FPM座標系](S142)の詳細については別途説明する。
S142の後、基準軸ベクトル推定処理(S140)は終了する。
In S142, the reference axis
FPM is an abbreviation for First Perspective Moving.
Details of the reference axis vector calculation process [FPM coordinate system] (S142) will be described separately.
After S142, the reference axis vector estimation process (S140) ends.
S143において、基準軸ベクトル推定部140は、非特許文献1で定義されたSPM座標系を用いて基準軸ベクトル149を算出する。
SPMはSecond Perspective Movingの略である。
基準軸ベクトル推定処理[SPM座標系](S143)の詳細については別途説明する。
S143の後、基準軸ベクトル推定処理(S140)は終了する。
In S143, the reference axis
SPM is an abbreviation for Second Perspective Moving.
Details of the reference axis vector estimation process [SPM coordinate system] (S143) will be described separately.
After S143, the reference axis vector estimation process (S140) ends.
図20は、実施の形態1における基準軸ベクトル算出処理[FPM座標系](S142)を示すフローチャートである。
FPM座標系を用いる基準軸ベクトル算出処理(S142)について、図20に基づいて説明する。
FIG. 20 is a flowchart showing the reference axis vector calculation process [FPM coordinate system] (S142) in the first embodiment.
The reference axis vector calculation process (S142) using the FPM coordinate system will be described with reference to FIG.
S142Aにおいて、基準軸ベクトル推定部140は、カメラの中心点Pcから写真画像面lv(Ez)内の姿勢基準軸[lx,ly,lz]の端点への単位ベクトル[Ex,Ey,Ez]を算出する(図21参照)。
以下、単位ベクトル[Ex,Ey,Ez]を「端点単位ベクトル」という。
図21は、実施の形態1における端点単位ベクトル算出処理(S142A)の概要図である。
S142Aの後、処理はS142Bに進む。
In S142A, the reference axis
Hereinafter, the unit vector [Ex, Ey, Ez] is referred to as an “endpoint unit vector”.
FIG. 21 is a schematic diagram of endpoint unit vector calculation processing (S142A) in the first embodiment.
After S142A, the process proceeds to S142B.
S142Bにおいて、基準軸ベクトル推定部140は、カメラの中心点Pcから写真画像面lv(Ez)内の姿勢基準軸の交点l0への単位ベクトルEcを算出する(図22参照)。
以下、単位ベクトルEcを「交点単位ベクトル」という。
図22は、実施の形態1における交点単位ベクトル算出処理(S142B)の概要図である。
S142Bの後、処理はS142Cに進む。
In S142b, the reference axis
Hereinafter, the unit vector Ec is referred to as “intersection unit vector”.
FIG. 22 is a schematic diagram of the intersection unit vector calculation process (S142B) in the first embodiment.
After S142B, the process proceeds to S142C.
S142Cにおいて、基準軸ベクトル推定部140は、カメラの中心点Pcから交点単位ベクトルEcの方向に焦点距離fだけ離れた座標点Pfを算出する(図23の(1)参照)。
基準軸ベクトル推定部140は、座標点Pfを含んで交点単位ベクトルEcと直交する平面lv(Ec)を算出する(図23の(2)参照)。つまり、交点単位ベクトルEcは平面lv(Ec)の法線ベクトルになる。
以下、平面lv(Ec)を「FPM座標面」という。また、座標点Pfを「FPM座標原点」という。
図23は、実施の形態1におけるFPM座標面算出処理(S142C)の概要図である。
S142Cの後、処理はS142Dに進む。
In S142C, the reference axis
The reference axis
Hereinafter, the plane lv (Ec) is referred to as “FPM coordinate plane”. Further, the coordinate point Pf is referred to as “FPM coordinate origin”.
FIG. 23 is a schematic diagram of FPM coordinate plane calculation processing (S142C) in the first embodiment.
After S142C, the process proceeds to S142D.
S142Dにおいて、基準軸ベクトル推定部140は、端点単位ベクトル[Ex,Ey,Ez]を含んだ直線とFPM座標面lv(Ec)との交点[Px’,Py’,Pz’]を算出する(図24の(1)参照)。
基準軸ベクトル推定部140は、FPM座標原点Pfから交点[Px’,Py’,Pz’]へのベクトル[Gx,Gy,Gz]を算出する(図24の(2)参照)。
以下、ベクトル[Gx,Gy,Gz]を「FPM座標面ベクトル」という。
図24は、実施の形態1におけるFPM座標面ベクトル算出処理(S142D)の概要図である。
S142Dの後、処理はS142Eに進む。
In S142D, the reference axis
The reference axis
Hereinafter, the vector [Gx, Gy, Gz] is referred to as “FPM coordinate plane vector”.
FIG. 24 is a schematic diagram of FPM coordinate plane vector calculation processing (S142D) in the first embodiment.
After S142D, the process proceeds to S142E.
S142Eにおいて、基準軸ベクトル推定部140は、FPM座標面ベクトル[Gx,Gy,Gz]のいずれかのベクトル(例えば、Gx)を選択する。
基準軸ベクトル推定部140は、選択したFPM座標面ベクトル(Gx)の単位ベクトルEa(=Gx/|Gx|)を算出する(図25参照)。
基準軸ベクトル推定部140は、交点単位ベクトルEcと単位ベクトルEaとの外積ベクトルEb(=Ec×Ea)を算出する(図25参照)。
単位べクトルEaはFPM座標系のA軸の単位ベクトルであり、外積ベクトルEbはFPM座標系のB軸の単位ベクトルであり、交点単位ベクトルEcはFPM座標系のC軸の単位ベクトルである。単位ベクトル[Ea,Eb,Ec]は「正規直交基底」ともいう。
図25は、実施の形態1におけるFPM座標系の単位ベクトル算出処理(S142E)の概要図である。
S142Eの後、処理はS142Fに進む。
In S142E, the reference axis
The reference axis
The reference axis
The unit vector Ea is the A-axis unit vector of the FPM coordinate system, the outer product vector Eb is the B-axis unit vector of the FPM coordinate system, and the intersection unit vector Ec is the C-axis unit vector of the FPM coordinate system. The unit vector [Ea, Eb, Ec] is also called “orthogonal basis”.
FIG. 25 is a schematic diagram of unit vector calculation processing (S142E) of the FPM coordinate system in the first embodiment.
After S142E, the process proceeds to S142F.
S142Fにおいて、基準軸ベクトル推定部140は、FPM座標面ベクトル[Gx,Gy,Gz]を用いて、被写体座標系の基準軸ベクトル[E1,E2,E3]を算出する。
被写体座標系とは被写体102に設定したローカル座標系である。また、基準軸ベクトル[E1,E2,E3]は、被写体座標系の単位ベクトル(正規直交基底)である。
図26は、実施の形態1における被写体座標系の基準軸ベクトルの関係図である。
図26において、GzとGyとが成す見かけの角度Δβ、GxとGyとが成す見かけの角度β2およびGxとGzとが成す見かけの角度β1は、以下の式(11)で表すことができる。
In S142F, the reference axis
The subject coordinate system is a local coordinate system set for the subject 102. The reference axis vector [E1, E2, E3] is a unit vector (normal orthogonal basis) of the subject coordinate system.
FIG. 26 is a relationship diagram of reference axis vectors of the subject coordinate system in the first embodiment.
In Figure 26, the angle Δβ apparent formed by the Gz and Gy, the angle beta 1 apparent formed by the angle beta 2 and Gx and Gz apparent formed by the Gx and Gy are be represented by the following formula (11) it can.
さらに、E1とE2とが成す実際の角度ΔαのtanΔαは、E3とFPM座標系のC軸とが成す角度ψとを用いて、以下の式(12)で表すことができる。 Furthermore, tan Δα of the actual angle Δα formed by E1 and E2 can be expressed by the following formula (12) using the angle ψ formed by E3 and the C axis of the FPM coordinate system.
ここで、被写体102の基準軸ベクトル[E1,E2]が成す角度Δαは90度であるから、上記の式(12)は、以下の式(13)に展開することができる。 Here, since the angle Δα formed by the reference axis vector [E1, E2] of the subject 102 is 90 degrees, the above equation (12) can be expanded into the following equation (13).
そして、被写体座標系の基準軸ベクトル[E1,E2,E3]は、上記の式(11)と式(13)との関係により、以下の式(14)で表すことができる。
以下の式(14)において、α1はE3とE1とが成す実際の角度であり、α2はE3とE2とが成す実際の角度である。
The reference axis vector [E1, E2, E3] of the subject coordinate system can be expressed by the following equation (14) based on the relationship between the above equations (11) and (13).
In the following formula (14), α 1 is an actual angle formed by E3 and E1, and α 2 is an actual angle formed by E3 and E2.
S142F(図20)の後、処理はS142Gに進む。 After S142F (FIG. 20), the process proceeds to S142G.
S142Gにおいて、基準軸ベクトル推定部140は、被写体座標系の基準軸ベクトル[E1,E2,E3]をワールド座標系の基準軸ベクトル[Ox,Oy,Oz]に変換するための変換行列Mhを算出する。変換行列Mhは以下の式(15)を用いて表すことができる。
In S142G, the reference axis
上記の式(15)で用いている符号の意味は以下の通りである。
(xEa,yEa,zEa)は、FPM座標系のA軸の単位ベクトルEa(図25参照)をワールド座標系で表したベクトル値である。
(xEb,yEb,zEb)は、FPM座標系のB軸の単位ベクトルEb(図25参照)をワールド座標系で表したベクトル値である。
(xEc,yEc,zEc)は、FPM座標系のC軸の単位ベクトルEc(図25参照)をワールド座標系で表したベクトル値である。
(aE1,bE1,cE1)は、被写体座標系の基準軸ベクトルE1(図26参照)をFPM座標系で表したベクトル値である。
(aE2,bE2,cE2)は、被写体座標系の基準軸ベクトルE2(図26参照)をFPM座標系で表したベクトル値である。
(aE3,bE3,cE3)は、被写体座標系の基準軸ベクトルE3(図26参照)をFPM座標系で表したベクトル値である。
The meanings of the symbols used in the above equation (15) are as follows.
( XEa , yEa , zEa ) is a vector value representing the A-axis unit vector Ea (see FIG. 25) of the FPM coordinate system in the world coordinate system.
(X Eb , y Eb , z Eb ) is a vector value representing the B-axis unit vector Eb (see FIG. 25) of the FPM coordinate system in the world coordinate system.
(X Ec , y Ec , z Ec ) is a vector value representing the C-axis unit vector Ec (see FIG. 25) of the FPM coordinate system in the world coordinate system.
(A E1 , b E1 , c E1 ) are vector values representing the reference axis vector E1 (see FIG. 26) of the subject coordinate system in the FPM coordinate system.
(A E2 , b E2 , c E2 ) are vector values representing the reference axis vector E2 (see FIG. 26) of the subject coordinate system in the FPM coordinate system.
(A E3 , b E3 , c E3 ) are vector values representing the reference axis vector E3 (see FIG. 26) of the subject coordinate system in the FPM coordinate system.
そして、基準軸ベクトル推定部140は、上記の変換行列Hhを用いて、被写体座標系の基準軸ベクトル[E1,E2,E3]をワールド座標系の基準軸ベクトル[Ox,Oy,Oz]に変換し、ワールド座標系の基準軸ベクトル[Ox,Oy,Oz]を被写体102の基準軸ベクトル149として出力する。
以下に、被写体座標系の基準軸ベクトル[E1,E2,E3]をワールド座標系の基準軸ベクトル[Ox,Oy,Oz]に変換するための式(16)を示す。
Then, the reference axis
Equation (16) for converting the reference axis vector [E1, E2, E3] of the subject coordinate system into the reference axis vector [O x , O y , O z ] of the world coordinate system is shown below.
S142Gにより、基準軸ベクトル算出処理[FPM座標系](S142)は終了する。 With S142G, the reference axis vector calculation process [FPM coordinate system] (S142) ends.
図27は、実施の形態1における基準軸ベクトル算出処理[SPM座標系](S143)を示すフローチャートである。
SPM座標系を用いる基準軸ベクトル算出処理(S143)について、図27に基づいて説明する。
FIG. 27 is a flowchart showing a reference axis vector calculation process [SPM coordinate system] (S143) in the first embodiment.
The reference axis vector calculation process (S143) using the SPM coordinate system will be described with reference to FIG.
S143Aにおいて、基準軸ベクトル推定部140は、写真画像面lv(Ez)内の姿勢基準軸[lx,ly,lz]から2つの姿勢基準軸(例えば、lxとly)を選択する。
基準軸ベクトル推定部140は、選択した2つの姿勢基準軸(lx,ly)の延長上の交点Pxyを算出する(図28の(1)参照)。
基準軸ベクトル推定部140は、カメラの中心点Pcから交点Pxyへの単位ベクトルExyを算出する(図28の(2)参照)。以下、単位ベクトルExyを「交点単位ベクトル」という。
図28は、実施の形態1における交点単位ベクトル算出処理(S143A)の概要図である。
S143Aの後、処理はS143Bに進む。
In S143A, the reference axis
The reference axis
The reference axis
FIG. 28 is a schematic diagram of the intersection unit vector calculation process (S143A) in the first embodiment.
After S143A, the process proceeds to S143B.
S143Bにおいて、基準軸ベクトル推定部140は、カメラの中心点Pcから交点単位ベクトルExyの方向に焦点距離fだけ離れた座標点Pfを算出する(図29の(1)参照)。
基準軸ベクトル推定部140は、座標点Pfを含んで交点単位ベクトルExyと直交する平面lv(Ec)を算出する(図29の(2)参照)。つまり、交点単位ベクトルExyは平面lv(Ec)の法線ベクトルになる。
以下、平面lv(Ec)を「SPM座標面」という。また、座標点Pfを「SPM座標原点」という。
図29は、実施の形態1におけるSPM座標面算出処理(S143B)の概要図である。
S143Bの後、処理はS143Cに進む。
In S143B, the reference axis
The reference axis
Hereinafter, the plane lv (Ec) is referred to as “SPM coordinate plane”. The coordinate point Pf is referred to as “SPM coordinate origin”.
FIG. 29 is a schematic diagram of the SPM coordinate plane calculation process (S143B) in the first embodiment.
After S143B, the process proceeds to S143C.
S143Cにおいて、基準軸ベクトル推定部140は、姿勢基準軸[lx,ly,lz]を写真画像面lv(Ez)からSPM座標面lv(Ec)に投影する(図30参照)。
以下、SPM座標面lv(Ec)に投影した姿勢基準軸を[lx’,ly’,lz’]と記す。
図30は、実施の形態1における姿勢基準軸投影処理(S143C)の概要図である。
S143Cの後、処理はS143Dに進む。
In S143C, the reference axis
Hereinafter, the attitude reference axis projected onto the SPM coordinate plane lv (Ec) is denoted as [lx ′, ly ′, lz ′].
FIG. 30 is a schematic diagram of posture reference axis projection processing (S143C) in the first embodiment.
After S143C, the process proceeds to S143D.
S143Dにおいて、基準軸ベクトル推定部140は、SPM座標面lv(Ec)に投影した姿勢基準軸[lx’,ly’,lz’]のうち、S143Aで選択した姿勢基準軸(lx,ly)を投影後の姿勢基準軸(lx’,ly’)を選択する。
基準軸ベクトル推定部140は、選択した姿勢基準軸(lx’,ly’)が成す角の二等分線をSPM座標系のS軸に決定する(図31の(1)参照)。
さらに、基準軸ベクトル推定部140は、SPM座標面lv(Ec)の法線ベクトルExyをSPM座標面のC軸に決定し、S軸とC軸とに直交する軸をSPM座標系のT軸に決定する(図31の(1)参照)。
そして、基準軸ベクトル推定部140は、SPM座標系のS軸の単位ベクトルEsと、T軸の単位ベクトルEtと、C軸の単位ベクトルEcとを算出する(図31の(2)参照)。
図31は、実施の形態1におけるSPM座標系の単位ベクトル算出処理(S143D)の概要図である。
In S143D, the reference axis
The reference axis
Further, the reference axis
Then, the reference axis
FIG. 31 is a schematic diagram of unit vector calculation processing (S143D) of the SPM coordinate system in the first embodiment.
以下に、SPM座標系の単位ベクトル[Es,Et,Ec]を算出する式(21)を示す。
以下の式(21)で用いている「Gx’」は姿勢基準軸lx’と同じ向きを有する単位ベクトルである。また、「Gy’」は姿勢基準軸ly’と同じ向きを有する単位ベクトルである。
Below, the equation (21) for calculating the unit vector [Es, Et, Ec] of the SPM coordinate system is shown.
“Gx ′” used in the following equation (21) is a unit vector having the same direction as the posture reference axis lx ′. “Gy ′” is a unit vector having the same direction as the orientation reference axis ly ′.
S143Dの後、処理はS143Eに進む。 After S143D, the process proceeds to S143E.
S143Eにおいて、基準軸ベクトル推定部140は、以下のように、SPM座標面内の姿勢基準軸[lx’,ly’,lz’]を用いて被写体座標系の基準軸ベクトル[E1,E2,E3]を算出する。
被写体座標系とは被写体102に設定したローカル座標系である。また、基準軸ベクトル[E1,E2,E3]は、被写体座標系の単位ベクトル(正規直交基底)である。
In S143E, the reference axis
The subject coordinate system is a local coordinate system set for the subject 102. The reference axis vector [E1, E2, E3] is a unit vector (normal orthogonal basis) of the subject coordinate system.
図32は、実施の形態1におけるSPM座標面内の姿勢基準軸の関係図である。
図32に示すPAT曲線は非特許文献1で定義されている曲線である。PATはPerspective Angle Transformの略である。
PAT曲線は、lx’とly’とが成す角度Δβと焦点距離fとを用いて、以下の式(22)で表すことができる。
FIG. 32 is a relationship diagram of attitude reference axes in the SPM coordinate plane according to the first embodiment.
The PAT curve shown in FIG. 32 is a curve defined in
The PAT curve can be expressed by the following equation (22) using the angle Δβ formed by lx ′ and ly ′ and the focal length f.
また、lz’を含んだ直線の式は、変数γおよび変数δを用いて以下の式(23)で表すことができる。 A straight line expression including lz ′ can be expressed by the following expression (23) using the variable γ and the variable δ.
PAT曲線と直線lz’との交点P1の極座標値は、上記の式(22)と上記の式(23)とを用いて、以下の式(24)で算出することができる。 The polar coordinate value of the intersection P1 between the PAT curve and the straight line lz ′ can be calculated by the following formula (24) using the above formula (22) and the above formula (23).
また、PAT曲線と直線lz’との交点P1の極座標値は、PfからP1までの直線の長さaと、PfからP1までの直線とS軸とが成す角度ηとを用いて、(acosη,asinη)で表すことができる。 The polar coordinate value of the intersection point P1 between the PAT curve and the straight line lz ′ is expressed as (cos η) using the length a of the straight line from Pf to P1 and the angle η formed by the straight line from Pf to P1 and the S axis. , Asin η).
ここで、被写体座標系の基準軸ベクトル[E1,E2,E3]は、以下の式(25)で表すことができる。 Here, the reference axis vector [E1, E2, E3] of the subject coordinate system can be expressed by the following equation (25).
基準軸ベクトル推定部140は、上記の式(25)を計算することにより、被写体座標系の基準軸ベクトル[E1,E2,E3]を算出する。
S143E(図27)の後、処理はS143Fに進む。
The reference axis
After S143E (FIG. 27), the process proceeds to S143F.
S143Fにおいて、基準軸ベクトル推定部140は、写真画像面lv(Ez)から基準点l0を選択する。例えば、基準軸ベクトル推定部140は、姿勢基準軸lxの端点を基準点l0として選択する(図33の(1)参照)。
基準軸ベクトル推定部140は、カメラの中心点Pcから基準点l0への単位ベクトルE0を算出する(図33の(2)参照)。
基準軸ベクトル推定部140は、単位ベクトルE0を用いて、カメラの中心点Pcから基準点l0への方向に焦点距離fだけ離れた座標点P0を算出する(図33の(2)参照)。
以下、座標点P0を「基準原点」という。
図33は、実施の形態1における基準原点算出処理(S143F)の概要図である。
S143Fの後、処理はS143Gに進む。
In S143F, the reference axis
The reference axis
Reference axis
Hereinafter, the coordinate point P 0 is referred to as “reference origin”.
FIG. 33 is a schematic diagram of the reference origin calculation process (S143F) in the first embodiment.
After S143F, the process proceeds to S143G.
S143Gにおいて、基準軸ベクトル推定部140は、被写体座標系の基準軸ベクトル[E1,E2,E3]をワールド座標系の基準軸ベクトル[Ox,Oy,Oz]に変換するための変換行列Mhを算出する。変換行列Mhは以下の式(26)で表すことができる。
In S143G, the reference axis
上記の式(26)で用いている符号の意味は以下の通りである。
(xp0,yp0,zp0)は、基準原点P0(図33の(2)参照)をワールド座標系(x,y,z)で表した座標値である。
(xEs,yEs,zEs)は、SPM座標系のS軸の単位ベクトルEs(図31の(2)参照)をワールド座標系で表したベクトル値である。
(xEt,yEt,zEt)は、FPM座標系のT軸の単位ベクトルEt(図31の(2)参照)をワールド座標系で表したベクトル値である。
(xEc,yEc,zEc)は、FPM座標系のC軸の単位ベクトルEc(=Exy)をワールド座標系で表したベクトル値である。
(aE1,bE1,cE1)は、被写体座標系の基準軸ベクトルE1(式(25)参照)をFPM座標系で表したベクトル値である。
(aE2,bE2,cE2)は、被写体座標系の基準軸ベクトルE2(式(25)参照)をFPM座標系で表したベクトル値である。
(aE3,bE3,cE3)は、被写体座標系の基準軸ベクトルE3(式(25)参照)をFPM座標系で表したベクトル値である。
The meanings of the symbols used in the above equation (26) are as follows.
(X p0 , y p0 , z p0 ) is a coordinate value representing the reference origin P 0 (see (2) in FIG. 33) in the world coordinate system (x, y, z).
(X Es , y Es , z Es ) is a vector value representing the S-axis unit vector Es (see (2) in FIG. 31) of the SPM coordinate system in the world coordinate system.
(X Et , y Et , z Et ) is a vector value representing the T-axis unit vector Et (see (2) in FIG. 31) of the FPM coordinate system in the world coordinate system.
(X Ec , y Ec , z Ec ) is a vector value representing the C-axis unit vector Ec (= Exy) in the FPM coordinate system in the world coordinate system.
(A E1 , b E1 , c E1 ) is a vector value representing the reference axis vector E1 (see Expression (25)) of the subject coordinate system in the FPM coordinate system.
(A E2 , b E2 , c E2 ) is a vector value representing the reference axis vector E2 (see Expression (25)) of the subject coordinate system in the FPM coordinate system.
(A E3 , b E3 , c E3 ) is a vector value representing the reference axis vector E3 (see Expression (25)) of the subject coordinate system in the FPM coordinate system.
そして、基準軸ベクトル推定部140は、上記の変換行列Hhを用いて、被写体座標系の基準軸ベクトル[E1,E2,E3]をワールド座標系の基準軸ベクトル[Ox,Oy,Oz]に変換し、ワールド座標系の基準軸ベクトル[Ox,Oy,Oz]を被写体102の基準軸ベクトル149として出力する。
以下に、被写体座標系の基準軸ベクトル[E1,E2,E3]をワールド座標系の基準軸ベクトル[Ox,Oy,Oz]に変換するための式(27)を示す。
Then, the reference axis
Equation (27) for converting the reference axis vector [E1, E2, E3] of the subject coordinate system into the reference axis vector [O x , O y , O z ] of the world coordinate system is shown below.
S143Gにより、基準軸ベクトル算出処理[SPM座標系](S143)は終了する。 With S143G, the reference axis vector calculation process [SPM coordinate system] (S143) ends.
図34は、実施の形態1における画像寸法推定装置100のハードウェア資源の一例を示す図である。
図34において、画像寸法推定装置100(コンピュータの一例)は、CPU901(Central Processing Unit)を備えている。CPU901は、バス902を介してROM903、RAM904、通信ボード905(通信装置)、ディスプレイ911(表示装置)、キーボード912、マウス913、ドライブ914、磁気ディスク装置920などのハードウェアデバイスと接続され、これらのハードウェアデバイスを制御する。ドライブ914は、FD(Flexible Disk)、CD(Compact Disc)、DVD(Digital Versatile Disc)などの記憶媒体を読み書きする装置である。
ROM903、RAM904、磁気ディスク装置920およびドライブ914は記憶装置の一例である。キーボード912、マウス913および通信ボード905は入力装置の一例である。ディスプレイ911および通信ボード905は出力装置の一例である。
FIG. 34 is a diagram illustrating an example of hardware resources of the image
In FIG. 34, an image size estimation apparatus 100 (an example of a computer) includes a CPU 901 (Central Processing Unit). The CPU 901 is connected to hardware devices such as a
The
通信ボード905は、有線または無線で、LAN(Local Area Network)、インターネット、電話回線などの通信網に接続している。 The communication board 905 is wired or wirelessly connected to a communication network such as a LAN (Local Area Network), the Internet, or a telephone line.
磁気ディスク装置920には、OS921(オペレーティングシステム)、プログラム群922、ファイル群923が記憶されている。
The magnetic disk device 920 stores an OS 921 (operating system), a
プログラム群922には、実施の形態において「〜部」として説明する機能を実行するプログラムが含まれる。プログラム(例えば、寸法推定プログラム)は、CPU901により読み出され実行される。すなわち、プログラムは、「〜部」としてコンピュータを機能させるものであり、また「〜部」の手順や方法をコンピュータに実行させるものである。
The
ファイル群923には、実施の形態において説明する「〜部」で使用される各種データ(入力、出力、判定結果、計算結果、処理結果など)が含まれる。
The
実施の形態において構成図およびフローチャートに含まれている矢印は主としてデータや信号の入出力を示す。
フローチャートなどに基づいて説明する実施の形態の処理はCPU901、記憶装置、入力装置、出力装置などのハードウェアを用いて実行される。
In the embodiment, arrows included in the configuration diagrams and flowcharts mainly indicate input and output of data and signals.
The processing of the embodiment described based on the flowchart and the like is executed using hardware such as the CPU 901, a storage device, an input device, and an output device.
実施の形態において「〜部」として説明するものは「〜回路」、「〜装置」、「〜機器」であってもよく、また「〜ステップ」、「〜手順」、「〜処理」であってもよい。すなわち、「〜部」として説明するものは、ファームウェア、ソフトウェア、ハードウェアまたはこれらの組み合わせのいずれで実装されても構わない。 In the embodiment, what is described as “to part” may be “to circuit”, “to apparatus”, and “to device”, and “to step”, “to procedure”, and “to processing”. May be. That is, what is described as “to part” may be implemented by any of firmware, software, hardware, or a combination thereof.
実施の形態1により、被写体102を斜めの方向から映している一枚の写真画像101を用いて、被写体102の正しい寸法を計測することができる。
例えば、海上を撮像した写真画像101に被写体として不審船が映っている場合、実施の形態1により不審船の寸法を計測することができる。この場合、不審船に取り付けられている浮き輪をリファレンスとして使用することができる。船に搭載される浮き輪は一般的に規格化され、大きさが決まっているためである。
さらに、各国で使用されている船の寸法を含んだデータベースを用意しておき、計測した不審船の寸法とデータベースに記録された寸法とを比較することにより、不審船がどの国の船であるかを特定することもできる。
但し、船は被写体102の一例であり、浮き輪はリファレンスの一例である。つまり、実施の形態1によって船以外の被写体102の寸法を計測してもよいし、浮き輪以外のリファレンスを利用してもよい。
According to the first embodiment, the correct size of the subject 102 can be measured using the single
For example, when a suspicious ship is reflected as a subject in a
In addition, a database containing the dimensions of the ships used in each country is prepared, and by comparing the measured dimensions of the suspicious ship with the dimensions recorded in the database, the suspicious ship is in which country. Can also be specified.
However, the ship is an example of the subject 102, and the float is an example of a reference. That is, the dimensions of the subject 102 other than the ship may be measured according to the first embodiment, or a reference other than the floating ring may be used.
また、被写体102(例えば、本)の各部分の寸法を算出することにより、被写体102の三次元モデルを生成することができる(図35の(1)参照)。
さらに、被写体102の三次元モデルを用いて、異なる方向から見た被写体102を表示することができる(図35の(2)から(5)参照)。
なお、被写体102の三次元モデルに写真画像101の画素をテクスチャとして張り付けることにより、被写体102の三次元モデルをより鮮明に描くことができる。
図35は、実施の形態1における被写体102の三次元モデルを表す図である。
In addition, a three-dimensional model of the subject 102 can be generated by calculating the size of each part of the subject 102 (for example, a book) (see (1) in FIG. 35).
Furthermore, the subject 102 viewed from different directions can be displayed using a three-dimensional model of the subject 102 (see (2) to (5) in FIG. 35).
Note that the three-dimensional model of the subject 102 can be drawn more clearly by pasting the pixels of the
FIG. 35 is a diagram illustrating a three-dimensional model of the subject 102 in the first embodiment.
実施の形態1において、例えば、以下のような寸法推定装置(100)について説明した。括弧内に対応する構成の符号または名称を記す。
前記寸法推定装置は、基準線分情報生成部(120)と、基準軸ベクトル算出部(140)と、リファレンス線分ベクトル算出部(153)と、計測線分ベクトル算出部(163)と、計測線分長算出部(164)とを備える。
前記基準線分情報生成部は、対象物(102)を斜め方向から撮像した対象画像(101)に映っている前記対象物の幅方向と高さ方向と奥行き方向とに沿う3つの基準線分を前記対象画像の二次元の座標値を用いて表す基準線分情報(129)を生成する。
前記基準軸ベクトル算出部は、前記基準線分情報生成部によって生成された前記基準線分情報と、前記対象画像の撮像パラメータ(撮影パラメータ)とに基づいて、前記対象物の前記幅方向と前記高さ方向と前記奥行き方向とを三次元のベクトル値を用いて表す3つの基準軸ベクトル(149)を算出する。
前記リファレンス線分ベクトル算出部は、前記基準軸ベクトル算出部によって算出された前記3つの基準軸ベクトルのうち少なくともいずれかの基準軸ベクトルを用いて、前記対象画像に映っている前記対象物のうち長さが既知の線分であるリファレンス線分のベクトル値を、リファレンス線分ベクトル(159a)として算出する。
前記計測線分ベクトル算出部は、前記基準軸ベクトル算出部によって算出された前記3つの基準軸ベクトルのうち少なくともいずれかの基準軸ベクトルを用いて、前記対象画像に映っている前記対象物のうち長さが未知の線分である計測線分のベクトル値を、計測線分ベクトルとして算出する。
前記計測線分長算出部は、前記リファレンス線分の既知の長さ(159b)と、前記リファレンス線分ベクトル算出部によって算出された前記リファレンス線分ベクトルと、前記計測線分ベクトル算出部によって算出された前記計測線分ベクトルとを用いて、前記計測線分の長さ(169)を算出する。
In the first embodiment, for example, the following dimension estimation apparatus (100) has been described. The code | symbol or name of a corresponding structure is described in a parenthesis.
The dimension estimation apparatus includes a reference line segment information generation unit (120), a reference axis vector calculation unit (140), a reference line segment vector calculation unit (153), a measurement line segment vector calculation unit (163), and a measurement A line segment length calculation unit (164).
The reference line segment information generation unit includes three reference line segments along a width direction, a height direction, and a depth direction of the object shown in a target image (101) obtained by imaging the object (102) from an oblique direction. Is generated using the two-dimensional coordinate values of the target image.
The reference axis vector calculation unit, based on the reference line segment information generated by the reference line segment information generation unit and an imaging parameter (imaging parameter) of the target image, and the width direction of the object and the Three reference axis vectors (149) representing the height direction and the depth direction using three-dimensional vector values are calculated.
The reference line segment vector calculation unit uses at least one reference axis vector among the three reference axis vectors calculated by the reference axis vector calculation unit, among the objects reflected in the target image. A vector value of a reference line segment having a known length is calculated as a reference line segment vector (159a).
The measurement line segment vector calculation unit uses at least one reference axis vector among the three reference axis vectors calculated by the reference axis vector calculation unit, among the objects reflected in the target image. A vector value of a measurement line segment whose length is unknown is calculated as a measurement line segment vector.
The measurement line segment length calculation unit is calculated by the known length (159b) of the reference line segment, the reference line segment vector calculated by the reference line segment vector calculation unit, and the measurement line segment vector calculation unit. The measured line segment length (169) is calculated using the measured line segment vector.
100 画像寸法推定装置、101 写真画像、102 被写体、109 入力機器、109a マウスカーソル、110 写真画像表示部、120 姿勢基準軸設定部、129 姿勢基準軸データ、130 撮影パラメータ設定部、139 撮影パラメータ、140 基準軸ベクトル推定部、149 基準軸ベクトル、150 リファレンス設定部、151 基準軸ベクトル投影部、152 リファレンス線分設定部、153 リファレンス線分ベクトル算出部、154 リファレンス線分長取得部、159a リファレンス線分ベクトル、159b リファレンス線分長、160 寸法推定部、161 基準軸ベクトル投影部、162 計測線分設定部、163 計測線分ベクトル算出部、164 計測線分長算出部、169 計測線分長、170 推定結果出力部、180 写真画像データベース、190 装置記憶部、901 CPU、902 バス、903 ROM、904 RAM、905 通信ボード、911 ディスプレイ、912 キーボード、913 マウス、914 ドライブ、920 磁気ディスク装置、921 OS、922 プログラム群、923 ファイル群。 100 Image Size Estimation Device, 101 Photo Image, 102 Subject, 109 Input Device, 109a Mouse Cursor, 110 Photo Image Display Unit, 120 Posture Reference Axis Setting Unit, 129 Posture Reference Axis Data, 130 Shooting Parameter Setting Unit, 139 Shooting Parameter, 140 reference axis vector estimation unit, 149 reference axis vector, 150 reference setting unit, 151 reference axis vector projection unit, 152 reference line segment setting unit, 153 reference line segment vector calculation unit, 154 reference line segment length acquisition unit, 159a reference line Segment vector, 159b Reference line segment length, 160 Dimension estimation unit, 161 Reference axis vector projection unit, 162 Measurement line segment setting unit, 163 Measurement line segment vector calculation unit, 164 Measurement line segment length calculation unit, 169 Measurement line segment length, 170 Estimated results Fruit output unit, 180 photo image database, 190 device storage unit, 901 CPU, 902 bus, 903 ROM, 904 RAM, 905 communication board, 911 display, 912 keyboard, 913 mouse, 914 drive, 920 magnetic disk device, 921 OS, 922 programs, 923 files.
Claims (23)
前記基準線分情報生成部によって生成された前記基準線分情報と、前記対象画像の撮像パラメータとに基づいて、前記対象物の前記幅方向と前記高さ方向と前記奥行き方向とを三次元のベクトル値を用いて表す3つの基準軸ベクトルを算出する基準軸ベクトル算出部と、
前記基準軸ベクトル算出部によって算出された前記3つの基準軸ベクトルのうち少なくともいずれかの基準軸ベクトルを用いて、前記対象画像に映っている前記対象物のうち長さが既知の線分であるリファレンス線分のベクトル値を、リファレンス線分ベクトルとして算出するリファレンス線分ベクトル算出部と、
前記基準軸ベクトル算出部によって算出された前記3つの基準軸ベクトルのうち少なくともいずれかの基準軸ベクトルを用いて、前記対象画像に映っている前記対象物のうち長さが未知の線分である計測線分のベクトル値を、計測線分ベクトルとして算出する計測線分ベクトル算出部と、
前記リファレンス線分の既知の長さと、前記リファレンス線分ベクトル算出部によって算出された前記リファレンス線分ベクトルと、前記計測線分ベクトル算出部によって算出された前記計測線分ベクトルとを用いて、前記計測線分の長さを算出する計測線分長算出部と
を備えることを特徴とする寸法推定装置。 A reference representing three reference line segments along the width direction, the height direction, and the depth direction of the target object shown in the target image obtained by imaging the target object from an oblique direction, using two-dimensional coordinate values of the target image. A reference line segment information generation unit for generating line segment information;
Based on the reference line segment information generated by the reference line segment information generation unit and the imaging parameters of the target image, the width direction, the height direction, and the depth direction of the target object are three-dimensionally displayed. A reference axis vector calculation unit for calculating three reference axis vectors represented using vector values;
Using the reference axis vector of at least one of the three reference axis vectors calculated by the reference axis vector calculation unit, the length of the target object shown in the target image is a known line segment A reference line segment vector calculating unit for calculating a reference line segment vector value as a reference line segment vector;
The length of the object shown in the target image is an unknown line segment using at least one of the three reference axis vectors calculated by the reference axis vector calculation unit. A measurement line vector calculation unit that calculates a vector value of the measurement line segment as a measurement line segment vector;
Using the known length of the reference line segment, the reference line segment vector calculated by the reference line segment vector calculation unit, and the measurement line segment vector calculated by the measurement line segment vector calculation unit, A dimension estimation apparatus comprising: a measurement line segment length calculation unit that calculates a length of the measurement line segment.
前記対象画像が撮像された位置を示す座標点Pcから前記リファレンス線分の一方の端点Psへの向きを有する単位ベクトルVsを算出し、
前記座標点Pcから前記リファレンス線分の他方の端点Peへの向きを有する単位ベクトルVeを算出し、
前記単位ベクトルVsと、前記単位ベクトルVeと、前記3つの基準軸ベクトルのうち少なくともいずれかの基準軸ベクトルとを用いて、前記リファレンス線分ベクトルを算出する
ことを特徴とする請求項1記載の寸法推定装置。 The reference line segment vector calculator is
A unit vector V s having a direction from a coordinate point P c indicating a position where the target image is captured to one end point P s of the reference line segment is calculated;
It calculates a unit vector V e from the coordinate point P c with the direction of the other end point P e of the reference line,
The reference line segment vector is calculated using the unit vector V s , the unit vector V e, and at least one of the three reference axis vectors. The dimension estimation apparatus of description.
前記座標点Pcから前記リファレンス線分の前記端点PsへのベクトルVstsを得るための媒介変数tsを、前記3つの基準軸ベクトルのうちいずれかの基準軸ベクトルを用いて算出し、
前記座標点Pcから前記リファレンス線分の前記端点PeへのベクトルVeteを得るための媒介変数teを、前記いずれかの基準軸ベクトルを用いて算出し、
前記ベクトルVstsと前記ベクトルVeteとを用いて、前記リファレンス線分ベクトルを算出する
ことを特徴とする請求項2記載の寸法推定装置。 The reference line segment vector calculator is
The parametric t s for from the coordinate point P c to obtain a vector V s t s to the end point P s of the reference line segment, calculated by using one of the reference axis vector of the three reference axis vector And
The parametric t e for obtaining the vector V e t e from the coordinate point P c to the end point P e of the reference line, is calculated by using the one of the reference axis vector,
Wherein the vector V s t s by using the vector V e t e, the size estimating apparatus according to claim 2, wherein the calculating the reference line segment vector.
前記対象画像が撮像された位置を示す座標点Pcから前記計測線分の一方の端点Pmsへの向きを有する単位ベクトルVmsを算出し、
前記座標点Pcから前記リファレンス線分の他方の端点Pmeへの向きを有する単位ベクトルVmeを算出し、
前記単位ベクトルVmsと、前記単位ベクトルVmeと、前記3つの基準軸ベクトルのうち少なくともいずれかの基準軸ベクトルとを用いて、前記計測線分ベクトルを算出する
ことを特徴とする請求項1から請求項5のいずれかに記載の寸法推定装置。 The measurement line segment vector calculation unit
A unit vector V ms having a direction from the coordinate point P c indicating the position where the target image is captured to one end point P ms of the measurement line segment,
A unit vector V me having a direction from the coordinate point P c to the other end point P me of the reference line segment is calculated;
2. The measurement line segment vector is calculated using the unit vector V ms , the unit vector V me, and at least one of the three reference axis vectors. The dimension estimation apparatus according to claim 5.
前記座標点Pcから前記計測線分の前記端点PmsへのベクトルVmstmsを得るための媒介変数tmsを、前記3つの基準軸ベクトルのうちいずれかの基準軸ベクトルを用いて算出し、
前記座標点Pcから前記計測線分の前記端点PmeへのベクトルVmetmeを得るための媒介変数tmeを、前記いずれかの基準軸ベクトルを用いて算出し、
前記ベクトルVmstmsと前記ベクトルVmetmeとを用いて、前記リファレンス線分ベクトルを算出する
ことを特徴とする請求項6記載の寸法推定装置。 The measurement line segment vector calculation unit
The parametric t ms for from the coordinate point P c to obtain a vector V ms t ms to the end point P ms of the measurement line segment, calculated by using one of the reference axis vector of the three reference axis vector And
A parametric variable t me for obtaining a vector V me t me from the coordinate point P c to the end point P me of the measurement line segment is calculated using any of the reference axis vectors;
The dimension estimation apparatus according to claim 6, wherein the reference line segment vector is calculated using the vector V ms t ms and the vector V me t me .
ことを特徴とする請求項1から請求項9のいずれかに記載の寸法推定装置。 The measurement line segment length calculation unit calculates, as the length of the measurement line segment, a value obtained by multiplying a ratio of the size of the measurement line segment vector to the reference line segment vector by a known length of the reference line segment. The size estimation apparatus according to any one of claims 1 to 9, wherein
前記基準線分情報と前記撮像パラメータとに基づいて、前記対象物の前記幅方向と前記高さ方向と前記奥行き方向とを表す3つの単位ベクトルであって、FPM(First Perspective Moving)座標系またはSPM(Second Perspective Moving)座標系の3つの単位ベクトルを算出し、
FPM座標系またはSPM座標系の前記3つの単位ベクトルを用いて、ワールド座標系の3つのベクトルを前記3つの基準軸ベクトルとして算出する
ことを特徴とする請求項1から請求項10のいずれかに記載の寸法推定装置。 The reference axis vector calculation unit includes:
Three unit vectors representing the width direction, the height direction, and the depth direction of the object based on the reference line segment information and the imaging parameter, and an FPM (First Perspective Moving) coordinate system or Calculate three unit vectors in the SPM (Second Perspective Moving) coordinate system,
11. The three vectors in the world coordinate system are calculated as the three reference axis vectors using the three unit vectors in the FPM coordinate system or the SPM coordinate system. The dimension estimation apparatus of description.
前記基準線分情報生成処理によって生成された前記基準線分情報と、前記対象画像の撮像パラメータとに基づいて、前記対象物の前記幅方向と前記高さ方向と前記奥行き方向とを三次元のベクトル値を用いて表す3つの基準軸ベクトルを算出する基準軸ベクトル算出処理と、
前記基準軸ベクトル算出処理によって算出された前記3つの基準軸ベクトルのうち少なくともいずれかの基準軸ベクトルを用いて、前記対象画像に映っている前記対象物のうち長さが既知の線分であるリファレンス線分のベクトル値を、リファレンス線分ベクトルとして算出するリファレンス線分ベクトル算出処理と、
前記基準軸ベクトル算出処理によって算出された前記3つの基準軸ベクトルのうち少なくともいずれかの基準軸ベクトルを用いて、前記対象画像に映っている前記対象物のうち長さが未知の線分である計測線分のベクトル値を、計測線分ベクトルとして算出する計測線分ベクトル算出処理と、
前記リファレンス線分の既知の長さと、前記リファレンス線分ベクトル算出処理によって算出された前記リファレンス線分ベクトルと、前記計測線分ベクトル算出処理によって算出された前記計測線分ベクトルとを用いて、前記計測線分の長さを算出する計測線分長算出処理と
をコンピュータに実行させるための寸法推定プログラム。 A reference representing three reference line segments along the width direction, the height direction, and the depth direction of the target object shown in the target image obtained by imaging the target object from an oblique direction, using two-dimensional coordinate values of the target image. A reference line segment information generation process for generating line segment information;
Based on the reference line segment information generated by the reference line segment information generation process and the imaging parameters of the target image, the width direction, the height direction, and the depth direction of the target object are three-dimensional. A reference axis vector calculation process for calculating three reference axis vectors represented using vector values;
Using the reference axis vector of at least one of the three reference axis vectors calculated by the reference axis vector calculation process, the length of the object shown in the target image is a known line segment A reference line vector calculation process for calculating a reference line vector value as a reference line vector;
It is a line segment whose length is unknown among the objects shown in the target image using at least one of the three reference axis vectors calculated by the reference axis vector calculation process. A measurement line vector calculation process for calculating a vector value of the measurement line segment as a measurement line segment vector;
Using the known length of the reference line segment, the reference line segment vector calculated by the reference line segment vector calculation process, and the measurement line segment vector calculated by the measurement line segment vector calculation process, A dimension estimation program for causing a computer to execute a measurement line segment length calculation process for calculating the length of a measurement line segment.
前記対象画像が撮像された位置を示す座標点Pcから前記リファレンス線分の一方の端点Psへの向きを有する単位ベクトルVsを算出する処理と、
前記座標点Pcから前記リファレンス線分の他方の端点Peへの向きを有する単位ベクトルVeを算出する処理と、
前記単位ベクトルVsと、前記単位ベクトルVeと、前記3つの基準軸ベクトルのうち少なくともいずれかの基準軸ベクトルとを用いて、前記リファレンス線分ベクトルを算出する処理とを含む
ことを特徴とする請求項12記載の寸法推定プログラム。 The reference line segment vector calculation process includes:
A process of calculating a unit vector V s having a direction from a coordinate point P c indicating a position where the target image is captured to one end point P s of the reference line segment;
A process of calculating the unit vector V e from the coordinate point P c with the direction of the other end point P e of the reference line,
And a process of calculating the reference line segment vector using the unit vector V s , the unit vector Ve, and at least one of the three reference axis vectors. The dimension estimation program according to claim 12.
前記座標点Pcから前記リファレンス線分の前記端点PsへのベクトルVstsを得るための媒介変数tsを、前記3つの基準軸ベクトルのうちいずれかの基準軸ベクトルを用いて算出する処理と、
前記座標点Pcから前記リファレンス線分の前記端点PeへのベクトルVeteを得るための媒介変数teを、前記いずれかの基準軸ベクトルを用いて算出する処理と、
前記ベクトルVstsと前記ベクトルVeteとを用いて、前記リファレンス線分ベクトルを算出する処理とを含む
ことを特徴とする請求項13記載の寸法推定プログラム。 The reference line segment vector calculation process includes:
The parametric t s for from the coordinate point P c to obtain a vector V s t s to the end point P s of the reference line segment, calculated by using one of the reference axis vector of the three reference axis vector Processing to
The parametric t e for obtaining the vector V e t e from the coordinate point P c to the end point P e of the reference line, and processing for calculating using said one of the reference axis vector,
Wherein the vector V s t s by using the vector V e t e, according to claim 13, wherein the dimension estimating program, characterized in that it comprises a process for calculating the reference line segment vector.
前記対象画像が撮像された位置を示す座標点Pcから前記計測線分の一方の端点Pmsへの向きを有する単位ベクトルVmsを算出する処理と、
前記座標点Pcから前記リファレンス線分の他方の端点Pmeへの向きを有する単位ベクトルVmeを算出する処理と、
前記単位ベクトルVmsと、前記単位ベクトルVmeと、前記3つの基準軸ベクトルのうち少なくともいずれかの基準軸ベクトルとを用いて、前記計測線分ベクトルを算出する処理とを含む
ことを特徴とする請求項12から請求項16のいずれかに記載の寸法推定プログラム。 The measurement line segment vector calculation process includes:
A process of calculating a unit vector V ms having a direction from a coordinate point P c indicating a position where the target image is captured to one end point P ms of the measurement line segment;
A process of calculating a unit vector V me having a direction from the coordinate point P c to the other end point P me of the reference line segment;
And a process of calculating the measurement line segment vector using the unit vector V ms , the unit vector V me, and at least one of the three reference axis vectors. The size estimation program according to any one of claims 12 to 16.
前記座標点Pcから前記計測線分の前記端点PmsへのベクトルVmstmsを得るための媒介変数tmsを、前記3つの基準軸ベクトルのうちいずれかの基準軸ベクトルを用いて算出する処理と、
前記座標点Pcから前記計測線分の前記端点PmeへのベクトルVmetmeを得るための媒介変数tmeを、前記いずれかの基準軸ベクトルを用いて算出する処理と、
前記ベクトルVmstmsと前記ベクトルVmetmeとを用いて、前記リファレンス線分ベクトルを算出する処理とを含む
ことを特徴とする請求項17記載の寸法推定プログラム。 The measurement line segment vector calculation process includes:
The parametric t ms for from the coordinate point P c to obtain a vector V ms t ms to the end point P ms of the measurement line segment, calculated by using one of the reference axis vector of the three reference axis vector Processing to
The parametric t me to obtain a vector V me t me from the coordinate point P c to the end point P me of the measurement line segment, the process of calculating using said one of the reference axis vector,
18. The size estimation program according to claim 17, further comprising: calculating the reference line segment vector using the vector V ms t ms and the vector V me t me .
ことを特徴とする請求項12から請求項20のいずれかに記載の寸法推定プログラム。 In the measurement line segment length calculation process, a value obtained by multiplying a ratio of the magnitude of the measurement line segment vector to the reference line segment vector by a known length of the reference line segment is calculated as the length of the measurement line segment. The size estimation program according to any one of claims 12 to 20, further comprising a process.
前記基準線分情報と前記撮像パラメータとに基づいて、前記対象物の前記幅方向と前記高さ方向と前記奥行き方向とを表す3つの単位ベクトルであって、FPM(First Perspective Moving)座標系またはSPM(Second Perspective Moving)座標系の3つの単位ベクトルを算出する処理と、
FPM座標系またはSPM座標系の前記3つの単位ベクトルを用いて、ワールド座標系の3つのベクトルを前記3つの基準軸ベクトルとして算出する処理とを含む
ことを特徴とする請求項12から請求項21のいずれかに記載の寸法推定プログラム。 The reference axis vector calculation process includes:
Three unit vectors representing the width direction, the height direction, and the depth direction of the object based on the reference line segment information and the imaging parameter, and an FPM (First Perspective Moving) coordinate system or A process of calculating three unit vectors in an SPM (Second Perspective Moving) coordinate system;
22. The method of calculating three vectors of the world coordinate system as the three reference axis vectors using the three unit vectors of the FPM coordinate system or the SPM coordinate system. The dimension estimation program in any one of.
基準軸ベクトル算出部が、前記基準線分情報生成部によって生成された前記基準線分情報と、前記対象画像の撮像パラメータとに基づいて、前記対象物の前記幅方向と前記高さ方向と前記奥行き方向とを三次元のベクトル値を用いて表す3つの基準軸ベクトルを算出し、
リファレンス線分ベクトル算出部が、前記基準軸ベクトル算出部によって算出された前記3つの基準軸ベクトルのうち少なくともいずれかの基準軸ベクトルを用いて、前記対象画像に映っている前記対象物のうち長さが既知の線分であるリファレンス線分のベクトル値を、リファレンス線分ベクトルとして算出し、
計測線分ベクトル算出部が、前記基準軸ベクトル算出部によって算出された前記3つの基準軸ベクトルのうち少なくともいずれかの基準軸ベクトルを用いて、前記対象画像に映っている前記対象物のうち長さが未知の線分である計測線分のベクトル値を、計測線分ベクトルとして算出し、
計測線分長算出部が、前記リファレンス線分の既知の長さと、前記リファレンス線分ベクトル算出部によって算出された前記リファレンス線分ベクトルと、前記計測線分ベクトル算出部によって算出された前記計測線分ベクトルとを用いて、前記計測線分の長さを算出する
ことを特徴とする寸法推定方法。 A reference line segment information generation unit displays three reference line segments along the width direction, the height direction, and the depth direction of the target object that are reflected in the target image obtained by imaging the target object from an oblique direction. Generate the reference line segment information expressed using the coordinate value of
Based on the reference line segment information generated by the reference line segment information generation unit and the imaging parameters of the target image, a reference axis vector calculation unit is configured to calculate the width direction, the height direction, and the height of the target object. Calculate three reference axis vectors that represent the depth direction using three-dimensional vector values,
The reference line vector calculation unit uses a reference axis vector of at least one of the three reference axis vectors calculated by the reference axis vector calculation unit, and uses the longest of the objects shown in the target image. A vector value of a reference line segment whose length is a known line segment is calculated as a reference line segment vector,
The measurement line segment vector calculation unit uses a reference axis vector of at least one of the three reference axis vectors calculated by the reference axis vector calculation unit, and uses the longest of the objects shown in the target image. The vector value of the measurement line segment whose length is unknown is calculated as the measurement line segment vector,
The measurement line segment length calculation unit has a known length of the reference line segment, the reference line segment vector calculated by the reference line segment vector calculation unit, and the measurement line calculated by the measurement line segment vector calculation unit. A dimension estimation method, wherein a length of the measurement line segment is calculated using a segment vector.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2012262394A JP6041641B2 (en) | 2012-11-30 | 2012-11-30 | Dimension estimation apparatus, dimension estimation program, and dimension estimation method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2012262394A JP6041641B2 (en) | 2012-11-30 | 2012-11-30 | Dimension estimation apparatus, dimension estimation program, and dimension estimation method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2014109440A JP2014109440A (en) | 2014-06-12 |
| JP6041641B2 true JP6041641B2 (en) | 2016-12-14 |
Family
ID=51030166
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2012262394A Active JP6041641B2 (en) | 2012-11-30 | 2012-11-30 | Dimension estimation apparatus, dimension estimation program, and dimension estimation method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP6041641B2 (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP6545065B2 (en) * | 2015-09-30 | 2019-07-17 | 株式会社日立ビルシステム | 3D point cloud data modeling device, modeling program and elevator guide rail modeling method |
| CN109426355B (en) * | 2017-08-31 | 2022-12-30 | 华为终端有限公司 | Input method and input device of electronic equipment and electronic equipment |
| CN110599582B (en) * | 2019-09-11 | 2023-03-14 | 河南工业职业技术学院 | Rapid algorithm of rectangular object bounding box |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP4338405B2 (en) * | 2003-01-15 | 2009-10-07 | パナソニック株式会社 | Size measuring system and size measuring device |
| US7726575B2 (en) * | 2007-08-10 | 2010-06-01 | Hand Held Products, Inc. | Indicia reading terminal having spatial measurement functionality |
| JP2010008352A (en) * | 2008-06-30 | 2010-01-14 | 3D Media Co Ltd | Size measuring method and size measuring device |
| JP5201416B2 (en) * | 2009-04-13 | 2013-06-05 | 株式会社アイティーティー | Image processing apparatus for photo measurement, field recording system using the same, package recording system, and laser processing system |
| JP2012194002A (en) * | 2011-03-15 | 2012-10-11 | Toho Gas Co Ltd | Measurement system |
-
2012
- 2012-11-30 JP JP2012262394A patent/JP6041641B2/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| JP2014109440A (en) | 2014-06-12 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN108665536B (en) | Three-dimensional and live-action data visualization method and device and computer readable storage medium | |
| JP6658001B2 (en) | Position estimation device, program, position estimation method | |
| JP5297403B2 (en) | Position / orientation measuring apparatus, position / orientation measuring method, program, and storage medium | |
| JP4770960B2 (en) | Image search system and image search method | |
| JP6503906B2 (en) | Image processing apparatus, image processing method and image processing program | |
| JP6902881B2 (en) | Information processing device and 3D model generation method | |
| JP2008506953A5 (en) | ||
| JP2012221128A (en) | Three-dimensional modeling device, three-dimensional modeling method and program | |
| JP6304244B2 (en) | 3D shape measuring apparatus, 3D shape measuring method, and 3D shape measuring program | |
| JP2020024142A (en) | Measurement calibration device, measurement calibration method and program | |
| JP5067477B2 (en) | Imaging parameter acquisition apparatus, imaging parameter acquisition method, and program | |
| JP2014112055A (en) | Estimation method for camera attitude and estimation system for camera attitude | |
| CN112270702A (en) | Volume measurement method and apparatus, computer readable medium and electronic device | |
| CN113361365B (en) | Positioning method, positioning device, positioning equipment and storage medium | |
| CN110766731A (en) | Method and device for automatically registering panoramic image and point cloud and storage medium | |
| JPWO2015068470A1 (en) | 3D shape measuring apparatus, 3D shape measuring method, and 3D shape measuring program | |
| WO2018216341A1 (en) | Information processing device, information processing method, and program | |
| JP5263437B2 (en) | 3D modeling apparatus, 3D modeling method, and program | |
| JP6041641B2 (en) | Dimension estimation apparatus, dimension estimation program, and dimension estimation method | |
| JP2017130049A (en) | Image processor, image processing method and program | |
| JPWO2016208404A1 (en) | Information processing apparatus and method, and program | |
| US11475629B2 (en) | Method for 3D reconstruction of an object | |
| CN118628398B (en) | Dense point cloud denoising method, system and device based on visual shell | |
| JP2006059165A (en) | 3D modeling device, geometric pattern, 3D modeling data generation method, 3D modeling program, recording medium | |
| JP2013065247A (en) | Stereo matching processor, stereo matching processing method and program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20151026 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20160929 |
|
| 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: 20161011 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20161108 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 6041641 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |