JP2016170610A - Three-dimensional model processing device and camera calibration system - Google Patents

Three-dimensional model processing device and camera calibration system Download PDF

Info

Publication number
JP2016170610A
JP2016170610A JP2015049705A JP2015049705A JP2016170610A JP 2016170610 A JP2016170610 A JP 2016170610A JP 2015049705 A JP2015049705 A JP 2015049705A JP 2015049705 A JP2015049705 A JP 2015049705A JP 2016170610 A JP2016170610 A JP 2016170610A
Authority
JP
Japan
Prior art keywords
edge
dimensional
coordinate data
image
camera
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2015049705A
Other languages
Japanese (ja)
Other versions
JP6352208B2 (en
Inventor
豊 宮北
Yutaka Miyakita
豊 宮北
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.)
Secom Co Ltd
Original Assignee
Secom Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Secom Co Ltd filed Critical Secom Co Ltd
Priority to JP2015049705A priority Critical patent/JP6352208B2/en
Publication of JP2016170610A publication Critical patent/JP2016170610A/en
Application granted granted Critical
Publication of JP6352208B2 publication Critical patent/JP6352208B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To solve a problem that when extracting an edge in a spatial model obtained by three-dimensional measurement, there is difficulty extracting a true edge present at a boundary with an unmeasured area correctly.SOLUTION: Spatial model storage means 510 stores the three-dimensional model of an object composed of a plurality of three-dimensional coordinate data obtained by measuring a depth from a base point to the surface of the object. Edge presence addition means 531 makes the spatial model storage means 510 store an edge affirmative value indicating that an object edge exists in front data among the front data and back data whose directions from the base point are adjacent to each other and depths from the base point are different by or more than a prescribed value, each of which is three-dimensional coordinate data located at a boundary with a depth unmeasured area that is a dead corner from the base point.SELECTED DRAWING: Figure 2

Description

本発明は、所定対象を計測した三次元座標データから三次元モデルを生成する三次元モデル処理装置、三次元モデルから任意視点のエッジ画像を生成する三次元モデル処理装置および三次元モデルを利用してカメラを校正するカメラ校正システムに関する。   The present invention uses a three-dimensional model processing device that generates a three-dimensional model from three-dimensional coordinate data obtained by measuring a predetermined target, a three-dimensional model processing device that generates an edge image of an arbitrary viewpoint from a three-dimensional model, and a three-dimensional model. The present invention relates to a camera calibration system for calibrating a camera.

監視カメラを設置する空間を予め三次元計測して当該空間の三次元モデル(空間モデル)を生成しておけば、空間モデルを用いて監視カメラの撮影画像とマッチする視点を探索することによって、監視カメラの校正が可能となる。その探索においては、様々な位置姿勢の仮想カメラによって空間モデルを模擬撮影し、模擬撮影した画像と監視カメラで実際に撮影した画像とを比較して、エッジの位置が最も一致する仮想カメラの位置姿勢を監視カメラの位置姿勢と決定する。   If the space where the surveillance camera is installed is three-dimensionally measured and a three-dimensional model (spatial model) of the space is generated in advance, by searching for a viewpoint that matches the captured image of the surveillance camera using the spatial model, The surveillance camera can be calibrated. In the search, a virtual model with various positions and orientations is simulated and the virtual camera position where the edge position is the best is obtained by comparing the simulated image with the image actually captured by the surveillance camera. The posture is determined as the position and posture of the monitoring camera.

下記非特許文献1には、居室の三次元モデルに対してカメラパラメータが既知の仮想カメラによる任意視点の画像(生成画像)を生成し、携帯カメラで撮影した実画像と生成画像とからそれぞれ抽出したエッジの一種であるSIFT(Scale Invariant Feature Transform)をマッチング処理することによって携帯カメラの位置・姿勢を推定することが記載されている。   In Non-Patent Document 1 below, an arbitrary viewpoint image (generated image) is generated for a three-dimensional model of a room by a virtual camera with known camera parameters, and extracted from a real image and a generated image captured by a portable camera, respectively. It describes that the position / posture of a portable camera is estimated by performing a matching process on SIFT (Scale Invariant Feature Transform), which is a kind of edge.

西田純、他、「仮想化現実環境モデルに基づく携帯カメラの位置方位推定に向けて」、電子情報通信学会技術研究報告、vol. 111, no. 101, MVE2011-28, pp. 73-78, 2011年6月Jun Nishida, et al., “Towards Position Estimation of Mobile Camera Based on Virtual Reality Environment Model”, IEICE Technical Report, vol. 111, no. 101, MVE2011-28, pp. 73-78, June 2011

しかしながら、実際に三次元計測して得た空間モデルにおいては、オクルージョンによって生じた未計測領域が含まれ得る。この未計測領域が原因で監視カメラの校正などに有用なエッジが減少してしまう問題があった。   However, in a spatial model obtained by actually performing three-dimensional measurement, an unmeasured region caused by occlusion can be included. Due to this unmeasured area, there is a problem that the number of edges useful for calibration of the surveillance camera is reduced.

例えば、警備対象となる部屋を隅々まで三次元計測して回ることは困難であり、距離画像センサなどの計測装置から見て机の陰などにより生じた死角が未計測領域となる。そして、空間モデルを計測時の視点以外から模擬撮影すると、模擬画像上に、死角を作った机の縁が未計測領域と隣り合って現れてしまう。ここで、未計測領域においては、それに隣接して計測された机の面が連続して広がっているのか、又は未計測領域との境界で終わっているのかといった情報が得られない。そのため、机の縁自体は計測できているにもかかわらず監視カメラの校正などに有用な机の縁のエッジを抽出できなくなる。このことは監視カメラの校正精度低下につながる。   For example, it is difficult to three-dimensionally measure a room that is a security target, and a blind spot caused by the shadow of a desk when viewed from a measuring device such as a distance image sensor becomes an unmeasured area. Then, if the spatial model is simulated and photographed from other than the viewpoint at the time of measurement, the edge of the desk that made the blind spot appears next to the unmeasured area on the simulated image. Here, in the non-measurement area, information on whether the desk surface measured adjacent to the non-measurement area continuously spreads or ends at the boundary with the non-measurement area cannot be obtained. For this reason, it is impossible to extract the edge of the desk which is useful for calibration of the surveillance camera even though the edge of the desk itself can be measured. This leads to a decrease in the calibration accuracy of the surveillance camera.

なお、陰を作った机の縁と模擬画像上で隣り合う未計測領域は、机の縁以外の床などとも隣り合う。そのため、仮に、模擬画像から机の縁のエッジを抽出するために未計測領域と計測領域の境界をエッジとみなしてしまうと、床部分から偽のエッジを抽出することになる。偽のエッジの抽出も、やはり監視カメラの校正精度低下につながる。   The unmeasured area adjacent to the shaded desk edge on the simulated image is adjacent to the floor other than the desk edge. Therefore, if the boundary between the unmeasured area and the measurement area is regarded as an edge in order to extract the edge of the desk edge from the simulated image, a false edge is extracted from the floor portion. The extraction of false edges also leads to a decrease in the calibration accuracy of the surveillance camera.

また、物体を計測して得た三次元モデルを用いた物体認識や共通の空間を計測して得た三次元モデル同士の連結処理などにおいても同様に有用なエッジが減少してしまう問題があった。   In addition, there is a problem that useful edges are similarly reduced in object recognition using a three-dimensional model obtained by measuring an object and a process of connecting three-dimensional models obtained by measuring a common space. It was.

本発明は、上記問題を鑑みてなされたものであり、未計測領域との境界にある真のエッジを抽出可能な三次元モデルを提供できる三次元モデル処理装置の実現を目的とする。また、本発明は、三次元モデルから未計測領域との境界にある真のエッジを含めた任意視点のエッジ画像を生成できる三次元モデル処理装置の提供を別の目的とする。さらに本発明は、三次元モデルを利用したカメラ校正の精度を向上させることを別の目的とする。   The present invention has been made in view of the above problems, and an object of the present invention is to realize a three-dimensional model processing apparatus that can provide a three-dimensional model that can extract a true edge at the boundary with an unmeasured region. Another object of the present invention is to provide a three-dimensional model processing apparatus capable of generating an edge image of an arbitrary viewpoint including a true edge at the boundary with an unmeasured region from a three-dimensional model. Furthermore, another object of the present invention is to improve the accuracy of camera calibration using a three-dimensional model.

(1)本発明に係る三次元モデル処理装置は、基点から対象の表面までの奥行きを計測して得た複数の三次元座標データによって構成された前記対象の三次元モデルを記憶している三次元モデル記憶手段と、それぞれ前記基点からの死角である奥行き未計測領域との境界に位置する前記三次元座標データとなる、当該基点からの向きが互いに隣接し且つ当該基点からの奥行きが所定値以上異なる手前データと奥データとのうち手前データに、前記対象のエッジが存在することを示すエッジ肯定値を前記三次元モデル記憶手段に記憶させるエッジ存在度付与手段と、を備える。   (1) A three-dimensional model processing device according to the present invention stores a three-dimensional model of the target composed of a plurality of three-dimensional coordinate data obtained by measuring the depth from a base point to the surface of the target. The three-dimensional coordinate data located at the boundary between the original model storage means and the depth-unmeasured area that is a blind spot from the base point, the directions from the base point are adjacent to each other, and the depth from the base point is a predetermined value Edge presence degree giving means for storing an edge affirmation value indicating that the target edge exists in the near data among the different near data and the back data, in the three-dimensional model storage means.

(2)他の本発明に係る三次元モデル処理装置は、上記(1)の構成に加え、前記三次元モデルを任意の位置姿勢にて模擬撮影する仮想カメラを設定する仮想カメラ設定手段と、前記仮想カメラの撮影面にて、前記エッジ肯定値を有する三次元座標データの投影位置をエッジ画素とする仮想エッジ画像を生成する仮想エッジ画像生成手段と、を備える。   (2) Another three-dimensional model processing apparatus according to the present invention, in addition to the configuration of (1) above, a virtual camera setting means for setting a virtual camera for simulating and photographing the three-dimensional model at an arbitrary position and orientation; Virtual edge image generation means for generating a virtual edge image with the projected position of the three-dimensional coordinate data having the edge positive value as an edge pixel on the imaging surface of the virtual camera.

(3)本発明に係るカメラ校正システムは、上記(2)の三次元モデル処理装置と、実カメラが前記対象を撮影した実画像を取得し、前記実画像上にて前記対象のエッジを表すエッジ画素を抽出して実エッジ画像を生成する実エッジ画像生成手段と、前記実エッジ画像と前記仮想エッジ画像との類似度を算出して、前記類似度を最大化する前記仮想カメラの位置姿勢を前記実カメラの位置姿勢と決定するエッジ画像照合手段と、を備える。   (3) The camera calibration system according to the present invention acquires a real image obtained by photographing the target with the three-dimensional model processing device of (2) above and a real camera, and represents the edge of the target on the real image. Real edge image generation means for extracting edge pixels to generate a real edge image; and calculating the degree of similarity between the real edge image and the virtual edge image and maximizing the degree of similarity. And an edge image collating means for determining the position and orientation of the real camera.

(4)別の本発明に係る三次元モデル処理装置は、基点から対象の表面までの奥行きを計測して得た複数の三次元座標データによって構成された前記対象の三次元モデルを記憶し、それぞれ前記基点からの死角である奥行き未計測領域との境界に位置する前記三次元座標データとなる、前記基点からの向きが互いに隣接し且つ当該基点からの奥行きが所定値以上異なる手前データと奥データとのうち手前データは、前記対象のエッジが存在することを示すエッジ肯定値を付与されている三次元モデル記憶手段と、前記三次元モデルを任意の位置姿勢にて模擬撮影する仮想カメラを設定する仮想カメラ設定手段と、前記仮想カメラの撮影面にて、前記エッジ肯定値を有する三次元座標データの投影位置をエッジ画素とする仮想エッジ画像を生成する仮想エッジ画像生成手段と、を備える。   (4) Another three-dimensional model processing apparatus according to the present invention stores the three-dimensional model of the object configured by a plurality of three-dimensional coordinate data obtained by measuring the depth from the base point to the surface of the object, Each of the three-dimensional coordinate data located at the boundary with the depth-unmeasured area, which is a blind spot from the base point, and the front data and the back side that are adjacent to each other in the direction from the base point and whose depths from the base point are different from each other by a predetermined value or more. The front data out of the data includes a three-dimensional model storage means to which an edge affirmation value indicating that the target edge exists, and a virtual camera that simulates and shoots the three-dimensional model at an arbitrary position and orientation. A virtual edge setting unit, and a virtual edge image having an edge pixel as a projection position of the three-dimensional coordinate data having the edge affirmative value is generated on the imaging surface of the virtual camera. Includes a virtual edge image generation unit that, the.

(5)上記(4)の三次元モデル処理装置において、前記三次元モデル記憶手段に記憶される前記三次元モデルはさらに、前記対象を撮影した画像において隣接画素との輝度差が所定値以上である画素に対応する三次元座標データに前記エッジ肯定値を付与されている構成とすることができる。   (5) In the three-dimensional model processing apparatus according to (4), the three-dimensional model stored in the three-dimensional model storage means further has a luminance difference with an adjacent pixel in an image obtained by photographing the target being a predetermined value or more. The edge affirmative value can be given to the three-dimensional coordinate data corresponding to a certain pixel.

(6)上記(4)、(5)の三次元モデル処理装置において、前記三次元モデル記憶手段に記憶される前記三次元モデルはさらに、隣接する三次元座標データとの前記対象の表面の法線ベクトルの差が所定値以上である三次元座標データに前記エッジ肯定値を付与されている構成とすることができる。   (6) In the three-dimensional model processing apparatus of (4) and (5), the three-dimensional model stored in the three-dimensional model storage means is further a method of the surface of the object with adjacent three-dimensional coordinate data. The edge affirmative value may be assigned to three-dimensional coordinate data in which the difference between the line vectors is equal to or greater than a predetermined value.

(7)他の本発明に係るカメラ校正システムは、対象の表面の位置を表す複数の三次元座標データによって構成され、前記対象の表面に前記三次元座標データが得られていない領域が存在する三次元モデルであって、前記三次元座標データはそれが表す前記位置に前記対象のエッジが存在する可能性の高さを表すエッジ存在度を付与されている三次元モデルを記憶する三次元モデル記憶手段と、前記対象を撮影するカメラの位置姿勢を、前記エッジ存在度が所定値以上である前記三次元座標データを用いて求める校正手段と、を備える。   (7) Another camera calibration system according to the present invention is configured by a plurality of three-dimensional coordinate data representing the position of the target surface, and there is a region where the three-dimensional coordinate data is not obtained on the target surface. A three-dimensional model for storing a three-dimensional model in which the three-dimensional coordinate data is given an edge presence level indicating a high possibility that the target edge exists at the position represented by the three-dimensional coordinate data. Storage means, and calibration means for obtaining the position and orientation of the camera that captures the object using the three-dimensional coordinate data in which the edge presence degree is a predetermined value or more.

本発明によれば、未計測領域との境界にあるエッジをも抽出可能な三次元モデルを生成できる。また、本発明によれば、未計測領域を含む三次元モデルから未計測領域との境界にあるエッジを含めた任意の視点のエッジ画像を生成できる。また、本発明によれば、計測して得た三次元モデルを利用して精度よくカメラ校正を行うことができる。   According to the present invention, it is possible to generate a three-dimensional model that can extract an edge at a boundary with an unmeasured region. Further, according to the present invention, an edge image of an arbitrary viewpoint including an edge at a boundary with an unmeasured region can be generated from a three-dimensional model including the unmeasured region. In addition, according to the present invention, camera calibration can be performed with high accuracy using a three-dimensional model obtained by measurement.

本発明の実施形態に係るカメラ校正システムの概略の構成を示すブロック図である。1 is a block diagram showing a schematic configuration of a camera calibration system according to an embodiment of the present invention. 三次元計測装置から入力された計測データを用いて空間モデルを生成する際の三次元データ処理装置の機能ブロック図である。It is a functional block diagram of a three-dimensional data processing device when generating a spatial model using measurement data input from a three-dimensional measurement device. 三次元計測装置を用いた部屋の計測の様子を示す模式的な斜視図である。It is a typical perspective view which shows the mode of the measurement of the room using a three-dimensional measuring apparatus. 空間モデルのデータ例を示す模式図である。It is a schematic diagram which shows the example of data of a space model. 部屋を計測位置から計測した距離画像の模式図である。It is a schematic diagram of the distance image which measured the room from the measurement position. 部屋を計測して得られた空間モデルを上方からみた模式図である。It is the schematic diagram which looked at the space model obtained by measuring a room from the upper part. エッジ存在度の例を説明するための部屋の空間モデルの模式図である。It is a schematic diagram of the space model of the room for demonstrating the example of edge presence degree. 部屋の空間モデルを用いて、部屋に設置された監視カメラを校正するときの三次元データ処理装置の概略の機能ブロック図である。It is a functional block diagram of the outline of the three-dimensional data processing apparatus when calibrating the surveillance camera installed in the room using the room space model. 空間モデル生成時のカメラ校正システムの動作の概略のフロー図である。It is a schematic flowchart of operation | movement of the camera calibration system at the time of a space model production | generation. 空間モデル生成時のカメラ校正システムの動作の概略のフロー図である。It is a schematic flowchart of operation | movement of the camera calibration system at the time of a space model production | generation. カメラ校正時のカメラ校正システムの動作の概略のフロー図である。It is a schematic flowchart of operation | movement of the camera calibration system at the time of camera calibration.

以下、本発明の実施の形態(以下実施形態という)として、監視カメラが設置された空間の三次元モデル(空間モデル)を利用して監視カメラを校正するカメラ校正システムの例を説明する。このカメラ校正システムには、上記空間を三次元計測した計測データから当該空間の空間モデルを生成し、また、当該空間モデルから任意視点のエッジ画像を生成する三次元モデル処理装置の例が含まれる。   Hereinafter, as an embodiment of the present invention (hereinafter referred to as an embodiment), an example of a camera calibration system that calibrates a surveillance camera using a three-dimensional model (space model) of a space in which the surveillance camera is installed will be described. This camera calibration system includes an example of a three-dimensional model processing device that generates a space model of the space from measurement data obtained by three-dimensionally measuring the space and generates an edge image of an arbitrary viewpoint from the space model. .

[カメラ校正システム1の構成]
図1はカメラ校正システム1の概略の構成を示すブロック図である。カメラ校正システム1は、三次元計測装置2、監視カメラ3、監視装置4及び三次元データ処理装置5からなる。
[Configuration of Camera Calibration System 1]
FIG. 1 is a block diagram showing a schematic configuration of the camera calibration system 1. The camera calibration system 1 includes a three-dimensional measuring device 2, a monitoring camera 3, a monitoring device 4, and a three-dimensional data processing device 5.

三次元計測装置2は、監視カメラ3が設置された部屋を三次元計測して距離画像を取得すると共に、それと同期して部屋を撮影してRGB画像を取得し、部屋の距離画像およびRGB画像を含めた計測データを三次元データ処理装置5に出力する。例えば三次元計測装置2はRGBDカメラであり、投射したレーザー光が対象表面との往復にかかる時間から距離を計測するTOF(Time Of Flight)方式の距離センサ、および当該距離センサと同期して同一視野のRGB画像を撮影するカラーカメラを組み合わせた装置である。なお、カメラは濃淡画像を取得するモノクロカメラであってもよい。すなわち、三次元計測装置2は、計測位置(基点)から所定対象の表面までの奥行きを三次元計測して所定対象の三次元データを三次元データ処理装置5に出力し、好適にはさらに、三次元計測と同期して同一基点から所定対象を撮影し、所定対象の二次元画像を三次元データ処理装置5に出力する。   The three-dimensional measuring device 2 three-dimensionally measures the room in which the surveillance camera 3 is installed to obtain a distance image, and captures the room in synchronization with it to obtain an RGB image. The distance image of the room and the RGB image Is output to the three-dimensional data processing device 5. For example, the three-dimensional measuring device 2 is an RGBD camera, and is the same in synchronization with the distance sensor of the TOF (Time Of Flight) method that measures the distance from the time required for the projected laser light to reciprocate with the target surface, and the distance sensor. This is a device combined with a color camera that captures an RGB image of the field of view. The camera may be a monochrome camera that acquires gray images. That is, the three-dimensional measuring device 2 three-dimensionally measures the depth from the measurement position (base point) to the surface of the predetermined target, and outputs the three-dimensional data of the predetermined target to the three-dimensional data processing device 5, preferably further A predetermined object is photographed from the same base point in synchronization with the three-dimensional measurement, and a two-dimensional image of the predetermined object is output to the three-dimensional data processing device 5.

監視カメラ3は校正対象のカメラである。例えば、複数の監視カメラ3がそれぞれ部屋の天井に設置され、天井から部屋を撮影し、監視画像と、予め付与されたカメラIDを監視装置4に出力する。また、監視カメラ3の校正時には監視カメラ3は監視画像とカメラIDを三次元データ処理装置5に出力する。   The surveillance camera 3 is a camera to be calibrated. For example, a plurality of surveillance cameras 3 are respectively installed on the ceiling of the room, the room is photographed from the ceiling, and a surveillance image and a camera ID assigned in advance are output to the surveillance device 4. When the monitoring camera 3 is calibrated, the monitoring camera 3 outputs a monitoring image and a camera ID to the three-dimensional data processing device 5.

監視装置4は三次元データ処理装置5から監視カメラ3の位置姿勢(撮影位置姿勢)を含むカメラパラメータを入力され、これを格納する。撮影位置姿勢は、実空間を模した世界座標系における監視カメラ3の撮影位置(光点位置)および撮影姿勢(光軸方向とその回転角)である。そして、この監視カメラ3の撮影位置姿勢を求める処理が校正である。   The monitoring device 4 receives camera parameters including the position and orientation (imaging position and orientation) of the monitoring camera 3 from the three-dimensional data processing device 5 and stores them. The shooting position and orientation are a shooting position (light spot position) and a shooting posture (optical axis direction and its rotation angle) of the monitoring camera 3 in the world coordinate system imitating real space. The process for obtaining the shooting position and orientation of the monitoring camera 3 is calibration.

また、監視装置4は監視カメラ3からの監視画像を解析して部屋内を移動する人物を追跡し、不審行動を検知する。不審人物を検知する際、監視装置4は校正されたカメラパラメータを基に監視画像から抽出した変化領域の実サイズなどを求めて変化領域が人によるものか否かなどの判定を行う。   In addition, the monitoring device 4 analyzes a monitoring image from the monitoring camera 3 to track a person who moves in the room and detects suspicious behavior. When detecting a suspicious person, the monitoring device 4 determines the actual size of the change area extracted from the monitoring image based on the calibrated camera parameters, and determines whether or not the change area is a person.

三次元データ処理装置5は例えば、PC(Personal Computer)などのコンピュータで構成される。三次元データ処理装置5は三次元計測装置2から入力された計測データを用いて空間モデルを生成する。また、三次元データ処理装置5は監視カメラ3から監視画像とカメラIDとを入力され、監視画像と空間モデルとを基に監視カメラ3を校正し、校正結果である監視カメラ3の撮影位置姿勢を含むカメラパラメータを、対応するカメラIDと共に監視装置4に出力する。カメラパラメータには、撮影位置姿勢の他に焦点距離、解像度(幅方向画素数、高さ方向画素数)、レンズ歪みなどが含まれる。これらのうち撮影位置姿勢以外は基本的に変動しない。そのため、撮影位置姿勢以外のカメラパラメータについては監視カメラ3の仕様を参照して得た値、或いは予めの計測により得た値を予め三次元データ処理装置5に記憶させておく。   The three-dimensional data processing device 5 is configured by a computer such as a PC (Personal Computer). The three-dimensional data processing device 5 generates a spatial model using the measurement data input from the three-dimensional measurement device 2. Also, the three-dimensional data processing device 5 receives the monitoring image and the camera ID from the monitoring camera 3, calibrates the monitoring camera 3 based on the monitoring image and the space model, and the shooting position and orientation of the monitoring camera 3 as a calibration result. Are output to the monitoring device 4 together with the corresponding camera ID. Camera parameters include focal length, resolution (number of pixels in the width direction, number of pixels in the height direction), lens distortion, and the like in addition to the shooting position and orientation. Of these, there is basically no change except for the shooting position and orientation. Therefore, for camera parameters other than the shooting position and orientation, values obtained by referring to the specifications of the monitoring camera 3 or values obtained by previous measurement are stored in the three-dimensional data processing device 5 in advance.

三次元データ処理装置5は計測データ入力部50、記憶部51、監視画像入力部52、制御部53、出力部54及びユーザーインターフェース部55を含む。   The three-dimensional data processing device 5 includes a measurement data input unit 50, a storage unit 51, a monitoring image input unit 52, a control unit 53, an output unit 54 and a user interface unit 55.

計測データ入力部50は三次元計測装置2と制御部53とを接続する通信インターフェース回路であり、三次元計測装置2から計測データを入力され、これを制御部53に出力する。   The measurement data input unit 50 is a communication interface circuit that connects the three-dimensional measurement device 2 and the control unit 53, receives measurement data from the three-dimensional measurement device 2, and outputs this to the control unit 53.

記憶部51はROM (Read Only Memory)、RAM (Random Access Memory)等の記憶装置であり、各種プログラムや各種データを記憶し、制御部53との間でこれらの情報を入出力する。   The storage unit 51 is a storage device such as a ROM (Read Only Memory) or a RAM (Random Access Memory), stores various programs and various data, and inputs / outputs these information to / from the control unit 53.

監視画像入力部52は監視カメラ3と制御部53とを接続する通信インターフェース回路であり、監視カメラ3から撮影画像及びカメラIDを入力され、これらを制御部53に出力する。   The monitoring image input unit 52 is a communication interface circuit that connects the monitoring camera 3 and the control unit 53. The monitoring image input unit 52 receives the captured image and the camera ID from the monitoring camera 3 and outputs them to the control unit 53.

制御部53はCPU(Central Processing Unit)、DSP(Digital Signal Processor)、MCU(Micro Control Unit)等の演算装置を用いて構成される。制御部53は記憶部51からプログラムを読み出して実行することで後述する各手段として機能する。   The control unit 53 is configured using an arithmetic device such as a CPU (Central Processing Unit), a DSP (Digital Signal Processor), or an MCU (Micro Control Unit). The control unit 53 reads out and executes the program from the storage unit 51 and functions as each unit described later.

出力部54は制御部53と監視装置4とを接続する通信インターフェース回路であり、制御部53から監視カメラ3のカメラパラメータ及びカメラIDを入力され、これらを監視装置4に出力する。   The output unit 54 is a communication interface circuit that connects the control unit 53 and the monitoring device 4, receives the camera parameters and camera ID of the monitoring camera 3 from the control unit 53, and outputs them to the monitoring device 4.

ユーザーインターフェース部55はキーボード、マウス、ディスプレイ等からなるユーザーインターフェース機器である。例えば、設置作業者などのユーザーにより使用され、計測データ中の床面領域を指定するなど各種パラメータの入力作業に用いられる。   The user interface unit 55 is a user interface device including a keyboard, a mouse, a display, and the like. For example, it is used by a user such as an installation worker, and is used for inputting various parameters such as designating a floor area in measurement data.

[空間モデル生成時の三次元データ処理装置5]
図2は三次元計測装置2から入力された計測データを用いて空間モデルを生成するときの三次元データ処理装置5の機能ブロック図である。記憶部51は空間モデル記憶手段510および計測パラメータ記憶手段511として機能する。また制御部53は座標変換手段530、エッジ存在度付与手段531として機能する。エッジ存在度付与手段531は変化点抽出手段532とエッジ存在度判定手段533とを含む。
[Three-dimensional data processing device 5 when generating a spatial model]
FIG. 2 is a functional block diagram of the three-dimensional data processing device 5 when a spatial model is generated using measurement data input from the three-dimensional measurement device 2. The storage unit 51 functions as a space model storage unit 510 and a measurement parameter storage unit 511. The control unit 53 functions as a coordinate conversion unit 530 and an edge presence degree giving unit 531. The edge presence degree providing unit 531 includes a change point extracting unit 532 and an edge presence degree determining unit 533.

空間モデル記憶手段510は空間モデル、つまり三次元計測装置2の計測により得た所定対象の三次元モデルを記憶する三次元モデル記憶手段である。空間モデルは、座標変換手段530が変換した複数の三次元座標データ(ポイントクラウドなどと称される)、各三次元座標データと対応付けられた輝度データ、およびエッジ存在度付与手段531により各三次元座標データに付与されたエッジ存在度からなる。ここで、三次元座標データはその位置に物体表面が存在することを意味する。輝度データはその位置における物体表面の色や輝度を表す。エッジ存在度は対応する三次元座標データの位置にエッジが存在する可能性の高さを表す値であり、本実施形態ではエッジ存在度の値域を0.0以上1.0以下であると定義する。エッジ存在度についてはさらに後述する。   The spatial model storage unit 510 is a three-dimensional model storage unit that stores a spatial model, that is, a three-dimensional model of a predetermined target obtained by measurement by the three-dimensional measurement apparatus 2. The spatial model includes a plurality of three-dimensional coordinate data (referred to as a point cloud) converted by the coordinate conversion means 530, luminance data associated with each three-dimensional coordinate data, and each tertiary by the edge presence degree giving means 531. It consists of the edge presence given to the original coordinate data. Here, the three-dimensional coordinate data means that the object surface exists at that position. The luminance data represents the color and luminance of the object surface at that position. The edge presence level is a value representing the high possibility that an edge exists at the position of the corresponding three-dimensional coordinate data. In this embodiment, the edge presence level is defined as 0.0 or more and 1.0 or less. To do. The edge presence will be further described later.

計測パラメータ記憶手段511は三次元計測装置2の計測時の位置姿勢(計測位置姿勢)を含む計測パラメータを記憶する。計測位置姿勢は、実空間を模した世界座標系における三次元計測装置2の計測位置(光点位置)および計測姿勢(光軸方向とその回転角)で表される。計測位置姿勢は座標変換手段530により算出される。あるいは別途実測した計測位置姿勢をユーザーインターフェース部55から予め入力し、これらを記憶してもよい。   The measurement parameter storage unit 511 stores measurement parameters including the position and orientation (measurement position and orientation) at the time of measurement of the three-dimensional measurement apparatus 2. The measurement position / orientation is represented by a measurement position (light spot position) and a measurement attitude (optical axis direction and its rotation angle) of the three-dimensional measurement apparatus 2 in a world coordinate system imitating real space. The measurement position / orientation is calculated by the coordinate conversion means 530. Alternatively, separately measured measurement positions and orientations may be input in advance from the user interface unit 55 and stored.

計測パラメータには、計測位置姿勢の他に焦点距離、解像度(幅方向画素数、高さ方向画素数)などがある。計測位置姿勢以外は基本的に変動しないため、三次元計測装置2の仕様を参照して得た値、或いは予めの計測により得た値を予め記憶させておく。なお画角は焦点距離と解像度とから導出可能である。また、計測パラメータから計測時の投影面が導出できる。   The measurement parameters include a focal length, resolution (number of pixels in the width direction, number of pixels in the height direction) and the like in addition to the measurement position and orientation. Since there is basically no change except for the measurement position and orientation, a value obtained by referring to the specification of the three-dimensional measurement apparatus 2 or a value obtained by a previous measurement is stored in advance. The angle of view can be derived from the focal length and the resolution. In addition, the projection plane at the time of measurement can be derived from the measurement parameters.

座標変換手段530は計測データ入力部50経由で三次元計測装置2から入力された計測データを世界座標系の三次元座標データに座標変換して空間モデル記憶手段510に記憶させる。また、座標変換手段530は計測データから計測時の三次元計測装置2の計測位置姿勢を算出し、算出した計測位置姿勢を計測パラメータ記憶手段511に記憶させる。   The coordinate conversion unit 530 performs coordinate conversion of the measurement data input from the three-dimensional measurement apparatus 2 via the measurement data input unit 50 into three-dimensional coordinate data of the world coordinate system, and stores it in the space model storage unit 510. Also, the coordinate conversion unit 530 calculates the measurement position and orientation of the three-dimensional measurement apparatus 2 at the time of measurement from the measurement data, and stores the calculated measurement position and orientation in the measurement parameter storage unit 511.

座標変換処理の概略の手順は、(a)距離画像から計測位置を原点とするローカル座標系における三次元点群を計算し、(b)ローカル座標系に世界座標系の基準を設定して世界座標系における計測位置姿勢RTを推定し、(c)RTを使ってローカル座標系の三次元点群を世界座標系の三次元座標データに変換するというものである。以下、各手順を説明する。   The outline of the coordinate conversion process is as follows: (a) calculating a three-dimensional point group in the local coordinate system with the measurement position as the origin from the distance image; and (b) setting the reference of the world coordinate system in the local coordinate system. The measurement position and orientation RT in the coordinate system is estimated, and (c) the 3D point group in the local coordinate system is converted into 3D coordinate data in the world coordinate system using RT. Each procedure will be described below.

手順(a)では、次式に従い、まず各画素(x,y)の画素値すなわち奥行き値がdである距離画像(x,y,d)の座標系を三次元計測装置2の光点(計測位置)を原点としたローカル座標系の三次元点群(Xc,Yc,Zc)に変換する。

Figure 2016170610
In step (a), the coordinate system of the distance image (x, y, d) in which the pixel value of each pixel (x, y), that is, the depth value is d, is represented by the light spot ( It is converted into a three-dimensional point group (Xc, Yc, Zc) in the local coordinate system with the measurement position) as the origin.
Figure 2016170610

ただし、距離画像の中心画素位置を(cx,cy)とする。fは三次元計測装置2の焦点距離である。   However, the center pixel position of the distance image is (cx, cy). f is a focal length of the three-dimensional measuring apparatus 2.

手順(b)では、計測位置姿勢RTを算出するために、ローカル座標系の三次元点群のうち床面である点をユーザインターフェース部55を用いて選択入力させ、この選択入力に基づいて計測位置直下の床面の座標値を算出する。これにより例えば、床面をXY平面、高さ方向をZ軸、床面上の計測位置直下点を原点とする世界座標系における計測位置姿勢RT(3×4の行列)を算出することができる。   In step (b), in order to calculate the measurement position / orientation RT, a point on the floor surface of the three-dimensional point group of the local coordinate system is selected and input using the user interface unit 55, and measurement is performed based on the selection input. Calculate the coordinate value of the floor directly under the position. Thereby, for example, the measurement position and orientation RT (3 × 4 matrix) in the world coordinate system with the floor surface as the XY plane, the height direction as the Z axis, and the point immediately below the measurement position on the floor surface as the origin can be calculated. .

手順(c)では手順(b)で求めたRTを利用して次式に従い、ローカル座標系の三次元点群を世界座標系の三次元座標データ(X,Y,Z)に変換する。

Figure 2016170610
In step (c), using the RT obtained in step (b), the three-dimensional point group in the local coordinate system is converted into three-dimensional coordinate data (X, Y, Z) in the world coordinate system according to the following equation.
Figure 2016170610

さらに、座標変換手段530はRGB画像の各画素値を輝度データとして、各画素と対応する距離画像の画素の変換先の三次元座標データと対応付けて、空間モデル記憶手段510に記憶させる。   Further, the coordinate conversion unit 530 stores each pixel value of the RGB image as luminance data in the spatial model storage unit 510 in association with the three-dimensional coordinate data of the conversion destination of the pixel of the distance image corresponding to each pixel.

図3は三次元計測装置2を用いた部屋600の計測の様子を示す模式的な斜視図である。部屋600は、例えば警備対象となる部屋であり、天井には校正対象の監視カメラ3が設置されている。また、部屋600には床601や机602が存在し、床601には模様603が形成されている。ちなみに後述するように、カメラ校正システム1は机602の縁などのエッジを監視カメラ3の校正の基準として利用する。   FIG. 3 is a schematic perspective view showing a state of measurement of the room 600 using the three-dimensional measuring apparatus 2. The room 600 is a room to be guarded, for example, and the monitoring camera 3 to be calibrated is installed on the ceiling. The room 600 includes a floor 601 and a desk 602, and a pattern 603 is formed on the floor 601. Incidentally, as will be described later, the camera calibration system 1 uses an edge such as an edge of the desk 602 as a reference for calibration of the surveillance camera 3.

監視カメラの設置作業者は三次元計測装置2を用いて部屋600を三次元計測する。三次元計測装置2は計測位置650及び計測姿勢651で表される計測位置姿勢にて、各画素が計測位置650から床601や机602の表面の複数点それぞれまでの奥行きを表す距離画像を出力する。さらに、三次元計測装置2は、部屋600を同一の計測位置姿勢にて撮影したRGB画像を出力する。ここで、三次元計測装置2は基本的に撮影位置652及び撮影姿勢653で表される監視カメラ3の撮影位置姿勢とは異なる計測位置姿勢にて部屋600を計測する。   The installation worker of the monitoring camera measures the room 600 three-dimensionally using the three-dimensional measuring device 2. The three-dimensional measurement apparatus 2 outputs a distance image in which each pixel represents a depth from the measurement position 650 to each of a plurality of points on the surface of the floor 601 or the desk 602 at the measurement position and posture represented by the measurement position 650 and the measurement posture 651. To do. Further, the three-dimensional measurement apparatus 2 outputs an RGB image obtained by photographing the room 600 at the same measurement position and orientation. Here, the three-dimensional measuring apparatus 2 basically measures the room 600 at a measurement position and orientation different from the imaging position and orientation of the monitoring camera 3 represented by the imaging position 652 and the imaging orientation 653.

三次元計測装置2が出力する距離画像およびRGB画像が表す領域は図3において白抜き表示した領域である。この領域を計測領域と呼ぶ。計測領域は部屋600の全体を網羅できず、オクルージョンが原因で未計測領域が生じる。図3において網掛け表示した未計測領域は机602によるオクルージョンが原因で生じた領域であり、基点(計測位置650)からの死角である。また、図3において斜線表示した画角外領域は三次元計測装置2の画角外であった領域である。   The area represented by the distance image and the RGB image output from the three-dimensional measuring apparatus 2 is an area displayed in white in FIG. This area is called a measurement area. The measurement area cannot cover the entire room 600, and an unmeasured area occurs due to occlusion. In FIG. 3, the unmeasured area shaded is an area caused by occlusion by the desk 602, and is a blind spot from the base point (measurement position 650). In FIG. 3, the region outside the angle of view displayed with diagonal lines is the region outside the angle of view of the three-dimensional measurement apparatus 2.

図4は空間モデルのデータ例を示す模式図であり、例えば、三次元座標データ、輝度データ、エッジ存在度を対応付けたテーブル形式で空間モデル記憶手段510に記憶されている。ちなみに、図4に示すデータはいずれも計測領域のデータである。1番目の三次元座標データは空間モデルにおいて座標(X1,Y1,Z1)に物体の表面があり、その色はRGB表色系での(R1,G1,B1)であり、エッジ存在度の値“1.0”は当該座標に机602の縁などのエッジが存在することを示す。2番目の三次元座標データも同様に、空間モデルにおいて座標(X2,Y2,Z2)に物体表面のエッジが存在し、その色が(R2,G2,B2)であることを示す。3番目の三次元座標データは空間モデルにおいて座標(X3,Y3,Z3)に物体の表面があり、その色はRGB表色系での(R3,G3,B3)であり、エッジ存在度の値“0.0”はそこにエッジが存在する可能性が小さいことを示す。   FIG. 4 is a schematic diagram showing an example of data of a spatial model, and is stored in the spatial model storage unit 510 in a table format in which, for example, three-dimensional coordinate data, luminance data, and edge presence are associated with each other. Incidentally, all the data shown in FIG. 4 is data of the measurement region. The first three-dimensional coordinate data has the surface of the object at coordinates (X1, Y1, Z1) in the spatial model, the color is (R1, G1, B1) in the RGB color system, and the value of edge presence “1.0” indicates that an edge such as the edge of the desk 602 exists at the coordinates. Similarly, the second three-dimensional coordinate data indicates that an edge of the object surface exists at coordinates (X2, Y2, Z2) in the spatial model, and the color thereof is (R2, G2, B2). The third three-dimensional coordinate data has the surface of the object at coordinates (X3, Y3, Z3) in the spatial model, the color is (R3, G3, B3) in the RGB color system, and the edge presence value “0.0” indicates that the possibility that an edge exists there is small.

さて、距離画像にて奥行きが変化する点は物体の縁などに生じる、カメラの校正などに有用なエッジである。しかし奥行き変化点が空間モデルにおいて未計測領域との境界に位置する三次元座標データであると実際にエッジが存在していても利用できない問題が生じる。しかも物体の縁の近傍はオクルージョンが生じやすいため、有用なエッジが失われやすい。例えば図3の監視カメラ3が撮影する監視画像には未計測領域が含まれる。部屋600を計測した空間モデルを用いて監視カメラ3が撮影する監視画像を模擬すると、未計測領域の境界には机602の縁と床601の平面とが混在する。共に未計測領域との境界に位置する机602の縁の三次元座標データと床601の平面の三次元座標データとを識別できない限り机602の縁に現れる有用なエッジを棄てざるを得ない。本発明ではエッジ存在度付与手段531により当該有用なエッジが存在する三次元座標データを識別し、識別した三次元座標データにエッジが存在することを示すエッジ肯定値を付与することで、有用なエッジを活用可能な三次元モデルを生成する。   Now, the point where the depth changes in the distance image is an edge useful for camera calibration or the like that occurs at the edge of the object. However, if the depth change point is three-dimensional coordinate data located at the boundary with the unmeasured area in the spatial model, there arises a problem that it cannot be used even if an edge actually exists. Moreover, since the occlusion is likely to occur near the edge of the object, useful edges are likely to be lost. For example, the monitoring image captured by the monitoring camera 3 of FIG. 3 includes an unmeasured area. When a monitoring image captured by the monitoring camera 3 is simulated using a space model obtained by measuring the room 600, the edge of the desk 602 and the plane of the floor 601 are mixed at the boundary of the unmeasured area. Both useful edges appearing on the edge of the desk 602 must be discarded unless the 3D coordinate data of the edge of the desk 602 and the 3D coordinate data of the plane of the floor 601 that are both located at the boundary with the unmeasured area can be identified. In the present invention, the edge presence degree giving means 531 identifies the three-dimensional coordinate data in which the useful edge is present, and the edge positive value indicating that the edge exists is assigned to the identified three-dimensional coordinate data. Generate a 3D model that can use edges.

エッジ存在度付与手段531は空間モデルを構成する複数の三次元座標データにエッジ存在度を付与する。既に述べたようにエッジ存在度は対応する三次元座標データの位置にエッジが存在する可能性の高さを表す値であり、三次元座標データがエッジの位置であるか否かを識別するための情報である。   The edge presence degree giving unit 531 gives the edge presence degree to a plurality of three-dimensional coordinate data constituting the space model. As described above, the edge presence level is a value indicating the high possibility that an edge exists at the position of the corresponding three-dimensional coordinate data, and is used to identify whether the three-dimensional coordinate data is the position of the edge. Information.

対象表面でのエッジは、物体の凹凸により特定視点からの奥行きが大きく変化する三次元座標データが示す位置、同じく物体の凹凸により法線方向が大きく変化する三次元座標データが示す位置、物体表面の模様等により輝度が大きく変化する三次元座標データが示す位置に現れる。エッジ存在度付与手段531は変化点抽出手段532及びエッジ存在度判定手段533により、これらの三次元座標データにエッジ肯定値を付与し空間モデル記憶手段510に記憶させる。   The edge on the target surface is the position indicated by the 3D coordinate data where the depth from the specific viewpoint changes greatly due to the unevenness of the object, the position indicated by the 3D coordinate data where the normal direction changes greatly due to the unevenness of the object, the object surface Appear at the position indicated by the three-dimensional coordinate data where the luminance varies greatly depending on the pattern of the pattern. The edge presence degree assigning means 531 assigns an edge affirmative value to these three-dimensional coordinate data by the change point extracting means 532 and the edge presence degree determining means 533 and stores them in the space model storage means 510.

変化点抽出手段532は空間モデルを構成する複数の三次元座標データの中から奥行き変化点、法線方向変化点および輝度変化点を抽出し、これらをエッジ存在度判定手段533に出力する。   The change point extraction unit 532 extracts depth change points, normal direction change points, and luminance change points from a plurality of three-dimensional coordinate data constituting the space model, and outputs these to the edge presence degree determination unit 533.

まず、奥行き変化点の抽出について説明する。変化点抽出手段532は、計測位置から計測した距離画像上で隣り合う画素間で奥行きの差を算出して予め定めたしきい値Tdと比較し、しきい値Td以上の奥行きの差が算出された画素と対応する三次元座標データを奥行き変化点として抽出する。距離画像上で隣り合う画素と対応する三次元座標データは、空間モデルにおいて基点(計測位置)からの向き(視線方向)が互いに隣接する三次元座標データである。例えば、距離画像に所定のエッジオペレータを適用して各画素の奥行きエッジ強度を算出し、奥行きエッジ強度が予め定めたしきい値Te以上の画素と対応する三次元座標データを奥行き変化点として抽出すればよい。TeはTd以上の奥行きの差を抽出し損なわない範囲に設定しておく。   First, extraction of depth change points will be described. The change point extraction unit 532 calculates a difference in depth between adjacent pixels on the distance image measured from the measurement position, compares the difference with a predetermined threshold value Td, and calculates a difference in depth greater than or equal to the threshold value Td. Three-dimensional coordinate data corresponding to the selected pixel is extracted as a depth change point. The three-dimensional coordinate data corresponding to adjacent pixels on the distance image is three-dimensional coordinate data in which the directions (gaze direction) from the base point (measurement position) are adjacent to each other in the spatial model. For example, a predetermined edge operator is applied to the distance image to calculate the depth edge strength of each pixel, and 3D coordinate data corresponding to a pixel whose depth edge strength is equal to or greater than a predetermined threshold Te is extracted as a depth change point. do it. Te is set to a range in which a difference in depth equal to or greater than Td is extracted and not impaired.

エッジオペレータにはソーベルオペレータ(Sobel Operator)を用いることができるが、ラプラシアンフィルタ(Laplacian Filter)など他の公知のオペレータを用いてもよい。   As the edge operator, a Sobel operator can be used, but other known operators such as a Laplacian filter may be used.

本実施形態では三次元計測装置2から入力される距離画像を奥行き変化点の抽出に用いる。一方、三次元計測装置2からの距離画像を直接用いずに、空間モデルと計測パラメータとから上記距離画像を再現し、再現した距離画像から奥行き変化点を抽出してもよい。具体的には、空間モデルを構成する複数の三次元座標データそれぞれについて計測位置からの奥行きを算出し、算出した奥行きを計測パラメータが表す投影面に投影すれば上記距離画像を再現できる。なお、再現する距離画像の画角は三次元計測装置2の画角に合わせる。計測時には記憶部51に距離画像を格納せずに座標変換手段530の処理だけを行っておき、エッジ存在度付与手段531の処理は計測後の別時刻に実行できる。当該構成は記憶部51の容量や制御部53の処理能力が低いときに有効である。   In the present embodiment, the distance image input from the three-dimensional measurement apparatus 2 is used for extracting the depth change point. On the other hand, instead of directly using the distance image from the three-dimensional measurement apparatus 2, the distance image may be reproduced from the spatial model and the measurement parameter, and the depth change point may be extracted from the reproduced distance image. Specifically, the distance image can be reproduced by calculating the depth from the measurement position for each of a plurality of three-dimensional coordinate data constituting the space model and projecting the calculated depth onto the projection plane represented by the measurement parameter. Note that the angle of view of the distance image to be reproduced is matched to the angle of view of the three-dimensional measuring apparatus 2. At the time of measurement, the distance image is not stored in the storage unit 51 and only the process of the coordinate conversion unit 530 is performed, and the process of the edge presence degree providing unit 531 can be executed at another time after the measurement. This configuration is effective when the capacity of the storage unit 51 and the processing capability of the control unit 53 are low.

次に法線方向変化点の抽出について説明する。変化点抽出手段532は対象表面の形状を表す空間モデルにおいて対象表面の法線方向が予め定めたしきい値Tn以上の変化を示す三次元座標データを法線方向変化点として抽出する。まず変化点抽出手段532は、各画素とその周辺の三次元座標データとを用いて法線ベクトルを算出する。具体的には注目画素の三次元座標データをP0とし、注目画素の周辺の点(例えば右隣)の三次元座標データをP1、注目画素の周辺の他の点(例えば下隣)の三次元座標データをP2とする。注目画素の三次元位置から周辺の点までのベクトルをそれぞれVec1=P1−P0,Vec2=P2−P0とする。法線ベクトルはVec1とVec2との外積から算出することができ、法線ベクトルNorm=Vec1×Vec2となる。次に、変化点抽出手段532は各画素の法線ベクトルとその周辺画素の法線ベクトルとのなす角度を算出し、その総和がしきい値Tn以上である画素を法線方向変化点として抽出する。法線方向変化点は空間に存在する物体の凹凸部分にて抽出される。   Next, extraction of normal direction change points will be described. The change point extraction means 532 extracts, as a normal direction change point, three-dimensional coordinate data indicating a change in the normal direction of the target surface that is greater than or equal to a predetermined threshold value Tn in the spatial model representing the shape of the target surface. First, the change point extraction unit 532 calculates a normal vector using each pixel and the surrounding three-dimensional coordinate data. Specifically, the three-dimensional coordinate data of the pixel of interest is P0, the three-dimensional coordinate data of a point around the pixel of interest (for example, the right neighbor) is P1, and the three-dimensional data of another point around the pixel of interest (eg, the lower neighbor) The coordinate data is P2. The vectors from the three-dimensional position of the target pixel to the peripheral points are set as Vec1 = P1-P0 and Vec2 = P2-P0, respectively. The normal vector can be calculated from the outer product of Vec1 and Vec2, and the normal vector Norm = Vec1 × Vec2. Next, the change point extraction means 532 calculates the angle formed by the normal vector of each pixel and the normal vectors of the surrounding pixels, and extracts pixels whose sum is equal to or greater than the threshold value Tn as the normal direction change point. To do. The normal direction change point is extracted at the uneven portion of the object existing in the space.

次に輝度変化点の抽出について説明する。変化点抽出手段532は計測位置姿勢にて空間モデルが表す空間を撮影したRGB画像から隣接画素との輝度差が予め定めたしきい値Ti以上である輝度変化点を抽出する。本実施形態では輝度差としてエッジ強度を利用する。変化点抽出手段532は上述のRGB画像の各画素に所定のエッジオペレータを適用して当該画素とその周囲画素とのエッジ強度を算出し、エッジ強度がしきい値Ti以上である画素を輝度変化点として抽出する。輝度変化点は空間に存在する物体の模様部分などにて抽出される。   Next, extraction of luminance change points will be described. The change point extraction unit 532 extracts a luminance change point where the luminance difference between adjacent pixels is equal to or greater than a predetermined threshold value Ti from an RGB image obtained by photographing the space represented by the space model at the measurement position and orientation. In the present embodiment, edge strength is used as the luminance difference. The change point extraction means 532 applies a predetermined edge operator to each pixel of the RGB image described above to calculate the edge strength between the pixel and its surrounding pixels, and changes the luminance of the pixel whose edge strength is equal to or greater than the threshold value Ti. Extract as a point. The luminance change point is extracted by a pattern portion of an object existing in the space.

本実施形態では三次元計測装置2から入力されるRGB画像を輝度変化点の抽出に用いる。一方、三次元計測装置2からのRGB画像を直接用いずに、空間モデルと計測パラメータとから上記RGB画像を再現し、再現したRGB画像から輝度変化点を抽出してもよい。具体的には、空間モデルを構成する複数の三次元座標データについて対応する輝度データを計測パラメータが表す投影面に投影するレンダリング処理によりRGB画像を再現できる。なお、再現するRGB画像の画角は三次元計測装置2の画角に合わせる。計測時には記憶部51にRGB画像を格納せずに座標変換手段530の処理だけを行っておき、エッジ存在度付与手段531の処理は計測後の別時刻に実行できる。当該構成は記憶部51の容量や制御部53の処理能力が低いときに有効である。   In the present embodiment, the RGB image input from the three-dimensional measuring device 2 is used for extracting the luminance change point. On the other hand, instead of directly using the RGB image from the three-dimensional measurement apparatus 2, the RGB image may be reproduced from the spatial model and the measurement parameter, and the luminance change point may be extracted from the reproduced RGB image. Specifically, an RGB image can be reproduced by a rendering process in which luminance data corresponding to a plurality of three-dimensional coordinate data constituting a space model is projected onto a projection plane represented by a measurement parameter. Note that the angle of view of the RGB image to be reproduced is matched to the angle of view of the three-dimensional measuring apparatus 2. At the time of measurement, only the process of the coordinate conversion unit 530 is performed without storing the RGB image in the storage unit 51, and the process of the edge presence degree providing unit 531 can be executed at another time after the measurement. This configuration is effective when the capacity of the storage unit 51 and the processing capability of the control unit 53 are low.

エッジ存在度判定手段533は変化点抽出手段532により抽出された奥行き変化点、法線方向変化点および輝度変化点それぞれについてエッジ存在度を判定し空間モデル記憶手段510に記憶させる。   The edge presence degree determination means 533 determines the edge presence degree for each of the depth change point, the normal direction change point, and the luminance change point extracted by the change point extraction means 532 and stores it in the space model storage means 510.

エッジ存在度判定手段533は奥行き変化点の三次元座標データのうち手前側の三次元座標データ(手前データ)に、エッジが存在することを示すエッジ存在度としてエッジ肯定値を付与し、奥側の三次元座標データ(奥データ)にはエッジ肯定値を付与しない。この取り扱いについて説明する。手前データと奥データとの間の奥行きのギャップからは、それら三次元座標データ間にて他の三次元座標データが得られず対象表面形状が計測されていない、つまり未計測領域となっていること、及び手前データと奥データとは当該未計測領域の境界に位置していることが推察される。しかしながら、手前データは三次元計測装置2から見て物体の凸部の先端位置にて抽出されるので、エッジの位置であるとすることができる。一方、奥データについてはそれが位置する対象表面とそれに隣接する未計測領域での対象表面とが平滑につながっている可能性を否定できないため、エッジの位置とすることは妥当ではない。よって上述のように手前データのみをエッジの位置とする。これにより未計測領域との境界に位置する三次元座標データのうち、実際に物体の外形部分のエッジが存在する三次元座標データに、エッジが存在することを示すエッジ存在度(エッジ肯定値)を付与でき、実際にエッジが存在する可能性が低い三次元座標データに、エッジが存在しないことを示すエッジ存在度(エッジ否定値)を付与できる。   The edge presence degree determination means 533 gives an edge affirmative value as an edge presence degree indicating that an edge is present to the near side three-dimensional coordinate data (front side data) of the three-dimensional coordinate data of the depth change point. No edge affirmative value is given to the three-dimensional coordinate data (back data). This handling will be described. From the depth gap between the front data and the back data, other 3D coordinate data cannot be obtained between the 3D coordinate data, and the target surface shape is not measured, that is, it is an unmeasured area. It is presumed that the near data and the back data are located at the boundary of the unmeasured area. However, the near-side data is extracted at the tip position of the convex portion of the object as viewed from the three-dimensional measuring apparatus 2, and can be regarded as the position of the edge. On the other hand, for the back data, since it is impossible to deny the possibility that the target surface where it is located and the target surface in the unmeasured area adjacent to it are connected smoothly, it is not appropriate to set the position of the edge. Therefore, only the near data is set as the edge position as described above. Edge presence degree (edge positive value) indicating that an edge exists in 3D coordinate data in which the edge of the external part of the object actually exists among the 3D coordinate data located at the boundary with the unmeasured area. The edge presence degree (edge negative value) indicating that the edge does not exist can be assigned to the three-dimensional coordinate data that is unlikely to actually have an edge.

本実施形態では、エッジ肯定値を1.0、エッジ否定値を0.0とする。すなわち、エッジ存在度判定手段533は奥行き変化点の三次元座標データのうち手前側の三次元座標データに対するエッジ存在度を1.0と判定し、奥側の三次元座標データに対するエッジ存在度を0.0と判定し、判定したエッジ存在度を空間モデル記憶手段510に記憶させる。例えば、エッジ存在度判定手段533は、各奥行き変化点に注目し、計測位置姿勢にて計測された距離画像上で隣接する奥行き変化点に奥行き値がしきい値Td以上大きなもの、つまり奥側の三次元座標データが存在すれば、注目している奥行き変化点は手前側の三次元座標データであるとしてそのエッジ存在度を1.0と判定し、存在しなければエッジ存在度を0.0と判定する。   In this embodiment, the edge positive value is 1.0 and the edge negative value is 0.0. That is, the edge presence degree determination means 533 determines the edge presence degree for the three-dimensional coordinate data on the near side of the three-dimensional coordinate data of the depth change point as 1.0, and determines the edge presence degree for the three-dimensional coordinate data on the back side. It is determined as 0.0, and the determined edge presence degree is stored in the space model storage unit 510. For example, the edge presence degree determination unit 533 pays attention to each depth change point, and the depth value adjacent to the depth change point measured at the measurement position / posture is larger than the threshold value Td, that is, the back side. If the 3D coordinate data is present, the depth change point of interest is determined to be the 3D coordinate data on the near side, and the edge presence is determined to be 1.0. Determined to be 0.

次にエッジ存在度判定手段533は、法線方向変化点に対応する三次元座標データにエッジ肯定値を付与する。具体的には、エッジ存在度判定手段533は変化点抽出手段532により抽出された法線方向変化点のうち奥行き変化点ではない三次元座標データに対するエッジ存在度を1.0と判定し、判定したエッジ存在度を空間モデル記憶手段510に記憶させる。これにより物体の外形以外の凹凸部分にエッジ肯定値を付与できる。   Next, the edge presence degree determination means 533 gives an edge positive value to the three-dimensional coordinate data corresponding to the normal direction change point. Specifically, the edge presence degree determination means 533 determines the edge presence degree for the three-dimensional coordinate data that is not the depth change point among the normal direction change points extracted by the change point extraction means 532 as 1.0. The edge presence degree is stored in the space model storage unit 510. Thereby, an edge affirmative value can be given to uneven portions other than the outer shape of the object.

さらにエッジ存在度判定手段533は、変化点抽出手段532により抽出された各輝度変化点について、当該輝度変化点と対応する位置の三次元座標データにエッジ肯定値を付与する。具体的には、エッジ存在度判定手段533は、輝度変化点のうち奥行き変化点ではない三次元座標データに対するエッジ存在度を1.0と判定し、判定したエッジ存在度を空間モデル記憶手段510に記憶させる。これにより模様部分などにエッジ肯定値を付与できる。   Further, the edge presence determination unit 533 gives an edge affirmative value to the three-dimensional coordinate data at the position corresponding to the luminance change point for each luminance change point extracted by the change point extraction unit 532. Specifically, the edge presence degree determination unit 533 determines the edge presence degree for the three-dimensional coordinate data that is not the depth change point among the luminance change points as 1.0, and the determined edge presence degree is the space model storage unit 510. Remember me. Thereby, an edge affirmative value can be given to a pattern portion or the like.

さらにエッジ存在度判定手段533は、上記以外の三次元座標データ、すなわち、奥行き変化点でなく、且つ法線方向変化点でもなく、且つ輝度変化点でもない三次元座標データに対するエッジ存在度を0.0と判定し、判定したエッジ存在度を空間モデル記憶手段510に記憶させる。   Further, the edge presence degree determination means 533 sets the edge presence degree to three-dimensional coordinate data other than the above, that is, the edge existence degree for the three-dimensional coordinate data that is not the depth change point, the normal direction change point, and the brightness change point. .0, and the determined edge presence degree is stored in the space model storage means 510.

ここで図5及び図6を用いて奥行き変化点に対するエッジ存在度の付与の例を説明する。図5は、部屋600を計測位置650から計測した距離画像750の模式図であり、図5(a)は距離画像750の全体を示し、図5(b)は距離画像750の一部領域751を示している。また、図6は部屋600を計測して得られた空間モデル800を上方からみた模式図である。図6において網かけ部は未計測領域803であり、領域804は床601の平面を表す三次元座標データ群、また領域805は机602の上面を表す三次元座標データ群である。   Here, an example of giving the edge presence level to the depth change point will be described with reference to FIGS. 5 and 6. FIG. 5 is a schematic diagram of a distance image 750 obtained by measuring the room 600 from the measurement position 650. FIG. 5A shows the entire distance image 750, and FIG. 5B shows a partial region 751 of the distance image 750. Is shown. FIG. 6 is a schematic view of a space model 800 obtained by measuring the room 600 as viewed from above. In FIG. 6, the shaded area is an unmeasured area 803, the area 804 is a three-dimensional coordinate data group representing the plane of the floor 601, and the area 805 is a three-dimensional coordinate data group representing the upper surface of the desk 602.

図5(a)は図3に示したような位置関係で三次元計測装置2により取得した距離画像であり、その画角内には机602と床601が存在する。一部領域751は机の縁602を含む5×5画素の領域であり、小さい四角は画素を表し、当該四角内の数値は奥行き値を表している。奥行き値の単位はセンチメートル(cm)である。しきい値Tdは10cmとし、領域751の中では、領域752および領域753として示した奥行きエッジ強度の高い10画素が奥行き変化点として抽出される。領域752の画素754に対応する図6の三次元座標データ801は机602側面の縁部分の1点を表しておりエッジが実在する三次元座標データであるが、これに対し領域753の画素755に対応する図6の三次元座標データ802は床601の平面上の1点を表しておりエッジが実在しない三次元座標データである。これら三次元座標データ801,802は共に未計測領域803との境界に位置する。   FIG. 5A is a distance image acquired by the three-dimensional measurement apparatus 2 with the positional relationship as shown in FIG. 3, and a desk 602 and a floor 601 exist within the angle of view. The partial area 751 is an area of 5 × 5 pixels including the desk edge 602, and a small square represents a pixel, and a numerical value in the square represents a depth value. The unit of the depth value is centimeter (cm). The threshold value Td is 10 cm, and in the region 751, 10 pixels having high depth edge strength shown as the region 752 and the region 753 are extracted as depth change points. The three-dimensional coordinate data 801 in FIG. 6 corresponding to the pixel 754 in the region 752 represents one point of the edge portion on the side surface of the desk 602 and is the actual three-dimensional coordinate data, but the pixel 755 in the region 753 corresponds to this. The three-dimensional coordinate data 802 in FIG. 6 corresponding to is one-dimensional coordinate data representing one point on the plane of the floor 601 and having no actual edge. These three-dimensional coordinate data 801 and 802 are both located at the boundary with the unmeasured area 803.

距離画像上で画素754について隣り合う画素との奥行き値を比較すると、しきい値Tdを超えて40cm大きい画素が存在するため、画素754は手前の奥行き変化点と判定され、画素754と対応する机602の縁部分の三次元座標データ801に対してエッジ肯定値1.0が付与される。   Comparing the depth value of the pixel 754 with the adjacent pixel on the distance image, there is a pixel that is 40 cm larger than the threshold value Td. Therefore, the pixel 754 is determined as the depth change point in the foreground, and corresponds to the pixel 754. An edge positive value 1.0 is given to the three-dimensional coordinate data 801 of the edge portion of the desk 602.

他方、距離画像上で画素755について隣り合う画素との奥行き値を比較すると、画素755よりも大きな奥行き値の画素が存在しないため、画素755は奥の奥行き変化点と判定され、画素755と対応する床601の三次元座標データ802に対してエッジ否定値0.0が付与される。   On the other hand, when comparing the depth value of the pixel 755 with the adjacent pixel on the distance image, there is no pixel having a depth value larger than that of the pixel 755, so that the pixel 755 is determined to be the depth change point in the back and corresponds to the pixel 755. An edge negative value 0.0 is given to the three-dimensional coordinate data 802 of the floor 601 to be processed.

このようにして未計測領域803との境界に位置する三次元座標データのうち、エッジが実在する三次元座標データには、エッジ肯定値を付与でき、エッジが実在する可能性が低い三次元座標データには、エッジ否定値を付与できる。   In this way, among the three-dimensional coordinate data located at the boundary with the non-measurement region 803, the three-dimensional coordinate data in which the edge is real can be given to the three-dimensional coordinate data in which the edge is real, and the possibility that the edge is real is low. An edge negative value can be given to the data.

図7はエッジ存在度の例を説明するための部屋600の空間モデルの模式図である。図7において、実線部(直線P1−P2,P1−P3,P1−P5,P2−P4,P3−P4,P3−P6,P4−P7,P5−P6,P6−P7部および直線群S)の三次元座標データにエッジ肯定値1.0が付与され、それ以外の三次元座標データにエッジ否定値0.0が付与されている。   FIG. 7 is a schematic diagram of a space model of the room 600 for explaining an example of the edge presence level. In FIG. 7, the solid line parts (straight line P1-P2, P1-P3, P1-P5, P2-P4, P3-P4, P3-P6, P4-P7, P5-P6, P6-P7 part and straight line group S). An edge positive value 1.0 is assigned to the three-dimensional coordinate data, and an edge negative value 0.0 is assigned to the other three-dimensional coordinate data.

これら実線部のうち直線P1−P2,P1−P5,P2−P4およびP4−P7部の三次元座標データには手前の奥行き変化点としてエッジ肯定値1.0が付与されている。手前の奥行き変化点と判定されたこれらの三次元座標データは未計測領域(網掛け部)との境界に位置し、従来技術ではカメラ校正等に利用できなかったエッジであるが、本発明ではエッジ肯定値が付与されカメラ校正等に利用可能となる。   Among these solid line portions, the edge positive value 1.0 is given to the three-dimensional coordinate data of the straight lines P1-P2, P1-P5, P2-P4 and P4-P7 as the depth change point in the foreground. These three-dimensional coordinate data determined as the depth change point in the foreground are located at the boundary with the unmeasured area (shaded portion) and are edges that could not be used for camera calibration or the like in the prior art. An edge affirmative value is given and it can be used for camera calibration and the like.

実線部のうち直線P1−P3,P3−P4,P3−P6,P5−P6およびP6−P7部の三次元座標データには法線方向変化点または輝度変化点としてエッジ肯定値1.0が付与され、また、実線部のうち直線群Sには輝度変化点としてエッジ肯定値1.0が付与されている。   The edge positive value 1.0 is given to the three-dimensional coordinate data of the straight lines P1-P3, P3-P4, P3-P6, P5-P6 and P6-P7 in the solid line as the normal direction change point or the luminance change point. In addition, an edge positive value 1.0 is given to the straight line group S in the solid line portion as a luminance change point.

[カメラ校正時の三次元データ処理装置5]
図8は部屋600の空間モデルを用いて、部屋600に設置された監視カメラ3を校正するときの三次元データ処理装置5の概略の機能ブロック図である。
[3D data processor 5 during camera calibration]
FIG. 8 is a schematic functional block diagram of the three-dimensional data processing apparatus 5 when the surveillance camera 3 installed in the room 600 is calibrated using the space model of the room 600.

記憶部51は空間モデル記憶手段510として機能し、制御部53は実エッジ画像生成手段535、仮想カメラ設定手段536、仮想エッジ画像生成手段537およびエッジ画像照合手段538などとして機能する。   The storage unit 51 functions as the space model storage unit 510, and the control unit 53 functions as the real edge image generation unit 535, the virtual camera setting unit 536, the virtual edge image generation unit 537, the edge image collation unit 538, and the like.

実エッジ画像生成手段535は監視カメラ3(実カメラ)から入力された各監視画像(実画像)からエッジを抽出してエッジ画像を生成し、生成したエッジ画像を、対応するカメラIDと共にエッジ画像照合手段538に出力する。後述する仮想エッジ画像生成手段537が生成するエッジ画像と区別するために、ここで生成するエッジ画像を実エッジ画像と呼ぶ。   The real edge image generation means 535 extracts an edge from each monitoring image (real image) input from the monitoring camera 3 (real camera) to generate an edge image, and the generated edge image together with the corresponding camera ID is used as an edge image. The result is output to the verification unit 538. In order to distinguish from an edge image generated by a virtual edge image generation means 537 described later, the edge image generated here is called a real edge image.

実エッジ画像生成手段535は監視画像における周囲画素との輝度差が予め定めたしきい値Ti以上である輝度変化点に対応する画素に画素値“1”、それ以外の画素に画素値“0”を設定して実エッジ画像を生成する。本実施形態では輝度差としてエッジ強度を利用する。実エッジ画像生成手段535は監視画像の各画素にソーベルオペレータなど所定のエッジオペレータを適用しエッジ強度を算出する。   The real edge image generation means 535 has a pixel value “1” for the pixel corresponding to the luminance change point where the luminance difference with the surrounding pixels in the monitoring image is equal to or greater than a predetermined threshold value Ti, and a pixel value “0” for the other pixels. "" Is set to generate an actual edge image. In the present embodiment, edge strength is used as the luminance difference. The real edge image generation means 535 calculates edge strength by applying a predetermined edge operator such as a Sobel operator to each pixel of the monitoring image.

仮想カメラ設定手段536は空間モデル内で部屋600を任意の位置姿勢にて模擬撮影する仮想カメラを複数設定し、設定した仮想カメラのカメラパラメータを仮想エッジ画像生成手段537に出力する。仮想カメラのカメラパラメ―タに含まれる位置姿勢は校正対象である監視カメラ3の撮影位置姿勢の候補である。カメラパラメータのうち位置姿勢以外の焦点距離、解像度、レンズ歪みなどは予め記憶させてある監視カメラ3の値を用いる。   The virtual camera setting unit 536 sets a plurality of virtual cameras for simulating and capturing the room 600 at an arbitrary position and orientation in the space model, and outputs the set camera parameters of the virtual camera to the virtual edge image generation unit 537. The position and orientation included in the camera parameters of the virtual camera are candidates for the photographing position and orientation of the surveillance camera 3 to be calibrated. Of the camera parameters, values of the surveillance camera 3 stored in advance are used for the focal length, resolution, lens distortion, etc. other than the position and orientation.

仮想カメラ設定手段536は空間モデルのXYZ座標系において原点から予め定めた微小間隔でX方向、Y方向、Z方向に仮想カメラの位置を移動させると共に仮想カメラの姿勢(ピッチ角、ヨー角、ロール角)を予め定めた微小間隔で変更して総当たり的に複数の仮想カメラを設定してもよいが、ユーザーインターフェース部55から予め監視カメラ3の設置仕様等に基づく設定範囲を入力し、当該範囲内に仮想カメラを設定することでカメラ校正の処理量を減ずることができる。例えば、設置仕様が鉛直下方に向けて天井設置する仕様であれば、天井高を予め入力しておくことで、仮想カメラのZ方向の移動範囲とピッチ角の変動範囲を大幅に狭くできる。また、設置仕様に定められたX座標、Y座標、Z座標、ピッチ角、ヨー角、ロール角を予め入力し、入力した各値を中心として予め定めた設置誤差範囲内に一定の微小間隔で複数の仮想カメラを設定してもよいし、入力した各値から離れるに従って広がる微小間隔で複数の仮想カメラを設定してもよい。   The virtual camera setting means 536 moves the position of the virtual camera in the X, Y, and Z directions at a predetermined minute interval from the origin in the XYZ coordinate system of the space model, and also the attitude of the virtual camera (pitch angle, yaw angle, roll The angle may be changed at a predetermined minute interval to set a plurality of virtual cameras. However, the setting range based on the installation specifications of the monitoring camera 3 is input in advance from the user interface unit 55, By setting a virtual camera within the range, the amount of camera calibration processing can be reduced. For example, if the installation specification is a specification in which the ceiling is installed vertically downward, the range of movement of the virtual camera in the Z direction and the variation range of the pitch angle can be significantly narrowed by inputting the ceiling height in advance. Also, the X coordinate, Y coordinate, Z coordinate, pitch angle, yaw angle, and roll angle defined in the installation specifications are input in advance, and within a predetermined installation error range centered on each input value at a fixed minute interval. A plurality of virtual cameras may be set, or a plurality of virtual cameras may be set at a minute interval that spreads away from each input value.

仮想エッジ画像生成手段537は、仮想カメラ設定手段536が設定した各カメラパラメータが表す撮影面に部屋600の空間モデルを投影してエッジ画像を生成し、生成したエッジ画像をエッジ画像照合手段538に出力する。ここで生成するエッジ画像を仮想エッジ画像と呼ぶ。   The virtual edge image generation unit 537 generates an edge image by projecting the space model of the room 600 onto the imaging plane represented by each camera parameter set by the virtual camera setting unit 536, and the generated edge image is sent to the edge image matching unit 538. Output. The edge image generated here is called a virtual edge image.

具体的には、空間モデルを構成する三次元座標データのうちエッジ存在度がエッジ肯定値“1.0”である三次元座標データを撮影面に投影し、エッジ存在度がエッジ否定値“0.0”である三次元座標データを投影しないことで、仮想カメラの撮影面にて、エッジ肯定値を有する三次元座標データの投影位置をエッジ画素とする仮想エッジ画像を生成する。なお、この際、Zバッファ法、Zソート法などの隠面消去法により、仮想カメラの撮影位置から見て手前の面の三次元座標データのみを投影する。   Specifically, among the three-dimensional coordinate data constituting the space model, three-dimensional coordinate data whose edge presence is an edge positive value “1.0” is projected onto the imaging surface, and the edge presence is an edge negative value “0”. By not projecting the 3D coordinate data of .0 ", a virtual edge image is generated with the projected position of the 3D coordinate data having an edge positive value as an edge pixel on the imaging surface of the virtual camera. At this time, only the three-dimensional coordinate data of the front surface as viewed from the shooting position of the virtual camera is projected by a hidden surface elimination method such as a Z buffer method or a Z sort method.

距離画像の奥行き変化点にて上述のようにしてエッジ存在度を定義したことにより、当該奥行き変化点に対応して空間モデルに生じる未計測領域の境界にて実在するエッジを仮想エッジ画像に含ませることができる。   By defining the edge presence at the depth change point of the distance image as described above, the virtual edge image includes the edge that exists at the boundary of the unmeasured area generated in the spatial model corresponding to the depth change point. Can be made.

ここで、計測視点からの距離よりも仮想視点からの距離の方が遠い三次元座標データにエッジが実在していても、当該仮想視点に監視カメラ3が存在した場合に得られる監視画像においては、当該三次元座標データと対応する画素位置の解像度が低下してエッジが抽出されない場合がある。そこで、空間モデルを構成する三次元座標データに対応付けられた輝度データを各仮想視点が表す撮影面に投影した投影像(レンダリング画像)からエッジ画像を生成し、仮想エッジ画像を、生成したエッジ画像と仮想エッジ画像との論理積画像に置き換えてもよい。特にこのとき、仮想視点からの距離が遠い三次元座標データについては、レンダリング画像の1画素に複数の三次元座標データが投影される。仮想エッジ画像生成手段537はこれら複数の三次元座標データに対応付けられた輝度データの平均値を投影先の画素に設定する。なお、レンダリング画像に投影される未計測領域には外れ値(例えばRGB値(255,255,255))を与えておけばよい。このようにするとレンダリング画像における未計測領域との境界から実在しないエッジが抽出され得るが、このエッジは仮想エッジ画像との論理積演算により消去されるため問題とならない。この輝度データの平均化によって、解像度の低下によるエッジの不抽出を再現でき、実エッジ画像と仮想エッジ画像の照合精度を向上させることができる。   Here, in the monitoring image obtained when the monitoring camera 3 exists at the virtual viewpoint even if the edge actually exists in the three-dimensional coordinate data whose distance from the virtual viewpoint is farther than the distance from the measurement viewpoint. In some cases, the resolution of the pixel position corresponding to the three-dimensional coordinate data is lowered and the edge is not extracted. Therefore, an edge image is generated from a projection image (rendered image) obtained by projecting the luminance data associated with the three-dimensional coordinate data constituting the spatial model onto the imaging plane represented by each virtual viewpoint, and the virtual edge image is generated as the generated edge. You may replace with the logical product image of an image and a virtual edge image. In particular, at this time, for the three-dimensional coordinate data that is far from the virtual viewpoint, a plurality of three-dimensional coordinate data is projected onto one pixel of the rendered image. The virtual edge image generation means 537 sets the average value of the luminance data associated with the plurality of three-dimensional coordinate data to the projection destination pixel. An outlier (for example, RGB values (255, 255, 255)) may be given to the unmeasured area projected on the rendered image. In this way, an edge that does not actually exist can be extracted from the boundary with the unmeasured area in the rendered image, but this edge does not cause a problem because it is deleted by a logical product operation with the virtual edge image. By averaging the luminance data, non-extraction of edges due to a decrease in resolution can be reproduced, and the matching accuracy between the real edge image and the virtual edge image can be improved.

エッジ画像照合手段538は実エッジ画像生成手段535が生成した実エッジ画像と仮想エッジ画像生成手段537が仮想カメラのカメラパラメータごとに生成した仮想エッジ画像との類似度を算出し、実エッジ画像に類似する仮想エッジ画像を与える仮想カメラの位置姿勢を監視カメラ3の位置姿勢と決定する。例えばエッジ画像照合手段538は最も類似度が高い仮想カメラの位置姿勢を監視カメラ3の位置姿勢と決定する。   The edge image collating unit 538 calculates the similarity between the real edge image generated by the real edge image generating unit 535 and the virtual edge image generated by the virtual edge image generating unit 537 for each camera parameter of the virtual camera, and converts the similarity into the real edge image. The position and orientation of the virtual camera that gives a similar virtual edge image is determined as the position and orientation of the monitoring camera 3. For example, the edge image collating unit 538 determines the position and orientation of the virtual camera having the highest similarity as the position and orientation of the monitoring camera 3.

ここで、類似度はエッジ位置の一致度合いに応じた値になるように定義される。例えば、エッジ位置の一致数を仮想エッジ画像のエッジ画素数、または実エッジ画像のエッジ画素数と仮想エッジ画像のエッジ画素数との和で除した値を類似度としてもよい。また例えば、仮想エッジ画像の各エッジ位置から実エッジ画像の最近傍エッジ位置までの距離、または実エッジ画像の各エッジ位置から仮想エッジ画像の最近傍エッジ位置までの距離を累積し、その累積値の逆数に応じた値を仮想エッジ画像のエッジ画素数、または実エッジ画像のエッジ画素数と仮想エッジ画像のエッジ画素数との和で除した値を類似度としてもよい。また、類似度に、輝度データの一致度合いを重み付け加算して類似度を補正してもよい。この場合、監視画像と上記レンダリング画像との間で対応する画素同士で画素値の正規化相関値を輝度データの一致度合いとすることができる。   Here, the similarity is defined to be a value corresponding to the degree of matching of the edge positions. For example, the similarity may be a value obtained by dividing the number of coincidence of edge positions by the number of edge pixels of the virtual edge image or the sum of the number of edge pixels of the real edge image and the number of edge pixels of the virtual edge image. Also, for example, the distance from each edge position of the virtual edge image to the nearest edge position of the real edge image or the distance from each edge position of the real edge image to the nearest edge position of the virtual edge image is accumulated, and the accumulated value A value obtained by dividing the value corresponding to the reciprocal number by the number of edge pixels of the virtual edge image or the sum of the number of edge pixels of the real edge image and the number of edge pixels of the virtual edge image may be used as the similarity. Further, the similarity may be corrected by weighting and adding the matching degree of the luminance data to the similarity. In this case, the normalized correlation value of the pixel value between the corresponding pixels between the monitoring image and the rendered image can be set as the degree of coincidence of the luminance data.

ちなみに、本発明に係る三次元モデル処理装置は、空間モデル記憶手段510、エッジ存在度付与手段531、仮想カメラ設定手段536および仮想エッジ画像生成手段537を含み、本発明に係るカメラ校正システムは、当該三次元モデル処理装置と、実エッジ画像生成手段535およびエッジ画像照合手段538とを含んで構成される。   Incidentally, the three-dimensional model processing apparatus according to the present invention includes a spatial model storage unit 510, an edge presence degree assigning unit 531, a virtual camera setting unit 536, and a virtual edge image generation unit 537. The camera calibration system according to the present invention includes: The three-dimensional model processing apparatus is configured to include an actual edge image generating unit 535 and an edge image collating unit 538.

[空間モデル生成時のカメラ校正システム1の動作]
図9及び図10は空間モデル生成時のカメラ校正システム1の動作の概略のフロー図である。三次元計測装置2が部屋600の計測を行うと、三次元計測装置2から三次元データ処理装置5に計測データが入力される。三次元データ処理装置5は入力された計測データに対して図9及び図10に示す一連の処理を行い、部屋600の空間モデルを生成する。
[Operation of camera calibration system 1 when generating spatial model]
FIG. 9 and FIG. 10 are schematic flowcharts of the operation of the camera calibration system 1 when generating a spatial model. When the three-dimensional measurement device 2 measures the room 600, measurement data is input from the three-dimensional measurement device 2 to the three-dimensional data processing device 5. The three-dimensional data processing device 5 performs a series of processes shown in FIGS. 9 and 10 on the input measurement data, and generates a space model of the room 600.

計測データ入力部50は三次元計測装置2から計測データ、すなわち計測位置姿勢にて計測した距離画像と、同計測位置姿勢にて撮影したRGB画像とを取得し、これらを制御部53に入力する(ステップS10)。   The measurement data input unit 50 acquires measurement data, that is, a distance image measured at the measurement position and orientation and an RGB image captured at the measurement position and orientation from the three-dimensional measurement apparatus 2, and inputs these to the control unit 53. (Step S10).

制御部53は座標変換手段530として動作し、座標変換手段530は、ステップS10にて取得した距離画像から計測位置姿勢を算出して、計測パラメータ記憶手段511として機能する記憶部51に記憶させる(ステップS11)。   The control unit 53 operates as the coordinate conversion unit 530, and the coordinate conversion unit 530 calculates the measurement position and orientation from the distance image acquired in step S10 and stores the measurement position and orientation in the storage unit 51 that functions as the measurement parameter storage unit 511 ( Step S11).

座標変換手段530は、ステップS11にて算出した計測位置姿勢を用い、ステップS10にて取得した距離画像の各画素を三次元座標データに変換して空間モデル記憶手段510として機能する記憶部51に記憶させる(ステップS12)。さらに、後段の処理のために距離画像の画素と三次元座標データとの対応関係も空間モデル記憶手段510に一時記憶させておく。また、座標変換手段530は、ステップS10にて取得したRGB画像の各画素値を、対応する距離画像の画素の変換先となった三次元座標データに輝度データとして紐づけて空間モデル記憶手段510に記憶させる。   The coordinate conversion unit 530 uses the measurement position and orientation calculated in step S11 to convert each pixel of the distance image acquired in step S10 into three-dimensional coordinate data, and stores it in the storage unit 51 that functions as the space model storage unit 510. Store (step S12). Further, the correspondence relationship between the pixels of the distance image and the three-dimensional coordinate data is also temporarily stored in the space model storage unit 510 for subsequent processing. In addition, the coordinate conversion unit 530 associates each pixel value of the RGB image acquired in step S10 as luminance data with the three-dimensional coordinate data that is the conversion destination of the pixel of the corresponding distance image, as a spatial model storage unit 510. Remember me.

また、制御部53はエッジ存在度付与手段531として動作し、ステップS13〜S25の処理を行う。まず、エッジ存在度付与手段531の変化点抽出手段532は、ステップS10にて取得した距離画像の各画素におけるエッジ強度を算出して、エッジ強度がしきい値Te以上である画素を奥行き変化点として抽出する(ステップS13)。   Further, the control unit 53 operates as the edge presence degree giving unit 531 and performs the processes of steps S13 to S25. First, the change point extraction unit 532 of the edge presence degree assigning unit 531 calculates the edge strength at each pixel of the distance image acquired in step S10, and sets a pixel whose edge strength is equal to or greater than the threshold Te to a depth change point. (Step S13).

次にエッジ存在度付与手段531のエッジ存在度判定手段533は、変化点抽出手段532が抽出した奥行き変化点を順次、注目変化点に設定してエッジ存在度を付与するステップS14〜S18のループ処理を実行する。   Next, the edge presence determination means 533 of the edge presence degree giving means 531 sequentially sets the depth change points extracted by the change point extraction means 532 as the attention change points, and gives the edge presence degree loops of steps S14 to S18. Execute the process.

エッジ存在度判定手段533は、距離画像上で注目変化点の8近傍画素にて抽出された各奥行き変化点の奥行き値から注目変化点の奥行き値を減じて奥行き差を算出し、算出した各奥行き差をしきい値Tdと比較する(ステップS15)。8近傍点のうちに奥行き差がしきい値Td以上のものが1つでもあれば(S15にてYESの場合)、注目している奥行き変化点にはしきい値Td以上奥の隣接奥行き変化点があり、従って注目している三次元座標データは計測位置からの奥行きが所定値以上の変化を示す変化点の三次元座標データのうち手前側の三次元座標データであるとして、注目している三次元座標データに対応付けてエッジ存在度1.0を空間モデル記憶手段510に記憶させる(ステップS16)。   The edge presence degree determination unit 533 calculates the depth difference by subtracting the depth value of the target change point from the depth value of each depth change point extracted in the eight neighboring pixels of the target change point on the distance image, and calculates each difference The depth difference is compared with a threshold value Td (step S15). If at least one of the eight neighboring points has a depth difference equal to or greater than the threshold value Td (in the case of YES in S15), the depth change point of interest has an adjacent depth change greater than or equal to the threshold value Td. There is a point, and therefore the 3D coordinate data of interest is considered to be the 3D coordinate data on the near side of the 3D coordinate data of the change point where the depth from the measurement position shows a change of a predetermined value or more. The edge model 1.0 is stored in the space model storage unit 510 in association with the existing three-dimensional coordinate data (step S16).

このエッジ存在度付与により、未計測領域の境界に位置するものも含めて、計測位置姿勢にて観測される物体の外形部分の三次元座標データにエッジが存在することが識別可能となる。そしてエッジ存在度1.0が付与された空間モデルを用いることにより未計測領域の境界に位置するエッジを有効活用することが可能となる。   By providing the edge presence level, it is possible to identify that there is an edge in the three-dimensional coordinate data of the outer portion of the object observed at the measurement position and orientation, including those located at the boundary of the unmeasured region. By using a spatial model to which an edge presence degree of 1.0 is used, it is possible to effectively use an edge located at the boundary of an unmeasured area.

一方、8近傍点のうちに奥行き差がしきい値Td以上のものが1つもなければ(S15にてNOの場合)、注目している三次元座標データは計測位置からの奥行きが所定値以上の変化を示す変化点の三次元座標データのうち奥側の三次元座標データであるとして、注目している三次元座標データに対応付けてエッジ存在度0.0を空間モデル記憶手段510に記憶させる(ステップS17)。   On the other hand, if none of the eight neighboring points has a depth difference equal to or greater than the threshold value Td (NO in S15), the three-dimensional coordinate data of interest has a depth from the measurement position greater than or equal to a predetermined value. The edge presence degree 0.0 is stored in the spatial model storage unit 510 in association with the three-dimensional coordinate data of interest, as the three-dimensional coordinate data on the back side among the three-dimensional coordinate data of the change point indicating the change of (Step S17).

このエッジ存在度付与により、未計測領域の境界に位置する三次元座標データのうちエッジが存在する可能性の低い三次元座標データが識別可能になる。   By providing the edge presence degree, it is possible to identify the three-dimensional coordinate data that is unlikely to have an edge among the three-dimensional coordinate data located at the boundary of the unmeasured region.

エッジ存在度判定手段533は、全ての奥行き変化点を処理したか確認し(ステップS18)、未処理のものがある場合は(S18にてNOの場合)ステップS14に戻り、次の奥行き変化点の処理を行う。一方、全ての奥行き変化点を処理し終えた場合は処理をステップS19に進める(S18にてYESの場合)。   The edge presence degree determining means 533 checks whether all depth change points have been processed (step S18), and if there is an unprocessed item (NO in S18), the process returns to step S14, and the next depth change point is determined. Perform the process. On the other hand, if all depth change points have been processed, the process proceeds to step S19 (YES in S18).

変化点抽出手段532は、ステップS10にて取得した距離画像の各画素における法線方向を算出して各画素の法線方向とその周囲画素の法線方向との差を算出し、差がしきい値Tn以上の周囲画素が存在する画素を法線方向変化点として抽出する(ステップS19)。   The change point extraction unit 532 calculates the normal direction of each pixel of the distance image acquired in step S10 and calculates the difference between the normal direction of each pixel and the normal direction of the surrounding pixels. A pixel having surrounding pixels equal to or greater than the threshold value Tn is extracted as a normal direction change point (step S19).

また、変化点抽出手段532は、ステップS10にて取得した二次元画像の各画素におけるエッジ強度を算出し、エッジ強度がしきい値Ti以上である画素を輝度変化点として抽出する(ステップS20)。   Further, the change point extraction means 532 calculates the edge intensity at each pixel of the two-dimensional image acquired in step S10, and extracts a pixel whose edge intensity is equal to or greater than the threshold value Ti as a luminance change point (step S20). .

エッジ存在度判定手段533は、変化点抽出手段532が抽出した法線方向変化点および輝度変化点を順次、注目変化点に設定してエッジ存在度を判定するステップS21〜S24のループ処理を実行する。ちなみに当該ループ処理では、同一の三次元座標データに対応する法線方向変化点および輝度変化点はひとつにまとめて処理すればよい。   The edge presence degree determination unit 533 executes the loop processing of steps S21 to S24 in which the normal direction change point and the luminance change point extracted by the change point extraction unit 532 are sequentially set as the attention change point to determine the edge presence degree. To do. Incidentally, in the loop processing, the normal direction change point and the luminance change point corresponding to the same three-dimensional coordinate data may be processed together.

エッジ存在度判定手段533は、注目変化点が既に奥行き変化点として処理したものか否かを確認し(ステップS22)、奥行き変化点として処理していない場合は(S22にてNOの場合)、注目変化点として注目している三次元座標データに対応付けてエッジ存在度1.0を空間モデル記憶手段510に記憶させる(ステップS23)。   The edge presence degree determining means 533 checks whether or not the attention change point has already been processed as a depth change point (step S22). If not processed as a depth change point (NO in S22), The edge presence degree 1.0 is stored in the space model storage unit 510 in association with the three-dimensional coordinate data of interest as the attention change point (step S23).

一方、注目変化点がすでに奥行き変化点として処理したものである場合は(S22にてYESの場合)、ステップS23をスキップすることでステップS16,S17で付与したエッジ存在度を維持する。   On the other hand, if the target change point has already been processed as a depth change point (YES in S22), the edge presence given in steps S16 and S17 is maintained by skipping step S23.

エッジ存在度判定手段533は、全ての法線方向変化点および輝度変化点を処理したか確認し(ステップS24)、未処理のものがある場合は(S24にてNOの場合)ステップS21に戻り、次の変化点の処理を行う。一方、全ての法線方向変化点および輝度変化点を処理し終えた場合は処理をステップS25に進める(S24にてNOの場合)。   The edge presence determination means 533 checks whether all normal direction change points and luminance change points have been processed (step S24), and if there is any unprocessed item (NO in S24), the process returns to step S21. Then, the next change point is processed. On the other hand, if all normal direction change points and luminance change points have been processed, the process proceeds to step S25 (in the case of NO in S24).

エッジ存在度判定手段533は、空間モデル記憶手段510に記憶されている空間モデルにおいて未だエッジ存在度が付与されていない三次元座標データを抽出し、抽出した三次元座標データにエッジ存在度0.0を対応付けて空間モデル記憶手段510に記憶させる(ステップS25)。   The edge presence degree determination means 533 extracts the three-dimensional coordinate data to which the edge presence degree is not yet given in the spatial model stored in the spatial model storage means 510, and adds the edge presence degree 0. 0 to the extracted three-dimensional coordinate data. 0 is associated and stored in the space model storage unit 510 (step S25).

複数の計測位置650・計測姿勢651にて計測データを取得する場合には、各計測データについて上述の処理を行うことができ、これにより未計測領域を減らし、より多くのエッジを抽出することが可能である。   When measurement data is acquired at a plurality of measurement positions 650 and measurement postures 651, the above-described processing can be performed for each measurement data, thereby reducing an unmeasured area and extracting more edges. Is possible.

[カメラ校正時のカメラ校正システム1の動作]
図11はカメラ校正時のカメラ校正システム1の動作の概略のフロー図である。部屋600に設置された監視カメラ3が部屋600の撮影を行うと、監視カメラ3から三次元データ処理装置5に監視画像が入力される。三次元データ処理装置5は入力された監視画像に対して図11に示す一連の処理を行い、監視カメラ3の校正を行う。
[Operation of camera calibration system 1 during camera calibration]
FIG. 11 is a schematic flowchart of the operation of the camera calibration system 1 during camera calibration. When the monitoring camera 3 installed in the room 600 captures an image of the room 600, a monitoring image is input from the monitoring camera 3 to the three-dimensional data processing device 5. The three-dimensional data processing device 5 performs a series of processes shown in FIG. 11 on the input monitoring image and calibrates the monitoring camera 3.

監視画像入力部52は監視カメラ3から監視画像を取得し、これを制御部53に入力する(ステップS50)。制御部53は実エッジ画像生成手段535として動作し、ステップS50にて取得した監視画像の各画素にエッジオペレータを適用して実エッジ画像を生成する(ステップS51)。   The monitoring image input unit 52 acquires a monitoring image from the monitoring camera 3 and inputs it to the control unit 53 (step S50). The control unit 53 operates as the real edge image generation unit 535, and generates an actual edge image by applying an edge operator to each pixel of the monitoring image acquired in Step S50 (Step S51).

次に制御部53は仮想カメラ設定手段536として動作し、空間モデルの座標系に互いに位置姿勢の異なる複数の仮想カメラを設定する(ステップS52)。   Next, the control unit 53 operates as the virtual camera setting unit 536, and sets a plurality of virtual cameras having different positions and orientations in the coordinate system of the space model (step S52).

そして、制御部53は仮想エッジ画像生成手段537として動作し、ステップS52にて設定された各仮想カメラの撮影面に仮想エッジ画像を生成する(ステップS53)。具体的には、仮想エッジ画像生成手段537は空間モデル記憶手段510から部屋600の空間モデルを読み出し、ステップS52にて設定された各仮想カメラのカメラパラメータが表す撮影面にエッジ存在度1.0が付与された三次元座標データを投影して仮想エッジ画像を生成する。また同投影面に輝度データをレンダリングし、レンダリングした画像の各画素にエッジオペレータを適用してエッジ画像を生成し、仮想エッジ画像を、生成したエッジ画像との論理積画像に更新する。   Then, the control unit 53 operates as the virtual edge image generation unit 537, and generates a virtual edge image on the imaging surface of each virtual camera set in step S52 (step S53). Specifically, the virtual edge image generation unit 537 reads the space model of the room 600 from the space model storage unit 510, and the edge presence degree is 1.0 on the photographing surface represented by the camera parameter of each virtual camera set in step S52. Is projected to generate a virtual edge image. In addition, luminance data is rendered on the projection plane, an edge operator is applied to each pixel of the rendered image to generate an edge image, and the virtual edge image is updated to a logical product image with the generated edge image.

制御部53はエッジ画像照合手段538として動作し、ステップS51にて生成した実エッジ画像と、ステップS53にて生成した仮想カメラごとの仮想エッジ画像それぞれとの類似度を算出する(ステップS54)。エッジ画像照合手段538は、ステップS54にて算出した仮想カメラごとの類似度に基づいて、最大の類似度が算出された仮想カメラの位置姿勢を検出し、検出した仮想カメラの位置姿勢を監視カメラ3の位置姿勢と決定して監視カメラ3のカメラIDと共に出力部54に入力する(ステップS55)。   The control unit 53 operates as the edge image collating unit 538, and calculates the similarity between the real edge image generated in step S51 and the virtual edge image for each virtual camera generated in step S53 (step S54). The edge image collating unit 538 detects the position and orientation of the virtual camera for which the maximum similarity is calculated based on the similarity for each virtual camera calculated in step S54, and monitors the detected position and orientation of the virtual camera. 3 is input to the output unit 54 together with the camera ID of the monitoring camera 3 (step S55).

ここで決定される監視カメラ3の位置姿勢は、空間モデルにおいて未計測領域の境界に位置するエッジをも利用して求めた高精度な推定結果となっている。   The position and orientation of the monitoring camera 3 determined here is a highly accurate estimation result obtained using an edge located at the boundary of the unmeasured area in the spatial model.

出力部54は、監視カメラ3の位置姿勢とカメラIDを監視装置4に入力する。監視装置4は入力された監視カメラ3の位置姿勢を格納し、以降の監視処理にて利用する。   The output unit 54 inputs the position and orientation of the monitoring camera 3 and the camera ID to the monitoring device 4. The monitoring device 4 stores the input position and orientation of the monitoring camera 3 and uses them in subsequent monitoring processing.

[変形例]
(1)上記実施形態においては、エッジ存在度付与手段531がエッジ存在度としてエッジ否定値“0.0”またはエッジ肯定値“1.0”のいずれかの値を付与する例を示したが、エッジ肯定値として2種類以上のエッジ存在度を付与してもよい。その場合、エッジ存在度付与手段531は、例えば、奥行き変化点に対しては0.5、法線方向変化点に対しては0.8、輝度変化点に対しては1.0、法線方向変化点且つ輝度変化点である変化点に対しては0.8のエッジ存在度を付与する。そして、エッジ画像照合手段538は仮想エッジ画像のエッジ位置をエッジ存在度で重み付けて実エッジ画像との類似度を算出する。例えば、縁に丸みのある机などでは、奥行き変化点および法線方向変化点として検出される机の縁のエッジの位置が計測位置姿勢と撮影位置姿勢の違いによって微小にずれる。一方、輝度変化点として検出される平面上のエッジはこのようなずれは生じにくい。このように複数種類のエッジ肯定値を用いることで、より実際的なエッジ情報を三次元モデルに付与できる。
[Modification]
(1) In the above embodiment, an example has been described in which the edge presence degree giving unit 531 gives either the edge negative value “0.0” or the edge positive value “1.0” as the edge presence degree. Two or more types of edge presence may be given as edge positive values. In that case, the edge presence degree giving means 531 is, for example, 0.5 for the depth change point, 0.8 for the normal direction change point, 1.0 for the luminance change point, and the normal line. An edge presence level of 0.8 is assigned to a change point that is a direction change point and a luminance change point. Then, the edge image collating unit 538 calculates the similarity with the actual edge image by weighting the edge position of the virtual edge image with the edge presence degree. For example, on a desk with a rounded edge, the position of the edge of the desk detected as the depth change point and the normal direction change point is slightly shifted due to the difference between the measurement position and the shooting position and posture. On the other hand, such a shift is unlikely to occur in the edge on the plane detected as the luminance change point. Thus, by using a plurality of types of edge affirmative values, more practical edge information can be given to the three-dimensional model.

(2)上記実施形態では、三次元モデルとして所定空間を計測して得た空間モデルを例示したが、三次元モデルは什器等の所定物体を計測して得た物体モデルであってもよい。   (2) In the above embodiment, a spatial model obtained by measuring a predetermined space is exemplified as the three-dimensional model. However, the three-dimensional model may be an object model obtained by measuring a predetermined object such as a fixture.

(3)上記実施形態では、三次元座標データが三次元空間中の点を表すポイントクラウド形式の三次元モデルを例示したが、物体面の頂点座標の集合を含むメッシュモデル形式の三次元モデルであってもよい。その場合、例えば、任意の頂点座標のペアを三次元座標データとし(つまり直線単位の三次元座標データとし)、エッジ存在度付与手段531は当該三次元座標データに対してエッジ存在度を付与する。   (3) In the above embodiment, the point cloud format three-dimensional model in which the three-dimensional coordinate data represents a point in the three-dimensional space is exemplified, but the mesh model format three-dimensional model including a set of vertex coordinates of the object plane is used. There may be. In this case, for example, an arbitrary vertex coordinate pair is set as three-dimensional coordinate data (that is, three-dimensional coordinate data in units of straight lines), and the edge presence degree assigning unit 531 assigns an edge presence degree to the three-dimensional coordinate data. .

(4)上記実施形態においては監視カメラ3が1台の例を説明したが、監視カメラは2台以上でもよく、その場合は各監視カメラに上記例と同様の処理を繰り返せばよい。   (4) In the above embodiment, an example in which there is one monitoring camera 3 has been described. However, two or more monitoring cameras may be used, and in this case, the same processing as in the above example may be repeated for each monitoring camera.

(5)上記実施形態においては、撮影位置姿勢が固定されたカメラを校正するカメラ校正システムを例示したが、本発明は、パン・チルト動作するカメラ、ロボット等の移動体に設置されたカメラ、人が手持ちしたカメラなど撮影位置姿勢が変動するカメラを校正するカメラ校正システムにも適用することができる。すなわち、これらのカメラを校正する場合は、撮影位置姿勢が変動した後の撮影画像が入力されるたびに校正を行えばよい。   (5) In the above embodiment, the camera calibration system that calibrates the camera in which the photographing position and orientation is fixed is exemplified. However, the present invention is a camera that performs pan / tilt operation, a camera installed on a moving body such as a robot, The present invention can also be applied to a camera calibration system that calibrates a camera that changes its photographing position and orientation, such as a camera held by a person. That is, when these cameras are calibrated, it is sufficient to calibrate each time a captured image after the photographing position and orientation is changed is input.

(6)上記実施形態では、エッジ存在度を付与した三次元モデルを投影して仮想エッジ画像を生成する例を示したが、エッジ存在度を付与した空間モデルは投影せずとも三次元データ間の位置合わせや照合の精度を向上させる効果を奏する。例えば、互いに異なる複数の計測視点から計測して得た空間モデル或いは物体モデルのそれぞれにエッジ存在度を付与し、これら複数の空間モデル或いは複数の物体モデルを、エッジが存在することを示すエッジ存在度が付与された三次元座標データを重視して位置合わせすれば、位置合わせ精度を向上させることができる。また例えば、所定物体を計測して得た物体モデルにエッジ存在度を付与して、該物体モデルと未知物体を計測して得た三次元データとを照合して物体認識を行う際に、エッジが存在することを示すエッジ存在度が付与された三次元座標データを重視して照合を行えば照合精度を向上させることができる。   (6) In the above-described embodiment, an example in which a virtual edge image is generated by projecting a three-dimensional model to which edge presence is given is shown. However, a spatial model to which edge presence is given can be generated between three-dimensional data without projection. There is an effect of improving the accuracy of alignment and collation. For example, an edge presence is given to each of a spatial model or an object model obtained by measuring from a plurality of different measurement viewpoints, and an edge exists indicating that an edge exists in these multiple spatial models or multiple object models If the positioning is performed with emphasis on the three-dimensional coordinate data to which the degree is given, the positioning accuracy can be improved. Also, for example, when edge recognition is given to an object model obtained by measuring a predetermined object, and object recognition is performed by collating the object model with three-dimensional data obtained by measuring an unknown object, If the collation is performed with emphasis on the three-dimensional coordinate data to which the edge presence level indicating that the image exists, the collation accuracy can be improved.

(7)上記実施形態では、仮想エッジ画像を利用してカメラを校正する例を示したが、当該仮想エッジ画像を利用して物体照合の精度を向上させることも可能である。例えば、所定物体を計測して得た物体モデルにエッジ存在度を付与して仮想エッジ画像を生成し、撮影画像から生成した実エッジ画像との照合を行えば、撮影画像に写っている物体が所定物体であるか否かを判定する精度を向上させることができる。   (7) In the above embodiment, an example in which the camera is calibrated using the virtual edge image has been described. However, the accuracy of object matching can be improved using the virtual edge image. For example, if a virtual edge image is generated by adding an edge presence to an object model obtained by measuring a predetermined object and collated with a real edge image generated from a captured image, the object shown in the captured image is The accuracy of determining whether or not the object is a predetermined object can be improved.

1 カメラ校正システム、2 三次元計測装置、3 監視カメラ、4 監視装置、5 三次元データ処理装置、50 計測データ入力部、51 記憶部、52 監視画像入力部、53 制御部、54 出力部、55 ユーザーインターフェース部、510 空間モデル記憶手段、511 計測パラメータ記憶手段、530 座標変換手段、531 エッジ存在度付与手段、532 変化点抽出手段、533 エッジ存在度判定手段、535 実エッジ画像生成手段、536 仮想カメラ設定手段、537 仮想エッジ画像生成手段、538 エッジ画像照合手段、600 部屋、601 床、602 机、603 模様、650 計測位置、651 計測姿勢、652 撮影位置、653 撮影姿勢。   1 camera calibration system, 2 3D measuring device, 3 monitoring camera, 4 monitoring device, 5 3D data processing device, 50 measurement data input unit, 51 storage unit, 52 monitoring image input unit, 53 control unit, 54 output unit, 55 User interface unit, 510 Spatial model storage unit, 511 Measurement parameter storage unit, 530 Coordinate conversion unit, 531 Edge presence degree provision unit, 532 Change point extraction unit, 533 Edge presence level determination unit, 535 Real edge image generation unit, 536 Virtual camera setting means, 537 virtual edge image generation means, 538 edge image collation means, 600 room, 601 floor, 602 desk, 603 pattern, 650 measurement position, 651 measurement position, 652 shooting position, 653 shooting position.

Claims (7)

基点から対象の表面までの奥行きを計測して得た複数の三次元座標データによって構成された前記対象の三次元モデルを記憶している三次元モデル記憶手段と、
それぞれ前記基点からの死角である奥行き未計測領域との境界に位置する前記三次元座標データとなる、当該基点からの向きが互いに隣接し且つ当該基点からの奥行きが所定値以上異なる手前データと奥データとのうち手前データに、前記対象のエッジが存在することを示すエッジ肯定値を前記三次元モデル記憶手段に記憶させるエッジ存在度付与手段と、
を備えたことを特徴とする三次元モデル処理装置。
3D model storage means for storing a 3D model of the object composed of a plurality of 3D coordinate data obtained by measuring the depth from the base point to the surface of the object;
Each of the three-dimensional coordinate data located at the boundary with the depth-unmeasured area, which is a blind spot from the base point, and the front data and the back side whose directions from the base point are adjacent to each other and whose depth from the base point is different by a predetermined value or more. Edge presence degree giving means for storing an edge affirmation value indicating that the target edge exists in the previous data among the data in the 3D model storage means,
A three-dimensional model processing apparatus comprising:
請求項1に記載の三次元モデル処理装置であって、さらに、
前記三次元モデルを任意の位置姿勢にて模擬撮影する仮想カメラを設定する仮想カメラ設定手段と、
前記仮想カメラの撮影面にて、前記エッジ肯定値を有する三次元座標データの投影位置をエッジ画素とする仮想エッジ画像を生成する仮想エッジ画像生成手段と、
を備えたことを特徴とする三次元モデル処理装置。
The three-dimensional model processing apparatus according to claim 1, further comprising:
Virtual camera setting means for setting a virtual camera for simulating and photographing the three-dimensional model at an arbitrary position and orientation;
Virtual edge image generation means for generating a virtual edge image with the projection position of the three-dimensional coordinate data having the edge positive value as an edge pixel on the imaging surface of the virtual camera;
A three-dimensional model processing apparatus comprising:
請求項2に記載の三次元モデル処理装置と、
実カメラが前記対象を撮影した実画像を取得し、前記実画像上にて前記対象のエッジを表すエッジ画素を抽出して実エッジ画像を生成する実エッジ画像生成手段と、
前記実エッジ画像と前記仮想エッジ画像との類似度を算出して、前記類似度を最大化する前記仮想カメラの位置姿勢を前記実カメラの位置姿勢と決定するエッジ画像照合手段と、
を備えたことを特徴とするカメラ校正システム。
The three-dimensional model processing device according to claim 2,
A real edge image generating means for acquiring a real image obtained by photographing a target by the real camera, extracting an edge pixel representing the edge of the target on the real image, and generating a real edge image;
Edge image matching means for calculating the degree of similarity between the real edge image and the virtual edge image and determining the position and orientation of the virtual camera that maximizes the degree of similarity as the position and orientation of the real camera;
A camera calibration system characterized by comprising:
基点から対象の表面までの奥行きを計測して得た複数の三次元座標データによって構成された前記対象の三次元モデルを記憶し、それぞれ前記基点からの死角である奥行き未計測領域との境界に位置する前記三次元座標データとなる、前記基点からの向きが互いに隣接し且つ当該基点からの奥行きが所定値以上異なる手前データと奥データとのうち手前データは、前記対象のエッジが存在することを示すエッジ肯定値を付与されている三次元モデル記憶手段と、
前記三次元モデルを任意の位置姿勢にて模擬撮影する仮想カメラを設定する仮想カメラ設定手段と、
前記仮想カメラの撮影面にて、前記エッジ肯定値を有する三次元座標データの投影位置をエッジ画素とする仮想エッジ画像を生成する仮想エッジ画像生成手段と、
を備えたことを特徴とする三次元モデル処理装置。
Stores a 3D model of the object composed of a plurality of 3D coordinate data obtained by measuring the depth from the base point to the surface of the object, and at each boundary with a depth unmeasured area that is a blind spot from the base point The front data of the front data and the back data, which are the three-dimensional coordinate data that is positioned and whose directions from the base points are adjacent to each other and whose depths from the base points are different from each other by a predetermined value or more, include the target edge. 3D model storage means to which an edge positive value indicating
Virtual camera setting means for setting a virtual camera for simulating and photographing the three-dimensional model at an arbitrary position and orientation;
Virtual edge image generation means for generating a virtual edge image with the projection position of the three-dimensional coordinate data having the edge positive value as an edge pixel on the imaging surface of the virtual camera;
A three-dimensional model processing apparatus comprising:
請求項4に記載の三次元モデル処理装置であって、
前記三次元モデル記憶手段に記憶される前記三次元モデルはさらに、前記対象を撮影した画像において隣接画素との輝度差が所定値以上である画素に対応する三次元座標データに前記エッジ肯定値を付与されていること、を特徴とする三次元モデル処理装置。
The three-dimensional model processing device according to claim 4,
The three-dimensional model stored in the three-dimensional model storage means further adds the edge affirmative value to the three-dimensional coordinate data corresponding to a pixel whose luminance difference with an adjacent pixel is not less than a predetermined value in an image obtained by photographing the target. A three-dimensional model processing device characterized by being provided.
請求項4又は請求項5に記載の三次元モデル処理装置であって、
前記三次元モデル記憶手段に記憶される前記三次元モデルはさらに、隣接する三次元座標データとの前記対象の表面の法線ベクトルの差が所定値以上である三次元座標データに前記エッジ肯定値を付与されていること、を特徴とする三次元モデル処理装置。
The three-dimensional model processing device according to claim 4 or 5,
The three-dimensional model stored in the three-dimensional model storage means further includes the edge affirmative value in three-dimensional coordinate data in which a difference between normal vectors of the surface of the target from adjacent three-dimensional coordinate data is a predetermined value or more. A three-dimensional model processing device characterized by being given.
対象の表面の位置を表す複数の三次元座標データによって構成され、前記対象の表面に前記三次元座標データが得られていない領域が存在する三次元モデルであって、前記三次元座標データはそれが表す前記位置に前記対象のエッジが存在する可能性の高さを表すエッジ存在度を付与されている三次元モデルを記憶する三次元モデル記憶手段と、
前記対象を撮影するカメラの位置姿勢を、前記エッジ存在度が所定値以上である前記三次元座標データを用いて求める校正手段と、
を備えたことを特徴とするカメラ校正システム。
A three-dimensional model composed of a plurality of three-dimensional coordinate data representing the position of the target surface, and a region where the three-dimensional coordinate data is not obtained exists on the target surface, wherein the three-dimensional coordinate data is Three-dimensional model storage means for storing a three-dimensional model to which an edge presence level indicating a high possibility that the target edge exists at the position represented by:
Calibration means for determining the position and orientation of the camera that captures the object using the three-dimensional coordinate data in which the edge presence is equal to or greater than a predetermined value;
A camera calibration system characterized by comprising:
JP2015049705A 2015-03-12 2015-03-12 3D model processing apparatus and camera calibration system Active JP6352208B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015049705A JP6352208B2 (en) 2015-03-12 2015-03-12 3D model processing apparatus and camera calibration system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015049705A JP6352208B2 (en) 2015-03-12 2015-03-12 3D model processing apparatus and camera calibration system

Publications (2)

Publication Number Publication Date
JP2016170610A true JP2016170610A (en) 2016-09-23
JP6352208B2 JP6352208B2 (en) 2018-07-04

Family

ID=56983864

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015049705A Active JP6352208B2 (en) 2015-03-12 2015-03-12 3D model processing apparatus and camera calibration system

Country Status (1)

Country Link
JP (1) JP6352208B2 (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017163256A (en) * 2016-03-08 2017-09-14 エーティーラボ株式会社 Data compression apparatus, data compression method, and data compression program
JP6447706B1 (en) * 2017-12-20 2019-01-09 オムロン株式会社 Calibration data generation apparatus, calibration data generation method, calibration system, and control program
JP2019090774A (en) * 2017-11-17 2019-06-13 富士通株式会社 Distance measuring device, distance measuring method, and distance measuring program
WO2019193928A1 (en) * 2018-04-02 2019-10-10 株式会社デンソー Vehicle system, spatial spot estimation method, and spatial spot estimation device
WO2020013021A1 (en) * 2018-07-13 2020-01-16 株式会社ニコン Detecting device, processing device, detecting method, and processing program
CN110866951A (en) * 2019-10-08 2020-03-06 华南农业大学 Correction method for inclination of optical axis of monocular camera
CN110889426A (en) * 2018-09-10 2020-03-17 意识机械有限公司 Three-dimensional expression generation system
CN111457982A (en) * 2020-05-13 2020-07-28 武汉市异方体科技有限公司 Integrated volume measurement module
JP2020529086A (en) * 2017-11-30 2020-10-01 オッポ広東移動通信有限公司Guangdong Oppo Mobile Telecommunications Corp., Ltd. Methods and equipment for blurring preview photos and storage media
JP2021025947A (en) * 2019-08-07 2021-02-22 キヤノン株式会社 Calibration device and control method for the same and program and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002008012A (en) * 2000-06-26 2002-01-11 National Institute Of Advanced Industrial & Technology Method for calculating position and attitude of subject and method for calculating position and attitude of observation camera
JP2002024855A (en) * 2000-07-12 2002-01-25 Ricoh Co Ltd Generating method of 3d form, and memory medium stored program for its implemention
JP2007249592A (en) * 2006-03-15 2007-09-27 Japan Science & Technology Agency Three-dimensional object recognition system
JP2011179908A (en) * 2010-02-26 2011-09-15 Canon Inc Three-dimensional measurement apparatus, method for processing the same, and program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002008012A (en) * 2000-06-26 2002-01-11 National Institute Of Advanced Industrial & Technology Method for calculating position and attitude of subject and method for calculating position and attitude of observation camera
JP2002024855A (en) * 2000-07-12 2002-01-25 Ricoh Co Ltd Generating method of 3d form, and memory medium stored program for its implemention
JP2007249592A (en) * 2006-03-15 2007-09-27 Japan Science & Technology Agency Three-dimensional object recognition system
JP2011179908A (en) * 2010-02-26 2011-09-15 Canon Inc Three-dimensional measurement apparatus, method for processing the same, and program

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017163256A (en) * 2016-03-08 2017-09-14 エーティーラボ株式会社 Data compression apparatus, data compression method, and data compression program
JP2019090774A (en) * 2017-11-17 2019-06-13 富士通株式会社 Distance measuring device, distance measuring method, and distance measuring program
JP2020529086A (en) * 2017-11-30 2020-10-01 オッポ広東移動通信有限公司Guangdong Oppo Mobile Telecommunications Corp., Ltd. Methods and equipment for blurring preview photos and storage media
JP6447706B1 (en) * 2017-12-20 2019-01-09 オムロン株式会社 Calibration data generation apparatus, calibration data generation method, calibration system, and control program
WO2019123988A1 (en) * 2017-12-20 2019-06-27 オムロン株式会社 Calibration data generating device, calibration data generating method, calibration system, and control program
JP2019109200A (en) * 2017-12-20 2019-07-04 オムロン株式会社 Data generation device for calibration, data generation method for calibration, calibration system, and control program
JP2019185105A (en) * 2018-04-02 2019-10-24 株式会社デンソー Vehicle system, space area estimation method and space area estimation apparatus
JP7077726B2 (en) 2018-04-02 2022-05-31 株式会社デンソー Vehicle system, space area estimation method and space area estimation device
WO2019193928A1 (en) * 2018-04-02 2019-10-10 株式会社デンソー Vehicle system, spatial spot estimation method, and spatial spot estimation device
WO2020013021A1 (en) * 2018-07-13 2020-01-16 株式会社ニコン Detecting device, processing device, detecting method, and processing program
JP7200994B2 (en) 2018-07-13 2023-01-10 株式会社ニコン Processing device, detection device, processing method, and processing program
JPWO2020013021A1 (en) * 2018-07-13 2021-08-02 株式会社ニコン Detection device, processing device, detection method, and processing program
CN110889426A (en) * 2018-09-10 2020-03-17 意识机械有限公司 Three-dimensional expression generation system
JP2021025947A (en) * 2019-08-07 2021-02-22 キヤノン株式会社 Calibration device and control method for the same and program and storage medium
JP7321029B2 (en) 2019-08-07 2023-08-04 キヤノン株式会社 CALIBRATION DEVICE AND ITS CONTROL METHOD, PROGRAM AND STORAGE MEDIUM
CN110866951A (en) * 2019-10-08 2020-03-06 华南农业大学 Correction method for inclination of optical axis of monocular camera
CN110866951B (en) * 2019-10-08 2024-05-10 华南农业大学 Method for correcting optical axis inclination of monocular camera
CN111457982A (en) * 2020-05-13 2020-07-28 武汉市异方体科技有限公司 Integrated volume measurement module

Also Published As

Publication number Publication date
JP6352208B2 (en) 2018-07-04

Similar Documents

Publication Publication Date Title
JP6352208B2 (en) 3D model processing apparatus and camera calibration system
US10803351B2 (en) Image processing apparatus and image processing method
JP6560480B2 (en) Image processing system, image processing method, and program
JP6392756B2 (en) System and method for obtaining accurate body size measurements from a two-dimensional image sequence
JP5773944B2 (en) Information processing apparatus and information processing method
JP5812599B2 (en) Information processing method and apparatus
WO2019225547A1 (en) Object tracking device, object tracking method, and object tracking program
JP5093053B2 (en) Electronic camera
US20170140537A1 (en) System and method for scoring clutter for use in 3d point cloud matching in a vision system
JP6309913B2 (en) Object detection device
WO2016029939A1 (en) Method and system for determining at least one image feature in at least one image
JP4774818B2 (en) Image processing apparatus and image processing method
KR20180039013A (en) Feature data management for environment mapping on electronic devices
JP2015049776A (en) Image processor, image processing method and image processing program
JP2018169831A (en) Apparatus for image comparison
JP2018120283A (en) Information processing device, information processing method and program
JP6374812B2 (en) 3D model processing apparatus and camera calibration system
JP5217917B2 (en) Object detection and tracking device, object detection and tracking method, and object detection and tracking program
JP6802923B2 (en) Object detection device and object detection method
JP2005031044A (en) Three-dimensional error measuring device
KR102146839B1 (en) System and method for building real-time virtual reality
JP4623320B2 (en) Three-dimensional shape estimation system and image generation system
WO2024019000A1 (en) Information processing method, information processing device, and information processing program
CN117853572A (en) Projection control method, projection control device, projection equipment and storage medium
JP6038643B2 (en) Background information generation apparatus and object detection apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170424

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180416

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180606

R150 Certificate of patent or registration of utility model

Ref document number: 6352208

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250