Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP32 CAM better settings? #8683

Closed
1 task done
zekageri opened this issue Sep 29, 2023 · 5 comments
Closed
1 task done

ESP32 CAM better settings? #8683

zekageri opened this issue Sep 29, 2023 · 5 comments
Labels
Resolution: Wontfix Arduino ESP32 team will not fix the issue Status: Community help needed Issue need help from any member from the Community. Type: Question Only question Type: 3rd party Boards

Comments

@zekageri
Copy link

zekageri commented Sep 29, 2023

Board

ESP32_CAM

Device Description

5MP ESP32-CAM OV5640
ESP32-S?

Hardware Configuration

Version

latest master (checkout manually)

IDE Name

PlatformIO

Operating System

Windows 11

Flash frequency

80mhz

PSRAM enabled

yes

Upload speed

115200

Description

So i have bought an ESP32-S with an OV5640 camera module.
I got a really dissapointing picture quality but i have seen others make a lot more out of it.
I can't find any settings to adjust more.

Any recommendation for better settings for this camera?

This is the best i could set so far

image

Sketch

#include <Arduino.h>
#include "esp_camera.h"
#include "ESP32_OV5640_AF.h"

OV5640 ov5640 = OV5640();

void enableAutoFocus(sensor_t* sensor){
    ov5640.start(sensor);

    // Download Firmware for AF
    if (ov5640.focusInit() == 0) {
        Serial.println("OV5640_Focus_Init Successful!");
    }

    // Set Continuous AF MODE
    if (ov5640.autoFocusMode() == 0) {
        Serial.println("OV5640_Auto_Focus Successful!");
    }
}

void setConfig() {
    config.ledc_channel = LEDC_CHANNEL_0;
    config.ledc_timer = LEDC_TIMER_0;
    config.pin_d0 = Y2_GPIO_NUM;
    config.pin_d1 = Y3_GPIO_NUM;
    config.pin_d2 = Y4_GPIO_NUM;
    config.pin_d3 = Y5_GPIO_NUM;
    config.pin_d4 = Y6_GPIO_NUM;
    config.pin_d5 = Y7_GPIO_NUM;
    config.pin_d6 = Y8_GPIO_NUM;
    config.pin_d7 = Y9_GPIO_NUM;
    config.pin_xclk = XCLK_GPIO_NUM;
    config.pin_pclk = PCLK_GPIO_NUM;
    config.pin_vsync = VSYNC_GPIO_NUM;
    config.pin_href = HREF_GPIO_NUM;
    config.pin_sccb_sda = SIOD_GPIO_NUM;
    config.pin_sccb_scl = SIOC_GPIO_NUM;
    config.pin_pwdn = PWDN_GPIO_NUM;
    config.pin_reset = RESET_GPIO_NUM;

    config.xclk_freq_hz = 20000000;
    config.frame_size = FRAMESIZE_XGA; //FRAMESIZE_SVGA;
    config.pixel_format = PIXFORMAT_JPEG;  // for streaming
    config.grab_mode = CAMERA_GRAB_LATEST;
    config.fb_location = CAMERA_FB_IN_PSRAM;
    config.jpeg_quality = 9;
    config.fb_count = 2;

    esp_err_t err = esp_camera_init(&config);
    if (err != ESP_OK) {
        Serial.printf("[Camera] - Init failed with error 0x%x", err);
        return;
    }

    sensor_t* s = esp_camera_sensor_get();
    // s->set_contrast(s, INITIAL_CONTRAST);
    // s->set_brightness(s, INITIAL_BRIGHTNESS);

    enableAutoFocus(s);
}

Debug Message

There is no crash but poor quality.

Other Steps to Reproduce

Here is what i bought

Camera 65 degree: https://www.aliexpress.com/item/1005005710389429.html?spm=a2g0o.order_list.order_list_main.17.7d3118023tdSS7
ESP32: https://www.aliexpress.com/item/1005003472117545.html?spm=a2g0o.order_list.order_list_main.10.7d3118023tdSS7

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@zekageri zekageri added the Status: Awaiting triage Issue is waiting for triage label Sep 29, 2023
@lucasssvaz lucasssvaz added Type: Question Only question Status: Community help needed Issue need help from any member from the Community. and removed Status: Awaiting triage Issue is waiting for triage labels Sep 29, 2023
@lucasssvaz
Copy link
Collaborator

I don't have this module to test nor have I ever used it to give advice. If anyone has experience with it, tips are appreciated :)

@zekageri
Copy link
Author

Yeah, I'm waiting. For some reasonn my picture's left side is brighter. :/

@lucasssvaz
Copy link
Collaborator

With the little experience I have with DSLR cameras, this looks like some artifact from the lens/sensor rather than software configuration (I might be wrong though)

@zekageri
Copy link
Author

Yeah, it's an aliexpress cam. It might be faulty. :/

@VojtechBartoska
Copy link
Collaborator

VojtechBartoska commented Dec 12, 2023

Closing as wontfix do, there is nothing we can do here. :)

@VojtechBartoska VojtechBartoska closed this as not planned Won't fix, can't repro, duplicate, stale Dec 12, 2023
@VojtechBartoska VojtechBartoska added the Resolution: Wontfix Arduino ESP32 team will not fix the issue label Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Wontfix Arduino ESP32 team will not fix the issue Status: Community help needed Issue need help from any member from the Community. Type: Question Only question Type: 3rd party Boards
Projects
None yet
Development

No branches or pull requests

3 participants