Source code for autocnet.matcher.suppression_funcs
import numpy as np
[docs]def response(row, edge):
"""
Suppression function that converts 'response' into 'strength'
"""
return row['response']
[docs]def correlation(row, edge):
"""
Suppression function that converts 'correlation' into 'strength'
"""
return row['correlation']
[docs]def distance(row, edge):
"""
Suppression function that converts 'distance' into 'strength'
"""
return 1 / row['distance']
[docs]def error(row, edge):
"""
Suppression function that takes the reprojection error
in a fundamental matrix as the inverse strength.
"""
key = row.name
try:
return 1 / edge.fundamental_matrix.error.loc[key]
except:
return np.NaN