Saving a Pixel Container File¶
Images and depth maps¶
Use the method
EBaseROI::Save.NET Python of an image or the methodEFourierImage::SaveImage.NET Python of a depth map or a ZMap to save image data of the object into a file.The argument
Pathincludes the path, file name and file name extension.The argument
Image File Typecan be omitted. In this case, the file name extension is used.
EBaseROI::Save.NET Python throws an exception when:The requested image file format is incompatible with the pixel type of the image object.
The file name extension is not supported while using the
Autofile type selection method.
Note
When saving a 16-bit depth map, the fixed point precision is lost and the pixels are considered as 16-bit integers.
Tip
The images with a width or a height larger than 65,536 must be saved in eVision proprietary format.
Image File Type arguments¶
Argument |
Image file type |
|---|---|
(Default) Automatically determined by the file name extension. See below. |
|
eVision Serialization |
|
Windows bitmap - BMP |
|
JPEG File Interchange Format - JFIF |
|
JPEG 2000 File format / Code Stream - JPEG2000 |
|
Portable Network Graphics - PNG |
|
Tagged Image File Format - TIFF |
If the argument is EImageFileType_Auto .NET Python or is missing, the assigned image file type is:
File name extension (case-insensitive) |
Assigned image file type |
|---|---|
|
Windows Bitmap format |
|
JPEG File Interchange Format - JFIF |
|
JPEG 2000 file format |
|
JPEG 2000 Code Stream |
|
Portable Network Graphics |
|
Tagged Image File Format |
Saving JPEG and JPEG2000 lossy compressions¶
EBaseROI::SaveJpeg .NET Python and EBaseROI::SaveJpeg2K .NET Python specify the compression quality when saving (EBaseROI::Save .NET Python) compressed images. They have two arguments:
Path: a string of characters including the path, filename, and file name extension.
Compression quality of the image file, an integer value in range [0: 100].
EBaseROI::SaveJpeg.NET Python saves image data using JPEG File Interchange Format – JFIF.
EBaseROI::SaveJpeg2K.NET Python saves image data using JPEG 2000 File format.
JPEG compression values¶
JPEG compression |
Description |
|---|---|
JPEG_DEFAULT_QUALITY (-1) |
Default quality (*) |
100 |
Superb image quality, lowest compression factor |
75 |
Good image quality (*) |
50 |
Normal image quality |
25 |
Average image quality |
10 |
Bad Image quality |
(*) The default quality corresponds to the good image quality (75).
Representative JPEG 2000 compression quality values¶
JPEG 2000 compression |
Description |
|---|---|
-1 |
Default quality (*) |
1 |
Highest image quality, lowest compression factor |
16 |
Good Image Quality (*) (16:1 rate) |
512 |
Lowest image quality, highest compression factor |
(*) The default quality corresponds to the good image quality (16:1 rate).
Saving point clouds¶
Use the following methods to save a point cloud in a specific format:
EPointCloud::Save.NET Python: eVision proprietary file format.EPointCloud::SaveCSV.NET Python: CSV file.EPointCloud::SaveOBJ.NET Python: OBJ file.EPointCloud::SavePCD.NET Python: PCD file.EPointCloud::SavePLY.NET Python: PLY file.EPointCloud::SaveXYZ.NET Python: XYZ file.
Tip
The PCD and PLY formats are supported in ASCII and binary modes.
The PCD format is also supported in binary compressed mode.