View Single Post
  #4   Spotlight this post!  
Unread 19-01-2012, 19:38
Patrickwhite's Avatar
Patrickwhite Patrickwhite is offline
May the North be with you
FRC #0610 (The Coyotes)
Team Role: Programmer
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Toronto
Posts: 88
Patrickwhite is a glorious beacon of lightPatrickwhite is a glorious beacon of lightPatrickwhite is a glorious beacon of lightPatrickwhite is a glorious beacon of lightPatrickwhite is a glorious beacon of lightPatrickwhite is a glorious beacon of light
Re: Target tracking in Java

The class ParticleAnalysisReport has several public fields that give you useful information about particles. A "particle", often referred to in image processing as a "blob", is a group of continuous pixels.

A single report details the information about one particle - where it's located on the screen, its bounding box (the box in which all the pixels of the particle are contained), its size, and a few other useful things. The particleArea field, for example, represents the number of pixels in the image.

Greg's whitepaper details a simple algorithm for finding rectangles: Threshold image -> apply "convex hull" operation -> find the best "rectangle scores".

The rectangle score is the percentage of the area of the bounding box that is covered by pixels. The "convex hull" operation is a bit more complex to access - if you want to get at it see JewishDan's thread about accessing the C/C++ imaging functions in Java. But the particle properties alone should be enough to at least get you started.
__________________
while(!going.isTough());
tough.exit();

What will we do tonight, Warfa?
The same thing we do every night, Patrick. Sit and wait for Electrical.

Last edited by Patrickwhite : 19-01-2012 at 23:16. Reason: realized it looked like a blob'o'text(tm), added line breaks
Reply With Quote