How can i get the divergence of vector field of a gray scale image??
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
sreejini
am 3 Dez. 2014
Bearbeitet: Thorsten
am 3 Dez. 2014
How can i get the divergence of vector field of a gray scale image??
0 Kommentare
Akzeptierte Antwort
Thorsten
am 3 Dez. 2014
Bearbeitet: Thorsten
am 3 Dez. 2014
In this example the vector field is computed as the gradient in x and y direction:
function D = imdiv(I)
Ix = diff([I I(:, end)]')';
Iy = diff([I; I(end, :)]);
[X Y] = meshgrid(1:size(I, 2), 1:size(I, 1));
D = divergence(X, Y, Ix, Iy);
0 Kommentare
Weitere Antworten (1)
Sean de Wolski
am 3 Dez. 2014
Bearbeitet: Sean de Wolski
am 3 Dez. 2014
doc divergence
doc ndgrid
Build a grid of every row/col page and then call divergence with these and your displacement vector values.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Image Segmentation and Analysis finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!