Go to Post Does IR work underwater? Or more importantly, through an air-water interface? ... sigh ... - Rich Kressly [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

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 11-17-2016, 08:58 AM
hadarsi320 hadarsi320 is offline
Registered User
FRC #3075
 
Join Date: Nov 2016
Location: Israel
Posts: 1
hadarsi320 is an unknown quantity at this point
Grip Image processing

I'm trying to learn how to use Grip. I'm using the sample images from the wpilib website of the 2016 frc to get the outline of the tape.

I encounter some problem in the images that include a side shot of the goal that includes two sides of equal size, this is how it looks: http://imgur.com/a/ilKUe

Does anyone have any idea what should I change in the filters?
I tried changing it specifically for certain types of images but it ends up ruining images that are closer/further away.
Reply With Quote
  #2   Spotlight this post!  
Unread 11-17-2016, 09:22 AM
euhlmann's Avatar
euhlmann euhlmann is offline
CTO, Programmer
AKA: Erik Uhlmann
FRC #2877 (LigerBots)
Team Role: Leadership
 
Join Date: Dec 2015
Rookie Year: 2015
Location: United States
Posts: 298
euhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud of
Re: Grip Image processing

Invent some sort of deterministic behavior; ie always turn to the left target in this situation.
__________________
Creator of SmartDashboard.js, an extensible nodejs/webkit replacement for SmartDashboard


https://ligerbots.org
Reply With Quote
  #3   Spotlight this post!  
Unread 11-17-2016, 09:37 AM
Andrew Schreiber Andrew Schreiber is offline
Data Nerd
FRC #0079
 
Join Date: Jan 2005
Rookie Year: 2000
Location: Misplaced Michigander
Posts: 4,055
Andrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond repute
Re: Grip Image processing

Sort by area of contour, then choose the first contour (i.e. the largest) You may have to do this robot side.
__________________




.
Reply With Quote
  #4   Spotlight this post!  
Unread 11-17-2016, 10:08 AM
SamCarlberg's Avatar
SamCarlberg SamCarlberg is offline
GRIP, WPILib. 2084 alum
AKA: Sam Carlberg
no team
Team Role: Mentor
 
Join Date: Nov 2015
Rookie Year: 2009
Location: MA
Posts: 45
SamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to behold
Re: Grip Image processing

I'd do what Andrew recommended. You can iterate through the arrays in networktables and keep track of the index of the contour with the largest area.
__________________
WPILib
GRIP, RobotBuilder
Reply With Quote
  #5   Spotlight this post!  
Unread 11-17-2016, 10:29 AM
KJaget's Avatar
KJaget KJaget is offline
Zebravision Labs
FRC #0900
Team Role: Mentor
 
Join Date: Dec 2014
Rookie Year: 2015
Location: Cary, NC
Posts: 37
KJaget has much to be proud ofKJaget has much to be proud ofKJaget has much to be proud ofKJaget has much to be proud ofKJaget has much to be proud ofKJaget has much to be proud ofKJaget has much to be proud ofKJaget has much to be proud of
Re: Grip Image processing

From experience shoot at the one on the right (i.e. the largest X value). The one on the left is a reflection from the driver station glass seen when you're trying to shoot in auto from the spybot location. Ask me (or the drivers we shot at, sorry) how I know.
Reply With Quote
  #6   Spotlight this post!  
Unread 11-17-2016, 10:50 AM
EmileH's Avatar
EmileH EmileH is offline
it's not a water game, ok?
AKA: Emile Hamwey
FRC #1058 (PVC Pirates) & FF (NE Way You Want It)
Team Role: Programmer
 
Join Date: Dec 2014
Rookie Year: 2011
Location: New England
Posts: 531
EmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant future
Re: Grip Image processing

For 1058's high goal autonomous, we just take the first contour array index which is always the left goal since our auto runs under the low bar and lines up with the left goal.
__________________
2016-present: High School Student, FRC 1058 PVC Pirates
2016: RiverRage 20 Champions, Battle of the Bay 3 Champions

2013-2015: Middle School Student, FRC 3467 Windham Windup
Reply With Quote
  #7   Spotlight this post!  
Unread 11-17-2016, 11:57 AM
euhlmann's Avatar
euhlmann euhlmann is offline
CTO, Programmer
AKA: Erik Uhlmann
FRC #2877 (LigerBots)
Team Role: Leadership
 
Join Date: Dec 2015
Rookie Year: 2015
Location: United States
Posts: 298
euhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud of
Re: Grip Image processing

Quote:
Originally Posted by Andrew Schreiber View Post
Sort by area of contour, then choose the first contour (i.e. the largest) You may have to do this robot side.
The issue with this is that the areas may change as you turn towards a target. This creates a sort of extended donkey-haystack problem. It was an issue for us last season. Hence the strategy of choosing one to always use if the areas are sufficiently similar.
__________________
Creator of SmartDashboard.js, an extensible nodejs/webkit replacement for SmartDashboard


https://ligerbots.org
Reply With Quote
  #8   Spotlight this post!  
Unread 11-17-2016, 12:11 PM
Hitchhiker 42's Avatar
Hitchhiker 42 Hitchhiker 42 is offline
Roboter
AKA: Mark Lavrentyev
FRC #4557 (FullMetal Falcons)
Team Role: Programmer
 
Join Date: Oct 2015
Rookie Year: 2015
Location: Cromwell, CT
Posts: 466
Hitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to behold
Re: Grip Image processing

Quote:
Originally Posted by Andrew Schreiber View Post
Sort by area of contour, then choose the first contour (i.e. the largest) You may have to do this robot side.
You do need to be careful with this. If you pick the right one in this case, and start turning towards it, you'll end up with the left goal being larger. This can result in massive jiggling between the two goals and not deciding properly.

To do this, you need to pick one and stay with it even if it becomes smaller. This means you need to figure out a way to keep the one you want (maybe by sending a one-time angle to turn to and then using that).
__________________



2016 - NE District Championship Entrepreneurship Award
2016 - Hartford District Industrial Design Award
2016 - Waterbury District Engineering Inspiration Award
Reply With Quote
  #9   Spotlight this post!  
Unread 11-17-2016, 12:53 PM
Andrew Schreiber Andrew Schreiber is offline
Data Nerd
FRC #0079
 
Join Date: Jan 2005
Rookie Year: 2000
Location: Misplaced Michigander
Posts: 4,055
Andrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond repute
Re: Grip Image processing

Quote:
Originally Posted by euhlmann View Post
The issue with this is that the areas may change as you turn towards a target. This creates a sort of extended donkey-haystack problem. It was an issue for us last season. Hence the strategy of choosing one to always use if the areas are sufficiently similar.
Quote:
Originally Posted by Hitchhiker 42 View Post
You do need to be careful with this. If you pick the right one in this case, and start turning towards it, you'll end up with the left goal being larger. This can result in massive jiggling between the two goals and not deciding properly.

To do this, you need to pick one and stay with it even if it becomes smaller. This means you need to figure out a way to keep the one you want (maybe by sending a one-time angle to turn to and then using that).
That depends on if you continue to update or if you use the image to determine where to turn then do it outside of the vision system using other sensors. Which is what I have always found to be more reliable.

Edit: Actually I'm going to expand on this.

Vision systems are running at, what, 30fps if you're good? If you only update your feedback variable 30 times a second bad things are going to happen with bouncing ANYWAY. A more sane way to do it would be to utilize gyro integration over a short time frame to allow you to compute the angle you are from the target and then turn that distance. The gyro is less noisy and updates faster.
__________________




.

Last edited by Andrew Schreiber : 11-17-2016 at 12:58 PM.
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 02:30 AM.

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