[ElectricSlim] likes taking “Jump Shots” – photographs where the subject is captured in midair. He’s created a novel method to catch the perfect moment with OpenCV and Processing. Anyone who has tried jump shot photography can tell you how frustrating it is. Even with an experienced photographer at the shutter, shots are as likely to miss that perfect moment as they are to catch it. This is even harder when you’re trying to take jump shots solo. Wireless shutter releases can work, but unless you have a DSLR, shutter lag can cause you to miss the mark.
[ElectricSlim] decided to put his programming skills to work on the problem. He wrote a Processing sketch using the OpenCV library. The sketch has a relatively simple logic path: “IF a face is detected within a bounding box AND the face is dropping in height THEN snap a picture” The system isn’t perfect, A person must be looking directly at the camera for the photo the face to be detected. However, it’s good enough to take some great shots. The software is also repeatable enough to make animations of various jump shots, as seen in [ElectricSlim’s] video.
We think this would be a great starting point for a trigger system. Use a webcam to determine when to shoot a picture. When the conditions pass, a trigger could be sent to a DSLR, resulting in a much higher quality frame than what most webcams can produce.
15 thoughts on “Perfect Jump Shots With OpenCV And Processing”
I think I might have to jump on this.
Haha, amusing video. Zero G goofy dancing will always be a win.
Slightly related question: I was under the impression that shutter lag wasn’t a problem these days, am I ill informed?
HaD standard comment: Not a hack.
It depends – If the camera can be forced to fix focus, then shutter lag is usually minimized. This generally pushes things into the realm of high end point and shoots and DSLR cameras – though there are always exceptions (CHDK, etc)
Hmm, I can’t help but think the approach with face detection is a bit over the top.
I’d have the user define a region of interest in the picture, which should be where you jump, and use simple optical flow to determine movement, its speed and direction.
Now you know that rising and falling follows a certain pattern, thanks to gravity. With some frames you can pretty reliably estimate the further movement and trigger the shutter even before the peak in the jump to fight shutter lag.
Benefit is you can use it on anything that moves, not just faces. And with a limited region to look at, you could take pictures with many things else hopping around. Limit the region enough to barely cover any background and this should be pretty robust. And of course OpenCV has optical flow algorithms at hand, too.
Or just, you know, take 30 pictures per second and discard the ones that are not wanted?
Why sort through thirty images when you want one?
Or you could use CHDK – a cheap canon point and shoot and one of the CHDK motion detection scripts…. low budget, more hit and miss, but it works.
lol ropes thin ropes hold him up you can’t see them.
nice try Hack a Day you can’t fool me .
if you watch action movies how they make you’ll see they use ropes
Uhg, why even bother.
He is right. In frame 46 you can see the ropes. Use Virtual Dub or so.
This is overly complex. A pressure pad and arduino or picaxe can do this easily. just stand on the pressure pad and jump, trigger shutter XXX millizeconds after the pressure pad stops sensing the person on it.
The cool part about gravity is that it’s a constant (close enough of a constant) that simple timers will do this.
Gravity is consistent – but people are not. No one would be able to jump consistently enough for the timers to capture the weightless moment every time. Especially if you consider a video situation, where there are 10’s or 100’s of jumps – all with different poses.
Dezo Hoffman, Beatles, Twist and Shout, enough said.
Cool technique. Use fill flash next time!
A great way to stick out on your CV, now even better.
Does it come with a ball to put on your car-antenna?
Please be kind and respectful to help make the comments section excellent. (Comment Policy)