cmatrix.mean_filter¶
- cmatrix.mean_filter()¶
Generate a mean filter matrix.
- Can be used in two mode :
0 => laplacian-like mean first order
1 => regular mean matrix
Parameters
Type
Description
size
int
The size of the filter
mode
int
- Int value representing two mean mode :
0 => laplacian-like mean first order
1 => regular mean matrix
order
int
In case of Laplacian-like mean, define the order of the filter
- Returns
- Matrix
The computed mean filter matrix
See also
set_ij()
insert_sub_matrix()
abs()
Examples
>>> print(mean_filter(3,0)) | -0.125 | -0.125 | -0.125 | | -0.125 | +1.000 | -0.125 | | -0.125 | -0.125 | -0.125 | printed >>> print(mean_filter(3,0,2)) | -0.021 | -0.042 | -0.021 | | -0.042 | +0.083 | -0.042 | | -0.021 | -0.042 | -0.021 | printed >>> print(mean_filter(3,0,3)) | +0.062 | +0.062 | +0.062 | | +0.062 | +0.062 | +0.062 | | +0.062 | +0.062 | +0.062 | printed