11 #include <geometry_msgs/TransformStamped.h>
12 #include <opencv2/core.hpp>
13 #include <opencv2/highgui.hpp>
14 #include <opencv2/imgcodecs.hpp>
16 #include <boost/chrono.hpp>
18 #ifdef ENABLE_OPENMP_OPTIMIZATION
33 bool all_callbacks_recvd =
true;
37 all_callbacks_recvd =
false;
44 all_callbacks_recvd =
false;
49 if (all_callbacks_recvd)
63 if (new_output_node ==
nullptr)
67 ROS_INFO(
"adi_3dtof_image_stitching::Running loop");
70 float* out_xyz_frame = new_output_node->
xyz_frame_;
71 unsigned short* out_depth_frame = new_output_node->
depth_frame_;
72 unsigned short* out_ir_frame = new_output_node->
ir_frame_;
76 #ifdef ENABLE_GPU_OPTIMIZATION
77 stitch_frames_core_GPU_->stitchFrames(image_stitch_input_info,
num_sensors_, out_xyz_frame, out_depth_frame,
78 out_ir_frame, out_lut_3d_to_2d_mapping);
81 out_ir_frame, out_lut_3d_to_2d_mapping );
85 if (new_output_node !=
nullptr)
95 delete image_stitch_input_info;
111 #ifdef ENABLE_OPENMP_OPTIMIZATION
112 #pragma omp parallel for
116 pcl::PointXYZ point = { 0, 0, 0 };
117 if (lut_3d_to_2d_mapping[i] != -1)
120 point.x = xyz_frame[3 * lut_3d_to_2d_mapping[i]];
121 point.y = xyz_frame[3 * lut_3d_to_2d_mapping[i] + 1];
122 point.z = xyz_frame[3 * lut_3d_to_2d_mapping[i] + 2];
124 out_pointcloud->points[i] = point;
156 if (innode ==
nullptr)
160 boost::this_thread::sleep_for(boost::chrono::milliseconds(2));
163 printf(
"\n ERROR: Exception running Boost sleep \n");