Go to Post Well, I think it's awesome and the best thing ever. But I'm biased. ;) - OldDan1168 [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 12-01-2012, 23:37
baronep's Avatar
baronep baronep is offline
Student President
FRC #2848 (Jesuit All-Sparks)
Team Role: Leadership
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Dallas TX
Posts: 167
baronep is on a distinguished road
Successful Computer Vision

So we just received out new axis camera and led rings today and I am extremely impressed. With only a 60mm led ring, we were able to illuminate the retro-reflective tape from half-way across the shop. At this point, I am very confident that our robot will have some sort of computer vision this season.

Here is our current algorithm: We are using the NI vision assistant to create a VI for us, so here are the filters applied in the Vision Assistant.

1. Original Image (Acquired from the axis camera)
2. Color Threshold using HSL values acquired from sampling using histogram tool. This creates a rough outline of the square with some noise.
3. Adv. Morphology - Convex Hull: Fills in the rectangle
4. Particle Filter - Area: Removes any small noise leaving 4 rectangles
5. Particle Analysis: outputs any information that you want to know about the rectangle(s)
Reply With Quote
  #2   Spotlight this post!  
Unread 13-01-2012, 12:22
NeatNit's Avatar
NeatNit NeatNit is offline
Alumni Programmer
FRC #1577 (Steampunk)
Team Role: Teacher
 
Join Date: Sep 2011
Rookie Year: 2011
Location: Israel
Posts: 60
NeatNit is an unknown quantity at this point
Re: Successful Computer Vision

Quote:
Originally Posted by baronep View Post
So we just received out new axis camera and led rings today and I am extremely impressed. With only a 60mm led ring, we were able to illuminate the retro-reflective tape from half-way across the shop. At this point, I am very confident that our robot will have some sort of computer vision this season.

Here is our current algorithm: We are using the NI vision assistant to create a VI for us, so here are the filters applied in the Vision Assistant.

1. Original Image (Acquired from the axis camera)
2. Color Threshold using HSL values acquired from sampling using histogram tool. This creates a rough outline of the square with some noise.
3. Adv. Morphology - Convex Hull: Fills in the rectangle
4. Particle Filter - Area: Removes any small noise leaving 4 rectangles
5. Particle Analysis: outputs any information that you want to know about the rectangle(s)
Thank you, I will definitely use this thread as reference when creating ours!

I will post mine for detecting the basketballs here later when I can
Reply With Quote
  #3   Spotlight this post!  
Unread 13-01-2012, 14:54
rwood359 rwood359 is offline
Registered User
AKA: Randy
FRC #0359 (Hawaiian Kids)
Team Role: Mentor
 
Join Date: Aug 2008
Rookie Year: 2008
Location: Waialua, HI
Posts: 212
rwood359 is a name known to allrwood359 is a name known to allrwood359 is a name known to allrwood359 is a name known to allrwood359 is a name known to allrwood359 is a name known to all
Re: Successful Computer Vision

Quote:
Originally Posted by baronep View Post
So we just received out new axis camera and led rings today and I am extremely impressed. With only a 60mm led ring, we were able to illuminate the retro-reflective tape from half-way across the shop. At this point, I am very confident that our robot will have some sort of computer vision this season.
Does the ambient light in the shop (bright or dim) have much affect on the LED/retro-tape readings? In 2009, the difference in lighting between our room and the stadiums blew us out of the water.
__________________
Reply With Quote
  #4   Spotlight this post!  
Unread 13-01-2012, 15:30
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: Successful Computer Vision

Quote:
Originally Posted by rwood359 View Post
Does the ambient light in the shop (bright or dim) have much affect on the LED/retro-tape readings? In 2009, the difference in lighting between our room and the stadiums blew us out of the water.
Last year we had the same experiences with the reflective tape. Worked like a charm in my basement, worked okay in the shop and the practice field, hardly worked at all on the FRC field. Also I didn't reference the tape until I was within 4 ft, and it was only to center on the X axis. I was so excited to see how easy it was to get it working at the beginning of last season, only to be disappointed by the actual results.

This year I believe both depth and rgb can play together well. Do a red or blue filter based on team color. Then intersect with the depth image. I believe you will be able to see the red and blue squares very well using this strategy.
__________________
"Never let your schooling interfere with your education" -Mark Twain
Reply With Quote
  #5   Spotlight this post!  
Unread 13-01-2012, 16:02
baronep's Avatar
baronep baronep is offline
Student President
FRC #2848 (Jesuit All-Sparks)
Team Role: Leadership
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Dallas TX
Posts: 167
baronep is on a distinguished road
Re: Successful Computer Vision

I am expecting a significant difference in the lighting between our shop (fluorescent lights) and the can lights in the arena. I am expecting that we will use some of the field time to adjust our settings. I expect that we will have to adjust the white-balance down and that we will have to tweak our HSL values for the filter
Reply With Quote
  #6   Spotlight this post!  
Unread 13-01-2012, 21:39
SuperS_5's Avatar
SuperS_5 SuperS_5 is offline
[Certified LabVIEW Developer]
FRC #1219
 
Join Date: Dec 2010
Rookie Year: 2010
Location: Canada
Posts: 140
SuperS_5 will become famous soon enoughSuperS_5 will become famous soon enough
Re: Successful Computer Vision

Vision systems always have issues with lighting. My co-workers still struggle with things like:
* Power fluctuations causing light intensity modulation.
* Skylights in factories that let in light at the wrong angle for 1 hour a day.
* Random people using flashlights/lasers/camera flashes at the wrong time.

You will have to have controls right on your dashboard to manipulate various settings. It shouldn't be difficult, but it will take some time. If you can get some practice rounds in, before/during the competitions on the actual field, this is ideal. You will also require a method of switching between settings. (Eg. An enum: [arena|practice|shop|other random place|...]) The more practice you have setting up the controls for your vision system, the faster you will be able to get it right. With enough practice, you may even come up with a algorithm that does the same thing in varying light conditions.
Good luck! I look forward to any examples that you guys post.
__________________
Mike B
Reply With Quote
  #7   Spotlight this post!  
Unread 14-01-2012, 08:31
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: Successful Computer Vision

The latter portion of the white paper discusses setting up the camera so that you are processing good images. Experiment with the WB and exposure and brightness to find a setting that is consistent between your shop and outdoors.

According to wikipedia, an overcast day is 1000 lux, and I believe the lighting for the FIRST field is about somewhere between 85 and 95 foot candles. These are comparable levels of light.

It is also typical for the FIRST field having the lights aiming into the field from each long edge. They do not shine directly into the eyes of the drivers at the joysticks. So the illumination drops off rapidly there.

If you have questions about what a camera setting does, you can look into the WPILib documentation, the Axis documentation, or perhaps ask here.

Greg McKaskle
Reply With Quote
  #8   Spotlight this post!  
Unread 17-01-2012, 16:38
Pirate programe's Avatar
Pirate programe Pirate programe is offline
Registered User
FRC #0354
 
Join Date: Jan 2012
Location: Queens,NY
Posts: 53
Pirate programe is an unknown quantity at this point
Re: Successful Computer Vision

Question: would this be the sort of tape required for the vision target? I'm not sure of the exact specifications that the vision target requires, so I really need to have this verified.
Reply With Quote
  #9   Spotlight this post!  
Unread 17-01-2012, 18:13
~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: Successful Computer Vision

We are attempting to solve the problem by looking at the black rectangle rather than the reflective one. We have pretty good results in most lighting conditions.
__________________
corin.rypkema.org
WPI Class of '17
'12 Dean's List Finalist, Mentor of 706 - Cyberhawks
Reply With Quote
  #10   Spotlight this post!  
Unread 17-01-2012, 18:21
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: Successful Computer Vision

You should have a piece of the tape in the kit of parts. If you decide to purchase more, I'm almost certain that is the right product.

Greg Mckaskle
Reply With Quote
  #11   Spotlight this post!  
Unread 17-01-2012, 20:56
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: Successful Computer Vision

What are the LED rings you speak of? Were they in the kit of parts? If not, do you mind sharing the part number?

TIA
Reply With Quote
  #12   Spotlight this post!  
Unread 17-01-2012, 21:36
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,517
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: Successful Computer Vision

Go to superbrightleds and look up 60 mm "Angel Eyes".
Reply With Quote
  #13   Spotlight this post!  
Unread 17-01-2012, 22:59
~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: Successful Computer Vision

What is the legality of using superbright leds? I can't find anything in the manual. When do the leds become a nuisance to the game and called out by the referees?
__________________
corin.rypkema.org
WPI Class of '17
'12 Dean's List Finalist, Mentor of 706 - Cyberhawks
Reply With Quote
  #14   Spotlight this post!  
Unread 17-01-2012, 23:09
Andrew Lawrence
 
Posts: n/a
Re: Successful Computer Vision

Has anyone seen a difference as to tracking the reflective tape vs. the black rectangle? Does anyone think one will be better than the other? Will the stadium lighting effect tracking the black rectangle?
Reply With Quote
  #15   Spotlight this post!  
Unread 17-01-2012, 23:12
DominickC DominickC is offline
Registered User
FRC #0023 (PNTA)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 1620
Location: Boston
Posts: 435
DominickC is an unknown quantity at this point
Re: Successful Computer Vision

Quote:
Originally Posted by SuperNerd256 View Post
Will the stadium lighting effect tracking the black rectangle?
That came up between a few of our team members when we were discussing which of the two tapes to track. We are unsure as of yet :/
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 09:37.

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