ansys / optical-automation

Optical Automation Framework
https://ansys-internal.github.io/optical-automation/
MIT License
29 stars 11 forks source link

new example: create optdistortion from camera checkerboard calibration images #162

Closed ZachDerocher closed 5 months ago

ZachDerocher commented 7 months ago

This example supports a lab -> simulation workflow.

Camera checkerboard distortion calibration produces the camera intrinsics and extrinsics data based on a set of images of a known planar checkerboard. With this data, we can produce an optdistortion file, to allow creation of a precise replica of the camera in Speos.

This example goes through the calibration and data conversion to optdistortion format. In this example, we use openCV to perform the calibration, showing both the regular and fisheye methods. The distortion conversion to obj/im angle pairs is also performed using openCV.

Additionally, conversion of camera pose (rotation vectors) to euler angles is performed. This is a convenience, for allowing validation of the calibration output within Speos; the euler angles allow us to precisely reproduce the scene of a given calibration image, for a/b comparison.