adjust percentage of red green blue in RGB
Show older comments
hi,
I need to change the percentage color for a picture between red green blue. For example, when I put a number, like 50% of red. The picture should show more red. moreover, when I need to show 30% less blue, the picture should be less blue. However, I don't know how to set up how many percentage will change in the picture. I am using imread to run out the file.
Here is what I got.
filename= input(‘Enter the name of your file ’, ‘s’);
fileformat= input (‘Enter the format of your file ’, ‘s’);
Redpercent = input(‘The percent change in red level ’);
X= imread(filename, fileformat);
X= double(X);
X= X/255;
X(:,:,1)= 2*X(:,:,1);
X(X(:,:,1)>1)=1
Accepted Answer
More Answers (0)
Categories
Find more on Image Processing Toolbox 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!