41 #include <pcl/pcl_config.h> 48 #include <pcl/pcl_exports.h> 49 #include "openni_exception.h" 50 #include <pcl/io/boost.h> 60 using Ptr = pcl::shared_ptr<DepthImage>;
61 using ConstPtr = pcl::shared_ptr<const DepthImage>;
72 inline DepthImage (pcl::shared_ptr<xn::DepthMetaData> depth_meta_data,
float baseline,
float focal_length, XnUInt64 shadow_value, XnUInt64 no_sample_value) noexcept;
80 inline const xn::DepthMetaData&
81 getDepthMetaData () const throw ();
91 fillDisparityImage (
unsigned width,
unsigned height,
float* disparity_buffer,
unsigned line_step = 0) const;
101 fillDepthImage (
unsigned width,
unsigned height,
float* depth_buffer,
unsigned line_step = 0) const;
111 fillDepthImageRaw (
unsigned width,
unsigned height,
unsigned short* depth_buffer,
unsigned line_step = 0) const;
117 getBaseline () const throw ();
123 getFocalLength () const throw ();
129 getShadowValue () const throw ();
135 getNoSampleValue () const throw ();
139 getWidth () const throw ();
143 getHeight () const throw ();
149 getFrameID () const throw ();
156 getTimeStamp () const throw ();
159 pcl::shared_ptr<xn::DepthMetaData> depth_md_;
162 XnUInt64 shadow_value_;
163 XnUInt64 no_sample_value_;
166 DepthImage::
DepthImage (
pcl::shared_ptr<xn::DepthMetaData> depth_meta_data,
float baseline,
float focal_length, XnUInt64 shadow_value, XnUInt64 no_sample_value) noexcept
167 : depth_md_ (std::move(depth_meta_data))
168 , baseline_ (baseline)
169 , focal_length_ (focal_length)
170 , shadow_value_ (shadow_value)
171 , no_sample_value_ (no_sample_value) { }
175 const xn::DepthMetaData&
190 return focal_length_;
196 return shadow_value_;
202 return no_sample_value_;
208 return depth_md_->XRes ();
214 return depth_md_->YRes ();
220 return depth_md_->FrameID ();
226 return static_cast<unsigned long> (depth_md_->Timestamp ());
Defines functions, macros and traits for allocating and using memory.
XnUInt64 getNoSampleValue() const
method to access the no-sample value, that indicates pixels where no disparity could be determined fo...
XnUInt64 getShadowValue() const
method to access the shadow value, that indicates pixels lying in shadow in the depth image...
unsigned getFrameID() const
This class provides methods to fill a depth or disparity image.
unsigned getHeight() const
float getFocalLength() const
method to access the focal length of the "stereo" frame that was used to retrieve the depth image...
float getBaseline() const
method to access the baseline of the "stereo" frame that was used to retrieve the depth image...
const xn::DepthMetaData & getDepthMetaData() const
method to access the internal data structure from OpenNI.
virtual ~DepthImage() noexcept
Destructor.
pcl::shared_ptr< DepthImage > Ptr
pcl::shared_ptr< const DepthImage > ConstPtr
unsigned long getTimeStamp() const
unsigned getWidth() const