Save the frame to file
Namespace:
Zivid.NET
Assembly:
ZividCoreNET (in ZividCoreNET.dll) Version: 2.16.0.0
Syntaxpublic void Save(
string fileName
)
Public Sub Save (
fileName As String
)
public:
void Save(
String^ fileName
)
Parameters
- fileName
- Type: SystemString
File name to save the frame to
Remarks
The file type is determined from the file extension. Supported extensions are .zdf, .ply
(ordered), .xyz and .pcd.
If the capture is still in-progress, then this method will block until the capture
completes.
This method will copy the necessary point cloud data from the compute device (GPU)
memory into host memory (RAM), unless that data has already been copied to host memory
by an earlier function call.
This method saves the RGB colors in linear color space for .ply, .xyz and .pcd file
formats. This method does not save the normal data in the .ply and .pcd file formats.
The points saved in .ply format will contain NaN (invalid) values. For .pcd format, the
saved file will contain a header that indicates an unorganized point cloud. However the
points will contain NaN (invalid) values as well. Since SDK 2.5, it is possible to
export PCD with correct header (organized) by setting
Configuration/APIBreakingBugFixes/FileFormats/PCD/UseOrganizedFormat in Config.yml file.
See
https://support.zivid.com/en/latest/reference-articles/point-cloud-structure-and-output-formats.html#organized-pcd-format
It is recommended to use `ExportFrame` methods to save point cloud to different file
formats. `ExportFrame` methods allow customization of the color space of RGB values
(linear or sRGB), controlling the layout of the points (organized or unorganized) and
saving normal data in the .ply and .pcd file formats. See:
Experimental::PointCloudExport::ExportFrame(Frame ^frame, Experimental::PointCloudExport::FileFormat::PLY ^specification)
Experimental::PointCloudExport::ExportFrame(Frame ^frame, Experimental::PointCloudExport::FileFormat::XYZ ^specification)
Experimental::PointCloudExport::ExportFrame(Frame ^frame, Experimental::PointCloudExport::FileFormat::PCD ^specification)
See Also