Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Sample laptop Vision code? (http://www.chiefdelphi.com/forums/showthread.php?t=105650)

thecakeisalie 13-04-2012 22:09

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 :(

sand500 14-04-2012 01:48

Re: Sample laptop Vision code?
 
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.
http://en.wikipedia.org/wiki/Hough_transform

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.

thecakeisalie 14-04-2012 11:02

Re: Sample laptop Vision code?
 
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.

techhelpbb 14-04-2012 15:56

Re: Sample laptop Vision code?
 
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.

thecakeisalie 14-04-2012 17:10

Re: Sample laptop Vision code?
 
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. :P

techhelpbb 14-04-2012 17:34

Re: Sample laptop Vision code?
 
Quote:

Originally Posted by thecakeisalie (Post 1157912)
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. :P

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.

RufflesRidge 14-04-2012 17:39

Re: Sample laptop Vision code?
 
Quote:

Originally Posted by techhelpbb (Post 1157927)
But are you willing to put a laptop in your robot to do it in addition to the driver's station laptop?

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.

thecakeisalie 14-04-2012 18:02

Re: Sample laptop Vision code?
 
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.

techhelpbb 15-04-2012 01:47

Re: Sample laptop Vision code?
 
Quote:

Originally Posted by RufflesRidge (Post 1157930)
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.

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.

virtuald 15-04-2012 09:26

Re: Sample laptop Vision code?
 
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.

thecakeisalie 15-04-2012 16:43

Re: Sample laptop Vision code?
 
:(
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 :P


All times are GMT -5. The time now is 10:04.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi