ascii-chat
Binary v0.16.114-28-gf5913657f
Library lib/v0.3.2-3302-gf5913657f
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
28typedef struct {
29 float x, y, w, h;
31
36
54
57 const face_follow_detection_t *faces, size_t count,
58 double now);
59void face_follow_tick(face_follow_state_t *state, double now, bool enabled);
60
62void face_follow_detect(unsigned char *results, unsigned char *bgr, int width,
64 size_t capacity, size_t *count);
65
66#ifdef __cplusplus
67}
68#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:24
unsigned int width
Definition fft.c:24
bool enabled
Is filtering active?
Definition grep.c:63
face_follow_rect_t box
Definition face_follow.h:33
When code needs to work with face follow detection, it keeps box, confidence here instead of scatteri...
Definition face_follow.h:28
face follow state keeps the values that move through the subsystem: crop, target, face,...
Definition face_follow.h:44
face_follow_rect_t crop
Definition face_follow.h:45
face_follow_rect_t face
Definition face_follow.h:45
unsigned int misses
Definition face_follow.h:52
face_follow_rect_t target
Definition face_follow.h:45