Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   How do i keep camera going without stopping every time in JAVA? (http://www.chiefdelphi.com/forums/showthread.php?t=144162)

Luther4021 02-19-2016 05:22 PM

How do i keep camera going without stopping every time in JAVA?
 
public void Camera() {

NIVision.IMAQdxStartAcquisition(session);
NIVision.IMAQdxGrab(session, frame, 1);
CameraServer.getInstance().setImage(frame);
NIVision.IMAQdxStopAcquisition(session);

}

This is our code, I have tried many things to try and fix it, but all i got is errors. I've tried while loops and ifs nothing worked.

Thanks

kmodos 02-19-2016 05:26 PM

Re: How do i keep camera going without stopping every time in JAVA?
 
Quote:

Originally Posted by Luther4021 (Post 1542888)
public void Camera() {

NIVision.IMAQdxStartAcquisition(session);
NIVision.IMAQdxGrab(session, frame, 1);
CameraServer.getInstance().setImage(frame);
NIVision.IMAQdxStopAcquisition(session);

}

This is our code, I have tried many things to try and fix it, but all i got is errors. I've tried while loops and ifs nothing worked.

Thanks

You need to open your camera and start capture before you try to grab an image.

Team4021 02-19-2016 05:52 PM

Re: How do i keep camera going without stopping every time in JAVA?
 
Quote:

Originally Posted by kmodos (Post 1542892)
You need to open your camera and start capture before you try to grab an image.

The StartAcquisition is Starting the camera before it starts the capture. I just don't want the StopAcquisition in there. It loops through so the Camera is constantly turning on and off. So it makes our programs pretty laggy and delayed.

kmodos 02-19-2016 06:45 PM

Re: How do i keep camera going without stopping every time in JAVA?
 
Quote:

Originally Posted by Team4021 (Post 1542908)
The StartAcquisition is Starting the camera before it starts the capture. I just don't want the StopAcquisition in there. It loops through so the Camera is constantly turning on and off. So it makes our programs pretty laggy and delayed.

Put the stop acquisition outside the loop then?

Luther4021 02-19-2016 07:37 PM

Re: How do i keep camera going without stopping every time in JAVA?
 
I've done that, nothing but errors.

kmodos 02-19-2016 08:38 PM

Re: How do i keep camera going without stopping every time in JAVA?
 
Quote:

Originally Posted by Luther4021 (Post 1542959)
I've done that, nothing but errors.

What is the error? Without the stacktrace, it is hard to debug.


All times are GMT -5. The time now is 08:58 AM.

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