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

조회 수: 1 (최근 30일)
How to randomly select n number of pixels from an image whose value is one ?

채택된 답변

Thorsten
Thorsten 2015년 5월 28일
ind = find(I == 1);
r = randperm(numel(ind));
r = r(1:n);
  댓글 수: 1
Anushka
Anushka 2015년 5월 28일
Thank you sir.After selecting this pixels How to change the values of this pixels in the image to zero.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by