How to open a .raw file in MATLAB

58 views (last 30 days)
Chuqi Zhong
Chuqi Zhong on 3 Jan 2019
Answered: Duncan Carlsmith on 8 Aug 2023
I'm using a hyperspectral analyzer to analyse something, and I got four files from it. They are .bmp, .dci, .hdr and .raw, .bmp is the picture obviously. Now I have no idea how to use MATLAB to open the .raw file. So I really need some help, I have been thinking it for weeks.
Here are some information from the .dci and .hdr :
Camera=DUALIX SENSOR; Red=81; Green=51; Blue=32; ExposureTime=5.000000; Gain=2.000000; ObjectDistance=-232.811111; samples=800; lines=1380; bands=150; file type= ENVI Standard; data type=12; wavelength units= nm; binning={2,8}; wavelength={.......}

Answers (2)

Prakhar Jain
Prakhar Jain on 7 Jan 2019

Duncan Carlsmith
Duncan Carlsmith on 8 Aug 2023
Some references applicable to "rgb" "raw" and dng are
To read a "raw," you will need to know about format. imfinfo may help unpack that. I rather learned that the hard way discovering APPLE's ProRAW is not "raw" at all. Instead the DNG produced is compressed dng. Adobe's converter uncompresses to dng and this is not raw. Instead it contains a linearized processed (demosaiced) 3d array along with a linearization curve in the first SubIFD along with various previews in ohter SubIFDs. See https://kirkville.com/apples-new-proraw-photo-format-is-neither-pro-nor-raw/

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!