【图像处理】Mathematica的梯度滤波器
1、给出一幅图片。

2、用Prewitt算子,对图片进行梯度滤波:GradientFilter[a,Method -> {{{-1, -1, -1},{0, 0, 0},{1, 1, 1}},{{-1, 0, 1},{-1, 0, 1},{-1, 0, 1}}}]

3、用Sobel算子进行梯度滤波:b={{1,2,1},{0,0,0},{-1,-2,颍骈城茇-1}};GradientFilter[a,Method -> {b,b//Transpose}]

4、用Shen-Castan算子进行梯度滤波:GradientFilter[a,1,Method -> "ShenCastan"]

5、使用默认的Bessel方法,进行梯度滤波:GradientFilter[a,1]

6、采用非极大值抑制的方法:GradientFilter[a,1,Method -> "NonMaxSuppression" -> True]
