-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdemo.m
executable file
·41 lines (36 loc) · 986 Bytes
/
demo.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
35
36
37
38
39
40
41
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% CONTRAST MAXIMISATION BRANCH AND BOUND
%
%
% This package contains the source code which implements the
% Contrast maximisation BnB algorithm (CMBnB) in
%
% Globally Optimal Contrast Maximisation for Event-based
% Motion Estimation
%
% The source code, binaries and demo are supplied for academic use only.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear all
close all
addpath matlab_functions
addpath mex
% Read data
format long
path = 'data';
savepath = 'data';
[event,K] = read(path);
seq = event.seq;
intrinic = [K(1) 0 0; 0 K(2) 0; K(3) K(4) 1]';
radial = [K(5) K(6) K(9)];
tang = [K(7) K(8)];
CameraPar = cameraParameters('IntrinsicMatrix',intrinic,...
'RadialDistortion',radial,'TangentialDistortion',tang);
parameter
IK = CameraPar.IntrinsicMatrix;
% run methods
plot_input;
drawnow
CM;
bnb_all;
plot_result;