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

 Respuesta aceptada

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

1 comentario

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

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Images en Centro de ayuda y File Exchange.

Etiquetas

Aún no se han introducido etiquetas.

Preguntada:

el 28 de Mayo de 2015

Comentada:

el 28 de Mayo de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by