拉普拉斯先生提出了这个方程。这就是拉普拉斯算子的简单定义:二阶导数之和(您也可以将其视为海森矩阵 https://en.wikipedia.org/wiki/Hessian_matrix).
您显示的第二个方程是有限差分近似 https://en.wikipedia.org/wiki/Numerical_differentiation到二阶导数。这是您可以对离散(采样)数据进行的最简单的近似。导数定义为斜率(方程为维基百科 https://en.wikipedia.org/wiki/Derivative#Rigorous_definition):
In a discrete grid, the smallest h
is 1. Thus the derivative is f(x+1)-f(x)
. This derivative, because it uses the pixel at x
and the one to the right, introduces a half-pixel shift (i.e. you compute the slope in between these two pixels). To get to the 2nd order derivative, simply compute the derivative on the result of the derivative:
f'(x) = f(x+1) - f(x)
f'(x+1) = f(x+2) - f(x+1)
f"(x) = f'(x+1) - f'(x)
= f(x+2) - f(x+1) - f(x+1) + f(x)
= f(x+2) - 2*f(x+1) + f(x)
Because each derivative introduces a half-pixel shift, the 2nd order derivative ends up with a 1-pixel shift. So we can shift the output left by one pixel, leading to no bias. This leads to the sequence f(x+1)-2*f(x)+f(x-1)
.
计算二阶导数与使用滤波器进行卷积相同[1,-2,1]
.
应用此过滤器及其转置,并将结果相加,相当于与内核进行卷积
[ 0, 1, 0 [ 0, 0, 0 [ 0, 1, 0
1,-4, 1 = 1,-2, 1 + 0,-2, 0
0, 1, 0 ] 0, 0, 0 ] 0, 1, 0 ]