JP2021139672A - Area measuring device, area measuring method, and program - Google Patents

Area measuring device, area measuring method, and program Download PDF

Info

Publication number
JP2021139672A
JP2021139672A JP2020035836A JP2020035836A JP2021139672A JP 2021139672 A JP2021139672 A JP 2021139672A JP 2020035836 A JP2020035836 A JP 2020035836A JP 2020035836 A JP2020035836 A JP 2020035836A JP 2021139672 A JP2021139672 A JP 2021139672A
Authority
JP
Japan
Prior art keywords
area
subject
target
coordinates
image
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.)
Granted
Application number
JP2020035836A
Other languages
Japanese (ja)
Other versions
JP7463133B2 (en
Inventor
東吉 南
Tokichi Minami
東吉 南
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2020035836A priority Critical patent/JP7463133B2/en
Publication of JP2021139672A publication Critical patent/JP2021139672A/en
Application granted granted Critical
Publication of JP7463133B2 publication Critical patent/JP7463133B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Length Measuring Devices By Optical Means (AREA)

Abstract

To provide an area measuring device with which it is possible to acquire the actual area of a region on a subject on the basis of a photographed image.SOLUTION: An area measuring device 100 comprises: feature point detection means 105 for detecting the coordinates of feature points of prescribed pattern light from a photographed image of a target subject 111 to which prescribed pattern light including a plurality of feature points is projected; distance acquisition means 103a for acquiring a subject distance at the time the target subject is photographed; coordinate holding means 106 for holding a previously prepared prescribed reference coordinate and the subject distance in association; image conversion means 107 for performing an image conversion process on the photographed image of the target subject on the basis of projection conversion in which the coordinates of feature points detected from the photographed image of the target subject and the reference coordinates corresponding to the target subject on that occasion are used; region detection means 108 for detecting a target region from the photographed image after the image conversion process; and area acquisition means 109 for acquiring the area of the target region from the number of pixels of the target region and the area per pixel that is based on the subject distance.SELECTED DRAWING: Figure 1

Description

本発明は、被写体領域の面積を計測する技術に関する。 The present invention relates to a technique for measuring the area of a subject area.

特許文献1には、画像情報に応じた投影光をスクリーンに投影するプロジェクタにおいて、投影画像を撮影してスクリーンの角度情報を計算し、その角度情報を基に投影画像の台形補正を行う技術が開示されている。特許文献1の技術では、光学系を光軸方向に移動させながら連続的に投影画像を撮影した画像内の所定領域のコントラスト値が最大となるピーク位置を、距離情報として画像内の複数の領域で取得し、それら距離情報を基にスクリーンの角度情報を計算する。 Patent Document 1 describes a technique in which a projector that projects projected light according to image information onto a screen captures a projected image, calculates the angle information of the screen, and corrects the keystone of the projected image based on the angle information. It is disclosed. In the technique of Patent Document 1, a plurality of regions in the image are used as distance information at the peak position where the contrast value of the predetermined region in the image in which the projected image is continuously captured while moving the optical system in the optical axis direction is maximized. And calculate the screen angle information based on the distance information.

特開2004−208089号公報Japanese Unexamined Patent Publication No. 2004-208089

ところで、近年は、撮影された画像を基に、被写体上の領域の実面積を求めることが望まれている。なお、前述した特許文献1の技術の場合、被写体上の領域までの距離や被写体の角度を計算することはできるが、その領域の実面積を求めるようなことについては全く想定されていない。 By the way, in recent years, it has been desired to obtain the actual area of the area on the subject based on the captured image. In the case of the technique of Patent Document 1 described above, it is possible to calculate the distance to the area on the subject and the angle of the subject, but it is not assumed at all that the actual area of the area is obtained.

そこで、本発明は、撮影された画像を基に、被写体上の領域の実面積を取得可能にすることを目的とする。 Therefore, an object of the present invention is to make it possible to acquire the actual area of the area on the subject based on the captured image.

本発明の面積計測装置は、複数の特徴点を含む所定のパターン光が投影された対象被写体を撮影した撮影画像から、前記投影された所定のパターン光の前記特徴点の座標を検出する特徴点検出手段と、前記対象被写体が撮影された際の被写体距離を取得する距離取得手段と、事前に用意された所定の参照座標と被写体距離とを対応付けて保持する座標保持手段と、前記対象被写体の前記撮影画像から前記検出した前記特徴点の座標と、当該対象被写体を撮影した際の被写体距離に対応した前記参照座標とを用いた射影変換に基づいて、前記対象被写体の撮影画像に画像変換処理を行う画像変換手段と、前記画像変換処理を行った後の前記対象被写体の撮影画像から、面積計測を行う対象領域を検出する領域検出手段と、前記領域検出手段によって前記検出された前記対象領域の画素数と、前記対象被写体を前記撮影した際の被写体距離に基づく画素当たりの面積とから、前記対象領域の面積を取得する面積取得手段と、を有することを特徴とする。 The area measuring device of the present invention is a feature inspection that detects the coordinates of the feature points of the projected predetermined pattern light from a photographed image of a target subject on which a predetermined pattern light including a plurality of feature points is projected. An output means, a distance acquisition means for acquiring a subject distance when the target subject is photographed, a coordinate holding means for holding a predetermined reference coordinate prepared in advance and a subject distance in association with each other, and the target subject. Based on the projection conversion using the coordinates of the feature point detected from the captured image and the reference coordinates corresponding to the subject distance when the target subject is photographed, the image is converted into the captured image of the target subject. An image conversion means for performing processing, an area detecting means for detecting a target area for area measurement from a captured image of the target subject after performing the image conversion processing, and the target detected by the area detecting means. It is characterized by having an area acquisition means for acquiring the area of the target area from the number of pixels of the region and the area per pixel based on the subject distance when the target subject is photographed.

本発明によれば、撮影された画像を基に、被写体上の領域の実面積を取得可能となる。 According to the present invention, it is possible to acquire the actual area of the area on the subject based on the captured image.

面積計測装置のシステム構成例を示す図である。It is a figure which shows the system configuration example of the area measuring apparatus. 面積計測処理の大まかな流れを示すフローチャートである。It is a flowchart which shows the rough flow of area measurement processing. 特徴点座標取得処理のフローチャートである。It is a flowchart of the feature point coordinate acquisition process. 投影パターンと被写体の同時撮影による面積計測のフローチャートである。It is a flowchart of area measurement by simultaneous shooting of a projection pattern and a subject. 投影パターン撮影後の被写体撮影による面積計測のフローチャートである。It is a flowchart of area measurement by subject shooting after projection pattern shooting. 画素当たりの面積計算の説明図である。It is explanatory drawing of area calculation per pixel. ライン投影パターンの例を示す図である。It is a figure which shows the example of the line projection pattern. ポイント投影パターンの例を示す図である。It is a figure which shows the example of the point projection pattern. 格子投影パターンの例を示す図である。It is a figure which shows the example of the grid projection pattern. 撮影角度が大きい場合の通知画面例を示す図である。It is a figure which shows the example of the notification screen when the shooting angle is large. 特徴点が被写体にかかる場合の通知画面例を示す図である。It is a figure which shows the example of the notification screen when a feature point touches a subject. 特徴点が被写体から離れている場合の通知画面例を示す図である。It is a figure which shows the example of the notification screen when a feature point is away from a subject.

以下、本発明の実施形態を、添付の図面に基づいて詳細に説明する。なお、以下の実施形態において示す構成は一例にすぎず、本発明は図示された構成に限定されるものではない。
図1は、本実施形態に係る面積計測装置100を有するシステム全体の構成例を示した図である。本実施形態の面積計測装置100は、計測対象となる被写体(以下、対象被写体111とする)上の所望の領域(以下、対象領域112とする)の実面積を計測する機能を備えた装置である。本実施形態の面積計測装置100は、撮像部101、投影部102、撮像処理部103、撮影画像保存部104、特徴点検出部105、特徴点座標保持部106、画像変換部107、領域検出部108、面積取得部109、および表示部110を備えている。
Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. The configuration shown in the following embodiments is only an example, and the present invention is not limited to the illustrated configuration.
FIG. 1 is a diagram showing a configuration example of the entire system including the area measuring device 100 according to the present embodiment. The area measuring device 100 of the present embodiment is a device having a function of measuring the actual area of a desired area (hereinafter referred to as a target area 112) on a subject to be measured (hereinafter referred to as a target subject 111). be. The area measuring device 100 of the present embodiment includes an imaging unit 101, a projection unit 102, an imaging processing unit 103, a captured image storage unit 104, a feature point detection unit 105, a feature point coordinate holding unit 106, an image conversion unit 107, and an area detection unit. It includes 108, an area acquisition unit 109, and a display unit 110.

投影部102は、光学的に分解可能な特徴点を四つ以上含む所定のパターン光(以下、投影パターンとする)を、投影可能範囲内の所望の投影領域に対して投影する機能を有する投影装置である。 The projection unit 102 has a function of projecting a predetermined pattern light (hereinafter referred to as a projection pattern) including four or more optically decomposable feature points onto a desired projection area within the projectable range. It is a device.

本実施形態において、光学的に分解可能な特徴点としては、例えばパターン光の特定の色(光の波長)、特定の照度、特定の形状などを挙げることができる。本実施形態における投影パターンは、これらの特徴点の少なくともいずれかが、当該パターン内の領域毎若しくは点領域毎に制御(調整)されたものとなされている。すなわち、投影部102は、投影制御部103bによる制御の下で、それら特定の色(光の波長)、特定の照度、特定の形状などの特徴点を、投影するパターン内の領域毎若しくは点領域毎に調整可能となされている。ここで、特徴点として例えば特定の色が用いられる場合、その特徴点の色は、一例として、光の三原色であるRGB値が所定の範囲内に収まる色を挙げることができる。また特徴点として例えば特定の形状が用いられる場合、その特定の形状は、一例として、直線が交差した交点部分の形状などを挙げることができる。もちろんこれらはあくまで一例であり、さらに他の色や形状等の特徴点であってもよい。本実施形態において投影部102から投影される投影パターンは、前述した特定の色、特定の照度、特定の形状などの、少なくともいずれかの特徴点が、そのパターン内の四つ以上の異なる位置にそれぞれ配されたパターンとなされている。本実施形態における投影パターンの具体的な例については後に詳述する。 In the present embodiment, as the feature points that can be optically decomposed, for example, a specific color (wavelength of light) of the pattern light, a specific illuminance, a specific shape, and the like can be mentioned. In the projection pattern in the present embodiment, at least one of these feature points is controlled (adjusted) for each region or each point region in the pattern. That is, under the control of the projection control unit 103b, the projection unit 102 projects feature points such as a specific color (wavelength of light), a specific illuminance, and a specific shape into each region or point region in the pattern to be projected. It is adjustable for each. Here, for example, when a specific color is used as the feature point, the color of the feature point may be, for example, a color in which the RGB values, which are the three primary colors of light, fall within a predetermined range. Further, when a specific shape is used as the feature point, for example, the specific shape may be, for example, the shape of an intersection portion where straight lines intersect. Of course, these are just examples, and may be other feature points such as color and shape. In the projection pattern projected from the projection unit 102 in the present embodiment, at least one of the feature points such as the specific color, the specific illuminance, and the specific shape described above is located at four or more different positions in the pattern. Each pattern is arranged. Specific examples of the projection pattern in this embodiment will be described in detail later.

また本実施形態おいて、投影可能範囲とは、投影部102の投影画角内で且つ投影パターンの光が有効に届く距離内の範囲であるとする。投影部102の投影画角は固定であっても、或いは可変であってもよい。なお投影画角が可変である場合、その投影画角の変化に応じて、投影可能範囲も変化することになる。本実施形態の場合、投影部102の投影可能範囲内に対象被写体111が入るようにし、その対象被写体111を所望の投影領域として、投影部102から投影パターンが投影される。 Further, in the present embodiment, the projectable range is defined as a range within the projection angle of view of the projection unit 102 and within a distance within which the light of the projection pattern can effectively reach. The projection angle of view of the projection unit 102 may be fixed or variable. When the projected angle of view is variable, the projectable range also changes according to the change in the projected angle of view. In the case of the present embodiment, the target subject 111 is placed within the projectable range of the projection unit 102, and the projection pattern is projected from the projection unit 102 with the target subject 111 as a desired projection area.

撮像部101は、少なくともフォーカスレンズを含む、撮像光学系(レンズ、レンズユニット)101bと、撮像光学系101bによって結像された被写体等の光画像を光電変換して撮像信号に変換出力する撮像素子101aと、を有する撮像装置である。本実施形態において、撮像部101の撮影画角は、固定であってもよいし可変であってもよく、いずれの場合でも前述した投影パターンが投影されている状態の対象被写体111を、その投影パターンを含めて撮像可能であるとする。もちろん、撮像部101は、投影パターンが投影されていない状態の対象被写体111を撮像することも可能である。そして、撮像部101は、投影パターンが投影されている状態の対象被写体111を撮像した撮像信号、または、投影パターンが投影されていない対象被写体111を撮像した撮像信号を、撮像処理部103に出力する。 The image pickup unit 101 is an image pickup element that photoelectrically converts an image pickup optical system (lens, lens unit) 101b including at least a focus lens and an optical image of a subject or the like imaged by the image pickup optical system 101b into an image pickup signal and outputs the light image. It is an image pickup apparatus having 101a. In the present embodiment, the shooting angle of view of the imaging unit 101 may be fixed or variable, and in any case, the target subject 111 in the state where the above-mentioned projection pattern is projected is projected. It is assumed that the image can be taken including the pattern. Of course, the imaging unit 101 can also image the target subject 111 in a state where the projection pattern is not projected. Then, the imaging unit 101 outputs to the imaging processing unit 103 an imaging signal that captures the target subject 111 in which the projection pattern is projected or an imaging signal that captures the target subject 111 in which the projection pattern is not projected. do.

また本実施形態の面積計測装置100において、撮像部101の撮像光学系101bと投影部102の投影光学系とはそれぞれの光軸が平行になるように設置され、また撮像部101の撮影方向と投影部102の投影方向とは一致していることが望ましい。なお、以下の説明において、単に「光軸」とのみ記載した場合には、前述のように互いに平行な撮像光学系101bの光軸と投影光学系の光軸との両方を含んでいるものとする。 Further, in the area measuring device 100 of the present embodiment, the imaging optical system 101b of the imaging unit 101 and the projection optical system of the projection unit 102 are installed so that their optical axes are parallel to each other, and also with the imaging direction of the imaging unit 101. It is desirable that the projection direction of the projection unit 102 coincides with that of the projection direction. In the following description, when only the "optical axis" is described, it is assumed that both the optical axis of the imaging optical system 101b and the optical axis of the projection optical system, which are parallel to each other, are included as described above. do.

撮像処理部103は、撮像部101からの撮像信号を画像データに変換し、その画像データを撮影画像保存部104に送出する。以下、投影パターンが投影された状態または投影パターンが投影されていない状態の対象被写体111を撮像部101で撮像し、その撮像信号を撮像処理部103で変換した画像データを、対象被写体画像と表記する。また以下の説明において、投影パターンが投影された状態の対象被写体111を撮影することで得られた対象被写体画像については、特に、「投影パターンを含む対象被写体画像」と呼ぶことにする。 The image pickup processing unit 103 converts the image pickup signal from the image pickup unit 101 into image data, and sends the image data to the photographed image storage unit 104. Hereinafter, the image data obtained by imaging the target subject 111 in the state where the projection pattern is projected or the projection pattern is not projected by the imaging unit 101 and converting the imaging signal by the imaging processing unit 103 is referred to as the target subject image. do. Further, in the following description, the target subject image obtained by photographing the target subject 111 in the state where the projection pattern is projected will be particularly referred to as “target subject image including the projection pattern”.

また本実施形態において、撮像処理部103は、焦点調節部103aと投影制御部103bとを備えている。
投影制御部103bは、前述した投影部102における投影可能範囲内の所望の投影領域の指定、投影開始、および投影停止を制御する。すなわち、本実施形態の場合、投影制御部103bは、投影部102に対して、投影可能範囲内の所望の投影領域を指定して、前述した投影パターンの投影の開始および停止を指示する。
Further, in the present embodiment, the image pickup processing unit 103 includes a focus adjustment unit 103a and a projection control unit 103b.
The projection control unit 103b controls the designation, projection start, and projection stop of a desired projection area within the projectable range in the projection unit 102 described above. That is, in the case of the present embodiment, the projection control unit 103b instructs the projection unit 102 to start and stop the projection of the projection pattern described above by designating a desired projection area within the projectable range.

焦点調節部103aは、撮像部101の撮像光学系101bのフォーカスレンズを駆動制御することで、対象被写体111に対するオートフォーカス制御(合焦制御)を行う。本実施形態の場合、焦点調節部103aは、撮像部101からの撮像信号を基に、いわゆるコントラストAF方式によるオートフォーカス制御を行う。コントラストAFでは、撮像光学系101bのフォーカスレンズを光軸方向に移動させながら撮像素子101aで連続的に撮像した画像内の所定の検出領域のコントラスト値が最大となったときのフォーカスレンズ位置が、合焦位置となされる。 The focus adjustment unit 103a performs autofocus control (focus control) on the target subject 111 by driving and controlling the focus lens of the image pickup optical system 101b of the image pickup unit 101. In the case of the present embodiment, the focus adjustment unit 103a performs autofocus control by the so-called contrast AF method based on the image pickup signal from the image pickup unit 101. In contrast AF, the focus lens position when the contrast value of a predetermined detection region in the image continuously captured by the image sensor 101a is maximized while moving the focus lens of the image pickup optical system 101b in the optical axis direction is set. It is in focus position.

また焦点調節部103aは、対象被写体111に合焦した際の、撮像部101から対象被写体111までの距離(対象被写体距離とする)を算出する距離測定部としての機能も備えている。本実施形態の場合、焦点調節部103aの距離測定部は、例えばコントラストAFにおける焦点調整量またはフォーカスレンズ移動量に基づいて対象被写体距離を算出する。なお本実施形態では、オートフォーカス制御の方式としてコントラストAFを例に挙げたが、この例に限らず、いわゆる位相差AFやその他のAF方式でもよい。それらの場合、焦点調節部103aの距離測定部は、位相差AFやその他のAF方式における焦点調整量またはフォーカスレンズ移動量に基づいて対象被写体距離を算出する。 The focus adjusting unit 103a also has a function as a distance measuring unit that calculates the distance from the imaging unit 101 to the target subject 111 (referred to as the target subject distance) when the subject is focused on the target subject 111. In the case of the present embodiment, the distance measuring unit of the focus adjusting unit 103a calculates the target subject distance based on, for example, the focus adjustment amount or the focus lens movement amount in the contrast AF. In the present embodiment, contrast AF has been given as an example of the autofocus control method, but the present invention is not limited to this example, and so-called phase difference AF or other AF methods may be used. In these cases, the distance measuring unit of the focus adjusting unit 103a calculates the target subject distance based on the focus adjustment amount or the focus lens movement amount in the phase difference AF and other AF methods.

撮影画像保存部104は、撮像部101が対象被写体111を撮像して得られた対象被写体画像を、その撮像時に焦点調節部103aの距離取得部が計測した対象被写体距離の情報と対応付けて保存する。そして、撮影画像保存部104は、その保存した対象被写体画像や対象被写体距離の情報を、面積計測装置100の他の機能部からの要求に応じて送出する。なお本実施形態では、対象被写体距離の情報が、撮影画像保存部104に保存される例を挙げたが、対象被写体画像との対応付けがわかるのであれば、別途設けられた他の保存部(不図示)或いは面積計測装置100内の他の機能部等に保存されてもよい。 The captured image storage unit 104 stores the target subject image obtained by imaging the target subject 111 by the imaging unit 101 in association with the target subject distance information measured by the distance acquisition unit of the focus adjustment unit 103a at the time of imaging. do. Then, the captured image storage unit 104 sends out the saved target subject image and target subject distance information in response to a request from another functional unit of the area measuring device 100. In the present embodiment, the example in which the information of the target subject distance is stored in the captured image storage unit 104 has been given, but if the correspondence with the target subject image can be known, another storage unit (separately provided) may be provided. (Not shown) or may be stored in another functional unit or the like in the area measuring device 100.

特徴点検出部105は、撮影画像保存部104から、投影パターンを含む対象被写体画像を取得し、その対象被写体画像に含まれる投影パターンから前述した四つ以上の各特徴点をそれぞれ検出する。すなわち特徴点検出部105は、前述したように、投影パターン光において領域毎に制御された特定の照度、特定の波長、特定の形状の、少なくともいずれかを、特徴点として検出可能となされている。例えば、特徴点が特定の色である場合、特徴点検出部105は、投影パターンを含む対象被写体画像の中で、RGB値が所定の範囲内に収まる複数の画素が隣接している領域を、特徴点領域として検出する。そして、特徴点検出部105は、その検出した特徴点領域の中心座標を特徴点として検出し、その特徴点の座標を取得する。なお特徴点の座標の求め方は、前述したような特徴点領域の中心座標を求める方式に限定されるものではなく、他方式で求められてもよい。また例えば、特徴点が特定の形状であってその形状が、交差している直線の交点部分である場合、特徴点検出部105は、例えば同じ色領域の画素から直線近似を行い、その直線が交差している場合の交点部分を特徴点として検出し、その特徴点の座標を取得する。なお、同じ色領域の画素に基づく近似は直線近似に限定されるものではなく、多次元近似などでもよい。特徴点の検出方法はこれらの例に限定するものではなく、他の方法、色、形状などから特徴点を検出可能な方法であれば既存のいずれの方法でもよい。以下、投影パターンを含む対象被写体画像から検出された特徴点の座標を「対象座標」と呼ぶことにする。 The feature point detection unit 105 acquires a target subject image including a projection pattern from the captured image storage unit 104, and detects each of the four or more feature points described above from the projection pattern included in the target subject image. That is, as described above, the feature point detection unit 105 can detect at least one of a specific illuminance, a specific wavelength, and a specific shape controlled for each region in the projection pattern light as a feature point. .. For example, when the feature points have a specific color, the feature point detection unit 105 determines a region in the target subject image including the projection pattern in which a plurality of pixels whose RGB values fall within a predetermined range are adjacent to each other. Detected as a feature point area. Then, the feature point detection unit 105 detects the center coordinates of the detected feature point region as a feature point, and acquires the coordinates of the feature point. The method of obtaining the coordinates of the feature point is not limited to the method of obtaining the center coordinates of the feature point region as described above, and may be obtained by another method. Further, for example, when the feature point has a specific shape and the shape is an intersection portion of intersecting straight lines, the feature point detection unit 105 performs linear approximation from, for example, pixels in the same color region, and the straight line is The intersection part at the time of intersection is detected as a feature point, and the coordinates of the feature point are acquired. The approximation based on pixels in the same color region is not limited to the linear approximation, and may be a multidimensional approximation or the like. The method for detecting feature points is not limited to these examples, and any existing method may be used as long as it can detect feature points from other methods, colors, shapes, and the like. Hereinafter, the coordinates of the feature points detected from the target subject image including the projection pattern will be referred to as "target coordinates".

特徴点座標保持部106は、予め用意された、参照座標の情報と参照被写体距離の情報とを対応付けて保持している。参照座標は、例えば、前述同様の投影パターンが投影された平面被写体を、被写体距離を変えながら正面撮影により撮影した複数の画像(平面被写体画像とする)から、特徴点検出部105が前述同様の特徴点検出処理によって検出した特徴点の座標である。また本実施形態において、参照被写体距離は、前述同様の投影パターンが投影された平面被写体を、被写体距離を変えながら正面撮影により撮影した時の、当該被写体距離である。また本実施形態において、参照座標は、メカニックの設計値と調整などにより求まる参照被写体距離を変数とする特徴点座標の計算式によって求められてもよい。或いは、参照座標は、投影パターンが投影された平面被写体を撮影した平面被写体画像から求める方法と、参照被写体距離を変数とする特徴点座標の計算式により求める方法との、二つの方法を組み合わせて求められてもよい。このように本実施形態において、特徴点座標保持部106は、前以って用意された参照座標と参照被写体距離とを対応付けるようにして保持している。 The feature point coordinate holding unit 106 holds the information of the reference coordinates and the information of the reference subject distance prepared in advance in association with each other. The reference coordinates are the same as those described above, for example, from a plurality of images (referred to as flat subject images) taken by frontal photography of a flat subject on which the same projection pattern as described above is projected while changing the subject distance. These are the coordinates of the feature points detected by the feature point detection process. Further, in the present embodiment, the reference subject distance is the subject distance when a flat subject on which the same projection pattern as described above is projected is photographed by frontal photography while changing the subject distance. Further, in the present embodiment, the reference coordinates may be obtained by a calculation formula of feature point coordinates in which the reference subject distance obtained by the design value and adjustment of the mechanic is a variable. Alternatively, the reference coordinates can be obtained by combining two methods: a method of obtaining the plane subject on which the projection pattern is projected from a photographed plane subject image, and a method of obtaining the reference coordinates by a calculation formula of feature point coordinates using the reference subject distance as a variable. You may be asked. As described above, in the present embodiment, the feature point coordinate holding unit 106 holds the reference coordinates prepared in advance and the reference subject distance in association with each other.

なお、参照座標を取得する際に使用する平面被写体は、表面が一様な平面を有する被写体であればよいが、より望ましくは、対象被写体111と同様の色や質感を有し、且つ対象被写体111上に対象領域112が存在しない一様な表面の被写体の方がよい。また本実施形態において、正面撮影とは、被写体面に対して、撮像部101の撮像光学系101bの光軸が直交した状態で撮影することである。以下、本実施形態では、正面撮影によって得られた画像を「正面画像」と呼ぶことにする。一方、撮像光学系101bの光軸に対して被写体面が直交していない状態、つまり正面撮影でない状態で撮影した画像を、「傾斜画像」と呼ぶことにする。 The flat subject used for acquiring the reference coordinates may be a subject having a uniform surface, but more preferably, the target subject has the same color and texture as the target subject 111 and has the same color and texture as the target subject 111. A subject having a uniform surface on which the target area 112 does not exist on 111 is preferable. Further, in the present embodiment, the frontal shooting means shooting in a state where the optical axis of the imaging optical system 101b of the imaging unit 101 is orthogonal to the subject surface. Hereinafter, in the present embodiment, the image obtained by frontal photography will be referred to as a "frontal image". On the other hand, an image taken in a state where the subject surface is not orthogonal to the optical axis of the imaging optical system 101b, that is, in a state where the frontal shooting is not performed, is referred to as an "inclined image".

本実施形態において、特徴点座標保持部106が保持している参照被写体距離毎の参照座標は、後述するように、正面撮影でない状態で対象被写体111を撮影した傾斜画像を、正面撮影された正面画像と同様の画像に変換する際に必要となる情報である。 In the present embodiment, the reference coordinates for each reference subject distance held by the feature point coordinate holding unit 106 are the front shots of the tilted image of the target subject 111 taken in a state other than the front shot, as described later. This is information required when converting to an image similar to an image.

すなわち本実施形態の面積計測装置100は、正面撮影ではない状態で対象被写体111が撮影されて得られた対象被写体画像(傾斜画像)から対象領域112の面積を計測する場合、その対象被写体画像を、正面撮影された正面画像と同様の画像に変換する。本実施形態において、傾斜画像になっている対象被写体画像を正面撮影されたような画像に変換する画像変換処理は、画像変換部107により行われる。このとき、画像変換部107は、投影パターンを含む対象被写体画像から検出される特徴点の座標(対象座標)と、特徴点座標保持部106が保持している参照被写体距離毎の参照座標とを、画像変換処理のための変換パラメータとして用いる。 That is, when the area measuring device 100 of the present embodiment measures the area of the target area 112 from the target subject image (tilted image) obtained by shooting the target subject 111 in a state other than the frontal shooting, the target subject image is used. , Converts to an image similar to the front image taken from the front. In the present embodiment, the image conversion process for converting the target subject image, which is an inclined image, into an image as if it was taken from the front is performed by the image conversion unit 107. At this time, the image conversion unit 107 transfers the coordinates of the feature points (target coordinates) detected from the target subject image including the projection pattern and the reference coordinates for each reference subject distance held by the feature point coordinate holding unit 106. , Used as a conversion parameter for image conversion processing.

このため、対象領域112の面積計測が行われる場合、画像変換部107は、投影パターンを含む対象被写体画像から検出される対象座標を、特徴点検出部105に対して要求する。この要求を受けた特徴点検出部105は、撮影画像保存部104から、投影パターンを含む対象被写体画像を取得し、その対象被写体画像から前述のようにして特徴点を検出して得た対象座標の情報を、画像変換部107に送る。 Therefore, when the area of the target area 112 is measured, the image conversion unit 107 requests the feature point detection unit 105 for the target coordinates detected from the target subject image including the projection pattern. In response to this request, the feature point detection unit 105 acquires a target subject image including a projection pattern from the captured image storage unit 104, and detects the feature points from the target subject image as described above to obtain the target coordinates. Information is sent to the image conversion unit 107.

またこのときの画像変換部107は、特徴点座標保持部106に対して、対象被写体距離と同距離の参照被写体距離に対応付けられている参照座標を要求する。そして、画像変換部107は、その要求に応じて特徴点座標保持部106から読み出された参照座標の情報を取得する。なおこのとき、特徴点座標保持部106が保持している参照座標に対応付けられた参照被写体距離の中に、対象被写体距離と同距離の参照被写体距離が存在しないことも考えられる。この場合、画像変換部107は、特徴点座標保持部106が保持している参照被写体距離の中で、例えば対象被写体距離に最も近い参照被写体距離に対応した参照座標を取得し、その参照座標を、当該参照被写体距離と対象被写体距離との差分に応じて補正してもよい。 Further, the image conversion unit 107 at this time requests the feature point coordinate holding unit 106 for the reference coordinates associated with the reference subject distance of the same distance as the target subject distance. Then, the image conversion unit 107 acquires the information of the reference coordinates read from the feature point coordinate holding unit 106 in response to the request. At this time, it is also conceivable that the reference subject distance having the same distance as the target subject distance does not exist in the reference subject distance associated with the reference coordinates held by the feature point coordinate holding unit 106. In this case, the image conversion unit 107 acquires the reference coordinates corresponding to, for example, the reference subject distance closest to the target subject distance among the reference subject distances held by the feature point coordinate holding unit 106, and obtains the reference coordinates. , May be corrected according to the difference between the reference subject distance and the target subject distance.

さらに画像変換部107は、撮影画像保存部104に対し、画像変換処理で正面画像に変換されることになる対象被写体画像と、その画像に対応付けられた対象被写体距離とを要求する。そして、画像変換部107は、その要求に応じて撮影画像保存部104から読み出された対象被写体画像と対象被写体距離の情報とを取得する。このとき画像変換部107が撮影画像保存部104から取得する対象被写体画像は、投影パターンを含む対象被写体画像でもよいし、投影パターンが投影されていない状態の対象被写体111を撮影した対象被写体画像でもよい。つまり、画像変換部107において正面画像への画像変換処理の対象となる画像は、必ずしも投影パターンを含む画像でなくてもよく、投影パターンが含まれない対象被写体画像であってもよい。 Further, the image conversion unit 107 requests the captured image storage unit 104 of the target subject image to be converted into the front image by the image conversion process and the target subject distance associated with the image. Then, the image conversion unit 107 acquires the target subject image and the target subject distance information read from the captured image storage unit 104 in response to the request. At this time, the target subject image acquired by the image conversion unit 107 from the captured image storage unit 104 may be a target subject image including a projection pattern, or a target subject image obtained by photographing the target subject 111 in a state where the projection pattern is not projected. good. That is, the image to be image-converted to the front image in the image conversion unit 107 does not necessarily have to be an image including a projection pattern, and may be a target subject image that does not include a projection pattern.

そして画像変換部107は、画像変換処理に用いる変換パラメータとして前述のようにして取得した対象座標と参照座標とを基に、傾斜画像になっている対象被写体画像を正面撮影されたような画像に変換する画像変換処理を行う。 Then, the image conversion unit 107 creates an image in which the target subject image, which is an inclined image, is taken in front based on the target coordinates and the reference coordinates acquired as described above as conversion parameters used in the image conversion process. Performs image conversion processing to be converted.

対象座標と参照座標を変換パラメータとして用いる画像変換処理についてさらに詳細に説明する。以下の説明では、参照座標として、投影パターンが投影された状態の平面被写体を撮影した平面被写体画像から検出された特徴点の座標が用いられる例を挙げる。ここで、投影パターンが投影された状態の平面被写体を撮影した平面被写体画像から検出される四つの特徴点のX,Y座標(すなわち参照座標)を、それぞれ(X1,Y1)、(X2,Y2)、(X3,Y3)、(X4,Y4)とする。一方、投影パラメータが投影された状態の対象被写体111を撮影した対象被写体画像から検出される四つの特徴点のx,y座標(すなわち対象座標)を、それぞれ(x1,y1)、(x2,y2)、(x3,y3)、(x4,y4)とする。また、対象被写体画像の各画素iのx,y座標をxi,yiとし、その対象被写体画像を正面画像に変換した後の変換後被写体画像の各画素iのx,y座標をXi,Yiとする。 The image conversion process using the target coordinates and the reference coordinates as conversion parameters will be described in more detail. In the following description, an example will be given in which the coordinates of the feature points detected from the plane subject image obtained by photographing the plane subject in the state where the projection pattern is projected are used as the reference coordinates. Here, the X and Y coordinates (that is, reference coordinates) of the four feature points detected from the plane subject image obtained by photographing the plane subject in the state where the projection pattern is projected are set to (X 1 , Y 1 ) and (X, respectively). 2 , Y 2 ), (X 3 , Y 3 ), (X 4 , Y 4 ). On the other hand, the x, y coordinates (that is, the target coordinates) of the four feature points detected from the target subject image obtained by capturing the target subject 111 with the projection parameters projected are (x 1 , y 1 ) and (x, respectively). 2 , y 2 ), (x 3 , y 3 ), (x 4 , y 4 ). Further, the x and y coordinates of each pixel i of the target subject image are set to x i and y i, and the x and y coordinates of each pixel i of the converted subject image after the target subject image is converted to the front image are X i. , Y i .

画像変換部107は、四つの特徴点に対応した対象座標と、同じく四つの特徴点に対応した参照座標とについて、それぞれ近い座標同士を対にして対応付ける。そして、画像変換部107は、それぞれ対になされた4対の座標を、下記の式(1)と式(2)の各変換式に代入することで、対象被写体画像を正面画像に変換した変換後被写体画像を取得する。なお、式(1)は射影変換の変換式であり、また式(1)と式(2)中のa1,a2,a3,・・・,a7,a8は変換式の係数である。 The image conversion unit 107 associates the target coordinates corresponding to the four feature points with the reference coordinates corresponding to the four feature points by pairing the coordinates close to each other. Then, the image conversion unit 107 converts the target subject image into a front image by substituting the four pairs of coordinates, which are paired with each other, into the conversion formulas (1) and (2) below. Acquire the rear subject image. Equation (1) is a conversion equation for projective transformation, and a 1 , a 2 , a 3 , ..., a 7 and a 8 in equations (1) and (2) are coefficients of the transformation equation. Is.

Figure 2021139672
Figure 2021139672

Figure 2021139672
Figure 2021139672

画像変換部107は、それら式(1)および式(2)の変換式に基づく画像変換処理を行うことで、傾斜画像になっている対象被写体画像を正面撮影されたような画像に変換することができる。なお、四つの特徴点にそれぞれ対応した各対象座標と各参照座標との対応付けは、例えば、左上→右上→右下→左下の時計回り順に各座標を対応付ける方法などが用いられてもよい。そして、画像変換部107は、前述のようにして、画像変換処理を行った後の変換後被写体画像を、領域検出部108と面積取得部109とに送る。 The image conversion unit 107 converts the target subject image, which is an inclined image, into an image as if it was taken in front by performing image conversion processing based on the conversion formulas of the formulas (1) and (2). Can be done. As the association between each target coordinate corresponding to each of the four feature points and each reference coordinate, for example, a method of associating each coordinate in the clockwise order of upper left → upper right → lower right → lower left may be used. Then, as described above, the image conversion unit 107 sends the converted subject image after the image conversion processing to the area detection unit 108 and the area acquisition unit 109.

領域検出部108は、画像変換部107による変換後被写体画像から、対象被写体111の対象領域112を、面積計測の対象領域(以下、計測対象領域とする)として検出する。本実施形態において、領域検出部108は、変換後被写体画像から計測対象領域を検出する際に、例えば深層学習による意味的領域分割を行う。すなわち本実施形態においては、予め、学習用のコンピュータ(不図示)が、複数の被写体の画像を教師データとしてニューラルネットワークのモデルを学習させて学習済モデルが生成されている。領域検出部108は、その生成された学習済モデルに基づいて、画像変換部107による変換後被写体画像から計測対象領域を推定する。なお、ニューラルネットワークのモデルの一例としては、深層学習を用いたセグメンテーション・モデルである完全畳み込みネットワーク FCN (Fully Convolutional Network)を適用することができる。なお、他の深層学習のモデルを用いて領域分割が実現されていてもよい。また、セグメンテーション手法は、深層学習に限らず、例えば、グラフカットや領域成長、エッジ検出、統治分割法等が用いられてもよい。なお、領域分割に使用される画像は、画像変換部107によって正面画像のように変換された後の画像に限らず、対象被写体111が正面撮影ではない状態で撮影した傾斜画像であってもよい。 The area detection unit 108 detects the target area 112 of the target subject 111 as the target area for area measurement (hereinafter referred to as the measurement target area) from the converted subject image by the image conversion unit 107. In the present embodiment, the area detection unit 108 performs semantic area division by, for example, deep learning when detecting the measurement target area from the converted subject image. That is, in the present embodiment, a learning computer (not shown) trains a neural network model using images of a plurality of subjects as teacher data in advance to generate a trained model. The area detection unit 108 estimates the measurement target area from the converted subject image by the image conversion unit 107 based on the generated learned model. As an example of the neural network model, a complete convolutional network FCN (Full Convolutional Network), which is a segmentation model using deep learning, can be applied. In addition, the region division may be realized by using another deep learning model. Further, the segmentation method is not limited to deep learning, and for example, graph cut, region growth, edge detection, governing division method, and the like may be used. The image used for region division is not limited to the image after being converted like the front image by the image conversion unit 107, and may be an inclined image taken in a state where the target subject 111 is not front shot. ..

前述のようにして領域検出部108が検出した計測対象領域の情報(例えば計測対象領域に含まれる各画素の座標情報)は、面積取得部109に送られる。
面積取得部109は、計測対象体領域の各画素の座標情報と、当該対象被写体の対象被写体距離と、撮像素子101aの既知のセンササイズおよび撮像光学系101bの既知の撮影画角を基に求まる画素当たりの実面積とから、計測対象領域の面積を算出する。なお、撮像光学系101bがズーム光学系を有していて撮影画角が可変である場合、例えばズーム量を基に撮影画角を求めることができる。センササイズと撮影画角とに基づいて画素当たりの実面積を求める手法については、後述する図5を以って説明する。
The information of the measurement target area (for example, the coordinate information of each pixel included in the measurement target area) detected by the area detection unit 108 as described above is sent to the area acquisition unit 109.
The area acquisition unit 109 is obtained based on the coordinate information of each pixel in the measurement target area, the target subject distance of the target subject, the known sensor size of the image sensor 101a, and the known shooting angle of view of the image pickup optical system 101b. The area of the measurement target area is calculated from the actual area per pixel. When the imaging optical system 101b has a zoom optical system and the shooting angle of view is variable, the shooting angle of view can be obtained based on, for example, the zoom amount. A method for obtaining the actual area per pixel based on the sensor size and the shooting angle of view will be described with reference to FIG. 5 described later.

表示部110は、対象被写体画像、対象座標、対象被写体距離、対象被写体距離に対応した参照座標、および計測対象領域の各情報を基に、後述する図10、図11および図12などで説明するような各画面を表示装置に表示させる。それら図10、図11および図12などに示す各画面表示の詳細については後述する。また表示部110は、計測対象領域の面積が計測できた場合には、それら計測対象領域、その計測対象領域の画素数、画素数当たりの実面積、被写体距離、検出特徴点座標、正面画像への変換前後の画像など、取得し得る情報を表示することもできる。 The display unit 110 will be described with reference to FIGS. 10, 11 and 12, which will be described later, based on each information of the target subject image, the target coordinates, the target subject distance, the reference coordinates corresponding to the target subject distance, and the measurement target area. Each screen is displayed on the display device. Details of each screen display shown in FIGS. 10, 11, 12 and the like will be described later. When the area of the measurement target area can be measured, the display unit 110 shifts to the measurement target area, the number of pixels of the measurement target area, the actual area per pixel number, the subject distance, the coordinates of the detection feature points, and the front image. It is also possible to display information that can be acquired, such as images before and after conversion of.

図2は、本実施形態の面積計測装置100における面積計測処理の大まかな流れを示したフローチャートである。
ステップS201において、面積計測装置100は、特徴点座標保持部106内に、複数の参照座標の情報と、それら参照座標にそれぞれ対応付けられた複数の被写体距離(参照被写体距離)の情報とが保持されているかどうかを判定する。面積計測装置100は、それらの情報が保持されていないと判定した場合にはステップS202へ遷移し、一方、それらの情報が保持されていると判定した場合にはステップS203へ遷移する。
FIG. 2 is a flowchart showing a rough flow of the area measurement process in the area measurement device 100 of the present embodiment.
In step S201, the area measuring device 100 holds information on a plurality of reference coordinates and information on a plurality of subject distances (reference subject distances) associated with the reference coordinates in the feature point coordinate holding unit 106. Determine if it has been done. When it is determined that the information is not retained, the area measuring device 100 transitions to step S202, and when it is determined that the information is retained, the area measuring device 100 transitions to step S203.

ステップS202に遷移する場合、特徴点座標保持部106には参照情報と参照被写体距離とが対応付けられた情報が保持されていないので、面積計測装置100は、ステップS202にて参照座標とそれに対応した参照被写体距離を取得するための処理を行う。ステップS202における処理の詳細は、後述する図3のフローチャートで説明する。 In the transition to step S202, since the feature point coordinate holding unit 106 does not hold the information in which the reference information and the reference subject distance are associated with each other, the area measuring device 100 corresponds to the reference coordinates in step S202. Performs processing for acquiring the reference subject distance. The details of the process in step S202 will be described with reference to the flowchart of FIG. 3 described later.

ステップS203に遷移した場合、特徴点座標保持部106には参照座標と被写体距離とが対応付けられて保持されているので、面積計測装置100は、ステップS203において対象被写体111の対象領域112の面積計測処理を行う。ステップS203における処理の詳細は、後述する図4または図5のフローチャートで説明する。 When the transition to step S203 occurs, the feature point coordinate holding unit 106 holds the reference coordinates and the subject distance in association with each other. Therefore, the area measuring device 100 increases the area of the target area 112 of the target subject 111 in step S203. Perform measurement processing. The details of the process in step S203 will be described with reference to the flowchart of FIG. 4 or FIG. 5 described later.

図3は、特徴点座標保持部106に参照座標と参照被写体距離とが対応付けられた情報が保持されていない場合に、図2のステップS202で行われる参照座標取得処理の流れを示すフローチャートである。なお、図3のフローチャートにおいて、ステップS301とステップS302は、ユーザ等により事前に行われる作業であるが、ここでは説明の都合上、フローチャート内に含めている。 FIG. 3 is a flowchart showing the flow of the reference coordinate acquisition process performed in step S202 of FIG. 2 when the information in which the reference coordinates and the reference subject distance are associated is not held in the feature point coordinate holding unit 106. be. In the flowchart of FIG. 3, steps S301 and S302 are operations performed in advance by a user or the like, but are included in the flowchart here for convenience of explanation.

ステップS301では、撮像部101の撮影画角内で且つ投影部102の投影画角内の位置に、平面被写体が設置される。またその際、平面被写体は、その平面部分が光軸に対して直交するように設置される。 In step S301, the flat subject is installed at a position within the shooting angle of view of the imaging unit 101 and within the projection angle of view of the projection unit 102. At that time, the plane subject is installed so that the plane portion is orthogonal to the optical axis.

またステップS302では、撮像部101と平面被写体との間の距離を、所定範囲内で且つ撮像部101にて撮像した場合に所定分解能の画像の取得が可能な複数の距離の中の何れか一つに設定するような距離調整が行われる。このステップS302における距離の設定は、後述するステップS303以降の処理後、後述するステップS307で測定完了と判定されるまで複数回行われる。すなわち、ステップS302における距離の設定は、所定範囲内で且つ所定分解能の画像の取得が可能な複数の各距離の、それぞれの距離毎に行われる。本実施形態の場合、このステップS302で設定される撮像部101と平面被写体との間の複数の距離は、前述した複数の参照被写体距離にそれぞれ対応する。 Further, in step S302, the distance between the image pickup unit 101 and the flat subject is set within a predetermined range, and any one of a plurality of distances capable of acquiring an image having a predetermined resolution when the image pickup unit 101 captures the image. The distance is adjusted so that it is set to one. The distance setting in step S302 is performed a plurality of times after the processing after step S303, which will be described later, until it is determined that the measurement is completed in step S307, which will be described later. That is, the distance setting in step S302 is performed for each of a plurality of distances within a predetermined range and capable of acquiring an image having a predetermined resolution. In the case of the present embodiment, the plurality of distances between the imaging unit 101 and the flat subject set in step S302 correspond to the plurality of reference subject distances described above.

次にステップS303において、撮像処理部103の投影制御部103bは、投影部102を制御して所定のパターン光(投影パターン)を平面被写体に投影させる。
次にステップS304において、撮像処理部103は、焦点調節部103aにて撮像部101の撮像光学系101bを駆動制御して平面被写体に合焦させ、さらにその合焦状態で撮像部101に平面被写体を撮像させることで、投影パターンを含む画像を取得する。本実施形態の場合、このステップS304で取得された画像は、前述した参照被写体距離に対応した平面被写体画像に対応する。
Next, in step S303, the projection control unit 103b of the image pickup processing unit 103 controls the projection unit 102 to project a predetermined pattern light (projection pattern) onto a flat subject.
Next, in step S304, the image pickup processing unit 103 drives and controls the image pickup optical system 101b of the image pickup unit 101 to focus on the plane subject by the focus adjustment unit 103a, and further focuses the plane subject on the image pickup unit 101 in the focused state. An image including a projection pattern is acquired by imaging the image. In the case of the present embodiment, the image acquired in step S304 corresponds to the plane subject image corresponding to the reference subject distance described above.

次にステップS305において、特徴点検出部105は、ステップS304で取得された画像、つまり投影パターンを含む平面被写体画像から、特徴点を検出してその座標(すなわち参照座標)を求める。
そして次のステップS306において、特徴点座標保持部106は、ステップS305で検出された特徴点の座標を、ステップS304で取得された平面被写体画像の撮影時における被写体距離(参照被写体距離)と対にして保持する。本実施形態の場合、このステップS306で参照被写体距離に対応付けられて保持された座標は、前述した参照座標に対応する。
Next, in step S305, the feature point detection unit 105 detects feature points from the image acquired in step S304, that is, a flat subject image including a projection pattern, and obtains its coordinates (that is, reference coordinates).
Then, in the next step S306, the feature point coordinate holding unit 106 pairs the coordinates of the feature points detected in step S305 with the subject distance (reference subject distance) at the time of shooting the flat subject image acquired in step S304. Hold. In the case of the present embodiment, the coordinates held in association with the reference subject distance in step S306 correspond to the above-mentioned reference coordinates.

次にステップS307において、面積計測装置100は、ステップS302で設定される前述した所定範囲内で且つ所定分解能の画像の取得が可能な複数の各距離について、ステップS303〜S306までの処理が完了したかを判定する。そして、ステップS307において処理が完了していないと判定された場合には、ステップS302に戻って、未設定の距離に設定する距離調整が行われてステップS303以降の処理が行われる。一方、ステップS307で処理が完了したと判定された場合、この図3のフローチャートの処理は終了する。 Next, in step S307, the area measuring device 100 has completed the processes from steps S303 to S306 for each of the plurality of distances within the predetermined range set in step S302 and capable of acquiring an image having a predetermined resolution. Is determined. Then, when it is determined in step S307 that the process is not completed, the process returns to step S302, the distance adjustment for setting the unset distance is performed, and the processes after step S303 are performed. On the other hand, when it is determined in step S307 that the process is completed, the process of the flowchart of FIG. 3 ends.

図4と図5は、図2のステップS203で行われる、対象被写体111の対象領域112に対する面積計測処理の流れを示したフローチャートである。図4は、投影パターンを含む対象被写体画像から、対象座標を取得すると共に対象領域112の面積をも計測する場合のフローチャートである。図5は、投影パターンを含む対象被写体画像から対象座標を取得した後、投影パターンが投影されていない状態の対象被写体111を撮影した対象被写体画像から対象領域112の面積を計測する場合のフローチャートである。 4 and 5 are flowcharts showing the flow of the area measurement process for the target area 112 of the target subject 111, which is performed in step S203 of FIG. FIG. 4 is a flowchart in the case where the target coordinates are acquired from the target subject image including the projection pattern and the area of the target area 112 is also measured. FIG. 5 is a flowchart in the case where the area of the target area 112 is measured from the target subject image in which the target subject 111 in the state where the projection pattern is not projected is measured after the target coordinates are acquired from the target subject image including the projection pattern. be.

先ず、投影パターンを含む対象被写体画像から、対象座標を取得すると共に対象領域112の面積をも計測する図4のフローチャートの流れを説明する。
ステップS401において、撮像処理部103aの投影制御部103bは、投影部102を制御して所定のパターン光(投影パターン)を対象被写体111に投影させる。
First, the flow chart of FIG. 4 will be described in which the target coordinates are acquired from the target subject image including the projection pattern and the area of the target area 112 is also measured.
In step S401, the projection control unit 103b of the image pickup processing unit 103a controls the projection unit 102 to project a predetermined pattern light (projection pattern) onto the target subject 111.

ステップS402において、撮像処理部103は、焦点調節部103aにより撮像部101の撮像光学系101bを駆動制御して対象被写体111に合焦させる。さらに撮像処理部103は、その合焦状態で撮像部101に対象被写体111を撮像させることで、投影パターンを含む対象被写体画像を取得する。 In step S402, the image pickup processing unit 103 drives and controls the image pickup optical system 101b of the image pickup unit 101 by the focus adjustment unit 103a to focus on the target subject 111. Further, the image pickup processing unit 103 acquires the target subject image including the projection pattern by causing the image pickup unit 101 to image the target subject 111 in the focused state.

ステップS403において、特徴点検出部105は、ステップS402で取得された画像、つまり投影パターンを含む対象被写体画像から、投影パターンの四つの特徴点を検出してそれらの座標を求める。 In step S403, the feature point detection unit 105 detects four feature points of the projection pattern from the image acquired in step S402, that is, the target subject image including the projection pattern, and obtains the coordinates thereof.

ステップS404において、画像変換部107は、対象被写体画像が取得された際の対象被写体距離と同一の参照被写体距離に対応した参照座標の情報を、特徴点座標保持部106から取得する。そして画像変換部107は、ステップS403で対象被写体画像に含まれる投影パターンから検出された四つの特徴点に対応した対象座標と、特徴点座標保持部106から得た四つの参照座標とについて、それぞれ近い座標同士を対応付ける。 In step S404, the image conversion unit 107 acquires the information of the reference coordinates corresponding to the same reference subject distance as the target subject distance when the target subject image is acquired from the feature point coordinate holding unit 106. Then, the image conversion unit 107 has each of the target coordinates corresponding to the four feature points detected from the projection pattern included in the target subject image in step S403 and the four reference coordinates obtained from the feature point coordinate holding unit 106. Associate close coordinates with each other.

ステップS405において、画像変換部107は、ステップS404で対応付けた四つの座標から求まる射影変換の変換式を以って、傾斜画像になっている対象被写体画像を正面撮影された正面画像と同様の画像に変換する。 In step S405, the image conversion unit 107 has the same as the front image obtained by front-capturing the target subject image, which is an inclined image, by the conversion formula of the projection transformation obtained from the four coordinates associated in step S404. Convert to an image.

ステップS406において、領域検出部108は、ステップS405での画像変換処理がなされた後の変換後被写体画像から計測対象領域を検出してその領域に含まれる画素数を求める。 In step S406, the area detection unit 108 detects the measurement target area from the converted subject image after the image conversion process in step S405 is performed, and obtains the number of pixels included in the area.

ステップS407において、面積取得部109は、計測対象体領域の各画素の座標情報と、対象被写体距離と、撮像素子101aのセンササイズおよび撮像光学系101bの撮影画角とから、画素当たりの実面積を求める。そして、面積取得部109は、画素当たりの実面積と、ステップS406で求めた画素数とから、計測対象領域の面積を算出する。 In step S407, the area acquisition unit 109 determines the actual area per pixel from the coordinate information of each pixel in the measurement target area, the target subject distance, the sensor size of the image sensor 101a, and the shooting angle of view of the image pickup optical system 101b. Ask for. Then, the area acquisition unit 109 calculates the area of the measurement target area from the actual area per pixel and the number of pixels obtained in step S406.

次に、投影パターンを含む対象被写体画像から対象座標を取得した後、投影パターンが投影されていない対象被写体111を撮影した対象参照画像から対象領域112の面積を計測する図5のフローチャートの流れを説明する。図5のフローチャートにおいて、図4と異なる点は、対象被写体の撮影が、投影パターンを投影した状態と投影していない状態とで2回に分けられている点、およぼ、それら2回の撮影の間に投影パターンの投影を停止させる処理が設けられている点である。なお、図5に示すフローチャートの処理は、図4に示したフローチャートの代替処理として行われてもよいし、モード選択という形で切り替えて行われてもよい。 Next, after acquiring the target coordinates from the target subject image including the projection pattern, the flow chart of FIG. 5 for measuring the area of the target area 112 from the target reference image obtained by photographing the target subject 111 on which the projection pattern is not projected is shown. explain. In the flowchart of FIG. 5, the difference from FIG. 4 is that the shooting of the target subject is divided into two times, one in which the projection pattern is projected and the other in which the projection pattern is not projected. The point is that a process for stopping the projection of the projection pattern is provided between the two. The processing of the flowchart shown in FIG. 5 may be performed as an alternative processing of the flowchart shown in FIG. 4, or may be switched in the form of mode selection.

ステップS501において、撮像処理部103aの投影制御部103bは、投影部102を制御して投影パターンを対象被写体111に投影させる。 In step S501, the projection control unit 103b of the image pickup processing unit 103a controls the projection unit 102 to project the projection pattern onto the target subject 111.

ステップS502において、撮像処理部103は、焦点調節部103aにより撮像部101の撮像光学系101bを駆動制御して対象被写体111に合焦させる。さらに撮像処理部103は、その合焦状態で撮像部101に対象被写体111を撮像させることで、投影パターンを含む対象被写体画像を取得する。
このステップS502の後、ステップS503において、撮像処理部103aの投影制御部103bは、投影部102を制御して投影パターンの投影を停止させる。
In step S502, the image pickup processing unit 103 drives and controls the image pickup optical system 101b of the image pickup unit 101 by the focus adjustment unit 103a to focus on the target subject 111. Further, the image pickup processing unit 103 acquires the target subject image including the projection pattern by causing the image pickup unit 101 to image the target subject 111 in the focused state.
After this step S502, in step S503, the projection control unit 103b of the imaging processing unit 103a controls the projection unit 102 to stop the projection of the projection pattern.

ステップS504において、撮像処理部103は、焦点調節部103aにより撮像部101の撮像光学系101bを駆動制御して対象被写体111に合焦させる。さらに撮像処理部103は、その合焦状態で撮像部101に対象被写体111を撮像させることで、投影パターンが投影されていない状態の対象被写体画像を取得する。ステップS504における撮影時の対象被写体と、ステップS502における撮影時の対象被写体とは、投影パターンが投影されている状態と、投影パターンが投影されていない状態とが異なるのみである。このため、ステップS504における撮影時の対象被写体距離とステップS502における撮影時の対象被写体距離とは同じである。 In step S504, the image pickup processing unit 103 drives and controls the image pickup optical system 101b of the image pickup unit 101 by the focus adjustment unit 103a to focus on the target subject 111. Further, the image pickup processing unit 103 acquires the target subject image in a state in which the projection pattern is not projected by causing the image pickup unit 101 to image the target subject 111 in the focused state. The target subject at the time of shooting in step S504 and the target subject at the time of shooting in step S502 differ only in the state in which the projection pattern is projected and the state in which the projection pattern is not projected. Therefore, the target subject distance at the time of shooting in step S504 and the target subject distance at the time of shooting in step S502 are the same.

ステップS505において、特徴点検出部105は、ステップS502で取得された画像、つまり投影パターンを含む対象被写体画像から、投影パターンの四つの特徴点を検出してそれらの座標を求める。 In step S505, the feature point detection unit 105 detects four feature points of the projection pattern from the image acquired in step S502, that is, the target subject image including the projection pattern, and obtains the coordinates thereof.

ステップS506において、画像変換部107は、ステップS504で対象被写体画像が取得された際の対象被写体距離と同一の参照被写体距離に対応した参照座標の情報を、特徴点座標保持部106から取得する。そして画像変換部107は、ステップS505で検出された四つの特徴点に対応した対象座標と、特徴点座標保持部106から得た四つの参照座標とについて、それぞれ近い座標同士を対応付ける。 In step S506, the image conversion unit 107 acquires the information of the reference coordinates corresponding to the same reference subject distance as the target subject distance when the target subject image was acquired in step S504 from the feature point coordinate holding unit 106. Then, the image conversion unit 107 associates close coordinates with each other with respect to the target coordinates corresponding to the four feature points detected in step S505 and the four reference coordinates obtained from the feature point coordinate holding unit 106.

ステップS507において、画像変換部107は、ステップS506で対応付けた四つの座標から求まる射影変換の変換式を以って、ステップS504で取得された対象被写体画像(傾斜画像)を正面撮影されたような画像に変換する。 In step S507, the image conversion unit 107 appears to have taken a frontal image of the target subject image (tilted image) acquired in step S504 by the conversion formula of the projective transformation obtained from the four coordinates associated in step S506. Convert to an image.

ステップS508において、領域検出部108は、ステップS507での画像変換処理がなされた後の変換後被写体画像から計測対象領域を検出してその領域に含まれる画素数を求める。 In step S508, the area detection unit 108 detects the measurement target area from the converted subject image after the image conversion process in step S507 is performed, and obtains the number of pixels included in the area.

ステップS509において、面積取得部109は、計測対象体領域の各画素の座標情報と、ステップS504で対象被写体画像を取得した際の対象被写体距離と、センササイズおよび撮影画角とから、画素当たりの実面積を求める。そして、面積取得部109は、画素当たりの実面積と、ステップS508で求めた画素数とから、計測対象領域の面積を算出する。 In step S509, the area acquisition unit 109 per pixel is based on the coordinate information of each pixel in the measurement target area, the target subject distance when the target subject image is acquired in step S504, the sensor size, and the shooting angle of view. Find the actual area. Then, the area acquisition unit 109 calculates the area of the measurement target area from the actual area per pixel and the number of pixels obtained in step S508.

なお、図5のフローチャートでは、ステップS502において投影パターンが投影された状態の対象被写体を撮影した後、ステップS504において投影パターンが投影されていない状態の対象被写体を撮影したが、それら撮影の順番は逆であってもよい。すなわち例えば、ステップS502において投影パターンが投影されていない状態の対象被写体を撮影した後、ステップS504において投影パターンが投影された状態の対象被写体を撮影してもよい。 In the flowchart of FIG. 5, after shooting the target subject in the state where the projection pattern is projected in step S502, the target subject in the state where the projection pattern is not projected is shot in step S504, but the order of shooting is The reverse may be true. That is, for example, the target subject in which the projection pattern is not projected may be photographed in step S502, and then the target subject in which the projection pattern is projected may be photographed in step S504.

次に、図6を用いて面積取得部109における面積計算手法について説明する。
撮像部101のような撮像装置は、一般的には図6に示すようなピンホールモデルとして扱うことができる。入射光607は、レンズ602のレンズ主点を通り、イメージセンサの撮像面601で受光される。撮像面601からレンズ602のレンズ主点までの距離が焦点距離Fである。ここで、薄レンズ近似を用いた場合には、前側主点と後側主点の2つの主点は一致するとみなせる。また、ピンホールモデルでは、見かけ上、レンズ602が厚みのない単一のレンズとして表されるが、撮像光学系101bのような実際のレンズは、フォーカスレンズやズームレンズを含むそれぞれ厚みのある複数のレンズによって構成されている。そして、イメージセンサの撮像面601に光像が結像するように、レンズ602のフォーカスレンズの位置を光軸方向に移動させるように調節することで、被写体603に対する焦点合わせが行われる。またズームレンズを光軸方向移動させて焦点距離Fを変更した場合、画角θは変化する。
Next, the area calculation method in the area acquisition unit 109 will be described with reference to FIG.
An imaging device such as the imaging unit 101 can generally be treated as a pinhole model as shown in FIG. The incident light 607 passes through the principal point of the lens 602 and is received by the imaging surface 601 of the image sensor. The focal length F is the distance from the imaging surface 601 to the principal point of the lens 602. Here, when the thin lens approximation is used, it can be considered that the two principal points, the front principal point and the rear principal point, coincide with each other. Further, in the pinhole model, the lens 602 is apparently represented as a single lens having no thickness, but an actual lens such as the imaging optical system 101b has a plurality of thick lenses including a focus lens and a zoom lens. It is composed of the lenses of. Then, by adjusting the position of the focus lens of the lens 602 so as to move in the optical axis direction so that an optical image is formed on the image pickup surface 601 of the image sensor, focusing on the subject 603 is performed. When the focal length F is changed by moving the zoom lens in the optical axis direction, the angle of view θ changes.

このとき、画角θと被写体距離Dとの関係から、幾何学的に合焦面に写る被写体幅Wが決定され、その被写体幅Wは、三角関数を用いて計算される。すなわち被写体幅Wは、フォーカス位置とズーム量をパラメータとする画角θと、被写体距離Dとの関係によって決まる。そして、被写体幅Wの値を、対応するイメージセンサの撮像面601のライン上の画素数で除算することにより、画像上の1画素に対応する合焦面上の長さが得られる。そして、面積計算は、領域検出部108による前述した領域分割結果から得られる抽出領域(計測対象領域)の画素数と、その画像上の1画素に対応する合焦面上の長さから得られる1画素の面積との積として計算することができる。なお、被写体幅Wもしくは画像上の1画素に対応する合焦面上の長さを求める式は、被写体幅Wが既知の被写体を、被写体距離Dを変化させて撮影することによりデータを取得し回帰的に求めてもよい。なお、被写体距離Dが単一の場合は、正しく面積を求めるためには被写体が平面であることが前提となる。 At this time, the subject width W geometrically reflected on the focal plane is determined from the relationship between the angle of view θ and the subject distance D, and the subject width W is calculated using a trigonometric function. That is, the subject width W is determined by the relationship between the angle of view θ with the focus position and the zoom amount as parameters and the subject distance D. Then, by dividing the value of the subject width W by the number of pixels on the line of the imaging surface 601 of the corresponding image sensor, the length on the focal plane corresponding to one pixel on the image can be obtained. Then, the area calculation is obtained from the number of pixels of the extraction region (measurement target region) obtained from the above-mentioned region division result by the region detection unit 108 and the length on the focal plane corresponding to one pixel on the image. It can be calculated as the product of the area of one pixel. In the formula for obtaining the subject width W or the length on the focal plane corresponding to one pixel on the image, data is acquired by shooting a subject with a known subject width W by changing the subject distance D. It may be obtained recursively. When the subject distance D is single, it is premised that the subject is a flat surface in order to correctly obtain the area.

次に、図7、図8、図9を用いて、投影部102による投影パターンについて説明する。
図7(a)および図7(b)は、投影パターンが例えば四角形のライン(線)からなるライン投影パターンである場合の例を示した図である。図7(a)は、投影部102から平面被写体の正面にライン投影パターン701aが投影され、その平面被写体上のライン投影パターン701aを、撮像部101が正面撮影する時の撮影画角701内の見え方を示した図である。一方、図7(b)は、光軸に対して直交していない状態の対象被写体上に四角形のライン投影パターンを投影した場合の、撮像部101の撮影画角702内でのライン投影パターン702bの見え方を示した図である。図7(b)のように、光軸に対して対象被写体が直交していない状態である場合、四角形のライン投影パターンは台形のライン投影パターン702bに見え、また対象被写体上の円形の対象領域702bは楕円に見えることになる。図3のステップS305における特徴点検出及び座標取得処理では、図7(a)に示したライン投影パターン701aの例えば四隅が特徴点として検出され、それら四隅の特徴点の座標が参照座標として取得される。また図4のステップS403又は図5のステップS505における特徴点検出及び座標取得処理では、図7(b)に示したライン投影パターン702aの四隅が特徴点として検出され、それら四隅の特徴点の座標が対象座標として取得される。また図4のステップS405又は図5のステップS507の画像変換処理では、図7(a)のライン投影パターン701aの四隅の参照座標と、図7(b)のライン投影パターン702aの四隅の対象座標との対応関係を基に画像変換処理が行われる。そして、図4のステップS406〜S407又は図5のステップS508〜S509では、画像変換処理後の画像から計測対象領域が検出されてその面積が算出される。
Next, the projection pattern by the projection unit 102 will be described with reference to FIGS. 7, 8 and 9.
7 (a) and 7 (b) are diagrams showing an example in the case where the projection pattern is, for example, a line projection pattern composed of quadrangular lines. In FIG. 7A, the line projection pattern 701a is projected from the projection unit 102 onto the front surface of the flat subject, and the line projection pattern 701a on the flat subject is photographed in the front angle of view 701 by the image pickup unit 101. It is a figure which showed the appearance. On the other hand, FIG. 7B shows a line projection pattern 702b within the shooting angle of view 702 of the imaging unit 101 when a quadrangular line projection pattern is projected onto the target subject in a state not orthogonal to the optical axis. It is a figure which showed the appearance of. When the target subject is not orthogonal to the optical axis as shown in FIG. 7B, the quadrangular line projection pattern looks like a trapezoidal line projection pattern 702b, and the circular target area on the target subject. 702b will look like an ellipse. In the feature point detection and coordinate acquisition process in step S305 of FIG. 3, for example, the four corners of the line projection pattern 701a shown in FIG. 7A are detected as feature points, and the coordinates of the feature points at those four corners are acquired as reference coordinates. NS. Further, in the feature point detection and coordinate acquisition process in step S403 of FIG. 4 or step S505 of FIG. 5, the four corners of the line projection pattern 702a shown in FIG. 7B are detected as feature points, and the coordinates of the feature points at those four corners are detected. Is acquired as the target coordinates. Further, in the image conversion process of step S405 of FIG. 4 or step S507 of FIG. 5, the reference coordinates of the four corners of the line projection pattern 701a of FIG. 7A and the target coordinates of the four corners of the line projection pattern 702a of FIG. Image conversion processing is performed based on the correspondence with. Then, in steps S406 to S407 of FIG. 4 or steps S508 to S509 of FIG. 5, the measurement target area is detected from the image after the image conversion process, and the area thereof is calculated.

図8(a)および図8(b)は、投影パターンが例えば四つの点からなるポイント投影パターンである場合の例を示した図である。図8に例示したポイント投影パターンの四つの点は、例えば図7に示した四角形のライン投影パターンの四隅に対応しているが、この例に限定されるものではない。図8(a)は、投影部102から平面被写体の正面に四つポイント投影パターン801a〜801dが投影され、その平面被写体上のポイント投影パターン801a〜801dを、撮像部101が正面撮影する時の撮影画角801内の見え方を示した図である。図8(b)は、図7(b)の例と同様に、傾いた状態の対象被写体上に各ポイント投影パターンを投影した場合において、撮像部101の撮影画角802内でのポイント投影パターン802a〜802dの見え方を示した図である。図8(b)の場合も前述の図7(b)の例と同様に、対象被写体が傾いた状態である場合、四つの各ポイント投影パターン802a〜802dは台形の四隅に対応した位置に見え、また、対象被写体上の円形の対象領域803は楕円に見えることになる。この図8の例の場合、図3のステップS305の特徴点検出及び座標取得処理では、図8(a)に示した四つのポイント投影パターン801a〜801dが特徴点として検出されてそれらの座標が参照座標として取得される。また図4のステップS403又は図5のステップS505の特徴点検出及び座標取得処理では、図8(b)に示した四つのポイント投影パターン801a〜801dが特徴点として検出されてそれらの座標が対象座標として取得される。以降の画像変換処理、面積計測処理は前述同様である。図8に例示した四つのポイント投影パターンを用いた場合、特徴点検出の処理が、図7に例示したライン投影パターンの場合よりも容易になる。 8 (a) and 8 (b) are diagrams showing an example in the case where the projection pattern is, for example, a point projection pattern composed of four points. The four points of the point projection pattern illustrated in FIG. 8 correspond to, for example, the four corners of the quadrangular line projection pattern shown in FIG. 7, but are not limited to this example. In FIG. 8A, four point projection patterns 801a to 801d are projected from the projection unit 102 onto the front surface of the flat subject, and the image pickup unit 101 takes a frontal image of the point projection patterns 801a to 801d on the flat subject. It is a figure which showed the appearance in the shooting angle of view 801. FIG. 8B shows the point projection pattern within the shooting angle of view 802 of the imaging unit 101 when each point projection pattern is projected onto the tilted target subject, as in the example of FIG. 7B. It is a figure which showed the appearance of 802a to 802d. In the case of FIG. 8B as well as the example of FIG. 7B described above, when the target subject is in an inclined state, the four point projection patterns 802a to 802d appear to be positions corresponding to the four corners of the trapezoid. Further, the circular target area 803 on the target subject looks like an ellipse. In the case of the example of FIG. 8, in the feature point detection and coordinate acquisition process of step S305 of FIG. 3, the four point projection patterns 801a to 801d shown in FIG. 8A are detected as feature points, and their coordinates are obtained. Obtained as reference coordinates. Further, in the feature point detection and coordinate acquisition process of step S403 of FIG. 4 or step S505 of FIG. 5, the four point projection patterns 801a to 801d shown in FIG. 8B are detected as feature points, and their coordinates are targeted. Obtained as coordinates. Subsequent image conversion processing and area measurement processing are the same as described above. When the four point projection patterns illustrated in FIG. 8 are used, the processing of feature point detection becomes easier than in the case of the line projection pattern illustrated in FIG. 7.

図9(a)および図9(b)は、投影パターンが例えば複数の縦ラインと横ラインとが交差した格子投影パターンである場合の例を示した図である。図9(a)は、投影部102から平面被写体の正面に格子投影パターン901が投影され、その平面被写体上の格子投影パターン901aを、撮像部101が正面撮影する時の撮影画角901内の見え方を示した図である。図9(b)は、図7(b)の例と同様に、傾いた状態の対象被写体上に格子投影パターンを投影した場合において、撮像部101の撮影画角902内での格子投影パターン902aの見え方を示した図である。図9(b)の場合も前述の図7(b)の例と同様に、対象被写体が傾いた状態である場合、格子投影パターンは台形の格子投影パターン902aに見え、また対象被写体上の円形の対象領域902bは楕円に見える。この例の場合、図3のステップS305の特徴点検出及び座標取得処理では、図9(a)に示した格子投影パターン901aの縦横ラインが交差した各格子点が特徴点として検出され、それら各格子点の座標が参照座標として取得される。また図4のステップS403又は図5のステップS505での特徴点検出及び座標取得処理では、図9(b)に示した格子投影パターン902aの各格子点が特徴点として検出され、それら格子点の座標が対象座標として取得される。図4のステップS405又は図5のステップS507の画像変換処理では、図9(a)の格子投影パターン901aの各格子点の参照座標と、図9(b)の格子投影パターン902aの各格子点の対象座標との対応関係を基に画像変換処理が行われる。以降の面積計測処理は前述同様である。図9に例示した格子投影パターンを用いた場合、撮像部101の撮像画角内で対象領域902bの近くの特徴点を以って画像変換処理を行うことができる。すなわち格子投影パターンを用いた場合、例えば対象被写体の面が平面でなく曲線や凹凸があるような場合でも、対象領域902bの近くの特徴点を以って正面画像への画像変換が可能になるため、対象領域902bの面積計測精度の向上が図れる。 9 (a) and 9 (b) are diagrams showing an example in which the projection pattern is, for example, a grid projection pattern in which a plurality of vertical lines and horizontal lines intersect. In FIG. 9A, the grid projection pattern 901 is projected from the projection unit 102 onto the front surface of the flat subject, and the grid projection pattern 901a on the flat subject is photographed in front of the plane subject within the shooting angle of view 901. It is a figure which showed the appearance. FIG. 9B shows the grid projection pattern 902a within the shooting angle of view 902 of the imaging unit 101 when the grid projection pattern is projected onto the tilted target subject, as in the example of FIG. 7B. It is a figure which showed the appearance of. In the case of FIG. 9B, similarly to the example of FIG. 7B described above, when the target subject is in an inclined state, the grid projection pattern looks like a trapezoidal grid projection pattern 902a, and a circle on the target subject. The target area 902b of the above looks like an ellipse. In the case of this example, in the feature point detection and coordinate acquisition process in step S305 of FIG. 3, each grid point where the vertical and horizontal lines of the grid projection pattern 901a shown in FIG. 9A intersect is detected as a feature point, and each of them is detected. The coordinates of the grid points are acquired as reference coordinates. Further, in the feature point detection and coordinate acquisition processing in step S403 of FIG. 4 or step S505 of FIG. 5, each grid point of the grid projection pattern 902a shown in FIG. 9B is detected as a feature point, and the grid points of those grid points are detected. The coordinates are acquired as the target coordinates. In the image conversion process of step S405 of FIG. 4 or step S507 of FIG. 5, the reference coordinates of each grid point of the grid projection pattern 901a of FIG. 9A and each grid point of the grid projection pattern 902a of FIG. 9B Image conversion processing is performed based on the correspondence with the target coordinates of. Subsequent area measurement processing is the same as described above. When the grid projection pattern illustrated in FIG. 9 is used, the image conversion process can be performed with the feature points near the target region 902b within the imaging angle of view of the imaging unit 101. That is, when the grid projection pattern is used, for example, even if the surface of the target subject is not flat but has curves or irregularities, it is possible to convert the image into a front image by using the feature points near the target area 902b. Therefore, the area measurement accuracy of the target area 902b can be improved.

次に、図10、図11、及び図12を用いて、表示部110による画面表示の詳細について説明する。
図10は、光軸に対して対象被写体が直交せずに大きく傾いていることで、対象領域1004の面積計測が難しくなる場合に、表示部110が、ユーザに対する通知文1002を画面1001上に表示した例を示した図である。図10の例では、光軸に直交せず傾いた状態の対象被写体上にライン投影パターン1003が投影され、その対象被写体上のライン投影パターン1003を撮像部101が撮像した画像が、表示部110によって画面1001上に表示されている。すなわち図10の例の場合、対象被写体が光軸に直交せず傾いた状態であるため、四角形のライン投影パターンは台形状のライン投影パターン1003となり、また円形の対象領域は楕円の対象領域1004になっている様子が表示されている。
Next, the details of the screen display by the display unit 110 will be described with reference to FIGS. 10, 11, and 12.
In FIG. 10, when it is difficult to measure the area of the target area 1004 because the target subject is not orthogonal to the optical axis and is greatly tilted, the display unit 110 displays a notification text 1002 to the user on the screen 1001. It is a figure which showed the displayed example. In the example of FIG. 10, the line projection pattern 1003 is projected on the target subject in a state of being tilted without being orthogonal to the optical axis, and the image captured by the imaging unit 101 of the line projection pattern 1003 on the target subject is displayed on the display unit 110. Is displayed on the screen 1001. That is, in the case of the example of FIG. 10, since the target subject is tilted without being orthogonal to the optical axis, the quadrangular line projection pattern is the trapezoidal line projection pattern 1003, and the circular target area is the elliptical target area 1004. The state of is displayed.

ここで、対象被写体が光軸と直交せずに大きく傾いている場合、撮像部101から見て、対象領域1004の一部が隠れてしまい、対象領域1004の全域を撮影できなくなる可能性がある。そして、対象領域1004の一部が隠れて全域の撮影ができなかった場合、面積の正確な計測ができなくなる。このため、本実施形態の面積計測装置100において、表示部110は、対象座標、対象被写体距離、および参照座標の各情報を基に、対象領域1004の全域を撮影できない状態になっている可能性があるかどうかを判定する。この判定処理を行う際、表示部110は、対象被写体画像に含まれるライン投影パターン1003から検出された対象座標と、対象被写体撮影時の対象被写体距離に対応した参照被写体距離の参照座標との間の座標差を求める。そして表示部110は、それら対象座標と参照座標との間の座標差が、予め設定された所定の座標差を超える場合、対象被写体が光軸に対して大きく傾いているために、対象領域1004の全域を撮影できない状態になっている可能性があると判定する。 Here, if the target subject is not orthogonal to the optical axis and is greatly tilted, a part of the target area 1004 may be hidden when viewed from the imaging unit 101, and the entire area of the target area 1004 may not be photographed. .. Then, if a part of the target area 1004 is hidden and the entire area cannot be photographed, the area cannot be accurately measured. Therefore, in the area measuring device 100 of the present embodiment, the display unit 110 may not be able to photograph the entire area of the target area 1004 based on the information of the target coordinates, the target subject distance, and the reference coordinates. Determine if there is. When performing this determination process, the display unit 110 between the target coordinates detected from the line projection pattern 1003 included in the target subject image and the reference coordinates of the reference subject distance corresponding to the target subject distance at the time of shooting the target subject. Find the coordinate difference of. When the coordinate difference between the target coordinates and the reference coordinates exceeds a preset predetermined coordinate difference, the display unit 110 displays the target area 1004 because the target subject is greatly tilted with respect to the optical axis. It is determined that there is a possibility that the entire area of the image cannot be photographed.

前述のような判定処理の結果、対象領域1004の全域を撮影できない状態になっている可能性があると判定した場合、表示部110は、図10に示すような通知文1002を画面上に表示する。例えば表示部110は、対象領域の全域を撮影できない可能性があることを表す「被写体の撮影角度が大きいです。」と、対象領域の全域を撮影可能にするための対策法を表す「被写体が正面にくるように調整してください。」とを含む通知文1002を表示する。この通知文1002を見ることで、面積計測装置100を使用しているユーザは、対象被写体111の設置状態、若しくは面積計測装置100の撮像部101の撮影角度を適切に調整することができ、その結果、対象領域の面積計測精度を向上させることができる。 When it is determined that the entire area of the target area 1004 may not be photographed as a result of the determination process as described above, the display unit 110 displays the notification text 1002 as shown in FIG. 10 on the screen. do. For example, the display unit 110 indicates that "the shooting angle of the subject is large", which indicates that the entire area of the target area may not be photographed, and "the subject is," which indicates a countermeasure for enabling the entire area of the target area to be photographed. Please adjust so that it comes to the front. ”Is displayed. By viewing this notification text 1002, the user using the area measuring device 100 can appropriately adjust the installation state of the target subject 111 or the shooting angle of the imaging unit 101 of the area measuring device 100. As a result, the area measurement accuracy of the target area can be improved.

図11は、対象領域1103がライン投影パターン1103と重なるか、若しくはライン投影パターン1103の外側になって、対象領域1104の面積計測が難しくなる場合に、表示部110が、通知文1102を画面1101上に表示した例を示した図である。図11の例では、対象被写体の対象領域1104とライン投影パターン1103の一部とが重なっており、その状態でライン投影パターン1103を含む対象被写体を撮像部101が撮像した画像が、表示部110によって画面1101上に表示されている。なお図11の例では、対象被写体が光軸と直交せずに傾いているが、対象領域1104の全域を撮影できない状態にはなっていないと判定されているとする。 In FIG. 11, when the target area 1103 overlaps with the line projection pattern 1103 or is outside the line projection pattern 1103 and it becomes difficult to measure the area of the target area 1104, the display unit 110 displays the notification text 1102 on the screen 1101. It is the figure which showed the example displayed above. In the example of FIG. 11, the target area 1104 of the target subject and a part of the line projection pattern 1103 overlap each other, and the image captured by the imaging unit 101 of the target subject including the line projection pattern 1103 in that state is displayed on the display unit 110. Is displayed on the screen 1101. In the example of FIG. 11, it is assumed that the target subject is tilted without being orthogonal to the optical axis, but it is determined that the entire area of the target region 1104 is not in a state where it cannot be photographed.

図11の例の場合、ライン投影パターン1103の特徴点である四隅のうち一つの隅が、対象領域1104上にかかっている。ここで、対象領域1104とライン投影パターン1103の特徴点とが重なっている場合、そのライン投影パターン1103の特徴点の検出が難しくなる可能性がある。このように、ライン投影パターン1103の一部の特徴点の検出ができなかった場合、面積の正確な計測ができなくなる。このため、本実施形態の面積計測装置100において、表示部110は、ライン投影パターン1104の対象座標の検出結果を基に、ライン投影パターン1103の特徴点に基づく座標範囲内に対象領域1104が収まっているかどうかを判定する。つまり、ライン投影パターン1103の特徴点に基づく座標範囲内に対象領域1104が収まっている場合には、対象領域1104とライン投影パターン1103の特徴点とが重なっていないことになる。この判定処理を行う際、表示部110は、対象被写体画像に含まれるライン投影パターン1103から検出された対象座標を基に、検出された特徴点の数を計測する。そして、表示部110は、その計測した特徴点の数が、ライン投影パターン1103から検出されるべき特徴点の数(四隅に相当する四つ)に満たないか場合、それら四つの特徴点に基づく座標範囲内に対象領域1104が収まっていないと判定する。図11の例の場合は、対象領域1104とライン投影パターン1103の特徴点とが重なっている可能性があると判定する。 In the case of the example of FIG. 11, one of the four corners, which is the feature point of the line projection pattern 1103, hangs on the target area 1104. Here, when the target area 1104 and the feature point of the line projection pattern 1103 overlap, it may be difficult to detect the feature point of the line projection pattern 1103. As described above, when some feature points of the line projection pattern 1103 cannot be detected, the area cannot be accurately measured. Therefore, in the area measuring device 100 of the present embodiment, the display unit 110 fits the target area 1104 within the coordinate range based on the feature points of the line projection pattern 1103 based on the detection result of the target coordinates of the line projection pattern 1104. Determine if it is. That is, when the target area 1104 is within the coordinate range based on the feature points of the line projection pattern 1103, the target area 1104 and the feature points of the line projection pattern 1103 do not overlap. When performing this determination process, the display unit 110 measures the number of detected feature points based on the target coordinates detected from the line projection pattern 1103 included in the target subject image. Then, when the number of the measured feature points is less than the number of feature points to be detected from the line projection pattern 1103 (four corresponding to the four corners), the display unit 110 is based on those four feature points. It is determined that the target area 1104 does not fit within the coordinate range. In the case of the example of FIG. 11, it is determined that the target area 1104 and the feature points of the line projection pattern 1103 may overlap.

前述した判定処理の結果、ライン投影パターン1103の特徴点に基づく座標範囲内に対象領域1104と収まっていない(対象領域と特徴点とが重なっている)と判定した場合、表示部110は、図11に示す通知文1102を画面上に表示する。例えば表示部110は、対象領域と特徴点とが重なっていることを表す「特徴点が被写体にかかっています。」と、対象領域が座標範囲内に収めることの要求を表す「特徴点が被写体にかからないように調整してください。」とを含む通知文1102を表示する。この通知文1102を見ることで、面積計測装置100を使用しているユーザは、対象被写体111の設置状態、若しくは面積計測装置100の投影部102による投影位置を適切に調整することができ、その結果、対象領域の面積計測精度を向上させることができる。 As a result of the determination process described above, when it is determined that the target area 1104 does not fit within the coordinate range based on the feature points of the line projection pattern 1103 (the target area and the feature points overlap), the display unit 110 displays the figure. The notification text 1102 shown in 11 is displayed on the screen. For example, the display unit 110 indicates that "the feature points hang on the subject" indicating that the target area and the feature points overlap, and "the feature points are the subject" indicating that the target area is within the coordinate range. Please adjust so that it does not get caught. ”Is displayed in the notification text 1102. By seeing this notification text 1102, the user using the area measuring device 100 can appropriately adjust the installation state of the target subject 111 or the projection position by the projection unit 102 of the area measuring device 100. As a result, the area measurement accuracy of the target area can be improved.

図12は、対象領域1204に対してライン投影パターン1203の投影位置が離れていることで、対象領域1204の正確な面積計測が難しくなる場合に、表示部110が、通知文1202を画面1201上に表示した例を示した図である。図12の例では、対象領域1204に対してある程度離れた位置にライン投影パターン1203が投影されており、その状態でライン投影パターン1203を含む対象被写体を撮影した画像が、表示部110によって画面1201上に表示されている。なお図12の例では、対象被写体が光軸と直交せずに傾いているが、対象領域1204の全域を撮影できない状態にはなっていないと判定されているとする。 In FIG. 12, when the projection position of the line projection pattern 1203 is far from the target area 1204 and it becomes difficult to accurately measure the area of the target area 1204, the display unit 110 displays the notification text 1202 on the screen 1201. It is a figure which showed the example displayed in. In the example of FIG. 12, the line projection pattern 1203 is projected at a position somewhat distant from the target area 1204, and the image of the target subject including the line projection pattern 1203 in that state is displayed on the screen 1201 by the display unit 110. It is displayed above. In the example of FIG. 12, it is assumed that the target subject is tilted without being orthogonal to the optical axis, but it is determined that the entire area of the target area 1204 is not in a state where it cannot be photographed.

図12に示したように、対象領域1204に対し、ある程度離れた位置にライン投影パターン1203が投影されている場合、対象被写体上の対象領域1204の座標と、ライン投影パターン1203の特徴点の座標との間にズレ(誤差)が生ずる可能性がある。対象領域1204の座標とライン投影パターン1203の特徴点の座標との間にズレ(誤差)が生ずると、面積の正確な計測ができなくなる。このため、本実施形態の面積計測装置100において、表示部110は、対象領域1204に対してライン投影パターン1203が離れ過ぎているかどうかを判定する。この判定処理を行う際、表示部110は、ライン投影パターン1204から検出された対象座標と、領域検出部108によって検出された対象領域1204の座標との間の距離が、所定の距離より大きくなっているかを判定する。そして、表示部110は、対象座標と対象領域1204の座標との間の距離が、所定の距離より大きくなっていると判定した場合、対象領域1204に対してライン投影パターン1203が離れ過ぎていると判定する。 As shown in FIG. 12, when the line projection pattern 1203 is projected at a position some distance from the target area 1204, the coordinates of the target area 1204 on the target subject and the coordinates of the feature points of the line projection pattern 1203 There is a possibility that a deviation (error) may occur between the two. If there is a deviation (error) between the coordinates of the target area 1204 and the coordinates of the feature points of the line projection pattern 1203, accurate measurement of the area becomes impossible. Therefore, in the area measuring device 100 of the present embodiment, the display unit 110 determines whether or not the line projection pattern 1203 is too far from the target area 1204. When performing this determination process, the display unit 110 has a distance between the target coordinates detected from the line projection pattern 1204 and the coordinates of the target area 1204 detected by the area detection unit 108, which is larger than a predetermined distance. Determine if it is. Then, when the display unit 110 determines that the distance between the target coordinates and the coordinates of the target area 1204 is larger than a predetermined distance, the line projection pattern 1203 is too far from the target area 1204. Is determined.

前述した判定処理の結果、対象領域1204に対してライン投影パターン1203が離れ過ぎていると判定した場合、表示部110は、図12に示すような通知文1202を画面上に表示する。例えば表示部110は、対象領域に対してライン投影パターンが離れ過ぎていることを表す「特徴点が被写体から離れすぎています。」と、対象領域に対してライン投影パターンを近づけることの要求を表す「特徴点が被写体の近くになるように調整してください。」と、を含む通知文1202を表示する。この通知文1202を見ることで、面積計測装置100を使用しているユーザは、対象被写体111の設置状態を適切に調整することができ、その結果、対象領域の面積計測精度を向上させることができる。 When it is determined that the line projection pattern 1203 is too far from the target area 1204 as a result of the determination process described above, the display unit 110 displays the notification text 1202 as shown in FIG. 12 on the screen. For example, the display unit 110 requests that the line projection pattern be brought closer to the target area, saying "The feature point is too far from the subject", which indicates that the line projection pattern is too far from the target area. Display the notification text 1202 including "Please adjust so that the feature point is closer to the subject." By seeing this notification text 1202, the user using the area measuring device 100 can appropriately adjust the installation state of the target subject 111, and as a result, the area measurement accuracy of the target area can be improved. can.

以上説明したように、本実施形態の面積計測装置100では、対象座標と参照座標とを基に対象被写体画像を正面撮影されたような画像に変換し、その変換後の画像から計測対象領域を検出し、その計測対象領域の画素数当たりの実面積を算出する。これにより、本実施形態の面積計測装置100によれが、対象被写体が光軸に対して垂直ではない状態であっても、計測対象領域の実面積を計測することができる。 As described above, in the area measuring device 100 of the present embodiment, the target subject image is converted into an image as if taken from the front based on the target coordinates and the reference coordinates, and the measurement target area is converted from the converted image. Detect and calculate the actual area per number of pixels in the measurement target area. Thereby, the area measuring device 100 of the present embodiment can measure the actual area of the measurement target area even when the target subject is not perpendicular to the optical axis.

前述した実施形態に係る構成または各フローチャートの処理は、ハードウェア構成により実現されてもよいし、例えばCPUが本実施形態に係るプログラムを実行することによりソフトウェア構成により実現されてもよい。また、一部がハードウェア構成で残りがソフトウェア構成により実現されてもよい。ソフトウェア構成のためのプログラムは、予め用意されている場合だけでなく、不図示の外部メモリ等の記録媒体から取得されたり、不図示のネットワーク等を介して取得されたりしてもよい。 The configuration according to the above-described embodiment or the processing of each flowchart may be realized by the hardware configuration, or may be realized by the software configuration by, for example, the CPU executing the program according to the present embodiment. Further, a part may be realized by a hardware configuration and the rest may be realized by a software configuration. The program for software configuration may be acquired not only when it is prepared in advance, but also from a recording medium such as an external memory (not shown) or via a network (not shown).

本発明に係る制御処理における1以上の機能を実現するプログラムは、ネットワーク又は記憶媒体を介してシステム又は装置に供給可能であり、そのシステム又は装置のコンピュータの1つ以上のプロセッサにより読また出し実行されることで実現可能である。
前述の各実施形態は、何れも本発明を実施するにあたっての具体化の例を示したものに過ぎず、これらによって本発明の技術的範囲が限定的に解釈されてはならないものである。即ち、本発明は、その技術思想、又はその主要な特徴から逸脱することなく、様々な形で実施することができる。
A program that realizes one or more functions in the control process according to the present invention can be supplied to a system or device via a network or storage medium, and is read and executed by one or more processors of the computer of the system or device. It is feasible by being done.
Each of the above-described embodiments is merely an example of embodiment in carrying out the present invention, and the technical scope of the present invention should not be construed in a limited manner by these. That is, the present invention can be implemented in various forms without departing from the technical idea or its main features.

100:面積計測装置、101:撮像部、102:投影部、103:撮像処理部、103a:焦点調節部(距離測定部)、103b:投影制御部、104:撮影画像保存部、105:特徴点検出部、106:特徴点座標保持部、107:画像変換部、108:領域検出部、109:面積取得部、110:表示部 100: Area measuring device, 101: Imaging unit, 102: Projection unit, 103: Imaging processing unit, 103a: Focus adjustment unit (distance measurement unit), 103b: Projection control unit, 104: Photographed image storage unit, 105: Feature inspection Output part, 106: Feature point coordinate holding part, 107: Image conversion part, 108: Area detection part, 109: Area acquisition part, 110: Display part

Claims (16)

複数の特徴点を含む所定のパターン光が投影された対象被写体を撮影した撮影画像から、前記投影された所定のパターン光の前記特徴点の座標を検出する特徴点検出手段と、
前記対象被写体が撮影された際の被写体距離を取得する距離取得手段と、
事前に用意された所定の参照座標と被写体距離とを対応付けて保持する座標保持手段と、
前記対象被写体の前記撮影画像から前記検出した前記特徴点の座標と、当該対象被写体を撮影した際の被写体距離に対応した前記参照座標とを用いた射影変換に基づいて、前記対象被写体の撮影画像に画像変換処理を行う画像変換手段と、
前記画像変換処理を行った後の前記対象被写体の撮影画像から、面積計測を行う対象領域を検出する領域検出手段と、
前記領域検出手段によって前記検出された前記対象領域の画素数と、前記対象被写体を前記撮影した際の被写体距離に基づく画素当たりの面積とから、前記対象領域の面積を取得する面積取得手段と、
を有することを特徴とする面積計測装置。
A feature point detecting means for detecting the coordinates of the feature points of the projected predetermined pattern light from a captured image of a target subject on which a predetermined pattern light including a plurality of feature points is projected.
A distance acquisition means for acquiring the subject distance when the target subject is photographed, and
A coordinate holding means for holding a predetermined reference coordinate prepared in advance and a subject distance in association with each other,
A captured image of the target subject based on a projective transformation using the coordinates of the feature point detected from the captured image of the target subject and the reference coordinates corresponding to the subject distance when the target subject is photographed. Image conversion means that performs image conversion processing and
An area detecting means for detecting a target area for area measurement from a captured image of the target subject after performing the image conversion process, and
An area acquisition means for acquiring the area of the target area from the number of pixels of the target area detected by the area detection means and the area per pixel based on the subject distance when the target subject is photographed.
An area measuring device characterized by having.
前記参照座標は、前記所定のパターンが投影された状態の平面被写体を複数の被写体距離毎に正面撮影した画像から検出された特徴点の座標であり、
前記参照座標に対応付けられている前記被写体距離は、当該平面被写体を前記正面撮影した際の被写体距離であることを特徴とする請求項1に記載の面積計測装置。
The reference coordinates are coordinates of feature points detected from an image of a flat subject in a state in which the predetermined pattern is projected, taken from the front at each of a plurality of subject distances.
The area measuring device according to claim 1, wherein the subject distance associated with the reference coordinates is the subject distance when the plane subject is photographed in front of the subject.
前記参照座標は、前記被写体距離を変数とする計算式により求めた特徴点の座標であることを特徴とする請求項1に記載の面積計測装置。 The area measuring device according to claim 1, wherein the reference coordinates are coordinates of feature points obtained by a calculation formula using the subject distance as a variable. 前記複数の特徴点を含む所定のパターン光を投影する投影装置と、
撮像により前記撮影画像を取得する撮像装置と、
を有することを特徴とする請求項1から請求項3のいずれか1項に記載の面積計測装置。
A projection device that projects a predetermined pattern of light including the plurality of feature points, and
An imaging device that acquires the captured image by imaging, and
The area measuring device according to any one of claims 1 to 3, wherein the area measuring device is characterized by having.
前記撮像装置は、前記所定のパターン光が投影された状態の前記対象被写体を撮像し、
前記特徴点検出手段は、前記所定のパターン光が投影された状態の前記対象被写体を前記撮像装置が撮像した撮影画像から、前記投影された前記所定のパターン光の前記特徴点の座標を検出し、
前記画像変換手段は、前記所定のパターン光が投影された状態の前記対象被写体を前記撮像装置が撮像した撮影画像に対して前記画像変換処理を行うことを特徴とする請求項4に記載の面積計測装置。
The imaging device captures the target subject in a state in which the predetermined pattern light is projected.
The feature point detecting means detects the coordinates of the feature point of the projected predetermined pattern light from a captured image captured by the imaging device of the target subject in a state where the predetermined pattern light is projected. ,
The area according to claim 4, wherein the image conversion means performs the image conversion process on a captured image captured by the image pickup apparatus on the target subject in a state where the predetermined pattern light is projected. Measuring device.
前記撮像装置は、前記所定のパターン光が投影された状態の前記対象被写体の撮影と、前記所定のパターン光が投影されていない状態の前記対象被写体の撮影とを、それぞれ同じ被写体距離で行い、
前記特徴点検出手段は、前記所定のパターン光が投影された状態の前記対象被写体を前記撮像装置が撮像した撮影画像から、前記投影された前記所定のパターン光の前記特徴点の座標を検出し、
前記画像変換手段は、前記所定のパターン光が投影されていない状態の前記対象被写体を前記撮像装置が撮像した撮影画像に対して前記画像変換処理を行うことを特徴とする請求項4に記載の面積計測装置。
The imaging device takes a picture of the target subject in a state where the predetermined pattern light is projected and a picture of the target subject in a state where the predetermined pattern light is not projected, respectively, at the same subject distance.
The feature point detecting means detects the coordinates of the feature point of the projected predetermined pattern light from a captured image captured by the imaging device of the target subject in a state where the predetermined pattern light is projected. ,
The fourth aspect of claim 4, wherein the image conversion means performs the image conversion process on a captured image captured by the image pickup apparatus on the target subject in a state where the predetermined pattern light is not projected. Area measuring device.
前記特徴点検出手段は、前記所定のパターン光において領域毎に制御された特定の波長、特定の照度、特定の形状の、少なくともいずれかを、前記特徴点として検出することを特徴とする請求項1から請求項6のいずれか1項に記載の面積計測装置。 The claim is characterized in that the feature point detecting means detects at least one of a specific wavelength, a specific illuminance, and a specific shape controlled for each region in the predetermined pattern light as the feature point. The area measuring device according to any one of claims 1 to 6. 前記特徴点検出手段は、前記所定のパターン光の前記特定の波長を前記特徴点として検出する場合、前記撮影画像から、三原色のRGB値が所定の範囲内に収まる複数の画素が隣接している領域を検出し、前記複数の画素が隣接した領域の中の中心座標を前記特徴点の座標として検出することを特徴とする請求項7に記載の面積計測装置。 When the feature point detecting means detects the specific wavelength of the predetermined pattern light as the feature point, a plurality of pixels in which the RGB values of the three primary colors fall within a predetermined range are adjacent to each other from the captured image. The area measuring device according to claim 7, wherein the area is detected, and the center coordinates in the area in which the plurality of pixels are adjacent to each other are detected as the coordinates of the feature points. 前記特徴点検出手段は、前記所定のパターン光の前記特定の形状を前記特徴点として検出する場合、前記撮影画像から、直線が交差した交点部分を検出し、前記交点部分を前記特徴点の座標として検出することを特徴とする請求項7に記載の面積計測装置。 When the specific shape of the predetermined pattern light is detected as the feature point, the feature point detecting means detects an intersection portion where straight lines intersect from the captured image, and the intersection portion is the coordinates of the feature point. The area measuring device according to claim 7, wherein the area measuring device is detected as. 前記特徴点検出手段は、前記撮影画像の中で同じ色領域の画素から近似した直線が交差した前記交点部分を、前記特徴点の座標として検出することを特徴とする請求項9に記載の面積計測装置。 The area according to claim 9, wherein the feature point detecting means detects the intersection portion where straight lines approximated from pixels in the same color region intersect in the captured image as the coordinates of the feature point. Measuring device. 前記所定のパターン光が投影された状態の前記対象被写体を撮影した撮影画像から前記検出された前記特徴点の座標に基づいて、ユーザに対する通知を表示装置に表示させる表示手段を有することを特徴とする請求項1から請求項10のいずれか1項に記載の面積計測装置。 It is characterized by having a display means for displaying a notification to a user on a display device based on the coordinates of the feature points detected from a captured image of the target subject in a state where the predetermined pattern light is projected. The area measuring device according to any one of claims 1 to 10. 前記表示手段は、前記所定のパターン光が投影された状態の前記対象被写体を撮影した撮影画像から前記検出された前記特徴点の座標と、前記参照座標との差が所定の座標差より大きい場合、前記差を所定の座標差より小さくさせるための指示を表す通知を前記表示させことを特徴とする請求項11に記載の面積計測装置。 When the difference between the coordinates of the feature point detected from the captured image of the target subject in the state where the predetermined pattern light is projected and the reference coordinates is larger than the predetermined coordinate difference. The area measuring device according to claim 11, wherein a notification indicating an instruction for making the difference smaller than a predetermined coordinate difference is displayed. 前記表示手段は、前記所定のパターン光が投影された状態の前記対象被写体を撮影した撮影画像から前記検出された前記特徴点の座標に基づく座標範囲のなかに、前記対象領域の座標が収まっていない場合、前記対象領域を前記座標範囲のなかに収めさせるための指示を表す通知を前記表示させることを特徴とする請求項11または請求項12に記載の面積計測装置。 In the display means, the coordinates of the target area are contained in the coordinate range based on the coordinates of the feature points detected from the captured image of the target subject in the state where the predetermined pattern light is projected. The area measuring device according to claim 11 or 12, wherein if not, a notification indicating an instruction for accommodating the target area within the coordinate range is displayed. 前記表示手段は、前記所定のパターン光が投影された状態の前記対象被写体を撮影した撮影画像から前記検出された前記特徴点の座標と、前記対象領域の座標との間の距離が所定の距離より大きい場合、前記特徴点と前記対象領域とを近づけさせるための指示を表す通知を前記表示させることを特徴とする請求項11から請求項13のいずれか1項に記載の面積計測装置。 In the display means, the distance between the coordinates of the feature point detected from the captured image of the target subject in the state where the predetermined pattern light is projected and the coordinates of the target area is a predetermined distance. The area measuring device according to any one of claims 11 to 13, wherein when the size is larger, a notification indicating an instruction for bringing the feature point closer to the target area is displayed. 面積計測装置が実行する面積計測方法であって、
複数の特徴点を含む所定のパターン光が投影された対象被写体を撮影した撮影画像から、前記投影された所定のパターン光の前記特徴点の座標を検出する特徴点検出工程と、
前記対象被写体が撮影された際の被写体距離を取得する距離取得工程と、
事前に用意された所定の参照座標と被写体距離とを対応付けて保持する座標保持工程と、
前記対象被写体の前記撮影画像から前記検出した前記特徴点の座標と、当該対象被写体を撮影した際の被写体距離に対応した前記参照座標とを用いた射影変換に基づいて、前記対象被写体の撮影画像に画像変換処理を行う画像変換工程と、
前記画像変換処理を行った後の前記対象被写体の撮影画像から、面積計測を行う対象領域を検出する領域検出工程と、
前記領域検出工程によって前記検出された前記対象領域の画素数と、前記対象被写体を前記撮影した際の被写体距離に基づく画素当たりの面積とから、前記対象領域の面積を取得する面積取得工程と、
を有することを特徴とする面積計測方法。
It is an area measurement method executed by the area measurement device.
A feature point detection step of detecting the coordinates of the feature points of the projected predetermined pattern light from a captured image of a target subject on which a predetermined pattern light including a plurality of feature points is projected.
A distance acquisition process for acquiring the subject distance when the target subject is photographed, and
A coordinate holding process that holds a predetermined reference coordinate prepared in advance and a subject distance in association with each other,
A captured image of the target subject based on a projective transformation using the coordinates of the feature point detected from the captured image of the target subject and the reference coordinates corresponding to the subject distance when the target subject is photographed. Image conversion process that performs image conversion processing and
An area detection step of detecting a target area for area measurement from a captured image of the target subject after the image conversion process is performed.
An area acquisition step of acquiring the area of the target area from the number of pixels of the target area detected by the area detection step and the area per pixel based on the subject distance when the target subject is photographed.
An area measurement method characterized by having.
コンピュータを、請求項1から請求項14のいずれか1項に記載の面積計測装置が有する各手段として機能させるためのプログラム。 A program for causing a computer to function as each means included in the area measuring device according to any one of claims 1 to 14.
JP2020035836A 2020-03-03 2020-03-03 Area measuring device, area measuring method, and program Active JP7463133B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020035836A JP7463133B2 (en) 2020-03-03 2020-03-03 Area measuring device, area measuring method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020035836A JP7463133B2 (en) 2020-03-03 2020-03-03 Area measuring device, area measuring method, and program

Publications (2)

Publication Number Publication Date
JP2021139672A true JP2021139672A (en) 2021-09-16
JP7463133B2 JP7463133B2 (en) 2024-04-08

Family

ID=77668299

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020035836A Active JP7463133B2 (en) 2020-03-03 2020-03-03 Area measuring device, area measuring method, and program

Country Status (1)

Country Link
JP (1) JP7463133B2 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018014572A (en) * 2016-07-19 2018-01-25 株式会社リコー Information processing apparatus, image processing system, and program
JP2019144191A (en) * 2018-02-23 2019-08-29 株式会社市川工務店 Image processing system, image processing method and program for inspecting structure such as bridge

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018014572A (en) * 2016-07-19 2018-01-25 株式会社リコー Information processing apparatus, image processing system, and program
JP2019144191A (en) * 2018-02-23 2019-08-29 株式会社市川工務店 Image processing system, image processing method and program for inspecting structure such as bridge

Also Published As

Publication number Publication date
JP7463133B2 (en) 2024-04-08

Similar Documents

Publication Publication Date Title
JP3960390B2 (en) Projector with trapezoidal distortion correction device
JP5401940B2 (en) Projection optical system zoom ratio measurement method, projection image correction method using the zoom ratio measurement method, and projector for executing the correction method
JP6363863B2 (en) Information processing apparatus and information processing method
CN110456602B (en) Projection pattern correction device, method and system of projection system
JP2010271199A (en) Three-dimensional shape measuring device, three-dimensional shape measuring method, and computer program
JP2005020314A (en) Calculating method, calculating program and calculating apparatus for display characteristic correction data
JP2009031150A (en) Three-dimensional shape measuring device, three-dimensional shape measurement method, three-dimensional shape measurement program, and record medium
TWI484283B (en) Image measurement method, image measurement apparatus and image inspection apparatus
JP2016527478A (en) 3D imaging device, 3D image creation method, and 3D imaging device setting method
WO2019184410A1 (en) Method and apparatus for measuring distortion parameters of virtual reality device, and measuring system
CN110381302B (en) Projection pattern correction method, device and system for projection system
JP6981531B2 (en) Object identification device, object identification system, object identification method and computer program
WO2022050279A1 (en) Three-dimensional measurement device
JP7504688B2 (en) Image processing device, image processing method and program
WO2014073590A1 (en) Three-dimensional measuring device and three-dimensional measuring method
JP2005331585A (en) Projector having device for measuring distance and tilt angle
JP7463133B2 (en) Area measuring device, area measuring method, and program
JP4598372B2 (en) 3D field for calibration, 3D field for calibration
JP2005017350A (en) Projector
JP7173825B2 (en) Camera system, its control method and program
JP2005024618A (en) Projector having tilt angle measuring instrument
JP2010183219A (en) Method of measuring zoom ratio for projection optical system, projected image correction method using the zoom ratio measurement method, and projector executing the correction method
JPS63289406A (en) Three-dimensional configuration measuring instrument
JP4535769B2 (en) Projector with tilt angle measuring device
JP3914938B2 (en) Projector keystone distortion correction device and projector including the keystone distortion correction device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230228

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20230919

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20231003

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20231201

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20240327

R150 Certificate of patent or registration of utility model

Ref document number: 7463133

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150