@@ -95,7 +95,7 @@ def transform_camera(c):
95
95
}
96
96
if 'depth_image_path' in c :
97
97
converted ['depth_file_path' ] = "./images/" + c ['depth_image_path' ].split ('/' )[- 1 ]
98
-
98
+
99
99
by_camera [cam_id ]['frames' ].append (converted )
100
100
101
101
if len (by_camera ) != 1 :
@@ -282,7 +282,7 @@ def onMappingOutput(output):
282
282
keyFrame = output .map .keyFrames .get (frameId )
283
283
284
284
cameraPose = keyFrame .frameSet .rgbFrame .cameraPose
285
-
285
+
286
286
# Camera data
287
287
frame = {
288
288
"image_path" : f"data/{ name } /images/frame_{ index :05} .png" ,
@@ -296,13 +296,13 @@ def onMappingOutput(output):
296
296
oldImgName = f"{ args .output } /tmp/frame_{ frameId :05} .png"
297
297
newImgName = f"{ args .output } /images/frame_{ index :05} .png"
298
298
os .rename (oldImgName , newImgName )
299
-
299
+
300
300
oldDepth = f"{ args .output } /tmp/depth_{ frameId :05} .png"
301
301
newDepth = f"{ args .output } /images/depth_{ index :05} .png"
302
302
if os .path .exists (oldDepth ):
303
303
os .rename (oldDepth , newDepth )
304
304
frame ['depth_image_path' ] = f"data/{ name } /images/depth_{ index :05} .png"
305
-
305
+
306
306
if (index + 3 ) % 7 == 0 :
307
307
validationFrames .append (frame )
308
308
else :
@@ -369,7 +369,8 @@ def main():
369
369
config = {
370
370
"maxMapSize" : 0 ,
371
371
"useSlam" : True ,
372
- "rotateMapOnFirstNCandidates" : 200 ,
372
+ "rotateMapOnFirstNCandidates" : 20 ,
373
+ "rotateMapThresholdDegrees" : 0.5 ,
373
374
"keyframeDecisionDistanceThreshold" : args .key_frame_distance ,
374
375
"icpVoxelSize" : min (args .key_frame_distance , 0.1 ),
375
376
"mapSavePath" : f"{ args .output } /points.sparse.csv"
@@ -386,7 +387,7 @@ def main():
386
387
# remove these to further trade off speed for quality
387
388
mid_q = {
388
389
'maxKeypoints' : 1000 ,
389
- 'optimizerMaxIterations' : 10
390
+ 'optimizerMaxIterations' : 30
390
391
}
391
392
for k , v in mid_q .items (): config [k ] = v
392
393
0 commit comments