- 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 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Abhishek Tripathi
le 26 Déc 2023
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 commentaires
Voir également
Catégories
En savoir plus sur Hyperspectral Image Processing dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!