J'ai une limite que je souhaite disperser en utilisant une ligne animée. Comment puis-je contrôler/ralentir la vitesse de cette opération?Comment ralentir le temps de rendu de la ligne animée - Matlab
Script:
clc;
clear;
I = imread('http://dreamicus.com/data/key/key-01.jpg');
I = rgb2gray(I);
I=imcomplement(I);
level = graythresh(I);
BW = im2bw(I,level);
BW_filled = imfill(BW,'holes');
boundaries = bwboundaries(BW_filled);
figure,imshow(I);
b = boundaries{1};
plot(b(:,2),b(:,1),'b','LineWidth',2);
an = animatedline;
x=b(:,2);
y=b(:,1);
for k = 1:numel(x)
disp(k)
addpoints(an, x(k), y(k))
drawnow
% Wait for 0.1 seconds
pause(0.1)
end
Avez-vous vérifié la fonction build-in: [pause] (https://de.mathworks.com/help/matlab/ref/pause.html) – Irreducible
double possible de [animation diagramme de dispersion 3D Matlab] (https://stackoverflow.com/questions/14927621/animated-3d-scatter-plot-in-matlab) – Wolfie