1 #ifndef RGBD_TEST_UTILS_H_ 
    2 #define RGBD_TEST_UTILS_H_ 
    4 #include <opencv2/core.hpp> 
    8 #include <image_geometry/pinhole_camera_model.h> 
    9 #include <sensor_msgs/CameraInfo.h> 
   10 #include <sensor_msgs/distortion_models.h> 
   23     for (
char& dis: rand_str)
 
   24         dis = distribution(generator);
 
   40     cv::Mat depth_image(480, 640, CV_32FC1);
 
   41     cv::randu(depth_image, 0., 100.);
 
   42     sensor_msgs::CameraInfo cam_info;
 
   43     cam_info.D.resize(5, 0.0);
 
   44     cam_info.K = {554.2559327880068, 0.0, 320.5,
 
   45                   0.0, 554.2559327880068, 240.5,
 
   51     cam_info.P = {554.2559327880068, 0.0, 320.5, 0.0,
 
   52                   0.0, 554.2559327880068, 240.5, 0.0,
 
   54     cam_info.distortion_model = sensor_msgs::distortion_models::PLUMB_BOB;
 
   56     cam_info.height = 480;
 
   57     image_geometry::PinholeCameraModel cam_model;
 
   58     cam_model.fromCameraInfo(cam_info);
 
   65 #endif // RGBD_TEST_UTILS_H_