⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 x444_to_422_to_444_stopfcn.asv

📁 用于视频压缩编码中的RGB信号到色差信号变换的VHDL程序
💻 ASV
字号:
y_value =yout';
cr_value=crout';
cb_value=cbout';

y_42_value =yout_42';
cr_42_value=crout_42';
cb_42_value=cbout_42';

y_44_value =yout_44';
cr_44_value=crout_44';
cb_44_value=cbout_44';

red_value=redout';
grn_value=grnout';
blu_value=bluout';

red_image=[];grn_image=[];blu_image=[];
y_image=[];   cr_image=[]; cb_image=[];
y_42_image=[];   cr_42_image=[]; cb_42_image=[];
y_44_image=[];   cr_44_image=[]; cb_44_image=[];
for j= 1:height
      y_image(j,1:width)=  y_value(((j-1)*width)+1:j*width);
     cr_image(j,1:width)= cr_value(((j-1)*width)+1:j*width);
     cb_image(j,1:width)= cb_value(((j-1)*width)+1:j*width);
      y_42_image(j,1:width)=  y_42_value(((j-1)*width)+1:j*width);
     cr_42_image(j,1:width/2)= cr_42_value(((j-1)*width/2)+1:j*width/2);
     cb_42_image(j,1:width/2)= cb_42_value(((j-1)*width/2)+1:j*width/2);
      y_44_image(j,1:width)=  y_44_value(((j-1)*width)+1:j*width);
     cr_44_image(j,1:width)= cr_44_value(((j-1)*width)+1:j*width);
     cb_44_image(j,1:width)= cb_44_value(((j-1)*width)+1:j*width);
    red_image(j,1:width)=red_value(((j-1)*width)+1:j*width);
    grn_image(j,1:width)=grn_value(((j-1)*width)+1:j*width);
    blu_image(j,1:width)=blu_value(((j-1)*width)+1:j*width);
end

figure;
subplot(2,3,1),  subimage(uint8(y_42_image));title('Y 4:2:2 Output');
subplot(2,3,2), subimage(uint8(cr_42_image));title('Cr 4:2:2 Output');
subplot(2,3,3), subimage(uint8(cb_42_image));title('Cb 4:2:2 Output');
subplot(2,3,4),  subimage(uint8(y_44_image));title('Y 4:4:4 Output');
subplot(2,3,5), subimage(uint8(cr_44_image));title('Cr 4:4:4 Output');
subplot(2,3,6), subimage(uint8(cb_44_image));title('Cb 4:4:4 Output');
figure;
subplot(2,3,1), subimage(uint8(red_image));title('Red Output');
subplot(2,3,2), subimage(uint8(grn_image));title('Grn Output');
subplot(2,3,3), subimage(uint8(blu_image));title('Blu Output');
subplot(2,3,4), subimage(uint8(y_image));title('Y Output');
subplot(2,3,5), subimage(uint8(cr_image));title('Cr Output');
subplot(2,3,6), subimage(uint8(cb_image));title('Cb Output');

returned_image(:,:,1)=red_image;
returned_image(:,:,2)=grn_image;
returned_image(:,:,3)=blu_image;

difference_image=image-returned_image;
%difference_image(:,:,1)=full_contrast(difference_image(:,:,1));
%difference_image(:,:,2)=full_contrast(difference_image(:,:,2));
%difference_image(:,:,3)=full_contrast(difference_image(:,:,3));
figure;
subplot(1,3,1), subimage(uint8(difference_image(:,:,1)));title('Red Error');
subplot(1,3,2), subimage(uint8(difference_image(:,:,2)));title('Green Error');
subplot(1,3,3), subimage(uint8(difference_image(:,:,3)));title('Blue Error');

figure;imshow(uint8(difference_image));title('Error');


    

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -