Using MATLAB as an image editor?
Show older comments
I know that MATLAB isn't the simplest tool to edit photos, yet here I am. I am trying to alter the colors of a photo by using MATLAB by certain percentages for red, green, and blue. I am aware of how MATLAB interprets .jpg's with three layers in RGB order, yet I am not sure where I am going wrong. So far I have:
>>a=imread('file_name','jpg');
>>a=0*a(:,:,1);
>>image(a)
Since red is the first layer, shouldn't my image look the same but just be stripped of all red? My other concern is that it changes my 637x800x3 matrix for the original image to just 637x800. Is this a concern?
Also, if I wanted to alter all three layers then stack them again to get a single image, how would I go about doing that with 3 separate 637x800 matrices?
Accepted Answer
More Answers (0)
Categories
Find more on Image Arithmetic 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!