You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 15, 2020. It is now read-only.
Because the OV2640 on the ESP32 runs at limited frame rates, the auto exposure causes motion smearing. Reducing the shutter speed in good light reduces smearing. So I added the simple function below to my copy of ov2640.c
staticintset_shutter_divider (sensor_t*sensor, intshutterDivider) {
/* from http://www.arducam.com/manual-exposure-ov2640 the minimum exposure time is 1 Line Time, and the maximum exposure time is one Frame time. mimimum exposure time depends on pclk (53.4uSecs @ 36MHz) pclk = xclk /(decimal value of clkrc[0:5]+1. Bit 7 is frequency doubler Required register value is a multiplier of the minimum exposure time Exposure time multiplier is spread across 3 registers. However: This function just reads the current value of the middle register and divides it down to reduce shutter time for faster exposure, or increase it for low light Must disable automatic exposure control beforehand: s_state->sensor.set_exposure_ctrl(&s_state->sensor, 0); // disable AEC s_state->sensor.set_shutter_divider(&s_state->sensor, 2); // reduce shutter speed to a quarter of auto */intret=0;
uint8_tAECreg=SCCB_Read(sensor->slv_addr, AEC); // provides bits 2-9 of exposure time multiplieruint8_tnewAECreg=AECreg>>shutterDivider; // shutterDivider is a +ve or -ve bit shift valueif (newAECreg<AECreg&&shutterDivider<0) returnret; // abandon if increased shutter time would overflow registerelseret |= SCCB_Write(sensor->slv_addr, AEC, newAECreg);
returnret;
}
The text was updated successfully, but these errors were encountered:
@s60sc
Hi, I too have noticed this smearing and would like to know.
Is this script working? How do I implement it?
Or is this a question we should work on?
Thx
I managed to get this to work for a single image, but how would I use this to control the exposure while streaming video? When I turn the auto exposure off I cannot seem to turn it in again.
Must the camera module be reset every time for this?
Any help will be appreciated.
Thx
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Because the OV2640 on the ESP32 runs at limited frame rates, the auto exposure causes motion smearing. Reducing the shutter speed in good light reduces smearing. So I added the simple function below to my copy of ov2640.c
The text was updated successfully, but these errors were encountered: