caiyuanhao1998 / MST

A toolbox for spectral compressive imaging reconstruction including MST (CVPR 2022), CST (ECCV 2022), DAUHST (NeurIPS 2022), BiSCI (NeurIPS 2023), HDNet (CVPR 2022), MST++ (CVPRW 2022), etc.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

可视化生成的图片与作者百度网盘中提供的图片大小不一致

chenjiachengzzz opened this issue · comments

您好,首先感谢您做出这么棒的工作,并且无私的开源出来。在运行可视化matlab代码时,我生成的图片与作者生成的图片不一致。
frame1channel1
frame1channel1
第一张是我生成的,第二张是作者提供的,我想知道为何出现这种问题,是作者已经裁剪过图像了嘛?希望得到您的解答!

你好,感谢你的关注。用matlab可视化代码直接生成的图片是带白边的,提供在百度网盘里的图片是裁剪过后的。
你可以使用裁剪软件或者写一个裁剪代码来实现这一功能,以下是我自己写的一个裁剪代码,供你参考:

%Cut Out
clear all
method = ["MST","CST","DAUHST","MST_pp","HDNet","Truth"];
frame = 'frame1';
channel = ["channel6","channel16","channel21","channel28"];
save_dir = strcat(frame,'_simulation_compare_no_box\');
mkdir(save_dir);

for i=1:length(method)
    for j=1:length(channel)
        I = imread(strcat('simulation_results\rgb_results\',method(i),'\',frame,channel(j),'.png'));
        rect = [181 37 553 553];
        I_crop = imcrop(I,rect);
        imwrite(I_crop,strcat(save_dir,method(i),'_',channel(j),'.png'));
    end

end

你好,感谢你的关注。用matlab可视化代码直接生成的图片是带白边的,提供在百度网盘里的图片是裁剪过后的。 你可以使用裁剪软件或者写一个裁剪代码来实现这一功能,以下是我自己写的一个裁剪代码,供你参考:

%Cut Out
clear all
method = ["MST","CST","DAUHST","MST_pp","HDNet","Truth"];
frame = 'frame1';
channel = ["channel6","channel16","channel21","channel28"];
save_dir = strcat(frame,'_simulation_compare_no_box\');
mkdir(save_dir);

for i=1:length(method)
    for j=1:length(channel)
        I = imread(strcat('simulation_results\rgb_results\',method(i),'\',frame,channel(j),'.png'));
        rect = [181 37 553 553];
        I_crop = imcrop(I,rect);
        imwrite(I_crop,strcat(save_dir,method(i),'_',channel(j),'.png'));
    end

end

哇 yuanhao大哥 也太强了,太感谢您了啊。