Go to Post Avoid the impulse to shoot from the hip, and find out the full picture before deciding where you stand. - gblake [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 31-01-2014, 09:40
Dan252 Dan252 is offline
Registered User
FRC #3075 (HaDream Team #3075)
Team Role: Programmer
 
Join Date: Oct 2013
Rookie Year: 2011
Location: Israel
Posts: 12
Dan252 is on a distinguished road
Calibrating vision processing on the field

My team is probably going to use RoboRealm for vision processing this year and I was wondering how much time teams are given to calibrate their script on the field and what is the fastest/easiest way you know of to calibrating it?

We never got to use our vision processing code on a competition before so I don't have any experience calibrating the script on the field, how does your team do it?

Thanks,
Dan
  #2   Spotlight this post!  
Unread 31-01-2014, 10:01
eddie12390's Avatar
eddie12390 eddie12390 is offline
Registered User
AKA: Eddie
FRC #3260 (SHARP)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Pittsburgh
Posts: 285
eddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of light
Re: Calibrating vision processing on the field

Quote:
Originally Posted by Dan252 View Post
My team is probably going to use RoboRealm for vision processing this year and I was wondering how much time teams are given to calibrate their script on the field and what is the fastest/easiest way you know of to calibrating it?

We never got to use our vision processing code on a competition before so I don't have any experience calibrating the script on the field, how does your team do it?

Thanks,
Dan
The way that we did it last year was to have me (programmer and driver) take screenshots during our practice match of the goals through the camera. I then tuned and tested the algorithm based on the predefined images and it seemed to work fairly well.
  #3   Spotlight this post!  
Unread 31-01-2014, 10:22
Bryan Herbst's Avatar
Bryan Herbst Bryan Herbst is offline
Registered User
AKA: Bryan
FRC #2052 (KnightKrawler)
Team Role: Mentor
 
Join Date: Sep 2007
Rookie Year: 2007
Location: Minneapolis, Minnesota
Posts: 545
Bryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond repute
Re: Calibrating vision processing on the field

As per rule 5.5.7 (in The Tournament section),

Quote:
The ARENA will be open for at least one (1) hour prior to the start of Practice MATCHES, during which Teams may survey and/or measure the FIELD. The specific time that the FIELD is open will be communicated to Teams at the event. Teams may bring specific questions or comments to the FTA.
The field staff typically will not let you bring your entire robot on the field during this time, but I don't think there would be a problem with bringing a laptop and camera out.

For calibration with the robot, practice matches are the place to do it, as eddie12390 suggested.
__________________
Team 2052- KnightKrawler
Mentor and volunteer
  #4   Spotlight this post!  
Unread 31-01-2014, 10:29
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,082
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: Calibrating vision processing on the field

What kind of calibration do you think you need to do and why?
  #5   Spotlight this post!  
Unread 31-01-2014, 10:43
Dan252 Dan252 is offline
Registered User
FRC #3075 (HaDream Team #3075)
Team Role: Programmer
 
Join Date: Oct 2013
Rookie Year: 2011
Location: Israel
Posts: 12
Dan252 is on a distinguished road
Re: Calibrating vision processing on the field

Quote:
Originally Posted by Jared341 View Post
What kind of calibration do you think you need to do and why?
Changing the parameters for the threshold to match the lighting in the field.

Is there a way to overcome the difference in lighting of the field from our workshop?
  #6   Spotlight this post!  
Unread 31-01-2014, 11:04
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,082
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: Calibrating vision processing on the field

Quote:
Originally Posted by Dan252 View Post
Changing the parameters for the threshold to match the lighting in the field.

Is there a way to overcome the difference in lighting of the field from our workshop?
Here is the strategy that has worked for 341 using an Axis camera and LED ring(s). We never had to calibrate on the field in either 2012 or 2013 (both years, all of our shots were aimed by our vision system):

1. Turn off automatic white balance on the camera (can be done from the camera's web interface).

2. Get a very short exposure time so the image is mostly dark (from the web interface). You want a very dark image, except for the illuminated regions of the reflective tape. Set the exposure time to something very short. Put the camera in a bright scene (e.g. hold up a white card a foot or two in front of the lens) and then do a "hold" on exposure priority. Experiment with different settings. You want virtually all black except for a very bright reflection off of the tape. This is for two purposes: 1) it makes vision processing much easier (fewer false detections), 2) it conserves bandwidth, since dark areas of the image are very compact after JPEG compression. The camera doesn't know what you are looking for, so it will try to send you the entire scene as well as it can. But if it can't see the "background" very well, you are "tricking" the camera into only giving you the part you need!

3. Take a wide variety of sample images in and around our build space.

4. Design a threshold in RGB or HSL that works well on your sample images.

5. Your camera is now effectively much more sensitive to your LED ring than to ambient lighting, and all dynamic settings on the camera (white balance and exposure) are held constant. You likely will not need to do calibration (but of course YMMV).
  #7   Spotlight this post!  
Unread 31-01-2014, 11:52
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,600
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Calibrating vision processing on the field

Quote:
Originally Posted by Tanis View Post
The field staff typically will not let you bring your entire robot on the field during this time, but I don't think there would be a problem with bringing a laptop and camera out.
Must be a regional thing, we've always brought our robot out.
  #8   Spotlight this post!  
Unread 31-01-2014, 12:22
kmusa kmusa is offline
Registered User
AKA: Karlis Musa
FRC #0639 (Code Red Robotics)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2006
Location: Ithaca, NY
Posts: 117
kmusa is just really nicekmusa is just really nicekmusa is just really nicekmusa is just really nice
Re: Calibrating vision processing on the field

Quote:
Originally Posted by Tanis View Post
As per rule 5.5.7 (in The Tournament section),

The ARENA will be open for at least one (1) hour prior to the start of Practice MATCHES, during which Teams may survey and/or measure the FIELD. The specific time that the FIELD is open will be communicated to Teams at the event. Teams may bring specific questions or comments to the FTA.
Thanks for mentioning this. It reminded me that one should really read all of the rules each season.

This is actually the same as last year, though it seemed to me that most were interpreting it as "access to the FIELD for camera calibration."

Which is vastly different from 2012 (Rebound Rumble), when the rule specifically forbade any measurement of the field. (Though I do remember at one regional, seeing a adult from some team going on to the field just after the doors opened, to measure the force required to bring the bridge down.)

-Karlis
__________________
"A society without contrasting ideas will never move forward; however those contrasting ideas must be based on fact, must be rational/logical, and must be presented in a respectful manner." -Arthur Dutra IV

"If the district can spend $1.5M on turf, it should be able to fund a FRC team." -Sophie Halter
  #9   Spotlight this post!  
Unread 31-01-2014, 12:23
eddie12390's Avatar
eddie12390 eddie12390 is offline
Registered User
AKA: Eddie
FRC #3260 (SHARP)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Pittsburgh
Posts: 285
eddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of light
Re: Calibrating vision processing on the field

Quote:
Originally Posted by Joe Ross View Post
Must be a regional thing, we've always brought our robot out.
We were also able to at the Pittsburgh Regional.
  #10   Spotlight this post!  
Unread 31-01-2014, 12:25
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: Calibrating vision processing on the field

Quote:
Originally Posted by Joe Ross View Post
Must be a regional thing, we've always brought our robot out.
It kind of is. At stl, they let us bring our whole robot out. At terra heute we had a nice little cart powered by a battery and an adaptor to power our o droid and monitor. We rolled it around the field saving an image ten times a second while our program was running.

On curie, we did the same thing as terra heute. The refs were taking pictures of our cart.

All 3 didn't care if we brought our robot out, but we didn't need to. They are volunteers. If you can, calibrate with your program actually running and show them. They are there to learn too.

In 2012 we were so scared that the ir kinect wouldn't work that some of us drove to the kc regional and took.thousands of pictures to convince ourselves that it would work. The refs looked very confused when we said our team number and we weren't competing at the regional.
__________________
"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."
  #11   Spotlight this post!  
Unread 31-01-2014, 15:34
topgun's Avatar
topgun topgun is offline
Registered User
FRC #2846 (FireBears)
Team Role: Mentor
 
Join Date: Oct 2008
Rookie Year: 2008
Location: Minnesota
Posts: 229
topgun has a brilliant futuretopgun has a brilliant futuretopgun has a brilliant futuretopgun has a brilliant futuretopgun has a brilliant futuretopgun has a brilliant futuretopgun has a brilliant futuretopgun has a brilliant futuretopgun has a brilliant futuretopgun has a brilliant futuretopgun has a brilliant future
Re: Calibrating vision processing on the field

Make sure your drivers tell you about the time available. In 2012 we kept waiting for the announcement to say the field was open for vision testing. Never heard that announcement so I asked the Field Supervisor. Turns out the announcement was made at the Drivers meeting. The drive team didn't seem to think they needed to relay that information to the programming team. That hurt our efforts with vision, and ultimately our matches. I didn't let the drive team forget that too soon.
__________________
-T

  #12   Spotlight this post!  
Unread 31-01-2014, 16:03
Dan252 Dan252 is offline
Registered User
FRC #3075 (HaDream Team #3075)
Team Role: Programmer
 
Join Date: Oct 2013
Rookie Year: 2011
Location: Israel
Posts: 12
Dan252 is on a distinguished road
Re: Calibrating vision processing on the field

Quote:
Originally Posted by Jared341 View Post
Here is the strategy that has worked for 341 using an Axis camera and LED ring(s). We never had to calibrate on the field in either 2012 or 2013 (both years, all of our shots were aimed by our vision system):

1. Turn off automatic white balance on the camera (can be done from the camera's web interface).

2. Get a very short exposure time so the image is mostly dark (from the web interface). You want a very dark image, except for the illuminated regions of the reflective tape. Set the exposure time to something very short. Put the camera in a bright scene (e.g. hold up a white card a foot or two in front of the lens) and then do a "hold" on exposure priority. Experiment with different settings. You want virtually all black except for a very bright reflection off of the tape. This is for two purposes: 1) it makes vision processing much easier (fewer false detections), 2) it conserves bandwidth, since dark areas of the image are very compact after JPEG compression. The camera doesn't know what you are looking for, so it will try to send you the entire scene as well as it can. But if it can't see the "background" very well, you are "tricking" the camera into only giving you the part you need!

3. Take a wide variety of sample images in and around our build space.

4. Design a threshold in RGB or HSL that works well on your sample images.

5. Your camera is now effectively much more sensitive to your LED ring than to ambient lighting, and all dynamic settings on the camera (white balance and exposure) are held constant. You likely will not need to do calibration (but of course YMMV).
Thanks! that helped a lot and I'll be making sure we follow your instructions


Quote:
Originally Posted by topgun View Post
Make sure your drivers tell you about the time available. In 2012 we kept waiting for the announcement to say the field was open for vision testing. Never heard that announcement so I asked the Field Supervisor. Turns out the announcement was made at the Drivers meeting. The drive team didn't seem to think they needed to relay that information to the programming team. That hurt our efforts with vision, and ultimately our matches. I didn't let the drive team forget that too soon.
Sorry for you guys, I hope you'll have it better this year. That's the first thing I'll tell our drivers (if we would finally choose them.. )

Last edited by Dan252 : 31-01-2014 at 16:07.
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: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