Go to Post Tell someone familiar with FIRST that you won a regional and they will congratulate you, tell them you won a chairmans award and they will celebrate you. - Brandon Holley [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
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 26-03-2013, 01:00
lorem3k's Avatar
lorem3k lorem3k is offline
1 + 1 = 0 (in Z/2Z)
AKA: Andy D.
FRC #1482 (Bishop Grandin Ghosts)
Team Role: Alumni
 
Join Date: Apr 2012
Rookie Year: 2011
Location: Calgary, AB
Posts: 165
lorem3k is a splendid one to beholdlorem3k is a splendid one to beholdlorem3k is a splendid one to beholdlorem3k is a splendid one to beholdlorem3k is a splendid one to beholdlorem3k is a splendid one to behold
Vision tracking - pyramid goal?

Has anyone here been able to get their Vision tracking code to target the reflective tape on the pyramid goal? We have implemented the 2013 Rectangular Target example into our code, and it works without a hitch for detecting the two and three point targets, but when we aim at the pyramid, we don't pick up any targeting information.

I suspect that this issue has something to do with the fact that the other rectangles that it can detect are hollow on the inside before the convex hull is applied. I'm trying to figure out how to work around this, but I'm stumped. Can anyone offer some advice on where to start with this?

I've attached the pertinent code (please excuse the disorganization).
Attached Files
File Type: vi Vision Processing.vi (114.6 KB, 23 views)
__________________
Boo! Bishop Grandin High School / GM Canada / Tenaris
2013 Western Canada - Quarterfinalists (thanks 288/4719) / 2012 GTR West - Quarterfinalists (thanks 188/1075) / 2011 GTR East - Regional Winners (thanks 1114/1503)
Reply With Quote
  #2   Spotlight this post!  
Unread 26-03-2013, 13:23
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,748
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: Vision tracking - pyramid goal?

If you process an image of the pyramid goal, I suspect you'll see score numbers printed next to the large particles. The example code measure a number of factors and scores them according to the 2 and 3 point goals, so the scores will likely be very low. You may want to add or make a specialized version that uses the aspect ratio, and rectangularity measurements and scores according to pyramid. Hollowness probably doesn't make sense, and I think you can remove the convex hull operation as well.

If you put up an image, I can help a bit more with the measurements and scoring.

Greg McKaskle
Reply With Quote
  #3   Spotlight this post!  
Unread 26-03-2013, 16:19
lorem3k's Avatar
lorem3k lorem3k is offline
1 + 1 = 0 (in Z/2Z)
AKA: Andy D.
FRC #1482 (Bishop Grandin Ghosts)
Team Role: Alumni
 
Join Date: Apr 2012
Rookie Year: 2011
Location: Calgary, AB
Posts: 165
lorem3k is a splendid one to beholdlorem3k is a splendid one to beholdlorem3k is a splendid one to beholdlorem3k is a splendid one to beholdlorem3k is a splendid one to beholdlorem3k is a splendid one to behold
Re: Vision tracking - pyramid goal?

Thanks for replying, Greg. The camera does process the targets as part of the binary image, but it doesn't display any scores. I'll take a look at modifying the aspect ratio .vi to include that of the pyramid target. I'll get some pictures for you in a few hours.
EDIT: I've attached the unprocessed image, and the processed binary image.
Attached Thumbnails
Click image for larger version

Name:	pyramid goal.png
Views:	28
Size:	36.7 KB
ID:	14455  Click image for larger version

Name:	pyramid goal binary.png
Views:	23
Size:	1.2 KB
ID:	14456  
__________________
Boo! Bishop Grandin High School / GM Canada / Tenaris
2013 Western Canada - Quarterfinalists (thanks 288/4719) / 2012 GTR West - Quarterfinalists (thanks 188/1075) / 2011 GTR East - Regional Winners (thanks 1114/1503)

Last edited by lorem3k : 26-03-2013 at 19:55.
Reply With Quote
  #4   Spotlight this post!  
Unread 26-03-2013, 18:26
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 987
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: Vision tracking - pyramid goal?

Quote:
Originally Posted by lorem3k View Post
Thanks for replying, Greg. The camera does process the targets as part of the binary image, but it doesn't display any scores. I'll take a look at modifying the aspect ratio .vi to include that of the pyramid target. I'll get some pictures for you in a few hours.
You likely need to lower the Area Size limit % then, and/or increase the Particle Count limit. Note that depending on how good of a binary image you are getting this may have have an impact on processing speed by requiring particle reports and line averages on substantially more particles.
Reply With Quote
  #5   Spotlight this post!  
Unread 26-03-2013, 20:11
lorem3k's Avatar
lorem3k lorem3k is offline
1 + 1 = 0 (in Z/2Z)
AKA: Andy D.
FRC #1482 (Bishop Grandin Ghosts)
Team Role: Alumni
 
Join Date: Apr 2012
Rookie Year: 2011
Location: Calgary, AB
Posts: 165
lorem3k is a splendid one to beholdlorem3k is a splendid one to beholdlorem3k is a splendid one to beholdlorem3k is a splendid one to beholdlorem3k is a splendid one to beholdlorem3k is a splendid one to behold
Re: Vision tracking - pyramid goal?

Thanks for the reply, Ruffles. We already had the area size limit at 0%, and I tried increasing the particle count limit from 10 to well into the thousands with no results.

Greg, could you offer some insight on how to modify the example's Aspect Ratio Score.vi to let it compare the binary image to the pyramid targets' aspect ratios as well as the middle and high goals?
__________________
Boo! Bishop Grandin High School / GM Canada / Tenaris
2013 Western Canada - Quarterfinalists (thanks 288/4719) / 2012 GTR West - Quarterfinalists (thanks 188/1075) / 2011 GTR East - Regional Winners (thanks 1114/1503)
Reply With Quote
  #6   Spotlight this post!  
Unread 26-03-2013, 20:43
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,748
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: Vision tracking - pyramid goal?

The photo is dark, but it doesn't look like much of it is showing to the camera, does it? And the threshold has barely anything at all in it. A bit of horizontal stripe and no vertical stripe.

Once you have a good binary image, you can decide which elements you want to key in on. Perhaps you want to look for the upside down T, or perhaps it is too specific to field location and you want to look for just the horizontal or vertical strip.

Greg McKaskle
Reply With Quote
  #7   Spotlight this post!  
Unread 03-04-2013, 02:54
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: Vision tracking - pyramid goal?

To track the pyramid, I track the Alliance Wall. We shoot at the pyramid from the corner, and that is a constant solution in respect to the Alliance Wall. So, our driver drives until the solutions we tested match the ones we found to work. And very excitingly, the labview programmer dwelled into PIDs, so he can make those micro adjustments automatically.

This was my work around to tracking the pyramid. Of course, this only works from one spot, but it is effective. The reason I do this is because of the FOV of my camera. I cannot see the reflective tape at the base of the pyramid, and when I am far enough away to see it, the shot is near impossible and we arent protected like we are when touching the pyramid.
__________________
"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."
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 08:57.

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