MCPcopy Create free account
hub / github.com/KAlO2/PerfectShow / stasm_init_ext

Function stasm_init_ext

jni/stasm/stasm_lib.cpp:65–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63//-----------------------------------------------------------------------------
64
65int stasm_init_ext( // extended version of stasm_init
66 const char* datadir, // in: directory of face detector files
67 int trace, // in: 0 normal use, 1 trace to stdout and stasm.log
68 void* detparams) // in: NULL or face detector parameters
69{
70 int returnval = 1; // assume success
71 CatchOpenCvErrs();
72 try
73 {
74 print_g = (trace != 0);
75 trace_g = (trace != 0);
76 if (mods_g.empty()) // not yet initialized?
77 {
78 if (trace)
79 {
80 // Open a log file in the current directory (if possible).
81 // After the log file is opened, lprintf and stasm_printf
82 // will print to stasm.log (as well as to stdout).
83 OpenLogFile();
84 }
85 lprintf("Stasm version %s%s\n",
86 stasm_VERSION, trace? " Logging to stasm.log": "");
87 CV_Assert(datadir && datadir[0] && STRNLEN(datadir, SLEN) < SLEN);
88 InitMods(mods_g, datadir); // init ASM model(s)
89 facedet_g.OpenFaceDetector_(datadir, detparams);
90 OpenEyeMouthDetectors(mods_g, datadir);
91 }
92 CheckStasmInit();
93 }
94 catch(...)
95 {
96 returnval = 0; // a call was made to Err or a CV_Assert failed
97 }
98 UncatchOpenCvErrs();
99 return returnval;
100}
101
102int stasm_init( // call once, at bootup (to read models from disk)
103 const char* datadir, // in: directory of face detector files

Callers 1

stasm_initFunction · 0.85

Calls 9

CatchOpenCvErrsFunction · 0.85
OpenLogFileFunction · 0.85
lprintfFunction · 0.85
STRNLENFunction · 0.85
InitModsFunction · 0.85
OpenEyeMouthDetectorsFunction · 0.85
CheckStasmInitFunction · 0.85
UncatchOpenCvErrsFunction · 0.85
OpenFaceDetector_Method · 0.80

Tested by

no test coverage detected