| Crates.io | sqpnp |
| lib.rs | sqpnp |
| version | 0.3.0 |
| created_at | 2025-01-18 11:42:03.777559+00 |
| updated_at | 2025-09-11 14:03:14.145131+00 |
| description | A pure Rust implementation of the SQPnP perspective-n-point algorithm |
| homepage | |
| repository | https://www.github.com/ricky26/sqpnp-rs |
| max_upload_size | |
| id | 1521557 |
| size | 63,369 |
sqpnp-rs is a pure Rust implementation of the SQPnP perspective-n-point
algorithm, based on the C++ implementation.
let p3d = [
// 3D object points
vec3(1.0, 1.0, 1.0),
];
let p2d = [
// projected points
vec2(-0.5, -0.5),
];
let mut solver = Solver::<DefaultParameters>::new();
if (solver.solve(&p3d, &p2d, None)) {
let solution = solver.best_solution().unwrap();
let r = solution.rotation_matrix();
let t = solution.translation();
// ...
}
There is another pure-Rust implementation of SQPnP, here: powei-lin/sqpnp_simple.
sqpnp-rs is permissively licensed under either the MIT License or the Apache 2.0 License.