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

3 Ansichten (letzte 30 Tage)
BA
BA am 11 Aug. 2022
Kommentiert: BA am 12 Aug. 2022
#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 Kommentare
BA
BA am 12 Aug. 2022
@RikI'd like to do some attempts and then reframe the question.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

KSSV
KSSV am 12 Aug. 2022
REad about gradient

Kategorien

Mehr zu Image Processing Toolbox 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!

Translated by