Announcement

Collapse
No announcement yet.

Protee : How to setup machine vision cameras

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Protee : How to setup machine vision cameras

    Protee : How to setup machine vision cameras

    This post will explain how to install and setup the machine vision cameras for LA and H-cam. This will be a work in progress and I will add to this post when I find time. They are also working on a new ball detection method so the procedure will change slightly.

    This link explains how to install the PTgrey camera drivers.
    csc.protee-united.com/entries/21114743-I...ision-camera-drivers

    Installing the drivers basically consist of installing the Flycapture 2.2. You can download it from Ptgrey.com or it can be found on the Protee install directory.

    USBview utility:
    Each camera will require an active USB 2.0 extension(16ft max) plus a USB to mini cable(12ft max). I would not go any longer than the two combined. Each camera should be connected to USB ports that are on separate controllers. You can use USBview
    www.ftdichip.com/Support/Utilities.htmto view the USB controllers and USB devices.

    H-CAM mounts:
    http://golfsimulatorforum.com/forum/...-housing-ideas


    LENSES:
    http://golfsimulatorforum.com/forum/...-camera-lenses

    Changing out the ProTee lens:
    First, see if you can just unscrew the old lens out. If you can't(don't force it), you'll have to remove the tiny set screw. Easiest way is to remove the camera shell first by removing the 4 screws at the corners. Then remove the set screw from the lens holder. Install the camera shell back on and screw in the new lens, hand tighten. Don't put the set screw back in. Just keep in a safe place in case you need it in the future. Adjust the two knobs for focus and you're done.


    Lights:
    You can use the ProTee lights or do it yourself. Here's a DIY lights thread:

    http://golfsimulatorforum.com/forum/...-lights-system

    The sensor mat light should use a 60-75w halogen spot bulb, while the 2nd light should be 60-75w flood(40-45* beam). The wattage depends on the mounted height of the lights.

    The sensor mat light should be mounted directly above the tee location, and not the center of the sensor mat. The 2nd light should be mounted directly above the putting sensor. The beam from the second light should overlap the sensor mat beam just a little, but not too much. Trust me on this one. See my H-cam picture.


    Mounting the Vcam:
    The V-cam can be mounted left or right, 6-7 ft from the sim room's center line and about 1 ft ahead of the sensor mat. It does not have to be exact(PT5). What's important is that it needs to be as low to the floor as possible and pointing slightly up, maybe 5-10*, and pointing perpendicular to the center line. Put a ball on a tee. Adjust the camera's position so that the ball is sitting on top of the red box in the camera. Use the horizontal line to align the camera. You want the horizontal line to be parallel with the floor or sensor mat.

    Note: If mounting the V-cam on the left, set the image to flip, save and exit out completely and restart the interface for the changes to take affect.

    Mounting the H-cam:

    H-cam is mounted on the target line between the putting sensor and the main sensor. Exact distance will depend on the mounting height. Set the H-cam method to PT1 and resolution to 640X480 if using my lens, then use the view in the camera to find the mounting location. Ball must be in the red square.

    PT camera methods:

    # Investigation methods Vertical Camera:
    # PT1= Find first point from the right bottom corner, investigating vertical lines (default)
    # PT2= Find first point from the left top corner, investigating horizontal lines
    # PT3= Investigate at an angle of ~45 degrees, perpendicular on this line
    # PT4= Analyse picture by finding the longest line, use tee-box and one point on this line
    # PT5= Analyse picture by finding the longest line, without using the tee-box (preferred)

    # Investigation methods Horizontal Camera:
    # PT1= Find first point from the right bottom corner, investigating vertical lines
    # PT4= Analyse picture by finding the longest line, use tee-box and one point on this line (default)
    # PT5= Analyse picture by finding the longest line, without using the tee-box (preferred)

    When setting up the cameras for the first time, it best to set all PT methods to PT1's. Then use my recommended settings below. Please see the recommended interfacesettings section on how to change settings. http://golfsimulatorforum.com/forum/...rface-settings

    Investigate_V_cam_method_wedges=PT5
    Investigate_V_cam_method_non_wedges=PT5
    Investigate_H_cam_method=PT1
    Investigate_V_cam_method_driver=PT5
    Investigate_H_cam_method_driver=PT1

    Vertical Cam Setup: csc.protee-united.com/entries/22330292-V...-Launch-Camera-Setup

    Changing camera resolutions:
    To change the resolution using the camera stream, set "Left" to 56. "Top" to 0.

    "Width" to 640. "Height" to 480. Apply, OK.

    Then click on "Preview" and make sure the resolution changed.

    If you can match mine, image wise and settings wise, it should work pretty good.
    Click image for larger version

Name:	vcam.jpg
Views:	3034
Size:	42.3 KB
ID:	13176



    H-cam setup is very similar to the Vcam setup above.

    If you can match mine, image wise and settings wise, it should work pretty good.
    Click image for larger version

Name:	Hcam.jpg
Views:	4393
Size:	43.4 KB
ID:	13177




    1) In the H-cam setup window, select the ball path camera(via serial #) from the drop down list.

    2) Set the H-cam's resolution to 640X480. See instructions above.

    3) Set all settings to match mine in the above picture for both screens. In the "camera device" window(little box on the left in the picture above), shutter speed is 14 and frame rate is 40 fps. Set everything else to zero, including gain. Make sure to uncheck "auto" for everything. When making changes to the frame rate or resolution, you must click "preview" for the changes to take affect.

    4) Once all settings are set, mount the H-cam as high as you can and just forward of the sensor mat. It should be pointing straight down perpendicular to the floor. Put the tee location in the center of the red box. Use the vertical and horizontal lines to align the camera. Perfect alignment = accurate measurements.

    My settings will get you going. Depending on your floor's reflective property and lighting conditions, you might have to make a few adjustments. If you adjust the shutter and/or gain to match the look of what I have above, you should be good. Test some swings with Driver, wood, iron, and wedge. Must select the club for each type of test. If the software is detecting the club instead of the ball streak, adjust the minimum greyscale for that type of club until the software can detect the ball streak without failure.

    You must also click "save" as you exit the setup screens for the changes to be saved.


    Solution for those that loses camera settings on power down/reboot:
    csc.protee-united.com/entries/23152196-F...r-down-or-disconnect

    Enjoy!
    Last edited by Maverick; 11-16-2014, 09:14 PM.

  • Sorry. Hope this works.
    Attached Files

    Comment


    • Also I am not sure how to read usb view. How do I tell what are the seperate usb controllers? Are the lines with host controller in it the seperate controllers and the items listed under the host controller the devices connected to those controllers?

      Comment


      • Yes, I don't have it in front of me right now, but I'm pretty sure you're right about how to read usb view.

        Comment


        • I finally figured it out! My settings file was from an older version of the interface and when I installed a new version of the interface, it didn't replace it. Therefore, when TGC got to a pitch or chip shot, the interface would mess up. Once I figure out the putting I'm done!

          Comment


          • Here is the usb view from the protee machine. Does it look correct? Are the cameras on seperate usb controllers? Cheers. Click image for larger version

Name:	usb veiw pro tee.png
Views:	322
Size:	89.9 KB
ID:	30046

            Comment


            • You're good.

              Comment


              • Thank you.

                Comment


                • About 1 in every 4 shots with the driver, the timing on the hcam seems a bit off. I'm getting the club coming through, but the ball is already gone. Any thoughts?
                  Attached Files

                  Comment


                  • I had a similar problem. I think the shutter speed is too low and the ball goes by while the shutter is closed. I ended up buying a cheap plastic neutral density filter and adding it to the H-Cam, which let me turn the shutter speed up and keep the frame rate up as well. I haven't had issues since. Also, I'm certainly not an expert like most here, but it looks like the cam may need to be re-aimed slightly so the box is exactly on the tee position and the overall image may be too light too from the other screenshots I've seen.

                    Since I put the filter on the h-cam, I haven't had any issues.

                    Comment


                    • Thanks Archv6625. Would you mind pointing me to the neutral density filter that you bought? I'll also try your other suggestions.

                      Comment


                      • For anyone else who has this issue Protee solved it by:

                        - I went back to the original lense
                        - I went with 320 x 240
                        - Lowest raster

                        Comment


                        • Just starting to setup my Protee and have a question about camera placement during construction. I am seeing that the v-cam is supposed to be set 1 foot in front of the hitting mat and 6-7 ft to the side. Is the 1 foot to the tee or the front of the mat? Also I can set the camera anywhere between 6 and 7 feet, any preference? Also I understand the H-cam is in between the hitting mat and the putting sensor, is there a preferred location. My camera height will be 113" from mat to camera lens. I would like to be very close to the final adjustment to help with the finished look. The room will have very good light control, outside of the halogen lights.

                          Thanks in advance for any help, looking forward to getting up and running. Thanks also for all of the great information on the site.

                          Comment


                          • It will depend on what lens is on the cameras. hook up cameras and use the settings below to get the camera's aligned. these settings will produce a red box, the ball is to be placed on the tee location (no tee) and the box should surround the ball and camera should be at 90 degrees (for v-cam) when in the correct location. Both the V-cam and H-cam can be set using the PT1 then you can change them back to the recommended settings or choose a setting that works better. Remember these settings are a starting point and every set up may require some tweaking. The cameras should be Square and plumb. Try not to have them slanted up or down for vcam and make sure the Hcam is plumb (pointing straight down). The stock camera enclosures can be a little tricky to get to stay where you put them. But if you are just getting a general location at this point you don't need to get to fussy, but on final installation make sure you have them correctly positioned. This will eliminate a lot of time getting everything else set right. Spending a little more time on the set up may save you a bunch of time later.

                            Investigate_V_cam_method_wedges=PT1
                            Investigate_V_cam_method_non_wedges=PT1
                            Investigate_H_cam_method=PT1
                            Investigate_V_cam_method_driver=PT1
                            Investigate_H_cam_method_driver=PT1
                            Protee
                            CST Time zone

                            Comment


                            • Originally posted by iskuo View Post
                              Thanks Archv6625. Would you mind pointing me to the neutral density filter that you bought? I'll also try your other suggestions.
                              Sorry for the delay, I was out of the country for work.

                              I bought this:


                              I ended up needing 2 layers to get the correct speed, so I just cut it with a utility knife (cut it like glass, score and snap) I cut the pieces about 1 inch wider than the lens in 1 direction and about 1/2 inch wider in the other. I put packing tape on the wider side and taped it to my camera bracket. I had intentions of making it not look like a total hack job, but you can barely see the packing tape and it works.

                              I actually think a magenta filter would work better if you happen to have turf or a green floor (I do) but a magenta filter was more of a film camera thing, not a digital camera thing,so they are really expensive - $30 vs $4. Magenta would block most of the green color, rendering the background almost black - you could make it really deep magenta and since the ball would be white, you'd still get a nice magenta (converted to B&W) streak.

                              Comment


                              • I am beginning the dialing in of the cameras. I am using pt1 to start for both vcam and hcam. Attached are the first screen shot snips of the cameras. For some reason I cannot get them to switch to 640x480 in the interface camera stream. I will edit (Alt E) the settings and retry tomorrow and try again. I was pleased to see the Hcam pickup 0* on the straight shot. For the Vcam I do not know where to start to dial that one in. I will go back to the beginning of this thread to start. What do you think of the initial screen shots? Any tips appreciated.

                                Comment

                                Working...
                                X