Seite 1 von 1

Assignment #1 Problem 2

Verfasst: 4. Nov 2007 15:15
von >flo<
This is about pt. 6.

We are asked here to check whether the gradient magnitude exceeds a certain threshold.

Okay--that means we have to look at every pixel and compare the value to the chosen threshold.

However, we are asked to *not* use any for loops.

Well, how am I gonna look at any pixel in the image without a for loop? Is there any built-in matlab function that does this job for me?

Thanks for helping me out.

Verfasst: 4. Nov 2007 15:41
von >flo<
To pt.5:

Is the gradient magnitude the square root of the summed 2nd derivatives or just the square root of the summed squares of the 1st derivatives?

ty

Verfasst: 4. Nov 2007 22:42
von Trigger
Check out the documentation of rational operators. Especially the example: http://www.mathworks.com/access/helpdes ... ators.html

The gradient magnitude is the length of the gradient. Have a look at the definition of the gradient and you will know the answer: http://en.wikipedia.org/wiki/Gradient

HTH
Armin

möglichkeiten

Verfasst: 5. Nov 2007 14:31
von YMBY
Zu deinen Fragen ein paar "schöne" Tipps:

1. es gibt den Matlabbefehl "gradient"
2. es gibt auch für Matrizen den Matlabbefehl ">"
3. die Magnitude des Gradienten ist die Länge dieses Vektors

=> Apropos: gibts das Übungsblatt inzwischen irgendwo online??

YMBY

Re: möglichkeiten

Verfasst: 5. Nov 2007 15:23
von C.
YMBY hat geschrieben:Es gibt ein paar sehr schöne Matlabbefehle, z. Bsp.:

1. [fX, fY] = gradient(pic)
Please use the filters from Problem 2.3 to generate the gradient images.

=> Apropos: gibts das Übungsblatt inzwischen irgendwo online??

Y
Have a look


Christian