Closed ducha-aiki closed 3 years ago
Fix the data precision. Otherwise the np.array generates np.float64 array by default, which leads to completely wrongly read data.
An example:
keypoints of "IMG_9614.MOV_frame000100.png" as numpy array of float32 and shape (5304, 2):
[[ 0.00000000e+00 4.25390625e+00] [-1.07374184e+08 4.08701134e+00] [ 0.00000000e+00 4.62646484e+00] ... [ 0.00000000e+00 3.49609375e+00] [ 0.00000000e+00 4.24218750e+00] [ 0.00000000e+00 3.73046875e+00]]
After modification:
array([1102., 117., 1213., ..., 720., 1195., 710.], dtype=float32)
I see, keypoints are manually initialized as kapture.Keypoints('sift', np.float32, 2), but they were being written as float64 as you noted. Thank you, I found the same error in import_nvm, I'll fix that.
Fix the data precision. Otherwise the np.array generates np.float64 array by default, which leads to completely wrongly read data.
An example:
keypoints of "IMG_9614.MOV_frame000100.png" as numpy array of float32 and shape (5304, 2):
After modification: