Vision Tracking on Driver Station (Not cRIO)

In the Rectangle Target Processing under “Vision” in examples, you have one example for doing all vision tracking on the cRIO, but under “My Computer” in the project example, they say you can use that to process the image on the dashboard and send the data back to the cRIO which uses less CPU.

How can I incorporate this example in the dashboard code?

In the example code is a Read MJPG VI, and the processing is the code downstream from there. In the dashboard, you’ll find the same Read MJPG VI and the downstream code updates a display and saves a frame every second. Both of them remove annotations as well.

Merge those two loops. You can merge in the masked display and the calibration if you like. The bare bones edition would be to merge the threshold, score, and distance calculation code.

If this isn’t enough info, please ask a more detailed question.

Greg McKaskle

I’m not quite sure if I know what you mean. In the examples of the 2013 Rectangle Processing Project, you have My Computer and RT CompactRio Target, right? Under My Computer, you have the Rectangle processing .vi I saw on national instruments that you can incorporate that into your dashboard code. How do I do that? Can I just replace the Vision Processing loop in the Dashboard code with that VI?

Thanks for the reply:)

My response assumed you had already opened the My Computer VI and looked at its diagram. On that diagram, you’ll find the VIs I mention.

The example was meant to show the steps of image processing and learn what they do, and it isn’t ready to simply drop into the Dashboard.

I’d probably take the example and turn it into a subVI that doesn’t have the loop and doesn’t acquire its own image and returns the target info. I’d then place that subVI into the dashboard vision loop. I can give more step-by-step instructions, but I don’t want to take away the fun.

Greg McKaskle

How will this work? We currently don’t have a platform to test on.

Looks about right. You mention not being able to test, but if you have a camera plugged into the DS laptop and run the dashboard, it should be able to probe the wires or open the panel and view the indicators.

Greg McKaskle

Thank you so much. I’ll give you an update tomorrow if it worked or not, or what goes wrong :stuck_out_tongue:

Getting tons of errors when running the .exe

The camera VIs to the right load up the simulator when they are run on the PC. Normally that doesn’t cause a problem because the simulator is installed, but it appears that yours isn’t installed or isn’t loading.

Delete the Open, Set Color Enable, and the other two connected yellow nodes and it should work.

A new thing you may want to do at some point is try to use the simulator from the robot project and see if it works for you.

Greg McKaskle