|
41 | 41 | "Our optimization seeks to align the estimated (orange) cameras with the ground truth (purple) cameras, by minimizing the discrepancies between pairs of relative cameras. Thus, the solution to the problem should look as follows:\n",
|
42 | 42 | "\n",
|
43 | 43 | "\n",
|
44 |
| - "In practice, the camera extrinsics $g_{ij}$ and $g_i$ are represented using objects from the `SfMPerspectiveCameras` class initialized with the corresponding rotation and translation matrices `R_absolute` and `T_absolute` that define the extrinsic parameters $g = (R, T); R \\in SO(3); T \\in \\mathbb{R}^3$. In order to ensure that `R_absolute` is a valid rotation matrix, we represent it using an exponential map (implemented with `so3_exponential_map`) of the axis-angle representation of the rotation `log_R_absolute`.\n", |
| 44 | + "In practice, the camera extrinsics $g_{ij}$ and $g_i$ are represented using objects from the `SfMPerspectiveCameras` class initialized with the corresponding rotation and translation matrices `R_absolute` and `T_absolute` that define the extrinsic parameters $g = (R, T); R \\in SO(3); T \\in \\mathbb{R}^3$. In order to ensure that `R_absolute` is a valid rotation matrix, we represent it using an exponential map (implemented with `so3_exp_map`) of the axis-angle representation of the rotation `log_R_absolute`.\n", |
45 | 45 | "\n",
|
46 | 46 | "Note that the solution to this problem could only be recovered up to an unknown global rigid transformation $g_{glob} \\in SE(3)$. Thus, for simplicity, we assume knowledge of the absolute extrinsics of the first camera $g_0$. We set $g_0$ as a trivial camera $g_0 = (I, \\vec{0})$.\n"
|
47 | 47 | ]
|
|
122 | 122 | "# imports\n",
|
123 | 123 | "import torch\n",
|
124 | 124 | "from pytorch3d.transforms.so3 import (\n",
|
125 |
| - " so3_exponential_map,\n", |
| 125 | + " so3_exp_map,\n", |
126 | 126 | " so3_relative_angle,\n",
|
127 | 127 | ")\n",
|
128 | 128 | "from pytorch3d.renderer.cameras import (\n",
|
|
328 | 328 | "\n",
|
329 | 329 | "As mentioned earlier, `log_R_absolute` is the axis angle representation of the rotation part of our absolute cameras. We can obtain the 3x3 rotation matrix `R_absolute` that corresponds to `log_R_absolute` with:\n",
|
330 | 330 | "\n",
|
331 |
| - "`R_absolute = so3_exponential_map(log_R_absolute)`\n" |
| 331 | + "`R_absolute = so3_exp_map(log_R_absolute)`\n" |
332 | 332 | ]
|
333 | 333 | },
|
334 | 334 | {
|
|
378 | 378 | " # compute the absolute camera rotations as \n",
|
379 | 379 | " # an exponential map of the logarithms (=axis-angles)\n",
|
380 | 380 | " # of the absolute rotations\n",
|
381 |
| - " R_absolute = so3_exponential_map(log_R_absolute * camera_mask)\n", |
| 381 | + " R_absolute = so3_exp_map(log_R_absolute * camera_mask)\n", |
382 | 382 | "\n",
|
383 | 383 | " # get the current absolute cameras\n",
|
384 | 384 | " cameras_absolute = SfMPerspectiveCameras(\n",
|
|
0 commit comments