Sampling from an image file without replacement
显示 更早的评论
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)
2018-5-18
% select 70 random indices without replacement between 1 and numImages
imIDX = randperm(numImages, 70) ;
for K = imIDX
% process image K
end
类别
在 帮助中心 和 File Exchange 中查找有关 Environment and Settings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!