Could someone please explain to me what the code below does?especially the part after the image is converted to ycbcr ... i m new to matlab . i found this on this on some site? your help will be greatly appreciated.
Show older comments
nspace1=rgb2ycbcr(ims);
nspace2= rgb2ycbcr(imt);
ms=double(nspace1(:,:,1));
mt=double(nspace2(:,:,1));
m1=max(max(ms));
m2=min(min(ms));
m3=max(max(mt));
m4=min(min(mt));
d1=m1-m2;
d2=m3-m4;
% Normalization
dx1=ms;
dx2=mt;
dx1=(dx1*255)/(255-d1);
dx2=(dx2*255)/(255-d2);
[mx,my,mz]=size(dx2);
Accepted Answer
More Answers (1)
n
on 16 Oct 2012
2 Comments
Image Analyst
on 16 Oct 2012
You're copying the red channel into the green channel and the blue channel. So it will be an RGB color image but will appear as grayscale because all three color channels are the same (the same as the original red channel).
redChannel = imt(:, :, 1);
greenChannel = imt(:, :, 2);
blueChannel = imt(:, :, 3);
but now you have all three being the redChannel because you copied it in.
n
on 7 Nov 2012
Categories
Find more on Introduction to Installation and Licensing 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!