Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   General Forum (http://www.chiefdelphi.com/forums/forumdisplay.php?f=16)
-   -   Camera Trouble (http://www.chiefdelphi.com/forums/showthread.php?t=146515)

Team 3023 31-03-2016 16:35

Camera Trouble
 
We need help figuring out what this error means and how to fix it:
Code:

Error when getting image from the camera: IMAQdxError: -1074360306: No acquisition in progress. at edu.wpi.first.wpilibj.CameraServer.capture(CameraServer.java:222)
 edu.wpi.first.wpilibj.CameraServer$2.run(CameraServer.java:192)
 java.lang.Thread.run(Thread.java:745)

Please and thank you.

nickbrickmaster 31-03-2016 16:43

Re: Camera Trouble
 
Can we see your code? It is very difficult to debug code without seeing it.

What camera are you using?

Team 3023 31-03-2016 16:50

Re: Camera Trouble
 
CameraServer server;

public void robotInit() {

oi = new OI();
dt= new DriveTrain();
am = new ArmMovements();
server = CameraServer.getInstance();
server.setQuality(50);
server.startAutomaticCapture("cam0");

nickbrickmaster 31-03-2016 17:01

Re: Camera Trouble
 
Quote:

Originally Posted by nickbrickmaster (Post 1565832)
What camera are you using?

Are you using GRIP?
Is this the only place that you are accessing the camera?
Are there any other errors?

Team 3023 31-03-2016 17:20

Re: Camera Trouble
 
No
Yes
No

CalTran 31-03-2016 17:52

Re: Camera Trouble
 
Quote:

Originally Posted by Team 3023 (Post 1565843)
No
Yes
No

Still wondering which camera you're using? (Axis, Microsoft Lifecam, etc...)

antman 31-03-2016 18:14

Re: Camera Trouble
 
Do you know that it is named cam0? You can check by logging into the rio's maintenance page and see what name it lists for the camera. We've had issues with cameras not being named as expected. Wrap all your camera code in try..catch blocks so camera errors don't bring down your whole program.

Ninjastahr 01-04-2016 13:49

Re: Camera Trouble
 
Have you tried imaqdxStartAcquisition()?

Mister_E 12-04-2016 16:52

Re: Camera Trouble
 
I second Ninjastahr 's suggestion. I was having an issue with a Genius webcam and switched from the CameraServer class to NIVision. (thanks, jojoguy10!). Check out the "Intermediate Vision" example.

CloakAndDagger 13-04-2016 10:39

Re: Camera Trouble
 
Just from reading the error

"No Acquisition in progress" sounds like you either aren't telling your camera to capture in the code, or you are having a physical problem on your camera preventing it from capturing images

Wired_Mike 13-04-2016 15:18

Re: Camera Trouble
 
A few questions:
Is this on the FMS or your own connection(e.g. Practice router or tether)?
What camera are you running?

I'm not a programmer nor a professional, just an electrical/control systems troubleshooter. My team had a similar issue, however I can't think of the error off the top of my head.


All times are GMT -5. The time now is 01:04.

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