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 件)

カテゴリ

ヘルプ センター および File ExchangeImages についてさらに検索

タグ

タグが未入力です。

質問済み:

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