Go to Post Although I don't agree with the ref's call...we accept it because a ref's call is a final call. - David Guzman [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 08-01-2015, 18:59
faust1706's Avatar
faust1706 faust1706 is offline
Registered User
FRC #1706 (Ratchet Rockers)
Team Role: College Student
 
Join Date: Apr 2012
Rookie Year: 2011
Location: St Louis
Posts: 498
faust1706 is infamous around these partsfaust1706 is infamous around these parts
Outsourcing Vision Code

For the past few hours, I have been rigorously developing a working vision solution. It can be found here:

https://github.com/faust1706/vision2015

It tracks the L's on the yellow totes, returning values that allow you to line up with the center of the tote, as well as tell if you are perpendicular to it.

Let me know if you have any questions
__________________
"You're a gentleman," they used to say to him. "You shouldn't have gone murdering people with a hatchet; that's no occupation for a gentleman."
  #2   Spotlight this post!  
Unread 08-01-2015, 22:31
Luid101 Luid101 is offline
Registered User
FRC #3949
 
Join Date: Dec 2014
Location: Canada
Posts: 17
Luid101 is an unknown quantity at this point
Talking Re: Outsourcing Vision Code

Thanks! We have been stoked on this for a while.
  #3   Spotlight this post!  
Unread 08-01-2015, 22:45
Luid101 Luid101 is offline
Registered User
FRC #3949
 
Join Date: Dec 2014
Location: Canada
Posts: 17
Luid101 is an unknown quantity at this point
Re: Outsourcing Vision Code

Ok. Questions.
Is it labview code?
If it is how would i impliment it?
if it isn't how can i replicate something like this with labview and the vision assistant?
Thanks!
  #4   Spotlight this post!  
Unread 08-01-2015, 23:02
faust1706's Avatar
faust1706 faust1706 is offline
Registered User
FRC #1706 (Ratchet Rockers)
Team Role: College Student
 
Join Date: Apr 2012
Rookie Year: 2011
Location: St Louis
Posts: 498
faust1706 is infamous around these partsfaust1706 is infamous around these parts
Re: Outsourcing Vision Code

Quote:
Originally Posted by Luid101 View Post
Ok. Questions.
Is it labview code?
If it is how would i impliment it?
if it isn't how can i replicate something like this with labview and the vision assistant?
Thanks!
The code is written in c++ with opencv. I do not know if you can compile opencv on the roborio.

I'm in the process of doing an in-depth explanation of this code, stay tuned, it will be something like this:

https://www.dropbox.com/s/5wbgtie9vc...ation.ppt?dl=0

Ignore the math at the beginning. It is irrelevant to this year. (Though if you are interested in learning it, look up camera pose estimation).

I don't know what the sample vision program this year does, I'll have to take a look at it. I am sure there is a way to implement this program in labview, but I personally have no idea how to do that.
__________________
"You're a gentleman," they used to say to him. "You shouldn't have gone murdering people with a hatchet; that's no occupation for a gentleman."
  #5   Spotlight this post!  
Unread 09-01-2015, 14:12
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,756
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: Outsourcing Vision Code

The LabVIEW tutorial on vision will have you open a project that includes three processing approaches for the laptop and one integrated on the roboRIO.

One of these uses the color combos of carpet and tote along with the aspect ratio and other metrics to roughly identify totes.

The second uses retroflection on the _| |_ shape.

The third uses a patterned template to locate the logo on the tote.

Feel free to ask additional questions.

By the way, I believe similar processing examples will soon be available for the other languages. And there was an OpenCV library release announced about a week ago, just search for it on CD.

Greg McKaskle
  #6   Spotlight this post!  
Unread 21-01-2015, 15:45
fovea1959's Avatar
fovea1959 fovea1959 is offline
Herder of programmers
AKA: Doug Wegscheid
FRC #3620 (The Average Joes)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: St Joseph
Posts: 336
fovea1959 will become famous soon enough
Re: Outsourcing Vision Code

urm, the github repo seems to only have a readme?
  #7   Spotlight this post!  
Unread 21-01-2015, 16:07
faust1706's Avatar
faust1706 faust1706 is offline
Registered User
FRC #1706 (Ratchet Rockers)
Team Role: College Student
 
Join Date: Apr 2012
Rookie Year: 2011
Location: St Louis
Posts: 498
faust1706 is infamous around these partsfaust1706 is infamous around these parts
Re: Outsourcing Vision Code

Yeah, sorry. Massive code changes. I'm back at college so I have no say in what the students do with the repos. I just teach them. They have code that tracks every game piece in depth, ir code that tracks the reflective take, and color code that tracks the short side of the yellow tote.

They wanted to do a big code release, with all three programs. There are mini write ups of each, but they didn't want to write 3 papers, so they are making a video that demos and explains all 3. They started video taping last night, and will again tomorrow when the camera is available again.

Tl;dr: the students want their code release to be as good as it can be, and half of them are perfectionists, so it'll take some time. They still have all the video editting to do. Syncing the program output with the explanation with the live demo of each aspect.

If you have any questions, I am allowed to answer high level stuff, but not provide massive blocks of code.

This code is easily the most readable, nicely organized code the 1706 vision team has ever written. They set that out as a goal from the very start. When they got stuck on a task I told them to do, they thought about it, but also were adding comments, reorganizing the code, writing brief documentation, consulting their notebooks. It was a sight to see a bunch of freshman and sophomore high schoolers work so diligently on a task everyday.

I honestly have no idea when they are going to get done with the video. They code was completely finished last friday night, then Saturday, right before I left to go back to college, I gave them a short list of things to do before then opensource, which was do a quick write up of each sub program and explain what it achieves and how you can use the info. Then after I left one of them got the idea to make a video explaining it and demoing it. Their task is done for the build season, until they find a new one that is. They have 3 working solutions to the task they were given. I'll have to think of a project to give them, like clean up our old code base and convert it all to the same language. I don't know. They're a bunch of enthusiastic kids who are excited to be learning. What more could you ask for?
__________________
"You're a gentleman," they used to say to him. "You shouldn't have gone murdering people with a hatchet; that's no occupation for a gentleman."

Last edited by faust1706 : 21-01-2015 at 16:23.
  #8   Spotlight this post!  
Unread 21-01-2015, 16:20
Merfoo's Avatar
Merfoo Merfoo is offline
Registered User
FRC #0955 (CV Robotics)
Team Role: Programmer
 
Join Date: Feb 2012
Rookie Year: 2012
Location: America
Posts: 48
Merfoo is an unknown quantity at this point
Re: Outsourcing Vision Code

Quote:
Originally Posted by faust1706 View Post
The code is written in c++ with opencv. I do not know if you can compile opencv on the roborio.
I believe you can compile opencv on the roborio
http://www.chiefdelphi.com/forums/sh...d.php?t=131905
  #9   Spotlight this post!  
Unread 21-01-2015, 16:27
faust1706's Avatar
faust1706 faust1706 is offline
Registered User
FRC #1706 (Ratchet Rockers)
Team Role: College Student
 
Join Date: Apr 2012
Rookie Year: 2011
Location: St Louis
Posts: 498
faust1706 is infamous around these partsfaust1706 is infamous around these parts
Re: Outsourcing Vision Code

Quote:
Originally Posted by Merfoo View Post
I believe you can compile opencv on the roborio
http://www.chiefdelphi.com/forums/sh...d.php?t=131905
I didn't know you could at the time. I have not seen a benchmark of a simple opencv program yet running in parallel with the frc control stuff, so I cannot given any opinion about whether one should or shouldn't go this route.

You can also compile the libfreenect library (libraries now, because of freenect2 for the kinectv2), and use the kinect with the roborio. Again, I just know you can do it, I have no idea what the performance will be if you try it.
__________________
"You're a gentleman," they used to say to him. "You shouldn't have gone murdering people with a hatchet; that's no occupation for a gentleman."
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 02:59.

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