Grabber for Intel Realsense 2 SDK devices (D400 series) More...
#include <pcl/io/real_sense_2_grabber.h>
|
static size_t |
getTextureIdx (const rs2::video_frame &texture, float u, float v) |
|
Retrieve pixel index for UV texture coordinate. More...
|
|
static pcl::RGB |
getTextureColor (const rs2::video_frame &texture, float u, float v) |
|
Retrieve RGB color from texture video frame. More...
|
|
static std::uint8_t |
getTextureIntensity (const rs2::video_frame &texture, float u, float v) |
|
Retrieve color intensity from texture video frame. More...
|
|
Grabber for Intel Realsense 2 SDK devices (D400 series)
- Note
- Device width/height defaults to 424/240, the lowest resolutions for D400 devices.
- Testing on the in_hand_scanner example we found the lower default resolution allowed the app to perform adequately.
- Developers should use this resolution as a starting point and gradually increase to get the best results
- Author
- Patrick Abadi patri.nosp@m.ckab.nosp@m.adi@g.nosp@m.mail.nosp@m..com, Daniel Packard pack3.nosp@m.754@.nosp@m.gmail.nosp@m..com
Definition at line 59 of file real_sense_2_grabber.h.
signal_librealsense_PointXYZ
signal_librealsense_PointXYZI
signal_librealsense_PointXYZRGB
signal_librealsense_PointXYZRGBA
RealSense2Grabber()
pcl::RealSense2Grabber::RealSense2Grabber | ( | const std::string & |
file_name_or_serial_number = "" , |
| | const bool |
repeat_playback = true |
| ) | |
|
Constructor.
- Parameters
-
[in] |
file_name_or_serial_number |
used for either loading bag file or specific device by serial number |
[in] |
repeat_playback |
whether to repeat playback when reading from file |
~RealSense2Grabber()
pcl::RealSense2Grabber::~RealSense2Grabber | ( | |
) | |
virtual Destructor inherited from the Grabber interface.
It never throws.
convertDepthToPointXYZ()
Convert a Depth image to a pcl::PointCloud<pcl::PointXYZ>
- Parameters
-
[in] |
points |
the depth points |
convertIntensityDepthToPointXYZRGBI()
pcl::PointCloud<pcl::PointXYZI>::Ptr pcl::RealSense2Grabber::convertIntensityDepthToPointXYZRGBI | ( | const rs2::points & |
points, | | | const rs2::video_frame & |
ir | | ) | |
| | protected |
Convert an Infrared Depth image to a pcl::PointCloud<pcl::PointXYZI>
- Parameters
-
[in] |
points |
the depth points |
[in] |
ir |
Infrared video frame |
convertRealsensePointsToPointCloud()
template<typename PointT , typename Functor >
pcl::PointCloud<PointT>::Ptr pcl::RealSense2Grabber::convertRealsensePointsToPointCloud | ( | const rs2::points & |
points, | | |
Functor |
mapColorFunc | | ) | |
| | protected |
template function to convert realsense point cloud to PCL point cloud
- Parameters
-
[in] |
points |
- realsense point cloud array |
[in] |
mapColorFunc |
dynamic function to convert individual point color or intensity values |
convertRGBADepthToPointXYZRGBA()
Convert an rgb Depth image to a pcl::PointCloud<pcl::PointXYZRGBA>
- Parameters
-
[in] |
points |
the depth points |
[in] |
rgb |
rgb video frame |
convertRGBDepthToPointXYZRGB()
Convert an rgb Depth image to a pcl::PointCloud<pcl::PointXYZRGB>
- Parameters
-
[in] |
points |
the depth points |
[in] |
rgb |
rgb video frame |
getFramesPerSecond()
float pcl::RealSense2Grabber::getFramesPerSecond | ( | |
) | const | | overridevirtual |
Obtain the number of frames per second (FPS).
Implements pcl::Grabber.
getName()
std::string pcl::RealSense2Grabber::getName | ( | |
) | const | | inlineoverridevirtual |
getTextureColor()
static pcl::RGB pcl::RealSense2Grabber::getTextureColor | ( | const rs2::video_frame & |
texture, | | | float |
u, | | | float |
v | | ) | |
| | staticprotected |
Retrieve RGB color from texture video frame.
- Parameters
-
[in] |
texture |
the texture |
[in] |
u |
2D coordinate |
[in] |
v |
2D coordinate |
getTextureIdx()
static size_t pcl::RealSense2Grabber::getTextureIdx | ( | const rs2::video_frame & |
texture, | | | float |
u, | | | float |
v | | ) | |
| | staticprotected |
Retrieve pixel index for UV texture coordinate.
- Parameters
-
[in] |
texture |
the texture |
[in] |
u |
2D coordinate |
[in] |
v |
2D coordinate |
getTextureIntensity()
static std::uint8_t pcl::RealSense2Grabber::getTextureIntensity | ( | const rs2::video_frame & |
texture, | | | float |
u, | | | float |
v | | ) | |
| | staticprotected |
Retrieve color intensity from texture video frame.
- Parameters
-
[in] |
texture |
the texture |
[in] |
u |
2D coordinate |
[in] |
v |
2D coordinate |
isRunning()
bool pcl::RealSense2Grabber::isRunning | ( | |
) | const | | overridevirtual |
Check if the data acquisition is still running.
Implements pcl::Grabber.
reInitialize()
void pcl::RealSense2Grabber::reInitialize | ( | |
) | | | protected |
Dynamic reinitialization.
setDeviceOptions()
void pcl::RealSense2Grabber::setDeviceOptions | ( | std::uint32_t |
width, | | | std::uint32_t |
height, | | | std::uint32_t |
fps = 30 | | ) | |
| | inline |
Set the device options.
- Parameters
-
[in] |
width |
resolution |
[in] |
height |
resolution |
[in] |
fps |
target frames per second for the device |
Definition at line 77 of file real_sense_2_grabber.h.
signalsChanged()
void pcl::RealSense2Grabber::signalsChanged | ( | |
) | | | overrideprotectedvirtual |
Handle when a signal callback has been changed.
Reimplemented from pcl::Grabber.
start()
void pcl::RealSense2Grabber::start | ( | |
) | | | overridevirtual |
stop()
void pcl::RealSense2Grabber::stop | ( | |
) | | | overridevirtual |
threadFunction()
void pcl::RealSense2Grabber::threadFunction | ( | |
) | | | protected |
device_height_
std::uint32_t pcl::RealSense2Grabber::device_height_ | | protected |
device_width_
std::uint32_t pcl::RealSense2Grabber::device_width_ | | protected |
file_name_or_serial_number_
std::string pcl::RealSense2Grabber::file_name_or_serial_number_ | | protected |
Defines either a file path to a bag file or a realsense device serial number.
Definition at line 197 of file real_sense_2_grabber.h.
fps_
float pcl::RealSense2Grabber::fps_ | | protected |
pc_
rs2::pointcloud pcl::RealSense2Grabber::pc_ | | protected |
Declare pointcloud object, for calculating pointclouds and texture mappings.
Definition at line 213 of file real_sense_2_grabber.h.
pipe_
rs2::pipeline pcl::RealSense2Grabber::pipe_ | | protected |
Declare RealSense pipeline, encapsulating the actual device and sensors.
Definition at line 215 of file real_sense_2_grabber.h.
quit_
bool pcl::RealSense2Grabber::quit_ | | protected |
repeat_playback_
bool pcl::RealSense2Grabber::repeat_playback_ | | protected |
running_
bool pcl::RealSense2Grabber::running_ | | protected |
signal_PointXYZ
signal_PointXYZI
signal_PointXYZRGB
signal_PointXYZRGBA
target_fps_
std::uint32_t pcl::RealSense2Grabber::target_fps_ | | protected |
thread_
std::thread pcl::RealSense2Grabber::thread_ | | protected |
The documentation for this class was generated from the following file: