OpenCV 4.5.3(日本語機械翻訳)
全て クラス 名前空間 ファイル 関数 変数 型定義 列挙型 列挙値 フレンド グループ ページ
kinfu.hpp
1 // This file is part of OpenCV project.
2 // It is subject to the license terms in the LICENSE file found in the top-level directory
3 // of this distribution and at http://opencv.org/license.html
4
5 // This code is also subject to the license terms in the LICENSE_KinectFusion.md file found in this module's directory
6
7 #ifndef __OPENCV_RGBD_KINFU_HPP__
8 #define __OPENCV_RGBD_KINFU_HPP__
9
10 #include "opencv2/core.hpp"
11 #include "opencv2/core/affine.hpp"
12 #include <opencv2/rgbd/volume.hpp>
13
14 namespace cv {
15 namespace kinfu {
18
19 struct CV_EXPORTS_W Params
20{
21
22 CV_WRAP Params(){}
23
30 CV_WRAP Params(Matx33f volumeInitialPoseRot, Vec3f volumeInitialPoseTransl)
31 {
32 setInitialVolumePose(volumeInitialPoseRot,volumeInitialPoseTransl);
33 }
34
40 CV_WRAP Params(Matx44f volumeInitialPose)
41 {
42 setInitialVolumePose(volumeInitialPose);
43 }
44
51 CV_WRAP void setInitialVolumePose(Matx33f R, Vec3f t);
52
58 CV_WRAP void setInitialVolumePose(Matx44f homogen_tf);
59
64 CV_WRAP static Ptr<Params> defaultParams();
65
70 CV_WRAP static Ptr<Params> coarseParams();
71
75 CV_WRAP static Ptr<Params> hashTSDFParams(bool isCoarse);
76
80 CV_WRAP static Ptr<Params> coloredTSDFParams(bool isCoarse);
81
83 CV_PROP_RW Size frameSize;
84
86 CV_PROP_RW kinfu::VolumeType volumeType;
87
89 CV_PROP_RW Matx33f intr;
90
92 CV_PROP_RW Matx33f rgb_intr;
100 CV_PROP_RW float depthFactor;
101
103 CV_PROP_RW float bilateral_sigma_depth;
105 CV_PROP_RW float bilateral_sigma_spatial;
107 CV_PROP_RW int bilateral_kernel_size;
108
110 CV_PROP_RW int pyramidLevels;
111
116 CV_PROP_RW Vec3i volumeDims;
118 CV_PROP_RW float voxelSize;
119
124 CV_PROP_RW float tsdf_min_camera_movement;
125
127 Affine3f volumePose;
128
133 CV_PROP_RW float tsdf_trunc_dist;
134
139 CV_PROP_RW int tsdf_max_weight;
140
145 CV_PROP_RW float raycast_step_factor;
146
147 // gradient delta in voxel sizes
148 // fixed at 1.0f
149 // float gradient_delta_factor;
150
152 CV_PROP_RW Vec3f lightPose;
153
155 CV_PROP_RW float icpDistThresh;
157 CV_PROP_RW float icpAngleThresh;
159 CV_PROP_RW std::vector<int> icpIterations;
160
165 CV_PROP_RW float truncateThreshold;
166};
167
192 class CV_EXPORTS_W KinFu
193{
194 public:
195 CV_WRAP static Ptr<KinFu> create(const Ptr<Params>& _params);
196 virtual ~KinFu();
197
199 virtual const Params& getParams() const = 0;
200
209 CV_WRAP virtual void render(OutputArray image) const = 0;
210
221 CV_WRAP virtual void render(OutputArray image, const Matx44f& cameraPose) const = 0;
222
231 CV_WRAP virtual void getCloud(OutputArray points, OutputArray normals) const = 0;
232
239 CV_WRAP virtual void getPoints(OutputArray points) const = 0;
240
245 CV_WRAP virtual void getNormals(InputArray points, OutputArray normals) const = 0;
246
251 CV_WRAP virtual void reset() = 0;
252
254 virtual const Affine3f getPose() const = 0;
255
264 CV_WRAP virtual bool update(InputArray depth) = 0;
265};
266
268}
269}
270 #endif
This type is very similar to InputArray except that it is used for input/output and output function p...
Definition: mat.hpp:295
Template class for small matrices whose type and size are known at compilation time
Definition: matx.hpp:100
Template class for specifying the size of an image or rectangle.
Definition: core/types.hpp:316
Template class for short numerical vectors, a partial case of Matx
Definition: matx.hpp:342
KinectFusion implementation
Definition: kinfu.hpp:193
virtual const Params & getParams() const =0
Get current parameters
virtual const Affine3f getPose() const =0
Get current pose in voxel space
CV_EXPORTS void render(const Texture2D &tex, Rect_< double > wndRect=Rect_< double >(0.0, 0.0, 1.0, 1.0), Rect_< double > texRect=Rect_< double >(0.0, 0.0, 1.0, 1.0))
Render OpenGL texture or primitives.
cv
"black box" representation of the file storage associated with a file on disk.
Definition: aruco.hpp:75
Definition: cvstd_wrapper.hpp:74
Definition: kinfu.hpp:20
Affine3f volumePose
initial volume pose in meters
Definition: kinfu.hpp:127