Split an image into two sets
古いコメントを表示
Hi, I need to split an image into two sets of pixels A and B, each randomly containing half of the pixels (using the rand function). Thanks in advance for any help.
回答 (1 件)
Matt J
2019 年 10 月 27 日
N=numel(yourImage);
indices=randperm(N,round(N/2));
A=yourImage(indices);
B=yourImage; B(indices)=[];
1 件のコメント
Simona Neacsu
2019 年 10 月 30 日
カテゴリ
ヘルプ センター および File Exchange で Image Processing Toolbox についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!