Calculating distance from XYZ data

Zivid cameras produce 3D images in the form of a matrix with 1200 x 1920 x 7 elements. The last dimension has 7 values: X, Y, Z, Quality, R, G and B.

PointCloudArray

From Zivid studio you can choose to save them either as ZDF files or PLY. ZDF is based on NetCDF4, which is a standard format for scientific data and ZDF files can be loaded into e.g. Python or MATLAB. Read more on available file formats here.

If you want to calculate only the distance and not X, Y, Z, you can calculate it as d = sqrt(x^2+y^2+z^2)

If you are using the API, you can loop over the point cloud and save the X, Y, Z, Quality and RGB data in whichever format you prefer.

In Zivid Studio you have the option of saving the point cloud in various formats (ZDF, ASCII, PLY Unordered, PLY Ordered or PCD).