102 std::vector<rs::device *> detected_devices;
106 std::string serial_no = device->get_serial();
110 detected_devices.push_back(device);
117 "RealSense Camera - Multiple cameras detected (%d) but "
118 "no input serial number specified. Exiting!",
125 "RealSense Camera - No camera detected with input "
126 "serial_no \"%s\" Exiting!",
136 std::cout <<
"RealSense Camera - Connecting to camera with Serial No: " <<
m_serial_no << std::endl;
140 ?
m_device->supports(rs::capabilities::infrared2)
147 for (
int j = 0; j < 4; j++) {
148 auto s = (rs::stream)j;
149 auto capabilities = (rs::capabilities)j;
201 for (
int i = 0; i < 4; ++i) {
202 auto stream = rs::stream(i);
203 if (!
m_device->is_stream_enabled(stream))
205 auto intrin =
m_device->get_stream_intrinsics(stream);
212 m_intrinsics[rs::stream::rectified_color] =
m_device->get_stream_intrinsics(rs::stream::rectified_color);
216 m_device->get_stream_intrinsics(rs::stream::color_aligned_to_depth);
218 m_device->get_stream_intrinsics(rs::stream::depth_aligned_to_color);
219 m_intrinsics[rs::stream::depth_aligned_to_rectified_color] =
220 m_device->get_stream_intrinsics(rs::stream::depth_aligned_to_rectified_color);
226 m_device->get_stream_intrinsics(rs::stream::depth_aligned_to_infrared2);
228 m_device->get_stream_intrinsics(rs::stream::infrared2_aligned_to_depth);
563 std::vector<vpColVector> *
const data_pointCloud,
unsigned char *
const data_infrared,
564 unsigned char *
const data_infrared2,
const rs::stream &stream_color,
565 const rs::stream &stream_depth,
const rs::stream &stream_infrared,
566 const rs::stream &stream_infrared2)
578 if (data_image != NULL) {
579 vp_rs_get_native_frame_data_impl(
m_device,
m_intrinsics, rs::stream::color, data_image, stream_color);
582 if (data_depth != NULL) {
583 vp_rs_get_native_frame_data_impl(
m_device,
m_intrinsics, rs::stream::depth, data_depth, stream_depth);
585 if (data_pointCloud != NULL) {
590 if (data_infrared != NULL) {
591 vp_rs_get_native_frame_data_impl(
m_device,
m_intrinsics, rs::stream::infrared, data_infrared, stream_infrared);
594 if (data_infrared2 != NULL) {
595 vp_rs_get_native_frame_data_impl(
m_device,
m_intrinsics, rs::stream::infrared2, data_infrared2, stream_infrared2);
901 std::vector<vpColVector> *
const data_pointCloud,
902 pcl::PointCloud<pcl::PointXYZ>::Ptr &pointcloud,
unsigned char *
const data_infrared,
903 unsigned char *
const data_infrared2,
const rs::stream &stream_color,
904 const rs::stream &stream_depth,
const rs::stream &stream_infrared,
905 const rs::stream &stream_infrared2)
917 if (data_image != NULL) {
918 vp_rs_get_native_frame_data_impl(
m_device,
m_intrinsics, rs::stream::color, data_image, stream_color);
921 if (data_depth != NULL) {
922 vp_rs_get_native_frame_data_impl(
m_device,
m_intrinsics, rs::stream::depth, data_depth, stream_depth);
925 if (data_pointCloud != NULL) {
929 if (pointcloud != NULL) {
933 if (data_infrared != NULL) {
934 vp_rs_get_native_frame_data_impl(
m_device,
m_intrinsics, rs::stream::infrared, data_infrared, stream_infrared);
937 if (data_infrared2 != NULL) {
938 vp_rs_get_native_frame_data_impl(
m_device,
m_intrinsics, rs::stream::infrared2, data_infrared2, stream_infrared2);
961 std::vector<vpColVector> *
const data_pointCloud,
962 pcl::PointCloud<pcl::PointXYZRGB>::Ptr &pointcloud,
unsigned char *
const data_infrared,
963 unsigned char *
const data_infrared2,
const rs::stream &stream_color,
964 const rs::stream &stream_depth,
const rs::stream &stream_infrared,
965 const rs::stream &stream_infrared2)
977 if (data_image != NULL) {
978 vp_rs_get_native_frame_data_impl(
m_device,
m_intrinsics, rs::stream::color, data_image, stream_color);
981 if (data_depth != NULL) {
982 vp_rs_get_native_frame_data_impl(
m_device,
m_intrinsics, rs::stream::depth, data_depth, stream_depth);
985 if (data_pointCloud != NULL) {
989 if (pointcloud != NULL) {
994 if (data_infrared != NULL) {
995 vp_rs_get_native_frame_data_impl(
m_device,
m_intrinsics, rs::stream::infrared, data_infrared, stream_infrared);
998 if (data_infrared2 != NULL) {
999 vp_rs_get_native_frame_data_impl(
m_device,
m_intrinsics, rs::stream::infrared2, data_infrared2, stream_infrared2);
1026 os <<
"Device name: " << rs.
getHandler()->get_name() << std::endl;
1027 std::streamsize ss = std::cout.precision();
1028 for (
int i = 0; i < 4; ++i) {
1029 auto stream = rs::stream(i);
1030 if (!rs.
getHandler()->is_stream_enabled(stream))
1032 auto intrin = rs.
getHandler()->get_stream_intrinsics(stream);
1033 std::cout <<
"Capturing " << stream <<
" at " << intrin.width <<
" x " << intrin.height;
1034 std::cout << std::setprecision(1) << std::fixed <<
", fov = " << intrin.hfov() <<
" x " << intrin.vfov()
1035 <<
", distortion = " << intrin.model() << std::endl;
1037 std::cout.precision(ss);