feat: cam and slience detect sleep

This commit is contained in:
0Xiao0
2026-06-17 15:02:16 +08:00
parent 154ce461d7
commit a8c6c62c92
9 changed files with 564 additions and 163 deletions

View File

@ -30,6 +30,7 @@ private:
camera_fb_t *current_fb_ = nullptr;
uint8_t *encode_buf_ = nullptr; // Buffer for JPEG encoding (with optional byte swap)
size_t encode_buf_size_ = 0;
float eye_openness_baseline_ = 0.0f;
public:
Esp32Camera(const camera_config_t &config);
@ -40,5 +41,6 @@ public:
virtual bool SetHMirror(bool enabled) override;
virtual bool SetVFlip(bool enabled) override;
virtual bool SetSwapBytes(bool enabled) override;
virtual bool DetectDrowsiness(CameraDrowsinessResult& result, bool show_debug_preview = false) override;
virtual std::string Explain(const std::string &question) override;
};