SubtractBackground example for Delphi
procedure TForm1.Button1Click(Sender: TObject);
begin
{ Load the bitmap, keeping the bits per pixel of the file }
LEADImage1.Load ('mage3.cmp', 0, 1, 1 );
{ Apply Subtract Background effect on the image }
LEADImage1.SubtractBackground( 50, SBK_DEPEND, 50, SBK_BG_DARK + SBK_RES_SHOW );
end;