33 #include <pcl/memory.h>
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>;
96 getUsbVendorId ()
const;
98 getUsbProductId ()
const;
101 getStringID ()
const;
107 hasIRSensor ()
const;
109 hasColorSensor ()
const;
111 hasDepthSensor ()
const;
131 isIRStreamStarted ();
133 isColorStreamStarted ();
135 isDepthStreamStarted ();
138 isImageRegistrationModeSupported ()
const;
140 setImageRegistrationMode (
bool enabled);
142 isDepthRegistered ()
const;
147 getColorVideoMode ();
149 getDepthVideoMode ();
151 const std::vector<OpenNI2VideoMode>&
152 getSupportedIRVideoModes ()
const;
153 const std::vector<OpenNI2VideoMode>&
154 getSupportedColorVideoModes ()
const;
155 const std::vector<OpenNI2VideoMode>&
156 getSupportedDepthVideoModes ()
const;
180 getDefaultIRMode ()
const;
182 getDefaultColorMode ()
const;
184 getDefaultDepthMode ()
const;
187 getIRFocalLength ()
const;
189 getColorFocalLength ()
const;
191 getDepthFocalLength ()
const;
202 setAutoExposure (
bool enable);
204 setAutoWhiteBalance (
bool enable);
209 return (openni_device_->getDepthColorSyncEnabled ());
221 return (openni_device_->isFile());
225 setSynchronization (
bool enableSync);
228 getAutoExposure ()
const;
230 getAutoWhiteBalance ()
const;
233 setUseDeviceTimer (
bool enable);
240 getDepthFrameCount ();
247 getColorFrameCount ();
264 setPlaybackSpeed (
double speed);
278 std::shared_ptr<openni::VideoStream>
279 getIRVideoStream ()
const;
280 std::shared_ptr<openni::VideoStream>
281 getColorVideoStream ()
const;
282 std::shared_ptr<openni::VideoStream>
283 getDepthVideoStream ()
const;
287 processColorFrame (openni::VideoStream& stream);
289 processDepthFrame (openni::VideoStream& stream);
291 processIRFrame (openni::VideoStream& stream);
295 findCompatibleVideoMode (
const std::vector<OpenNI2VideoMode>& supportedModes,
299 resizingSupported (std::size_t input_width, std::size_t input_height, std::size_t output_width, std::size_t output_height)
const;
PCL_EXPORTS std::ostream & operator<<(std::ostream &stream, const OpenNI2Device &device)
bool depth_video_started_
std::vector< OpenNI2VideoMode > ir_video_modes_
std::vector< OpenNI2VideoMode > depth_video_modes_
float baseline_
distance between the projector and the IR camera in meters
Class containing just a reference to IR meta data.
shared_ptr< const OpenNI2Device > ConstPtr
std::function< void(openni::VideoStream &stream)> StreamCallbackFunction
std::shared_ptr< openni::VideoStream > ir_video_stream_
bool color_video_started_
std::shared_ptr< openni::VideoStream > color_video_stream_
std::function< void(IRImage::Ptr, void *cookie) > IRImageCallbackFunction
std::uint64_t shadow_value_
the value for shadow (occluded pixels)
std::shared_ptr< OpenNI2FrameListener > color_frame_listener
Image interface class providing an interface to fill a RGB or Grayscale image buffer.
std::vector< OpenNI2VideoMode > color_video_modes_
std::function< void(DepthImage::Ptr, void *cookie) > DepthImageCallbackFunction
std::function< void(Image::Ptr, void *cookie) > ImageCallbackFunction
This class provides methods to fill a depth or disparity image.
std::shared_ptr< openni::Device > openni_device_
std::shared_ptr< OpenNI2FrameListener > depth_frame_listener
std::uint64_t no_sample_value_
the value for pixels without a valid disparity measurement
shared_ptr< OpenNI2Device > Ptr
std::shared_ptr< OpenNI2FrameListener > ir_frame_listener
std::function< void(openni::VideoStream &stream)> StreamCallbackFunction
std::shared_ptr< openni::DeviceInfo > device_info_
std::shared_ptr< openni::VideoStream > depth_video_stream_
bool isSynchronizationSupported()