Image Normalization

Description

This operator is used to readjust the brightness information of each pixel in the input image, unifying pixel values of different scales or distributions onto a standard baseline, and eliminating numerical differences caused by variations in brightness, contrast, or data bit depth between images.

Overview

Provides multiple normalization methods to adjust pixel values to a unified range when brightness ranges vary across images.

Scenarios

  • Deep learning models may require input image pixel values to be within a standard range (e.g., [0, 1] or [-1, 1]) or conform to a standard normal distribution (mean 0, variance 1), which can be preprocessed via image normalization.

  • Images captured under different lighting conditions may result in inconsistent image brightness; normalization can reduce the impact of lighting variations and improve algorithm robustness.

Inputs and Outputs

Inputs

Image: The input image or list of images to be processed, which can be grayscale or color images.

Outputs

Normalized image: The image or list of images after normalization processing.

Parameters

Normalization Method

Description

Selects the algorithm used to normalize the image pixel values.

Tuning Instructions

  • Min-Max Normalization: This method maintains the distribution structure of the original data, linearly stretching pixel values to map them to a specific target range. Suitable for general scenarios where the relative relationship of pixel values needs to be preserved.

  • Mean-Variance Normalization: Converts pixel values into a standardized distribution, typically with a mean of 0 and a standard deviation of 1, and then adjusts the scale of the data by multiplying by the maximum value of the normalization range. Commonly used in deep learning as many models assume input data follows a standard normal distribution.

  • Max Absolute Value Normalization: Finds the pixel with the largest absolute value in the image, divides each pixel by this value, and scales it to the specified range. This method does not change the "center" of the image, i.e., the relative distribution of positive and negative values.

  • Logarithmic Normalization: When there is a very large difference in brightness within the image (e.g., a few bright pixels and many dark pixels), logarithmic normalization takes the logarithm of each pixel value. This reduces the disparity in bright areas and enhances details in dark areas, making the overall image appear more balanced.

Parameter Range

Values/Range:

  • Min-Max Normalization

  • Mean-Variance Normalization

  • Max Absolute Value Normalization

  • Logarithmic Normalization

Default: Min-Max Normalization

Normalization Range Maximum

Description

Sets the maximum value of the normalized output range, or the scaling factor.

Tuning Instructions

  • When using Min-Max Normalization, this parameter is used to set the upper limit of the output range. For example, setting it to 255 results in an output range of [0, 255], suitable for direct display as an 8-bit image; setting it to 1 results in an output range of [0, 1], commonly used in deep learning.

  • For other normalization methods, this parameter acts as a multiplicative scaling factor applied after the normalization calculation.

Parameter Range

[1, 10000000], Default value: 1

Parameter Range

Values/Range: [1, 10000000]

Default: 255

Enable Clipping

Description

Controls whether to forcibly limit the normalized result between a specified minimum and maximum value.

Tuning Instructions

  • Disabled (Default): No clipping is performed.

  • Enabled: Enables the clipping function. When the normalization result may produce extreme values outside the expected range, enabling this option can effectively suppress these outliers and ensure output values are between the minimum and maximum.

Parameter Range

Values/Range:

  • True

  • False

Default: False

Clip Minimum

Description

Clip minimum value. If the normalized result falls below this value, it is clamped to this value.

Parameter Range

Values/Range: [-100000, 100000]

Default: 0

Clip Maximum

Description

Clip maximum value. If the normalized result exceeds this value, it is clamped to this value.

Parameter Range

Values/Range: [-100000, 100000]

Default: 255

Enable Node

Description

Controls whether the operator performs the operation.

Tuning Instructions

  • Enabled (Default): Runs the operator function normally.

  • Disabled: The operator performs no operation and directly outputs the input data.

Parameter Range

Default: True