Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   How to use USBCamera.getImage() (http://www.chiefdelphi.com/forums/showthread.php?t=147450)

Adamd51 20-04-2016 13:51

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)

Skragnoth 20-04-2016 15:06

Re: How to use USBCamera.getImage()
 
You need to call:

usbCam.startCapture();

Then you can get the image.


All times are GMT -5. The time now is 10:02.

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