Package de.pco.camera
Class Camera
java.lang.Object
de.pco.camera.Camera
public class Camera extends Object
Camera class as the higher abstraction above the Recorder and Sdk classes
- Author:
- PCO
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Camera()Standard constructor, scans for the camera on the common interfaces described by the commonInterfaceList() method of theInterface(GigE, CamLink ME4, USB3, CLHS)Camera(Interface iface)Constructor, that searches for the next available camera at the givenInterface. -
Method Summary
Modifier and Type Method Description voidclose()Closes the camera.booleanequals(Object obj)Map<ConfigurationParameter,Object>getConfiguration()Gets the current configuration list for the camera.doublegetExposureTime()Returns the exposure time in secondsImageDatagetImage(int imageNumber)Returns an image from the recorder.ImageDatagetImage(int imageNumber, Roi roi)Returns an image from the recorder in the given region of interest.List<ImageData>getImages()Returns all recorded images from the recorder.List<ImageData>getImages(Roi roi)Returns all recorded images from the recorder.inthashCode()voidrecord(long numberOfImages, ExtendedRecorderType type)Generates and configures a new recorder instance and starts recording.voidsetConfiguration(ConfigurationParameter param, Object value)Sets a particular configuration parameter for the camera.voidsetConfiguration(Map<ConfigurationParameter,Object> conf)Sets the camera a required number of configuration parameters by means of a Map.voidsetDefaultConfiguration()Sets default configuration for the camera.voidsetExposureTime(double exposureTime)Sets the exposure time of the camera.voidstop()Stops recording.StringtoString()voidwaitForFirstImage()This function waits for the first available image.
-
Field Details
-
sdk
Sdk object wraps the pco.sdk native functions -
recorder
Recorder object wraps the pco.recorder native functions
-
-
Constructor Details
-
Camera
Standard constructor, scans for the camera on the common interfaces described by the commonInterfaceList() method of theInterface(GigE, CamLink ME4, USB3, CLHS)- Throws:
PcoExceptionIllegalStateException
-
Camera
Constructor, that searches for the next available camera at the givenInterface.- Parameters:
iface- Desired HW interface to search the camera in- Throws:
PcoExceptionIllegalStateException
-
-
Method Details
-
setDefaultConfiguration
Sets default configuration for the camera.- Throws:
PcoException
-
getConfiguration
Gets the current configuration list for the camera.- Returns:
- Map with the most usable camera parameters
- Throws:
PcoException
-
setConfiguration
Sets the camera a required number of configuration parameters by means of a Map.- Parameters:
conf- Map with camera parameters to be set- Throws:
PcoException
-
setConfiguration
Sets a particular configuration parameter for the camera.- Parameters:
param- Parameter of camera to be setvalue- Value of the parameter- Throws:
PcoException
-
record
public void record(long numberOfImages, ExtendedRecorderType type) throws PcoException, IllegalArgumentExceptionGenerates and configures a new recorder instance and starts recording.- Parameters:
numberOfImages- Number of images allocated in the driver. The RAM of the PC is limiting the maximum value.type- Recorder type to be used for the current record- Throws:
PcoExceptionIllegalArgumentException- Thrown if numberOfImages <= 4 by recorder type FIFO or RING_BUFFER
-
stop
Stops recording.- Throws:
PcoException
-
close
Closes the camera.- Throws:
PcoException
-
setExposureTime
Sets the exposure time of the camera. The underlying values for the sdk.setDelayExposureTime(0, Timebase.MS, time, timebase) function will be calculated automatically. The delay time is set to 0.- Parameters:
exposureTime- Desired exposure time in seconds- Throws:
PcoException
-
getExposureTime
Returns the exposure time in seconds- Returns:
- Throws:
PcoException
-
getImage
Returns an image from the recorder.- Parameters:
imageNumber- Number of recorder index to read. In "sequence" or "sequence non blocking" recorder type the recorder index matches the image number.- Returns:
- Recorded image including its metadata.
- Throws:
PcoException
-
getImage
Returns an image from the recorder in the given region of interest.- Parameters:
imageNumber- Number of recorder index to read. In "sequence" or "sequence non blocking" recorder type the recorder index matches the image number.roi- Region of interest. Only this region is returned.- Returns:
- Recorded image including its metadata.
- Throws:
PcoException
-
getImages
Returns all recorded images from the recorder.- Returns:
- List of all the recorded images.
- Throws:
PcoException
-
getImages
Returns all recorded images from the recorder.- Parameters:
roi- Region of interest of all the images to be returned only- Returns:
- List of all the recorded images.
- Throws:
PcoException
-
waitForFirstImage
This function waits for the first available image. In recorder mode SEQUENCE_NON_BLOCKING, RING_BUFFER and FIFO the record() function returns immediately. The user is responsible to wait for images from the camera before getImage() / getImages() is called.- Throws:
PcoException
-
toString
-
hashCode
public int hashCode() -
equals
-