How do I change image background to red
Show older comments
I have an image with black background, which I got from imfreehand function. I want to change that black background to red. Following is link for image.
Accepted Answer
More Answers (2)
Ravi Shekhar
on 29 Mar 2018
0 votes
Hi, you can use following MATLAB code to change the color scheme of a gray image.
gray_image = imread('cameraman.tif');
map = colormap('autumn');
rgb_image = ind2rgb(gray_image,map);
You can get different color schemes under 'colormap' function in MATLAB.
hf fh
on 19 Sep 2018
0 votes
Please help me I have an image and I want to make the background color white I used the previous method but did not good out with me
5 Comments
Image Analyst
on 19 Sep 2018
OK. How can we help you (given what you've supplied us so far)?
Image Analyst
on 20 Sep 2018
Why do you want or need the background to be white? I don't see what purpose it would serve? It seems totally unnecessary to me. Please justify why you think you need it to be white.
hf fh
on 20 Sep 2018
To make sure there is no noise in the image and also make sure the edges of the image
Image Analyst
on 20 Sep 2018
Making the surround white does not make sure there is no noise in the image. And you didn't finish the second part of the sentence about making sure the edges.....are what?
Categories
Find more on Red 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!