mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-08 12:36:52 +03:00
* comment translation * translation part #2 * code translation from DE to ENG #part3 * translation #4 * dismantled =>splitted * bereich => range * Update defines.h Co-authored-by: jomjol <30766535+jomjol@users.noreply.github.com>
54 lines
1.5 KiB
C++
54 lines
1.5 KiB
C++
#ifndef CLASSCONTROLLCAMERA_H
|
|
#define CLASSCONTROLLCAMERA_H
|
|
|
|
#include <string>
|
|
#include "freertos/FreeRTOS.h"
|
|
#include "freertos/task.h"
|
|
#include "freertos/queue.h"
|
|
#include "freertos/event_groups.h"
|
|
|
|
#include "esp_camera.h"
|
|
#include <string>
|
|
#include <esp_http_server.h>
|
|
#include "CImageBasis.h"
|
|
#include "../../include/defines.h"
|
|
|
|
class CCamera {
|
|
protected:
|
|
int ActualQuality;
|
|
framesize_t ActualResolution;
|
|
int brightness, contrast, saturation;
|
|
bool isFixedExposure;
|
|
int waitbeforepicture_org;
|
|
int led_intensity = 4095;
|
|
|
|
void ledc_init(void);
|
|
bool CameraInitSuccessful = false;
|
|
|
|
public:
|
|
int image_height, image_width;
|
|
|
|
CCamera();
|
|
esp_err_t InitCam();
|
|
|
|
void LightOnOff(bool status);
|
|
void LEDOnOff(bool status);
|
|
esp_err_t CaptureToHTTP(httpd_req_t *req, int delay = 0);
|
|
void SetQualitySize(int qual, framesize_t resol);
|
|
bool SetBrightnessContrastSaturation(int _brightness, int _contrast, int _saturation);
|
|
void GetCameraParameter(httpd_req_t *req, int &qual, framesize_t &resol);
|
|
void SetLEDIntensity(float _intrel);
|
|
void EnableAutoExposure(int flash_duration);
|
|
bool getCameraInitSuccessful();
|
|
|
|
|
|
framesize_t TextToFramesize(const char * text);
|
|
|
|
esp_err_t CaptureToFile(std::string nm, int delay = 0);
|
|
esp_err_t CaptureToBasisImage(CImageBasis *_Image, int delay = 0);
|
|
};
|
|
|
|
|
|
extern CCamera Camera;
|
|
|
|
#endif |