stereolabs / zed-python-api

Python API for the ZED SDK
https://www.stereolabs.com/docs/app-development/python/install/
MIT License
209 stars 95 forks source link

sl.Matrix4f from numpy.ndarray #231

Open frigusgulo opened 10 months ago

frigusgulo commented 10 months ago

Preliminary Checks

Proposal

Add the method to sl.Matrix4f so that users can instantiate directly from a numpy.ndarray object

i.e. pose_matrix = np.eye(4) zed_mat = sl.Matrix4f().from_numpy(pose_matrix)

Use-Case

This would make building sl.Pose() and sl.Transform() objects much cleaner, particularly when using microservice architectures to send a transformation matrix that needs to be a string.

transform = sl.Transform.init_matrix(zed_mat)

Anything else?

No response