mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-09 13:06:54 +03:00
Update to 6.2.1
This commit is contained in:
@@ -140,24 +140,31 @@ bool CCamera::SetBrightnessContrastSaturation(int _brightness, int _contrast, in
|
||||
{
|
||||
bool result = false;
|
||||
sensor_t * s = esp_camera_sensor_get();
|
||||
_brightness = min(2, max(-2, _brightness));
|
||||
_contrast = min(2, max(-2, _contrast));
|
||||
if (_brightness > -100)
|
||||
_brightness = min(2, max(-2, _brightness));
|
||||
if (_contrast > -100)
|
||||
_contrast = min(2, max(-2, _contrast));
|
||||
// _saturation = min(2, max(-2, _saturation));
|
||||
|
||||
// s->set_saturation(s, _saturation);
|
||||
s->set_contrast(s, _contrast);
|
||||
s->set_brightness(s, _brightness);
|
||||
if (_contrast > -100)
|
||||
s->set_contrast(s, _contrast);
|
||||
if (_brightness > -100)
|
||||
s->set_brightness(s, _brightness);
|
||||
|
||||
if (_brightness != brightness)
|
||||
if ((_brightness != brightness) && (_brightness > -100))
|
||||
result = true;
|
||||
if (_contrast != contrast)
|
||||
if ((_contrast != contrast) && (_contrast > -100))
|
||||
result = true;
|
||||
if (_saturation != saturation)
|
||||
if ((_saturation != saturation) && (_saturation > -100))
|
||||
result = true;
|
||||
|
||||
brightness = _brightness;
|
||||
contrast = _contrast;
|
||||
saturation = _saturation;
|
||||
if (_brightness > -100)
|
||||
brightness = _brightness;
|
||||
if (_contrast > -100)
|
||||
contrast = _contrast;
|
||||
if (_saturation > -100)
|
||||
saturation = _saturation;
|
||||
|
||||
if (result && isFixedExposure)
|
||||
EnableAutoExposure(waitbeforepicture_org);
|
||||
|
||||
@@ -49,9 +49,9 @@ bool ClassFlowMakeImage::ReadParameter(FILE* pfile, string& aktparamgraph)
|
||||
std::vector<string> zerlegt;
|
||||
|
||||
aktparamgraph = trim(aktparamgraph);
|
||||
int _brightness = 0;
|
||||
int _contrast = 0;
|
||||
int _saturation = 0;
|
||||
int _brightness = -100;
|
||||
int _contrast = -100;
|
||||
int _saturation = -100;
|
||||
|
||||
if (aktparamgraph.size() == 0)
|
||||
if (!this->GetNextParagraph(pfile, aktparamgraph))
|
||||
|
||||
@@ -406,9 +406,9 @@ esp_err_t handler_editflow(httpd_req_t *req)
|
||||
std::string _bri = "";
|
||||
std::string _con = "";
|
||||
std::string _sat = "";
|
||||
int bri = 0;
|
||||
int sat = 0;
|
||||
int con = 0;
|
||||
int bri = -100;
|
||||
int sat = -100;
|
||||
int con = -100;
|
||||
|
||||
if (httpd_query_key_value(_query, "host", _valuechar, 30) == ESP_OK) {
|
||||
_host = std::string(_valuechar);
|
||||
|
||||
Reference in New Issue
Block a user