Re: Gradient of an Image [message #33719] |
Fri, 24 January 2003 00:23  |
Thomas Gutzler
Messages: 44 Registered: November 2002
|
Member |
|
|
Hi Mati,
meron@cars3.uchicago.edu wrote:
> In article <3E30D896.7000602@ee.uwa.edu.au>, Thomas Gutzler <tgutzler@ee.uwa.edu.au> writes:
>
>> Hi,
>>
>> is it true that IDL currently has no function to calculate the gradient
>> of an image ?
>> Google found this for me:
>> http://groups.google.com/groups?q=gradient+image+group:comp. lang.idl-pvwave&hl=en&lr=&ie=UTF-8&oe=UTF-8& amp;selm=3396D128.4CE0%40dlr.de&rnum=1
>> and I am about to test, if this is doing the same as "Digital Image
>> Processing" by Gonzales/Woods sais on page 418ff.
>> Would be interesting to know, if anybody else has diffent (quicker?)
>> solutions.
>>
>
> If it is just the absolute value of the gradient you're after, then
> I've a function like this (written many years ago). And it can easily
> be modified to split the components of the gradient. The function is
> called ABGRAD and you'll find it in the IDL users contributions page,
> in my library (MIDL).
I figured out, that Hermann Mannsteins function does what I want. It
calculates a gradient of an image using the 'Sobel operator' and it does
it _very_ much faster than my testfunction did (It simply went through
the array in 2 for-loops and multiplied the subarray with the kernel,
summed the results and stored them in the final gradient-array).
convol rox :>
Just needs a Boundary-expansion to get better values at the bounds.
If anybody wants to have the code, just drop an email.
thanks anyway,
Tom
|
|
|