Supported by...


Only supported on some PL-D and PL-X cameras


Description


Enabling this feature for a given pixel format, will enable the camera to output compressed images, using the specified compression scheme, when streaming that particular pixel format. Note that the images received from the camera are de-compressed by the Pixelink host software, so that images received from the API (via either PxLGetNextCompressedFrame, or a Frame Callback) will still appear uncompressed in the expected pixel format.


API Control


PxLGetFeature, PxLSetFeature


FeatureNum ParamsParametersUnitsRestrictions

FEATURE_COMPRESSION

2

fPixelFormat

N/A

Integer only (see Pixel Format)

fCompressionStrategy

N/A

Integer only (see Parameter Compression Strategy below)


Feature Flags


CameraPresenceRead OnlyAutoManualOne-time AutoOffSettable While StreamingPersistableCiD
Only on some PL-D, PL-U, PL-X CamerasYesNoNoYesNoYesNoYesNo


Paramerter Compression Strategy


See the PixeLINKTypes.h file for more detailed information.


NameValueMeaningRestrictions
None0Compression is disabled for the specified pixel formatNone
Pixelink101This is a proprietary lossless compression strategy that achieves a 2:1 compression ratio for a wide variety of images. Much higher compression ratios can be achieved for images whose dynamic range is more limited, whereby the histogram of these images appear 'peaky'.
See Note below for more information.
  • Can only be applied to MONO8 and BAYER8 type pixel formats
  • The effective ROI size (width x height, after reduction of Pixel Addressing have been applied) must be a multiple of 256.
  • The effective ROI height must be a multiple of 8.


Notes:


Pixelink10 compression strategy:


As per above, Pixelink10 is a Pixelink created lossless compression scheme that can be applied to either MONO8 or BAYER8 type pixel formats. While enabled, all images are compressed within the camera and transmitted to the host. The Pixelink API can then decompress the images. This decompression can be done as the frames arrive from the camera and prior to delivery to the application (via either PxLGetNextFrame or a CALLBACK_FRAME type callback), or at a later time via the PxLDecompressFrame function if the application had chosen to receive the compressed frame from the API (via PxLGetNextCompressedFrame or a CALLBACK_COMPRESSED_FRAME type callback). The compression ratio achieved is image dependant, but ratios between 2:1 and 5:1 are common.


The Pixelink host software uses highly tuned decompression algorithms to minimize the impact to user applications. For instance, typical 5 MPixel MONO8 images can be compressed in less than 7 ms*. However, this algorithm uses AVX2 instruction extensions so decompression can only be done on computers using Intel processors (or equivalent) utilizing Haswell architecture or newer. Enabling compression from a computer with an incompatible processor type, will return a warning (ApiCompressionNotPossibleWarning). Attempting to stream compressed images from this same computer, will return an error (ApiDecompressionNotPossibleError).


If compression is being applied, some camera models will permit the user to increase the camera’s frame rate beyond the link throughput limit for uncompressed images. However, in the unusual circumstance whereby the images achieve poor compression ratios, increasing the frame rate in these circumstances could lead to frame loss.


*Tested using a single thread on a 2.8 GHz i7 system