cogsys-tuebingen / deephs_fruit

Measuring the ripeness of fruit with Hyperspectral Imaging and Deep Learning
42 stars 13 forks source link

How can data images be seen #12

Closed divya9118 closed 10 months ago

divya9118 commented 10 months ago

All the images in dataset are in .bin format. In case I want to convert them to RGB images or I want to see them, Then how can I do this. I tried multiple code to convert bin file to image but none of them is working out. Or you can tell how you encode the images

leonvarga commented 10 months ago

The hyperspectral images are encoded in the envi-format, which is common for hyperspectral data. The RGB conversion is not straightforward, as you have to consider the impact of the different wavelengths of the RGB channels. (CIE-matrix -> XYZ -> RGB -> Gamma correction). If you are not familiar with this kind of transformation, I would recommend you to look into https://www.spectralpython.net/ This library supports the envi format and the RGB conversion.