You are here: Advanced Encoding and Tools > Working with Metadata > Generating Dynamic Range Metadata

Generating Dynamic Range Metadata

To improve the appearance of MrSID images in other GIS programs, you can use GeoExpress to write dynamic range metadata for images.

For an image where the dynamic range is less than the full range of possible values for the image, you can use your GIS program to stretch the pixel values across the full range. For example, if you have a 16-bit image and the dynamic range is 11 bits, then you may want to use dynamic range stretching to improve the appearance of the image.

To calculate the dynamic range of an image, use the mrsidgeometa -gdr command or the mrsidgeoencoder -dr command.

mrsidgeometa -gdr

Use the mrsidgeometa -gdr command to add dynamic range metadata to an existing image. You can add dynamic range metadata to any MrSID or JPEG 2000 image.

mrsidgeoencoder -dr

Use the mrsidgeoencoder -dr command to create a new MrSID image with dynamic range metadata included. You can only use the command to create MrSID Generation 4 images.

Dynamic Range Generation Methods

When you generate dynamic range metadata, you must enter a dynamic range generation method.

You can enter one of the following methods for generating the dynamic range:

rgb

Calculate the minimum and maximum dynamic range values for an image with red, green, and blue bands. Select the rgb method to minimize color shifting for RGB images. When you select the rgb method, GeoExpress calculates the combined dynamic range of the red, green, and blue bands.

merge

Calculate the minimum and maximum dynamic range values for an image with multiple bands. Select the merge method to preserve the proportions of pixel values across bands. For example, if you want to compare multiple bands in a multispectral image, you may want to select the merge method. When you select the merge method, GeoExpress calculates the combined dynamic range of all bands.

per-band

Calculate the minimum and maximum dynamic range values for an image with one or more bands. Select the per-band method to calculate the dynamic range of each band individually. For example, if you have a multispectral image and you only want to view one band at a time, select the per-band method. When you select the per-band method, GeoExpress calculates the dynamic range of each band separately.

Automatic and Strict Dynamic Range

For all images except for 16-bit images with unsigned integer data, GeoExpress uses the exact dynamic range values from the dynamic range generation method that you select. For 16-bit images with unsigned integer data, GeoExpress automatically modifies the calculated dynamic range values to minimize color shifting.

The modified or automatic dynamic range sets the maximum dynamic range value to the estimated bit-depth and sets the minimum dynamic range value to zero.The estimated bit-depth is the next whole number of bits that contains the calculated maximum value in the image. For example, if the maximum value in the image is 3950, GeoExpress estimates that the image was taken with a 12-bit camera and sets the maximum value to 4095. Because GeoExpress sets a wider dynamic range for the image, you can minimize color shifting when you display the image.

For 16-bit images with unsigned integer data, you can force GeoExpress to use the exact dynamic range values calculated by GeoExpress rather than the modified dynamic range values. To use the exact dynamic range values calculated by GeoExpress, append -strict to the dynamic range generation method that you select. For example, you might change the dynamic range generation method to merge-strict

Examples:

mrsidgeometa -f 4band.sid -gdr rgb-strict
mrsidgeoencoder -i 4band.sid -o 4band_out.sid -dr rgb