|
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
|