How to randomly select n number of pixels from an image whose value is one and change those pixels value to zero?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Anushka
el 28 de Mayo de 2015
Comentada: Anushka
el 28 de Mayo de 2015
How to randomly select n number of pixels from an image whose value is one and change those pixels value to zero?
0 comentarios
Respuesta aceptada
Thorsten
el 28 de Mayo de 2015
ind = find(I == 1);
r = randperm(numel(ind));
r = r(1:n);
I(ind) = 0;
2 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Image Processing Toolbox 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!