Package org.robwork.sdurw
Class CameraFirewire
- java.lang.Object
-
- org.robwork.sdurw.Sensor
-
- org.robwork.sdurw.Camera
-
- org.robwork.sdurw.CameraFirewire
-
public class CameraFirewire extends Camera
The Camera class defines a generel interface to a camera.
A great deal of the interface resembles the DCAM standard since
DCAM allready defines a very wide interface.
typical usage:
Camera c;
// setup camera features modes and so on
c.initialize();
c.start();
// acquire images
c.stop();
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CameraFirewire.CameraFeature
Optional features of a camerastatic class
CameraFirewire.CaptureMode
The resolution of the camera capturestatic class
CameraFirewire.CapturePolicy
defines how images are captured.
When the SINGLE_SHOT CapturePolicy is used the user has to trigger
the camera through acquire.static class
CameraFirewire.ColorCode
Optional colormodes available when capturingstatic class
CameraFirewire.ErrorCode
error codes for a camerastatic class
CameraFirewire.Format7Mode
The resolution of the camera capturestatic class
CameraFirewire.TriggerMode
Modes of the camera, inspired by the DCAM standard modes
-
Constructor Summary
Constructors Constructor Description CameraFirewire(long cPtr, boolean cMemoryOwn)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete()
CameraFirewire.CaptureMode
getCaptureMode()
returns the CaptureMode of this cameraCameraFirewire.CapturePolicy
getCapturePolicy()
returns the capture policy of this camera.CameraFirewire.ColorCode
getColorMode()
returns the CaptureMode of this camerastatic long
getCPtr(CameraFirewire obj)
CameraFirewire.ErrorCode
getError()
returns the errorcode of the latest error.double
getFeature(CameraFirewire.CameraFeature setting)
returns the value of the specified camera setting.boolean
isError()
tests whether this camera is in an error state.boolean
isFeatureAvailable(CameraFirewire.CameraFeature option)
returns whether the specified camera option is supported
by the camera.boolean
setCaptureMode(CameraFirewire.CaptureMode mode)
sets the CaptureMode of this camera.boolean
setCapturePolicy(CameraFirewire.CapturePolicy policy)
sets the capture policy of this cameraboolean
setColorMode(CameraFirewire.ColorCode mode)
sets the CaptureMode of this camera.boolean
setFeature(CameraFirewire.CameraFeature setting, double value)
sets the value of the specified camera setting.-
Methods inherited from class org.robwork.sdurw.Camera
acquire, addListener, getCPtr, getFrameRate, getGain, getHeight, getImage, getModelInfo, getShutter, getShutterBounds, getWidth, initialize, isGainAvailable, isImageReady, isInitialized, isShutterAvailable, isStarted, removeListener, setFrameRate, setGain, setShutter, start, stop
-
Methods inherited from class org.robwork.sdurw.Sensor
getCPtr, getDescription, getName, getPropertyMap, getSensorModel, setSensorModel
-
-
-
-
Method Detail
-
getCPtr
public static long getCPtr(CameraFirewire obj)
-
getCaptureMode
public CameraFirewire.CaptureMode getCaptureMode()
returns the CaptureMode of this camera- Returns:
- the camera capturemode
-
setCaptureMode
public boolean setCaptureMode(CameraFirewire.CaptureMode mode)
sets the CaptureMode of this camera.- Parameters:
mode
- [in] the wanted capture mode- Returns:
- true if CaptureMode was set successfully, false otherwise
-
getColorMode
public CameraFirewire.ColorCode getColorMode()
returns the CaptureMode of this camera- Returns:
- the camera capturemode
-
setColorMode
public boolean setColorMode(CameraFirewire.ColorCode mode)
sets the CaptureMode of this camera.- Parameters:
mode
- [in] the wanted capture mode- Returns:
- true if CaptureMode was set successfully, false otherwise
-
getError
public CameraFirewire.ErrorCode getError()
returns the errorcode of the latest error. If no error has occured
then SUCCES is returned.- Returns:
- the error code
-
isError
public boolean isError()
tests whether this camera is in an error state.- Returns:
- true if camera is in error state, false otherwise
-
getCapturePolicy
public CameraFirewire.CapturePolicy getCapturePolicy()
returns the capture policy of this camera.- Returns:
- capture policy of the camera
-
setCapturePolicy
public boolean setCapturePolicy(CameraFirewire.CapturePolicy policy)
sets the capture policy of this camera- Parameters:
policy
- [in] the capture policy- Returns:
- true if capture policy was set succesfully, false otherwise
-
isFeatureAvailable
public boolean isFeatureAvailable(CameraFirewire.CameraFeature option)
returns whether the specified camera option is supported
by the camera.- Parameters:
option
- [in] the specific CameraOption- Returns:
- true if the option is available, false otherwise.
-
getFeature
public double getFeature(CameraFirewire.CameraFeature setting)
returns the value of the specified camera setting. If the
camera is not initialized or the setting is unsupported -1 is returned.- Parameters:
setting
- [in] the CameraFeature- Returns:
- value of the setting if setting is supported and camera is
initilized, else -1 is returned.
-
setFeature
public boolean setFeature(CameraFirewire.CameraFeature setting, double value)
sets the value of the specified camera setting. If the
camera is not initialized or the setting is unsupported false is returned.- Parameters:
setting
- [in] the CameraFeaturevalue
- [in] the value of the feature- Returns:
- true if the setting was succesfully changed, false otherwise.
-
-