Go to Post Its a good idea to learn to tame CAD monkeys. They're very useful. - Akash Rastogi [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 13-04-2012, 22:09
thecakeisalie's Avatar
thecakeisalie thecakeisalie is offline
Registered User
FRC #0293
 
Join Date: Mar 2012
Location: Pennington
Posts: 37
thecakeisalie is an unknown quantity at this point
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
Reply With Quote
  #2   Spotlight this post!  
Unread 14-04-2012, 01:48
sand500 sand500 is offline
Registered User
FRC #3540 (Wildcat Robotics)
 
Join Date: Jan 2011
Rookie Year: 2011
Location: United States
Posts: 81
sand500 is an unknown quantity at this point
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.
Reply With Quote
  #3   Spotlight this post!  
Unread 14-04-2012, 11:02
thecakeisalie's Avatar
thecakeisalie thecakeisalie is offline
Registered User
FRC #0293
 
Join Date: Mar 2012
Location: Pennington
Posts: 37
thecakeisalie is an unknown quantity at this point
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.
Reply With Quote
  #4   Spotlight this post!  
Unread 14-04-2012, 15:56
techhelpbb's Avatar
techhelpbb techhelpbb is offline
Registered User
FRC #0011 (MORT - Team 11)
Team Role: Mentor
 
Join Date: Nov 2010
Rookie Year: 1997
Location: New Jersey
Posts: 1,622
techhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond repute
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.
Reply With Quote
  #5   Spotlight this post!  
Unread 14-04-2012, 17:10
thecakeisalie's Avatar
thecakeisalie thecakeisalie is offline
Registered User
FRC #0293
 
Join Date: Mar 2012
Location: Pennington
Posts: 37
thecakeisalie is an unknown quantity at this point
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.
Reply With Quote
  #6   Spotlight this post!  
Unread 14-04-2012, 17:34
techhelpbb's Avatar
techhelpbb techhelpbb is offline
Registered User
FRC #0011 (MORT - Team 11)
Team Role: Mentor
 
Join Date: Nov 2010
Rookie Year: 1997
Location: New Jersey
Posts: 1,622
techhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond repute
Re: Sample laptop Vision code?

Quote:
Originally Posted by thecakeisalie View Post
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.
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.
Reply With Quote
  #7   Spotlight this post!  
Unread 14-04-2012, 17:39
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 989
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: Sample laptop Vision code?

Quote:
Originally Posted by techhelpbb View Post
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.
Reply With Quote
  #8   Spotlight this post!  
Unread 14-04-2012, 18:02
thecakeisalie's Avatar
thecakeisalie thecakeisalie is offline
Registered User
FRC #0293
 
Join Date: Mar 2012
Location: Pennington
Posts: 37
thecakeisalie is an unknown quantity at this point
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.
Reply With Quote
  #9   Spotlight this post!  
Unread 15-04-2012, 01:47
techhelpbb's Avatar
techhelpbb techhelpbb is offline
Registered User
FRC #0011 (MORT - Team 11)
Team Role: Mentor
 
Join Date: Nov 2010
Rookie Year: 1997
Location: New Jersey
Posts: 1,622
techhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond repute
Re: Sample laptop Vision code?

Quote:
Originally Posted by RufflesRidge View Post
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.
Reply With Quote
  #10   Spotlight this post!  
Unread 15-04-2012, 09:26
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,067
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
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.
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote
  #11   Spotlight this post!  
Unread 15-04-2012, 16:43
thecakeisalie's Avatar
thecakeisalie thecakeisalie is offline
Registered User
FRC #0293
 
Join Date: Mar 2012
Location: Pennington
Posts: 37
thecakeisalie is an unknown quantity at this point
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

Last edited by thecakeisalie : 15-04-2012 at 16:56.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 11:40.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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