added config_camera with horizontal and vertical flip

pull/220/head
alanbjohnston 3 years ago committed by GitHub
parent 63daa1f540
commit 354c7304fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -181,6 +181,8 @@ void setup() {
Serial.begin(112500);
initialize_camera();
config_camera();
Serial.println("ESP32-CAM Camera initialized");
@ -316,9 +318,22 @@ static esp_err_t init_camera()
// ESP_LOGE(TAG, "Camera Init Failed");
return err;
}
return ESP_OK;
}
void config_camera() {
sensor_t * s = esp_camera_sensor_get();
s->set_brightness(s, 2); // -2 to 2
// s->set_contrast(s, 0); // -2 to 2
s->set_saturation(s, 1); // -2 to 2
s->set_hmirror(s, 1); // 0 = disable , 1 = enable
s->set_vflip(s, 1);
}
void initialize_camera() {
if (ESP_OK != init_camera()) {
Serial.println("Failed to initialize camera!");

Loading…
Cancel
Save

Powered by TurnKey Linux.