You are here: Appendix A - Technical Information > Calculating MG3 Area of Interest Weight

Calculating MrSID Area of Interest Weight

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 radio button enables you to specify an encode ratio for the area of interest or select the Lossless check box. 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 x 1000 pixels. The user specifies compression for this image at 100:1. An area of interest measuring 100 x 100 pixels is then defined within the image, and the compression ratio inside the area of interest is set at 10:1.

Figure: MG3 Area of Interest Weight Calculation

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 x 1000 pixels = 1,000,000 pixels

Area of the AOI (AreaAOI) is 100 x 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

NOTE: This calculated filesize appears on the Properties panel for the image once you close the Area of Interest dialog box. The actual output is reported in the GeoExpress log file on the Output tab of the Properties panel.