Sample laptop Vision code?

This year our vision code was written in C++. Unfortunately, due the fact that the code used the CRO instead of a laptop to do the processing, the speed was too slow. In addition, the code was quite buggy and did not always work. Next year we are planning to switch to java.
I am wondering if there is any sample java vision code that utilizes a laptop to do the processing. I have searched, but cannot seem to find any :frowning:

If you plan to do image processing laptop side, then any image processing code in java should work, It really depends on what you want to do. If you plan on doing something with the retro reflective tape(I think next year will use it), I would look up Hough Transformation in java.

If you want to know how to hook up the camera directly to the router and access the image stream, take a look at our custom dashboard.
http://wildcatrobotics.com/index.php?page=home
once you get the image stream, you can do any sort of image processing you want.

Yes, the part that I’m having trouble with is getting the image stream to work the processing code. Thats why I’m wondering if there is any sample vision code, that works and that I can learn from.

You want to use the driver’s station laptop right? We have code in Java that does it’s work on a robot mounted laptop.

Course you could just use PyGames on the robot mounted laptop with Python as well.

Yup, we want to do the vision processing on the laptop, doing it on the robot was just too slow.
Not planning on using python anytime soon. :stuck_out_tongue:

But are you willing to put a laptop in your robot to do it in addition to the driver’s station laptop?
(I was not suggesting you use the cRIO to process video in Python with Pygames.)

Or

Are you looking to use the driver’s station laptop to connect to the network cameras on the robot?

You can put a laptop on the robot within restrictions you know.
We did this year.

The software should be the same either way, no? I would think the only difference should be the added latency for the trip to and from the DS over the wireless network.

We are planning to use the driverstation to do the processing for vision. As competitions are almost over, I figured writing vision code would be good practice for next year.
as such, reading over sample vision code would be very helpful.

Not if you’re using webcams connected to the laptop instead of network cameras.

This gave us not only very high frame rates but much greater selection of resolution.

It means, however, that only the video processing component would be of any value as an example in this case.

Look for the SquareTracker sample. I believe it is in the SmartDashboard SVN repository, in addition to being released as a separate zip file. While it is written in Java, you can send the extracted data to any language that is running on the cRio, whether it be Java or C++ or Python.

:frowning:
I’ve searched but cannot find it.

Edit: I found the SVN repository, but i cannot seem to import it. Doing so with tortoise SVN a forbidden error.
edit 2: nvm, got it :stuck_out_tongue: