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!