View Single Post
  #6   Spotlight this post!  
Unread 23-01-2012, 10:14
r0b0man r0b0man is offline
Registered User
FRC #1308
 
Join Date: Jan 2012
Location: cleveland
Posts: 7
r0b0man is an unknown quantity at this point
Re: convexHull in WPILib ??

I've been looking into this too. I noticed that the ParticleAnalysis structure has variables that describe the center of mass. Is it possible that making a particle analysis report performs the convex hull operation?
If not, I've thought of a simple algorithm for doing it. Since you know the dimensions of the acquired image you also know how many pixels in each direction. After constructing your binary image from a threshold you can just iterate over every pixel in a single row and fill in the areas between the 2 "activated" pixels (since there are only 2 values in a binary image for every pixel).
Reply With Quote