This class provides methods to fill a depth or disparity image.
More...
#include <pcl/io/image_depth.h>
|
| DepthImage (FrameWrapper::Ptr depth_metadata, float baseline, float focal_length, std::uint64_t shadow_value, std::uint64_t no_sample_value) |
| Constructor. More...
|
|
| DepthImage (FrameWrapper::Ptr depth_metadata, float baseline, float focal_length, std::uint64_t shadow_value, std::uint64_t no_sample_value, Timestamp time) |
|
| ~DepthImage () |
| Destructor. More...
|
|
const FrameWrapper::Ptr | getMetaData () const |
| method to access the internal data structure from OpenNI. More...
|
|
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-scaling. More...
|
|
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-scaling. More...
|
|
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. More...
|
|
float | getBaseline () const |
| method to access the baseline of the "stereo" frame that was used to retrieve the depth image. More...
|
|
float | getFocalLength () const |
| method to access the focal length of the "stereo" frame that was used to retrieve the depth image. More...
|
|
std::uint64_t | getShadowValue () const |
| method to access the shadow value, that indicates pixels lying in shadow in the depth image. More...
|
|
std::uint64_t | getNoSampleValue () const |
| method to access the no-sample value, that indicates pixels where no disparity could be determined for the depth image. More...
|
|
unsigned | getWidth () const |
|
unsigned | getHeight () const |
|
unsigned | getFrameID () const |
|
std::uint64_t | getTimestamp () const |
|
Timestamp | getSystemTimestamp () const |
|
const unsigned short * | getData () |
|
int | getDataSize () const |
|
unsigned | getStep () const |
|
This class provides methods to fill a depth or disparity image.
Definition at line 54 of file image_depth.h.
◆ Clock
◆ ConstPtr
◆ Ptr
◆ Timestamp
◆ DepthImage() [1/2]
pcl::io::DepthImage::DepthImage |
( |
FrameWrapper::Ptr |
depth_metadata, |
|
|
float |
baseline, |
|
|
float |
focal_length, |
|
|
std::uint64_t |
shadow_value, |
|
|
std::uint64_t |
no_sample_value |
|
) |
| |
Constructor.
- Parameters
-
[in] | depth_metadata | the actual data from the OpenNI library |
[in] | baseline | the baseline of the "stereo" camera, i.e. the distance between the projector and the IR camera for Primesense like cameras. e.g. 7.5cm for PSDK5 and PSDK6 reference design. |
[in] | focal_length | focal length of the "stereo" frame. |
[in] | shadow_value | defines which values in the depth data are indicating shadow (resulting from the parallax between projector and IR camera) |
[in] | no_sample_value | defines which values in the depth data are indicating that no depth (disparity) could be determined . |
- Attention
- The focal length may change, depending whether the depth stream is registered/mapped to the RGB stream or not.
◆ DepthImage() [2/2]
pcl::io::DepthImage::DepthImage |
( |
FrameWrapper::Ptr |
depth_metadata, |
|
|
float |
baseline, |
|
|
float |
focal_length, |
|
|
std::uint64_t |
shadow_value, |
|
|
std::uint64_t |
no_sample_value, |
|
|
Timestamp |
time |
|
) |
| |
◆ ~DepthImage()
pcl::io::DepthImage::~DepthImage |
( |
| ) |
|
Destructor.
Never throws an exception.
◆ fillDepthImage()
void pcl::io::DepthImage::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-scaling.
- Parameters
-
[in] | width | width the width of the desired depth image. |
[in] | height | height the height of the desired depth image. |
[in,out] | depth_buffer | the float pointer to the actual memory buffer to be filled with the depth values. |
[in] | line_step | if only a rectangular sub region of the buffer needs to be filled, then line_step is the width in bytes (not floats) of the original width of the depth buffer. |
◆ fillDepthImageRaw()
void pcl::io::DepthImage::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.
- Parameters
-
[in] | width | width the width of the desired raw image. |
[in] | height | height the height of the desired raw image. |
[in,out] | depth_buffer | the unsigned short pointer to the actual memory buffer to be filled with the raw values. |
[in] | line_step | if only a rectangular sub region of the buffer needs to be filled, then line_step is the width in bytes (not floats) of the original width of the depth buffer. |
◆ fillDisparityImage()
void pcl::io::DepthImage::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-scaling.
- Parameters
-
[in] | width | the width of the desired disparity image. |
[in] | height | the height of the desired disparity image. |
[in,out] | disparity_buffer | the float pointer to the actual memory buffer to be filled with the disparity values. |
[in] | line_step | if only a rectangular sub region of the buffer needs to be filled, then line_step is the width in bytes (not floats) of the original width of the depth buffer. |
◆ getBaseline()
float pcl::io::DepthImage::getBaseline |
( |
| ) |
const |
method to access the baseline of the "stereo" frame that was used to retrieve the depth image.
- Returns
- baseline in meters
◆ getData()
const unsigned short* pcl::io::DepthImage::getData |
( |
| ) |
|
◆ getDataSize()
int pcl::io::DepthImage::getDataSize |
( |
| ) |
const |
◆ getFocalLength()
float pcl::io::DepthImage::getFocalLength |
( |
| ) |
const |
method to access the focal length of the "stereo" frame that was used to retrieve the depth image.
- Returns
- focal length in pixels
◆ getFrameID()
unsigned pcl::io::DepthImage::getFrameID |
( |
| ) |
const |
- Returns
- an ascending id for the depth frame
- Attention
- not necessarily synchronized with other streams
◆ getHeight()
unsigned pcl::io::DepthImage::getHeight |
( |
| ) |
const |
- Returns
- the height of the depth image
◆ getMetaData()
method to access the internal data structure from OpenNI.
If the data is accessed just read-only, then this method is faster than a fillXXX method
- Returns
- the actual depth data of type openni::VideoFrameRef.
◆ getNoSampleValue()
std::uint64_t pcl::io::DepthImage::getNoSampleValue |
( |
| ) |
const |
method to access the no-sample value, that indicates pixels where no disparity could be determined for the depth image.
- Returns
- no-sample value
◆ getShadowValue()
std::uint64_t pcl::io::DepthImage::getShadowValue |
( |
| ) |
const |
method to access the shadow value, that indicates pixels lying in shadow in the depth image.
- Returns
- shadow value
◆ getStep()
unsigned pcl::io::DepthImage::getStep |
( |
| ) |
const |
|
inline |
◆ getSystemTimestamp()
Timestamp pcl::io::DepthImage::getSystemTimestamp |
( |
| ) |
const |
◆ getTimestamp()
std::uint64_t pcl::io::DepthImage::getTimestamp |
( |
| ) |
const |
- Returns
- a ascending timestamp for the depth frame
- Attention
- its not the system time, thus can not be used directly to synchronize different sensors. But definitely synchronized with other streams
◆ getWidth()
unsigned pcl::io::DepthImage::getWidth |
( |
| ) |
const |
- Returns
- the width of the depth image
◆ baseline_
float pcl::io::DepthImage::baseline_ |
|
protected |
◆ focal_length_
float pcl::io::DepthImage::focal_length_ |
|
protected |
◆ no_sample_value_
std::uint64_t pcl::io::DepthImage::no_sample_value_ |
|
protected |
◆ shadow_value_
std::uint64_t pcl::io::DepthImage::shadow_value_ |
|
protected |
◆ timestamp_
◆ wrapper_
The documentation for this class was generated from the following file: