How to get the first derivative of pixels along of line?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
#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 commentaires
Rik
le 12 Août 2022
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?
Réponses (1)
Voir également
Catégories
En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!