←Select platform

Flags Property

Summary
Gets or sets flags that indicate the operation to be performed on the X and Y harmonics ranges.
Syntax
C#
C++/CLI
Python
public FrequencyFilterCommandFlags Flags { get; set; } 
Flags # get and set (FrequencyFilterCommand) 

Property Value

Flags that indicate the operation to be performed on the X and Y harmonics ranges. You can use a bit wise OR ( | ) to specify one flag from each group.

Example
C#
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.ImageProcessing; 
using Leadtools.ImageProcessing.Core; 
 
public void FrequencyFilterConstructorExample() 
{ 
   // Load an image 
   RasterCodecs codecs = new RasterCodecs(); 
   codecs.ThrowExceptionsOnInvalidImages = true; 
 
   RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, @"ImageProcessingDemo\FourierTransform.jpg")); 
 
   // Prepare the command 
   // Resize the image to make sure the image's dimensions are power of two. 
   SizeCommand sizeCommand = new SizeCommand(256, 256, RasterSizeFlags.Bicubic); 
   sizeCommand.Run(image); 
 
   FourierTransformInformation ftArray = new FourierTransformInformation(image); 
   // Apply FFT. 
   FastFourierTransformCommand command = new FastFourierTransformCommand(ftArray, FastFourierTransformCommandFlags.FastFourierTransform | FastFourierTransformCommandFlags.Gray); 
   command.Run(image); 
 
   LeadRect rcRect = new LeadRect(0, 0, image.Width / 2, image.Height / 2); 
   FrequencyFilterCommand freqCommand = new FrequencyFilterCommand(); 
   freqCommand.Flags = FrequencyFilterCommandFlags.InsideX | FrequencyFilterCommandFlags.InsideY; 
   freqCommand.FourierTransformInformation = ftArray; 
   freqCommand.Rectangle = rcRect; 
 
   FastFourierTransformCommand invCommand = new FastFourierTransformCommand(ftArray, FastFourierTransformCommandFlags.InverseFastFourierTransform | FastFourierTransformCommandFlags.Gray | FastFourierTransformCommandFlags.Scale | 
         FastFourierTransformCommandFlags.Both); 
   invCommand.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.