Log in

View Full Version : 7x7,9x9 matrix convolution ?


AnnaFan777
1st October 2008, 17:02
Any chance of a 7x7,9x9 matrix convolution filter?

Thanks..

yup
1st October 2008, 18:30
AnnaFan777!
Try
mt_convolution

mt_convolution : clip c, string horizontal("1 1 1"), string vertical("1 1 1"), bool saturate(true), float total(1.0f)

Applies the convolution defined by the kernel horizontalT x vertical to the video.
Both horizontal and vertical must have an odd length.
The default normalization value is the sum of the absolute values of the coefficients of the kernel.
If saturate is true, the result of the convolution is clipped to [0..255], else the absolute value of the result is clipped to [0..255].
If total is defined, it overrides the default normalization value.
Computations occurs in float as soon as one element of horizontal or vertical is a float.
mt_masktools plugin.
http://forum.doom9.org/showthread.php?p=701539#post701539
yup