libre360
libre360 copied to clipboard
Time-stamping photos accurately
As we need a precise camera location, the motion of the camera means we need the timestamps to be fairly accurate. Anything more than a few tens of milliseconds between the GNSS point and the photo timestamp will have a measurable impact on the location accuracy if the camera is mounted on a drone or vehicle, and a hundred milliseconds or so will even impact the accuracy of a camera being carried by a walking user.
Basically whenever a photo gets taken (the physical shutter of the camera opens, or in the case of a Pi camera the sensor performs a readout), we need to correlate that to a time with near-millisecond precision. This means either:
- The cameras need to know the exact time and bake that information into the image files they capture, or
- The controller needs to know exactly when the photos are taken and record the timestamps to correlate to the images later.
In the case of the Sony a6000 camera, we might be able to use the hotshoe to capture the flash sync pulse. In that case, the controller needs to have a fast loop (or interrupt) listening for the sync pulses and logging them for each individual camera (possibly using different GPIO pins for each device).
In the case of the Pi cam, each one will need an individual controller (since the cams don't have onboard storage, and each Pi can probably only read/save the data from one camera). So each "Camera" actually consists of a camera, lens, and an individual Raspberry Pi (probably a Pi Zero to keep costs down, though this necessitates a separate cable as the cable that comes with the camera doesn't fit the Zero). Finally, a "Main" pi (probably a big one, not a Zero) would connect to the GPS, sync itself to GPS time (which is more than adequately precise, particularly if we can use the sync pulse of the GPS instead of the NMEA messages to sync time), and then provide Network Protocol Time (NTP) to the other Pi's, probably via serial.
This sounds like a logical way forward. Ideally we test whether time stamping is accurate by pushing a current time to a very high frequency digital time display if anything like that exists so that we can test if the time stamp burned into the exiftag is close enough to the time displayed in ms.
Resources to setup a gps ardusimple ntp server on the raspi master
https://www.ardusimple.com/question/rpi-adapter-information/ http://www.unixwiz.net/techtips/raspberry-pi3-gps-time.html
Since this isn't a GPS hat we are using, unlike in the linked example, I am laboring under the assumption that we'll be soldering a jumper to number 1:
We will. There's a moderate amount of soldering that needs doing anyway, unless you pay extra for pre-soldered header pins from ArduSimple.
I have some boards with pre-soldered headers. So ready to try any NTP code once we have any.