34 #include <pcl/pcl_exports.h>
37 #include <pcl/io/image.h>
38 #include <pcl/io/image_depth.h>
39 #include <pcl/io/image_ir.h>
41 #include <pcl/io/io_exception.h>
42 #include <pcl/io/openni2/openni2_video_mode.h>
76 using Ptr = shared_ptr<OpenNI2Device>;
77 using ConstPtr = shared_ptr<const OpenNI2Device>;
151 const std::vector<OpenNI2VideoMode>&
153 const std::vector<OpenNI2VideoMode>&
155 const std::vector<OpenNI2VideoMode>&
209 return (openni_device_->getDepthColorSyncEnabled ());
221 return (openni_device_->isFile());
278 std::shared_ptr<openni::VideoStream>
280 std::shared_ptr<openni::VideoStream>
282 std::shared_ptr<openni::VideoStream>
299 resizingSupported (std::size_t input_width, std::size_t input_height, std::size_t output_width, std::size_t output_height)
const;
318 bool ir_video_started_{
false};
319 bool color_video_started_{
false};
320 bool depth_video_started_{
false};
323 float baseline_{0.0f};
325 std::uint64_t shadow_value_{0};
327 std::uint64_t no_sample_value_{0};
This class provides methods to fill a depth or disparity image.
shared_ptr< DepthImage > Ptr
Class containing just a reference to IR meta data.
shared_ptr< IRImage > Ptr
Image interface class providing an interface to fill a RGB or Grayscale image buffer.
void processColorFrame(openni::VideoStream &stream)
const std::string getUri() const
std::shared_ptr< OpenNI2FrameListener > depth_frame_listener
std::shared_ptr< openni::VideoStream > depth_video_stream_
float getIRFocalLength() const
void processDepthFrame(openni::VideoStream &stream)
shared_ptr< const OpenNI2Device > ConstPtr
const std::vector< OpenNI2VideoMode > & getSupportedColorVideoModes() const
std::uint64_t getShadowValue()
bool isColorVideoModeSupported(const OpenNI2VideoMode &video_mode) const
const OpenNI2VideoMode getDepthVideoMode()
bool isSynchronizationSupported()
OpenNI2Device(const std::string &device_URI)
int getColorFrameCount()
Get absolute number of color frames in the current stream.
std::vector< OpenNI2VideoMode > depth_video_modes_
int getIRFrameCount()
Get absolute number of ir frames in the current stream.
bool findCompatibleDepthMode(const OpenNI2VideoMode &requested_mode, OpenNI2VideoMode &actual_mode) const
bool isDepthStreamStarted()
void setAutoWhiteBalance(bool enable)
const std::string getName() const
shared_ptr< OpenNI2Device > Ptr
std::function< void(IRImage::Ptr, void *cookie) > IRImageCallbackFunction
bool findCompatibleIRMode(const OpenNI2VideoMode &requested_mode, OpenNI2VideoMode &actual_mode) const
void setIRVideoMode(const OpenNI2VideoMode &video_mode)
void setDepthCallback(StreamCallbackFunction depth_callback)
std::uint16_t getUsbProductId() const
OpenNI2VideoMode getDefaultColorMode() const
float getColorFocalLength() const
bool resizingSupported(std::size_t input_width, std::size_t input_height, std::size_t output_width, std::size_t output_height) const
void setDepthVideoMode(const OpenNI2VideoMode &video_mode)
std::uint16_t getUsbVendorId() const
bool findCompatibleColorMode(const OpenNI2VideoMode &requested_mode, OpenNI2VideoMode &actual_mode) const
std::shared_ptr< openni::VideoStream > color_video_stream_
std::vector< OpenNI2VideoMode > ir_video_modes_
void setColorVideoMode(const OpenNI2VideoMode &video_mode)
void setImageRegistrationMode(bool enabled)
OpenNI2VideoMode getDefaultDepthMode() const
bool getAutoWhiteBalance() const
std::shared_ptr< openni::DeviceInfo > device_info_
bool isImageRegistrationModeSupported() const
std::function< void(openni::VideoStream &stream)> StreamCallbackFunction
void setSynchronization(bool enableSync)
std::function< void(Image::Ptr, void *cookie) > ImageCallbackFunction
const OpenNI2VideoMode getColorVideoMode()
std::function< void(DepthImage::Ptr, void *cookie) > DepthImageCallbackFunction
const std::vector< OpenNI2VideoMode > & getSupportedIRVideoModes() const
void setUseDeviceTimer(bool enable)
bool findCompatibleVideoMode(const std::vector< OpenNI2VideoMode > &supportedModes, const OpenNI2VideoMode &output_mode, OpenNI2VideoMode &mode) const
bool isDepthVideoModeSupported(const OpenNI2VideoMode &video_mode) const
bool isDepthRegistered() const
std::shared_ptr< openni::VideoStream > getColorVideoStream() const
std::vector< OpenNI2VideoMode > color_video_modes_
bool isColorStreamStarted()
void setAutoExposure(bool enable)
float getDepthFocalLength() const
void processIRFrame(openni::VideoStream &stream)
bool getAutoExposure() const
OpenNI2VideoMode getDefaultIRMode() const
void setIRCallback(StreamCallbackFunction ir_callback)
void setColorCallback(StreamCallbackFunction color_callback)
bool hasDepthSensor() const
std::shared_ptr< openni::VideoStream > ir_video_stream_
bool isIRVideoModeSupported(const OpenNI2VideoMode &video_mode) const
bool setPlaybackSpeed(double speed)
Set the playback speed if the device is an recorded stream.
std::shared_ptr< openni::Device > openni_device_
int getDepthFrameCount()
Get absolute number of depth frames in the current stream.
const std::string getStringID() const
const std::vector< OpenNI2VideoMode > & getSupportedDepthVideoModes() const
std::shared_ptr< openni::VideoStream > getIRVideoStream() const
std::shared_ptr< openni::VideoStream > getDepthVideoStream() const
std::shared_ptr< OpenNI2FrameListener > ir_frame_listener
bool hasColorSensor() const
std::shared_ptr< OpenNI2FrameListener > color_frame_listener
const OpenNI2VideoMode getIRVideoMode()
const std::string getVendor() const
Defines functions, macros and traits for allocating and using memory.
PCL_EXPORTS std::ostream & operator<<(std::ostream &stream, const OpenNI2Device &device)