필터 지우기
필터 지우기

Save hyperspectral image with all the bands

조회 수: 20 (최근 30일)
Federica Frontera
Federica Frontera 2023년 12월 22일
답변: Abhishek Tripathi 2023년 12월 26일
Hello!
I have 97 .tiff files, one per band of my hyperspectral camera.
I want to create a single file containing all the bands to then be imported and analysed in ENVI.
I know previous researchers successfully used the command multibandwrite, but somehow it does not work for me. The output actually exists, but there is no information in the file properties (dimensions, width, height, resolution...)
Could you please help me? Here is my code.
Thank you!
%Cube with all the bands of the k-image analysed in the cycle
data = zeros(1010,1010,97);
%Reading using Tiff structure + insert into the cube with k-images and j-bands
for k = 1:13
for j = 1:97
t = Tiff(strcat('Undistorted\Fig_',num2str(k),'\F',num2str(k),'_b',num2str(j),'.tif'),'r');
data(:,:,j) = read(t);
end
%Writing the multiband file
multibandwrite(data, strcat('Undistorted\Fig_',num2str(k),'\Figure',num2str(k),'_full.tif'), 'bsq', 'precision', 'float', 'machfmt', 'ieee-be');
end

답변 (1개)

Abhishek Tripathi
Abhishek Tripathi 2023년 12월 26일
The enviwrite function enables you to save the image. To save your hyperspectral data in ENVI format using the enviwrite function, follow these steps:
  1. If you know the wavelengths of all 97 bands, start by creating a hypercube object using the hypercube function.
  2. Once the hypercube object is created, you can proceed to write the image using the enviwrite function.
Download our Image Processing Toolbox™ Hyperspectral Imaging Library MATLAB®
For more info. see the documentation here

카테고리

Help CenterFile Exchange에서 Hyperspectral Image Processing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by