View Single Post
  #4   Spotlight this post!  
Unread 07-02-2015, 18:48
FleventyFive FleventyFive is offline
Registered User
FRC #4118
 
Join Date: Sep 2014
Location: Gainesville, FL
Posts: 23
FleventyFive is on a distinguished road
Re: Program crashing when grabbing USB Camera frame + misc comm issues

Quote:
Originally Posted by RufflesRidge View Post
OP, you should check to make sure that you are actually getting a non-null image of non-zero size back from your call to GetImage. If you are calling GetImage every 20ms that's 50FPS which the camera can't provide, I haven't played with this enough to know if that's why your having an issue, but it would be my first suspicion.
This was my guess as well. How to I check if it is non-null? The WPILIB image class has no public functions or attributes at all. It's very confusing... like how can I convert between the Image returned from the USBcamera and the other wpilib image classes like ColorImage (which have public functions like thresholding or w/e)? The AxisCamera class has functions to return these other types of images, but not the USBcamera. Thanks for the help.
Reply With Quote