ImageEn, unit imageenproc




function FTCreateImage(ImageType: TIEFtImageType; NewWidth: Integer = -1; NewHeight: Integer = -1): TIEFtImage;


Create an object containing the Fourier transformation of the current image.

ImageType specifies the kind of the output transformation either RGB (ieitRGB) or gray-scale (ieitGrayscale)
NewWidth and NewHeight resample the current image before applying the Fourier transformation (to speed up the job). Set -1 to disable resampling (original size).
TIEFtImage is an object and must be destroyed with the Free method.

To access the complex data of the transformed image use the TIEFtImage object as declared in the iefft unit.
TIEFtImage exports ComplexPixel[], ComplexWidth and ComplexHeight properties.
ComplexPixel[] is defined as:
  ComplexPixel[x, y: Integer]: TIEComplexColor;

ComplexPixel[] returns the complex pixel at x, y coordinate.
TIEComplexColor is defined as:
  TIEComplexColor=packed record
    // red channel
    real_Red: PIEsingle;
    imag_Red: PIEsingle;
    // blue channel
    real_Blue: PIEsingle;
    imag_Blue: PIEsingle;
    // green channel
    real_Green: PIEsingle;
    imag_Green: PIEsingle;
    // gray scale
    imag_gray: PIEsingle;
    real_gray: PIEsingle;
The fields *_Red, *_Blue and *_Green are filled if ImageType is ieitRGB.
The fields *_gray are filled if ImageType is ieitGrayscale.
ComplexWidth and ComplexHeight are the width and the height of complex image.

For example, to set complex pixel 0, 0 to 0.1 write (for ImageType=ieitRGB):
ftimage.ComplexPixel[0, 0].real_Red^ := 0.1;
ftimage.ComplexPixel[0, 0].imag_Red^ := 0.1;
ftimage.ComplexPixel[0, 0].real_Green^ := 0.1;
ftimage.ComplexPixel[0, 0].imag_Green^ := 0.1;
ftimage.ComplexPixel[0, 0].real_Blue^ := 0.1;
ftimage.ComplexPixel[0, 0].imag_Blue^ := 0.1;

- A UI for this is available to your users in the Image Processing dialog
- If the image PixelFormat is not ie24RGB, it will be converted


Demo  Demos\ImageAnalysis\FFT\FFT.dpr


// Show in ImageEnView2 the Fourier transformation of the image in ImageEnView1
  ftimage: TIEFtImage;
  ftimage := ImageEnView1.Proc.FTCreateImage(ieitRGB, -1, -1);

See Also

Public Method  FTClearZone
Public Method  FTConvertFrom
Public Method  FTDisplayFrom