ImageGear v26.3 - Updated
ImageGear.Core Assembly / ImageGear.Processing Namespace / ImGearRasterProcessing Class / Convolve Method
Image to convolve.
Two-dimensional convolution matrix.
Normalizer (i.e., denominator for every color component value).
Mode that defines how the resulting color component value interacts with the source:
If this flag is true then the calculated values are added to the original ones.
Range of the channels to convolve.




In This Topic
    Convolve Method
    In This Topic
    Provides filtering on the base of 2-dimensional convolution matrix.
    Syntax
    'Declaration
     
    Public Shared Sub Convolve( _
       ByVal page As ImGearRasterPage, _
       ByVal matrix(,) As Integer, _
       ByVal normalizer As Double, _
       ByVal resultMode As ImGearConvolutionResults, _
       ByVal addResultToOriginalPixels As Boolean, _
       ByVal channels As ImGearChannelRange _
    ) 
    'Usage
     
    Dim page As ImGearRasterPage
    Dim matrix() As Integer
    Dim normalizer As Double
    Dim resultMode As ImGearConvolutionResults
    Dim addResultToOriginalPixels As Boolean
    Dim channels As ImGearChannelRange
     
    ImGearRasterProcessing.Convolve(page, matrix, normalizer, resultMode, addResultToOriginalPixels, channels)
    public: static void Convolve( 
       ImGearRasterPage* page,
       int[,]* matrix,
       double normalizer,
       ImGearConvolutionResults resultMode,
       bool addResultToOriginalPixels,
       ImGearChannelRange channels
    ) 

    Parameters

    page
    Image to convolve.
    matrix
    Two-dimensional convolution matrix.
    normalizer
    Normalizer (i.e., denominator for every color component value).
    resultMode
    Mode that defines how the resulting color component value interacts with the source:
    • ImGearConvolutionResults.RAW - the new color component replaces the old one. If the new value is negative then 0 is applied.
    • ImGearConvolutionResults.ABS the new color component replaces the old one. If the new color component is negative then its absolute value is applied.
    • ImGearConvolutionResults.SIGNED - the new color component replaces the old one. If the new color component is negative then it is added to the maximum value of the component range.
    • ImGearConvolutionResults.CENTERED - the new color component is added to the component range center and replaces the old one.
    addResultToOriginalPixels
    If this flag is true then the calculated values are added to the original ones.
    channels
    Range of the channels to convolve.
    Remarks
    The method processes specified range of channels. It does not provide any special handling for Alpha channel.

    Can be applied only to the raster pages with standard (non Run-Ends) DIB.

    Example
    See Also