leggedrobotics / raw_image_pipeline

Image processing pipeline for cameras that provide raw data
MIT License
31 stars 8 forks source link

Fix the undistortion module in python binder #10

Closed YifuTao closed 1 year ago

YifuTao commented 1 year ago

This pull fix the Python binder

  1. fix the correspondence: set_undistortion_camera_matrix was envoking the wrong functions, and set_undistortion_rectification_matrix is missed
  2. include <pybind11/stl.h> to fix issue when using set_undistortion_camera_matrix since std::vector is used here
  3. remove duplicated image_heights
YifuTao commented 1 year ago

second fix by 07c6a3d: run init in setter so that undistortion_maps are updated with the new undistortion parameters

Here I am comparing the results with and without the fix. Before the fix, it's using the default undistortion camera matrix, distortion coeffs and projection matrix for frontier 19 FSC pilot data (whose intrinsics are different). image

mmattamala commented 1 year ago

I tested locally and all good. Merging now!