I have a binary Band Sequential (1-band, BSQ file), which is an unsigned 16-bit (2-byte) integer.
Currently I'm reading the whole (image) through multibandread:
img=multibandread('IMAGE.bsq',[400 400 1],'uint16',0,'bsq','n');
What process in MATLAB would allow me to read both bytes individually? i.e. I would like to read the file into 2 new arrays in MATLAB e.g. byte1 (400x400x1) and byte2 (400x400x1).
Can this be achieved through fread? I note in the 'precision' section it is possible to skip source values (e.g. 'N*source=>output'), but I'm unsure of the exact process.
'uint8'instead of'uint16', obtaining the result and then dividing it into two images? Or alternatively splitting your current result into two images using bitwise operations?uint16array - would reading asuint8achieve this? (I'm more interested in the data contained in the second byte though)