Dear Community,
I am recording a video with a Thermal camera (gige). The recorded data has a 16uint format. When playing the video with the implay command, the video file format is transfered to 8uint, in where all the data is being devided by 256. Due to this process, I only get the same intensity value (206) and thus all the details of the video are being lost. Does someone know how to play a 16uint video in Matlab? Attached you can find my script.
clear all, clc, close all
Winvideoinfo = imaqhwinfo('winvideo');
Gigeinfo = imaqhwinfo('gige');
% imaqmex('feature','-limitPhysicalMemoryUsage',false);
v1 = videoinput('winvideo','2');
v2 = videoinput('gige');
s1 = v1.Source;
s2 = v2.Source;
%%
triggerconfig(v1, 'manual');
triggerconfig(v2, 'manual');
amount_frames = 200;
v1.FramesPerTrigger = amount_frames;
v2.FramesPerTrigger = amount_frames;
v1.LoggingMode = 'disk&memory';
v2.LoggingMode = 'disk&memory';
subject_name1 = 'Visible_';
subject_name2 = 'Thermal_';
v1.DiskLogger = VideoWriter(subject_name1, 'Archival');
v2.DiskLogger = VideoWriter(subject_name2, 'Grayscale AVI');
v1.PreviewFullBitDepth = "off";
v2.PreviewFullBitDepth = "off";
%%
start([v1 v2]);
trigger([v1 v2]);
while strcmp(v1.Logging, 'on')
disp(v1.FramesAcquired)
pause(.1)
end
wait(v1, 1);
[frames1, timestamps1] = getdata(v1, v1.FramesPerTrigger);
[frames2, timestamps2] = getdata(v2, v2.FramesPerTrigger);
handle1 = implay(frames1);
handle2 = implay(frames2);
handle1.Parent.Position = [200 100 740 680];
handle2.Parent.Position = [940 100 740 680];
implay(handle1.DataSource.Controls)
implay(handle2.DataSource.Controls)
%%
delete(v2)
clear v2
delete(v1)
clear v1