How to give camera calibration file to pylon_camera_node
I have been using pylon camera with ROS wrapper for Pylon camera, when I launch the camera node it gives a warning like :
Camera not calibrated
Now after this, I tried to calibrate the camera, but camera_calibration did not work with the chess board arrangements.
Is there some other way around for getting a calibration file, if someone could share this file, It will be a great help.
update :
I now have a calibration file but now I am stuck with how to connect it to default.launch in the pylon_camera package.
output : [ INFO] [1547464209.748992565]: CameraInfoURL needed for rectification! ROS-Param: '/pylon_camera_node/camera_info_url' = 'file://$(find pylon_camera)/config/ost.yaml' is invalid!
below is the .yaml calibration file :
image_width: 4024
image_height: 3036
camera_name: pylon_camera
camera_matrix:
rows: 3
cols: 3
data: [9504.116474, 0.000000, 1931.294425, 0.000000, 9545.602763, 1286.856136, 0.000000, 0.000000, 1.000000]
distortion_model: plumb_bob
distortion_coefficients:
rows: 1
cols: 5
data: [0.050703, 1.882744, -0.018441, 0.009456, 0.000000]
rectification_matrix:
rows: 3
cols: 3
data: [1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000]
projection_matrix:
rows: 3
cols: 4
data: [9649.875977, 0.000000, 1945.998948, 0.000000, 0.000000, 9690.111328, 1269.925242, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000]
I am not able to load this file with the pylon camera node, help me with this.
Camera calibration parameters are specific to a single camera, they are very sensitive to manufacturing differences. Different cameras of exactly the same model will be similar but not close enough for machine vision. I think you need to work on the camera_calibration some more, this does work.
I tried to work with camera_calibration but the chess board does not calibrate, i mean the calibration node opens but nothing like normal calibration happens.
Okay, what you have just described is the problem we need to fix. Can you describe the type (size and number of squares) of calibration target you're using. Does it have a white border? what happens when you show it to the camera?
Currently the camera is in a fixed setup, this is relevant because when chess board is kept under the camera, the board is not that far from the camera. Because of this camera can not see anything else but the board, board covers all of the camera. when running the camera node, nothing happens.
That sounds like the problem. the camera_calibration node needs to see the border of the chess board pattern to determine the orientation of the board. It sounds like you will have to either remove the camera from the setup to calibrate it or print a very small chess board.
okay, I got my camera to calibrate, how do I connect this file to the launch file.
Can you post the contents of the YAML file
yes, I have done the updating. And you were just right about the problem and it solved my first issue. Thank you for this. Now I am not able to load this file with pylon node.