Announcement

Collapse
No announcement yet.

automatic swing recording and slow motion playback with kinovea

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

  • automatic swing recording and slow motion playback with kinovea

    I figured I should start a new topic because the other thread has gotten a little long and confusing. Primarily I don't want anyone to think I am using ps3eye cameras for a dual recording setup. i've had a couple of people contact me after purchasing two ps3eyes cameras, asking how to get them working with the dual recording script. while you can get it to work, it is not easy to do. If you are looking to do a 2 camera setup, skip the ps3eye cameras. I would recommend the OV2710 usb cameras from eBay that will do 100fps at 640x480 (does not do 120fps as advertised). There are many lens options and what works for you will depend on how far away you will be placing the cameras. These run at around $40-50.

    If you are looking for a very cheap 1 camera setup the ps3eye is great. Picture quality and frame rate aren't the best and getting 2 to work in kinovea is a pain but they cost less than $10.

    you can run one ps3eye and one OV2710 camera together. i did this for a few months. in this video the ps3eye cam is on the right and the OV2710 is on the left. you can see that the ps3eye is grainy and at 60fps, it is not great but does the job. in addition to a sharper picture and increased fps, another reason I ended up getting two OV2710 cameras is because with one video at 60fps and one at 100fps I couldn't sync the videos up.


    Here is what it looks like using 2 of the OV2710 cameras.


    the way it all works is based around kinovea's live delay feature. if you set the delay to 3 seconds, whatever the cameras see in real time shows up on screen 3 seconds later. if you only want to see your swing once, in real time, you could just run kinovea on a second monitor and set the delay to suit your needs. my autoit script automates the recording and playback process. the sound of impact triggers the script which starts and stops the recordings in kinovea, then opens the recordings in vlc. this means that two 6-7mb files are created every time you hit a ball, so you do need to watch your disk space. it works great for me and a few others here on this forum. before I did this, I took a lot of videos with my phone and while the video quality on any modern phone or tablet is far superior to the OV2710 cameras, it is so much more convenient this way.

    what you need to run a two camera setup is the following:
    a good computer (if it can run tgc smoothly, you should be ok)
    2 cameras (either 1 ps3eye and 1 OV2710 or 2 OV2710's)
    active usb extension cable
    audiozonetrigger https://www.zonetrigger.com/sound-detection/
    microphone
    kinovea version 0.8.15 (other versions will not work)
    vlc media player
    my autoit script

    the software is free except for audiozone trigger with costs $25. for hardware costs, you have 2 cameras at $50 each, a microphone for $10, and a usb active extension for $10, so all in $145.
    Attached Files
    Last edited by inorkuo; 12-11-2017, 06:49 PM.

  • I just received my cameras (2 kayeton 120fps monochrome) and have set up kinovea following the PDF guide linked to in this thread. Everything is working as expected.

    How can I save the set up of each instance of kinovea? every time I close kinovea, I need to set up each instance again from scratch (two capture windows, drag each camera to a windows, launch 2nd instance, replay observer, etc.)


    has anyone found a way to automate the startup? or is everyone manually reconfiguring kinovea every time they launch?


    thanks!

    Comment


    • wzjy47
      wzjy47 commented
      Editing a comment
      As of a few months ago, there was not a way to save your settings.

  • Im using 9.3 beta of kinovea. I bought 2 of the Model: KYT-U100-GS2ML black and white. I followed the pdf here but can only get one camera to record. Have they updated that pdf since people have added to it?
    1. I have the cameras plugged into a power usb port and then into my gaming laptop. I have 3 ports. Maybe I should plug the cameras into separate usb, and the mouse and skytrak into the hub and into the laptop?
    2. On the general tab in kinovea- i have multiple instances of kinovea checked and each instance has its own preferences . Correct?
    3. Under playback and memory tab.. how much memory do you have allocated ? Mine is set to 1200 mb. my laptop has 16gb of ram
    4. Here are my settings for capture:
    5. Click image for larger version

Name:	pref cap gen.jpg
Views:	3601
Size:	31.0 KB
ID:	282464
    6. under capture memory i have it set to 1710 mb
    7. Under pref capture recording this is what i have: Does this seem right?
    8. Click image for larger version

Name:	pref cap rec.jpg
Views:	3333
Size:	43.6 KB
ID:	282465
    9. Under video naming I have it saved in one instance on left to FO directory and the other to the left DTL directory. Question: If i only have one camera to one instance does it only look in the left naming? or does the second instance go to the right and not the left? Not sure if that makes sense.
    Click image for larger version

Name:	cap video name.png
Views:	3259
Size:	26.0 KB
ID:	282466

    then in the auto, these are my settings


    Click image for larger version

Name:	pref cap auto.jpg
Views:	3307
Size:	45.4 KB
ID:	282467

    Finally under the camera config

    Click image for larger version

Name:	camera config.png
Views:	3281
Size:	13.5 KB
ID:	282468

    It would seem that one camera is constantly recording and saving a file to the hard drive, not just when it is trigger by the sound. Anyone else have that issue?

    I have open 4 instances and i was at about 65% of cpu usage.

    The DTL camera will record and then FO camera records a 1 rolling 1 sec clip when on.

    Any thoughts?





    Comment


    • jc523
      jc523 commented
      Editing a comment
      are you launching each instance with the '-name INSTANCE' option?

    • bkh8
      bkh8 commented
      Editing a comment
      Im not sure what you mean. I am right clicking on the icon and launching it again.

    • joan
      joan commented
      Editing a comment
      If you run the executable again the name will be generated based on the order of launch. So the second instance will have name "2", the third will be named "3", etc. This means you will need to launch them in the same order.

      There seems to be a bug in this feature that the numbered instances are picking the master preference file and not their respective preferences. So for now please use explicit naming. A simple way to do that is to right click the executable, create a shortcut, and then go in the properties of the shortcut and in the "Target" field add "-name foobar" at the end. Then to launch that instance you use the shortcut.

      If you have a single camera in each instance, it will only use the "left" naming.

  • This is a great thread, thanks Inorkuo for starting it. Recently finished my garage sim and would like to add cameras and recording. I have some camera questions and really struggle with all the specs and numbers. Hopefully some who have experience with these particular cameras can help.

    I'm not trying to freeze the club head at impact but would like to reduce blur enough that I can see what the club head is doing at various parts of the swing. Maybe that's not realistic, I don't need to measure face angles, just a decent visual. This is indoors so light levels may be an issue but seems that can be dealt with. Just starting out with one camera and will decide later if I need to add another.

    From what I've read the OV4689 is a step up from the OV2710 cameras. Are the global shutter Kayetons a worthwhile step up from the OV4689?

    On the two recommended Kayetons, KYT-U100-GS2ML B&W and KYT-U100-GS1ML Color: there's no mention of the sensor used. Anyone ever find out?
    On the color camera it was mentioned there was a lack of controls and I was wondering if that was the same on the B&W camera, can anyone confirm that?
    The B&W also lists a bunch of recording resolutions, but all at 120fps. While the color only does one res. Is that a mistake? Seems odd.
    Can I assume the B&W will capture motion better with less blur considering it's indoors and lower light levels?

    Regarding lenses I'm confused on the sizing, some are listed in mm and some in degrees. Because of space limitations it seems a varifocal isn't an option. I have to set up for left and right handed golfers. For a right handed golfer face on I may need to be as close as 4' to the golfer measured from waist to lense, maybe 5'. For the lefties I could go out 8-9'. Down the line 6-9' but not sure at the moment. Guess I'll need several lenses and swap them out as needed. The cameras seem to have two cases depending on the type of lens.

    Is one lens type better, cheaper or clearer than another - the M12 vs CS lenses?

    It appears the Kayeton CS mount doesn't have a lens available smaller than the Varifocal 2.8-12mm, 4mm being the smallest fixed. Is that it for a CS type or just the smallest they sell?
    Is the fish eye the same as a 180*? And 2.1 a 170*?
    With my distances a 2.8mm lens is probably out of the question?

    Kayeton lists a "non-distortion lens optional". Does anyone know if that refers to a particular lens size because wouldn't it be preferable for all of them to be non distortion?

    I've tried reaching Kayeton but haven't had a reply. If anyone can answer some of these questions I'd greatly appreciate it.

    Thanks!

    Comment


    • Apparently no one has any answers here, but I did get a few to pass along.

      Kayeton responded that their camera uses an OV7281 sensor. After not finding any info on such a sensor I spoke with a rep at OmniVision who confirmed they don't make an OV7281. They have an OV7251 which is only a VGA 640x480. And the OVO9281-H64A which is a B&W global shutter and does 1280x800, 1280x720, 640x480, 640x400. The consensus is it's most likely an OV9281

      The OV9281 is only a 1/4" sensor. Maybe it does so well under low light because it's a NIR sensor?

      Initial impression is I wish I had gone with the color camera because with my setup it's hard to see differentiation in some areas. Some of the dark areas (mat, clothes, stuff in the background) tend to blend together. Not necessarily a camera issue, not blurring, just takes more concentration than if it was color. I find it annoying but maybe after playing with the settings it will be better. And who knows, maybe the B&W is better for capturing motion?

      Still evaluating lenses. Fisheye and 2.1mm have too much distortion but may have to do for certain situations. 4'-5' from golfer, face on, isn't going to get the full swing, something will have to get cut off - either above the head or below the knees. With the 2.8mm it needs a minimum of 9' or more being 6' tall with a driver.

      Would be nice if there was a comparison with the OV4689 and OV9281 cameras. And Color vs B&W with the OV9281 cameras.

      Comment


      • Got a chance to evaluate the lenses. Keep in mind I'm 6'-0" with a fairly neutral swing plane - not upright or flat. For most testing I used a driver, camera at waist high. For face on, because you're standing further from the ball there wasn't much difference over an iron as far as capturing the whole swing. Down the line there was.

        For the 2.8mm face on there needed to be at least 8'-6" min from the ball to lens. 9' better. Down the line I needed 10' from ball to lens, which was a problem for my space. Had to be too far forward, and while I could use it with my swing, I wouldn't be comfortable that someone else wouldn't hit the ceiling mount projector with a driver.

        The 2.1mm wasn't really that bad with distortion as I'd initially thought. Face on needed 7'-6"min. DTL 9'-6". It didn't really help much with DTL which kinda sucked but it will probably be my go to lens.

        The 1.7mm fisheye was interesting. Because you're farther away from the ball and lens with the driver, I was able to get as close as 3'-6" from the ball to lens. That was surprising. For an iron it really needed 4'. DTL needed 6' to 7' depending on the club. At 5' I was afraid I could possible hit the camera, and the video was getting cropped.

        So if you have limited space the 2.8mm is a waste. The fisheye, while not ideal, will still let you evaluate your swing with limited space unless you need to measure angles and stuff. I'll have to use that lens for the right handers in my bay.

        Pro tip: when changing lenses, setting up the cameras, adjusting focus, turn the delay down to 0.

        As far as the camera controls, none were much help trying to get less blur. Though it really wasn't bad in my opinion. You won't see a clean club head but the shaft was pretty good throughout the swing and I could tell what the club head was doing at impact, good enough for my purposes. I have pretty good light levels but I may really light it up just to see if it changes. Left exposure on auto because the lowest manual setting was whiting out my screen. See screenshots for what setting are available, these are the default settings:

        Click image for larger version

Name:	USB_GS_Camera_Properties.jpg
Views:	3463
Size:	33.4 KB
ID:	286800
        Click image for larger version

Name:	USB GS Camera Properties2.jpg
Views:	3115
Size:	26.2 KB
ID:	286801
        Also I had trouble with mics. Couldn't get any 3.5mm mics to work. Went to a usb mic and first one was fubar - it was the round conference style similar to what Golftec uses. The next one worked great, still low profile. Here's a pic:

        Click image for larger version

Name:	Mic.jpg
Views:	3148
Size:	38.5 KB
ID:	286802

        I also ran into the problem of freezes in Kinovea. I'd set the recording and playback cache to max initially. So I changed them to 2GB each because I don't know wtf I'm doing - so take it with a grain of salt. Initially I was recording at 640x480 when it was glitching. Later I went to 1280x720, much better video quality though still some blur with the club head, it was using a lot more bandwidth (?). There was no freezing though my mouse seemed to be jerky and skipping. So guess I'll have to play with it and see if it's processor or ram. I'm running a 7th gen i5 and 8GB ram.

        Hopefully this info can be of help to someone trying to figure all this out.

        Comment


        • kirkemg
          kirkemg commented
          Editing a comment
          pathfindr i was checking our your lights https://www.amazon.com/gp/product/B07... and wanted to know if you had any suggestions on placement and snooting? For placement, I've seen others say and think I'm also experiencing it, that Skytrak is sensitive to bright lights and placement etc. Since I've bought these https://www.amazon.com/gp/product/B0...0?ie=UTF8&th=1

          i've had significantly more "no reads"....How do you place high lumen lights, avoid shadows & also appease your ST?

          Do you use these lights just for recording or also when you play TGC? How do you "snoot" the cameras to avoid washing the projector screen?

          thanks!!

        • pathfindr
          pathfindr commented
          Editing a comment
          I never had misread even when I had both 300W lights on and they were above the Skytrak. Is your light truly non-flickering? (You can take a slow motion video at 240fps using your iphone to see if your light is non-flickering at high frame rate. A lot of lights that are advertised as non-flickering may mean non-flickering to naked eyes but not necessarily at high frame rate.) When I had my old setup, I duct taped black plastic garbage bags around the light to minimize light spread to the screen. With my new indoor setup, I'm using black EVA foam sheets to make a snoot to control the light spread. Link to the EVA foam sheets I use https://www.amazon.com/gp/product/B0...?ie=UTF8&psc=1

        • pathfindr
          pathfindr commented
          Editing a comment
          In case anyone is reading this in 2022, you may want to check out this lighting setup article by GungHoGolf https://gunghogolf.com/articles/indo...video-lighting I recently moved my setup from my garage to inside the house, and I re-did the sim setup, including switching the lighting to track lights recommended in the article.

      • Pathfindr, thanks for the advice. I’ll try it again, last time with the exposure manually set to the lowest level, my screen was overexposed, whiting out everything. I’ll see if I can adjust the brightness down to compensate. The gain setting is greyed out so you can’t adjust it.

        I have a couple 4-5k lumen overhead LED strip shop lights, and added a 4K lumen halogen moveable job site type light. So I think there’s plenty of light. I’m going to increase the halogen to 8500 lumens and see if that helps at all.

        Comment


        • pathfindr
          pathfindr commented
          Editing a comment
          It's strange that it's overexposed. If you lower the exposure, it should get darker, not brighter. (Shorter exposure time means less light will get to the sensor.)

        • SoCalMike
          SoCalMike commented
          Editing a comment
          It does get darker, but at it’s lowest setting it’s still overexposed. But when set to auto it’s not. I’ll see if it will let me manually put in a number instead of using the slider.

          Odd behavior but maybe there’s something else causing it.

      • This is a post from Joan, creator of Kinovea, on exposure setting.



        Click image for larger versionName:	Views:	0Size:	38.5 KBID:	289057
        Attached Files
        Last edited by pathfindr; 09-24-2020, 12:50 PM.

        Comment


        • I came across the FLIR's Blackfly S USB3 camera while looking for lower cost alternatives to IDS 3140 that can do 200+ fps. (IDS also recently lowered the spec of IDS 3104. It now can only do 159 fps).

          The FLIR's Blackfly S USB3 can do 226 fps and support 1440 x 1080 resolution. https://www.flir.com/products/blackfly- … 3-16S2C-CS

          The list price is $335, which is less than half of the price of IDS 3140. (I was quoted $700 for IDS 3140). IDS 3140 has a larger sensor, however. (1/2 vs Blackfly S's 1/2.9)

          Does anyone know if Kinovea supports FLIR's Blackfly S USB3 Camera? (I posted a question on Kinovea's forum and hope to hear back on that).
          Last edited by pathfindr; 09-28-2020, 10:20 PM.

          Comment


          • joan
            joan commented
            Editing a comment
            Kinovea doesn't support the FLIR Blackfly at this point.

            Another possibility could be the Daheng Imaging cameras which are supported since version 0.9.2. For example the MER-160-227U3C is based on the same sensor as the Blackfly you listed above (IMX273, 1440x1080, 227fps) and their MER-131-210U3C is based on the same sensor as the IDS (Python 1300, 1280x1024, 210fps).

        • I've got a couple of these cameras, but I'm not sure how you guys are putting them on a tripod? The mount hole in the bracket measures only about 3/16".

          (1/2.7" CMOS OV2710. USB Protocal. USB Video Class(UVC)1.1. view angle. 2.1mm lens. Project video capture, credit card machine, attendance machine, Voting system, High speed video. 2)It use high quality image sensors made by OmniVision, one of the world leaders in this field of electronics.

          Comment


          • pathfindr
            pathfindr commented
            Editing a comment
            I used an adjustable phone clamp mount like this one https://www.amazon.com/gp/product/B07SQ8TQT9 You will need some sort of spacers to make it fit as the clamp has a minimum width of 2.2 inch which is wider than the width of the camera. I 3D printed some spacers but you can use anything that works such as cardboard, a stack of coins, etc.

        • Thanks. That was exactly what I was starting to zero in on.

          Comment


          • Anyone using an OV2710 with the latest beta?
            The capture screen just stays black and won't let me select a different source or anything (the buttons don't do anything and right clicking neither).

            It works fine with the stable version of Kinovea but that version doesn't have automation.

            I would post in their forum but I just created an account and it won't let me start a thread yet.

            Comment


            • joan
              joan commented
              Editing a comment
              In the newer versions there is a camera tab on the left hand side that you can switch to. You should see your camera there and you can launch it from there. I'll try to make this more evident for people coming from the old version, this has come up multiple times.

            • Golfser
              Golfser commented
              Editing a comment
              Oh wow now I feel stupid, thank you!

          • joan I am jumping on the thread here, as I also have a newer account on the Kinovea site forum and cant post there yet. I am using different cameras but have all of the automation and observer windows working. I am trying to find any documentation on the workspaces configuration. Would like to save my setup once I have all the windows, cameras, replay windows working so I can reopen back to that state, and believe the workspaces feature is how to get there.

            Also - Love the software and your artwork too.

            Comment


            • joan
              joan commented
              Editing a comment
              The forum accounts should be sorted out.
              At the moment the workspace feature is still a work in progress and it doesn't support camera screens only videos. Here is a thread with an example XML file: https://www.kinovea.org/en/forum/vie...pid=4359#p4359

          • Thanks. I will review the details in that thread.

            Comment


            • Just coming back to say I have things working with Kinovea 9.3 Beta (free / with levels of donation subscription model), a pair of $15 PS3eye cameras, a $6 microphone, a pair of $7 phone clamp style holders and a configuration all based off of the ideas and tips from those in this thread. Thanks everyone and inorkuo and joan especially.

              I have already been able to make improvements to my swing.

              Comment


              • Hi guys,

                This thread has been awesome. I read this thread over a year ago and I decided to finally pull the trigger on some cameras.
                I ended up getting these ones from Amazon: https://www.amazon.ca/gp/product/B07...t_b_prod_image

                I know I probably could've gotten a little bit cheaper through AliExpress. I'm still waiting on the camera's to arrive.

                But in the meantime, I thought I might post something I tried.

                I wanted to be able to simply double click 1 icon to have everything launched at once, so what I did was create a batch file and created a shortcut to the batch file.

                I read that it was best to have 3 instances running: 1 instance for FO CAM, 1 instance for DTL CAM and 1 instance for replay with 2 playback windows

                My batch file is very simple:

                set KinoveaPath="C:\Program Files\Kinovea"
                cd %KinoveaPath%
                start Kinovea.exe -name DTL
                start Kinovea.exe -name FO
                start Kinovea.exe -name REPLAY

                You can set the path to wherever you installed Kinovea. Make sure you use a text editor that you can change the file extension. Simply save it as GolfSwingRecord.bat

                Now you can't change the icon on a batch file, so I created a shortcut to the batch file and then placed that on my desktop and changed the icon to the one listed here:



                From here, you can go into the properties of the shortcut to the batch file and select the saved icon by going to the location on your cpu where you saved the icon.

                The batch file launched everything properly but I noticed that my settings weren't being saved. So what I had to do then was to follow the steps listed earlier about creating a shortcut to the Kinovea.exe file with the -name parameters.

                I created 3 shortcuts in the Kinovea directory and changed the name parameters to -name DTL / -name FO / -name REPLAY.

                From here, I opened Kinovea with each instance, made my preference changes and closed the application. I created a directory for my golf swing recordings and then simply changed the "Left" recording to FO-Kinovea\%year\%year%month\%year%month%day & DTL-Kinovea\%year\%year%month\%year%month%day in each of the proper instances. So hopefully, in the end, I should have the sub-directory with a FO and DTL version of each swing. I don't know if this will work as expected since I haven't tested this out yet.

                Now when I run my desktop shortcut, it launches 3 instances of the app with all my settings.

                Hope this was useful for somebody!

                Comment


                • youngngo
                  youngngo commented
                  Editing a comment
                  Do you use the sound trigger in automation? How do you have it setup to record continuously to cover the backswing till the sound trigger?

                • vrpunk
                  vrpunk commented
                  Editing a comment
                  You set delay to about 2.0 seconds

                • arwin
                  arwin commented
                  Editing a comment
                  I have it set to 3.0 second delay in the camera (The setting at the bottom of the screen where you can see the live view of the camera)
                  2 seconds should work as well. I just have it set to 3s so that sometimes I can do my backswing and take a quick look without having to hit a ball

                  Options > Preferences > Automation:
                  - I have the "Enable Audio Trigger" on and the Trigger threshold at 59
                  - I have it set the "Stop Recording By Duration(s)" at 4 seconds.
              Working...
              X