plotしたデータを自動で保存するにはどうすればよいですか?
이전 댓글 표시
以下のコードでは「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
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Entering Commands에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!