43 #include <pcl/pcl_config.h>
44 #include <pcl/pcl_exports.h>
46 #include<pcl/io/image_metadata_wrapper.h>
57 using Ptr = shared_ptr<DepthImage>;
60 using Clock = std::chrono::high_resolution_clock;
61 using Timestamp = std::chrono::high_resolution_clock::time_point;
92 fillDisparityImage (
unsigned width,
unsigned height,
float* disparity_buffer,
unsigned line_step = 0)
const;
102 fillDepthImage (
unsigned width,
unsigned height,
float* depth_buffer,
unsigned line_step = 0)
const;
112 fillDepthImageRaw (
unsigned width,
unsigned height,
unsigned short* depth_buffer,
unsigned line_step = 0)
const;
163 const unsigned short*
174 return (getDataSize() / getHeight());
This class provides methods to fill a depth or disparity image.
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...
std::uint64_t getShadowValue() const
method to access the shadow value, that indicates pixels lying in shadow in the depth image.
float getBaseline() const
method to access the baseline of the "stereo" frame that was used to retrieve the depth image.
pcl::io::FrameWrapper::Ptr wrapper_
DepthImage(FrameWrapper::Ptr depth_metadata, float baseline, float focal_length, std::uint64_t shadow_value, std::uint64_t no_sample_value)
Constructor.
unsigned getHeight() const
std::chrono::high_resolution_clock Clock
std::uint64_t getNoSampleValue() const
method to access the no-sample value, that indicates pixels where no disparity could be determined fo...
std::uint64_t shadow_value_
const FrameWrapper::Ptr getMetaData() const
method to access the internal data structure from OpenNI.
std::uint64_t no_sample_value_
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.
unsigned getWidth() const
float getFocalLength() const
method to access the focal length of the "stereo" frame that was used to retrieve the depth image.
std::chrono::high_resolution_clock::time_point Timestamp
std::uint64_t getTimestamp() const
shared_ptr< DepthImage > Ptr
DepthImage(FrameWrapper::Ptr depth_metadata, float baseline, float focal_length, std::uint64_t shadow_value, std::uint64_t no_sample_value, Timestamp time)
Timestamp getSystemTimestamp() const
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...
shared_ptr< const DepthImage > ConstPtr
const unsigned short * getData()
unsigned getFrameID() const
shared_ptr< FrameWrapper > Ptr