I have tried this code.But I am trying to replace values in a matrix based on some conditions without loop. please reply as soon as possible.
How to replace a value in a matrix of pixels using matlab ?
1 回表示 (過去 30 日間)
古いコメントを表示
I have a 225*225 image.I don't know how to replace a pixel value using indices value.please reply as soon as possible.
Thanks in advance.
回答 (1 件)
mizuki
2017 年 2 月 14 日
If you want to replace the pixel (i,j)=(100,125) of the variable img with 0.2, use the following code:
i = 100;
j = 125;
img(i,j) = 0.2;
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Matrix Indexing についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!