Split an image into two sets
Mostra commenti meno recenti
Hi, I need to split an image into two sets of pixels A and B, each randomly containing half of the pixels (using the rand function). Thanks in advance for any help.
Risposte (1)
Matt J
il 27 Ott 2019
N=numel(yourImage);
indices=randperm(N,round(N/2));
A=yourImage(indices);
B=yourImage; B(indices)=[];
Categorie
Scopri di più su Image Processing Toolbox in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!