Making a new Colored "TIF" and "RGB" image out of Landsat-8 Geotiff image(11 separate bands)

10 次查看(过去 30 天)
Hi There,
I've downloaded a Landsat-8 image from USGS website, and now I have all the 11 bands(12 images and Metadata file), But all of them are gray-scale images, I want to:
1. Create an RGB Image and, 2. Create a new colored TIF image
out of proper bands,
To the best of my knowledge, color channels/Bands are as follows: Blue: Band_2 Green: Band_3 Redd: Band_4.
In order to make an RGB file I tried to combine them using the following code:
File_Name = File_Name_B2.TIF
[B2, ~] = geotiffread(File_Name);
File_Name = File_Name_B3.TIF
[B3, ~] = geotiffread(File_Name);
File_Name = File_Name_B4.TIF
[B4, ~] = geotiffread(File_Name);
RGB_Image = cat(3, B4, B3, B2);
but result image is still in gray-scale format.
Any help is appreciated.

回答(1 个)

Chad Greene
Chad Greene 2016-7-14
I wrote a function to do this for Landsat 8, but it's basically the same method you use. Check out L8read.
  2 个评论
Cyrus
Cyrus 2016-7-15
Hi Chad,
Thank you so much for the code, I used it in my code, as follows:
RGB_Image = L8read(Folder_Name);
figure(), imshow(RGB_Image, []), title('RGB Image')
But the result is still in gray-scale format. Do you have any suggestions about it?
Thanks
Chad Greene
Chad Greene 2016-7-17
Without an example it's hard to know exactly what's going on. Are you sure it's not just low light that makes it appear grayscale? Try
RGB_Image = L8read(Folder_name,'stretch');

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Import, Export, and Conversion 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by