Thursday 25 July 2013

Read Landsat Image on Matlab

Here we give some example for read lan file on matlab.


clc
clear all
close all


file = 'lansetimgfile.lan';


IR1 = multibandread(file, [512, 512, 7], 'uint8=>uint8',...
                    128, 'bil', 'ieee-le', {'Band','Direct',[1]});

IR2 = multibandread(file, [512, 512, 7], 'uint8=>uint8',...
                    128, 'bil', 'ieee-le', {'Band','Direct',[2]});

IR3 = multibandread(file, [512, 512, 7], 'uint8=>uint8',...
                    128, 'bil', 'ieee-le', {'Band','Direct',[3]});

IR4 = multibandread(file, [512, 512, 7], 'uint8=>uint8',...
                    128, 'bil', 'ieee-le', {'Band','Direct',[4]});

IR5 = multibandread(file, [512, 512, 7], 'uint8=>uint8',...
                    128, 'bil', 'ieee-le', {'Band','Direct',[5]});

IR6 = multibandread(file, [512, 512, 7], 'uint8=>uint8',...
                    128, 'bil', 'ieee-le', {'Band','Direct',[6]});

IR7 = multibandread(file, [512, 512, 7], 'uint8=>uint8',...
                    128, 'bil', 'ieee-le', {'Band','Direct',[7]});

figure;imshow(IR);
title('1st Band Image');

figure;imshow(IR);
title('2rd Band Image');

figure;imshow(IR);
title('3rd Band Image');

figure;imshow(IR);
title('4th Band Image');

figure;imshow(IR);
title('5th Band Image');

figure;imshow(IR);
title('6th Band Image');

figure;imshow(IR);
title('7th Band Image');


Related Tags : Matlab code for read lan file, Read Landsat Image matlab code , read lan file in matlab example code.

Kindly Bookmark and Share it:

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...