View Single Post
  #10   Spotlight this post!  
Unread 23-01-2012, 18:57
basicxman basicxman is offline
Emily Horsman
FRC #2200 (MMRambotics)
Team Role: Programmer
 
Join Date: Oct 2007
Rookie Year: 2007
Location: Burlington, Ontario
Posts: 971
basicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant future
Send a message via AIM to basicxman Send a message via MSN to basicxman Send a message via Yahoo to basicxman
Re: convexHull in WPILib ??

Quote:
Originally Posted by Bryscus View Post
Your binaryImage object would then contain a convex hulled image, right?
I believe so yes. BinaryImage inherits from MonoImage and therefore from ImageBase. If we look at the ImageBase header and source...

Code:
//...
public:
    //...
    Image *GetImaqImage();
protected:
    Image *m_imaqImage;
Code:
Image *ImageBase::GetImaqImage()
{
    return m_imaqImage;
}
And then a function from BinaryImage, it's simply using that image.

Code:
int BinaryImage::GetNumberParticles()
{
    int numParticles = 0;
    int success = imaqCountParticles(m_imaqImage, 1, &numParticles);
    wpi_setImaqErrorWithContext(success, "Error counting particles");
    return numParticles;
}
Reply With Quote