plotしたデータを自動で保存するにはどうすればよいですか?
Mostrar comentarios más antiguos
以下のコードでは「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
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Entering Commands en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!