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

 채택된 답변

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

댓글 수: 1

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

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Images에 대해 자세히 알아보기

태그

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

질문:

2015년 5월 28일

댓글:

2015년 5월 28일

Community Treasure Hunt

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

Start Hunting!

Translated by