//declare a new object of class ColorFinder ColorFinder* finder = new ColorFinder(); //you can initiate the object with 5 input color parameters ColorFinder* green_finder = new ColorFinder(120, 45, 35, 0, 0.3, 40.0); //There are default values of color you can load from ini file. Example finder->LoadINISettings(ini, "RED"); //To get the position of center of mass of filtered pixels Point2D pos; pos = finder->GetPosition(LinuxCamera::GetInstance()->fbuffer->m_HSVFrame); //first declare an object of class Point2D //then set it equal to GetPosition function of ColorFinder object