I have a grayscale jpeg image X. I want to change its pixel value. For example change pixel at (14,20) to 1,How can I do it. I tried the following but it doesn't WORK:
Xc=X; %Xc is image with a pixel value changed from X[X is original image]
X(14,20); %What is the value at 14,20
Xc(14,20)=1 %Change Pixel value at 14,20 to 1
When i view its values in Variable Editor,I don't get value changed at (14,20) in Xc image.
What are the Errors or suggestion?
Best Answer