Skip to content

Instantly share code, notes, and snippets.

@sudeepraja
Last active February 21, 2018 05:18
Show Gist options
  • Save sudeepraja/8bd11327614c78fc84afeb6912bdb467 to your computer and use it in GitHub Desktop.
Save sudeepraja/8bd11327614c78fc84afeb6912bdb467 to your computer and use it in GitHub Desktop.

Let $X = {x_1,x_2,..,x_n}$ and $Y = {y_1,y_2,..,y_n}$ be two set of points, where $x_i,y_i \in \mathbb{R}^{n\times k}, i \in[n]$. The goal is to find a permutation $\pi:[n]\to[n]$, orthogonal(rotation) matrix $R \in \mathbb{R}^{k \times k}$ and a translation vector $t$ such that the following error is minimized:

$$\sum_{i=1}^n |Rx_{\pi(i)} + t - y_i|_2^2$$

Another equivalent error is:

$$\sum_{i=1}^n |Rx_i + t - y_{\pi(i)}|_2^2$$

These errors can be written in matrix form:

$$|P(XR + 1t^T) - Y|_F^2$$

and

$$|XR + 1t^T - PY|_F^2$$

Here $P$ is the permutation matrix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment