zivid / zivid-python

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

Zivid.PointCloud.transform(numpy.array([4,4], dtype=numpy.float32)) #208

Open MysteryNull opened 1 year ago

MysteryNull commented 1 year ago

Could you please tell me about the source code of the function "Zivid.PointCloud.transform(numpy.array([4,4], dtype=numpy.float32))"? Thank you!

eskaur commented 1 year ago

Hi!

It transforms the PointCloud by matrix-multiplying the 4x4 matrix by each point represented as a 4-vector [x0,y0,z0,1] which yields new points [x1,y1,z1,1]. The transformation matrix should be an affine transform representing only Rotation+Translation.

Some sources for you: https://support.zivid.com/en/latest/academy/applications/transform.html https://en.wikipedia.org/wiki/Transformation_matrix#Affine_transformations https://en.wikipedia.org/wiki/Affine_transformation