use crate::{ImagePoint, KeyPoint};
use derive_more::{AsMut, AsRef, Deref, DerefMut, From, Into};
use nalgebra::{Point3, Unit, Vector3};
pub trait Bearing {
fn bearing(&self) -> Unit<Vector3<f64>> {
Unit::new_normalize(self.bearing_unnormalized())
}
fn bearing_unnormalized(&self) -> Vector3<f64>;
}
#[derive(Debug, Clone, Copy, PartialEq, PartialOrd, AsMut, AsRef, Deref, DerefMut, From, Into)]
pub struct CameraPoint(pub Point3<f64>);
pub trait CameraModel {
type Projection: Bearing;
fn calibrate<P>(&self, point: P) -> Self::Projection
where
P: ImagePoint;
fn uncalibrate(&self, projection: Self::Projection) -> KeyPoint;
}