Skip to content

Commit ff12d2b

Browse files
authored
Update version (#14)
* update * better error * py * add python * update readme
1 parent 03e1bfb commit ff12d2b

12 files changed

+85
-51
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# will have compiled files and executables
33
debug/
44
target/
5+
venv
56

67
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
78
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html

Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "camera-intrinsic-calibration"
3-
version = "0.5.6"
3+
version = "0.6.0"
44
edition = "2021"
55
authors = ["Powei Lin <poweilin1994@gmail.com>"]
66
readme = "README.md"
@@ -21,13 +21,13 @@ exclude = [
2121
]
2222

2323
[dependencies]
24-
aprilgrid = "0.5.3"
24+
aprilgrid = "0.6.0"
2525
camera-intrinsic-model = "0.3.1"
2626
clap = { version = "4.5.31", features = ["derive"] }
2727
colorous = "1.0.15"
2828
env_logger = "0.11.6"
29-
faer = "0.20.2"
30-
glam = "0.29.2"
29+
faer = "0.21.5"
30+
glam = "0.30.0"
3131
glob = "0.3.2"
3232
image = "0.25.5"
3333
indicatif = { version = "0.17.11", features = ["rayon"] }
@@ -39,9 +39,9 @@ rayon = "1.10.0"
3939
rerun = "0.17.0"
4040
serde = { version = "1.0.218", features = ["derive"] }
4141
serde_json = "1.0.139"
42-
sqpnp_simple = "0.1.5"
42+
sqpnp_simple = "0.1.6"
4343
time = "0.3.37"
44-
tiny-solver = "0.14.2"
44+
tiny-solver = "0.17.0"
4545

4646
[[bin]]
4747
name = "ccrs"

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
# camera-intrinsic-calibration
22
[![crate](https://img.shields.io/crates/v/camera-intrinsic-calibration.svg)](https://crates.io/crates/camera-intrinsic-calibration)
3+
[![PyPI - Version](https://img.shields.io/pypi/v/camera-intrinsic-calibration.svg)](https://pypi.org/project/camera-intrinsic-calibration)
4+
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/camera-intrinsic-calibration.svg)](https://pypi.org/project/camera-intrinsic-calibration)
35

46
A pure rust camera intrinsic calibration library.
57

68
## Installation
79
```sh
8-
# install cli
10+
# cargo install cli
911
cargo install camera-intrinsic-calibration
12+
# pip install cli
13+
pip install camera-intrinsic-calibration
1014
```
1115
Or download from the latest [release](https://github.com/powei-lin/camera-intrinsic-calibration-rs/releases).
1216

@@ -26,7 +30,11 @@ ccrs dataset-calib-cam1_1024_16 --model eucm
2630
```
2731
### Visualize details after calibration
2832
```sh
33+
# use cargo to install rerun
2934
cargo install rerun-cli --version 0.17.0
35+
# or use pip to install rerun
36+
pip install rerun-sdk==0.17.0
37+
# visualize result
3038
rerun results/20YYMMDD_HH_MM_SS/logging.rrd
3139
```
3240
<img src="data/rerun_logs.jpg" width="800" alt="example detection">

pyproject.toml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[build-system]
2+
requires = ["maturin>=1.4,<2.0"]
3+
build-backend = "maturin"
4+
5+
[project]
6+
name = "camera-intrinsic-calibration"
7+
requires-python = ">=3.8"
8+
classifiers = [
9+
"Programming Language :: Rust",
10+
"Programming Language :: Python :: Implementation :: CPython",
11+
"Programming Language :: Python :: Implementation :: PyPy",
12+
"Programming Language :: Python :: 3.8",
13+
"Programming Language :: Python :: 3.9",
14+
"Programming Language :: Python :: 3.10",
15+
"Programming Language :: Python :: 3.11",
16+
"Programming Language :: Python :: 3.12",
17+
]
18+
authors = [
19+
{ name = "Powei Lin", email = "poweilin1994@gmail.com" },
20+
]
21+
dynamic = ["version"]
22+
23+
[tool.maturin]
24+
bindings = "bin"
25+
module-name = "ccrs"
26+
strip = true

scripts/build_macos.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ cargo build -r
22
cp ./target/release/ccrs ./ccrs
33
tar czvf ccrs-aarch64-apple-darwin.tar.gz ./ccrs
44
shasum -a 256 ccrs-aarch64-apple-darwin.tar.gz > ccrs-aarch64-apple-darwin.tar.gz.sha256
5-
rm ./ccrs
5+
rm ./ccrs
6+
maturin build -r

scripts/cross_build_linux_aarch64.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ cargo zigbuild --release --target=aarch64-unknown-linux-gnu
22
cp ./target/aarch64-unknown-linux-gnu/release/ccrs ./ccrs
33
tar czvf ccrs-aarch64-unknown-linux-gnu.tar.gz ./ccrs
44
shasum -a 256 ccrs-aarch64-unknown-linux-gnu.tar.gz > ccrs-aarch64-unknown-linux-gnu.tar.gz.sha256
5-
rm ./ccrs
5+
rm ./ccrs
6+
maturin build -r --target aarch64-unknown-linux-gnu --zig

scripts/cross_build_linux_x86_64.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ cargo zigbuild --release --target=x86_64-unknown-linux-gnu
22
cp ./target/x86_64-unknown-linux-gnu/release/ccrs ./ccrs
33
tar czvf ccrs-x86_64-unknown-linux-gnu.tar.gz ./ccrs
44
shasum -a 256 ccrs-x86_64-unknown-linux-gnu.tar.gz > ccrs-x86_64-unknown-linux-gnu.tar.gz.sha256
5-
rm ./ccrs
5+
rm ./ccrs
6+
maturin build -r --target x86_64-unknown-linux-gnu --zig

scripts/cross_build_windows_x86_64.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ cargo zigbuild --release --target=x86_64-pc-windows-gnu
22
cp ./target/x86_64-pc-windows-gnu/release/ccrs.exe ./ccrs.exe
33
zip ccrs-x86_64-pc-windows-gnu.zip ./ccrs.exe
44
shasum -a 256 ccrs-x86_64-pc-windows-gnu.zip > ccrs-x86_64-pc-windows-gnu.zip.sha256
5-
rm ./ccrs.exe
5+
rm ./ccrs.exe
6+
maturin build -r --target x86_64-pc-windows-gnu --zig

scripts/setup_cross_compile.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
rustup target add aarch64-unknown-linux-gnu
22
rustup target add x86_64-unknown-linux-gnu
3+
rustup target add x86_64-pc-windows-gnu
34
cargo install cargo-zigbuild
45
brew install zig

src/data_loader.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ pub fn load_euroc(
8888
let mut sorted_path: Vec<std::path::PathBuf> =
8989
img_paths.into_iter().filter_map(img_filter).collect();
9090

91-
sorted_path.sort_by(|a, b| a.cmp(b));
91+
sorted_path.sort();
9292
let new_paths: Vec<_> = sorted_path.iter().skip(start_idx).step_by(step).collect();
9393
let mut time_frame: Vec<_> = new_paths
9494
.iter()
@@ -137,7 +137,7 @@ pub fn load_others(
137137
let mut sorted_path: Vec<std::path::PathBuf> =
138138
img_paths.into_iter().filter_map(img_filter).collect();
139139

140-
sorted_path.sort_by(|a, b| a.cmp(b));
140+
sorted_path.sort();
141141
let new_paths: Vec<_> = sorted_path
142142
.iter()
143143
.skip(start_idx)

0 commit comments

Comments
 (0)