rust-faces
rust-faces copied to clipboard
Landmarks should be labelled
The landmarks for a face are returned as a Vec<f32, f32>
which does not tell users of the API what any particular landmark is. Could the API return an enum for each landmark indicating what the point identifies? For example:
pub enum LandmarkType {
LeftEye(f32, f32),
RightEye(f32, f32),
...
}
or maybe:
pub enum LandmarkType {
LeftEye(f32, f32),
RightEye(f32, f32),
...
}
pub struct Landmark(LandmarkType, f32, f32);
Or, simply name the landmarks in the Face
struct:
pub struct Face {
...
right_eye: Option<(f32, f32)>;
}