MATLAB Answers

How to import a .MAP OMNIC picta file into matlab

8 views (last 30 days)
Taranvir Bedi
Taranvir Bedi on 12 Apr 2021
Answered: Subhadeep Koley on 14 Apr 2021
Hi ,
I wanted to import a .MAP file into matlab. The map is hyperspectral data and I would like to extract the x, y coordinates for each point, and a spectrum at each point, there are around 2500 pixels. I have found nothing on the web about importing OMNIC Picta .MAP files
What code or function could I use to import and extract this data, I cannot attach the .MAP file but I can send it via email if that helps,
Thanks in advance :)
  2 Comments
Taranvir Bedi
Taranvir Bedi on 14 Apr 2021
Hi @Subhadeep Koley , there are 51x51 pixel points , and a spectrum at each point (2601), each spectrum has 432 data points

Sign in to comment.

Answers (1)

Subhadeep Koley
Subhadeep Koley on 14 Apr 2021
As, .MAP is not a standard file format. It is difficult to provide exact solution.
However, if the .MAP file is a binary file, you can try using multibandread(_). However, in order to use multibandread(_) apart from height, width, bands, you'll also need precision, header offset, interleave value and byte order of your data.
Below is one example, you can tweak these parameters to check if that works for you.
% Specify the parameters
precision = 'double';
headerOffset = 0;
interleave = 'bsq';
byteOrder = 'ieee-le';
% Read the data
data = multibandread('yourFile.MAP',[51, 51, 432], precision, headerOffset, interleave, byteOrder);

Community Treasure Hunt

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

Start Hunting!