0% found this document useful (0 votes)
31 views1 page

Image Processing with MATLAB Code

The document shows code to separate the red, green, and blue channels of an image and crop a region of the image using MATLAB commands like imread, imtool, imcrop, and cat.

Uploaded by

aqheela zainfa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views1 page

Image Processing with MATLAB Code

The document shows code to separate the red, green, and blue channels of an image and crop a region of the image using MATLAB commands like imread, imtool, imcrop, and cat.

Uploaded by

aqheela zainfa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

>> L = imread ('qheelakpixel3.

jpeg');
>> imtool (L)
>> R = L(:,:,1);
>> G = L(:,:,2);
>> B = L(:,:,3);
>> Red = cat (3,R,G*0,B*0);
>> Green = cat (3,R*0,G,B*0);
>> Blue = cat (3,R*0,G*0,B);
>> figure, imshow (Red);
>> figure, imshow (Green);
>> figure, imshow (Blue);
>> LAKK = imcrop (L,[1 12 50 2]);
>> imshow (LAKK);
>> imtool (LAKK);
>> R = LAKK(:,:,1);
>> G = LAKK(:,:,2);
>> B = LAKK(:,:,3);
>> Red = cat (3,R,G*0,B*0);
>> Green = cat (3,R*0,G,B*0);
>> Blue = cat (3,R*0,G*0,B);
>> figure, imshow (Green)
figure, imshow (Green)

Error: Expression or statement is incorrect--possibly unbalanced (, {, or [.

Did you mean:


>> figure, imshow (Red);
>> imtool (EHS)
>>

You might also like