Skip to content

Commit 2e3cb74

Browse files
committed
Edited initial description, removed generated additional resources
1 parent 33466fe commit 2e3cb74

File tree

1 file changed

+26
-32
lines changed

1 file changed

+26
-32
lines changed

gtsam/geometry/doc/PinholePose.ipynb

Lines changed: 26 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"id": "pinholepose-intro"
1616
},
1717
"source": [
18-
"A `PinholePose` couples a camera `Pose3` with a fixed calibration model. It is useful when the calibration is known ahead of time and fixed during optimization. This is different from `PinholeCamera`, which also optimizes the calibration itself. For simplicity, this guide demonstrates the `Cal3_S2` variant of `PinholePose` (`PinholePoseCal3_S2` in Python), though many other calibration models are supported:\n",
18+
"A `PinholePose` couples a camera `Pose3` with a fixed calibration model. It is useful when the calibration is known ahead of time and fixed during optimization. This is different from `PinholeCamera`, which also optimizes the calibration itself. `PinholePose` is compatible with several calibration models:\n",
1919
"\n",
2020
"- `Cal3_S2`\n",
2121
"- `Cal3Bundler`\n",
@@ -30,10 +30,8 @@
3030
"id": "pinholepose-understanding"
3131
},
3232
"source": [
33-
"## Understanding the Pinhole Pose\n",
34-
"A *pinhole pose* packages the camera's pose in the world with a **fixed** calibration. ",
35-
"Conceptually it acts like a `PinholeCamera` with constant intrinsics. ",
36-
"When the intrinsics are known from a prior calibration step, optimizing only the pose can simplify many problems. ",
33+
"A `PinholePose` packages the camera's pose in the world with a **fixed** calibration. Conceptually it acts like a `PinholeCamera` with constant intrinsics. \n",
34+
"When the intrinsics are known from a prior calibration step, optimizing only the pose can simplify many problems. \n",
3735
"Throughout this notebook we will refer to `PinholePoseCal3_S2`, which pairs a `Pose3` with a `Cal3_S2` instance."
3836
]
3937
},
@@ -48,7 +46,7 @@
4846
},
4947
{
5048
"cell_type": "code",
51-
"execution_count": 2,
49+
"execution_count": 1,
5250
"metadata": {
5351
"id": "pinholepose-pip-install"
5452
},
@@ -67,7 +65,7 @@
6765
},
6866
{
6967
"cell_type": "code",
70-
"execution_count": 3,
68+
"execution_count": 2,
7169
"metadata": {
7270
"id": "pinholepose-imports"
7371
},
@@ -96,7 +94,7 @@
9694
},
9795
{
9896
"cell_type": "code",
99-
"execution_count": 4,
97+
"execution_count": 3,
10098
"metadata": {
10199
"id": "pinholepose-init-code"
102100
},
@@ -137,7 +135,7 @@
137135
},
138136
{
139137
"cell_type": "code",
140-
"execution_count": 5,
138+
"execution_count": 4,
141139
"metadata": {},
142140
"outputs": [
143141
{
@@ -180,7 +178,7 @@
180178
},
181179
{
182180
"cell_type": "code",
183-
"execution_count": 15,
181+
"execution_count": 5,
184182
"metadata": {},
185183
"outputs": [
186184
{
@@ -189,7 +187,7 @@
189187
"dtype('float64')"
190188
]
191189
},
192-
"execution_count": 15,
190+
"execution_count": 5,
193191
"metadata": {},
194192
"output_type": "execute_result"
195193
}
@@ -200,7 +198,7 @@
200198
},
201199
{
202200
"cell_type": "code",
203-
"execution_count": 21,
201+
"execution_count": 6,
204202
"metadata": {
205203
"id": "pinholepose-named-code"
206204
},
@@ -252,7 +250,7 @@
252250
},
253251
{
254252
"cell_type": "code",
255-
"execution_count": 22,
253+
"execution_count": 7,
256254
"metadata": {
257255
"id": "pinholepose-prop-code"
258256
},
@@ -301,7 +299,7 @@
301299
},
302300
{
303301
"cell_type": "code",
304-
"execution_count": 23,
302+
"execution_count": 8,
305303
"metadata": {
306304
"id": "pinholepose-project"
307305
},
@@ -330,7 +328,7 @@
330328
},
331329
{
332330
"cell_type": "code",
333-
"execution_count": 24,
331+
"execution_count": 9,
334332
"metadata": {
335333
"id": "pinholepose-backproject"
336334
},
@@ -359,7 +357,7 @@
359357
},
360358
{
361359
"cell_type": "code",
362-
"execution_count": 25,
360+
"execution_count": 10,
363361
"metadata": {
364362
"id": "pinholepose-range"
365363
},
@@ -395,7 +393,7 @@
395393
},
396394
{
397395
"cell_type": "code",
398-
"execution_count": 26,
396+
"execution_count": 11,
399397
"metadata": {
400398
"id": "pinholepose-manifold-code"
401399
},
@@ -422,17 +420,25 @@
422420
"source": [
423421
"## Example: Using PinholePose in a Factor Graph\n",
424422
"\n",
425-
"When camera intrinsics are known, `PinholePose` can serve as the variable representing a camera pose. ",
423+
"When camera intrinsics are known, `PinholePose` can serve as the variable representing a camera pose. \n",
426424
"The snippet below builds a minimal factor graph with one `GenericProjectionFactorCal3_S2`."
427425
]
428426
},
429427
{
430428
"cell_type": "code",
431-
"execution_count": null,
429+
"execution_count": 12,
432430
"metadata": {
433431
"id": "pinholepose-factor-code"
434432
},
435-
"outputs": [],
433+
"outputs": [
434+
{
435+
"name": "stdout",
436+
"output_type": "stream",
437+
"text": [
438+
"Graph has 1 factor(s) and 2 variable(s)\n"
439+
]
440+
}
441+
],
436442
"source": [
437443
"graph = gtsam.NonlinearFactorGraph()\n",
438444
"initial = gtsam.Values()\n",
@@ -451,18 +457,6 @@
451457
"print(f'Graph has {graph.size()} factor(s) and {initial.size()} variable(s)')"
452458
]
453459
},
454-
{
455-
"cell_type": "markdown",
456-
"metadata": {
457-
"id": "pinholepose-additional-resources"
458-
},
459-
"source": [
460-
"## Additional Resources\n",
461-
"\n",
462-
"- [Pinhole camera model (Wikipedia)](https://en.wikipedia.org/wiki/Pinhole_camera_model)\n",
463-
"- [GTSAM Visual SLAM examples](https://github.com/borglab/gtsam/tree/develop/python/gtsam/examples)\n"
464-
]
465-
},
466460
{
467461
"cell_type": "markdown",
468462
"metadata": {

0 commit comments

Comments
 (0)