Community Tip - You can change your system assigned username to something more personal in your community settings. X
Hi,
i need help programming a 2D laplacian filter filter using a D x y 2 = [ 0 1 0 1 − 4 1 0 1 0 ] {\displaystyle \mathbf {D} _{xy}^{2}={\begin{bmatrix}0&1&0\\1&-4&1\\0&1&0\end{bmatrix}}}
matrix.
The program should load a picture via READBMP then apply the filter and output the edited picture.
It would be really cool if you could also comment your program since i have no experience using Mathcad at all.
Thank you very much
JensE
I'll give it a shot:
The sheet (not terribly well commented
before
after
Maybe you could use the built-in functions laplace4, laplace8, laplace 24 or convolve3 to do the job.
Here done in Mathcad15 as we can view the pics in the Mathcad sheet and have not to resort to external picture viewers.
Another program, suitable for an arbitrary size mask:
With a result:
Success!
Luc
A correction is in order (to restrict the arbitrary mask size to odd dimensions only, and to make sure that the output picture is as large as the input picture):
With as result:
Success!
Luc