Matrix3x3 node
This documentation is for version 1.0 of Matrix3x3 (eu.cimg.CImgMatrix3x3).
Description
Compute the convolution of the input image with the specified matrix.
This works by multiplying each surrounding pixel of the input image with the corresponding matrix coefficient (the current pixel is at the center of the matrix), and summing up the results.
For example [-1 -1 -1] [-1 8 -1] [-1 -1 -1] produces an edge detection filter (which is an approximation of the Laplacian filter) by multiplying the center pixel by 8 and the surrounding pixels by -1, and then adding the nine values together to calculate the new value of the center pixel.
Uses the CImg library.
CImg is a free, open-source library distributed under the CeCILL-C (close to the GNU LGPL) or CeCILL (compatible with the GNU GPL) licenses. It can be used in commercial applications (see http://cimg.eu).
Inputs
Input |
Description |
Optional |
---|---|---|
Source |
No |
|
Mask |
Yes |
Controls
Parameter / script name |
Type |
Default |
Function |
---|---|---|---|
/ |
Double |
0 |
Matrix coefficient. |
/ |
Double |
0 |
Matrix coefficient. |
/ |
Double |
0 |
Matrix coefficient. |
/ |
Double |
0 |
Matrix coefficient. |
/ |
Double |
0 |
Matrix coefficient. |
/ |
Double |
0 |
Matrix coefficient. |
/ |
Double |
0 |
Matrix coefficient. |
/ |
Double |
0 |
Matrix coefficient. |
/ |
Double |
0 |
Matrix coefficient. |
Normalize / |
Boolean |
Off |
Normalize the matrix coefficients so that their sum is 1. |
(Un)premult / |
Boolean |
Off |
Divide the image by the alpha channel before processing, and re-multiply it afterwards. Use if the input images are premultiplied. |
Invert Mask / |
Boolean |
Off |
When checked, the effect is fully applied where the mask is 0. |
Mix / |
Double |
1 |
Mix factor between the original and the transformed image. |