ImageGear Professional for Windows ActiveX
Convolve Method

Description:

Convolves the 8-bit gray level or 24-bit image using a user-defined convolution kernel. The AddToOrigin argument determines whether the result of the convolution is added to the pixel values, or if it replaces the pixel values:

The result of each convolution is multiplied by the normalizer, Normalizer. For kernels that sum to zero, the normalizer is usually set to 1.0. When the sum is not zero, the normalizer's value will depend on the goal of convolution. In a non-weighted averaging convolution the kernel elements are often all ones. In this case the normalizer would be equal to 1/(sum of kernel). Remember that the normalizer is multiplied by the sum of the convolution and not divided into it.

The result of the convolution is an 8-bit image. resMode determines the type of the format of this new image:

This method takes into account the ROI settings of pPage object, that are accessible via the IGPage Object.ROI Property. By default ROI is set to the entire image.

Syntax:

      Convolve (ByVal pPage As IGPage, ByVal Normalizer As Double,
ByVal  colorChannel As enumIGColorChannels, ByVal resMode As
enumIGConvolutionResults, ByVal AddToOrigin As Boolean)

Parameters:

Name Description
pPage Reference to IGPage Object to which the convolution is applied.
Normalizer Contains the value of the normalizer of the kernel.
colorChannel Constant such as IG_COLOR_COMP_R, _G, _B, or _RGB.
resMode Constant such as IG_CONV_RESULT_8BIT_SIGNED.
AddToOrigin Tells whether to add the result of the convolution to the pixel values.

Return Value:

N/A

Bits Per Pixel:

All except indexed

Sample:

Image Processing and Effects

 

 


©2016. Accusoft Corporation. All Rights Reserved.

Send Feedback