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.
Mostra commenti meno recenti
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);
Risposta accettata
Più risposte (1)
n
il 16 Ott 2012
2 Commenti
Image Analyst
il 16 Ott 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
il 7 Nov 2012
Categorie
Scopri di più su MATLAB in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!