←Select platform

DiscreteFourierTransformCommand Constructor(FourierTransformInformation,LeadRect,DiscreteFourierTransformCommandFlags)

Summary
Initializes a new DiscreteFourierTransformCommand class object with explicit parameters.
Syntax
C#
Objective-C
C++/CLI
Python
- (instancetype)initWithInformation:(LTFourierTransformInformation *)information range:(LeadRect)range flags:(LTDiscreteFourierTransformCommandFlags)flags NS_DESIGNATED_INITIALIZER; 
__init__(self,fourierTransformInformation,range,flags) # Overloaded constructor 

Parameters

fourierTransformInformation
FourierTransformInformation structure. The Data property of the FourierTransformInformation object is a two-dimensional array that holds the frequency components of the image. Its size must be the same as the image. This array is filled by the command when DiscreteFourierTransformCommandFlags.DiscreteFourierTransform has been set, and it must be sent to the command to construct the image from it when DiscreteFourierTransformCommandFlags.InverseDiscreteFourierTransform has been set.

range
Specifies the frequency range to be computed when DiscreteFourierTransformCommandFlags.InverseDiscreteFourierTransform flag is set. It specifies the frequency range that will be used in the image construction when DiscreteFourierTransformCommandFlags.InverseDiscreteFourierTransform is set. The left value refers to the minimum X harmonic, the right refers to the maximum X harmonic, the top refers to the minimum Y harmonic and the bottom refers to the maximum Y harmonic. The maximum X harmonic equals (Width -1) and the maximum Y harmonic equals (Height -1). The minimum X harmonic equals 0 and the minimum Y harmonic equals 0.

flags
Flags that indicate the transformation type, operation channel, frequency data type used to reconstruct the image, the clipping type, the used or computed frequencies range, the operation on the specified X harmonics range, and the operation on the specified Y harmonics range. You can use a bitwise OR ( | ) to specify one flag from each group.

Example

Run the DiscreteFourierTransformCommand on an image.

C#
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.ImageProcessing.Core; 
 
public void DiscreteFourierTransformConstructorExample() 
{ 
   // Load an image 
   RasterCodecs codecs = new RasterCodecs(); 
   codecs.ThrowExceptionsOnInvalidImages = true; 
 
   RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "Master.jpg")); 
 
   // Prepare the command 
   FourierTransformInformation FTArray = new FourierTransformInformation(image); 
   LeadRect rcRange = new LeadRect(0, 0, image.Width / 4, image.Height / 2); 
 
   DiscreteFourierTransformCommand command = new DiscreteFourierTransformCommand(FTArray, rcRange, DiscreteFourierTransformCommandFlags.DiscreteFourierTransform | DiscreteFourierTransformCommandFlags.Gray | 
         DiscreteFourierTransformCommandFlags.Range | DiscreteFourierTransformCommandFlags.InsideX | DiscreteFourierTransformCommandFlags.OutsideY); 
   // Apply DFT. 
   command.Run(image); 
 
} 
 
static class LEAD_VARS 
{ 
   public const string ImagesDir = @"C:\LEADTOOLS23\Resources\Images"; 
} 
Requirements

Target Platforms

Help Version 23.0.2024.3.3
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.ImageProcessing.Core Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.