JP2004212142A - Method of measuring dimension of image - Google Patents

Method of measuring dimension of image Download PDF

Info

Publication number
JP2004212142A
JP2004212142A JP2002380392A JP2002380392A JP2004212142A JP 2004212142 A JP2004212142 A JP 2004212142A JP 2002380392 A JP2002380392 A JP 2002380392A JP 2002380392 A JP2002380392 A JP 2002380392A JP 2004212142 A JP2004212142 A JP 2004212142A
Authority
JP
Japan
Prior art keywords
image
calculated
rectangle
coordinates
points
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2002380392A
Other languages
Japanese (ja)
Inventor
Toshihiro Kumota
敏広 雲田
Kozo Yoshikawa
廣三 吉川
Takuo Fujiwara
卓夫 藤原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SHONAN SASH SHOKAI KK
SYSTEM HOUSE FUKUCHIYAMA KK
Original Assignee
SHONAN SASH SHOKAI KK
SYSTEM HOUSE FUKUCHIYAMA KK
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SHONAN SASH SHOKAI KK, SYSTEM HOUSE FUKUCHIYAMA KK filed Critical SHONAN SASH SHOKAI KK
Priority to JP2002380392A priority Critical patent/JP2004212142A/en
Publication of JP2004212142A publication Critical patent/JP2004212142A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a method by which a dimension in an image can be measured through simple processing without required special equipment nor material. <P>SOLUTION: A rectangular shape having an already known height and width is selected from an image displayed on a display. Then the intersection of the diagonals of a set rectangle S is calculated and the calculated intersection is set as a reference point C0. In addition, the far points (vanishing points) V1 and V2 which are the intersections of the extended lines of the facing sides of the reference rectangle S are found. Thereafter, coordinate axes X and Y are provided based on the far points (vanishing points) V1 and V2 and reference point C0 and scales in the X- and Y-axis directions are set based on coordinate axes X and Y and the height of the rectangle S from the reference point C0 and the width of the rectangle S. Finally, the dimension in the image is made measurable through simple processing without required special equipment nor material by calculating the coordinates between two points on an image designated from the reference point C0 by using the set scales and measuring the dimension between the two points based on the calculated coordinates. <P>COPYRIGHT: (C)2004,JPO&NCIPI

Description

【0001】
【発明の属する利用分野】
この発明は、ディスプレイに表示された画像の寸法を測るための画像寸法の測定方法に関し、特に、建物の各部の長さなどをデジタルカメラで撮影した1枚の画像から測定することができるので、測量などに用いるのに適した画像寸法の測定方法に関するものである。
【0002】
【従来の技術】
カメラを用いた測量方法として、例えば、〔特許文献1〕に示すようなものがある。この方法は、同一の被写体を異なる2方向から撮影し、その撮影したステレオ画像に標定点(目印となる点)を設定する。そして、その標定点の実測値と、標定作業の結果得られた計算値とを比較することにより、測量できるようにしたものである。
【0003】
具体的には、図19(a)、(b)に示すように、「平面座標」が既知の点と「高さ」が既知の点をとることができる被写体13を左右両方の写真に写し込む(目印:ターゲットT1〜3を設置してもよい)。そして、例えば、辺K3の長さや辺K4の高さなど実測できない所の値をステレオ写真を標定することによって計算する。
【0004】
そのため、デジタルカメラなどで撮ったステレオ画像を、パソコンなどのディスプレイに表示して、表示されたステレオ画像の標定点P1〜P9をマウスなどでポイントしてコンピュータが読み込める機械座標を符号12のように取得する。機械座標の取得ができると、図20のように、標定プログラムを起動する(「処理」100:以下「処理」省略)。
【0005】
標定プログラムが起動すると、デジタルカメラの焦点距離、センサの画素サイズ、センサのピクセル数及び標定点P1〜P9の機械座標などの標定に必要なデータを入力する(110)。すると、ステレオ写真中の「実測した標定点」、「座標を求めたい標定点」及び「残りの標定点」などの全ての標定点P1〜P9の機械座標値をアファン変換やヘルマート変換処理などの内部標定処理により写真座標値に変換する(120)。次に、変換した標定点P1〜P9の組み合わせを作成する。この組み合わせは、標定点P1〜P9の全ての組み合わせを重複なく網羅的に作成したものである(130)。さらに、作成した標定点の組み合わせと、「実測した標定点」と「座標を求めたい標定点」を相互標定する。即ち、左右のステレオ写真がそれぞれ持っているX軸、Y軸及びZ軸の回りのオイラー角ω、θ、κなどの標定を求め、左右の写真の相対的な傾きや位置関係を求めて、両者を合成した立体モデルの座標値に変換する(140)。そして、変換したモデル座標値を実空間の絶対座標に変換する(絶対標定)(150)。この絶対座標と実際の座標とが、許容残差(160)に入っているかを比べて(170)、誤差内なら絶対座標値を採用して(180)、すべての組合せについて標定したかを確かめて(190)、結果を表示し(200)、これ以外なら処理を繰り返す(190)。
【0006】
このようにして、コンピュータ内に構築した座標系を使用すれば、辺K4の長さや辺K3の高さなど、実測できない所の寸法もコンピュータ内で処理して算出することができる。
【0007】
【特許文献1】
特開2002−31527号公報
【0008】
【発明が解決しようとする課題】
しかしながら、上記のような測量方法では、ステレオ写真を撮らなければならないので、それを撮るための特別な機材が必要である。
【0009】
また、ステレオ画像を相互標定によって立体モデルの座標系に変換し、さらに、それを絶対標定によってコンピュータ内の座標系に変換しなければならないので処理が複雑である。
【0010】
また、一部の寸法を測定する場合でも、画像を一旦全てコンピュータ内の座標系に変換しなければ算出ができないので、無駄である。
【0011】
さらに、画像の撮影の際には、標定点を決めて実測をしなければならないなど規制が多いし、煩雑である。
【0012】
そこで、この発明の課題は、特別な機材を必要とせず、また、立体モデルの座標系などを設けなくとも簡単な処理で寸法を測定できるようにし、かつ、その処理も必要な部分の処理だけで済むようにして処理時間の短縮を図るとともに、画像の撮影の際にも煩雑なことをしなくてもよいようにする。
【0013】
【課題を解決するための手段】
上記の課題を解決するため、この発明では、ディスプレイに表示された画像から、高さと幅寸法とが既知の矩形状のものを選択して設定すると、前記設定された矩形の座標に基づいて矩形の対角線の交点を算出し、算出した交点の座標を基準点として、その基準点から矩形の高さと幅寸法とに基づいて画像上のX軸とY軸方向のスケールを求め、その求めたスケールで基準点から指定された画像上の2点間の座標を算出し、算出した座標から2点間の寸法を測定する構成を採用したのである。
【0014】
このような構成を採用することにより、ディスプレイに表示した被測定画像の中から寸法の判っている矩形状のものを指定し、例えば、ディスプレイ上の各頂点の座標を設定すると、その座標から矩形の対角線を算出することができる。対角線を算出できれば、2本の対角線の交点も算出できる。対角線の交点が算出できれば、この交点と矩形の辺とが交わる座標も算出できるので、その交わる点と対角線の交点との長さを算出してX軸方向とY軸方向のスケールを設定する。この交点との長さの実寸は、矩形の高さと幅寸法がわかっているので、比率から算出することができる。よって、このスケールを延長あるいは縮小すれば任意の座標までの長さを算出できるので、画像の指定された2点間の座標を基準点から算出し、算出した座標に基づき2点間の寸法を測定することができる。
【0015】
このとき、上記画像に高さと幅寸法とが既知の矩形状のものを写し込み、写し込んだ矩形状のものをディスプレイに表示された画像から選択して設定すると、前記設定された矩形の座標に基づいて矩形の対角線の交点を算出し、算出した交点の座標を基準点として、その基準点から矩形の高さと幅寸法とに基づいて画像上のX軸とY軸方向のスケールを求め、その求めたスケールで基準点から指定された画像上の2点間の座標を算出し、算出した座標から2点間の寸法を測定する構成を採用することができる。
【0016】
このような構成を採用し、画像に高さと幅寸法とが既知の矩形状のものを写し込んでおけば、その写し込んだ矩形状のものをディスプレイ上で指定して、例えば各頂点の座標を設定するだけで、その座標から矩形の対角線を算出し、対角線の交点を算出して、その交点と矩形の辺とが交わる座標を算出し、その交わる点と対角線の交点とからX軸方向とY軸方向のスケールを設定することができる。その交点との長さの実寸は、矩形の高さと幅寸法がわかっているので比率から算出することができる。このスケールを延長あるいは縮小すれば任意の座標の長さを算出して、指定された被測定画像の2点間の座標を基準点から算出し、算出した座標から2点間の寸法を測定することができる。
【0017】
また、このとき、上記画像あるいは上記画像と矩形とをデジタルカメラで撮影したものを取り込んでディスプレイに表示させたものとし、その表示させた画像から高さと幅寸法とが既知の矩形状のものを選択して設定すると、前記設定された矩形の座標に基づいて矩形の対角線の交点を算出し、算出した交点の座標を基準点として、その基準点から矩形の高さと幅寸法とに基づいて画像上のX軸とY軸方向のスケールを求め、その求めたスケールで基準点から指定された画像上の2点間の座標を算出し、算出した座標から2点間の寸法を測定する構成を採用することができる。
【0018】
このような構成を採用することにより、デジタルカメラで撮影した画像を取り込めば、簡単に画像内の寸法を測定できる。
【0019】
さらに、このとき、上記画像の線分で囲まれたエリアを指定すると、その指定された線分の寸法を測定して、その線分で囲まれた面積を算出するようにした構成を採用することができる。
【0020】
このような構成を採用することにより、X軸とY軸の線分の寸法を算出できるので、面積を算出できる。
【0021】
また、このとき、上記画像内に傾き補正用の矩形を設定し、その設定した傾き補正用の矩形に基づいて、上記設定した高さと幅寸法とが既知の矩形状のものの傾きを補正し、その補正した矩形から基準点を算出し、その算出した基準点から補正した矩形の高さと幅寸法とに基づいてX軸方向とY軸方向のスケールを求め、その求めたスケールで基準点から指定された画像上の2点間の座標を算出し、算出した座標から2点間の寸法を測定する構成を採用することができる。
【0022】
このような構成を採用することにより、画面上に表示される画像は平面画像となるため、表示する画像が立体の場合は、手前に比べて奥のものは傾いて短く表示される。そのため、同じように、基準矩形Sを測定画像の傾きに合せれば、誤差の発生を減少できる筈である。
【0023】
【発明の実施形態】
以下、この発明の実施の形態を図面に基づいて説明する。
図1に示すように、この形態は、本願発明をプログラム化したものをインストールしたパーソナルコンピュータ(パソコン)1と、測定対象を撮影して画像化するデジタルカメラ2とで構成することができる。
【0024】
パソコン1は、先のデジタルカメラ2とのインターフェースを備えたもので、処理自体は、後述するように、高度な処理ではないので、特にハイスペックのものを必要としない。そのため、ディスプレイに800×600ドット以上の解像度を備えた標準的な市販のパソコンを使用することが可能である。
【0025】
デジタルカメラ2は、測定対象の被写体と、被写体内の矩形(設定したもの)Sを識別できる程度の解像度を備えたもので、別段高解像度は必要としない。また、パソコン1にインストールした処理プログラムが読み取れる形式(ここではJPEG形式)の画像ファイルを出力することができるものであればよく、市販の標準的なものでよい。
【0026】
以下、プログラムの処理を説明することにより、この発明の測定方法を説明する。
【0027】
この測定方法は、画像から被写体の寸法を測定するもので、被写体(測定対象)の画像をパソコン1に入力するため、ここでは、デジタルカメラ2を使用して測定対象を撮影したデータをパソコン1に直接取り込むことにした。このようにすると、両者の親和性が良いので、撮影画像の取り込みが簡単に行えるが、これに限定されることはなく、例えば、印画紙に写った画像をスキャナで撮るようにしてもよい。
【0028】
このとき、撮影は、図2のように、計測したい面に対してできるだけ正面から撮影する方が、後述のように、基準矩形Sを設定したときに形状の変形が少なく、基準遠点V1、V2を遠くに取ることができるので、計測精度を向上させることができる。例えば、図2に示すようにAの面を計測するには、同図(a)の方がよく、B面を計測するには同図(b)の方がより精度が落ちにくい。
また、基準矩形Sは、できるだけ大きなものを設定した方が、精度が落ち難く例えば、同図(c)の(ロ)よりも(イ)の方が精度を向上させることができる。
ちなみに、例えば、(イ)と(ロ)とが同じぐらいの大きさの場合には、後述の遠点V1、V2から遠くにある方が基準矩形Sとするには適している。
【0029】
デジタルカメラ2から取り込んだ画像はパソコン1に保存する。また、保存した画像は、起動したプログラムで「開く」と、図2で示すようなビューワWに表示される。このビューワWは、計測に使用する図3に示すような編集機能と表示機能の設定メニューを備えており、計測のためには、まず、図3のように「編集」メニューから「基準矩形を設定する」を選んで、画像内に傾きや比率を補正するための基準矩形Sを設定する。
【0030】
すなわち、図4に示すように、画像中のサイズの判っている矩形(基準矩形)Sを選択して指定する。ここでは、測定対象が建物なので、寸法の判るサッシfを指定する。このとき、サッシfは概ね実測することになるが、サッシfには寸法の規格が決まっているものもあるので、この場合は、品番が判れば実測の必要もないため建物の寸法を計測する場合には好都合である。また、建物の壁面と同一面に取り付けられるので、建物の寸法を測定する場合は正確な算出(後述のように、X、Y座標(2次元)で算出するので)が行えるので好都合である。
【0031】
この指定には、本プログラムでは、ポインティングデバイスを使用できるようにしており、ここでは、マウスを使ってサッシfの四隅を図4(a)〜(c)に示すように、ポイントすれば基準矩形Sを指定できるようになっている。
【0032】
基準矩形Sの指定が終わると、基準矩形Sの寸法を入力する。寸法の入力は、図5のように、ビューワWのテキストボックスtに幅と高さ寸法を入力する。
【0033】
これで測定の準備が整ったので、2点間の寸法lを測定することができる。寸法lの測定は、図6に示すように、「編集」メニユーから「2点間の距離を求める」を選択する。次に、図7に示すように、画像上の2点をマウスでクリックすると(順不同)、基準矩形Sと基準矩形Sの実測値とに基づいて2点間の実際の寸法lが算出される。
【0034】
この算出方法は、図8〜図10に示すように、基準矩形Sの重心に基準点C0を設定し、基準点C0からマウスでクリックして画像上に設定した点の座標を求め、その求めた座標から寸法、距離、面積などを算出する。
【0035】
すなわち、図8(a)のように、平面上に基準矩形Sを設けて平面内の点PPの座標を求めるには、同図(b)に示すように、基準矩形Sの対向する辺を延長して交わった遠点(消点)V1、V2を求める。
【0036】
具体的には、基準矩形Sの頂点を例えば、a(x1、y1)、b(x2、y2)、c(x3、y3)、d(x4、y4)とすると、V1(x、y)の座標は、直線abとcdの交点となるので、
直線abの式は、
(x−x1)/(x2−x1)=(y−y1)/(y2−y1)
直線cdの式は、
(x−x3)/(x4−x3)=(y−y3)/(y4−y3)
となり、この2直線の連立方程式を解けば導き出せる。ただし、2直線が平行の場合は、連立方程式の解は無いので、V1の位置は基準矩形から無限大の位置とする。
同様にすればV2の座標も導き出せる。
【0037】
この遠点V1、V2は、基準矩形Sに近いほど演算精度は落ちる(遠点V1、V2での誤差は無限大)。
したがって、変形が大きくなる場合は(遠点V1、V2が画像に近い)、できるだけ遠点V1、V2から離れた位置に基準矩形Sを設けることができるように撮影したほうが精度が落ちにくくなる。また、遠点V1、V2をできるだけ画像から離すには、先にも述べたように、撮影時にできるだけ面に対して奥行きの角度が付かないように(真正面)から撮影すれば遠点V1、V2を遠ざけられる(実際のプログラム上では∞となる)。
【0038】
次に、同図(c)に示すように、基準矩形Sの頂点abcdを結ぶ2本の対角線を求め、その対角線の交点を基準点C0に設定する(この場合は、直線acと直線bdを考えてその交点(=解)を求めれば良い)。
【0039】
そして、図9(a)のように、その基準点C0と遠点V2とを通る直線を考えて、その直線と基準矩形Sの辺との交点をP1、P2とする。そのため、基準点(対角線の交点)C0は矩形S内にある必要があり、矩形Sの形状は、隣合う2角>180°であることが好ましい。
【0040】
同様に、基準点C0と遠点V1とを通る直線を考えて、同図(b)のように、その直線と基準矩形Sの辺との交点C1を求める。そして、このC1とP1を通る直線と、V1とP2を通る直線との交点P3を求める。
【0041】
また、P2とC1を通る直線と、V1とP1を通る直線との交点P4を求め、同図(c)に示すように、V1とC0を通る直線とV2とP3を通る直線との交点C2を求める。
【0042】
さらに、図10(a)に示すように、aとC2を通る直線と、V1とdを通る直線との交点をP5とし、dとC2を通る直線とV1とaとを通る直線との交点をP6とする。次に、V1とC0を通る直線とV2とP6を通る直線との交点C3を求める。
【0043】
このとき、同図(b)に示すように、交点C0、V2、C3で囲まれる座標PPは∠C2V2C3の内側に存在することになる。
また、長さ
C0〜C1=C1〜C2
=C2〜C3
=「基準矩形の幅W/2(スケール)」(この形態では、W/2であるが、矩形の形状によってはW/2とはならないので、その場合は、各頂点の座標から求められる)
であるので、C0を原点(0、0)とすると、点PPのX軸の座標はマイナス方向となり、
−(基準矩形の幅W/2)×2〜−(基準矩形の幅W/2)×3
の間にある。
【0044】
これでは、誤差が大きいので、同図(c)に示すように、C2とC3の区間をさらに分割する。そのため、P4、P3、P6、P5の矩形に対角線を設け交点C4を求める。このとき、座標PPは、交点C2、V2、C4で囲まれる∠C2V2C4の内側に存在することになる。
【0045】
また、
C2〜C4=「基準矩形の幅W/4」
である。したがって、PPのX座標は、
−(基準矩形の幅W/2)×2〜−(基準矩形の幅W/2)×2
〜−(基準矩形の幅W/4)
の区間に存在する。
こうして(基準矩形の幅W/n)が1以下になるまで分割を繰り返し、C0からの距離を求めれば、点PPのX座標を算出することができる。
【0046】
同様にして、遠点V1を使って点PPの、Y座標を求めれば、PPのX座標とY座標を算出することができる。
【0047】
このように、画像上の任意の点の座標を求めることができる。そのため、この方法で、先の2点の座標を求めれば、座標間の距離(寸法)を算出することができる。したがって、測定画像の測りたいポイントを先のようにマウスで指定すれば、その寸法を算出できる。
【0048】
また、このように2点間の寸法を測ることができるので、2点間で指定した直線で囲んだ面積も算出することができる。
【0049】
実際の操作は、図11のように、「編集」メニューの「面積を求める」→「加算する」を選択し、図12(a)〜(e)のように、マウスで範囲をポイントしてエリアを指定すれば、面積範囲が確定して、範囲指定した縦方向と横方向の直線の長さから面積hを算出できる。
【0050】
このとき、図13のように「編集」メニューの「面積を求める」→「減算する」を選択して範囲を指定すると、マウスで指定した範囲を減算することができる。例えば、図14のものでは、サッシfの面積を減算して壁だけの面積hを算出することができる。
【0051】
また、面積hの設定をやり直すには、「編集」メニューの「面積を求める」→「範囲を削除する」を選択して、マウスで面積範囲を指定すれば削除できる。「範囲を全て削除する」は設定してある全ての面積範囲を削除できる。
【0052】
このように、一枚の画像から2点間の寸法を求めることができるので、面積も容易に求めることができる。
【0053】
なお、ここでは、メニューからプルダウンメニューを開いてコマンドを選択する手順を示したが、このアプリケーションでは、同じコマンド機能を有するツールバーを備えており(図示せず)、このツールバーのボタンをクリックすることで同様の動作を行なわせることが可能となっている。
【0054】
図15に第2実施形態を示す。
この形態は、予め寸法を決めた基準矩形(ターゲット)Gとして、例えば、正規化した基準矩形Gを準備して、図15に示すように、測定対象物の画像と一緒に写し込み、その写し込んだ基準矩形Gを用いて第1実施形態で述べた方法を用いて寸法測定を行うものである。
【0055】
このようにすると、正確な基準矩形Gを用いることができるので、測定精度を向上させることができる。
【0056】
また、このとき、基準矩形Gは、測定面と同一平面に設けるようにすれば、精度を向上させることができる。
【0057】
このように、表示された1枚の画像内に基準矩形G、Sに基づくXY座標を設け、そのX座標とY座標に基づいて、基準点C0から基準矩形G、Sの高さと幅寸法とに基づく画像上のX軸とY軸方向のスケールを設定し、その設定したスケールで基準点C0から指定された画像上の2点間の座標を算出し、算出した座標に基づいて2点間の寸法lを測定しているので、簡単に寸法lや面積を測定することができる。
【0058】
図16に第3実施形態を示す。
この形態は、基準矩形G、Sの設定の仕方により発生する誤差を減少させるものである。
【0059】
誤差の要因として、基準矩形G、Sと測定したいものの大きさの差がある。すなわち、差が大きければ大きいほど誤差が生じやすく、例えば、7000mmに対して300mmの誤差の発生するケースがあった。
しかし、測定対象によっては、誤差を最小にする最適な大きさの基準矩形G、Sを設定できない場合もある。
【0060】
そのため、基準矩形G、Sを用いて演算により画面上に設ける座標系(XY座標)を考える。
すると、画面上に表示される測定画像は平面画像となっており、測定画像が立体の場合は、手前のものに比べて奥のものは傾いて短く表示されてしまう。
このとき、基準矩形Sと測定対象との差が小さいと、基準矩形Sも測定対象も同じ傾きになるため誤差も少なくてすむが、差が大きいと傾きの差が測定誤差として表示されることになると考えられる。
【0061】
そこで、測定画像の傾きを考慮するため、傾きの基準と寸法の基準を別にして求めることにした。
具体的には、画像上でできるだけ大きな矩形と思われるものを指定する。例えば、図16(a)のように、建物で矩形(4隅が直角であるもの、ここでは外形)と考えられる各頂点をマウスで順に指示する。これを傾き補正用の基準の矩形S1とした。
【0062】
次に、寸法の基準は第1実施形態または第2実施形態の基準矩形S、Gと同じものを用いる。
【0063】
この基準矩形S、Gの設定は、図16(b)のように、例えば、下方のサッシを基準矩形Sに指定する場合は、その対向する2つの頂点をクリックすると、基準矩形Sと各辺を延長した破線が表示されるようにしてある。こうすることで、基準矩形Sと傾き補正用の基準の矩形S1とが明瞭となるようにしてある。
【0064】
こうして、基準矩形Sを設定すると、設定した基準矩形Sの幅寸法と高さ寸法を図17(a)のように、テキストボックスに入力して、図17(b)のように計測する区間の両端をマウスなどで指定する。
【0065】
すると、基準矩形Sを傾き補正用の基準の矩形S1の相似形とみなして、基準矩形Sの各頂点の角度を対応する傾き補正用の基準の矩形S1の各頂点の角度と同じになるように補正する。その際、角度の補正にともなって寸法も変わるので補正する。
【0066】
こうした方法で基準矩形G、Sの傾きを補正し、補正した基準矩形G、Sを用いて、第1実施形態で示した方法により測定画像の寸法を測定した。
すなわち、基準矩形G、Sから遠点V1、V2と基準点C0を求め、その基準点C0から基準矩形Sの寸法に基づいてX軸とY軸方向のスケールを求めた。そして、そのスケールでもって測定図像の寸法を測定した。
その結果、測定誤差を4%以内に収めることができたので、この方法が有効であることが確認できた。
【0067】
また、図18に示すように、外壁全体の対向する2つの頂点をクリックすると、外壁全体の面積hを算出できるようにすれば、例えば、メニューの「編集」→「面積を求める」→「減算する」を選択して、減算するサッシをマウスで指定すると、第1実施形態と同様に、壁面だけの面積を算出させるようにできる。
【0068】
【発明の効果】
この発明は、以上のように構成したことにより、1枚の画像から特別な機材を必要とせず、簡単な処理で寸法を測定できる。
【0069】
また、その処理も必要な部分の処理だけで済むので、処理時間の短縮を図ることができる。
【0070】
さらに、撮影の際にも煩雑なことをしなくてよい。
【図面の簡単な説明】
【図1】第1実施形態の斜視図
【図2】第1実施形態の作用説明図
【図3】第1実施形態の作用説明図
【図4】第1実施形態の作用説明図
【図5】第1実施形態の作用説明図
【図6】第1実施形態の作用説明図
【図7】第1実施形態の作用説明図
【図8】第1実施形態の作用説明図
【図9】第1実施形態の作用説明図
【図10】第1実施形態の作用説明図
【図11】第1実施形態の作用説明図
【図12】第1実施形態の作用説明図
【図13】第1実施形態の作用説明図
【図14】第1実施形態の作用説明図
【図15】第2実施形態の作用説明図
【図16】(a)、(b)第3実施形態の作用説明図
【図17】(a)、(b)第3実施形態の作用説明図
【図18】第3実施形態の作用説明図
【図19】(a)、(b)従来例の作用説明図
【図20】従来例のフローチャート
【符号の説明】
1 パソコン
2 デジタルカメラ
C0 基準点
G 基準矩形
h 面積
l 寸法
R 輪郭
S 基準矩形
S1 傾き補正用の基準矩形
[0001]
FIELD OF THE INVENTION
The present invention relates to a method for measuring an image size for measuring the size of an image displayed on a display. In particular, since the length of each part of a building can be measured from one image taken by a digital camera, The present invention relates to a method for measuring image dimensions suitable for use in surveying and the like.
[0002]
[Prior art]
As a surveying method using a camera, for example, there is a method shown in [Patent Document 1]. In this method, the same subject is photographed from two different directions, and a photo control point (a mark) is set in the photographed stereo image. Then, the actual measurement value of the control point is compared with a calculated value obtained as a result of the control work, thereby enabling surveying.
[0003]
Specifically, as shown in FIGS. 19A and 19B, the subject 13 that can take a point having a known “plane coordinate” and a point having a known “height” is photographed in both left and right photographs. (Marks: targets T1 to T3 may be installed). Then, for example, a value of an unmeasurable place such as the length of the side K3 or the height of the side K4 is calculated by locating the stereo photograph.
[0004]
Therefore, a stereo image taken by a digital camera or the like is displayed on a display of a personal computer or the like, and the machine coordinates that can be read by the computer by pointing the control points P1 to P9 of the displayed stereo image with a mouse or the like as indicated by reference numeral 12. get. When the machine coordinates can be obtained, the orientation program is started as shown in FIG. 20 ("process" 100: hereinafter "process" is omitted).
[0005]
When the orientation program starts, data necessary for orientation such as the focal length of the digital camera, the pixel size of the sensor, the number of pixels of the sensor, and the machine coordinates of the orientation points P1 to P9 are input (110). Then, the machine coordinate values of all the control points P1 to P9 such as the “actually measured control points”, the “control points to be obtained for coordinates”, and the “remaining control points” in the stereo photograph are subjected to Afan transformation or Helmert transformation processing. It is converted into a photograph coordinate value by an internal orientation process (120). Next, a combination of the converted control points P1 to P9 is created. In this combination, all combinations of the control points P1 to P9 are comprehensively created without duplication (130). Further, the created combination of the control points, the “actually measured control points” and the “control points for which coordinates are to be obtained” are mutually set. That is, the orientations of the Euler angles ω, θ, κ, etc. around the X, Y, and Z axes of the left and right stereo photographs, respectively, are determined, and the relative inclination and positional relationship between the left and right photographs are determined. The two are converted into coordinate values of the synthesized three-dimensional model (140). Then, the converted model coordinate values are converted into absolute coordinates in the real space (absolute orientation) (150). It is compared whether the absolute coordinates and the actual coordinates are within the allowable residual (160) (170). If the absolute coordinates are within the error, the absolute coordinate values are adopted (180), and it is confirmed whether all the combinations have been oriented. (190), the result is displayed (200), and otherwise, the process is repeated (190).
[0006]
In this way, by using the coordinate system constructed in the computer, dimensions of places where measurement cannot be performed, such as the length of the side K4 and the height of the side K3, can be processed and calculated in the computer.
[0007]
[Patent Document 1]
JP-A-2002-31527
[Problems to be solved by the invention]
However, in the surveying method as described above, since a stereo photograph must be taken, special equipment for taking the photograph is required.
[0009]
In addition, since the stereo image must be converted to the coordinate system of the three-dimensional model by mutual orientation, and further converted to the coordinate system in the computer by absolute orientation, the processing is complicated.
[0010]
Further, even when measuring a part of the dimensions, the calculation cannot be performed unless all the images are once converted into the coordinate system in the computer, which is wasteful.
[0011]
Furthermore, when capturing an image, there are many regulations, such as the need to determine a control point and perform actual measurement, which is complicated and complicated.
[0012]
Therefore, an object of the present invention is to make it possible to measure dimensions by simple processing without requiring special equipment and without providing a coordinate system of a three-dimensional model, and to perform processing only on necessary parts. In addition to shortening the processing time, it is not necessary to perform complicated operations when capturing an image.
[0013]
[Means for Solving the Problems]
In order to solve the above problem, according to the present invention, when a rectangular shape having a known height and width is selected and set from an image displayed on a display, a rectangular shape is set based on the coordinates of the set rectangle. Is calculated, and the coordinates of the calculated intersection are used as a reference point. From the reference point, the scales in the X-axis and Y-axis directions on the image are obtained based on the height and width of the rectangle, and the obtained scale is obtained. , The coordinates between two points on the image specified from the reference point are calculated, and the dimension between the two points is measured from the calculated coordinates.
[0014]
By adopting such a configuration, a rectangular object whose dimensions are known is specified from the measured image displayed on the display, and, for example, when the coordinates of each vertex on the display are set, the rectangular shape is calculated from the coordinates. Can be calculated. If the diagonal can be calculated, the intersection of the two diagonals can also be calculated. If the intersection of the diagonal can be calculated, the coordinates of the intersection of the intersection with the side of the rectangle can also be calculated. The length of the intersection of the diagonal and the intersection of the diagonal is calculated to set the scale in the X-axis direction and the Y-axis direction. The actual size of the length of the intersection can be calculated from the ratio because the height and width of the rectangle are known. Therefore, if this scale is extended or reduced, the length to any coordinate can be calculated. Therefore, the coordinates between two designated points of the image are calculated from the reference point, and the dimension between the two points is calculated based on the calculated coordinates. Can be measured.
[0015]
At this time, a rectangular object whose height and width are known is printed on the image, and the copied rectangular object is selected from the image displayed on the display and set, and the coordinates of the set rectangle are set. The intersection of the diagonal line of the rectangle is calculated based on the coordinates of the intersection, and the scale of the X-axis and the Y-axis directions on the image is obtained based on the height and the width of the rectangle from the reference point using the coordinates of the calculated intersection as a reference point. It is possible to adopt a configuration in which the coordinates between two points on the image specified from the reference point are calculated with the obtained scale, and the dimension between the two points is measured from the calculated coordinates.
[0016]
By adopting such a configuration, if a rectangular shape whose height and width are known is imprinted on the image, the imprinted rectangular shape is designated on the display, for example, the coordinates of each vertex Is set, the diagonal of the rectangle is calculated from the coordinates, the intersection of the diagonal is calculated, the coordinates of the intersection of the rectangle and the sides of the rectangle are calculated, and the X-axis direction is calculated from the intersection of the intersection and the intersection of the diagonal. And the scale in the Y-axis direction can be set. The actual size of the length of the intersection can be calculated from the ratio because the height and width of the rectangle are known. If this scale is extended or reduced, the length of arbitrary coordinates is calculated, the coordinates between two points of the specified image to be measured are calculated from the reference point, and the dimension between the two points is measured from the calculated coordinates. be able to.
[0017]
Further, at this time, it is assumed that the image or the image and the rectangle taken by a digital camera are captured and displayed on a display, and a rectangular shape having a known height and width is determined from the displayed image. When selected and set, an intersection of the diagonal of the rectangle is calculated based on the coordinates of the set rectangle, and the coordinates of the calculated intersection are used as a reference point, and an image is formed based on the height and width of the rectangle from the reference point. A configuration in which a scale in the X-axis and Y-axis directions above is obtained, coordinates between two points on the image specified from the reference point are calculated with the obtained scale, and a dimension between the two points is measured from the calculated coordinates. Can be adopted.
[0018]
By adopting such a configuration, if an image captured by a digital camera is captured, dimensions in the image can be easily measured.
[0019]
Further, at this time, when an area surrounded by the line segment of the image is designated, a configuration is adopted in which the dimension of the designated line segment is measured, and the area surrounded by the line segment is calculated. be able to.
[0020]
By adopting such a configuration, it is possible to calculate the dimension of the line segment of the X axis and the Y axis, so that the area can be calculated.
[0021]
At this time, a rectangle for inclination correction is set in the image, and based on the set rectangle for inclination correction, the inclination of the rectangular shape whose height and width dimensions are known is corrected, A reference point is calculated from the corrected rectangle, and the scales in the X-axis direction and the Y-axis direction are calculated based on the height and width dimensions of the corrected rectangle from the calculated reference point, and the scale is used to specify the reference point. It is possible to adopt a configuration in which coordinates between two points on the obtained image are calculated, and a dimension between the two points is measured from the calculated coordinates.
[0022]
By adopting such a configuration, the image displayed on the screen is a planar image. Therefore, when the displayed image is a three-dimensional image, the image at the back is displayed as being inclined and shorter than the image at the front. Therefore, similarly, if the reference rectangle S is adjusted to the inclination of the measurement image, the occurrence of errors should be reduced.
[0023]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
As shown in FIG. 1, this embodiment can be constituted by a personal computer (personal computer) 1 in which a program of the present invention is installed, and a digital camera 2 for photographing and imaging an object to be measured.
[0024]
The personal computer 1 has an interface with the digital camera 2 described above, and the processing itself is not an advanced processing as described later, so that a high-spec one is not required. Therefore, it is possible to use a standard commercially available personal computer having a display with a resolution of 800 × 600 dots or more.
[0025]
The digital camera 2 has a resolution enough to identify a subject to be measured and a rectangle (set) S in the subject, and does not require a higher resolution. Further, any commercially-available standard file may be used as long as it can output an image file in a format (here, JPEG format) that can read the processing program installed in the personal computer 1.
[0026]
Hereinafter, the measurement method of the present invention will be described by describing the processing of the program.
[0027]
This measurement method measures the size of a subject from an image. In order to input an image of the subject (measurement target) to the personal computer 1, here, data obtained by photographing the measurement target using the digital camera 2 is used. I decided to take it directly to. In this case, the affinity between the two is good, so that the captured image can be easily captured. However, the present invention is not limited to this. For example, the image captured on photographic paper may be captured by a scanner.
[0028]
At this time, as shown in FIG. 2, it is better to take a picture of the face to be measured from the front as much as possible, as described later, when the reference rectangle S is set, the shape is less deformed, and the reference far point V1, Since V2 can be taken far away, measurement accuracy can be improved. For example, as shown in FIG. 2, when measuring the plane A, the figure (a) is better, and when measuring the plane B, the figure (b) is less likely to lose accuracy.
In addition, if the reference rectangle S is set as large as possible, the accuracy is less likely to decrease. For example, the accuracy can be improved in (a) than in (b) in FIG.
By the way, for example, when (a) and (b) are about the same size, it is more suitable for the reference rectangle S to be farther from the later-described far points V1 and V2.
[0029]
Images captured from the digital camera 2 are stored in the personal computer 1. The saved image is displayed on the viewer W as shown in FIG. 2 when "opened" by the activated program. The viewer W has an edit function and a display function setting menu as shown in FIG. 3 used for measurement. For measurement, first, as shown in FIG. "Set" is selected, and a reference rectangle S for correcting the inclination and ratio in the image is set.
[0030]
That is, as shown in FIG. 4, a rectangle (reference rectangle) S whose size is known in the image is selected and designated. Here, since the object to be measured is a building, a sash f whose dimensions are known is specified. At this time, the sash f is generally measured, but some sashes f have dimensional standards. In this case, if the product number is known, there is no need for actual measurement, so the dimensions of the building are measured. It is convenient in the case. In addition, since it is mounted on the same surface as the wall surface of the building, it is convenient to measure the dimensions of the building because accurate calculations can be performed (as will be described later, using X and Y coordinates (two-dimensional)).
[0031]
For this designation, the program allows a pointing device to be used. In this case, if the four corners of the sash f are pointed using a mouse as shown in FIGS. S can be specified.
[0032]
When the designation of the reference rectangle S is completed, the dimensions of the reference rectangle S are input. As for the input of dimensions, width and height dimensions are entered in a text box t of the viewer W as shown in FIG.
[0033]
Now that the measurement is ready, the dimension l between the two points can be measured. For the measurement of the dimension l, as shown in FIG. 6, "calculate the distance between two points" is selected from the "edit" menu. Next, as shown in FIG. 7, when two points on the image are clicked with the mouse (in any order), an actual dimension l between the two points is calculated based on the reference rectangle S and the measured value of the reference rectangle S. .
[0034]
In this calculation method, as shown in FIGS. 8 to 10, a reference point C0 is set at the center of gravity of the reference rectangle S, and the coordinates of the point set on the image by clicking with the mouse from the reference point C0 are determined. Calculate dimensions, distance, area, etc. from the coordinates.
[0035]
That is, as shown in FIG. 8A, in order to provide the reference rectangle S on the plane and obtain the coordinates of the point PP in the plane, as shown in FIG. The far points (extinguishing points) V1 and V2 intersecting with each other are obtained.
[0036]
More specifically, if the vertices of the reference rectangle S are, for example, a (x1, y1), b (x2, y2), c (x3, y3), and d (x4, y4), V1 (x, y) Since the coordinates are the intersection of the straight lines ab and cd,
The equation for the straight line ab is
(X-x1) / (x2-x1) = (y-y1) / (y2-y1)
The equation for the straight line cd is
(X−x3) / (x4−x3) = (y−y3) / (y4−y3)
It can be derived by solving the simultaneous equations of these two straight lines. However, if the two straight lines are parallel, there is no solution of the simultaneous equations, so the position of V1 is set to an infinite position from the reference rectangle.
Similarly, the coordinates of V2 can be derived.
[0037]
The calculation accuracy of the far points V1 and V2 decreases as the distance to the reference rectangle S decreases (the error at the far points V1 and V2 is infinite).
Therefore, when the deformation is large (far points V1 and V2 are close to the image), it is more difficult to reduce the accuracy by taking an image so that the reference rectangle S can be provided as far as possible from the far points V1 and V2. Also, in order to keep the far points V1 and V2 as far away from the image as possible, as described above, the far points V1 and V2 can be obtained by photographing from the front (directly) so that the depth angle is not as large as possible with respect to the surface during photographing. Can be kept away (∞ in the actual program).
[0038]
Next, as shown in FIG. 3C, two diagonal lines connecting the vertices abcd of the reference rectangle S are obtained, and the intersection of the diagonal lines is set to the reference point C0 (in this case, the straight line ac and the straight line bd are set). Think about the intersection (= solution).)
[0039]
Then, as shown in FIG. 9A, considering a straight line passing through the reference point C0 and the far point V2, intersections of the straight line and the sides of the reference rectangle S are defined as P1 and P2. Therefore, the reference point (the intersection of the diagonal lines) C0 needs to be within the rectangle S, and the shape of the rectangle S is preferably two adjacent corners> 180 °.
[0040]
Similarly, considering a straight line passing through the reference point C0 and the far point V1, an intersection C1 between the straight line and the side of the reference rectangle S is obtained as shown in FIG. Then, an intersection P3 between the straight line passing through C1 and P1 and the straight line passing through V1 and P2 is obtained.
[0041]
Further, an intersection P4 between a straight line passing through P2 and C1 and a straight line passing through V1 and P1 is obtained, and as shown in FIG. 4C, an intersection C2 between a straight line passing through V1 and C0 and a straight line passing through V2 and P3 is obtained. Ask for.
[0042]
Further, as shown in FIG. 10A, the intersection of a straight line passing through a and C2 and a straight line passing through V1 and d is defined as P5, and an intersection between a straight line passing through d and C2 and a straight line passing through V1 and a is taken. Is P6. Next, an intersection C3 between a straight line passing through V1 and C0 and a straight line passing through V2 and P6 is determined.
[0043]
At this time, as shown in FIG. 7B, the coordinates PP surrounded by the intersections C0, V2, and C3 exist inside ∠C2V2C3.
Also, lengths C0 to C1 = C1 to C2
= C2-C3
= "Width of reference rectangle W / 2 (scale)" (W / 2 in this embodiment, but not W / 2 depending on the shape of the rectangle, in which case it is obtained from the coordinates of each vertex)
Therefore, if C0 is the origin (0, 0), the coordinate of the point PP on the X axis is in the minus direction.
− (Reference rectangle width W / 2) × 2− (reference rectangle width W / 2) × 3
Between.
[0044]
In this case, since the error is large, the section between C2 and C3 is further divided as shown in FIG. Therefore, a diagonal line is provided in the rectangle of P4, P3, P6, and P5, and the intersection C4 is obtained. At this time, the coordinate PP exists inside ∠C2V2C4 surrounded by the intersections C2, V2, and C4.
[0045]
Also,
C2 to C4 = “width of reference rectangle W / 4”
It is. Therefore, the X coordinate of PP is
− (Reference rectangle width W / 2) × 2− (reference rectangle width W / 2) × 2
~-(Reference rectangle width W / 4)
Exists in the section.
The division is repeated until (the width W / n of the reference rectangle) becomes 1 or less, and the distance from C0 is obtained, whereby the X coordinate of the point PP can be calculated.
[0046]
Similarly, when the Y coordinate of the point PP is obtained using the far point V1, the X coordinate and the Y coordinate of the PP can be calculated.
[0047]
In this way, the coordinates of an arbitrary point on the image can be obtained. Therefore, if the coordinates of the above two points are obtained by this method, the distance (dimension) between the coordinates can be calculated. Therefore, if the point to be measured in the measurement image is designated by the mouse as described above, the dimension can be calculated.
[0048]
Further, since the dimension between the two points can be measured in this way, the area surrounded by the specified straight line between the two points can also be calculated.
[0049]
The actual operation is performed by selecting “Calculate area” → “Add” in the “Edit” menu as shown in FIG. 11 and pointing the range with the mouse as shown in FIGS. 12 (a) to 12 (e). If the area is specified, the area range is determined, and the area h can be calculated from the length of the straight line in the vertical and horizontal directions for which the range is specified.
[0050]
At this time, as shown in FIG. 13, by selecting “Determine area” → “Subtract” in the “Edit” menu and specifying a range, the range specified by the mouse can be subtracted. For example, in the case of FIG. 14, the area h of only the wall can be calculated by subtracting the area of the sash f.
[0051]
To reset the area h, select "Determine area" → "Delete area" from the "Edit" menu and specify the area range with the mouse. “Delete all ranges” can delete all the set area ranges.
[0052]
As described above, since the size between two points can be obtained from one image, the area can be easily obtained.
[0053]
Here, the procedure for selecting a command by opening a pull-down menu from the menu has been described, but this application has a toolbar having the same command function (not shown), and clicking a button on this toolbar Can perform the same operation.
[0054]
FIG. 15 shows a second embodiment.
In this embodiment, for example, a standardized reference rectangle G is prepared as a reference rectangle (target) G whose dimensions have been determined in advance, and as shown in FIG. The dimension measurement is performed using the method described in the first embodiment by using the reference rectangle G that is included.
[0055]
In this case, since an accurate reference rectangle G can be used, measurement accuracy can be improved.
[0056]
At this time, if the reference rectangle G is provided on the same plane as the measurement surface, the accuracy can be improved.
[0057]
In this manner, XY coordinates based on the reference rectangles G and S are provided in one displayed image, and the height and width dimensions of the reference rectangles G and S from the reference point C0 are determined based on the X coordinates and the Y coordinates. A scale in the X-axis and Y-axis directions on the image based on the coordinates is set, coordinates between two points on the specified image from the reference point C0 are calculated using the set scale, and a point between the two points is calculated based on the calculated coordinates. Since the dimension l is measured, the dimension l and the area can be easily measured.
[0058]
FIG. 16 shows a third embodiment.
This embodiment reduces errors that occur depending on how the reference rectangles G and S are set.
[0059]
As a factor of the error, there is a difference between the reference rectangles G and S and the size of the object to be measured. That is, as the difference is larger, an error is more likely to occur. For example, there has been a case where an error of 300 mm is generated with respect to 7000 mm.
However, depending on the measurement object, there is a case where it is not possible to set the reference rectangles G and S having the optimal size to minimize the error.
[0060]
Therefore, a coordinate system (XY coordinates) provided on the screen by calculation using the reference rectangles G and S is considered.
Then, the measurement image displayed on the screen is a planar image, and when the measurement image is a three-dimensional image, the back image is displayed as being inclined and shorter than the front image.
At this time, if the difference between the reference rectangle S and the object to be measured is small, the reference rectangle S and the object to be measured have the same inclination, so that the error is small. However, if the difference is large, the difference between the inclinations is displayed as a measurement error. It is thought to be.
[0061]
Therefore, in order to consider the inclination of the measured image, the reference for the inclination and the reference for the dimension are determined separately.
Specifically, a rectangle that is considered as large as possible on the image is specified. For example, as shown in FIG. 16A, vertices that are considered to be rectangles (one having four right angles, in this case, an outline) in a building are sequentially pointed with a mouse. This was defined as a reference rectangle S1 for inclination correction.
[0062]
Next, the same standard as the reference rectangles S and G of the first embodiment or the second embodiment is used as the dimension standard.
[0063]
The reference rectangles S and G are set, for example, as shown in FIG. 16B, when the lower sash is designated as the reference rectangle S, by clicking two opposite vertices, the reference rectangle S and each side are clicked. Is displayed as an extended dashed line. By doing so, the reference rectangle S and the reference rectangle S1 for inclination correction are made clear.
[0064]
When the reference rectangle S is set in this way, the width dimension and the height dimension of the set reference rectangle S are entered in a text box as shown in FIG. 17A, and the section to be measured as shown in FIG. Specify both ends with a mouse, etc.
[0065]
Then, the reference rectangle S is regarded as a similar shape to the reference rectangle S1 for inclination correction, and the angle of each vertex of the reference rectangle S becomes the same as the angle of each vertex of the corresponding reference rectangle S1 for inclination correction. To be corrected. At this time, the dimensions are changed with the correction of the angle, so the correction is made.
[0066]
The inclination of the reference rectangles G and S was corrected by such a method, and the dimensions of the measurement image were measured by the method described in the first embodiment using the corrected reference rectangles G and S.
That is, the far points V1 and V2 and the reference point C0 were obtained from the reference rectangles G and S, and the scales in the X-axis and Y-axis directions were obtained based on the dimensions of the reference rectangle S from the reference point C0. Then, the dimensions of the measurement image were measured on the scale.
As a result, the measurement error could be kept within 4%, and it was confirmed that this method was effective.
[0067]
Also, as shown in FIG. 18, by clicking two opposite vertexes of the entire outer wall, if the area h of the entire outer wall can be calculated, for example, the menu “Edit” → “Calculate area” → “Subtract” When "Yes" is selected and the sash to be subtracted is designated with a mouse, the area of only the wall surface can be calculated as in the first embodiment.
[0068]
【The invention's effect】
According to the present invention, as described above, the dimensions can be measured from a single image by a simple process without requiring any special equipment.
[0069]
In addition, the processing can be performed only for the necessary part, so that the processing time can be reduced.
[0070]
In addition, there is no need to perform complicated operations during shooting.
[Brief description of the drawings]
FIG. 1 is a perspective view of a first embodiment. FIG. 2 is an operation explanatory view of a first embodiment. FIG. 3 is an operation explanatory view of a first embodiment. FIG. 4 is an operation explanatory view of a first embodiment. FIG. 6 is a diagram illustrating the operation of the first embodiment. FIG. 7 is a diagram illustrating the operation of the first embodiment. FIG. 8 is a diagram illustrating the operation of the first embodiment. FIG. 10 is a diagram illustrating the operation of the first embodiment. FIG. 11 is a diagram illustrating the operation of the first embodiment. FIG. 12 is a diagram illustrating the operation of the first embodiment. FIG. 13 is a first embodiment. FIG. 14 is a diagram illustrating the operation of the first embodiment. FIG. 15 is a diagram illustrating the operation of the second embodiment. FIG. 16A and FIG. 16B are diagrams illustrating the operation of the third embodiment. (A), (b) Operation explanatory diagram of third embodiment [FIG. 18] Operation explanatory diagram of third embodiment [FIG. 19] (a), (b) Operation explanatory diagram of conventional example [FIG. A flowchart of a conventional example [Description of symbols]
1 PC 2 Digital camera C0 Reference point G Reference rectangle h Area l Dimension R Outline S Reference rectangle S1 Reference rectangle for inclination correction

Claims (5)

ディスプレイに表示された画像から、高さと幅寸法とが既知の矩形状のものを選択して設定すると、前記設定された矩形の座標に基づいて矩形の対角線の交点を算出し、算出した交点の座標を基準点として、その基準点から矩形の高さと幅寸法とに基づいて画像上のX軸とY軸方向のスケールを求め、その求めたスケールで基準点から指定された画像上の2点間の座標を算出し、算出した座標から2点間の寸法を測定する画像寸法の測定方法。From the image displayed on the display, when selecting and setting a rectangular shape whose height and width are known, the intersection of the diagonal of the rectangle is calculated based on the coordinates of the set rectangle, and the calculated intersection of the intersection is calculated. Using the coordinates as a reference point, scales in the X-axis and Y-axis directions on the image are obtained from the reference point based on the height and width dimensions of the rectangle, and two points on the image specified from the reference point using the obtained scale. A method of measuring an image dimension, in which coordinates between the two points are calculated, and a dimension between two points is measured from the calculated coordinates. 上記画像に高さと幅寸法とが既知の矩形状のものを写し込み、写し込んだ矩形状のものをディスプレイに表示された画像から選択して設定すると、前記設定された矩形の座標に基づいて矩形の対角線の交点を算出し、算出した交点の座標を基準点として、その基準点から矩形の高さと幅寸法とに基づいて画像上のX軸とY軸方向のスケールを求め、その求めたスケールで基準点から指定された画像上の2点間の座標を算出し、算出した座標から2点間の寸法を測定する請求項1に記載の画像寸法の測定方法。When a rectangular shape having a known height and width is printed on the image, and the copied rectangular shape is selected from the image displayed on the display and set, based on the coordinates of the set rectangle. The intersection of the diagonal lines of the rectangle is calculated, and the coordinates of the calculated intersection are used as a reference point, and the X-axis and Y-axis directions on the image are scaled from the reference point based on the height and width dimensions of the rectangle. The method according to claim 1, wherein coordinates between two points on the image specified from the reference point on the scale are calculated, and a dimension between the two points is measured from the calculated coordinates. 上記画像あるいは上記画像と矩形とをデジタルカメラで撮影したものを取り込んでディスプレイに表示させたものとし、その表示させた画像から高さと幅寸法とが既知の矩形状のものを選択して設定すると、前記設定された矩形の座標に基づいて矩形の対角線の交点を算出し、算出した交点の座標を基準点として、その基準点から矩形の高さと幅寸法とに基づいて画像上のX軸とY軸方向のスケールを求め、その求めたスケールで基準点から指定された画像上の2点間の座標を算出し、算出した座標から2点間の寸法を測定する請求項1または2に記載の画像寸法の測定方法。It is assumed that the image or the image and a rectangle taken with a digital camera are captured and displayed on a display, and a rectangular shape having a known height and width is selected from the displayed image and set. Calculating the intersection of the diagonal lines of the rectangle based on the coordinates of the set rectangle, and using the coordinates of the calculated intersection as a reference point and the X axis on the image based on the height and width dimensions of the rectangle from the reference point. 3. The scale according to claim 1, wherein a scale in the Y-axis direction is obtained, coordinates between two points on the image specified from the reference point are calculated using the obtained scale, and a dimension between the two points is measured from the calculated coordinates. How to measure image dimensions. 上記画像の線分で囲まれたエリアを指定すると、その指定された線分の寸法を測定して、その線分で囲まれた面積を算出するようにした請求項1乃至3のいずれかに記載の画像寸法の測定方法。4. The method according to claim 1, wherein, when an area surrounded by the line segment of the image is designated, a dimension of the designated line segment is measured, and an area surrounded by the line segment is calculated. How to measure the stated image dimensions. 上記画像内に傾き補正用の矩形を設定し、その設定した傾き補正用の矩形に基づいて、上記設定した高さと幅寸法とが既知の矩形状のものの傾きを補正し、その補正した矩形から基準点を算出し、その算出した基準点から補正した矩形の高さと幅寸法とに基づいてX軸方向とY軸方向のスケールを求め、その求めたスケールで基準点から指定された画像上の2点間の座標を算出し、算出した座標から2点間の寸法を測定する請求項1乃至4のいずれかに記載の画像寸法の測定方法。A rectangle for tilt correction is set in the image, and based on the set rectangle for tilt correction, the set height and width are corrected for the tilt of a known rectangular shape. A reference point is calculated, and scales in the X-axis direction and the Y-axis direction are obtained based on the height and width dimensions of the rectangle corrected from the calculated reference point. The method according to claim 1, wherein coordinates between two points are calculated, and a dimension between the two points is measured from the calculated coordinates.
JP2002380392A 2002-12-27 2002-12-27 Method of measuring dimension of image Pending JP2004212142A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002380392A JP2004212142A (en) 2002-12-27 2002-12-27 Method of measuring dimension of image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002380392A JP2004212142A (en) 2002-12-27 2002-12-27 Method of measuring dimension of image

Publications (1)

Publication Number Publication Date
JP2004212142A true JP2004212142A (en) 2004-07-29

Family

ID=32816632

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002380392A Pending JP2004212142A (en) 2002-12-27 2002-12-27 Method of measuring dimension of image

Country Status (1)

Country Link
JP (1) JP2004212142A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006308598A (en) * 2005-04-29 2006-11-09 Hilti Ag Portable-type survey result documentation system
JP2011198293A (en) * 2010-03-23 2011-10-06 Computer System Kenkyusho:Kk Cad information generation system, method thereof, and program
JP2012037945A (en) * 2010-08-03 2012-02-23 Matsuno Design Tenpo Kenchiku Kk Design manufacturing apparatus and method
JP2014173990A (en) * 2013-03-08 2014-09-22 Topcon Corp Measuring device
JP2016184331A (en) * 2015-03-26 2016-10-20 サイトセンシング株式会社 3d model creation device, 3d model creation method, and 3d model creation program
JP2016200533A (en) * 2015-04-13 2016-12-01 トヨタ自動車株式会社 Correction method for correcting square
CN112991459A (en) * 2021-03-09 2021-06-18 北京百度网讯科技有限公司 Camera calibration method, device, equipment and storage medium
KR20210155974A (en) * 2020-06-17 2021-12-24 한국과학기술원 Method and Apparatus for Instance Segmentation Based Object Size Estimation from Single Indoor Image
CN114018932A (en) * 2021-11-02 2022-02-08 西安电子科技大学 Pavement disease index measuring method based on rectangular calibration object
WO2023195456A1 (en) * 2022-04-04 2023-10-12 京セラ株式会社 Electronic instrument, and method for controlling electronic instrument

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006308598A (en) * 2005-04-29 2006-11-09 Hilti Ag Portable-type survey result documentation system
JP2011198293A (en) * 2010-03-23 2011-10-06 Computer System Kenkyusho:Kk Cad information generation system, method thereof, and program
JP2012037945A (en) * 2010-08-03 2012-02-23 Matsuno Design Tenpo Kenchiku Kk Design manufacturing apparatus and method
JP2014173990A (en) * 2013-03-08 2014-09-22 Topcon Corp Measuring device
JP2016184331A (en) * 2015-03-26 2016-10-20 サイトセンシング株式会社 3d model creation device, 3d model creation method, and 3d model creation program
JP2016200533A (en) * 2015-04-13 2016-12-01 トヨタ自動車株式会社 Correction method for correcting square
KR20210155974A (en) * 2020-06-17 2021-12-24 한국과학기술원 Method and Apparatus for Instance Segmentation Based Object Size Estimation from Single Indoor Image
KR102389295B1 (en) 2020-06-17 2022-04-22 한국과학기술원 Method and Apparatus for Instance Segmentation Based Object Size Estimation from Single Indoor Image
CN112991459A (en) * 2021-03-09 2021-06-18 北京百度网讯科技有限公司 Camera calibration method, device, equipment and storage medium
CN112991459B (en) * 2021-03-09 2023-12-12 阿波罗智联(北京)科技有限公司 Camera calibration method, device, equipment and storage medium
CN114018932A (en) * 2021-11-02 2022-02-08 西安电子科技大学 Pavement disease index measuring method based on rectangular calibration object
WO2023195456A1 (en) * 2022-04-04 2023-10-12 京セラ株式会社 Electronic instrument, and method for controlling electronic instrument

Similar Documents

Publication Publication Date Title
JP4832878B2 (en) Image composition processing apparatus and method
US8326021B2 (en) Measurement apparatus and control method
US7746377B2 (en) Three-dimensional image display apparatus and method
US20070168153A1 (en) Method and apparatus for photographic measurement
JP2007036482A (en) Information projection display and program
JPH10221072A (en) System and method for photogrammetry
JP2000163590A (en) Conversion device and method for three-dimensional model
US20060008268A1 (en) Three-dimensional image processing apparatus, optical axis adjusting method, and optical axis adjustment supporting method
Soycan et al. Perspective correction of building facade images for architectural applications
JP3690581B2 (en) POSITION DETECTION DEVICE AND METHOD THEREFOR, PLAIN POSITION DETECTION DEVICE AND METHOD THEREOF
JP2007147522A (en) Photogrammetry and photogrammetry program
JP2004212142A (en) Method of measuring dimension of image
US10573072B2 (en) Image processing device, image processing method, and recording medium
JP4112077B2 (en) Image measurement processing method and apparatus, and recording medium recording image measurement processing program
KR101996226B1 (en) Apparatus for measuring three-dimensional position of subject and method thereof
JP3924576B2 (en) Three-dimensional measurement method and apparatus by photogrammetry
JP2005174151A (en) Three-dimensional image display device and method
JP4846304B2 (en) Camera posture grasp method, photogrammetry method using the same, and programs thereof
JP3577202B2 (en) Video production equipment
TWI662694B (en) 3d image capture method and system
JP5673293B2 (en) Image composition method, image composition apparatus, program, and recording medium
JP2016224015A (en) Three-dimensional position measurement method, surveying method, three-dimensional position measurement apparatus, and three-dimensional position measurement program
JP2023546037A (en) image recording device
JPH10214349A (en) Method and instrument for measuring photographic parameter and recording medium
JP2004325072A (en) Photogrammetry and photogrammetric program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20051221

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20071128

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20071211

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20080408