During the acquisition of image data, various factors may lead to some degree of image quality degradation. The primary purpose of image stretching is to enhance display effects and improve visual quality, thereby increasing image clarity. This process helps highlight key information for human or machine analysis while suppressing irrelevant details, ultimately enhancing the practical value of image data.
Essentially, image stretching improves the discernibility of ground features by adjusting brightness and contrast.
Currently, SuperMap ImageX Pro provides multiple image stretching methods including Minimum Maximum, Percent Clip, Gaussian, Histogram Equalization, Logarithmic Stretch, and Gamma Stretching. Users can select appropriate stretch methods based on specific image characteristics and requirements to optimize display effects and enhance imagery analysis value.
Minimum Maximum
This method linearly maps pixel values from their original range to a specified new range, redistributing pixel values across the new interval.
This stretching process significantly improves image contrast and brightness, making ground features more distinguishable. It is particularly suitable for raster images with densely distributed pixel values.
![]() |
![]() |
Fig.: Without Stretching | Fig.: Minimum Maximum |
Percent Clip
This method assumes most pixels fall within a specific range. Values exceeding the maximum threshold are set to 255, while those below the minimum threshold are set to 0. The remaining values undergo minimum maximum stretching. The thresholds are determined by specifying maximum and minimum truncation percentages.
Example: For an image with pixel values [0,100] and truncation percentages set at 90% (max) and 10% (min). After processing, [0,10] displays as 0, [10,90] stretches to [0,255], and [90,100] displays as 255.
![]() |
![]() |
Fig.: Without Stretching | Fig.: Percent Clip |
Gaussian
This linear stretching method adjusts pixel values to approximate a normal distribution. Pixel values are multiplied by Gaussian coefficients before being stretched to [0,255].
![]() |
![]() |
Fig.: Original Histogram | Fig.: Post-Gaussian Histogram |
Histogram Equalization
This method redistributes pixel values to achieve approximately equal frequency for each value.
Example: If original pixel values concentrate in [50,100] with minimal values in [0,50] and [100,255], histogram equalization stretches [50,100] to [0,255], equalizing pixel frequency.
Not recommended for images with poor quality, limited dynamic range, or extremely uneven histogram distribution.
![]() |
Fig.: Histogram Comparison Before/After Stretching (Image source: Internet) |
![]() |
![]() |
Fig.: Without Stretching | Fig.: Histogram Equalization |
Logarithmic Stretch
Expands low-gray scale ranges while compressing high-gray scale ranges, emphasizing darker image areas and suppressing brighter regions.
Gamma Stretching
Corrects under/over-exposed images through nonlinear transformation. Enhances contrast in dark or bright areas by expanding low/high gray ranges, improving image details and display quality.
Requires setting gamma parameter (default: 0.5, valid range: (0, +∞)).
-
Gamma = 1: No stretching applied
- Gamma
- Gamma > 1: Increases contrast in bright areas (image darkens) with potential loss of dark area details
Adaptive Stretch
Adaptive stretch (full name: Contrast Limited Adaptive Histogram Equalization) is a variant of adaptive histogram equalization. It divides the image into subregions, computes histograms for each, and redistributes brightness values, effectively enhancing local contrast and edge sharpness within regions.
However, traditional adaptive histogram equalization may over-amplify contrast in uniform areas with concentrated histograms, amplifying noise. Adaptive stretch limits contrast enhancement to reduce such noise amplification.
This method enhances local contrast in imagery and currently supports 8-bit unsigned and 16-bit unsigned data types.
Regarding no-data area handling:
- Specified no-data areas (typically 0 or 255): Identified and excluded; pixel values retain original values and remain unaffected by enhancement.
- Other areas: Pixel values participate in adaptive stretch calculations. Processed values may change; if results fall within the specified no-data range (e.g., 0 or 255), they may be misidentified as no-data during display, causing visual anomalies.
Using adaptive stretch requires setting these parameters:
- Clipping threshold: Limits maximum pixel count per value in the histogram, indirectly constraining local contrast enhancement. This prevents significant noise amplification or artifacts in noisy or uniform areas.
- Tiles rows/columns: Specifies the number of tiles (total tiles = rows × columns).
- Higher tile rows/columns: Smaller subregions make the algorithm more sensitive to local details, enhancing contrast finely but potentially causing blocky boundary artifacts.
- Lower tile rows/columns: Larger subregions yield smoother, more uniform enhancement, reducing block effects but weakening enhancement for small-scale details and textures.