Skip to content

Commit ac700c1

Browse files
Add MOM description to README and call in library
1 parent a597363 commit ac700c1

File tree

2 files changed

+33
-5
lines changed

2 files changed

+33
-5
lines changed

docs/usage.rst

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,49 @@ Mean Map Entropy calculcates average entropy of every point vicinity in the aggr
1818

1919
H(P) = \frac{1}{|P|}\sum_{k=1}^{|P|} h(q_k)
2020

21-
To use it, provide `pcs` --- a list of point clouds pcs in form of `open3d.PointCloud` and `Ts` --- a list of
22-
corresponding poses in the trajectory in form of `4x4` transformation matrices.
21+
To use it, provide `pcs` --- a list of point clouds pcs in the form of `open3d.PointCloud` and `Ts` --- a list of
22+
corresponding poses in the trajectory in the form of `4x4` transformation matrices.
2323

2424
.. code-block:: python
2525

2626
map_metrics.mme(pcs, Ts)
2727

2828

2929
Mean Plane Variance (MPV)
30-
----------------------
30+
-------------------------
3131

3232
Mean Plane Variance calculcates average plane variance of every point vicinity in the aggregated map:
3333

3434
.. math::
3535
V(P) = \frac{1}{|P|}\sum_{k=1}^{|P|}v(p_k) = \frac{1}{|P|}\sum_{k=1}^{|P|} \lambda_{min}
3636

37-
To use it, provide `pcs` --- a list of point clouds pcs in form of `open3d.PointCloud` and `Ts` --- a list of
38-
corresponding poses in the trajectory in form of `4x4` transformation matrices.
37+
To use it, provide `pcs` --- a list of point clouds pcs in the form of `open3d.PointCloud` and `Ts` --- a list of
38+
corresponding poses in the trajectory in the form of `4x4` transformation matrices.
3939

4040
.. code-block:: python
4141

4242
map_metrics.mpv(pcs, Ts)
43+
44+
45+
Mutually Orthogonal Metric (MOM)
46+
--------------------------------
47+
48+
Mutual Orthogonality is a concept of considering not all points in the map but only ones from mutually orthogonal
49+
surfaces. Mean Plane Variance over those points provides (as described in our paper) correlation with Relative Pose
50+
Error (RPE) --- one of the popular full-reference metrics for trajectories.
51+
52+
To use it, provide `pcs` --- a list of point clouds pcs in the form of `open3d.PointCloud` and `Ts` --- a list of
53+
corresponding poses in the trajectory in the form of `4x4` transformation matrices.
54+
55+
.. code-block:: python
56+
57+
map_metrics.mom(pcs, Ts)
58+
59+
The default usage of the method assumes extraction of points from mutually orthogonal surfaces during the method
60+
execution and therefore increase calculation time. One can extract those points manually one time for specific set
61+
of point cloud and use it as parameter to calculate MOM faster.
62+
63+
.. code-block:: python
64+
65+
orth_list, _, _ = map_metrics.extract_orthogonal_subsets(pcs[0])
66+
print(map_metrics.orth_mme(pcs, Ts_gt, orth_list=orth_list))

map_metrics/map_metrics.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ def mpv(pcs, Ts):
6262
return 0 if len(metric) == 0 else np.mean(metric)
6363

6464

65+
def mom(pcs, Ts, orth_list=None):
66+
return orth_mme(pcs, Ts, orth_list=None)
67+
68+
6569
def extract_orthogonal_subsets(pc, eps=1e-1, vis=False):
6670
# Estimate normals if they are not calculated for pc
6771
if not pc.has_normals():

0 commit comments

Comments
 (0)