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

Function OpenDetector

jni/stasm/misc.cpp:771–784  ·  view source on GitHub ↗

* @brief open face or feature detector from its XML file * @param cascade out * @param filename in: basename.ext of cascade * @param datadir in */

Source from the content-addressed store, hash-verified

769 * @param datadir in
770 */
771void OpenDetector(cv::CascadeClassifier& cascade, const char* filename, const char* datadir)
772{
773 if (cascade.empty()) // not yet opened?
774 {
775 char dir[SLEN];
776 STRCPY(dir, datadir);
777 ConvertBackslashesToForwardAndStripFinalSlash(dir);
778 char path[SLEN];
779 sprintf(path, "%s/%s", dir, filename);
780 logprintf("Open %s\n", path);
781 if (!cascade.load(path))
782 Err("Cannot load %s", path);
783 }
784}
785
786/**
787 * @brief convert the x and y coords in feats from the search ROI to the image frame

Callers 2

OpenEyeMouthDetectorsFunction · 0.85
OpenFaceDetector_Method · 0.85

Calls 3

logprintfFunction · 0.85
ErrFunction · 0.85

Tested by

no test coverage detected