how to combine geo.tiff image combine

7 次查看(过去 30 天)
how to write the two geotiff image in one geotiff image.
my both image dimension are .m*n*2

回答(1 个)

Dolon Mandal
Dolon Mandal 2023-9-12
To write two GeoTIFF images into one GeoTIFF image in MATLAB, you can use the `geotiffwrite` function along with the `imwrite` function. Here's an example:
% Load the two images
image1 = imread('image1.tif');
image2 = imread('image2.tif');
% Combine the two images into a single 3D array
combinedImage = cat(3, image1, image2);
% Write the combined image as a GeoTIFF
geotiffwrite('combined_image.tif', combinedImage, R, 'GeoKeyDirectoryTag', info.GeoTIFFTags.GeoKeyDirectoryTag);
Hope it helps!

类别

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