Go to Post I am a firm believer that there is no model that can be transplanted/copied from one team to another and have the same level of success. There just isn't a formula for it. The mindset you should have is: "I know I have made a positive impact on my community". - tim-tim [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
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 08-02-2012, 21:07
agartner01 agartner01 is offline
Captain + Control Sys & Design
FRC #4174
Team Role: Engineer
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Hector MN
Posts: 109
agartner01 is an unknown quantity at this point
Laptop Based Imaging?

Anyone get it working with c++. It seems like the pages on this topic in the cookbook are yet to be completed.

It shouldn't be that hard, should it? Send image to laptop. Program does stuff with image. Program sends back information needed.

Last edited by agartner01 : 08-02-2012 at 21:10.
Reply With Quote
  #2   Spotlight this post!  
Unread 08-02-2012, 23:11
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Laptop Based Imaging?

It's even easier than that. You don't have to do an explicit "send image to laptop" step. The Dashboard already gets images directly from the camera.
Reply With Quote
  #3   Spotlight this post!  
Unread 08-02-2012, 23:32
agartner01 agartner01 is offline
Captain + Control Sys & Design
FRC #4174
Team Role: Engineer
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Hector MN
Posts: 109
agartner01 is an unknown quantity at this point
Re: Laptop Based Imaging?

Documentation somewhere?
Reply With Quote
  #4   Spotlight this post!  
Unread 08-02-2012, 23:43
wireties's Avatar
wireties wireties is offline
Principal Engineer
AKA: Keith Buchanan
FRC #1296 (Full Metal Jackets)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Rockwall, TX
Posts: 1,170
wireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond repute
Send a message via AIM to wireties
Re: Laptop Based Imaging?

Quote:
Originally Posted by Alan Anderson View Post
It's even easier than that. You don't have to do an explicit "send image to laptop" step. The Dashboard already gets images directly from the camera.
Hey Alan, is the camera multi-casting the image to both the cRIO and the dashboard?

So you guys are processing the image on the laptop and sending rectangle coords back to the robot? What kind of frame rate do you get that way? We can only do 3-5 Hz doing all the processing on the robot.

TIA
__________________
Fast, cheap or working - pick any two!
Reply With Quote
  #5   Spotlight this post!  
Unread 08-02-2012, 23:55
~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: Laptop Based Imaging?

We are getting 21-27 fps after processing, evolutionary selection, and sockets (7 threads, phew!). C# on a modest laptop
__________________
corin.rypkema.org
WPI Class of '17
'12 Dean's List Finalist, Mentor of 706 - Cyberhawks

Last edited by ~Cory~ : 08-02-2012 at 23:56. Reason: derp'd
Reply With Quote
  #6   Spotlight this post!  
Unread 08-02-2012, 23:58
Aren Siekmeier's Avatar
Aren Siekmeier Aren Siekmeier is offline
on walkabout
FRC #2175 (The Fighting Calculators)
Team Role: Mentor
 
Join Date: Apr 2008
Rookie Year: 2008
Location: 대한민국
Posts: 735
Aren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond repute
Re: Laptop Based Imaging?

We currently have our image processing set up this way. As Alan said, the Driver Station is already getting the image, so we use that one. Then we send the relevant numbers (x position of top target, distance) to the robot over one of the available UDP ports as described in 2.2.9. UDP 1130 to be specific.

The camera has an http server hosting the image, and the driver station and the cRio both request an image from this server. Or perhaps it's just the cRio, and then the cRio forwards it to the DS; I haven't looked at the code in a while.

Last edited by Aren Siekmeier : 09-02-2012 at 00:05.
Reply With Quote
  #7   Spotlight this post!  
Unread 09-02-2012, 00:04
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Laptop Based Imaging?

Quote:
Originally Posted by wireties View Post
Hey Alan, is the camera multi-casting the image to both the cRIO and the dashboard?
I don't know what you mean by multi-casting. I know the camera supports multiple simultaneous MJPEG connections. The Dashboard makes one such connection. Vision processing on the cRIO makes another. You could probably do a direct connection from a web browser to the camera and get a third stream going at the same time.

Quote:
So you guys are processing the image on the laptop and sending rectangle coords back to the robot? What kind of frame rate do you get that way? We can only do 3-5 Hz doing all the processing on the robot.
I haven't done any serious timing, but it looks close to full motion video. Definitely better than 10 frames per second. This is on an E11 Classmate.
Reply With Quote
  #8   Spotlight this post!  
Unread 09-02-2012, 00:10
wireties's Avatar
wireties wireties is offline
Principal Engineer
AKA: Keith Buchanan
FRC #1296 (Full Metal Jackets)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Rockwall, TX
Posts: 1,170
wireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond repute
Send a message via AIM to wireties
Re: Laptop Based Imaging?

Quote:
Originally Posted by Alan Anderson View Post
I don't know what you mean by multi-casting.

Thanks for the info - multi-casting sends data from one net node to multiple nodes simultaneously. It sounds like the camera is not doing that, it just sends the image to whomever connects, one at a time.

http://en.wikipedia.org/wiki/Multicasting
__________________
Fast, cheap or working - pick any two!
Reply With Quote
  #9   Spotlight this post!  
Unread 09-02-2012, 00:12
agartner01 agartner01 is offline
Captain + Control Sys & Design
FRC #4174
Team Role: Engineer
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Hector MN
Posts: 109
agartner01 is an unknown quantity at this point
Re: Laptop Based Imaging?

Quote:
Originally Posted by agartner01 View Post
Documentation somewhere?
^^^
Reply With Quote
  #10   Spotlight this post!  
Unread 09-02-2012, 00:15
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Laptop Based Imaging?

Quote:
Originally Posted by wireties View Post
...multi-casting sends data from one net node to multiple nodes simultaneously.
I do know what that is. I just didn't know whether you were aware you were using a term with an established meaning.
Reply With Quote
  #11   Spotlight this post!  
Unread 09-02-2012, 00:44
wireties's Avatar
wireties wireties is offline
Principal Engineer
AKA: Keith Buchanan
FRC #1296 (Full Metal Jackets)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Rockwall, TX
Posts: 1,170
wireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond repute
Send a message via AIM to wireties
Re: Laptop Based Imaging?

Quote:
Originally Posted by agartner01 View Post
^^^
I have not looked at this yet but the process will go something like this... start with instructions to create a custom dashboard. You'll add the stuff from the example vision processing app into the custom dashboard. Then add a UDP VI and send the rectangle coordinates to the robot. Google an example of UDP code and implement code to receive the data on the robot. Last, use that data to point your shooter.

HTH
__________________
Fast, cheap or working - pick any two!
Reply With Quote
  #12   Spotlight this post!  
Unread 09-02-2012, 00:47
wireties's Avatar
wireties wireties is offline
Principal Engineer
AKA: Keith Buchanan
FRC #1296 (Full Metal Jackets)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Rockwall, TX
Posts: 1,170
wireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond repute
Send a message via AIM to wireties
Re: Laptop Based Imaging?

Quote:
Originally Posted by Alan Anderson View Post
I do know what that is. I just didn't know whether you were aware you were using a term with an established meaning.
Next time, just assume so ;o)
__________________
Fast, cheap or working - pick any two!
Reply With Quote
  #13   Spotlight this post!  
Unread 17-02-2012, 09:09
shahrukh shahrukh is offline
Registered User
FRC #2994
Team Role: Mentor
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Ottawa
Posts: 5
shahrukh is an unknown quantity at this point
Re: Laptop Based Imaging?

We are trying to use a hybrid of LabVIEW on the Data Dashboard and programming the cRIO with C++. Can anyone give some sample code (or point us in the right direction) to open and read from a UDP port in C?

Thanks,
Shahrukh
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 17:38.

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