How to randomly select n number of pixels from an image whose value is one ?

 Risposta accettata

ind = find(I == 1);
r = randperm(numel(ind));
r = r(1:n);

1 Commento

Thank you sir.After selecting this pixels How to change the values of this pixels in the image to zero.

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Images in Centro assistenza e File Exchange

Tag

Non è stata ancora inserito alcun tag.

Richiesto:

il 28 Mag 2015

Commentato:

il 28 Mag 2015

Community Treasure Hunt

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

Start Hunting!

Translated by