View Single Post
  #1   Spotlight this post!  
Unread 20-04-2016, 13:51
Adamd51 Adamd51 is offline
Registered User
FRC #0386
 
Join Date: Apr 2016
Location: Melbourne
Posts: 1
Adamd51 is an unknown quantity at this point
How to use USBCamera.getImage()

I am trying to obtain the image from the camera for vision processing and assign it to an instance of Image. Whenever I do I get error code "-1074397163: Image Acquisition Not In Progress". I have removed everything from the code that might be interfering and have come up with the following code which still creates the error. What am I missing? Am I doing something wrong? Thank you.

public class Robot extends IterativeRobot{

//imports

final static USBCamera usbCam = new USBCamera("cam1");/*This the correct camera*/
public void autonomousInit()
{
Image frame;
Robot.usbCam.getImage(frame);
}
}

(That is all the code, I have not omitted anything)
Reply With Quote