Sampling from an image file without replacement

4 ビュー (過去 30 日間)
Andrew Streatfield
Andrew Streatfield 2018 年 5 月 17 日
回答済み: Jos (10584) 2018 年 5 月 18 日
I have an image file of several hundred images and I need to sample and save 70 of these images without replacement and save them for use later in the experiment. How do I go about doing this?

回答 (1 件)

Jos (10584)
Jos (10584) 2018 年 5 月 18 日
% select 70 random indices without replacement between 1 and numImages
imIDX = randperm(numImages, 70) ;
for K = imIDX
% process image K
end

カテゴリ

Help Center および File ExchangeImages についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by