You are here: Image Manipulation > The Area of Interest Tool > JPEG 2000 Area of Interest Encoding

JPEG 2000 Area of Interest Encoding

GeoExpress offers three methods, the weight, shift and mask methods, for encoding an area of interest (AOI) with JPEG 2000 (JP2) as the output format. Also, the weight and shift methods can favor the “inner” or “outer” area (for more information see Inner and Outer Areas).

Methods

The Weight Method

In JPEG 2000 encoding the weight value controls the image quality of the foreground relative to the background or vice versa: larger values will result in a higher quality foreground and a lower quality background, and smaller values will result in less of a marked difference. (Note: a value of 1.0 will have essentially no AOI weighting effect.)

Using the Weight Method

  1. Click the Area of Interest button on the toolbar (or select Area of Interest… from the Tools menu) to access the Area of Interest dialog box.
  2. Define an area of interest by one of the following methods (for more information see Defining Areas of Interest):
  3. Select Weight Inner or Weight Outer.

    The Value field appears with the default value of 100.

  4. Change the default value if desired.
  5. If desired, choose a number of resolution levels to be included in the AOI process from the drop-down list. The default is all levels, but you may choose any number equal to or less than the number of resolution levels the image includes (see Zoom Options). For example, if the image is being encoded to have five resolution levels, then you may choose five or less and the default would be all five levels.
  6. Click OK.

When using the Weight method, the actual boundaries of the region are defined by the extents of the codeblocks within each resolution level. Because the spatial extent of the codeblocks varies by level, the actual encoded region may appear larger than the selected region, and a step-like fall-off in quality may be noticeable.

The Shift Method

The shift method is an alternative way to express the encoding of an area of interest when JP2 is selected as the output format. Rather than affecting the amount of quality in a codeblock at encode time, the shift mode adjusts the “importance” of individual pixels by the specified shift amount. In other words, this function promotes the importance (or sharpness) of the data inside or outside the area of interest (see Inner and Outer Areas). The shift value to be specified is the number of bit positions to “promote” the foreground region over and above the background. For 8-bit samples, an appropriate scaling factor would be 12. Images to be encoded with large bit-depths and/or a large number of levels may, under certain conditions, require a higher value.

Using the Shift Method

  1. Click the Area of Interest button on the toolbar (or select Area of Interest… from the Tools menu) to access the Area of Interest dialog box.
  2. Define an area of interest by one of the following methods (for more information see Defining Areas of Interest):
  3. Select Shift Inner or Shift Outer.

    The Value field appears.

  4. Enter a shift value.
  5. If desired, choose a number of resolution levels to be included in the AOI process from the drop-down list. The default is all levels, but you may choose any number equal to or less than the number of resolution levels the image includes (see Zoom Options). For example, if the image is being encoded to have five resolution levels, then you may choose five or less and the default would be all five levels.
  6. Click OK.

The differences between the two methods are subtle and technical; we recommend that the weight method be used unless large quality differences are desired. While the shift method does not suffer the stepping effects of the weight method, it affords less granularity of control between foreground and background. The weight method is enabled by default.

Although with practice and experimentation the shift mode can be used to completely mask out a desired region, its purpose is “obscuring” areas of an image rather than masking them out. It is recommended that you use the Mask method if you wish to achieve a masking effect (for more information see The Mask Method).

The Mask Method

The mask method in JPEG 2000 is the same as in MrSID area of interest encoding. See The Mask Method.

Number of AOI Levels

This parameter controls the number of resolutions levels subject to the area of interest encoder process in the shift and weight methods; this can be used to alleviate the “stepping” effect mentioned above. When “Number of AOI Levels” is set to less than the total number of levels in the image, the lower-resolution levels will not undergo AOI processing; in this way, only the N highest resolutions are affected, so the icon image (and potentially other lower-resolutions) will appear as if no AOI had been selected.

For information on viewing the results of encoded areas of interest, see Reading the Log File.

Notes on AOI Encoding and JPEG 2000

When using the weight method for area of interest encoding with JPEG 2000, it is recommended that you use a smaller codeblock size, such as width = 32, height = 32. This parameter can be set on the Format-Specific tab of the Advanced Job Options dialog box.

The overall compression ratio chosen for the encode job can be as important to the appearance of the region as the actual weight or shift values chosen. The image quality at a given compression ratio may diverge dramatically from expected results when AOI encoding is enabled. Getting the desired effect in JPEG 2000 area of interest encoding may require a trial and revision process.