zivid / zivid-python

Official Python package for Zivid 3D cameras
BSD 3-Clause "New" or "Revised" License
43 stars 14 forks source link

Expose Zivid::Matrix4x4 to the Python bindings #186

Closed Ayxan13 closed 2 years ago

Ayxan13 commented 2 years ago

The Matrix4x4 API is largely similar to that of the native C++ version. But the Matrix4x4 objects are convertible to and from numpy.ndarray:

matrix = zivid.Matrix4x4(...)
numpy_array = numpy.array(matrix)
matrix = zivid.Matrix4x4(numpy_array)

All our API functions that work with numpy arrays also work with zivid.Matrix4x4. In addition, all numpy functions that expect numpy.ndarray of float32[4, 4] also work with zivid.Matrix4x4.

eskaur commented 2 years ago

Regarding the commit message: