-
Notifications
You must be signed in to change notification settings - Fork 3
/
main.m
74 lines (29 loc) · 1.12 KB
/
main.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
%% I. Add paths
addpath(genpath(pwd));
%% III. Create the pattern size text file.
pattern_size = input('Enter the grid size in mm:\n');
file = fopen('pattern_sz.txt', 'w+');
fprintf(file, '%d', pattern_size);
fclose(file);
copyfile('pattern_sz.txt', 'pattern_size.txt');
delete('pattern_sz.txt')
%% Flow of the calibration.
% if the centers of the micro-lenses are not known beforehand, run
% LightFieldCalib_Step1_MicroLensCenter
% Assumed that the micro-lens centers are extracted.
% I. Extract the central sub-aperture image
% % Plenoptic_GeoCalibration_Step2_Center_Image
% II. Detect the micro-lens centers near the corners.
% % centersNearWorldCorners
% III. Find the corners in the image (this works for one image only).
% % microImageCornerDetection
% IV. Find the corresponding centers that observe these corners.
% % centersFromCorners
% V. Classify micro-lenses based on focus measure
% % clusterCornerPointsLocal
% % typeClassificationUsingCircularRegion
% % makeGridTypeGeneral
% VI. Assign the correspondences
% % cornerCorrespondences
% VII. Calibrate.
% % cornerLinearSolutionManyImages