public class CameraServer extends Object
Modifier and Type | Method and Description |
---|---|
static CameraServer |
getInstance() |
int |
getQuality()
Get the quality of the compressed image sent to the dashboard
|
byte[] |
intTobyteArray(int n) |
boolean |
isAutoCaptureStarted()
check if auto capture is started
|
protected void |
serve()
Run the M-JPEG server.
|
void |
setImage(NIVision.Image image)
Manually change the image that is served by the MJPEG stream.
|
void |
setQuality(int quality)
Set the quality of the compressed image sent to the dashboard
|
void |
startAutomaticCapture(String cameraName)
Start automatically capturing images to send to the dashboard.
|
public static CameraServer getInstance()
public void setImage(NIVision.Image image)
startAutomaticCapture(java.lang.String)
is called.image
- The IMAQ image to show on the dashboardpublic void startAutomaticCapture(String cameraName)
setImage(com.ni.vision.NIVision.Image)
shouldn't be called after this is called.cameraName
- The name of the camera interface (e.g. "cam1")public boolean isAutoCaptureStarted()
public void setQuality(int quality)
quality
- The quality of the JPEG image, from 0 to 100public int getQuality()
protected void serve() throws IOException, InterruptedException
IOException
- if the Socket connection failsInterruptedException
- if the sleep is interruptedpublic byte[] intTobyteArray(int n)
Copyright © 2015. All rights reserved.