-
Notifications
You must be signed in to change notification settings - Fork 4
/
testMotionBlur.m
34 lines (28 loc) · 1.01 KB
/
testMotionBlur.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
addpath('helpers');
addpath('keyframe_imu');
addpath('../MATLAB/utils');
addpath('kitti/devkit');
addpath('kitti');
%Train
dataBaseDir = '/home/valentin/Desktop/KITTI/2011_09_26/2011_09_26_drive_0036_sync';
dataCalibDir = '/home/valentin/Desktop/KITTI/2011_09_26';
% Get ground truth and import data
frameRange = 1:200;
%Image data
monoImageData = loadImageData([dataBaseDir '/image_00'], frameRange);
%IMU data
[imuData, imuFrames] = loadImuData(dataBaseDir, monoImageData.timestamps);
%Ground Truth
T_wIMU_GT = getGroundTruth(dataBaseDir, imuFrames);
%%
for image_i = 3:size(monoImageData.rectImages,3)
if norm(imuData.measOmega(:, image_i)) > 0.2
printf('Blurring image %d', image_i)
blurredImage = 0.5*mat2gray(monoImageData.rectImages(:,:,image_i)) + 0.25*mat2gray(monoImageData.rectImages(:,:,image_i-1)) + 0.25*mat2gray(monoImageData.rectImages(:,:,image_i-2));
imshow(blurredImage);
else
imshow(mat2gray(monoImageData.rectImages(:,:,image_i)));
end
drawnow();
pause(0.03);
end