Show older comments
セマンティックセグメンテーションを行うにあたってデータセットを作成するため上のURLを参考にrandomCropWindow2dを使用して画像のランダム抽出を行ったところ,画像を表示させることは出来たのですが,保存されたファイルは真っ白でうまく保存することが出来ません.複数枚の画像を一括で保存する方法を教えてください.
A = imread('1.jpg');
%imshow(A)
targetSize = [96 96];
for i=1:10
wini = randomCropWindow2d(size(A),targetSize);
Bi = imcrop(A,wini);
imshow(Bi)
filename=['image1_',num2str(i),'.png'];
saveas(gcf,filename)
end
Accepted Answer
More Answers (0)
Categories
Find more on Convert Image Type in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!