Effacer les filtres
Effacer les filtres

MATLAB: Image Gradient Magnitude : Compute: Sobel Image Gradients (Gx and Gy) Gradient magnitude (Gmag) and Gradient direction(Gdir)

2 vues (au cours des 30 derniers jours)
Please help he what to edit on code.....

Réponses (1)

Chit La Pyae Myo Hein
Chit La Pyae Myo Hein le 23 Sep 2020
img=imread('cameraman.tif');
[Gx,Gy]=imgradientxy(img,'sobel');
%Uncomment the code below to visualize Gx and Gy
figure
imshowpair(Gx,Gy,'montage')
title(' Directional Gradients, Gx and Gy ,using Prewitt method')
%Uncomment the code below to visualize Gmag and Gdir
imshowpair(Gx,Gy,'montage')
title( 'Gradient Magnitude (Left) and Gradient Direction (Right)')
[Gmag,Gdir] = imgradient(Gx,Gy);
imshowpair(Gmag,Gdir,'montage')
title('Gradient Magnitude (Left) and Gradient Direction (Right)')

Catégories

En savoir plus sur Images dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by