Skip to content

Commit 53f77a6

Browse files
authored
Merge pull request #33 from MrClock8163/feature/panorama
Panorama capture and processing
2 parents bc8aca8 + cc77563 commit 53f77a6

File tree

17 files changed

+1855
-7
lines changed

17 files changed

+1855
-7
lines changed

.github/workflows/run-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
python-version: ${{ matrix.python-version }}
2424

2525
- name: Build and install package
26-
run: python -m pip install .
26+
run: python -m pip install .[all]
2727

2828
- name: Test with pytest
2929
run: |
@@ -47,7 +47,7 @@ jobs:
4747
python-version: 3.x
4848

4949
- name: Build and install package
50-
run: python -m pip install .
50+
run: python -m pip install .[all]
5151

5252
- name: Running ${{ matrix.tool }}
5353
run: |

.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ build:
88
pre_build:
99
- python -m pip install --upgrade pip
1010
- python -m pip install --group documentation
11-
- python -m pip install .
11+
- python -m pip install .[all]
1212

1313
sphinx:
1414
configuration: docs/conf.py

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ The project uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
99

1010
### Added
1111

12+
- Added panorama capturing (`capture panorama`)
13+
- Added panorama processing (`process panorama`)
1214
- Added GeoCOM shutdown utility (`shutdown geocom`)
1315
- Added GeoCOM startup utility (`startup geocom`)
1416
- Added GSI Online DNA shutdown utility (`shutdown gsidna`)

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ cd Instrumentman
5555
python -m pip install .
5656
```
5757

58+
Some commands require additional dependencies, that are not installed by
59+
default with I-man. These are indicated in the documentations of the specific
60+
commands.
61+
5862
## License
5963

60-
I-man is free and open source software, and it is distributed under the terms of the
61-
[MIT License](https://opensource.org/license/mit).
64+
I-man is free and open source software, and it is distributed under the terms
65+
of the [MIT License](https://opensource.org/license/mit).
42.6 KB
Loading

docs/commands/panorama/index.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
:icon: material/panorama-variant-outline
2+
3+
Panorama
4+
========
5+
6+
For documentation purposes it might be useful to have an image of the measured
7+
area with the measured points annotated. Total stations with integrated cameras
8+
usually have a panorama capture on-board program, but it provides to way to
9+
annotate the recorded points.
10+
11+
The panorama commands provide a way to capture frames of a panorama, and
12+
merge them together with optional point annotations.
13+
14+
.. toctree::
15+
:maxdepth: 1
16+
17+
measure
18+
process

docs/commands/panorama/measure.rst

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
Measuring
2+
=========
3+
4+
To create a panorama image from different images taken from a common center
5+
point, the orientatiobs of the images have to be known among other camera
6+
properties. The necessary data can be derived from independent calibration and
7+
screenshots during the on-board panorama program.
8+
9+
To simplify the process, this command can be used to capture images with the
10+
necessary metadata automatically being recorded as reported by the instrument.
11+
12+
Requirements
13+
------------
14+
15+
- GeoCOM capable robotic total station with overview camera and imaging license
16+
17+
Positions
18+
---------
19+
20+
The program takes images in a region defined by a horizontal and vertical angle
21+
range. Two convenience settings exists (in addition to the default), that
22+
reduce the number of angle inputs needed for specific cases:
23+
24+
- region: horizontal and vertical range is required (this is the default)
25+
- strip: 360 degree horizontal coverage with given vertical range
26+
- sphere: complete spherical panorama
27+
28+
.. note::
29+
30+
The complete sphere panorama is not very practical, and more of a proof of
31+
concept, as capturing the full view takes impractically long time.
32+
33+
If adaptive FoV is enabled for the position layout generation, images that are
34+
taken at angles that deviate from the horizontal position are considered to
35+
cover a wider horizontal angle area. To avoid taking unnecessary images, the
36+
top and bottom rows have fewer images.
37+
38+
.. image:: image_positions.png
39+
40+
To reduce the parallax errors of close range objects caused by the camera
41+
offset, it is possible to increase the overlap between images (effectively
42+
reducing the motion between images), but this can significantly increase the
43+
required number of images and time (e.g. full sphere panorama with 30%
44+
overlap requires approximately 1500 images).
45+
46+
Examples
47+
--------
48+
49+
.. code-block:: shell
50+
:caption: Capturing panorama with interactive region definition and default settings
51+
52+
iman capture panorama COM1 metadata.json
53+
54+
.. code-block:: shell
55+
:caption: Capturing full sphere panorama with custom file prefix
56+
57+
iman capture panorama --shape sphere --prefix panosphere_ COM1 metadata.json
58+
59+
.. code-block:: shell
60+
:caption: Capturing predefined 360 panorama strip
61+
62+
iman capture panorama --strip strip --vertical 70-00-00 110-00-00 COM1 metadata.json
63+
64+
Usage
65+
-----
66+
67+
.. click:: instrumentman.panorama:cli_measure
68+
:prog: iman capture panorama

docs/commands/panorama/process.rst

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
Processing
2+
==========
3+
4+
.. caution::
5+
:class: warning
6+
7+
The panorama image processing requires extra dependencies.
8+
9+
- opencv-python
10+
11+
Install them manually, or install instrumentman with the 'panorama' extra:
12+
13+
.. code-block:: shell
14+
15+
python -m pip install instrumentman[panorama]
16+
17+
The processing command can be used to merge individual frames of a panorama
18+
capture into a single image, and optionally annotate points on it.
19+
20+
The accuracy of the annotation is usually a few centimeters.
21+
22+
Requirements
23+
------------
24+
25+
- Image metadata JSON file
26+
- Images downloaded from the instrument
27+
28+
Examples
29+
--------
30+
31+
.. code-block:: shell
32+
:caption: Merging images
33+
34+
iman process panorama metadata.json merged_panorama.jpg panorama*.jpg
35+
36+
37+
.. code-block:: shell
38+
:caption: Merging images and annotating points
39+
40+
iman process panorama --annotate points.csv --fontsize 50 metadata.json merged_panorama.jpg panorama*.jpg
41+
42+
.. code-block:: shell
43+
:caption: Merging full sphere panorama with downscaling to fit into OpenCV limits
44+
45+
iman process panorama --scale 2000 metadata.json merged_panorama.jpg panorama*.jpg
46+
47+
.. code-block:: text
48+
:caption: Example points file for annotations (with the optional label column present)
49+
50+
P0001,1.0,1.0,0.0,BENCHMARK
51+
P0002,1.0,2.0,1.0,BENCHMARK
52+
P0003,1.0,2.0,3.0,TOPO
53+
54+
Usage
55+
-----
56+
57+
.. click:: instrumentman.panorama:cli_calc
58+
:prog: iman process panorama

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ Content
4141
commands/targets/index
4242
commands/sets/index
4343
commands/inclination/index
44+
commands/panorama/index
4445
commands/protocoltest/index
4546
commands/files/index
4647
commands/data/index

docs/latexindex.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Applications
2626
commands/targets/index
2727
commands/sets/index
2828
commands/inclination/index
29+
commands/panorama/index
2930
commands/protocoltest/index
3031
commands/files/index
3132
commands/data/index

0 commit comments

Comments
 (0)