sensorcal 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sensorcal-0.1.1/PKG-INFO +155 -0
- sensorcal-0.1.1/README.md +137 -0
- sensorcal-0.1.1/pyproject.toml +39 -0
- sensorcal-0.1.1/setup.cfg +4 -0
- sensorcal-0.1.1/src/sensorcal/__init__.py +7 -0
- sensorcal-0.1.1/src/sensorcal/app.py +854 -0
- sensorcal-0.1.1/src/sensorcal/cli.py +26 -0
- sensorcal-0.1.1/src/sensorcal.egg-info/PKG-INFO +155 -0
- sensorcal-0.1.1/src/sensorcal.egg-info/SOURCES.txt +11 -0
- sensorcal-0.1.1/src/sensorcal.egg-info/dependency_links.txt +1 -0
- sensorcal-0.1.1/src/sensorcal.egg-info/entry_points.txt +2 -0
- sensorcal-0.1.1/src/sensorcal.egg-info/requires.txt +5 -0
- sensorcal-0.1.1/src/sensorcal.egg-info/top_level.txt +1 -0
sensorcal-0.1.1/PKG-INFO
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sensorcal
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: SensorCal package
|
|
5
|
+
Author-email: Murdism <murdiszm@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://example.com
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Requires-Python: >=3.10
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
Requires-Dist: numpy
|
|
14
|
+
Requires-Dist: pyyaml
|
|
15
|
+
Requires-Dist: opencv-python
|
|
16
|
+
Requires-Dist: open3d
|
|
17
|
+
Requires-Dist: pillow
|
|
18
|
+
|
|
19
|
+
# interactive_camera_lidar_calibration
|
|
20
|
+
|
|
21
|
+
Python package scaffold for `sensorcal`.
|
|
22
|
+
|
|
23
|
+
## Install (editable)
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
python -m pip install -e .
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Install (pip)
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
python -m pip install sensorcal
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Usage
|
|
36
|
+
|
|
37
|
+
Single image + pcd:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
sensorcal recalibrate \
|
|
41
|
+
--config path/to/calibrate.yaml \
|
|
42
|
+
--image path/to/img_001.png \
|
|
43
|
+
--pcd path/to/pc_001.pcd
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Single image + pcd with parameters (no config):
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
sensorcal recalibrate \
|
|
50
|
+
--image path/to/img_001.png \
|
|
51
|
+
--pcd path/to/pc_001.pcd \
|
|
52
|
+
--intrinsic-k 600 0 640 0 600 360 0 0 1 \
|
|
53
|
+
--lidar-camera 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Folder mode:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
sensorcal recalibrate \
|
|
60
|
+
--config path/to/calibrate.yaml \
|
|
61
|
+
--image-folder path/to/images \
|
|
62
|
+
--pcd-folder path/to/pcds
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Sample data (3 images + 3 PCDs bundled in `samples/`):
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
sensorcal recalibrate --use-sample
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
If you run `sensorcal recalibrate` with no arguments, it defaults to the sample data.
|
|
72
|
+
|
|
73
|
+
## Input Structure
|
|
74
|
+
|
|
75
|
+
You can provide inputs in two ways:
|
|
76
|
+
|
|
77
|
+
1) Direct CLI arguments
|
|
78
|
+
- Single pair:
|
|
79
|
+
- `--image path/to/img.png`
|
|
80
|
+
- `--pcd path/to/cloud.pcd`
|
|
81
|
+
- Folder mode (paired by sorted filename order):
|
|
82
|
+
- `--image-folder path/to/images`
|
|
83
|
+
- `--pcd-folder path/to/pcds`
|
|
84
|
+
|
|
85
|
+
2) YAML config file (`--config path/to/calibrate.yaml`)
|
|
86
|
+
|
|
87
|
+
### Expected YAML structure
|
|
88
|
+
|
|
89
|
+
```yaml
|
|
90
|
+
transform:
|
|
91
|
+
# 3x3 camera intrinsics in row-major order
|
|
92
|
+
intrinsic_k: [fx, 0, cx, 0, fy, cy, 0, 0, 1]
|
|
93
|
+
|
|
94
|
+
# 4x4 LiDAR-to-camera transform in row-major order
|
|
95
|
+
lidar_camera: [r00, r01, r02, tx,
|
|
96
|
+
r10, r11, r12, ty,
|
|
97
|
+
r20, r21, r22, tz,
|
|
98
|
+
0, 0, 0, 1]
|
|
99
|
+
|
|
100
|
+
path:
|
|
101
|
+
# Optional defaults for folder mode
|
|
102
|
+
img_folder: /abs/or/relative/path/to/images
|
|
103
|
+
pcd_folder: /abs/or/relative/path/to/pcds
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Notes
|
|
107
|
+
|
|
108
|
+
- If you pass `--intrinsic-k` or `--lidar-camera` on the CLI, those override the config file.
|
|
109
|
+
- If you pass both `--image/--pcd` and folder paths, the single pair wins.
|
|
110
|
+
- For folder mode, files are paired by **sorted filename order**, so keep names aligned.
|
|
111
|
+
|
|
112
|
+
## Python (pip installed)
|
|
113
|
+
|
|
114
|
+
```python
|
|
115
|
+
from sensorcal.app import SensorCalApp
|
|
116
|
+
|
|
117
|
+
app = SensorCalApp(
|
|
118
|
+
config_path="path/to/calibrate.yaml",
|
|
119
|
+
intrinsic_k=None,
|
|
120
|
+
lidar_camera=None,
|
|
121
|
+
image_path="path/to/img_001.png",
|
|
122
|
+
pcd_path="path/to/pc_001.pcd",
|
|
123
|
+
image_folder=None,
|
|
124
|
+
pcd_folder=None,
|
|
125
|
+
save_file="calibration_results.yaml",
|
|
126
|
+
)
|
|
127
|
+
app.process()
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Controls
|
|
131
|
+
|
|
132
|
+
- Single-window Tkinter app with live sliders, buttons, and dark mode toggle
|
|
133
|
+
- Sliders: tx/ty/tz (meters), roll/pitch/yaw (degrees), alpha, point size
|
|
134
|
+
- Density toggle: overlays a heatmap of point concentration (helps reveal clusters)
|
|
135
|
+
- Keyboard: A/D (X-/X+), W/S (Y-/Y+), Q/E (Z-/Z+)
|
|
136
|
+
- Rotate: J/L (roll-/+), I/K (pitch-/+), U/O (yaw-/+)
|
|
137
|
+
- Buttons: Prev, Next, Original, Save
|
|
138
|
+
- Save writes YAML plus a sibling `.txt` containing K and the transform.
|
|
139
|
+
|
|
140
|
+
## Python API
|
|
141
|
+
|
|
142
|
+
```python
|
|
143
|
+
|
|
144
|
+
app = InteractiveCalibration(
|
|
145
|
+
config_path="path/to/calibrate.yaml",
|
|
146
|
+
intrinsic_k=None,
|
|
147
|
+
lidar_camera=None,
|
|
148
|
+
image_path="path/to/img_001.png",
|
|
149
|
+
pcd_path="path/to/pc_001.pcd",
|
|
150
|
+
image_folder=None,
|
|
151
|
+
pcd_folder=None,
|
|
152
|
+
save_file="transformations.yaml",
|
|
153
|
+
)
|
|
154
|
+
app.process()
|
|
155
|
+
```
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# interactive_camera_lidar_calibration
|
|
2
|
+
|
|
3
|
+
Python package scaffold for `sensorcal`.
|
|
4
|
+
|
|
5
|
+
## Install (editable)
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
python -m pip install -e .
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Install (pip)
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
python -m pip install sensorcal
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
Single image + pcd:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
sensorcal recalibrate \
|
|
23
|
+
--config path/to/calibrate.yaml \
|
|
24
|
+
--image path/to/img_001.png \
|
|
25
|
+
--pcd path/to/pc_001.pcd
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Single image + pcd with parameters (no config):
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
sensorcal recalibrate \
|
|
32
|
+
--image path/to/img_001.png \
|
|
33
|
+
--pcd path/to/pc_001.pcd \
|
|
34
|
+
--intrinsic-k 600 0 640 0 600 360 0 0 1 \
|
|
35
|
+
--lidar-camera 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Folder mode:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
sensorcal recalibrate \
|
|
42
|
+
--config path/to/calibrate.yaml \
|
|
43
|
+
--image-folder path/to/images \
|
|
44
|
+
--pcd-folder path/to/pcds
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Sample data (3 images + 3 PCDs bundled in `samples/`):
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
sensorcal recalibrate --use-sample
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
If you run `sensorcal recalibrate` with no arguments, it defaults to the sample data.
|
|
54
|
+
|
|
55
|
+
## Input Structure
|
|
56
|
+
|
|
57
|
+
You can provide inputs in two ways:
|
|
58
|
+
|
|
59
|
+
1) Direct CLI arguments
|
|
60
|
+
- Single pair:
|
|
61
|
+
- `--image path/to/img.png`
|
|
62
|
+
- `--pcd path/to/cloud.pcd`
|
|
63
|
+
- Folder mode (paired by sorted filename order):
|
|
64
|
+
- `--image-folder path/to/images`
|
|
65
|
+
- `--pcd-folder path/to/pcds`
|
|
66
|
+
|
|
67
|
+
2) YAML config file (`--config path/to/calibrate.yaml`)
|
|
68
|
+
|
|
69
|
+
### Expected YAML structure
|
|
70
|
+
|
|
71
|
+
```yaml
|
|
72
|
+
transform:
|
|
73
|
+
# 3x3 camera intrinsics in row-major order
|
|
74
|
+
intrinsic_k: [fx, 0, cx, 0, fy, cy, 0, 0, 1]
|
|
75
|
+
|
|
76
|
+
# 4x4 LiDAR-to-camera transform in row-major order
|
|
77
|
+
lidar_camera: [r00, r01, r02, tx,
|
|
78
|
+
r10, r11, r12, ty,
|
|
79
|
+
r20, r21, r22, tz,
|
|
80
|
+
0, 0, 0, 1]
|
|
81
|
+
|
|
82
|
+
path:
|
|
83
|
+
# Optional defaults for folder mode
|
|
84
|
+
img_folder: /abs/or/relative/path/to/images
|
|
85
|
+
pcd_folder: /abs/or/relative/path/to/pcds
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Notes
|
|
89
|
+
|
|
90
|
+
- If you pass `--intrinsic-k` or `--lidar-camera` on the CLI, those override the config file.
|
|
91
|
+
- If you pass both `--image/--pcd` and folder paths, the single pair wins.
|
|
92
|
+
- For folder mode, files are paired by **sorted filename order**, so keep names aligned.
|
|
93
|
+
|
|
94
|
+
## Python (pip installed)
|
|
95
|
+
|
|
96
|
+
```python
|
|
97
|
+
from sensorcal.app import SensorCalApp
|
|
98
|
+
|
|
99
|
+
app = SensorCalApp(
|
|
100
|
+
config_path="path/to/calibrate.yaml",
|
|
101
|
+
intrinsic_k=None,
|
|
102
|
+
lidar_camera=None,
|
|
103
|
+
image_path="path/to/img_001.png",
|
|
104
|
+
pcd_path="path/to/pc_001.pcd",
|
|
105
|
+
image_folder=None,
|
|
106
|
+
pcd_folder=None,
|
|
107
|
+
save_file="calibration_results.yaml",
|
|
108
|
+
)
|
|
109
|
+
app.process()
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Controls
|
|
113
|
+
|
|
114
|
+
- Single-window Tkinter app with live sliders, buttons, and dark mode toggle
|
|
115
|
+
- Sliders: tx/ty/tz (meters), roll/pitch/yaw (degrees), alpha, point size
|
|
116
|
+
- Density toggle: overlays a heatmap of point concentration (helps reveal clusters)
|
|
117
|
+
- Keyboard: A/D (X-/X+), W/S (Y-/Y+), Q/E (Z-/Z+)
|
|
118
|
+
- Rotate: J/L (roll-/+), I/K (pitch-/+), U/O (yaw-/+)
|
|
119
|
+
- Buttons: Prev, Next, Original, Save
|
|
120
|
+
- Save writes YAML plus a sibling `.txt` containing K and the transform.
|
|
121
|
+
|
|
122
|
+
## Python API
|
|
123
|
+
|
|
124
|
+
```python
|
|
125
|
+
|
|
126
|
+
app = InteractiveCalibration(
|
|
127
|
+
config_path="path/to/calibrate.yaml",
|
|
128
|
+
intrinsic_k=None,
|
|
129
|
+
lidar_camera=None,
|
|
130
|
+
image_path="path/to/img_001.png",
|
|
131
|
+
pcd_path="path/to/pc_001.pcd",
|
|
132
|
+
image_folder=None,
|
|
133
|
+
pcd_folder=None,
|
|
134
|
+
save_file="transformations.yaml",
|
|
135
|
+
)
|
|
136
|
+
app.process()
|
|
137
|
+
```
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=69", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "sensorcal"
|
|
7
|
+
version = "0.1.1"
|
|
8
|
+
description = "SensorCal package"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
license = { text = "MIT" }
|
|
12
|
+
authors = [{ name = "Murdism", email = "murdiszm@gmail.com" }]
|
|
13
|
+
classifiers = [
|
|
14
|
+
"Programming Language :: Python :: 3",
|
|
15
|
+
"License :: OSI Approved :: MIT License",
|
|
16
|
+
"Operating System :: OS Independent",
|
|
17
|
+
]
|
|
18
|
+
dependencies = [
|
|
19
|
+
"numpy",
|
|
20
|
+
"pyyaml",
|
|
21
|
+
"opencv-python",
|
|
22
|
+
"open3d",
|
|
23
|
+
"pillow",
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
[project.urls]
|
|
27
|
+
Homepage = "https://example.com"
|
|
28
|
+
|
|
29
|
+
[project.scripts]
|
|
30
|
+
sensorcal = "sensorcal.cli:main"
|
|
31
|
+
|
|
32
|
+
[tool.setuptools]
|
|
33
|
+
package-dir = {"" = "src"}
|
|
34
|
+
|
|
35
|
+
[tool.setuptools.packages.find]
|
|
36
|
+
where = ["src"]
|
|
37
|
+
|
|
38
|
+
[tool.pytest.ini_options]
|
|
39
|
+
testpaths = ["tests"]
|