Re: laplacian Kernal [message #70648] |
Mon, 26 April 2010 06:35 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
afzal writes:
> can anybody help me to create 4 laplacian vector ( one
> dimensional) kernal Corresponding to the 4 directions.
> thanking you
You can use the kernal you find on this page:
http://www.dfanning.com/ip_tips/sharpen.html
The vectors you want are just the horizonal, vertical,
and diagonal values in this kernal. Set all other values
to 0 and make sure the numbers you choose add up to 0.
In other words, instead of [-1, 8, -1], you want [-3, 6, -3],
or something similar, depending on what you are trying
to do. For diagonal "vectors" you will have to use a square
kernal. For horizonal and vertical vectors, you can just
use vectors:
hvect = [-3, 6, -3]
vvect = Reform(hvect, 1, 3)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|