|
Re: Particle Analysis Report Problems
this is my autonomous code as it stands now. can you guys help me figure out what to do/where to go from here.
void Autonomous(void)
{
myRobot.SetSafetyEnabled(false);
AxisCamera &camera = AxisCamera::GetInstance();
camera.WriteBrightness(0);
Wait(3.0);
myRobot.MecanumDrive_Cartesian(0.0, 0.0, 0.0, 0.0); // stop robot
while (!IsOperatorControl())
{
/** ColorImage &colorImagel;
camera.GetImage(&colorImage);
frcParticleAnalysis(&colorImage, 5, par); **/
HSLImage img;
camera.GetImage(&img);
BinaryImage* binImg = img.ThresholdRGB(192, 256, 192, 156, 192, 256);
vector<ParticleAnalysisReport>* par = binImg->GetOrderedParticleAnalysisReports(); //warning: unused variable 'par'
for(int x = 0; x < 5/**par.x**/; x++)
{
ParticleAnalysisReport& par = (*particles)[x]; //error: 'particles' undeclared (first use this function)
int x;
par.center_mass_x = x;
//do something with particles: par.center_mass_x & par.center_mass_y
}
}
}
thanks for the help
__________________
 Love, Peace, and Robot Grease
Last edited by Cody Trey : 21-01-2012 at 14:39.
Reason: for got to put a question...
|