Whenever I try to use the command GetParticleAnalysisReport, the robot stops working and I have to reboot it. Not sure why this is happening. Here is the code:
Code:
ColorImage* camerain = camera->GetImage();
BinaryImage* binImage = camerain->ThresholdHSL(0,9,0,5,250,255);
int numParticles = binImage->GetNumberParticles();
delete camerain;
ParticleAnalysisReport* report;
for(int i = 1; i<=numParticles; i++)
{
binImage->GetParticleAnalysisReport(i,report);
// Other processing stuff
}
delete binImage;
This happens the very first time GetParticleAnalysisReport is called, so it doesn't have to so with overwriting the report variable (though I don't know if this will end up being a problem later).
Any help would be greatly appreciated.