image condenseImages

High-Precision Sensor Calibration with Specific Bit Depth

Scénario de test & Cas d'usage

Business Context

A manufacturer of high-end optical sensors needs to verify the bit-depth integrity of their output. They are testing a new line of sensors that output raw data intended for 32-bit depth processing. The test aims to ensure the 'condenseImages' action allows explicit control over the output depth and variable copying for traceability.
About the Set : image

Image processing, manipulation, and analysis.

Discover all actions of image
Data Preparation

Simulation of a single high-precision sensor reading (2x2 matrix). We also include a 'batch_code' variable to test the copyVars functionality.

Copied!
1DATA sensor_calib;
2 LENGTH batch_code $10;
3 batch_code = 'BATCH_X99';
4 DO i = 1 to 4;
5 raw_signal = 123456; /* Large integer for higher bit depth context */
6 OUTPUT;
7 END;
8RUN;
9 
10PROC CASUTIL;
11 load DATA=sensor_calib outcaslib='casuser' casout='sensor_data' replace;
12RUN;

Étapes de réalisation

1
Run condenseImages requesting a specific depth of 'BIT32' and copying the 'batch_code'.
Copied!
1PROC CAS;
2 image.condenseImages /
3 TABLE={caslib='casuser', name='sensor_data'},
4 width=2,
5 height=2,
6 numberOfChannels=1,
7 depth='BIT32',
8 inputs={{name='raw_signal'}},
9 copyVars={'batch_code'},
10 casOut={caslib='casuser', name='sensor_image_32bit', replace=true};
11RUN;

Expected Result


The resulting 'sensor_image_32bit' table must contain one image row. The 'batch_code' column should appear with the value 'BATCH_X99'. The binary image data should reflect a 32-bit depth encoding as requested.