-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRapidBA.cpp
More file actions
103 lines (81 loc) · 3.55 KB
/
Copy pathRapidBA.cpp
File metadata and controls
103 lines (81 loc) · 3.55 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/*
Copyright [2024] [Yao Yao]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#include "RapidBA.h"
#include "GroupModel.h"
#include <iostream>
#include "kernel.h"
#include "DiscreteModel.h"
#include "UniversalModel.h"
namespace rba {
ShutterType IModel::getShutterType() const {return ShutterType::kGlobal;}
bool IModel::hasRollingShutter() const {return isRolling(getShutterType());}
//template <typename CaptureParamsType>
//bool IDiscreteModel<CaptureParamsType>::isGrouped() const {return false;}
bool IGroupModelBase::isGrouped() const {return true;}
template <ShutterType shutterType>
IGroupModelF2C2D5<shutterType>* createGroupModelF2C2D5() {
return new grouped::GroupModel<TraitsGrpF2C2D5Template<shutterType>>();
}
template <ShutterType shutterType>
IGroupModelF2D5<shutterType>* createGroupModelF2D5() {
return new grouped::GroupModel<TraitsGrpF2D5Template<shutterType>>();
}
template <ShutterType shutterType>
IGroupModelF1C2D5<shutterType>* createGroupModelF1C2D5() {
return new grouped::GroupModel<TraitsGrpF1C2D5Template<shutterType>>();
}
template <ShutterType shutterType>
IGroupModelF1D5<shutterType>* createGroupModelF1D5() {
return new grouped::GroupModel<TraitsGrpF1D5Template<shutterType>>();
}
template <ShutterType shutterType>
IGroupModelF1D2<shutterType>* createGroupModelF1D2() {
return new grouped::GroupModel<TraitsGrpF1D2Template<shutterType>>();
}
template <ShutterType shutterType>
IGroupModelF1<shutterType>* createGroupModelF1() {
return new grouped::GroupModel<TraitsGrpF1Template<shutterType>>();
}
template <ShutterType shutterType>
IGroupModelF2C2<shutterType>* createGroupModelF2C2() {
return new grouped::GroupModel<TraitsGrpF2C2Template<shutterType>>();
}
template <ShutterType shutterType>
IGroupModelF2<shutterType>* createGroupModelF2() {
return new grouped::GroupModel<TraitsGrpF2Template<shutterType>>();
}
#define INSTANTIATE_CREATE_GROUP_MODEL(shutter) \
template IGroupModelF2C2D5<shutter>* createGroupModelF2C2D5(); \
template IGroupModelF2D5<shutter>* createGroupModelF2D5(); \
template IGroupModelF1C2D5<shutter>* createGroupModelF1C2D5(); \
template IGroupModelF1D5<shutter>* createGroupModelF1D5(); \
template IGroupModelF1D2<shutter>* createGroupModelF1D2(); \
template IGroupModelF1<shutter>* createGroupModelF1(); \
template IGroupModelF2C2<shutter>* createGroupModelF2C2(); \
template IGroupModelF2<shutter>* createGroupModelF2();
INSTANTIATE_CREATE_GROUP_MODEL(ShutterType::kGlobal)
INSTANTIATE_CREATE_GROUP_MODEL(ShutterType::kRollingFixedVelocity)
INSTANTIATE_CREATE_GROUP_MODEL(ShutterType::kRolling1D)
INSTANTIATE_CREATE_GROUP_MODEL(ShutterType::kRolling1DLoc)
INSTANTIATE_CREATE_GROUP_MODEL(ShutterType::kRolling3D)
#undef INSTANTIATE_CREATE_GROUP_MODEL
IUniversalModel* createUniversalModel(bool useGroupModel, IModel::IntriType intriType, ShutterType shutterType) {
return new UniversalModel(useGroupModel, intriType, shutterType);
}
IDiscreteModelF1D2* createDiscreteModelF1D2() {
return new DiscreteModel<TraitsDisF1D2>();
}
IDiscreteModelF1* createDiscreteModelF1() {
return new DiscreteModel<TraitsDisF1>();
}
}