Sampling from an image file without replacement

6 visualizaciones (últimos 30 días)
Andrew Streatfield
Andrew Streatfield el 17 de Mayo de 2018
Respondida: Jos (10584) el 18 de Mayo de 2018
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?

Respuestas (1)

Jos (10584)
Jos (10584) el 18 de Mayo de 2018
% select 70 random indices without replacement between 1 and numImages
imIDX = randperm(numImages, 70) ;
for K = imIDX
% process image K
end

Categorías

Más información sobre Images en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by