View Single Post
  #4   Spotlight this post!  
Unread 21-01-2012, 14:38
Cody Trey's Avatar
Cody Trey Cody Trey is offline
Programing = hard + fun
FRC #2582 (Panther Bots)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2009
Location: US
Posts: 31
Cody Trey is an unknown quantity at this point
Send a message via Yahoo to Cody Trey
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...
Reply With Quote