plotしたデータを自動で保存するにはどうすればよいですか?
Mostra commenti meno recenti
以下のコードでは「MATLAB グラフィックスのハンドルは Figureでなければなりません」となります。
%%画像の読み込み
waveDir = fullfile('nasi');
waveScene = imageDatastore(waveDir);
for g = 150:153
RGB1 = readimage(waveScene,g);
RGB2 = readimage(waveScene,g+1);
I = rgb2gray(RGB1);
T = rgb2gray(RGB2);
%creating optical flow
opticFlow = opticalFlowHS;
flow = estimateFlow(opticFlow,I);
flow = estimateFlow(opticFlow,T);
imshow(T, []);
hold on
B =plot(flow, 'DecimationFactor',[10 10],'ScaleFactor',100);
print(B,'color_%d.jpg', g)
hold off
end
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Entering Commands in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!