Sampling from an image file without replacement

조회 수: 6 (최근 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 CenterFile Exchange에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by