Go to Post Honestly I'm looking forward to just seeing all my friends again, that's what FIRST is really about to me. - Barry Bonzack [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 05-02-2011, 17:13
MagiChau's Avatar
MagiChau MagiChau is offline
Registered User
AKA: Michael Chau
FRC #0085 (B.O.B. (Built on Brains))
Team Role: Alumni
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Zeeland, Michigan
Posts: 875
MagiChau is just really niceMagiChau is just really niceMagiChau is just really niceMagiChau is just really nice
Re: 2011 Camera Code on Driver Station

I plan on using reflection from infrared if possible, if not LED off of the reflection tape on the scoring peg. The Camera will detect this. I have set the camera to grey-scale since full color is unnecessary and take up more space. Maybe use the reflection detected to also detect a circle with some help from the occlusion feature. This can further be used possibly to calculate distance from that circle or help align the robot to the column.
  #2   Spotlight this post!  
Unread 05-02-2011, 17:46
drakesword drakesword is offline
Registered User
AKA: Bryant
FRC #0346 (Robohawks)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: USA
Posts: 200
drakesword is on a distinguished road
Re: 2011 Camera Code on Driver Station

Quote:
Originally Posted by ZonChau View Post
I plan on using reflection from infrared if possible, if not LED off of the reflection tape on the scoring peg. The Camera will detect this. I have set the camera to grey-scale since full color is unnecessary and take up more space. Maybe use the reflection detected to also detect a circle with some help from the occlusion feature. This can further be used possibly to calculate distance from that circle or help align the robot to the column.
This software runs on the driver station with the camera plugged into the netgear router. The program does all of the calculations to determine where the reflective tape is and then subtracts the background (the green and red area) then the frame is run through openCV to detect the blobs and do those calculations. Finally the blobs are compared to each other to determine which ones are in a column. Other calculations coming would be angle and distance to targets.

The software then returns the target information (not the image) to the cRio where you would then do your own processing.
  #3   Spotlight this post!  
Unread 06-02-2011, 10:45
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: 2011 Camera Code on Driver Station

The latest LabVIEW update also contains an example under the vision category that shows how to statistically locate the columns. It runs on the development computer and uses a folder of images as inputs, so even if you are going to code in Java or C++, you can use it to tune colors, adjust lighting, etc.

Post any questions you have about how it operates.

Greg McKaskle
  #4   Spotlight this post!  
Unread 07-02-2011, 22:34
drakesword drakesword is offline
Registered User
AKA: Bryant
FRC #0346 (Robohawks)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: USA
Posts: 200
drakesword is on a distinguished road
Re: 2011 Camera Code on Driver Station

I will be releasing the alpha before mid-day tomorrow. Keep your eyes pealed.
  #5   Spotlight this post!  
Unread 08-02-2011, 10:14
mwtidd's Avatar
mwtidd mwtidd is offline
Registered User
AKA: mike
FRC #0319 (Big Bad Bob)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 2003
Location: Boston, MA
Posts: 714
mwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond repute
Re: 2011 Camera Code on Driver Station

Quote:
Originally Posted by ZonChau View Post
I plan on using reflection from infrared if possible, if not LED off of the reflection tape on the scoring peg. The Camera will detect this. I have set the camera to grey-scale since full color is unnecessary and take up more space. Maybe use the reflection detected to also detect a circle with some help from the occlusion feature. This can further be used possibly to calculate distance from that circle or help align the robot to the column.
also note that the tape on the circle peg is not actually circular,
on the kickoff field it was square. So personally I would not plan on using the circle in your processing, because it very well may not be a circle at competition
__________________
"Never let your schooling interfere with your education" -Mark Twain
  #6   Spotlight this post!  
Unread 09-02-2011, 00:24
divixsoft's Avatar
divixsoft divixsoft is offline
Registered User
FRC #0835
 
Join Date: Feb 2011
Location: MI
Posts: 29
divixsoft is an unknown quantity at this point
Re: 2011 Camera Code on Driver Station

Could you make the output the pole positions? Also, I admire your effort, the camera code is incredibly complex and hard. When and where will you post this code?
  #7   Spotlight this post!  
Unread 09-02-2011, 12:36
drakesword drakesword is offline
Registered User
AKA: Bryant
FRC #0346 (Robohawks)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: USA
Posts: 200
drakesword is on a distinguished road
Re: 2011 Camera Code on Driver Station

Quote:
Originally Posted by divixsoft View Post
Could you make the output the pole positions? Also, I admire your effort, the camera code is incredibly complex and hard. When and where will you post this code?
I will consider that for the next release. At the moment it reports each point in each pole (x, y, size) the poles are divided by 2 bytes with a value of 255
  #8   Spotlight this post!  
Unread 09-02-2011, 12:57
divixsoft's Avatar
divixsoft divixsoft is offline
Registered User
FRC #0835
 
Join Date: Feb 2011
Location: MI
Posts: 29
divixsoft is an unknown quantity at this point
Re: 2011 Camera Code on Driver Station

Where is the source code?
  #9   Spotlight this post!  
Unread 09-02-2011, 12:59
drakesword drakesword is offline
Registered User
AKA: Bryant
FRC #0346 (Robohawks)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: USA
Posts: 200
drakesword is on a distinguished road
Re: 2011 Camera Code on Driver Station

Quote:
Originally Posted by divixsoft View Post
Where is the source code?
Good observation. It will be available in the same place after I clean it up a bit ^_^

[EDIT]

Its up

Last edited by drakesword : 09-02-2011 at 13:25.
  #10   Spotlight this post!  
Unread 09-02-2011, 13:53
divixsoft's Avatar
divixsoft divixsoft is offline
Registered User
FRC #0835
 
Join Date: Feb 2011
Location: MI
Posts: 29
divixsoft is an unknown quantity at this point
Re: 2011 Camera Code on Driver Station

what do you guys think of this code? and how do you transfer the processing from the crio to the classmate using the classes from frc?
  #11   Spotlight this post!  
Unread 09-02-2011, 13:58
drakesword drakesword is offline
Registered User
AKA: Bryant
FRC #0346 (Robohawks)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: USA
Posts: 200
drakesword is on a distinguished road
Re: 2011 Camera Code on Driver Station

Quote:
Originally Posted by divixsoft View Post
what do you guys think of this code? and how do you transfer the processing from the crio to the classmate using the classes from frc?
You avoid the cRio handling the camera completely.

The new "robot radio" has multiple ports so you can plug the cRio in one port and the camera in another.

The cRio then doesn't assign an ip to the camera the router does which then you can use to pull images to the classmate.

The program then retrieves the images, processes it, then spits data back to the robot via UDP
  #12   Spotlight this post!  
Unread 09-02-2011, 20:25
divixsoft's Avatar
divixsoft divixsoft is offline
Registered User
FRC #0835
 
Join Date: Feb 2011
Location: MI
Posts: 29
divixsoft is an unknown quantity at this point
Re: 2011 Camera Code on Driver Station

How is UDP used, and what is UDP?
  #13   Spotlight this post!  
Unread 09-02-2011, 22:25
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,113
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: 2011 Camera Code on Driver Station

UDP stands for User Datagram Protocol. It doesn't need any channel setup handhaking before being used, it has a lot less overhead than TCP, and it's used where guaranteed delivery of network packets is less important than the ability to communicate quickly.

See Wikipedia for a bit more detail. See RFC 768 for a lot more detail.
  #14   Spotlight this post!  
Unread 13-02-2011, 20:39
drakesword drakesword is offline
Registered User
AKA: Bryant
FRC #0346 (Robohawks)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: USA
Posts: 200
drakesword is on a distinguished road
Re: 2011 Camera Code on Driver Station

Found several bugs.

First java on the cRIO does not support UDP. Changed to TCP.
Second the protocol was sending a bunch of empty data (roughly 800 bytes) changed to be dynamicly sized. I am still fixing the samples for release. Expect a java alpha on monday
  #15   Spotlight this post!  
Unread 15-02-2011, 12:25
drakesword drakesword is offline
Registered User
AKA: Bryant
FRC #0346 (Robohawks)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: USA
Posts: 200
drakesword is on a distinguished road
Re: 2011 Camera Code on Driver Station

Sorry guys I was sick yesterday and the ftp has been down on my server.


{EDIT}

Actually the entire server is down -_-

Last edited by drakesword : 15-02-2011 at 12:27.
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 03:41.

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