Scan compression
Scan compression is a major new functionality brought by perClass Mira 5.0. In projects developing robust models for classification or quality estimation, large data sets need to be collected with many objects (pieces of fruit, industrial parts, or sorted products). Such data sets, collected on stage or industrial belts occupy significant amount of disk space where the majority of the scan is the stage table or belt background, not data of interest.
perClass Mira 5.0 make it possible to easily define the data of interest to be stored when saving scans to disk. This is enabled by the new Camera Scan mode, acquiring data to memory before saving to disk.
Scan compression in perClass Mira is fully lossless. This means that data is not altered, reduced, or changed in any way.
Scanning with compression is also very easy to use. Before saving the data to disk, the user can mark areas that will be preserved. Foreground definition can be automatically applied by object segmentation defined in the project. The user is always in full control deciding what exactly is saved and preserved. The scanning process is streamlined so that user can acquire large collections of high-quality samples in minimum amount of time while significantly reducing disk storage.
Example of using scan compression
In the camera scan mode, we acquire a scan. By default, when saving the scan using the Save button in the Recording panel or in the toolbar, the entire scan would be stored on disk. This is indicated by the scan size widget
in the right half of the Recording panel. Note that these controls are available only in the scan mode, not in the belt or waterfall modes.
Defining foreground mask manually
The user may paint in the scan to define the foreground content to be saved. The scan size widget will show the data size actually saved to disk in green
as a fraction of the total scan cube size, which is displayed in red.
Similarly to normal label painting, the yellow foreground mask can be removed by holding the Shift key. The size of the brush used can be adjusted by the Brush toolbar button and its transparency by the Alpha button.
Note that the compression preserving only foreground can save very significant amounts of disk space.
Compressed scans in the workspace
When a compressed scan is saved, perClass Mira switches to the Images mode as usual. The area
previously highlighted by the yellow label is fully preserved. The scan geometry is also fully preserved. However, the remaining area
is rendered in a cyan color. This part of the scan does not contain any information and cannot be used in any data analysis in perClass Mira environment.
Compressed scans on disk
When saving the data, perClass Mira stores the scan in a file with scan1.hdr header and scan1.pcz compressed file. This is naturally not a standard ENVI cube but requires perClass Mira to be read.
The following screenshot from Windows Explorer shows several scans. The scans 1 and 2 were compressed while the scan3
was not. Therefore it is stored in the standard .pcf file which is a normal ENVI cube.