ros-drivers/freenect_stack

Format of calibration files

Closed this issue · 4 comments

I did load an calibration file into the directory the stack told me before:
[ WARN] [1454769411.254247332]: Camera calibration file /home/baum/.ros/camera_info/depth_A70774V01752221A.yaml not found.
But it does not load it on startup. Does anyone have a format template for this? I tried it with the sample from RGBDemo: (changed the ending to .txt to make it preview )
https://drive.google.com/file/d/0B_MzoTKF7WAiT0toVGFRLUNsYms/view?usp=sharing

That message comes from the camera_info_manager library, but the YAML file format is defined in the camera_calibration_parsers documentation.

I presume that the /home/baum/.ros/camera_info/depth_A70774V01752221A.yaml file does actually exist, and the root problem is with its contents. That error message is annoying and misleading. Unfortunately, the readCalibration() interface to camera_calibration_parsers only returns a bool for success or failure. In your case, it should also have issued an ERROR message: "Failed to parse camera calibration from file [%s]". Did you see that?

I think were going the right direction. I copy/pasted the yaml-values from camera_calibration

Now it says:
EDIT pending....

The Prosilica camera in that example is probably not exactly what you want.

You might try editing your original example calibration to follow the YAML format of the Prosilica example.

Most Kinect cameras seem to work reasonably well with no calibration provided. Are you seeing image artifacts that need rectification?

I guess I nailed it, I had to change the camera name to what the program was suggesting
[ WARN] [1454853568.797739941]: [depth_A70774V01752221A] does not match name A70774V01752221A in file /home/baum/.ros/camera_info/depth_A70774V01752221A.yaml
So the yaml finally looks like:


image_width: 2448
image_height: 2050
camera_name: depth_A70774V01752221A
camera_matrix:
rows: 3
cols: 3
data: [4827.94, 0, 1223.5, 0, 4835.62, 1024.5, 0, 0, 1]
distortion_model: plumb_bob
distortion_coefficients:
rows: 1
cols: 5
data: [-0.41527, 0.31874, -0.00197, 0.00071, 0]
rectification_matrix:
rows: 3
cols: 3
data: [1, 0, 0, 0, 1, 0, 0, 0, 1]
projection_matrix:
rows: 3
cols: 4
data: [4827.94, 0, 1223.5, 0, 0, 4835.62, 1024.5, 0, 0, 0, 1, 0]

I noticed heavy load on the CPU. I do use depth information only and do not see problematic artefacts. I will smooth the matrix with normal-box filter from opencv anyway. Thanks Jack for not letting me in the dark