plotしたデータを自動で保存するにはどうすればよいですか?
Show older comments
以下のコードでは「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
Accepted Answer
More Answers (0)
Categories
Find more on Entering Commands in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!