@@ -88,6 +88,9 @@ int main(int argc, char ** argv){
88
88
// Framework front-end
89
89
Frontend * frontend (nullptr );
90
90
91
+ // Framework data source
92
+ ViewPointSource * viewpointsource (nullptr );
93
+
91
94
// Pipeline iterations
92
95
int loopMajor (database.getGroup ());
93
96
int loopMinor (0 );
@@ -118,7 +121,7 @@ int main(int argc, char ** argv){
118
121
std::string lastFile = yamlFrontend[" last" ].IsDefined () ? yamlFrontend[" last" ].as <std::string>() : " " ;
119
122
120
123
// Front-end source
121
- ViewPointSource * viewpointsource = new ViewPointSourceFs (
124
+ viewpointsource = new ViewPointSourceFs (
122
125
yamlFrontend[" image" ].as <std::string>(),
123
126
firstFile,
124
127
lastFile,
@@ -146,7 +149,7 @@ int main(int argc, char ** argv){
146
149
std::string lastFile = yamlFrontend[" last" ].IsDefined () ? yamlFrontend[" last" ].as <std::string>() : " " ;
147
150
148
151
// Front-end source
149
- ViewPointSource * viewpointsource = new ViewPointSourceWithOdometry (
152
+ viewpointsource = new ViewPointSourceWithOdometry (
150
153
yamlFrontend[" image" ].as <std::string>(),
151
154
yamlExport[" path" ].as <std::string>() + " /sparse_transformation.dat" ,
152
155
firstFile,
@@ -186,9 +189,8 @@ int main(int argc, char ** argv){
186
189
}
187
190
}
188
191
189
- // Wait bootstrap image count
192
+ // Start optimisation only if sufficient amount of view are pushed
190
193
if (database.getBootstrap ()){
191
- // avoid optimisation
192
194
continue ;
193
195
}
194
196
@@ -299,9 +301,11 @@ int main(int argc, char ** argv){
299
301
300
302
}
301
303
302
- // Need release of :
303
- // ViewPointSource * source = NULL;
304
- // Frontend * frontend(nullptr);
304
+ // Delete frontend object
305
+ delete frontend;
306
+
307
+ // Delete viewpointsource object
308
+ delete viewpointsource;
305
309
306
310
// system message
307
311
return 0 ;
0 commit comments