ImageDev

GaborFiltering2d

Transforms a two-dimensional image thanks to Gabor filters, which are well known for localisation in frequency and space.

Access to parameter description

The Gabor filters are performed in the Fourier Space (frequency space). Gabor filters recover this space.

For a number of angles $ N_\theta $ and a number of frequences $ N_\omega $, $N_\theta\times N_\omega$ Gabor filters can be defined for: The frequency responses are: $$ G(i,j)=e^{-2\times \pi^2 \times \sigma^2\times ((u-F)^2\times \lambda^2 + v^2)} $$ Where: See also

Function Syntax

This function returns outputImage.
// Function prototype
std::shared_ptr< iolink::ImageView > gaborFiltering2d( std::shared_ptr< iolink::ImageView > inputImage, int32_t frequencyNumber, int32_t angleNumber, std::shared_ptr< iolink::ImageView > outputImage = nullptr );
This function returns outputImage.
// Function prototype.
gabor_filtering_2d(input_image: idt.ImageType,
                   frequency_number: int = 4,
                   angle_number: int = 4,
                   output_image: idt.ImageType = None) -> idt.ImageType
This function returns outputImage.
// Function prototype.
public static IOLink.ImageView
GaborFiltering2d( IOLink.ImageView inputImage,
                  Int32 frequencyNumber = 4,
                  Int32 angleNumber = 4,
                  IOLink.ImageView outputImage = null );

Class Syntax

Parameters

Parameter Name Description Type Supported Values Default Value
input
inputImage
The input image. Image Binary, Label, Grayscale or Multispectral nullptr
input
frequencyNumber
The number of frequencies. Int32 >=1 4
input
angleNumber
The number of angles. Int32 >=1 4
output
outputImage
The output image. Its spatial dimensions and type are forced to the same values as the input. It is an image sequence containing the number of frequencies multiplied by the number of angles time steps. Image nullptr
Parameter Name Description Type Supported Values Default Value
input
input_image
The input image. image Binary, Label, Grayscale or Multispectral None
input
frequency_number
The number of frequencies. int32 >=1 4
input
angle_number
The number of angles. int32 >=1 4
output
output_image
The output image. Its spatial dimensions and type are forced to the same values as the input. It is an image sequence containing the number of frequencies multiplied by the number of angles time steps. image None
Parameter Name Description Type Supported Values Default Value
input
inputImage
The input image. Image Binary, Label, Grayscale or Multispectral null
input
frequencyNumber
The number of frequencies. Int32 >=1 4
input
angleNumber
The number of angles. Int32 >=1 4
output
outputImage
The output image. Its spatial dimensions and type are forced to the same values as the input. It is an image sequence containing the number of frequencies multiplied by the number of angles time steps. Image null

Object Examples

auto polystyrene = ioformat::readImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene.tif" );

GaborFiltering2d gaborFiltering2dAlgo;
gaborFiltering2dAlgo.setInputImage( polystyrene );
gaborFiltering2dAlgo.setFrequencyNumber( 4 );
gaborFiltering2dAlgo.setAngleNumber( 4 );
gaborFiltering2dAlgo.execute();

std::cout << "outputImage:" << gaborFiltering2dAlgo.outputImage()->toString();
polystyrene = ioformat.read_image(imagedev_data.get_image_path("polystyrene.tif"))

gabor_filtering_2d_algo = imagedev.GaborFiltering2d()
gabor_filtering_2d_algo.input_image = polystyrene
gabor_filtering_2d_algo.frequency_number = 4
gabor_filtering_2d_algo.angle_number = 4
gabor_filtering_2d_algo.execute()

print("output_image:", str(gabor_filtering_2d_algo.output_image))
ImageView polystyrene = ViewIO.ReadImage( @"Data/images/polystyrene.tif" );

GaborFiltering2d gaborFiltering2dAlgo = new GaborFiltering2d
{
    inputImage = polystyrene,
    frequencyNumber = 4,
    angleNumber = 4
};
gaborFiltering2dAlgo.Execute();

Console.WriteLine( "outputImage:" + gaborFiltering2dAlgo.outputImage.ToString() );

Function Examples

auto polystyrene = ioformat::readImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene.tif" );

auto result = gaborFiltering2d( polystyrene, 4, 4 );

std::cout << "outputImage:" << result->toString();
polystyrene = ioformat.read_image(imagedev_data.get_image_path("polystyrene.tif"))

result = imagedev.gabor_filtering_2d(polystyrene, 4, 4)

print("output_image:", str(result))
ImageView polystyrene = ViewIO.ReadImage( @"Data/images/polystyrene.tif" );

IOLink.ImageView result = Processing.GaborFiltering2d( polystyrene, 4, 4 );

Console.WriteLine( "outputImage:" + result.ToString() );