41#include <pcl/pcl_config.h>
48#include <pcl/pcl_exports.h>
49#include "openni_exception.h"
59 using Ptr = pcl::shared_ptr<DepthImage>;
60 using ConstPtr = pcl::shared_ptr<const DepthImage>;
71 inline DepthImage (pcl::shared_ptr<xn::DepthMetaData> depth_meta_data,
float baseline,
float focal_length, XnUInt64 shadow_value, XnUInt64 no_sample_value)
noexcept;
79 inline const xn::DepthMetaData&
90 fillDisparityImage (
unsigned width,
unsigned height,
float* disparity_buffer,
unsigned line_step = 0) const;
100 fillDepthImage (
unsigned width,
unsigned height,
float* depth_buffer,
unsigned line_step = 0) const;
110 fillDepthImageRaw (
unsigned width,
unsigned height,
unsigned short* depth_buffer,
unsigned line_step = 0) const;
165 DepthImage::
DepthImage (
pcl::shared_ptr<xn::DepthMetaData> depth_meta_data,
float baseline,
float focal_length, XnUInt64 shadow_value, XnUInt64 no_sample_value) noexcept
174 const xn::DepthMetaData&
225 return static_cast<unsigned long> (
depth_md_->Timestamp ());
unsigned getFrameID() const noexcept
pcl::shared_ptr< DepthImage > Ptr
XnUInt64 getShadowValue() const noexcept
method to access the shadow value, that indicates pixels lying in shadow in the depth image.
void fillDisparityImage(unsigned width, unsigned height, float *disparity_buffer, unsigned line_step=0) const
fills a user given block of memory with the disparity values with additional nearest-neighbor down-sc...
pcl::shared_ptr< const DepthImage > ConstPtr
XnUInt64 getNoSampleValue() const noexcept
method to access the no-sample value, that indicates pixels where no disparity could be determined fo...
unsigned getWidth() const noexcept
const xn::DepthMetaData & getDepthMetaData() const noexcept
method to access the internal data structure from OpenNI.
pcl::shared_ptr< xn::DepthMetaData > depth_md_
void fillDepthImageRaw(unsigned width, unsigned height, unsigned short *depth_buffer, unsigned line_step=0) const
fills a user given block of memory with the raw values with additional nearest-neighbor down-scaling.
float getBaseline() const noexcept
method to access the baseline of the "stereo" frame that was used to retrieve the depth image.
DepthImage(pcl::shared_ptr< xn::DepthMetaData > depth_meta_data, float baseline, float focal_length, XnUInt64 shadow_value, XnUInt64 no_sample_value) noexcept
Constructor.
virtual ~DepthImage() noexcept
Destructor.
unsigned getHeight() const noexcept
void fillDepthImage(unsigned width, unsigned height, float *depth_buffer, unsigned line_step=0) const
fills a user given block of memory with the disparity values with additional nearest-neighbor down-sc...
unsigned long getTimeStamp() const noexcept
XnUInt64 no_sample_value_
float getFocalLength() const noexcept
method to access the focal length of the "stereo" frame that was used to retrieve the depth image.
Defines functions, macros and traits for allocating and using memory.