ESP32-CAM ov2640 exposure control/FREX mode

User avatar
HermannSW
Posts: 89
Joined: Fri Oct 27, 2017 6:58 am
Location: Eberbach, Germany
Contact:

Re: ESP32-CAM ov2640 exposure control/FREX mode

Postby HermannSW » Thu Jul 18, 2019 9:05 pm

I did new frame capture, with mostly same settings, but this time with "Wait for next VSYNC" enabled:
Image

This was the captured frame after I clicked "doit" button:
Image

These were the last two rows of Arduino IDE "serial Monitor" output:

Code: Select all

...
MJPG: 20556B 161ms (6.2fps), AVG: 155ms (6.5fps), 0+0+0+0=0 0
MJPG: 21333B 161ms (6.2fps), AVG: 156ms (6.4fps), 0+0+0+0=0 0
In difference to yesterday, today we know exactly when the 1.05ms time frame of the two 50µs long flashes happened:
Because of "Waiting for next VSYNC" at the very beginning of capturing 2nd last 161ms frame.
Since the 170ms offset reaches into next (last) frame it seems that the missing top part of global shutter propeller is the area of last frame that was already captured (rolling shutter) for last frame, before stopping the stream is initiated (this is the browser code executed when clicking on "doit"):

Code: Select all

  async function doit(ms) {
    updateConfig(ges_vsync_value)
    updateConfig(doitButton)
    await sleep(ms)
    stopStream();
  }
I expected now, that capturing with these settings would be completely recreatable.
But that was not the case.
Time for sending the updateConfig http requests might differ (Wifi).
Sleeping is done in browser, not sure how precisely timewise recreatable the actual start of the sleep is.
Also the waiting for VSYNC is executed on ESP32, while the wait and stop stream happen in browser.

User avatar
HermannSW
Posts: 89
Joined: Fri Oct 27, 2017 6:58 am
Location: Eberbach, Germany
Contact:

Re: ESP32-CAM ov2640 exposure control/FREX mode

Postby HermannSW » Tue Aug 06, 2019 6:47 pm

I just had serious problems in getting any global shutter captures done.

It turned out to be good to have serial monitor output in view.
The router in vacation house is not good, the time to capture a frame toggles between below 200ms and above 1000ms. And in current state, implementation is fragile to timings.
I temporarily switched to tethering hotspot on Android smartphone, but that has same unreliable frame times.

Just wanted to note that problem and diagnosis in case somebody wants to try doing global shutter capturing with ESP32-CAM.

Who is online

Users browsing this forum: No registered users and 6 guests