When I try to read sensor data which combine RGB image and depth image, It encounter errors.
I intend to generate sensor data from CameraRGBDImages. In this case, Any way Can I calibrate the camera firstly?
one more question:
what is the limitation to RGB image and depth image? It should be png format not jpg format?
Thanks in advance.
camera = new rtabmap::CameraRGBDImages("rgb_png","depth_png");
printf("The camera is not calibrated! You should calibrate the camera first.\n");
printf("Failed to initialize the camera! Please select another driver (see \"--help\").\n");
In the camera->init(), you can set the path to a calibration file (the format is calibration folder and calibration name). For example, if you have this a file named "kinect.yaml" in the same directory as your executable:
The camera.yaml file is calibration file. For a simple example, for a Kinect camera (focal fx/fy~=525, cx=319.5, cy=239.5), this would look like this:
Note that this file can be generated from Preferences->Source->"Simple calibration" button. CameraRGBDImages assumes also that the RGB and depth images are already rectified and registered together (it ignores distortion/rectification coefficients).
The RGB image can be JPG, BMP or PNG (common image formats). The depth image should be compressed (or not) with lossless format (PNG) encoded unsigned 16 bits mono (values are in mm).