ngchc / HSCNN-Plus

HSCNN+: Advanced CNN-Based Hyperspectral Recovery from RGB Images in CVPRW 2018 (Winner of NTIRE Challenge)
34 stars 23 forks source link

About train dataset #6

Open xuejiancai opened 3 years ago

xuejiancai commented 3 years ago

Hi,how do you get the corresponding RGB images from the hyperspectral images in the ICVL datasets? Thank you for your reply! @ngchc

opticshao commented 2 years ago

There are some methods to convert HSI images to RGB. You can refer to https://personalpages.manchester.ac.uk/staff/david.foster/Tutorial_HSI2RGB/Tutorial_HSI2RGB.html (Tutorial on Transforming Hyperspectral Images to RGB Colour Images) Or maybe you can calibrate your camera's response.

xuejiancai commented 2 years ago

I tried to generate an RGB image before, but I found that the color of the generated RGB image is quite different from the corresponding RGB image on the ICVL website. Why is this?Have you ever had such a problem?Thank you for your reply! @Hao-Xu-optics

opticshao commented 2 years ago

Maybe you forgot to execute gamma correction? And you should also consider the illuminant spectrum. In the method I recommended above, they applied a gamma correction to the result. eg: imshow(RGB_clip.^0.4, 'Border','tight'); (Matlab)

xuejiancai commented 2 years ago

Well,I followed the tutorial you posted before and should have added gamma correction. Another question is how to obtain the light source spectrum? @Hao-Xu-optics

opticshao commented 2 years ago

You can download their code for HSI2RGB, illuminant spectrum's .mat files are included. For icvl I think illum_6500k is ok.

xuejiancai commented 2 years ago

You can download their code for HSI2RGB, illuminant spectrum's .mat files are included. For icvl I think illum_6500k is ok.

ok,thanks for your suggestion!

Dave-SUN commented 2 years ago

Hello, when I run generate_data_rgb_ntire.m, matlab is always unresponsive, I don't know what's wrong with me, I hope you can give me some guidance, thank you very much. What I did was to create the folder "data" and create the folders "train_data" and "valid" in it respectively. In the folder "train_data", I created the folders "rgb_real" and "rgb_clean" respectively. In the folder "valid" create the folders "validClean" and "validReal" respectively. I'm confused, I don't know what to put in the above folders, I hope you can help me, thank you very much.