cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Laplacian filter

JensE
4-Participant

Laplacian filter

Hi,

 

i need help programming a 2D laplacian filter filter using a {\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

4 REPLIES 4
Fred_Kohlhepp
23-Emerald I
(To:JensE)

I'll give it a shot:

The sheet (not terribly well commented

before

after

Werner_E
25-Diamond I
(To:JensE)

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.

Bild.PNG

 

LucMeekes
23-Emerald III
(To:JensE)

Another program, suitable for an arbitrary size mask:

PictureConvolution0.png

With a result:

PictureConvolution1.png

Success!
Luc

LucMeekes
23-Emerald III
(To:LucMeekes)

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):

PictureConvolution0.png

With as result:

PictureConvolution1.png

Success!

Luc

Announcements

Top Tags