4.5

4.5 | 2 ratings Rate this file 177 downloads (last 30 days) File Size: 3 KB File ID: #15629

ENVI file reader, version 2

by Ian Howat

 

19 Jul 2007 (Updated 06 Nov 2009)

Code covered by BSD License  

Read ENVI raster files. Supports all interleaves, data types (except complex) and byte orders.

Download Now | Watch this File

File Information
Description

I = ENVIREAD(FILENAME) Reads an ENVI binary file into an array using the information from the corresponding header file FILENAME.hdr. The output structure I contains fields I.x, I.y, I.z and I.info containing the x-coordinate vector, y-coordinate vector, images data and header info, respectively. I.z will be in whatever number format (double, int, etc.) as in the envi file.

I= ENVIREAD(FILENAME,HEADERFILE); Uses the header information in headerfile.
'
Thanks to Yushin Ahn for his modifications.
NOTES:
-Geo-registration does not currently support rotated images.
- No support for importing complex data .

MATLAB release MATLAB 7.2 (R2006a)
Zip File Content  
Other Files enviread.m,
license.txt
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
20 Jul 2007 Ian Howat

Notice (7/19/2007) There's a bug in the current version that keeps it from loading 1-band images correctly. I've uploaded an update, so you'll want to wait and download when the system posts the revised version on 7/20/2007.

25 Jul 2007 Ian Howat

If the map/image coordinates in the map info in the header are not the upper left corner (1.5,1.5), the program will not create the correct X Y vectors. I've uploaded a fix for this.

18 Jan 2008 Cuneyt Utku

Very useful. Code is easy to follow.
I downloaded it on Jan 18, 2008. It is version 1, dated 11-Jul-2007 and apparently still has the bugs mentioned above.

26 Oct 2009 Carlos Esquerre

It works pretty good. I made a small modification to read files without geographical information since I work with hyperspectral image of mushrooms.

Please login to add a comment or rating.
Updates
20 Jul 2007

updated description and added screen shot

20 Jul 2007

Fixed bug that prevented single-band files from loading correctly.

26 Jul 2007

-Fixed problem with reading image coordinates when a point other than the upper left corner is in the header. The fields info.map_info.ulx and uly are now mapx and mapy to reflect this.

02 Aug 2007

Added support for all formats except complex and double complex.

02 Aug 2007

Fixed summary.

06 Nov 2009

-Inserted envireadhdr function as a subfunction.
-changes output to be structure format
-modified fread loop to handle larger files.

Tag Activity for this File
Tag Applied By Date/Time
data import Ian Howat 22 Oct 2008 09:19:43
data export Ian Howat 22 Oct 2008 09:19:43
envi Ian Howat 22 Oct 2008 09:19:43
import Ian Howat 22 Oct 2008 09:19:43
io Ian Howat 22 Oct 2008 09:19:43
read Ian Howat 22 Oct 2008 09:19:43
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com