why we convert rgb image to double precision before applying the transformation formula that convert from rgb to ycbcr?
rgb = im2double(in);
% These equations transform RGB in [0,1] to YCBCR in [0, 255]
out(:,:,1) = 16 + 65.481 * rgb(:,:,1) + 128.553 * rgb(:,:,2) + 24.966 * rgb(:,:,3);
out(:,:,2) = 128 - 37.797 * rgb(:,:,1) - 74.203 * rgb(:,:,2) + 112 * rgb(:,:,3);
out(:,:,3) = 128 + 112 * rgb(:,:,1) - 93.786 * rgb(:,:,2) -18.214 * rgb(:,:,3);