Go to Post Hold on to your shirts kids, here comes some physics... - JesseK [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 28-01-2012, 10:52
haywood.sloan haywood.sloan is offline
Registered User
FRC #3487
 
Join Date: Jan 2012
Location: Plainfield
Posts: 1
haywood.sloan is an unknown quantity at this point
Acquiring distance using axis camera

I am with team 3487. We are trying to use an axis camera to find the basketball goals for the 2012 FRC competition. We would also like to find the amount of pixels between the top and bottom goal and using some trig calculate our distance from the goal. We are stuck with coding the camera to find the image and then find the pixels in between. Are there any suggestions as to make this process easier.
Reply With Quote
  #2   Spotlight this post!  
Unread 28-01-2012, 13:44
kylevedder kylevedder is offline
Programmer
AKA: Kyle Vedder
FRC #0467 (Shrewsbury Colonials)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Massachusetts
Posts: 6
kylevedder is an unknown quantity at this point
Re: Acquiring distance using axis camera

Hi, I am from team 467 and I am the programmer who is working on the code for the camera. My first recommendation would be to read the paper published by National Instruments, here is a link to download the paper:
https://decibel.ni.com/content/docs/DOC-20173
I recommend following the paper up until the point where they do the convex hull operation. There are two reasons for this, because there is no convex hull operation in the library for Java, and because this makes you unable to do a quality filter as I explained later. Instead of the convex hull you should put a filter on the particles the camera sees so you only get the particles that fall into the correct ratio of width to height (which is about 1.33) and fall into the correct quality range (quality is the total area of the bounding box of the particle divided by the total area of the particle) which should be around 30%. Both these functions can be found in the ParticleAnalysisReport class. From this point you can find the center of the backboard setup by getting the center of mass for all four particles. You could even find how far away from the boards the robot is by doing math on the width and height of the particle bounding boxes instead of trying to find the distance between the rectangles. You may not get very good results at first, but keep messing with the thresholds in the NI Vision Assistant software you got in the kit until you get a good image to do processing on.
Good Luck!

Last edited by kylevedder : 28-01-2012 at 13:49.
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 13:30.

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