Simple question, how to read in a color band file?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi, I am very new to image manipulations and MatLab. How do I properly read in a color band into MatLab. For example, I have three .raw files, named band1.raw, band2.raw, and band3.raw representing blue-green, green, and red. The following is an example of reading in a thermal infrared band. How can I read in, for example, the green band file?
Thank you.
thermal_ir = fread( fopen( 'band_thermal_ir.raw', 'r'), [1000 1000], '*uint8')';
%The following is my guess.
green = fread( fopen( 'band_thermal_ir.raw', 'r'), [1000 1000], '*uint8')';
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 2 Mär. 2023
You got the filename wrong. You can't use the same name for the green band as for the thermal band, so try this:
thermalBand = fread( fopen('band_thermal_ir.raw', 'r'), [1000, 1000], '*uint8')';
% The following is my guess.
% Read in blue-green band.
blueGreenBand = fread(fopen('band1.raw', 'r'), [1000, 1000], '*uint8')';
% Read in green band.
greenBand = fread(fopen('band2.raw', 'r'), [1000, 1000], '*uint8')';
% Read in red band.
redBand = fread(fopen('band3.raw', 'r'), [1000, 1000], '*uint8')';
3 Kommentare
Weitere Antworten (1)
Nikhilesh
am 2 Mär. 2023
To read in a color band file, you can follow a similar approach as the thermal infrared band example you provided.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!