sarahb
Posts: 6
Joined: Thu Mar 28, 2019 3:47 pm

Video: Time Integration

Fri Apr 19, 2019 5:38 pm

I am taking a video of blinking lights (with very accurate blinking frequencies). It seems as though my camera (Camera Module v2) is integrating in time, i.e. though it is recording at 90 fps, the frames (taken at every ~11 ms) seem to be an average in time of the image between the current and previous frames. As a result, the frames rarely show lights that are off because the camera seems to be integrating the brightness during ~11 ms periods. Is there a way to disable this feature or is this something inherent to the camera?

User avatar
HermannSW
Posts: 1484
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Video: Time Integration

Fri Apr 19, 2019 6:27 pm

You can use "--shutter" option of raspivid:
https://www.raspberrypi.org/documentati ... /camera.md
-ss, --shutter : Set shutter speed in microseconds
I have successfully taken v2 camera videos with "--shutter 200" when the scene was lit very bright (5000lm led).

Lately I did captures with a modified v1 camera with 13.42µs exposure time and very bright light successfully (the shutter time was much longer, but I made everything dark after 13.42µs, nothing to integrate anymore):
viewtopic.php?f=43&t=235523#p1449873
⇨https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://gitlab.freedesktop.org/HermannSW/gst-template
https://github.com/Hermann-SW/fork-raspiraw
https://twitter.com/HermannSW

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7266
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Video: Time Integration

Sat Apr 20, 2019 3:22 pm

The sensor will integrate over the exposure period, which may be up to 11ms if you are running at 90fps. It will not integrate over more than that. You can request a shorter exposure period as Hermann has said.

The other issue you may not be aware of is that the sensor does not integrate all lines at the same time. It is what is known as a rolling shutter sensor.
See https://en.m.wikipedia.org/wiki/Rolling_shutter or https://picamera.readthedocs.io/en/latest/fov.html for more details of how this affects the image capture.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

User avatar
HermannSW
Posts: 1484
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Video: Time Integration

Sun May 19, 2019 11:54 pm

Just today I replaced Arducam ov5647 camera with a real v1 camera (clone) for taking global shutter images.

For adjustment I took some images of rotating propeller (20000rpm) showing strange rolling shutter effect with raspistill and a 1000lm only unfocused Ikea lamp. From left to right, top to bottom with 25/50/100/200/400/800µs shutter time. For 25/50 I had to increase brightness from 50 to 75 (-br 75) in order to see something:
Image


Then I used focused 5000lm bright light and as you can see 25µs shutter time is good enough to get a clear picture (of eg. the non-moving motor):
Image


Shutter time is always a multiple of line_time_ns (which is 21165ns for v1 mode 7). Because of integer division therefore real shutter time for the image taken is not 25µs but 21.165µs.
⇨https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://gitlab.freedesktop.org/HermannSW/gst-template
https://github.com/Hermann-SW/fork-raspiraw
https://twitter.com/HermannSW

Return to “Camera board”