Important notice: the development of WideImage 1.0 branch is discontinued.
Please visit
http://wideimage.sourceforge.net for the new version of library and documentation.
This web site will remain accessible to serve as documentation for the old versions of the library.
For help on migration, please refer
to the
migration
guide.
wiImage::applyConvolution()
See:
List of operations
Signature
wiImage::applyConvolution($matrix, $div, $offset)
Parameters
- $matrix (array): A 3x3 matrix - an array of three arrays of three floats.
- $div (float): The divisor of the result of the convolution, used for normalization.
- $offset (float)
- result (wiTrueColorImage): image with convolution matrix applied
Description
This method returns a copy of the image with a convolution matrix applied. See
imageconvolution()∞ for details.
Examples
// emboss an image
$matrix =
array(array(2,
0,
0),
array(0,
-1,
0),
array(0,
0,
-1));
$embossed =
$img->
applyConvolution($matrix,
1,
127);
CategoryDocApi
There are no comments on this page. [Add comment]