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
February 19, 2016, 5:26pm
2
Luther4021:
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.
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
February 19, 2016, 6:45pm
4
Put the stop acquisition outside the loop then?
I’ve done that, nothing but errors.
kmodos
February 19, 2016, 8:38pm
6
What is the error? Without the stacktrace, it is hard to debug.