ImageGear .NET
Convolve Method (ImGearFrequencyProcessing)




ImageGear.Core.ImGearRasterPage class object to be processed.
Array of kernel elements to convolve with.
Width of kernel matrix.
Height of kernel matrix.
Normalizer of the result.
Whether to add the result of the convolution to the original pixel values, or replace the original pixel values.
Convolves an image with the given kernel matrix.
Syntax
'Declaration
 
Public Shared Sub Convolve( _
   ByVal page As ImGearRasterPage, _
   ByVal matrix() As Integer, _
   ByVal matrixWidth As Integer, _
   ByVal matrixHeight As Integer, _
   ByVal normalizer As Double, _
   ByVal addResultToOriginalPixels As Boolean _
) 
'Usage
 
Dim page As ImGearRasterPage
Dim matrix() As Integer
Dim matrixWidth As Integer
Dim matrixHeight As Integer
Dim normalizer As Double
Dim addResultToOriginalPixels As Boolean
 
ImGearFrequencyProcessing.Convolve(page, matrix, matrixWidth, matrixHeight, normalizer, addResultToOriginalPixels)
public static void Convolve( 
   ImGearRasterPage page,
   int[] matrix,
   int matrixWidth,
   int matrixHeight,
   double normalizer,
   bool addResultToOriginalPixels
)
public: static void Convolve( 
   ImGearRasterPage* page,
   int[]* matrix,
   int matrixWidth,
   int matrixHeight,
   double normalizer,
   bool addResultToOriginalPixels
) 
public:
static void Convolve( 
   ImGearRasterPage^ page,
   array<int>^ matrix,
   int matrixWidth,
   int matrixHeight,
   double normalizer,
   bool addResultToOriginalPixels
) 

Parameters

page
ImageGear.Core.ImGearRasterPage class object to be processed.
matrix
Array of kernel elements to convolve with.
matrixWidth
Width of kernel matrix.
matrixHeight
Height of kernel matrix.
normalizer
Normalizer of the result.
addResultToOriginalPixels
Whether to add the result of the convolution to the original pixel values, or replace the original pixel values.
Remarks
This method convolves an image with the given kernel matrix. The convolution is implemented using FFT, based on the Convolution Theorem, which provides improved performance for larger kernel matrix.

The result of the convolution is multiplied by normalizer to scale the data. For kernels that sum to zero, the normalizer is usually set to 1.0.

Before using this method, like other frequency processing methods, InitializeFFTW method must be called first to initialize the support for FFTW.

Can be applied only to 8, 16, or 32bit grayscale images with one channel.

ImGearFrequencyProcessingVerifier.CanApplyConvolve method can be called to check whether the operation can be performed or not.

See Also

Reference

ImGearFrequencyProcessing Class
ImGearFrequencyProcessing Members
ImGearRasterPage Class

 

 


©2016. Accusoft Corporation. All Rights Reserved.

Send Feedback