ImageEn, unit imageenproc

TImageEnProc.WhiteBalance_WhiteAt

TImageEnProc.WhiteBalance_WhiteAt


Declaration

procedure WhiteBalance_WhiteAt(WhiteX, WhiteY: Integer);


Description

Shift image colors by adjusting the white range (based on the white of the pixel at the coordinate WhiteX, WhiteY).

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

// Specify the white pixel to perform the white balance adjustment
ImageEnView1.Proc.WhiteBalance_WhiteAt( 150, 200 );


See Also

WhiteBalance_AutoWhite
WhiteBalance_Coef
WhiteBalance_GrayWorld