Announcement

Collapse
No announcement yet.

New Two Color Tracking Program

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

  • New Two Color Tracking Program

    We just tried out the new LabVIEW two color tracking program and it seems to work great! It does appear to require the camera to be mounted vertically as it only looks for the second color above and below. The C++ code seems to offer a left/right (side-by-side) choice which would allow the camera to be mounted horizontally. If this is correct, is there a plan to include that capability in the LabVIEW code?

  • #2
    Re: New Two Color Tracking Program

    There weren't really plans for it. Are you really planning to mount the camera sideways? Or are you just asking?

    If you want to make the modifications, the primary code change would be to the calculation of the green rectangles and then to the updating of the rectangle. The changes would be pretty straightforward.

    Greg McKaskle

    Comment


    • #3
      Re: New Two Color Tracking Program

      Although I can't say for sure that we will mount the camera horizontally, it does look like the best configuration at the present time so I am looking at our options programmatically. We can program in both C++ and LabVIEW so we are actually okay. We started testing the C++ camera code last night and will work on that some more today (as there was a bug in the original code). As to LabVIEW I had thought perhaps one could just rotate the image 90 degrees and leave the present processing as is, but I didn't see any vi that would accomplish the rotation. I am also not sure what happens (in both C++ and LV) when you actually get the image and the rectangle is in the wrong direction because of the sideways mounting. Does that affect any of the later image processing?

      As to your suggestion on altering the LV code, I would have to study the present code some more before I would be able to understand exactly what you are proposing.

      Comment


      • #4
        Re: New Two Color Tracking Program

        If you are still deciding on how to mount the camera, I can't help with the physical fit, but I can say that the camera image is a 4:3 ratio. In other words, it isn't square, but has 33 percent more pixels in width than in height. If you mount the camera vertically, either right side up or up side down, your robot will have a wider view of the field. If you mount the camera sideways, the robot will have a taller but more narrow view of the field.

        How much will this matter? It depends on what you are using the camera for, but it will be easier to see the floor, harder to see something to the left or right.

        If you want code suitable for sideways mounting, look at the code a bit, and don't hesitate to ask for help.

        Greg McKaskle

        Comment


        • #5
          Re: New Two Color Tracking Program

          Has anyone added this code to one of the Frameworks?
          I am new to all of this but I have been able to use the example program and am happy with how it works.
          However, I don't know enough about LabVIEW to move this code into a Framework.
          I understand a little bit of each Framework but now enough to chose which one to use.
          We would like to use the tracking program in Autonomous mode.
          I can't figure out how to do it in either.
          I am leaning towards the Advanced Framework because I think that I understand how to put the code we need to use during the competition into it.
          Thanks

          Comment


          • #6
            Re: New Two Color Tracking Program

            You can see how I added the code to the basic framework here: http://forums.usfirst.org/showthread.php?t=11298. I did not move everything though.

            If you are using the advanced framework (which I highly suggest), with a few minor changes, you can use the example VI in place of the vision processing VI. You just need to delete the update driver station VI and use the global for the camera device reference (and may be one or two other things, I haven't done that yet).
            Team 330 beta tester

            Comment


            • #7
              Re: New Two Color Tracking Program

              Thanks Joe for all your help!

              Couldn't we use the servo positions after the camera lines up to the target? I believe this is what Kevin Watson did with his camera code from past years. Total travel in degrees / 255 = degrees per value.

              In autonomous independent, it uses how tall the target appears. You can change the Y set point control on the front panel to change the height in pixels that it goes to.
              How does the Y set point work, what point does the camera actually lock onto?

              One possible enhancement would be to figure out the formula to convert pixels to actual distance, and change everything to use distance.
              Are you referring to the distance to target? Or the size of the rectangle?

              Comment


              • #8
                Re: New Two Color Tracking Program

                hello we need a little help, we start learn the labview software and it is very new for us,
                now that we finish configure the robot we want to try it in autonoumus active while the robot will move depended on the camera tracking, may you have example of vi code that we can try it.

                thanks
                team 3073

                Comment

                Working...
                X