필터 지우기
필터 지우기

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.

카테고리

Help CenterFile Exchange에서 Build Interactive Tools에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by