ImgConvolve
Previous  Top  Next

Prototype

ImgConvolve(intImageHandle, intM1, intM2, intM3, intM4, intM5, intM6, intM7, intM8, intM9, intDivisor, intBias)

Description

It apply convolution kernel to the image.

Parameters

intImageHandle: integer value corresponding to the image handle.
intM1... intM9: integer values corresponding to matrix coefficient to use. Are placed geometrically as:

M1 M2 M3
M4 M5 M6
M7 M8 M9

intDivisor: integer value corrisponding to the divisor.
intBias: integer value corrisponding to the bias.


Returned value

None.

Notes

Each image pixel and they neightbors are multiplieds by corrisponding matrix values, then divided by divisor and added to bias: finally the result is clipped in range 0 - 255.

Example

// Convolution using this matrix:
// -1  -1  -1
// -1   8  -1
// -1  -1  -1
// divisor 1, bias 0
ImgConvolve(_CurrentImage, -1, -1, -1, -1, 8, -1, -1, -1, -1, 1, 0)
;