Page 4 of 4

Re: ESP32-CAM ov2640 exposure control/FREX mode

Posted: Thu Jul 18, 2019 9:05 pm
by HermannSW
I did new frame capture, with mostly same settings, but this time with "Wait for next VSYNC" enabled:

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

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) {
    await sleep(ms)
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.

Re: ESP32-CAM ov2640 exposure control/FREX mode

Posted: Tue Aug 06, 2019 6:47 pm
by HermannSW
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.

Re: ESP32-CAM ov2640 exposure control/FREX mode

Posted: Mon Oct 28, 2019 6:08 pm
by HermannSW
It turned out that Raspberry v1 camera can do global shutter capturing at daylight of fast rotating propeller as well: ... r#daylight

Since v1 camera can do so with bigger framesize and higher framerates, I did not continue ESP32-CAM ov2640 investigations yet.

v1 camera allows for crazy stuff, this is first 20,000fps video I created from a 20,000eps (exposures per second) multiple exposure frame. A black painted propeller over a black disk did rotate very fast, and has a single small white marker (played at 20fps, 1000 times slower than real).The disk as well as propeller are painted with Black 3.0, which absorbs 98% of visible light. The disk looks grey, because the 5000lm diy highspeed flash did 34 flashes 9us long, at 20KHz frequency, so disk is hit by 34*9us=0.306ms 5000lm light:

Playing with multiple airsoft pellets shot by single airsoft pistol is nice as well, I fill a red pellet (3D printed by my son) first, then a yellow airsoft pellet, and finally a red pellet. The left three pellets are from one multiple exposure, the right three pellets are from next exposure:

You can find much more interesting stuff (like camera software panning to determine fast flying pellet (36m/s) rotation in flight) in the repo ...

Re: ESP32-CAM ov2640 exposure control/FREX mode

Posted: Sun Dec 08, 2019 12:31 pm
by stonemull
Thanks for that info, I want to use mine as a timelapse camera and have been looking into extreme low light (starlight ideally)
and was hoping several second exposures would be possible, I came to the conclusion I needed that FREX pin broken out and that led me to this post.
Came to the conclusion that this is probably not the best sensor for this funtionality.

Just wanted to say I appreciate the work put into documenting this :)