ImageEn, unit imageenproc

TImageEnProc.WhiteBalance_Coef

TImageEnProc.WhiteBalance_Coef


Declaration

procedure WhiteBalance_Coef(Red, Green, Blue: Double);


Description

Apply the specified coefficients to each pixel of the image. Coefficients (Red, Green, Blue) are values in the range 0 to 1.

Note: If the image PixelFormat is not ie24RGB, it will be converted


Demo

Demo  Demos\ImageEditing\EveryMethod\EveryMethod.dpr


Comparison of White-Balance Methods

// Load test image
ImageEnView1.IO.LoadFromFile( 'D:\TestImage.jpg' );

  


// WhiteBalance_AutoWhite
// Shift image colors by adjusting the white range
ImageEnView1.Proc.WhiteBalance_AutoWhite();

  


// WhiteBalance_Coef
// Decrease red level by 0.8
ImageEnView1.Proc.WhiteBalance_Coef( 0.8, 1, 1 );

  


// WhiteBalance_GrayWorld
// Adjust image colors by applying the white balance algorithm "Gray World"
ImageEnView1.Proc.WhiteBalance_GrayWorld();

  


// WhiteBalance_WhiteAt
// Shift image colors by adjusting the white range (based on the white of the pixel at the center of the image).
ImageEnView1.Proc.WhiteBalance_WhiteAt( ImageEnView1.IEBitmap.Width div 2, ImageEnView1.IEBitmap.Height div 2 );

  


Example

// Decrease red level by 0.8
ImageEnView1.Proc.WhiteBalance_Coef( 0.8, 1, 1 );


See Also

Public Method  WhiteBalance_WhiteAt
Public Method  WhiteBalance_AutoWhite
Public Method  WhiteBalance_GrayWorld