ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
face_follow.h
Go to the documentation of this file.
1#pragma once
2
3/* Existing buffer budgets in bytes, including NUL for text storage. */
4#define FACE_FOLLOW_DETECT_WIDTH 320
5#define FACE_FOLLOW_DETECT_HEIGHT 240
6#define FACE_FOLLOW_RESULT_BUFFER_SIZE 0x9000
7#define FACE_FOLLOW_MAX_DETECTIONS 32
8
9#include <stdbool.h>
10#include <stddef.h>
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
23typedef struct {
24 float x, y, w, h;
26
31
46
48void face_follow_observe(face_follow_state_t *state, const face_follow_detection_t *faces, size_t count, double now);
49void face_follow_tick(face_follow_state_t *state, double now, bool enabled);
50
52void face_follow_detect(unsigned char *results, unsigned char *bgr, int width, int height,
53 face_follow_detection_t *faces, size_t capacity, size_t *count);
54
55#ifdef __cplusplus
56}
57#endif
void face_follow_tick(face_follow_state_t *state, double now, bool enabled)
void face_follow_init(face_follow_state_t *state)
Definition face_follow.c:13
void face_follow_observe(face_follow_state_t *state, const face_follow_detection_t *faces, size_t count, double now)
Definition face_follow.c:25
void face_follow_detect(unsigned char *results, unsigned char *bgr, int width, int height, face_follow_detection_t *faces, size_t capacity, size_t *count)
unsigned int height
Definition fft.c:23
unsigned int width
Definition fft.c:23
bool enabled
Is filtering active?
Definition grep.c:62
face_follow_rect_t box
Definition face_follow.h:28
When code needs to work with face follow detection, it keeps box, confidence here instead of scatteri...
Definition face_follow.h:23
face follow state keeps the values that move through the subsystem: crop, target, face,...
Definition face_follow.h:36
face_follow_rect_t crop
Definition face_follow.h:37
face_follow_rect_t face
Definition face_follow.h:37
unsigned int misses
Definition face_follow.h:44
face_follow_rect_t target
Definition face_follow.h:37