View Single Post
  #8   Spotlight this post!  
Unread 13-01-2012, 15:34
ProgrammerMatt ProgrammerMatt is offline
Programmer-Electrical-Mechanical
FRC #0228 (Gus)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Southington
Posts: 138
ProgrammerMatt is just really niceProgrammerMatt is just really niceProgrammerMatt is just really niceProgrammerMatt is just really nice
Re: Tracking in JAVA?

Quote:
Originally Posted by JewishDan18 View Post
Haha yes, I remember, it was an awesome regional. I wish we were going back, but we're doing GSR and CT this year.

So from there, you have an image object. I would recommend printing out the height and width of the image, to make sure your camera is hooked up properly. From there, the traditional route is to threshold the image to get a binary image which should ideally contain only the rectangle. From there, WPILib has a rectangle detection function, which should work for basic stuff. From there, you get the height and width, and can do a bunch of trigonometry to figure out how far away it is. I would start by figuring out the thresholding functions; play around with them and see what they do. If you have any questions, please ask!
Ok so play with the thresh holds but is there a way i can see it realtime while running it?

and where is the rectangle detector i could not find it.

Sorry im a real noob on java i havent had much teaching.
Reply With Quote