Smart Camera ESP32
An AI-driven, real-time Sentry Turret platform leveraging asynchronous I/O and computer vision to deliver high-precision autonomous motion tracking on resource-constrained embedded hardware.
Loading...
Searching...
No Matches
Camera Class Reference

Singleton-style manager for camera lifecycle and frame acquisition. More...

#include <camera.h>

Public Member Functions

const camera_buffer_tget_frame_buffer ()
 
Lifecycle Management
 Camera ()
 Constructor: Pre-configures the sensor for optimal CV performance.
 
bool begin ()
 Initializes the hardware and mounts the sensor.
 
Image Acquisition
void capture ()
 Synchronously captures a frame from the sensor.
 

Detailed Description

Singleton-style manager for camera lifecycle and frame acquisition.

Encapsulates the esp_camera driver. It is configured by default for Void Sentry's real-time requirements: Low latency over high resolution.

Constructor & Destructor Documentation

◆ Camera()

Camera::Camera ( )
inline

Constructor: Pre-configures the sensor for optimal CV performance.

  • Resolution: QVGA (320x240) to maintain high FPS.
  • Buffering: Double-buffering enabled to allow simultaneous capture and processing.
  • Grab Mode: CAMERA_GRAB_LATEST ensures we never process "stale" motion data.

Member Function Documentation

◆ begin()

bool Camera::begin ( )

Initializes the hardware and mounts the sensor.

Returns
true if the sensor was identified and PSRAM was allocated.
false if the SCCB bus failed or the camera is not powered.

◆ capture()

void Camera::capture ( )

Synchronously captures a frame from the sensor.

Returns
camera_fb_t* Pointer to the ESP-Camera frame buffer structure.
Note
This function blocks until a full frame is clocked into memory.
Warning
Memory Safety: You MUST call release() with this pointer to return the buffer to the DMA pool.

The documentation for this class was generated from the following files: