Using MATLAB as an image editor?
显示 更早的评论
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?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Image Arithmetic 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!