ImageGear for C and C++ on Windows v21.0 - Updated
API Reference Guide / MD Component API Reference / MD Component Functions Reference / Image Processing Functions / MED_IP_normalize
In This Topic
    MED_IP_normalize
    In This Topic

    This function's main purpose is to convert the pixel data of a 16-bit image from signed to unsigned.

    Declaration:

     
    Copy Code
    AT_ERRCOUNT ACCUAPI MED_IP_normalize(
            HIGEAR hIGear, 
            const LONG lMin
    );
    

    Arguments:

    Name Type Description
    hIGear HIGEAR The HIGEAR handle to the image to normalize.
    lMin const LONG A variable of type LONG used to set the minimum pixel value for the resulting image.

    Return Value:

    Returns the number of ImageGear errors that occurred during the function call.

    Supported Raster Image Formats:

    Grayscale – 8…32 bpp.

    Remarks:

    If you are using this function to convert the pixel data of a 16-bit image from signed to unsigned, set lMin to 0.

    It can also be used to convert the minimum pixel value for the image. To do this, set lMin to greater than 0. This function searches the image for the minimum pixel value. It maps this value to lMin. Then, all pixel values are linearly adjusted to maintain the original contrast. If lMin is equal to the min pixel value in hIGear, then no change is made. The resulting image remains a 16-bit.