GeoExpress calculates the resultant image filesize as part of the encoding process, taking into account the user-defined compression ratios for inside and outside the Area of Interest. Selecting the Weight option allows you to specify Lossless compression or to set a target Compression Ratio for the Area of Interest. (The outside area will be encoded at the compression ratio specified in the job options.)
As an example, consider a 1-band (grayscale), 8-bit input image measuring 1000 × 1000 pixels. The user specifies compression for this image at 100:1. An Area of Interest measuring 100 × 100 pixels is then defined within the image, and the compression ratio inside the Area of Interest is set at 10:1.
Based on these dimensions and specifications, GeoExpress makes the following calculations:
AOI compression ratio (CRAOI) = 10
Base compression ratio for the image (CRother) = 100
Area of the entire image (Areatotal) is 1000 × 1000 pixels = 1,000,000 pixels
Area of the AOI (AreaAOI) is 100 × 100 pixels = 10,000 pixels
Area of the portion of the image surrounding the AOI (Areaother) is 1,000,000 pixels - 10,000 pixels = 990,000 pixels
GeoExpress then makes the following filesize calculations:
Filesize of the AOI (FSAOI) = AreaAOI / CRAOI = 10,000 / 10 = 1000 bytes
Filesize of the “outside” (FSother) = Areaother / CRother = 990,000 / 100 = 9900 bytes
Total filesize (FStotal) = FSAOI + FSother = 1000 + 9900 = 10,900 bytes
GeoExpress then calculates the overall compression ratio:
Compression ratio = Areatotal / FStotal = 1,000,000 / 10,900 = 91.73
In order to calculate the overall target filesize for the encode process the compression ratio for the overall image is set to 91.73. The target filesize thus becomes:
1,000,000 / 91.73 = 10,901 bytes
The filesize of the output is reported in the Creating and viewing logs.