Announcement

Collapse
No announcement yet.

PRIMER: What's needed to record a golf swing?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • PRIMER: What's needed to record a golf swing?

    Every few months there's a new thread asking what hardware and software is available to record our golf swings. The usual suspects get discussed from cheap to expensive with no clear winners. It's a sad lot so I don't have any particular recommendations. BUT the subject does require specialized knowledge. It's the knowledge aspect I'll attempt to cover in this thread.

    For me, a reasonable golf swing recording package should be able to do:
    • "High speed" recording (ie more than 30 fps).
    • Automatic capture
    • At least two views possible, Down The Line and Face-On. But not necessarily at the same time.
    • Immediate slow motion playback including frame by frame and smooth scrolling (ie jog shuttle).
    • Ability to annotate basic lines, angles and maybe track paths (ie hands/club etc).
    There is a lot more one could ask for but this list is a decent place to start.

    The next several posts will cover the background knowledge needed to select such a system. They will also cover how to set up properly to record a golf swing. Finally I will recommend an el cheapo system to get you started.
    Last edited by FaultyClubs; 12-06-2016, 07:11 AM.

  • #2
    With that in mind here are a few key definitions/concepts one should understand.

    1) BACKGROUND TERMS:

    Shutter Speed (Duration): This controls image blurring. Amount of blur depends on the distance an object moves during the time the shutter is open. On normal video it defaults to 1/fps (ie at 30fps the shutter would be open 1/30 second). Good cameras allow shutter speed to be set independent of frame rate (ie one can set the shutter to be open 1/2000 second to stop blurring even at 30 fps).

    NOTE: Higher shutter speeds require more light for the same result (ie twice the shutter speed will require twice the light).

    Frame rate (FPS): The number of images captured per second. Higher is better, slow motion analysis require at least 60 fps to capture enough (barely) frames on the downswing. 120 fps and up works well. The sky's the limit and it gets incrementally nicer (read $$) the higher you go.

    NOTE: People incorrectly seek to increase frame rate to reduce motion blur. But blur reduction is solely due to shorter shutter duration. On decent cameras shutter duration can be set independently from frame rate. Frame rate should be set based on the temporal resolution you want for slow motion.

    Global versus Rolling Shutter: This refers to the method used to "expose" the sensor. Global shutters expose the entire sensor at once. Rolling shutters conceptually slide a slit across the sensor eventually exposing the entire sensor to the scene. However because the slit takes time to work it's way across the sensor not all the sensor is exposed at the same time. This distorts fast moving objects since part of the image will be from an earlier time and part will be from a later time. If the image is slow moving or blurred a rolling shutter is OK but only a global shutter will work for stop action of fast moving objects.

    NOTE: Consumer cameras are all rolling shutter, most machine vision cameras are global (but not all so one has to check the specs).

    Sensor Size: The physical size of the sensor. All things being equal, bigger sensors capture more photons and therefore need less light. For example, twice the area captures twice the photons meaning half the light needed for the same results. Sizes tend to use standard naming conventions which need to be converted into actual precise dimensions when calculating sensor areas for comparison.

    Quantum Efficiency (QE): The efficiency by which photon are converted into electrons. 100% means one electron generated for every photon. All other things being equal, a sensor with QE=100% would need half the light of a sensor with QE=50%.

    Noise factors: Noise refers to the "graininess" of the image. There a many contributing factors from thermal noise, fixed pattern noise, read noise but it all contributes to grain. Better sensors and implementations perform better, and if you are spending real money it pays to consider this also.

    However often the dominate noise source is simply insufficient light. Photon arrival is a random statistical process reflected by the Poisson distribution and when few photons are arriving the variation becomes visible as image "noise". If this noise is unacceptable the solution is to gather more photons...more light, "faster" lenses, longer exposures and if all else fails larger sensors.

    F-Stop: The light gathering capability of a lens. Each full F-stop number captures double the light of the next higher number (e.g. 1, 1.4, 2, 2.8, 4, 5.6, 8 etc.) For example, a F2 lens will capture twice the light of an F2.8 lens and therefore need half the room lighting for the same result.

    Camera Drivers: What a mess. Most webcams require their own Directx compatible driver. Some are UVC compliant and don't need special Windows drivers. Most industrial cameras require their own driver and a few are also Directx compatible. Those that are DirectX compatible may or may not work fully in DirectX mode.

    The video software has the same problem in reverse. Most require Directx compatible drivers but even so many don't support all the functions of the camera. Some are written with special drivers but then require specific cameras.

    Software using industrial cameras typically need to be written for the specific brand to work well. Some software may work at low frame rates but be unable to support the camera's higher frame rates. Others will work for some, but not all, the possible cameras modes.

    BOTTOMLINE: It's very much buyer beware when mixing and matching cameras with software (industrial machine vision cameras especially). You'll have to match the hardware interface, the driver, and the software. Definitely try before you buy!
    Last edited by FaultyClubs; 12-06-2016, 06:35 AM.

    Comment


    • #3
      2) SELECTING A CAMERA:

      With the key concepts in mind, here are some things you should think about when selecting a camera.
      • Shutter type. First decide if you need freeze frame images of your clubhead. If so there's no choice, you need a global shutter camera. If you can accept some blurring then most people can live with the distortions inherent in a rolling shutter camera. In any case the shutter needs to be independently controllable so you can adjust the blurring without changing frame rates.
      • Decide what frame rates (for slow motion analysis) and resolution (for size/clarity) you need.
      • Decide how much blurring is acceptable and how much light you have available then select your required sensor size and lens accordingly.
      • Finally, make sure your camera will work with your favorite software.
      NOTE: Color is much nicer than B&W.
      NOTE: Typically the lens is extra on industrial cameras.


      At the cheap end for about $5 one can get a PS3eye camera with specs like:
      • Resolution VGA: 640x480p, Quarter VGA: 320x240
      • FPS = 75fps at 640x480, Approx 200 fps at 320x240
      • Shutter = Rolling (independently controllable)
      • Sensor size = 1/4"
      • QE = 50%
      A unique plus of the PS3eye is the 200 fps which allows very good slow motion although 320x240 resolution is grim for sure.

      Worhwhile improvements to the PS3eye would be higher resolution for clearer picture, faster fps for better slow motion and larger sensor for better light performance. If one wanted distortionless stop action then a global shutter would be required. Still, one could do worse than this at 100x the price so don't assume more expensive is better. More expensive may just mean older or low volume.

      At the expensive end a very good camera might look something like:
      • Resolution: HD:1920x1080p
      • FPS = 500fps
      • Shutter = Global (independently controllable)
      • Sensor size = 1/1.2"
      • QE = >70%
      • Color
      With a significantly larger sensor and high QE this camera would need a lot less light. The high fps and resolution would provide smooth slow motion with clear pictures. The global shutter would allow freeze frame without distortion. Good cameras will allow even higher frame rates at lower resolutions. Overall this would probably cost something like $2k and work fantastic.

      There are several good industrial cameras with global shutters in the $500-$1k range if you can find suitable software to run them.

      There are some nice webcams that will do 60fps in the $100-$150 range. These provide a image quality improvement over the decidedly mediocre quality of a PS3eye camera. Not all software supports webcams at the higher rate though.

      There are inexpensive board level cameras ($50 or so) similar to the PS3eye that will support 640x480@120 fps or 1280x720p resolution at 60 fps. These are based on the OV2710 sensor.

      There are also ancient Firewire and DV cameras that work with some software. And consumer cameras such as the Sony DSC-RX100 Mk4 or the old workhorses Casio EX-ZR/FH cameras that support high frame rates. And of course the ubiquitous smartphone camera running at 120fps or even 240fps. All with rolling shutters though. The trick with these is finding software with features and a work flow to your liking.

      Just remember the golden rule: When selecting cameras make sure they will actually work with your chosen software!

      TIP: If you are new, start cheap and small until you figure out what matters.
      Last edited by FaultyClubs; 12-06-2016, 07:18 AM.

      Comment


      • #4
        3) SELECTING THE SOFTWARE:

        The key part is making sure your selected software will work with your camera. The other features are self-evident, just make sure the software really does what you want. If you're not sure what functions you need, I'd suggest starting with the list described in the first post.

        Of course you can reverse the process and start with your software and then figure out what cameras it will support by checking which, if any, camera will be suitable based on the camera section above.

        TIP: Newbies often overlook the value of automatic capture and playback.
        Last edited by FaultyClubs; 12-06-2016, 06:48 AM.

        Comment


        • #5
          4) PHYSICALLY PLACING THE CAMERAS:

          Don't just put the camera in place and start recording. Cameras render a 3D world in 2D. So the images lie! You need to learn by experimentation how they distort reality otherwise you could be "fixing" non-existing swing flaws.

          A simple example, setup your camera for a down the line (DTL)view and go to the top of your backswing to check if the club is on plane, laid off or pointing across the line. Put the camera in three different positions: inline with your target line, inline with your hands, inline with your heels. Notice how the exact same club position can look laid off, on plane, or across the line simply by changing your camera DTL position. Which is correct? You have to figure that out.

          Another example would be your take-away. If you want it on plane at the 9 o’clock position, try holding it perfectly on plane and move the camera as mentioned above. The exact same club position will look way inside, on plane, or way outside simply by changing the camera position.

          Similar problems exist for Face on views. High/low, forward/back. Everything changes.

          The bottom-line is the camera position greatly affects how the club looks. Your stance can appear open or closed, your club head can appear open or closed, shaft laid off or across the line, your hands appear high or low, impact shaft lean present or absent...all by simply changing your camera position. No one camera position will show the entire swing correctly so you have to learn how the correct 3D position looks given you favorite camera position. The distortion errors will be different at each point of your swing. Once you've learned how the correct swing looks given your favorite camera position you should record your swings with the exact same camera position.

          Personally, I record everything belt high. Face-on is inline with my belt buckle at address, DTL is inline with my toes.

          Also the distorting effect is dramatic if your cameras are close. A 2 meter camera distance is a very close distance. Images will be highly sensitive to camera placement and distortions will vary quite a bit throughout the swing. 5-10 meters is definitely a much better distance.

          NOTE: Make sure you cameras are exactly parallel/perpendicular to your target line (ie not skewed).

          Last edited by FaultyClubs; 12-06-2016, 06:51 AM.

          Comment


          • #6
            5) SUGGESTION FOR NEOPHYTES:

            It is easy to spend thousands of dollars on a good setup. So, if you are completely new, my suggestion would be to try something like Kinovea (free) with a webcam (cheap). This gets you into the game. Who knows, it may be enough. At the least you'll learn what matters before spending multi-kilobucks on video cameras and software.

            I did it that way and learned (for me):
            • 30 fps is way too slow, 60/75 fps was OK, 120 fps good enough, 200 fps very nice but not essential.
            • 640x480 resolution OK, 1280x720 is better, 320x240 not worth it.
            • automatic recording a must, I don't have the patience to fiddle around
            • automatic slow motion replay a must, lack of patience here too
            • don't need simultaneous DTL and Face-on views. Didn't even want it.
            • don't need freeze frame images of my club head. Hand orientation shows enough at much slower shutter speeds
            • crazy high shutter speeds are needed to COMPLETELY stop club head action...and so is the requisite amounts of light. Not worth it to me.
            • rolling shutter is useless for freeze frame view of the club head
            • a little club head blur is a good thing, easy to see at a glance where your maximum club head speeds are occurring
            • my cameras are too close (and unfortunately so are my walls...)
            • most of my problems are big things and not subtle, just about any decent camera will do

            Most webcams work with Kinovea. Better ones can do 60 fps. You may already have one so try that first. For faster frame rates it's hard to beat the $5 cost of a PS3eye camera. The PS3eye will do 640x480 at 75 fps, or 320x240 around 200 fps. You'll need the Code Laboratories driver.

            Kinovea is free, open source and focused on sports video analysis.

            So for less than $10 you can have a complete system (PS3eye camera / Kinovea video software). Main weaknesses are:
            • not the best picture
            • a rolling shutter so don't bother with freeze frame (although the shutter can be independently adjusted to freeze the club head),
            • small 1/4" sensor so you'll need a lot of light,
            • and Kinovea requires manual start/stop recording (has good annotation, decent path tracking and good slow motion though).

            NOTE: If you just want to make a swing, look up and see yourself hit then Kinvoea does that very well since it has adjustable playback delay (no slow motion or playback analysis in that mode). Kinovea will also support dual cameras for DTL and Face-On but I don't use that capability.
            Last edited by FaultyClubs; 12-06-2016, 06:57 AM.

            Comment


            • #7
              The Full Monty of dirt cheap solutions:

              This would take Kinovea and add automatic recording.

              For automatic recording get a 3rd party sound detect/trigger program and put a keyboard macro wrapper around Kinovea and you can make it do most anything.

              I started out with the following:
              • PS3eye with codelaboratories driver ($5)
              • NCH ToneDet microphone trigger program (free)
              • Autoit (better) or Autohotkey key keyboard macro program (free)
              • Kinovea video capture/analysis (free)

              Then I coded up a simple sequence to automatically do the following:
              • Record using microphone trigger
              • (Optional) Image process (autolevel, sharpen)
              • Playback swing in slow motion loop (3x)
              • Manually scroll around frame by frame, annotate etc
              • Wait for new hit and repeat.

              In hindsight the image processing step wasn't really worth the effort.

              Obviously this isn't plug and play but the programming is simple and it's good for your brain cells. So it's for people willing to put in a bit of effort (unplug your TV for a couple evenings and you'll be done).

              NOTE: I did this years ago and haven't looked for software since. There might be something cheap nowadays with a similar automatic work flow and capability. Based on current threads on the topic it doesn't appear so but if you've found something please post up! I'm also not current on the latest webcams...are there any doing 120fps these days?

              NOTE: Regarding Kinovea...be aware simply upgrading to industrial machine vision cameras may not bring happiness. I don't know of any working properly in v8.15 at the higher frame rates. If you have one that works please tells us the exact model and what it can do (frame rates/resolution etc)!
              Last edited by FaultyClubs; 12-06-2016, 07:00 AM.

              Comment


              • #8
                6) CONCLUSION

                There you have it. More than you ever wanted to know. As Mark Twain was reported to say, "If I had more time it would have been shorter."

                Hopefully all this helps. If you're new, I recommend starting with the basics. Cheap and easy. Figure out how to place your cameras. Learn what you like and don't like about your camera and software. Then decide what you really need and if you want something better go for it. And please report back with your experience!
                Last edited by FaultyClubs; 12-06-2016, 07:03 AM.

                Comment


                • #9
                  Reserved if I think of anything more to say.
                  Last edited by FaultyClubs; 12-06-2016, 07:04 AM.

                  Comment


                  • #10
                    Reserved if I think of anything more to say. Not likely but I can't delete so it's here to stay...
                    Last edited by FaultyClubs; 12-06-2016, 07:08 AM.

                    Comment


                    • #11
                      Great write up.

                      My next project in the sim room is getting my Flea2 PGR cams to work with kinovea at max FPS (which is 83fps at 640x480, for this cam).

                      I am contemplating donating one of them to Kinovea with hopes that they'll make it supported. I actually have 3 of them, so only need 2 anyways. I read someone donated a Basler machine vision cam to them, and now they're supported....so it has happened.

                      I'll let everyone know if I get it working...

                      Comment


                      • #12
                        Well done Faulty. Very thorough.

                        I would love to see some posts on what can be done with what equipment.

                        I like the iphone 240 fps but it does not have auto capture.

                        I can use Zepp golf to capture with the iphone but the analysis is weak. I have to export to V1 to draw lines and compare.

                        V1 app also takes videos

                        Hudl can take 240 fps video with a 10 second timer delay from an Iphone.

                        I would like to see what others are using. While I have lots of ideas I do not record my swings. Let's see what works, I am a visual learner so videos are very convincing.

                        Comment


                        • FaultyClubs
                          FaultyClubs commented
                          Editing a comment
                          There are probably dozens of apps if one just wants to record their golf swing. The trick is finding ones (any) with a good and complete workflow. Your app selection is similar to mine. On my Android phone Hudl, Zepp and Swingprofile Compound Eye seem to have made the cut as simple recording apps.

                          Hudl is nice but on Android lacks the 10 second delay feature and ability to change recording settings like fps etc. If my wife is recording me at the range she prefers using that one. It has a nice slo-mo shuttle wheel.

                          Zepp has a 5s or 10s delay on Android with auto capture and a similar slo-mo shuttle wheel in playback so I tend to use it for simple captures at the range when by myself.

                          Swingprofile Compound Eye Beta is only for Samsung phones (AFAIK) but pretty cool in that it has automatic capture based on motion trigger (not just a N second delay) using up to three simultaneous cameras. It automatically plays back all three captures nicely synced on the "host" phone. Considering the complexities of simultaneous capture and syncing of 3 cameras the whole thing works pretty well. It hasn't been updated for years so may not be a going concern anymore.

                          I don't use any of them at home. Phone/Tablet screens are small and workflow too cumbersome for my taste. Handy out on the course though.
                          Last edited by FaultyClubs; 12-07-2016, 12:19 AM.

                      • #13
                        Originally posted by Boerdoc View Post
                        I would love to see some posts on what can be done with what equipment.
                        .
                        I think that would be a great use of the thread.

                        Combine the theoretical with the practical.

                        In time it would be an excellent all-round resource for people looking to record their swing.

                        Comment


                        • #14
                          Originally posted by goatbarn View Post
                          Great write up.

                          My next project in the sim room is getting my Flea2 PGR cams to work with kinovea at max FPS (which is 83fps at 640x480, for this cam).

                          I am contemplating donating one of them to Kinovea with hopes that they'll make it supported. I actually have 3 of them, so only need 2 anyways. I read someone donated a Basler machine vision cam to them, and now they're supported....so it has happened.

                          I'll let everyone know if I get it working...

                          That would be a good project for sure!

                          I think you'll have a good chance getting Kinovea to add your camera if you donate one. They have said in the past they'll add support for specific cameras if people will lend/donate the cameras. And apparently the rewrite of the input routines in the latest experimental version makes adding camera support easier than before.

                          One thing to know though....the latest experimental versions have removed the delayed recording feature which allows automatic microphone recording. I've flagged that in the v8.25 thread on their forum. Hopefully it will get re-instated but who knows. So if you donate your camera be sure to remind the developer you're a golfer and need that feature. Otherwise they'll add your camera support but the new versions will be of limited value.

                          It would be nice to have PGR cameras supported in Kinovea. When comparing Point Grey, Basler or IDS all three basically make the same cameras based on the same sensors but PGR tends to be a littler cheaper as far as I know.

                          Comment


                          • #15
                            I installed 8.25 and the delay slider is still there

                            Comment


                            • FaultyClubs
                              FaultyClubs commented
                              Editing a comment
                              Yes but now it only delays the display. Recording is no longer delayed.

                            • inorkuo
                              inorkuo commented
                              Editing a comment
                              man that sucks. i read joan's reply on the kinovea forum. sounds like it's being worked on but it would be good for more people to go over to the kinovea forum and throw in support for the recording delay to stay.

                            • FaultyClubs
                              FaultyClubs commented
                              Editing a comment
                              Hmmm, if we all gang up on him maybe we should ask him to actually build in the required microphone triggering capability. Save people messing with 3rd party sound trigger programs and keyboard macros.

                              Kinovea is open source for all sports so why not? I've also used my mic trigger capability for baseball and tennis. Works great so I think if it was there more people would find uses. At the very least, Kinovea would get used a lot more by golfers.
                          Working...
                          X