MATLAB Answers

How to import a .MAP OMNIC picta file into matlab

9 ビュー (過去 30 日間)
Taranvir Bedi
Taranvir Bedi 2021 年 4 月 12 日
回答済み: Subhadeep Koley 2021 年 4 月 14 日
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 件のコメント
Taranvir Bedi
Taranvir Bedi 2021 年 4 月 14 日
Hi @Subhadeep Koley , there are 51x51 pixel points , and a spectrum at each point (2601), each spectrum has 432 data points

サインインしてコメントする。

回答 (1 件)

Subhadeep Koley
Subhadeep Koley 2021 年 4 月 14 日
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!

Translated by