Go to Post It was the stupidest rule, but a rule is a rule, and everyone has to follow them. - RyanN [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 29-01-2012, 23:39
Sinani201 Sinani201 is offline
Registered User
AKA: Daniel
FRC #1836 (Milken Knights)
Team Role: Programmer
 
Join Date: Dec 2011
Rookie Year: 2012
Location: Los Angeles, CA
Posts: 12
Sinani201 is an unknown quantity at this point
GetParticleAnalysisReport causes crash

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.
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 13:38.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi