"Ideal weight" for Discrete Laplacian?
Posted: 2012-08-24T03:36:26-07:00
I am wondering if there is a "proper" weighting for a Discrete Laplacian operator in which the result values are not chosen for edge enhancement but for the closest representation to del2x plus del2y.
For example, two common Laplacians are: [0, -1, 0; -1, 4, -1; 0, -1, 0] and [-1, -1, -1; -1, 8, -1; -1, -1, -1] .
However, when applied to the same image, the eight neighbor above gives me considerably higher overall values for the result than the four neighbor, around double. I will get closer values to the four neighbor if I multiply by .5 or use the kernel [-0.5, -0.5, -0.5; -0.5, 4, -0.5; -0.5, -0.5, -0.5] . These two kernels seem to produce numbers closest to, for example, Matlab's del2 function .
What I see emphasized in textbooks is how these kernels sum to zero, so that theoretically there isn't an overall increase in image brighness. But in my case I get dramatically different results depending on which 8 neighbor kernel I choose. It may be the scientific application that causes the complication: since we are looking for the Laplace operator to solve the Helmholtz equation, all values greater than or equal to zero get filtered out.
I suspect having 4 in the middle is key due to the one-fourth term found in many Laplacian derivations, and that means kernels with four in the middle would be the most "true". Can anyone help me come to a clear conclusion on this?
For example, two common Laplacians are: [0, -1, 0; -1, 4, -1; 0, -1, 0] and [-1, -1, -1; -1, 8, -1; -1, -1, -1] .
However, when applied to the same image, the eight neighbor above gives me considerably higher overall values for the result than the four neighbor, around double. I will get closer values to the four neighbor if I multiply by .5 or use the kernel [-0.5, -0.5, -0.5; -0.5, 4, -0.5; -0.5, -0.5, -0.5] . These two kernels seem to produce numbers closest to, for example, Matlab's del2 function .
What I see emphasized in textbooks is how these kernels sum to zero, so that theoretically there isn't an overall increase in image brighness. But in my case I get dramatically different results depending on which 8 neighbor kernel I choose. It may be the scientific application that causes the complication: since we are looking for the Laplace operator to solve the Helmholtz equation, all values greater than or equal to zero get filtered out.
I suspect having 4 in the middle is key due to the one-fourth term found in many Laplacian derivations, and that means kernels with four in the middle would be the most "true". Can anyone help me come to a clear conclusion on this?