1import os 2import numpy as np 3 4# Putting this in cython was giving strange bugs for different versions 5# of cython which seemed to indicate troubles with the __file__ variable 6# not being defined. Keeping it in pure python makes it more reliable 7this_dir = os.path.dirname(__file__) 8POS = np.loadtxt(os.path.join(this_dir, "orb_descriptor_positions.txt"), 9 dtype=np.int8) 10POS0 = np.ascontiguousarray(POS[:, :2]) 11POS1 = np.ascontiguousarray(POS[:, 2:]) 12