Go to Post One of these years, the game piece will be an actual red herring. - Taylor [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 02-19-2016, 05:22 PM
Luther4021 Luther4021 is offline
Registered User
None #4021
 
Join Date: Feb 2016
Location: Onalaska, WI
Posts: 2
Luther4021 is an unknown quantity at this point
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
Reply With Quote
  #2   Spotlight this post!  
Unread 02-19-2016, 05:26 PM
kmodos kmodos is offline
Registered User
AKA: Alex
FRC #1126 (SparX)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: New York
Posts: 57
kmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to behold
Re: How do i keep camera going without stopping every time in JAVA?

Quote:
Originally Posted by Luther4021 View Post
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.
Reply With Quote
  #3   Spotlight this post!  
Unread 02-19-2016, 05:52 PM
Team4021 Team4021 is offline
Registered User
FRC #4021
 
Join Date: Feb 2015
Location: Onalaska
Posts: 4
Team4021 is an unknown quantity at this point
Re: How do i keep camera going without stopping every time in JAVA?

Quote:
Originally Posted by kmodos View Post
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.
Reply With Quote
  #4   Spotlight this post!  
Unread 02-19-2016, 06:45 PM
kmodos kmodos is offline
Registered User
AKA: Alex
FRC #1126 (SparX)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: New York
Posts: 57
kmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to behold
Re: How do i keep camera going without stopping every time in JAVA?

Quote:
Originally Posted by Team4021 View Post
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?
Reply With Quote
  #5   Spotlight this post!  
Unread 02-19-2016, 07:37 PM
Luther4021 Luther4021 is offline
Registered User
None #4021
 
Join Date: Feb 2016
Location: Onalaska, WI
Posts: 2
Luther4021 is an unknown quantity at this point
Re: How do i keep camera going without stopping every time in JAVA?

I've done that, nothing but errors.
Reply With Quote
  #6   Spotlight this post!  
Unread 02-19-2016, 08:38 PM
kmodos kmodos is offline
Registered User
AKA: Alex
FRC #1126 (SparX)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: New York
Posts: 57
kmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to behold
Re: How do i keep camera going without stopping every time in JAVA?

Quote:
Originally Posted by Luther4021 View Post
I've done that, nothing but errors.
What is the error? Without the stacktrace, it is hard to debug.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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