News for hackers. Stuff that matters.
Re:A Guide to Recording 660FPS Video on a $6 Raspberry Pi Ca... by jschwartzi on Tuesday August 06, 2019 @03:30PM (#20628624)
This is amazing. These framerates are 1/10th of what a cursory google search says I can get out of a top of the line high-speed camera, but for probably 1/100th the price. You could make so many awesome instructional videos with a tool like this.
Re:A Guide to Recording 660FPS Video on a $6 Raspberry Pi Ca... by ktpsns on Tuesday August 06, 2019 @05:28PM (#20629845)
Which brings me to this Gedankenexperiment: If you buy/build 10 of the raspberry pi based high speed cameras and run them in parallel and could make sure each camera sees the same (we don't consider details here for the time being), is it possible to merge the videos in order to reach the frame rate of a "top of the line high-speed camera"? I could imagine two scenarios:

  1. Start recording with time delay. Probably requires 
     excellent clock synchronisation, a real time kernel, 
     reliable/comparable hardware (gatter timings differ at 
     small timescales). If this works, this would provide a 
     high quality equidistand framerate.

  or

  2. Start recording randomly, synchronize by time or
     with an video event, and merge the frames. This will
     result in a stochastic distribution of frame rates. The 
     usefulness of such a movie depends on what it is 
     supposed to be used for (thinking of scientific usage). 
        Will probably not give nice slow-mo movies. But
     here comes the catch: With interpolation, the shortest 
     reachable frame rate dictates the quality of this
     "superposition camera". How many cheap cameras do we
     need to archieve, on average, the top line high speed 
     camera?
I leave the questions open for friends of Gedankenexperiments ;-)
Re:A Guide to Recording 660FPS Video on a $6 Raspberry Pi Ca... by HALtheWise on Tuesday August 06, 2019 @10:24PM (#20631511)
The raspberry pi camera is rolling shutter, which adds some complications. To properly simulate a high framerate camera, you would want to build each frame from sections of several images that are being simultaneously exposed. Doing so without leaving artifacts at the borders would require some sort of really fancy interpolation, but might be possible.
Re:A Guide to Recording 660FPS Video on a $6 Raspberry Pi Ca... by anfractuosity on Tuesday August 06, 2019 @06:34PM (#20630347)
That's a good question, I'm wondering though, if the shutter speed on commercial high speed cameras is faster, but I could be wrong?

"A Phantom camera he uses goes up to a maximum of 1000 fps in 4K — an exposure time of 1/2000 sec with a 180° shutter speed — and the image starts looking pretty dark on the screen."

I'm just trying to find what shutter speed you can get with the Pi camera.

Edit: Just having a little play:

./raspiraw -eus 500 -md 7 -t 1000 -ts tstamps.csv -hd0 hd0.32k -h 64 --vinc 1F --fps 660 -r "380A,0040;3802,78;3806,0603" -sr 1 -o /dev/shm/out.%04d.raw 2>/dev/null

500 microsecond exposure (1/2000 seconds) seems to run.

Re:A Guide to Recording 660FPS Video on a $6 Raspberry Pi Ca... by HermannSW on Thursday August 08, 2019 @04:46PM (#20648545)
> I'm just trying to find what shutter speed you can get with the Pi camera.

You can reduce the shutter time nearly arbitrarily, as long as you increase light intensity. I did place fast rotating propeller just above a 5000lm led, and did two 9us long flashes. See this image on how bright the two blades of propeller look, at both captured locations (the rest is dark, image was taken inside a closed cardbox, without flash everything was just black): https://raw.githubusercontent.com/Hermann-SW/Raspberry_v1_ca...

Re:A Guide to Recording 660FPS Video on a $6 Raspberry Pi Ca... by rasz on Tuesday August 06, 2019 @05:35PM (#20629905)
pee cameras are clocked externally(EMI made them include 25MHz clock gen on camera module itself), so in theory you could connect them all to a single clock distribution source with appropriately shifted phases
Re:A Guide to Recording 660FPS Video on a $6 Raspberry Pi Ca... by sansnomme on Tuesday August 06, 2019 @06:25PM (#20630289)
How do you disable onboard clock or is it automatic?
Re:A Guide to Recording 660FPS Video on a $6 Raspberry Pi Ca... by simcop2387 on Tuesday August 06, 2019 @07:20PM (#20630637)
You'd likely have to de-solder the one on the board and maybe do a few other small modifications to get it to work properly. I imagine you'd want to use a completely different kind of source and then use some op-amps to both shift the waveform and also then strengthen the signal so that the load of each camera doesn't cause issues.
Re:A Guide to Recording 660FPS Video on a $6 Raspberry Pi Ca... by rasz on Tuesday August 06, 2019 @09:48PM (#20631350)
no analog at those frequencies, you would want dedicated Multi-phase Clock Buffer chip, something like a couple CY7B9945V
Re:A Guide to Recording 660FPS Video on a $6 Raspberry Pi Ca... by londons_explore on Wednesday August 07, 2019 @06:27AM (#20633413)
I think you could probably just parallel connect the quartz clock terminals on the cameras.

As long as your leads didn't have too much capacitance, it ought to just work.

The phase shifting you can do in software by (for example) restarting the camera hundreds of times till by chance it starts a frame with the phase offset you want, and then just run on from there.

Re:A Guide to Recording 660FPS Video on a $6 Raspberry Pi Ca... by sansnomme on Wednesday August 07, 2019 @11:43AM (#20635746)
Won't two clocks interfere with each other?
Re:A Guide to Recording 660FPS Video on a $6 Raspberry Pi Ca... by londons_explore on Wednesday August 07, 2019 @11:51AM (#20635824)
As long as they're tuned close-ish to eachother, they will synchronize and oscillate in lockstep.

I'm talking the actual quartz crystal here, not the output of some digital clocking chip (which you're right, wouldn't work).

Re:A Guide to Recording 660FPS Video on a $6 Raspberry Pi Ca... by rasz on Tuesday August 06, 2019 @06:32PM (#20630339)
its already external, on the back of each camera
Re:A Guide to Recording 660FPS Video on a $6 Raspberry Pi Ca... by sansnomme on Tuesday August 06, 2019 @07:23PM (#20630662)
But it's only selectively enabled no?
Re:A Guide to Recording 660FPS Video on a $6 Raspberry Pi Ca... by User23 on Tuesday August 06, 2019 @09:25PM (#20631251)
I like this. It reminds me of an idea I had about making an ultra-hd projector by running consumer projectors in a grid with careful alignment and cooling. Your idea is similar, but over time instead of space. Both are just dimensions so I don't see why it couldn't work, so long as you had the timing circuit.
Re:A Guide to Recording 660FPS Video on a $6 Raspberry Pi Ca... by snek on Tuesday August 06, 2019 @09:57PM (#20631390)
This isn't just a thought experiment, this is how some of the most influential slow motion to date has been shot, from the famous bullet dodge in the matrix to the first 1-billion fps camera. (Okay yes technically the 1-billion one is the same camera run many times but it's the same synchronization problem)
Re:A Guide to Recording 660FPS Video on a $6 Raspberry Pi Ca... by HermannSW on Wednesday August 07, 2019 @10:43AM (#20635132)
I think that would be possible, just a problem of adjusting all cameras to get overlapping FOV.

There was a MIT student project group that took 16 v1 cameras(!) global external shutter frames and created an animated .gif from that! "Ultra high-speed imaging, capturing matrix style bullet time" https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=2404...

Re:A Guide to Recording 660FPS Video on a $6 Raspberry Pi Ca... by dekhn on Thursday August 08, 2019 @09:12AM (#20644150)
Have some fun: http://graphics.stanford.edu/projects/array/

Reproducing something like this using cheap sensors would require some hardware acumen, but isn't unfeasible. Most industrial cameras, even cheap ones, have external triggers/clocks with nanosecond latency.

Re:A Guide to Recording 660FPS Video on a $6 Raspberry Pi Ca... by HermannSW on Thursday August 08, 2019 @01:07PM (#20646320)
A group of MIT students did synchronize 16 PIs with 16 cameras just over GPIOs to shoot at exactly the same point in time. And they built in microsecond delay for adjusting on when exactly the bullet has passed through apple and leaves: https://news.ycombinator.com/item?id=20635132
Re:A Guide to Recording 660FPS Video on a $6 Raspberry Pi Ca... by dekhn on Friday August 09, 2019 @10:17AM (#20654530)
edgerton would be proud
Re:A Guide to Recording 660FPS Video on a $6 Raspberry Pi Ca... by HermannSW on Saturday August 10, 2019 @03:59AM (#20660802)
True, and he started with 1/100,000 second exposure time humming-bird images 83 years ago!

The MIT group used a flash with 0.5us exposure time. I asked for details without answer yet, but assume that it is costly (Vela One does cost 940£) and one-shot, no fast repeating flashes (Vela One has only 50Hz maximal continuous strobe frequency).

I used cheap 2$ 5000lm LEDs with 7$ led driver to convert mains to 38V/1.5A DC. I was able to do global external shutter captures with that led with 4us shutter time, did not try below yet. Most interestingly these LEDs allowed for 8.33us flashes at 9KHz frequency and used that to capture 109m/s flying airgun pellet 10 times in a single multiple exposure frame (9000eps, exposures per second). PI pwm should easily allow for 90,000eps frames for capturing 900m/s 0.50bmg bullets multiple times per frame in flight ...

You can do the same with 6$ Raspberry v1 camera clone (not with v2), bill of materials as well as global external shutter setup, software and example captured frames can be found here:

https://github.com/Hermann-SW/Raspberry_v1_camera_global_ext...

Re:A Guide to Recording 660FPS Video on a $6 Raspberry Pi Ca... by HermannSW on Wednesday August 07, 2019 @06:58AM (#20633563)
You can get Raspberry v1 camera clone now for less than 4$(!) with free shipping on aliexpress: https://www.aliexpress.com/wholesale?SearchText=raspberry+5M...

And unlike v2 camera, the cheap v1 camera allows (besides high framerate capturing) for global external shutter capturing as well(!). I did capture an in flight 109m/s airgun pellet 10 times in a single multiple exposure frame! https://stamm-wilbrandt.de/en/Raspberry_camera.html#global_e...

Re:A Guide to Recording 660FPS Video on a $6 Raspberry Pi Ca... by ortusdux on Tuesday August 06, 2019 @04:11PM (#20629025)
The chronos 1.4 I have will do 640x96 @ 21,649fps for $3k. So that's 20 times faster for 50 times the price; pretty close to your estimate. The chronos does have a few other amenities that make it worth the price.
Re:A Guide to Recording 660FPS Video on a $6 Raspberry Pi Ca... by kragen on Tuesday August 06, 2019 @07:28PM (#20630691)
Is it made in the US? Is it export-controlled? Here in Argentina getting export-controlled gear is a pain.
Re:A Guide to Recording 660FPS Video on a $6 Raspberry Pi Ca... by ortusdux on Tuesday August 06, 2019 @10:26PM (#20631518)
They are made in and shipped from Canada. I doubt they are export-controlled, but I would email them. They were quite responsive to most of my inquires. Just don't ask when they might implement features. I'm still waiting on some stuff that are listed on the 2 year old spec sheet as "*features (that) are fully supported in the camera's hardware, but are not yet supported in software. They will be added in a free software update after the camera's initial release."
Re:A Guide to Recording 660FPS Video on a $6 Raspberry Pi Ca... by ekr on Tuesday August 06, 2019 @05:48PM (#20630019)
That's 500 times the price (unless you're taking into account the raspberry pi itself).
Re:A Guide to Recording 660FPS Video on a $6 Raspberry Pi Ca... by hoseja on Wednesday August 07, 2019 @02:35AM (#20632416)
... which you should
Re:A Guide to Recording 660FPS Video on a $6 Raspberry Pi Ca... by bufferoverflow on Tuesday August 06, 2019 @04:42PM (#20629390)
You can shoot 960fps at 720p/1080p with some smartphones these days. If you decide to go that route, make sure to get one that doesn't interpolate the frames, but does true 960fps.
Re:A Guide to Recording 660FPS Video on a $6 Raspberry Pi Ca... by CobrastanJorji on Tuesday August 06, 2019 @06:14PM (#20630218)
Could you suggest such a phone because that sounds wicked awesome to experiment with.
Re:A Guide to Recording 660FPS Video on a $6 Raspberry Pi Ca... by CarVac on Tuesday August 06, 2019 @07:17PM (#20630619)
The Galaxy S10 series (including the S10e).