my_yuv2rgb

PURPOSE ^

MY_YUV2RGB computes the true color image RGB given a true color YUV image by

SYNOPSIS ^

function RGB=my_yuv2rgb(YUV);

DESCRIPTION ^

 MY_YUV2RGB computes the true color image RGB given a true color YUV image by
 using the matrix:

   Myuv_rgb =

    1.0000    0.0000    1.3707
    1.0000   -0.3365   -0.6982
    1.0000    1.7324    0.0000

 MY_RGB2YUV is its inverse

 USE: RGB=my_yuv2rgb(YUV);

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 
0002 % MY_YUV2RGB computes the true color image RGB given a true color YUV image by
0003 % using the matrix:
0004 %
0005 %   Myuv_rgb =
0006 %
0007 %    1.0000    0.0000    1.3707
0008 %    1.0000   -0.3365   -0.6982
0009 %    1.0000    1.7324    0.0000
0010 %
0011 % MY_RGB2YUV is its inverse
0012 %
0013 % USE: RGB=my_yuv2rgb(YUV);
0014 
0015 function RGB=my_yuv2rgb(YUV);
0016 
0017 Mrgb_yuv =[0.2990    0.5870    0.1140;-0.1726   -0.3388    0.5114;0.5114   -0.4282   -0.0832];
0018 Myuv_rgb = inv(Mrgb_yuv);
0019 
0020 YUV=double(YUV);
0021 RGB=YUV;
0022 
0023 RGB(:,:,1)=Myuv_rgb(1,1)*YUV(:,:,1)+Myuv_rgb(1,2)*YUV(:,:,2)+Myuv_rgb(1,3)*YUV(:,:,3);
0024 RGB(:,:,2)=Myuv_rgb(2,1)*YUV(:,:,1)+Myuv_rgb(2,2)*YUV(:,:,2)+Myuv_rgb(2,3)*YUV(:,:,3);
0025 RGB(:,:,3)=Myuv_rgb(3,1)*YUV(:,:,1)+Myuv_rgb(3,2)*YUV(:,:,2)+Myuv_rgb(3,3)*YUV(:,:,3);

Generated on Fri 07-Mar-2014 13:29:20 by m2html © 2005