Go to Post STEM is the new cool, STEM is the new fun, but nobody said STEM is the new easy. - Taylor [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
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 13-02-2010, 01:13
Drucifur Drucifur is offline
Registered User
FRC #0614
 
Join Date: Feb 2010
Location: Virginia
Posts: 4
Drucifur is an unknown quantity at this point
Autonomous 2010 FRC

Just started work on autonomous and we have a few questions about CircleTrackerDemo and the Tracker Class:

First: Does anybody have the NetBeans CircleTrackerDemo working? If you do, we would love to take a look.

Second: How are you finding the soccer balls in autonomous? "If !carpet, then ball" seems error prone; does it work for anybody?

Third: What exactly does the CircleTrackerDemo do (Java to English translation please)?

Thanks,
Drew -- Team 614
Reply With Quote
  #2   Spotlight this post!  
Unread 13-02-2010, 01:31
davidthefat davidthefat is offline
Alumni
AKA: David Yoon
FRC #0589 (Falkons)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2010
Location: California
Posts: 792
davidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud of
Re: Autonomous 2010 FRC

First of all, it works out of the box. and I noticed it cant track a soccer ball and it makes a green circle around the target and pink circle arount the other circle like stuff on the dashboard
Reply With Quote
  #3   Spotlight this post!  
Unread 13-02-2010, 02:19
Drucifur Drucifur is offline
Registered User
FRC #0614
 
Join Date: Feb 2010
Location: Virginia
Posts: 4
Drucifur is an unknown quantity at this point
Re: Autonomous 2010 FRC

We haven't hooked up the gyro, so hopefully the demo will work once we do.

Are you saying it can find elliptical shapes but not a soccer ball? That seems oddly contradictory...
Reply With Quote
  #4   Spotlight this post!  
Unread 13-02-2010, 03:48
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: Autonomous 2010 FRC

We know and expect the soccer to produce a circular shape, so we see a circle. The balls cast shadows and the edge is not well controlled, so the algorithm for detecting a strong edge between light and dark around the ball will often fail at some point. For that reason, the circle detection isn't a great way to spot the balls.

I've posted info on ni.com/first discussing a pretty effective that looks for circular holes in the carpet. The carpet is pretty consistent and can be masked using color or even better, luminance. You can invert the mask, remove small particles, remove edge particles, and you are ready to get a particle report. Some of the fields you can ask for in the report compare perimeter distance to area, and if you think about the math, that is a pretty good filter for circular shapes. You may want to put in a few other filters and fiddle with the range, but you can build a particle based ball tracker pretty easily.

Also keep in mind that the camera needs to be mounted so that it can see the carpet in front of it.

Greg McKaskle
Reply With Quote
  #5   Spotlight this post!  
Unread 13-02-2010, 04:54
Michael DiRamio Michael DiRamio is offline
Registered User
FRC #1114 (Simbotics)
Team Role: Teacher
 
Join Date: Jan 2006
Rookie Year: 2006
Location: St. Catharines, Ontario, Canada
Posts: 39
Michael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond repute
Re: Autonomous 2010 FRC

Greg,

I haven't been able to find the imaq functions you talk about using through the FRC Java API. Do we need to make our own native interface for these or am I just not looking in the right place?
Reply With Quote
  #6   Spotlight this post!  
Unread 13-02-2010, 07:17
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: Autonomous 2010 FRC

I can't be certain, but I believe they are there in the Java interface as they are pretty common functions.

The first would be to get the lunimance plane, same as the ellipse finder it looks to be the getLuminancePlane() method. You can do this based on color, but I'm not sure that is much more effective than the faster luminance approach. Second you'll want to thresholdHSL() or threshold ??? to get a BinaryImage type. The other particle filtering functions will be unique methods on a BinaryImage.

I'll help more if you could point to a doxygen or similar function reference for the Java WPILib. I wasn't able to locate one.

Greg McKaskle
Reply With Quote
  #7   Spotlight this post!  
Unread 13-02-2010, 08:52
omalleyj omalleyj is offline
Registered User
AKA: Jim O'Malley
FRC #1279 (Cold Fusion)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2008
Location: New Jersey
Posts: 132
omalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to behold
Re: Autonomous 2010 FRC

The methods are definitely available in Java, we use them. Look in the ColorImage and MonoImage classes and you will find everything you need.
Reply With Quote
  #8   Spotlight this post!  
Unread 13-02-2010, 09:29
ideasrule's Avatar
ideasrule ideasrule is offline
Registered User
FRC #0610 (Coyotes)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Toronto
Posts: 108
ideasrule is a jewel in the roughideasrule is a jewel in the roughideasrule is a jewel in the roughideasrule is a jewel in the rough
Re: Autonomous 2010 FRC

Quote:
Originally Posted by omalleyj View Post
The methods are definitely available in Java, we use them. Look in the ColorImage and MonoImage classes and you will find everything you need.
I don't see any particle filter, thresholding functionality, or shape detection (except for ellipse detect) functionality. Where are they?
Reply With Quote
  #9   Spotlight this post!  
Unread 13-02-2010, 10:42
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: Autonomous 2010 FRC

I was able to find this documentation online. I don't have Java installed, you I'd assume you have class documentation installed with the source.

http://team2648.com/javadoc/edu/wpi/...naryImage.html

This lists the particle report functions, but I don't see the small particle filters or the edge exclusion which will also be useful.

Greg McKaskle
Reply With Quote
  #10   Spotlight this post!  
Unread 13-02-2010, 15:42
Michael DiRamio Michael DiRamio is offline
Registered User
FRC #1114 (Simbotics)
Team Role: Teacher
 
Join Date: Jan 2006
Rookie Year: 2006
Location: St. Catharines, Ontario, Canada
Posts: 39
Michael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond repute
Re: Autonomous 2010 FRC

Quote:
Originally Posted by omalleyj View Post
The methods are definitely available in Java, we use them. Look in the ColorImage and MonoImage classes and you will find everything you need.
Are you talking about the ellipse detection methods or the small particle filtering and other morphology/binary processing functions in the NI vision library?

From what I can tell only a select few of the vision methods (that they thought would be helpful for tracking the target) were made available in the Java library.
Reply With Quote
  #11   Spotlight this post!  
Unread 14-02-2010, 08:06
omalleyj omalleyj is offline
Registered User
AKA: Jim O'Malley
FRC #1279 (Cold Fusion)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2008
Location: New Jersey
Posts: 132
omalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to behold
Re: Autonomous 2010 FRC

The lower level stuff is called from Java by methods that are just wrappers for the call to the real functions (ala what JNI gives you) which I assume are written in C or LabView and are sitting in a .so somewhere. If you look in the NIVision class you will see what I mean, for instance MeasureParticle calls imaqMeasureParticle. I am not sure what is available in LabView so I don't know what percentage of functionality is exposed to Java, but everything to do ball detection is certainly there, and you can use the higher level methods in ColorImage and MonoImage.

<ideasrule>
I don't see any particle filter, thresholding functionality, or shape detection (except for ellipse detect) functionality. Where are they?

Not sure exactly what you are looking for here, the particle reports in the demo are filtered by user written code that compares the information returned to what is expected and generates a number that is compared to a threshold value. But I don't get the feeling that is what you mean.

Are you looking to detect the edges yourself?
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
FRC 2010 Team Update #5 Alex Cormier General Forum 23 27-01-2010 13:05
Sample 2010 C++ Program's Autonomous Not Won't Run joxphoto General Forum 2 25-01-2010 13:30
2010 FRC Kickoff Workshops Mark McLeod FIRST E-Mail Blast Archive 3 07-01-2010 10:23
NASA FRC grants 2009-2010 ?? Andrew Schuetze Fundraising 18 02-10-2009 13:56
FRC Java 2010 Documentation alivemyst Java 11 07-09-2009 19:03


All times are GMT -5. The time now is 18:52.

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