Skip to content

Commit ea04103

Browse files
Adding option for user to select Interval for offset search
1 parent a5926f0 commit ea04103

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/agiSync.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,20 @@ def estimateOffset():
1515
minOff,maxOff = sync.sync(logPath,imagesPath,None)
1616
print('\nMin: '+ str(minOff)+'\tMax: '+str(maxOff))
1717

18-
offset = minOff
18+
19+
minOff = PhotoScan.app.getFloat('Min. offset (s):',minOff)
20+
maxOff = PhotoScan.app.getFloat('Max. offset (s):',maxOff)
21+
1922
interval = maxOff - minOff
2023
step = interval/PhotoScan.app.getInt('Get number of steps for the offset search (%2.0fs interval)'%(int(interval)),50)
24+
25+
# Run iteration
26+
offset = minOff
2127
while offset<maxOff:
2228
sync.sync(logPath, imagesPath,offset)
2329
agisoftUtil.applyGeoreference(imagesPath)
2430
error = agisoftUtil.getTotalError()
25-
print('offset:{:8.1f}s \terror: {:8.2f}m'.format(offset,error)+' - '+'|'*int(error*3))
31+
print('offset:{:8.1f}s \terror: {:8.2f}m'.format(offset,error)+' - '+'|'*int(error/2))
2632
PhotoScan.app.update()
2733
offset = offset +step;
2834

0 commit comments

Comments
 (0)