Closed DonMuv closed 3 years ago
Hi,
utmQ
and utmDb
are simply N*2 numpy arrays where each row contains the x
& y
coordinates of a query / reference place. The posDistThr
scalar is the ground truth tolerance (typically in meters). See
https://github.com/QVPR/Patch-NetVLAD/blob/4edee2f3e4e0173b101ae5b4506151e7cdb899d0/patchnetvlad/tools/datasets.py#L64-L65
for relevant code snippets.
But my ground truth file, the poses of the images come in the format of a 7 feature vector (t_x, t_y, t_z, q_x, q_y, q_z, q_w), with t corresponding to the translation vector and q to the rotation expressed in form of a quaternion.
such as [ 4.45019497e+00 8.69529027e+00 4.75170998e-01 6.67300280e-01 -2.33674360e-01 2.27086490e-01 6.69730062e-01] [... ... ] ...
pose matrix of shape = (n, 7)
Hi,
Simply modify the get_positives()
method above to define your desired ground truth tolerance. In our case, it's simply the Euclidean distance in the plane; if you want to use this simply disregard everything except for t_x
and t_y
(sth like utmQ = utmQ[:, :2]
and the same for utmDb
)
Alternatively, you could adapt get_positives
to separately have some tolerance for position (based on t
) and orientation (based on q
). You should be able to use some code from e.g. kapture to do this. utmQ
and utmDb
will be a bit confusing naming of the variables, as they will contain a matrix of size N*7, but otherwise everything else should work the same.
Feel free to re-open if you have more questions.
Hi, How to convert ground truth camera pose to utmQ or utmDb, I only have poses data, can you help me