How to get the first derivative of pixels along of line?

조회 수: 2 (최근 30일)
BA
BA 2022년 8월 11일
댓글: BA 2022년 8월 12일
#Here's my code
#it works for one frame when I did 'plot(diff(test))' but I need a way to implement it to the whole images
imshow(M(:,:,1))
[x ,y]= ginput(2);
dif = zeros(size(M,3),1);
for i = 1:size(M,3)
I = M(:,:,i);
n = ceil(norm([diff(x), diff(y)]));
test = improfile(I,linspace(x(1), x(2),n), linspace(y(1), y(2),n));
end
dif(i) = diff(test);
  댓글 수: 5
Rik
Rik 2022년 8월 12일
Why did you flag your question as unclear? The only person who can clarify your question is you. Why don't you do so?
And why did you change your user name?
BA
BA 2022년 8월 12일
@RikI'd like to do some attempts and then reframe the question.

댓글을 달려면 로그인하십시오.

답변 (1개)

KSSV
KSSV 2022년 8월 12일
REad about gradient

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by