rust-faces icon indicating copy to clipboard operation
rust-faces copied to clipboard

Landmarks should be labelled

Open blissd opened this issue 7 months ago • 0 comments

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)>;
}

blissd avatar Jul 09 '24 10:07 blissd