OpenCV  5.0.0-pre
Open Source Computer Vision
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
cv::colored_kinfu::ColoredKinFu Class Referenceabstract

KinectFusion implementation. More...

#include <opencv2/rgbd/colored_kinfu.hpp>

Collaboration diagram for cv::colored_kinfu::ColoredKinFu:

Public Member Functions

virtual ~ColoredKinFu ()
 
virtual void getCloud (OutputArray points, OutputArray normals) const =0
 Gets points and normals of current 3d mesh.
 
virtual void getNormals (InputArray points, OutputArray normals) const =0
 Calculates normals for given points.
 
virtual const ParamsgetParams () const =0
 Get current parameters.
 
virtual void getPoints (OutputArray points) const =0
 Gets points of current 3d mesh.
 
virtual Affine3f getPose () const =0
 Get current pose in voxel space.
 
virtual void render (OutputArray image) const =0
 Renders a volume into an image.
 
virtual void render (OutputArray image, const Matx44f &cameraPose) const =0
 Renders a volume into an image.
 
virtual void reset ()=0
 Resets the algorithm.
 
virtual bool update (InputArray depth, InputArray rgb)=0
 Process next depth frame.
 

Static Public Member Functions

static Ptr< ColoredKinFucreate (const Ptr< Params > &_params)
 

Detailed Description

KinectFusion implementation.

This class implements a 3d reconstruction algorithm described in [131] paper.

It takes a sequence of depth images taken from depth sensor (or any depth images source such as stereo camera matching algorithm or even raymarching renderer). The output can be obtained as a vector of points and their normals or can be Phong-rendered from given camera pose.

An internal representation of a model is a voxel cuboid that keeps TSDF values which are a sort of distances to the surface (for details read the [131] article about TSDF). There is no interface to that representation yet.

KinFu uses OpenCL acceleration automatically if available. To enable or disable it explicitly use cv::setUseOptimized() or cv::ocl::setUseOpenCL().

This implementation is based on kinfu-remake.

Note that the KinectFusion algorithm was patented and its use may be restricted by the list of patents mentioned in README.md file in this module directory.

That's why you need to set the OPENCV_ENABLE_NONFREE option in CMake to use KinectFusion.

Constructor & Destructor Documentation

◆ ~ColoredKinFu()

virtual cv::colored_kinfu::ColoredKinFu::~ColoredKinFu ( )
virtual

Member Function Documentation

◆ create()

static Ptr< ColoredKinFu > cv::colored_kinfu::ColoredKinFu::create ( const Ptr< Params > &  _params)
static
Python:
cv.colored_kinfu.ColoredKinFu.create(_params) -> retval
cv.colored_kinfu.ColoredKinFu_create(_params) -> retval

◆ getCloud()

virtual void cv::colored_kinfu::ColoredKinFu::getCloud ( OutputArray  points,
OutputArray  normals 
) const
pure virtual
Python:
cv.colored_kinfu.ColoredKinFu.getCloud([, points[, normals]]) -> points, normals

Gets points and normals of current 3d mesh.

The order of normals corresponds to order of points. The order of points is undefined.

Parameters
pointsvector of points which are 4-float vectors
normalsvector of normals which are 4-float vectors

◆ getNormals()

virtual void cv::colored_kinfu::ColoredKinFu::getNormals ( InputArray  points,
OutputArray  normals 
) const
pure virtual
Python:
cv.colored_kinfu.ColoredKinFu.getNormals(points[, normals]) -> normals

Calculates normals for given points.

Parameters
pointsinput vector of points which are 4-float vectors
normalsoutput vector of corresponding normals which are 4-float vectors

◆ getParams()

virtual const Params & cv::colored_kinfu::ColoredKinFu::getParams ( ) const
pure virtual

Get current parameters.

◆ getPoints()

virtual void cv::colored_kinfu::ColoredKinFu::getPoints ( OutputArray  points) const
pure virtual
Python:
cv.colored_kinfu.ColoredKinFu.getPoints([, points]) -> points

Gets points of current 3d mesh.

The order of points is undefined.

Parameters
pointsvector of points which are 4-float vectors

◆ getPose()

virtual Affine3f cv::colored_kinfu::ColoredKinFu::getPose ( ) const
pure virtual

Get current pose in voxel space.

◆ render() [1/2]

virtual void cv::colored_kinfu::ColoredKinFu::render ( OutputArray  image) const
pure virtual
Python:
cv.colored_kinfu.ColoredKinFu.render([, image]) -> image
cv.colored_kinfu.ColoredKinFu.render(cameraPose[, image]) -> image

Renders a volume into an image.

Renders a 0-surface of TSDF using Phong shading into a CV_8UC4 Mat. Light pose is fixed in KinFu params.

Parameters
imageresulting image

◆ render() [2/2]

virtual void cv::colored_kinfu::ColoredKinFu::render ( OutputArray  image,
const Matx44f cameraPose 
) const
pure virtual
Python:
cv.colored_kinfu.ColoredKinFu.render([, image]) -> image
cv.colored_kinfu.ColoredKinFu.render(cameraPose[, image]) -> image

Renders a volume into an image.

Renders a 0-surface of TSDF using Phong shading into a CV_8UC4 Mat. Light pose is fixed in KinFu params.

Parameters
imageresulting image
cameraPosepose of camera to render from. If empty then render from current pose which is a last frame camera pose.

◆ reset()

virtual void cv::colored_kinfu::ColoredKinFu::reset ( )
pure virtual
Python:
cv.colored_kinfu.ColoredKinFu.reset() -> None

Resets the algorithm.

Clears current model and resets a pose.

◆ update()

virtual bool cv::colored_kinfu::ColoredKinFu::update ( InputArray  depth,
InputArray  rgb 
)
pure virtual
Python:
cv.colored_kinfu.ColoredKinFu.update(depth, rgb) -> retval

Process next depth frame.

Parameters
depthinput Mat of depth frame
rgbinput Mat of rgb (colored) frame
Returns
true if succeeded to align new frame with current scene, false if opposite

The documentation for this class was generated from the following file: