Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Find 3-D gradient magnitude and direction of images

```
[Gmag,Gazimuth,Gelevation]
= imgradient3(I)
```

```
[Gmag,Gazimuth,Gelevation]
= imgradient3(I,method)
```

```
[Gmag,Gazimuth,Gelevation]
= imgradient3(Gx,Gy,Gz)
```

`[`

returns the gradient magnitude, `Gmag`

,`Gazimuth`

,`Gelevation`

]
= imgradient3(`I`

)`Gmag`

, gradient
direction, `Gazimuth`

, and gradient elevation
`Gelevation`

of the 3-D grayscale or
binary image `I`

.

`[`

calculates the gradient magnitude, direction, and elevation using
the specified `Gmag`

,`Gazimuth`

,`Gelevation`

]
= imgradient3(`I`

,`method`

)`method`

.

`imgradient3`

does not normalize the gradient
output. If the range of the gradient output image has to match the
range of the input image, consider normalizing the gradient image,
depending on the `method`

argument used. For example,
with a Sobel kernel, the normalization factor is 1/44 and for Prewitt,
the normalization factor is 1/18.