OpenCV 4.5.3(日本語機械翻訳)
colored_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_COLORED_KINFU_HPP__
8 #define __OPENCV_RGBD_COLORED_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 colored_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 Size rgb_frameSize;
87
88 CV_PROP_RW kinfu::VolumeType volumeType;
89
91 CV_PROP_RW Matx33f intr;
92
94 CV_PROP_RW Matx33f rgb_intr;
95
103 CV_PROP_RW float depthFactor;
104
106 CV_PROP_RW float bilateral_sigma_depth;
108 CV_PROP_RW float bilateral_sigma_spatial;
110 CV_PROP_RW int bilateral_kernel_size;
111
113 CV_PROP_RW int pyramidLevels;
114
119 CV_PROP_RW Vec3i volumeDims;
121 CV_PROP_RW float voxelSize;
122
127 CV_PROP_RW float tsdf_min_camera_movement;
128
130 Affine3f volumePose;
131
136 CV_PROP_RW float tsdf_trunc_dist;
137
142 CV_PROP_RW int tsdf_max_weight;
143
148 CV_PROP_RW float raycast_step_factor;
149
150 // gradient delta in voxel sizes
151 // fixed at 1.0f
152 // float gradient_delta_factor;
153
155 CV_PROP_RW Vec3f lightPose;
156
158 CV_PROP_RW float icpDistThresh;
160 CV_PROP_RW float icpAngleThresh;
162 CV_PROP_RW std::vector<int> icpIterations;
163
168 CV_PROP_RW float truncateThreshold;
169};
170
195 class CV_EXPORTS_W ColoredKinFu
196{
197 public:
198 CV_WRAP static Ptr<ColoredKinFu> create(const Ptr<Params>& _params);
199 virtual ~ColoredKinFu();
200
202 virtual const Params& getParams() const = 0;
203
212 CV_WRAP virtual void render(OutputArray image) const = 0;
213
224 CV_WRAP virtual void render(OutputArray image, const Matx44f& cameraPose) const = 0;
225
234 CV_WRAP virtual void getCloud(OutputArray points, OutputArray normals) const = 0;
235
242 CV_WRAP virtual void getPoints(OutputArray points) const = 0;
243
248 CV_WRAP virtual void getNormals(InputArray points, OutputArray normals) const = 0;
249
254 CV_WRAP virtual void reset() = 0;
255
257 virtual const Affine3f getPose() const = 0;
258
265 CV_WRAP virtual bool update(InputArray depth, InputArray rgb) = 0;
266};
267
269}
270}
271 #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: colored_kinfu.hpp:196
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: colored_kinfu.hpp:20
Affine3f volumePose
initial volume pose in meters
Definition: colored_kinfu.hpp:130