how to get gradient of an image
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Rawan hamdi
am 25 Mär. 2013
Verschoben: DGM
am 29 Dez. 2023
hi im having a hyperspectral image and im trying to get the gradient operators of the horizontal and vertical directions but i can't any help? Thanks
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 8 Apr. 2013
for band = 1 : size(X,3)
[GX(:,:,band), GY(:,:,band)] = gradient(X(:,:,band));
end
Note you get out two matrices the same size as the original.
9 Kommentare
Weitere Antworten (2)
Image Analyst
am 25 Mär. 2013
The Image Processing Toolbox has imgradient() and imgradientxy() functions.
5 Kommentare
Image Analyst
am 8 Apr. 2013
Verschoben: DGM
am 29 Dez. 2023
That does not make sense to me. In the lateral x,y direction you have units of "per pixel" but in the Z direction since the planes are different wavelengths, not distance in pixels, the gradient is not a spatial gradient. It would have units of "per wavelength". And you certainly wouldn't want a 3D gradient with spatial coordinates mixed with wavelength coordinates. It makes no sense, at least not to me.
Siehe auch
Kategorien
Mehr zu Hyperspectral Image Processing finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!