Go to Post A rule is a rule is a rule. - Cory [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 19-09-2011, 15:12
daniel_dsouza daniel_dsouza is offline
does what needs to be done.
FRC #2449 (Out of Orbit Robotics)
Team Role: Alumni
 
Join Date: May 2011
Rookie Year: 2011
Location: Chandler, AZ
Posts: 231
daniel_dsouza has a spectacular aura aboutdaniel_dsouza has a spectacular aura about
Image processing.

Hello everyone,

Last year, our team decided to send the images from the Axis camera through the DLink router, in order to save the cRIO some effort and improve the video qualtiy. In order to make this change, we had to modify the dashboard to get the images from the network, vs. the cRIO (I am not sure about this part). However, we lost the ability to process images. This gave me an idea, but have no idea how to implement it.

Would it be possible to send the images from the camera >> to the router >> to the dashboard where the images are viewed >> to some code built into the dashboard which recieves images and returns x,y coordinates >> back to the cRIO where the coordinates are proccessed and acted upon? If so, how could it be done?

The advantages would be that it puts the image proccessing on the driverstation, where it can run faster, and also make use of NI's machine vision library.

Our team uses Java for the robot environement, and has very little or no experience with Labview.

Thanks,
Daniel D.
  #2   Spotlight this post!  
Unread 19-09-2011, 15:39
JohnGilb JohnGilb is offline
Programming Mentor, Drive Mentor
FRC #0488
 
Join Date: Mar 2011
Rookie Year: 2003
Location: Redmond, WA
Posts: 116
JohnGilb has a spectacular aura aboutJohnGilb has a spectacular aura aboutJohnGilb has a spectacular aura about
Re: Image processing.

In 2011 this was both legal and possible - I saw a few teams that did it, though mine didn't.

Here are some things to keep in mind:
--The cRIO can only do limited image processing without sacrificing other functionality
--The cRIO can download images from the camera over a wired network (fast)
--The driverstation can do extensive image processing
--The driverstation can download images from the camera over wireless (slower)

If you want very high fidelity information (such if a robot needs to distinguish between things that look similar), then sending images via wireless to a laptop makes sense.

If you want very responsive information (such as tracking a brightly colored moving ball in order to interact with it) you probably want to do processing on the cRIO.
  #3   Spotlight this post!  
Unread 19-09-2011, 15:54
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,586
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Image processing.

The camera can handle multiple simultaneous streams. We connected the camera to the dlink and had the dashboard connect to it. We also changed the IP address for the camera in the robot code so that it connected to the new IP address. We did this in LabVIEW, but I assume it should be similar for the other languages.
  #4   Spotlight this post!  
Unread 19-09-2011, 16:27
Sunstroke Sunstroke is offline
Programmer
AKA: Joe Grinstead
FRC #3504 (Girls of Steel)
Team Role: Mentor
 
Join Date: Apr 2009
Rookie Year: 2009
Location: New England
Posts: 49
Sunstroke is an unknown quantity at this point
Re: Image processing.

Quote:
Originally Posted by daniel_dsouza View Post
Would it be possible to send the images from the camera >> to the router >> to the dashboard where the images are viewed >> to some code built into the dashboard which recieves images and returns x,y coordinates >> back to the cRIO where the coordinates are proccessed and acted upon? If so, how could it be done?
Exactly as you described is available in the (as of yet unreleased) update to SmartDashboard, entirely in Java.
  #5   Spotlight this post!  
Unread 19-09-2011, 17:20
daniel_dsouza daniel_dsouza is offline
does what needs to be done.
FRC #2449 (Out of Orbit Robotics)
Team Role: Alumni
 
Join Date: May 2011
Rookie Year: 2011
Location: Chandler, AZ
Posts: 231
daniel_dsouza has a spectacular aura aboutdaniel_dsouza has a spectacular aura about
Re: Image processing.

Thanks for your input everyone!

Quote:
Originally Posted by JohnGilb View Post
If you want very responsive information (such as tracking a brightly colored moving ball in order to interact with it) you probably want to do processing on the cRIO.
This is exactly what i had in mind (specifically the target in lunacy or or the target in breakaway or the scoring rack in logomotion). However, our team has always had problems with image proccessing and java (see statement). In fact, our programming leader is against even using the camera with the cRIO because the robot ran over a computer last year as a result of an error in the code! I suppose I could always convince her otherwise, but I don't know how I would get the robot to proccess images efficiently.

Quote:
Originally Posted by Joe Ross View Post
We also changed the IP address for the camera in the robot code so that it connected to the new IP address. We did this in LabVIEW, but I assume it should be similar for the other languages.
This seems like the best option. But is there a method to set the camera IP in java? I don't see any option besides the normal init. statement. I have heard that classes for image proccessing in java aren't as complete as those for C or LabVIEW. Could it be because of this? (I would love to be proven wrong here...)
  #6   Spotlight this post!  
Unread 20-09-2011, 00:16
~Cory~'s Avatar
~Cory~ ~Cory~ is offline
Student
AKA: Cory Rypkema
FRC #0706
Team Role: Alumni
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Worcester MA
Posts: 216
~Cory~ is a splendid one to behold~Cory~ is a splendid one to behold~Cory~ is a splendid one to behold~Cory~ is a splendid one to behold~Cory~ is a splendid one to behold~Cory~ is a splendid one to behold~Cory~ is a splendid one to behold
Re: Image processing.

We used a similar method. Set the camera's ip to different address (.19 because it was one away from the DHCP). We then fetched the image file from the camera using Java File IO and URL. This worked pretty well because of the Axis camera constatnly stores and over writes a jpeg in /jpg/image.jpg We then do image processing and display of the results with processing.org's library (its really simplified java, you can extract the library and use it in a full blown java applet. however it needs to be an applet). We are still working on sending the proccessed info back to the crio

Check out Dartmouth's Axis 221 cam

http://wc2.dartmouth.edu/jpg/image.jpg
__________________
corin.rypkema.org
WPI Class of '17
'12 Dean's List Finalist, Mentor of 706 - Cyberhawks
  #7   Spotlight this post!  
Unread 20-09-2011, 00:53
daniel_dsouza daniel_dsouza is offline
does what needs to be done.
FRC #2449 (Out of Orbit Robotics)
Team Role: Alumni
 
Join Date: May 2011
Rookie Year: 2011
Location: Chandler, AZ
Posts: 231
daniel_dsouza has a spectacular aura aboutdaniel_dsouza has a spectacular aura about
Re: Image processing.

Quote:
Originally Posted by ~Cory~ View Post
(its really simplified java, you can extract the library and use it in a full blown java applet. however it needs to be an applet). We are still working on sending the proccessed info back to the crio
Where would that /jpg/image.jpg be located? On the cRIO?

Hmm...as JohnGilb pointed out, this wouldn't be as fast as cRIO proccessing. (can anyone confirm this?) But if is a good idea...

Why use Java? (we are only limited to using Java as the cRIO environement). So if you are saying that we can write another program (not limited to LabVIEW), that would run on the DriverStation computer, and could get information back from the camera and somehow send some information back to the cRIO, what other libraries could we use? I was thinking about C#.
  #8   Spotlight this post!  
Unread 20-09-2011, 01:12
Tom Bottiglieri Tom Bottiglieri is offline
Registered User
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Jan 2004
Rookie Year: 2003
Location: San Francisco, CA
Posts: 3,187
Tom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond repute
Re: Image processing.

Quote:
Originally Posted by Sunstroke View Post
Exactly as you described is available in the (as of yet unreleased) update to SmartDashboard, entirely in Java.
So, there will be ports open on the robot other than those for the driver station?

EDIT: And by ports open I mean ports that will not be blocked by the firewall during a competition.

Last edited by Tom Bottiglieri : 20-09-2011 at 01:16.
  #9   Spotlight this post!  
Unread 20-09-2011, 09:57
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,586
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Image processing.

Quote:
Originally Posted by Tom Bottiglieri View Post
So, there will be ports open on the robot other than those for the driver station?

EDIT: And by ports open I mean ports that will not be blocked by the firewall during a competition.
There were last year. See team update 5 and section 2.2.8 of the manual.

Last edited by Joe Ross : 20-09-2011 at 10:19.
Closed Thread


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 18:51.

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