blob: 02d4d1a6ae0034f712784b78a5ac629a3a5f9821 [file] [log] [blame]
The Android Open Source Project7f81d9b2009-03-03 19:30:08 -08001/*
2 * Copyright (C) 2008 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef btk_FaceFinder_EM_H
18#define btk_FaceFinder_EM_H
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24/**
25 * Face Finder object
26 */
27
28/* ---- includes ----------------------------------------------------------- */
29
30#include "DCR.h"
31
32/* ---- related objects --------------------------------------------------- */
33
34/** face finder object */
35struct btk_FaceFinder;
36
37/* ---- typedefs ----------------------------------------------------------- */
38
39/** handle for face finder object */
40typedef struct btk_FaceFinder* btk_HFaceFinder;
41
42/** FaceFinder creation parameters */
43typedef struct
44{
45 /* reserved parameter */
46 u32 reserved;
47
48 /* obaque module parameters */
49 void* pModuleParam;
50
51 /* size of module parameters */
52 u32 moduleParamSize;
53
54 /* maximum number of detectable faces */
55 u32 maxDetectableFaces;
56
57} btk_FaceFinderCreateParam;
58
59/* ---- constants ---------------------------------------------------------- */
60
61/* ---- functions ---------------------------------------------------------- */
62
63/** returns default FaceFinder parameters */
64btk_DECLSPEC
65btk_FaceFinderCreateParam btk_FaceFinder_defaultParam( void );
66
67/** creates a face finder object */
68btk_DECLSPEC
69btk_Status btk_FaceFinder_create( btk_HSDK hsdkA, /* sdk handle */
70 const btk_FaceFinderCreateParam* pCreateParamA,
71 btk_HFaceFinder* hpFaceFinderA );
72
73/** closes a face finder object */
74btk_DECLSPEC
75btk_Status btk_FaceFinder_close( btk_HFaceFinder hFaceFinderA );
76
77/** sets eye distance range */
78btk_DECLSPEC
79btk_Status btk_FaceFinder_setRange( btk_HFaceFinder hFaceFinderA,
80 u32 minDistA,
81 u32 maxDistA );
82
83/** passes a DCR object and triggers image processing */
84btk_DECLSPEC
85btk_Status btk_FaceFinder_putDCR( btk_HFaceFinder hFaceFinderA,
86 btk_HDCR hdcrA );
87
88/** returns number of faces that can be retrieved from face finder with function btk_FaceFinder_getDCR */
89btk_DECLSPEC
90u32 btk_FaceFinder_faces( btk_HFaceFinder hFaceFinderA );
91
92/** retrieves a DCR object for each detected face */
93btk_DECLSPEC
94btk_Status btk_FaceFinder_getDCR( btk_HFaceFinder hFaceFinderA,
95 btk_HDCR hdcrA );
96
97/** processes DCR for single face detection */
98btk_DECLSPEC
99btk_Status btk_FaceFinder_process( btk_HFaceFinder hFaceFinderA,
100 btk_HDCR hdcrA );
101
102#ifdef __cplusplus
103}
104#endif
105
106#endif /* btk_FaceFinder_EM_H */