フィルターのクリア

How can i get the divergence of vector field of a gray scale image??

4 ビュー (過去 30 日間)
sreejini
sreejini 2014 年 12 月 3 日
編集済み: Thorsten 2014 年 12 月 3 日
How can i get the divergence of vector field of a gray scale image??

採用された回答

Thorsten
Thorsten 2014 年 12 月 3 日
編集済み: Thorsten 2014 年 12 月 3 日
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);

その他の回答 (1 件)

Sean de Wolski
Sean de Wolski 2014 年 12 月 3 日
編集済み: Sean de Wolski 2014 年 12 月 3 日
doc divergence
doc ndgrid
Build a grid of every row/col page and then call divergence with these and your displacement vector values.

Community Treasure Hunt

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

Start Hunting!

Translated by