How to replace a value in a matrix of pixels using matlab ?
Show older comments
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 Comment
dhaarani chandrasekaran
on 14 Feb 2017
Answers (1)
mizuki
on 14 Feb 2017
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;
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!