Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Successful Computer Vision (http://www.chiefdelphi.com/forums/showthread.php?t=100002)

baronep 12-01-2012 23:37

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)

NeatNit 13-01-2012 12:22

Re: Successful Computer Vision
 
Quote:

Originally Posted by baronep (Post 1104119)
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 :)

rwood359 13-01-2012 14:54

Re: Successful Computer Vision
 
Quote:

Originally Posted by baronep (Post 1104119)
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.

mwtidd 13-01-2012 15:30

Re: Successful Computer Vision
 
Quote:

Originally Posted by rwood359 (Post 1104583)
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.

baronep 13-01-2012 16:02

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

SuperS_5 13-01-2012 21:39

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.

Greg McKaskle 14-01-2012 08:31

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

Pirate programe 17-01-2012 16:38

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.

~Cory~ 17-01-2012 18:13

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.

Greg McKaskle 17-01-2012 18:21

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

wireties 17-01-2012 20:56

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

Tom Line 17-01-2012 21:36

Re: Successful Computer Vision
 
Go to superbrightleds and look up 60 mm "Angel Eyes".

~Cory~ 17-01-2012 22:59

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?

Andrew Lawrence 17-01-2012 23:09

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?

DominickC 17-01-2012 23:12

Re: Successful Computer Vision
 
Quote:

Originally Posted by SuperNerd256 (Post 1108139)
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 :/


All times are GMT -5. The time now is 09:37.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi