ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

How to give camera calibration file to pylon_camera_node

asked 2019-01-14 02:43:49 -0500

Prof. xavier gravatar image

updated 2019-01-14 05:40:13 -0500

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.

edit retag flag offensive close merge delete

Comments

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.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2019-01-14 03:35:54 -0500 )edit

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.

Prof. xavier gravatar image Prof. xavier  ( 2019-01-14 03:44:16 -0500 )edit

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?

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2019-01-14 04:27:33 -0500 )edit

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.

Prof. xavier gravatar image Prof. xavier  ( 2019-01-14 04:36:26 -0500 )edit

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.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2019-01-14 04:51:38 -0500 )edit

okay, I got my camera to calibrate, how do I connect this file to the launch file.

Prof. xavier gravatar image Prof. xavier  ( 2019-01-14 05:03:42 -0500 )edit

Can you post the contents of the YAML file

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2019-01-14 05:36:06 -0500 )edit

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.

Prof. xavier gravatar image Prof. xavier  ( 2019-01-14 05:41:21 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-01-14 03:09:56 -0500

NEngelhard gravatar image

updated 2019-01-15 05:51:08 -0500

You should check the documentation at github/pylon_camera.

Common parameters

  • camera_info_url The CameraInfo URL (Uniform Resource Locator) where the optional intrinsic camera calibration parameters are stored. (and don't forget the file://)

The parameter has to be an absolute path (without any commands like '$(find pylon_camera)').

edit flag offensive delete link more

Comments

I knew about this parameter but I couldn't figure out which file will I have to link to this parameter.

Prof. xavier gravatar image Prof. xavier  ( 2019-01-14 03:33:46 -0500 )edit

The question is updated with the latest progress, please help me with this.

Prof. xavier gravatar image Prof. xavier  ( 2019-01-14 05:14:44 -0500 )edit

Question Tools

Stats

Asked: 2019-01-14 02:43:49 -0500

Seen: 1,614 times

Last updated: Jan 15 '19