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&
80 getDepthMetaData () const throw ();
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;
116 getBaseline () const throw ();
122 getFocalLength () const throw ();
128 getShadowValue () const throw ();
134 getNoSampleValue () const throw ();
138 getWidth () const throw ();
142 getHeight () const throw ();
148 getFrameID () const throw ();
155 getTimeStamp () const throw ();
158 pcl::shared_ptr<xn::DepthMetaData> depth_md_;
161 XnUInt64 shadow_value_;
162 XnUInt64 no_sample_value_;
165 DepthImage::
DepthImage (
pcl::shared_ptr<xn::DepthMetaData> depth_meta_data,
float baseline,
float focal_length, XnUInt64 shadow_value, XnUInt64 no_sample_value) noexcept
166 : depth_md_ (std::move(depth_meta_data))
167 , baseline_ (baseline)
168 , focal_length_ (focal_length)
169 , shadow_value_ (shadow_value)
170 , no_sample_value_ (no_sample_value) { }
172 DepthImage::~DepthImage () noexcept { }
174 const xn::DepthMetaData&
175 DepthImage::getDepthMetaData ()
const throw ()
181 DepthImage::getBaseline ()
const throw ()
187 DepthImage::getFocalLength ()
const throw ()
189 return focal_length_;
193 DepthImage::getShadowValue ()
const throw ()
195 return shadow_value_;
199 DepthImage::getNoSampleValue ()
const throw ()
201 return no_sample_value_;
205 DepthImage::getWidth ()
const throw ()
207 return depth_md_->XRes ();
211 DepthImage::getHeight ()
const throw ()
213 return depth_md_->YRes ();
217 DepthImage::getFrameID ()
const throw ()
219 return depth_md_->FrameID ();
223 DepthImage::getTimeStamp ()
const throw ()
225 return static_cast<unsigned long> (depth_md_->Timestamp ());
This class provides methods to fill a depth or disparity image.
pcl::shared_ptr< DepthImage > Ptr
pcl::shared_ptr< const DepthImage > ConstPtr
Defines functions, macros and traits for allocating and using memory.