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

1 回表示 (過去 30 日間)
Anushka
Anushka 2015 年 5 月 28 日
コメント済み: Anushka 2015 年 5 月 28 日
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 Center および File ExchangeImages についてさらに検索

タグ

タグが未入力です。

Community Treasure Hunt

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

Start Hunting!

Translated by