Extend-Robotics / photoneo-cpp-examples

BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

FrameCalibrationToROS tool #1

Closed bmegli closed 1 year ago

bmegli commented 1 year ago

Small tool to dump frame level calibration to ROS compatible yaml file

Typical usage

./FrameCalibrationToROS > MyCalibration.yaml`

Sample output

# Device: 0
#  Name:                    MotionCam-3D-TRD-058
#  Hardware Identification: TRD-058
#  Type:                    MotionCam-3D
#  Firmware version:        1.10.1
#  Variant:                 M+
#  IsFileCamera:            No
#  Feature-Alpha:           No
#  Feature-Color:           Yes
#  Status:                  Attached to PhoXi Control. Ready to connect

# Device: 1
#  Name:                    basic-example
#  Hardware Identification: InstalledExamples-basic-example
#  Type:                    PhoXi3DScan
#  Firmware version:        
#  Variant:                 
#  IsFileCamera:            Yes
#  Feature-Alpha:           No
#  Feature-Color:           No
#  Status:                  Not Attached to PhoXi Control. Ready to connect

# Device: 2
#  Name:                    color-example
#  Hardware Identification: InstalledExamples-color-example
#  Type:                    MotionCam-3D
#  Firmware version:        
#  Variant:                 
#  IsFileCamera:            Yes
#  Feature-Alpha:           No
#  Feature-Color:           Yes
#  Status:                  Not Attached to PhoXi Control. Ready to connect

# You have already PhoXi device opened in PhoXi Control, the API Example is connected to device: TRD-058

image_width: 1120
image_height: 800
camera_name: TRD-058
camera_matrix: 
  rows: 3
  cols: 3
  data: [1158.77, 0, 569.003, 0, 1158.7, 392.4, 0, 0, 1]
distortion_model: plumb_bob
distortion_coefficients: 
  rows: 1
  cols: 5
  data: [-0.0810895, 0.105247, 9.91814e-05, 0.00054898, 0.0366575]
rectification_matrix: 
  rows: 3
  cols: 3
  data: [1, 0, 0, 0, 1, 0, 0, 0, 1]
projection_matrix: 
  rows: 3
  cols: 4
  data: [1158.77, 0, 569.003, 0, 0, 1158.7, 392.4, 0, 0, 0, 1, 0]