Perfect Jump Shots With OpenCV And Processing

jumpshot

[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.

[via Instructables]

15 thoughts on “Perfect Jump Shots With OpenCV And Processing

  1. 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.

    1. 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)

  2. 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.

  3. 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.

    1. 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.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.