1 /* 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 21 extern "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 */ 35 struct btk_FaceFinder; 36 37 /* ---- typedefs ----------------------------------------------------------- */ 38 39 /** handle for face finder object */ 40 typedef struct btk_FaceFinder* btk_HFaceFinder; 41 42 /** FaceFinder creation parameters */ 43 typedef 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 */ 64 btk_DECLSPEC 65 btk_FaceFinderCreateParam btk_FaceFinder_defaultParam( void ); 66 67 /** creates a face finder object */ 68 btk_DECLSPEC 69 btk_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 */ 74 btk_DECLSPEC 75 btk_Status btk_FaceFinder_close( btk_HFaceFinder hFaceFinderA ); 76 77 /** sets eye distance range */ 78 btk_DECLSPEC 79 btk_Status btk_FaceFinder_setRange( btk_HFaceFinder hFaceFinderA, 80 u32 minDistA, 81 u32 maxDistA ); 82 83 /** passes a DCR object and triggers image processing */ 84 btk_DECLSPEC 85 btk_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 */ 89 btk_DECLSPEC 90 u32 btk_FaceFinder_faces( btk_HFaceFinder hFaceFinderA ); 91 92 /** retrieves a DCR object for each detected face */ 93 btk_DECLSPEC 94 btk_Status btk_FaceFinder_getDCR( btk_HFaceFinder hFaceFinderA, 95 btk_HDCR hdcrA ); 96 97 /** processes DCR for single face detection */ 98 btk_DECLSPEC 99 btk_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 */ 107