importing a raster image into matlab
Afficher commentaires plus anciens
I have a 3 dimensional array in ENVI format (bsq format). I wonder how can I import it in Matlab.I used the following code but it's for writing a new array and not for reading an exisiting array into Matlab. I apperciate your help in advance.
rows=743; cols=210; bands=6;
filename = 'myfile';
fid = fopen(filename, 'w', 'ieee-le');
fwrite(fid, 1:rows*cols*bands, 'float');
fclose(fid);
im1 = multibandread(filename, [rows cols bands], ...
'float', 0, 'bsq', 'ieee-le' )
1 commentaire
Hassan
le 17 Avr 2011
Réponses (2)
Walter Roberson
le 15 Avr 2011
0 votes
I found a page with documentation that suggests that the multibandread() command should work, as long as you match datatypes and byte order properly.
1 commentaire
Hassan
le 17 Avr 2011
Catégories
En savoir plus sur Image Data dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!