View Single Post
  #17   Spotlight this post!  
Unread 27-01-2013, 01:21
Pulverator's Avatar
Pulverator Pulverator is offline
Registered User
FRC #1551 (The Grapes of Wrath)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Naples
Posts: 8
Pulverator is an unknown quantity at this point
Re: Sample Vision Code, ComputeThreshold() exception

Quote:
Originally Posted by bmbroom View Post
The call to camera.GetImage (image) passes image by value so I don't see how it could change image and in our tests it doesn't appear to. Since it initially contains a garbage pointer, this might explain some of the errors people send when the code attempts to dereference the pointer.
I'm pretty sure it passes by pointer as this is the declaration in AxisCamera.h.
Code:
int GetImage(ColorImage *image);
It's my understanding that calling this method will set the passed pointer which in this case is "image." I agree with you that after calling this function, image does not appear to be valid.
Reply With Quote