- If you know the wavelengths of all 97 bands, start by creating a hypercube object using the hypercube function.
- Once the hypercube object is created, you can proceed to write the image using the enviwrite function.
Save hyperspectral image with all the bands
8 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(1 个)
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:
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Hyperspectral Image Processing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!