| 220 | } |
| 221 | |
| 222 | int stasm_search_single( // wrapper for stasm_search_auto and friends |
| 223 | int* foundface, // out: 0=no face, 1=found face |
| 224 | float* landmarks, // out: x0, y0, x1, y1, ..., caller must allocate |
| 225 | const char* image, // in: gray image data, top left corner at 0,0 |
| 226 | int width, // in: image width |
| 227 | int height, // in: image height |
| 228 | const char* imgpath, // in: image path, used only for err msgs and debug |
| 229 | const char* datadir) // in: directory of face detector files |
| 230 | { |
| 231 | if (!stasm_init(datadir, 0 /*trace*/)) |
| 232 | return false; |
| 233 | |
| 234 | if (!stasm_open_image(image, width, height, imgpath, |
| 235 | 0 /*multiface*/, 10 /*minwidth*/)) |
| 236 | return false; |
| 237 | |
| 238 | return stasm_search_auto(foundface, landmarks); |
| 239 | } |
| 240 | |
| 241 | int stasm_search_pinned( // call after the user has pinned some points |
| 242 | float* landmarks, // out: x0, y0, x1, y1, ..., caller must allocate |
no test coverage detected