FaceGen 3 SDKs Reference
Loading...
Searching...
No Matches
bootPoints.hpp
1//
2// Copyright (c) Singular Inversions Inc. 1999.
3//
4// Authors: Andrew Beatty
5// Created: Nov. 24, 1999
6//
7// Contains the RCS positions (origin in centre of top left pixel, units
8// are pixels) of the user-defined points. A validity flag indicates when
9// a bootstrap point is being used.
10//
11
12#ifndef FMO_BOOTPOINTS_HPP
13#define FMO_BOOTPOINTS_HPP
14
15#include "FgMatrixC.hpp"
16#include "fimImg.hpp"
17#include "vect3.hpp"
18
19namespace Fg {
20
21enum LandmrkV3
22{
23 LM3_BROW_CENTRE = 0,
24 LM3_BROW_LEFT,
25 LM3_BROW_RIGHT,
26 LM3_EYE_LEFT_INNER, // endocanthions and ectocanthions.
27 LM3_EYE_LEFT_OUTER,
28 LM3_EYE_RIGHT_INNER,
29 LM3_EYE_RIGHT_OUTER,
30 LM3_CHEEKBONE_LEFT, // occluding contour cheek points.
31 LM3_CHEEKBONE_RIGHT,
32 LM3_NARE_LEFT,
33 LM3_NARE_RIGHT,
34 LM3_NOSE_BASE,
35 LM3_NOSE_TIP,
36 LM3_MOUTH_LEFT,
37 LM3_MOUTH_RIGHT,
38 LM3_CHIN, // tip of chin.
39 LM3_THROAT_TOP,
40
41 // New addition for the new BPT file
42 LM3_EYE_LEFT_CENTRE,
43 LM3_EYE_RIGHT_CENTRE,
44
45 // New additions for the advanced landmarks option
46 LM3_EYE_LID_UPPER_LEFT, // Horizontal centre of lid edge.
47 LM3_EYE_LID_UPPER_RIGHT,
48 LM3_EYE_LID_LOWER_LEFT,
49 LM3_EYE_LID_LOWER_RIGHT,
50 LM3_JAW_OUTER_LEFT, // Just below bottom of ears.
51 LM3_JAW_OUTER_RIGHT,
52 LM3_CHIN_LOWER, // Just underneath chin.
53 LM3_NOSE_BRIDGE,
54 LM3_SELLION,
55 LM3_LIP_TIP_LOWER,
56 LM3_LIP_TIP_UPPER,
57 LM3_LIP_CHIN_CONCAVITY,
58
59 LM3_SIZE
60};
61
62enum ViewAngleV3
63{
64 VA3_VFRONTAL = 0,
65 VA3_FRONTAL,
66 VA3_UPWARD,
67 VA3_THIRTY_LEFT,
68 VA3_THIRTY_RIGHT,
69 VA3_VPROFILE_LEFT,
70 VA3_VPROFILE_RIGHT,
71 VA3_PROFILE_LEFT,
72 VA3_PROFILE_RIGHT,
73 VA3_PS_FRONTAL, // Photo service boostrap points
74 VA3_PS_PROFILE_LEFT,
75 VA3_PS_PROFILE_RIGHT,
76
77 VA3_SIZE
78};
79
81{
82 FutVect2IC m_pos[LM3_SIZE]; // In RCS
83 bool m_valid[LM3_SIZE];
84 ViewAngleV3 m_angle;
85
87
88 bool set(Svec<FutVect2IC>);
89 // Return RCS crop values to maximize image area covered by face:
90 void getCropVals(FutVect2FC&,FutVect2FC&);
91 float getPan() const; // Return initial pan estimate.
92 bool empty() const;
93 bool setVFrontal(Svec<FutVect2IC>&);
94 bool setVProfile(Svec<FutVect2IC>&);
95 bool setPsFrontal(Svec<FutVect2IC> &);
96 bool setPsProfile(Svec<FutVect2IC> &);
97 bool setV31Frontal(Svec<FutVect2IC>&);
98 bool setV31Profile(const Svec<FutVect2IC>&);
99 NameVec2Fs asNameVecs() const;
100
101 friend std::ostream& operator<<(std::ostream& s,const Fg3InitPoints &a);
102
103 static String getLabel(LandmrkV3 type);
104 static const String labels[];
105};
106
107std::ostream & operator<<(std::ostream & s,Fg3InitPoints const & a);
108
109}
110
111#endif