startshape.h
1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// startshape.h: routines for finding the start shape for an ASM search
//
// Copyright (C) 2005-2013, Stephen Milborrow
#ifndef STASM_startshape_H
#define STASM_startshape_H
#include "stasmcascadeclassifier.h"
#include "misc.h"
#include "asm.h"
#include "facedet.h"
namespace stasm
{
// get the start shape for the next face in the image, and the ROI around it
bool NextStartShapeAndRoi( // use face detector results to estimate start shape
Shape& startshape, // out: the start shape we are looking for
Image& face_roi, // out: ROI around face, possibly rotated upright
DetPar& detpar_roi, // out: detpar wrt to face_roi
DetPar& detpar, // out: detpar wrt to img
const Image& img, // in: the image (grayscale)
const vec_Mod& mods, // in: a vector of models, one for each yaw range
FaceDet& facedet, // io: the face detector (internal face index bumped)
StasmCascadeClassifier cascade);
void PinnedStartShapeAndRoi( // use the pinned landmarks to init the start shape
Shape& startshape, // out: the start shape (in ROI frame)
Image& face_roi, // out: ROI around face, possibly rotated upright
DetPar& detpar_roi, // out: detpar wrt to face_roi
DetPar& detpar, // out: detpar wrt to img
Shape& pinned_roi, // out: pinned arg translated to ROI frame
const Image& img, // in: the image (grayscale)
const vec_Mod& mods, // in: a vector of models, one for each yaw range
const Shape& pinned); // in: pinned landmarks
} // namespace stasm
#endif // STASM_startshape_H