![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/505328/image.jpeg)
augmentedImageDatastoreのDataAugmentationについて
1 次查看(过去 30 天)
显示 更早的评论
augmentedImageDatastoreでOutputsizeを指定し、DataAugmentationも行っていますが、
ImageAugmenterで指定したRandXTranslationやRandYTranslationの数値は、Outputsizeに対応するものですか?
それともaugmentationされる前の画像サイズでの平行移動でしょうか?
0 个评论
采纳的回答
Kenta
2021-1-31
clear;clc;close all
[XTrain,YTrain] = digitTrain4DArrayData;
imageAugmenter = imageDataAugmenter( ...
'RandRotation',[-20,20], ...
'RandXTranslation',[15 15], ...
'RandYTranslation',[-3 3]);
imageSize = [280 280 1];
augimds = augmentedImageDatastore(imageSize,XTrain,YTrain,'DataAugmentation',imageAugmenter);
I=read(augimds);
figure;imagesc(I{1,1}{1})
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/505328/image.jpeg)
こんにちは、ドキュメントを見ても書いていなかったように思います。ただおそらく、inputのスケールでの移動と思います。たとえば上のようなコードを打つと、数字が画像からほとんどフレームアウトしてしまうことが確認できると思います。
ここでは、15ピクセル右に移動するだけですが、outputsizeは280なので、outputのサイズでの移動であれば、フレームアウトはしないはずです。
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!