DiscreteFourierTransformation example for Delphi
{ This example loads a bitmap and applies DFT function. }
procedure TForm1.Button1Click(Sender: TObject);
begin
{ Load the bitmap, keeping the bits per pixel of the file *}
LEADImage1.Load ('image1.cmp', 0, 1, 1 );
{Allocate FT buffer}
LEADImage1.InitFourierTransformationData ();
{ Apply DFT }
LEADImage1.DiscreteFourierTransformation ( 0, 0, Trunc(LEADImage1.BitmapWidth / 4), Trunc(LEADImage1.BitmapHeight / 2), DFT_DFT + DFT_GRAY + DFT_RANGE + DFT_INSIDE_X + DFT_OUTSIDE_Y );
{ Free FT buffer }
LEADImage1. FreeFourierTransformationData( );
end;