View Single Post
  #16   Spotlight this post!  
Unread 26-01-2013, 23:11
bmbroom bmbroom is offline
Registered User
FRC #3103
 
Join Date: Jan 2013
Location: Houston
Posts: 2
bmbroom is an unknown quantity at this point
Re: Sample Vision Code, ComputeThreshold() exception

We are also having trouble getting an image using the sample vision code.

I am a complete newbie wrt the FRC competition, and doing my best to learn.

The camera.GetImage (image) function is not returning anything in image. The sample code does not initialize image, so it could point to garbage. 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've tried to find/guess a way to initialize the pointer without success. The sample code doesn't show any way to initialize it, so it's very puzzling to me how it could work. The function documentation is not very information, and all the examples/help talks about what to do once you've obtained an image.

Any basic help would be appreciated.
Reply With Quote