Closed pbermell closed 4 years ago
Hi @pbermell,
Looks like you tried frame.save('new_ply_shot.ply')
, which is what we do in convert_zdf.py. First of all I'm curious why you get an empty output. If you can share your shot_20190828-135107.zdf
then I can try it on my PC.
Then it looks like you've reverted to the method of zdf_2_ply_without_zivid.py (which we actually plan to deprecate). You're missing a few steps however. Most importantly, in the .zdf we have a 7th value in the point cloud (Contrast, in addition to XYZ and RGB). The .ply should not have that, so you have to deal with that somehow. Maybe it's sufficient to change indexing to:
point_cloud[i, 2],
# Contrast is located at point_cloud[i, 3]
np.uint8(point_cloud[i, 4]),
np.uint8(point_cloud[i, 5]),
np.uint8(point_cloud[i, 6]),
However, I'd rather recommend you fully use zdf_2_ply_without_zivid.py.
hi @torbsorb
shot_20190828-135107.zdf
is a 20 Mb file and it can be opened using zivid studio.
if you have a place where to upload the file I can do it.
on the other hand, the content of the empty file looks like this:f
ply
format binary_little_endian 1.0
comment Zivid Point Cloud
element vertex
Indeed I had tried to play with the indexing before as you recommended but I get the same error.
any further ideas?
pablo
Did you try zdf_2_ply_without_zivid.py?
Can you share your files with https://wetransfer.com/?
It all works now using zdf_2_ply_without_zivid.py thanks and sorry to waste your time.
Glad we could help! Please send you capture (if you can) so that we can investigate why frame.save
didn't work.
Hello, I am having trouble in creating a ply file from a zdf file.
this is my code:
and this is the output: