![]() |
Sensor API v2.5.0
|
Functions | |
| void | _Close () |
| int | _GetSerialNumber (char *cameraId, char *serialNumber) |
| int | _GetDeviceVersion (char *cameraId, char *deviceVersion) |
| int | _Open (int *cameraCount, char ***cameraIds, int timeout) |
| int | _Discover (int *cameraCount, char ***cameraIds, int timeout) |
| int | _Connect (char *cameraId, char *ipAddress) |
| int | _StartGrabbing (char *cameraID) |
| int | _StopGrabbing (char *cameraID) |
| int | _ClearBatchBuffers (char *cameraID) |
| int | _SetRawImageCallback (char *cameraID, RawImageCallback callback) |
| int | _SetProfileCallback (char *cameraID, ProfileCallback callback) |
| int | _SetLineCallback (char *cameraID, int layerId, LineCallback callback) |
| int | _SetBatchCallback (char *cameraID, int layerId, BatchCallback callback) |
| int | _SetLineSortingOrder (char *cameraID, int sortingOrder) |
| int | _IsConnected (char *cameraID) |
| int | _SetStringParameter (char *cameraID, char *paramName, char *value) |
| int | _SetIntParameter (char *cameraID, char *paramName, int value) |
| int | _SetLayerIntParameter (char *cameraID, int layerId, char *paramName, int value) |
| int | _SetLayerFloatParameter (char *cameraID, int layerId, char *paramName, float value) |
| int | _GetLayerIntParameter (char *cameraID, int layerId, char *paramName, int *value) |
| int | _GetLayerFloatParameter (char *cameraID, int layerId, char *paramName, float *value) |
| int | _SetFloatParameter (char *cameraID, char *paramName, float value) |
| int | _SetDoubleParameter (char *cameraID, char *paramName, double value) |
| int | _GetStringParameter (char *cameraID, char *paramName, char *value) |
| int | _GetIntParameter (char *cameraID, char *paramName, int *value) |
| int | _GetFloatParameter (char *cameraID, char *paramName, float *value) |
| int | _GetDoubleParameter (char *cameraID, char *paramName, double *value) |
| int | _FieldCalibrationStart (char *cameraID, char *xCalibFile, char *zCalibFile, double *grooveHeightsExpected, int numOfGrooveHeightsExpected, FieldCalibrationResults *results) |
| int | _IntensityCalibrationStart (char *cameraID, char *xCalibrationFile, char *zCalibrationFile, char *intensityCalibrationFile, bool smoothHorizontal, double gain) |
| double | _IntensityCalibrationProgress (char *cameraID, char *progressBitmapFile) |
| void | _IntensityCalibrationStop (char *cameraID, char *correctedBitmapFile) |
| bool | _IntensityCalibrationSave (char *cameraId, char *outputFile) |
| int | _ZCompensationCalibrationStart (char *cameraID, int direction) |
| void | _ZCompensationCalibrationStartNewLevel (char *cameraID, int direction) |
| void | _ZCompensationCalibrationProgress (char *cameraID, char *progressBitmapFile, double *levelsX, int levelsMaxX, int *levelsCountX, double *levelsY, int levelsMaxY, int *levelsCountY) |
| bool | _ZCompensationCalibrationSave (char *cameraId, char *outputFile) |
| int | _ZCompensationCalibrationGetStatus (char *cameraId) |
| bool | _ZCompensationCalibrationRemoveLatest (char *cameraId, int direction) |
| bool | _ZCompensationCalibrationVisualizeResult (char *calibrationFile, int direction, char *darkToBrightFile, char *brightToDarkFile) |
| bool | _ZCompensationCalibrationVisualizeCurrent (char *cameraID, int direction, char *darkToBrightFile, char *brightToDarkFile) |
| int | _FieldCalibrationSave (char *cameraId, char *fileName) |
| int | _DynamicSensorCtrlParameters (char *cameraID, int param_set_count, DynSensorControl *control_parameters) |
| int | _GetParameterSupport (char *cameraID, char *paramName, bool *is_supported) |
| int | _AdjustRoiAndFps (char *cameraID, const int operation, int const inValue, int *outValue) |
| int | _SetPeakDetectionParameters (char *cameraID, MaterialType type, DetectionSensitivity sensitivity) |
| int | _ConvertPixelsToMicrometers (char *cameraID, float *x_value, float *z_value) |
| int _AdjustRoiAndFps | ( | char * | cameraID, |
| const int | operation, | ||
| int const | inValue, | ||
| int * | outValue | ||
| ) |
C# function: CameraStatusCode AdjustRoiAndFps(string cameraId, int roiOperation, int inValue, out int outValue)
Adjust imaging height, offset or frequency according to operation enumeration.
| cameraID | [in] Identifier of the camera. |
| operation | [in] ROI and frequency operation mode. SetRoiForFps = 0, Adjust imaging height and offset based on estimated maximum frequency. GetRoiForFps = 1, Returns imaging height based on estimated maximum frequency. Does not set any sensor parameters. SetFpsForRoi = 2, Adjust imaging height and offset based on desired z-range on micrometers. GetFpsForRoi = 3, Returns imaging frequency based on desired z-range on micrometers. Does not set any sensor parameters. GetRoiOffsetZero = 4, Returns imaging zero offset in pixels for desired image height in pixels. Does not set any sensor parameters. GetRoiOffsetCentered = 5, Returns imaging centered offset in pixels for desired image height in pixels. Does not set any sensor parameters. SetRoiForFpsCentered = 6, Adjust imaging height and offset based on estimated maximum frequency. Centers image around middle of sensor. GetFpsForHeight = 7, Returns imaging frequency based on imaging height on pixels. Does not set any sensor parameters. GetLedPulseForFps = 8, Returns max led pulse width time in microseconds based on desired frequency. Does not set any sensor parameters. |
| inValue | [in] SetRoiForFps, SetRoiForFpsCentered, GetExposureForFps and GetRoiForFps: frequency in Hz. SetFpsForRoi and GetFpsForRoi: z-range in micrometers. GetRoiOffsetZero, GetFpsForHeight and GetRoiOffsetCentered: image height in pixels. |
| outValue | [out] SetRoiForFps, SetRoiForFpsCentered and GetRoiForFps: image height in pixels. SetFpsForRoi, GetFpsForHeight and GetFpsForRoi: frequency in Hz. GetRoiOffsetZero and GetRoiOffsetCentered: image offset in pixels. GetLedPulseForFps: LED pulse width in microseconds.. |
| int _ClearBatchBuffers | ( | char * | cameraID | ) |
C# function: CameraStatusCode ClearBatchBuffers(string cameraID)
Clear batch buffer for the specified camera.
| cameraID | [in] identifier for the camera. |
| void _Close | ( | ) |
C# function: CameraStatusCode Close()
Close the API and release all resources. This function is usually called in the end of a client application life cycle.
| int _Connect | ( | char * | cameraId, |
| char * | ipAddress | ||
| ) |
C# function: CameraStatusCode Connect(string cameraId, string ipv4)
Connects to a camera making it ready for use.
| cameraId | [in] Identifier of the camera. |
| ipAddress | [in] IPv4 address to assign. This must be in the same address space as the client PC is. For example, if client PC's address is "10.10.40.1", this could be "10.10.40.2" provided that it is free. Set this NULL (0) if auto-ip should be used. |
| int _ConvertPixelsToMicrometers | ( | char * | cameraID, |
| float * | x_value, | ||
| float * | z_value | ||
| ) |
C# function: CameraStatusCode ConvertPixelsToMicrometers(string cameraId, float pixelX, float pixelZ, out float xValue, out float zValue)
Converts point from pixel coordinates to world coordinates.
| cameraID | [in] Identifier for the camera, may be NULL for one camera systems. |
| x_value | [in, out] Input is x coordinate in pixels. Output is x coordinate in micrometers. |
| z_value | [in, out] Input is y coordinate in pixels. Output is y coordinate in micrometers. |
| int _Discover | ( | int * | cameraCount, |
| char *** | cameraIds, | ||
| int | timeout | ||
| ) |
C# function: CameraStatusCode Discover(ref int cameraCount, out List<string> cameraIds, int timeout)
Allows rediscover cameras after API has already been loaded. If expected camera count is not reached within given timeout, an additional timeout is waited until all expected cameras are found.
| cameraCount | [in] Expected camera count as an input. [out] Returns count of connected cameras. |
| cameraIds | [out] Pointer to a C-string array that will be populated with IDs of the discovered cameras. API will allocate and deallocate memory. |
| timeout | [int] Timeout to wait for replies in milliseconds. |
| int _DynamicSensorCtrlParameters | ( | char * | cameraID, |
| int | param_set_count, | ||
| DynSensorControl * | control_parameters | ||
| ) |
C# function: CameraStatusCode DynamicSensorCtrlParameters(string cameraId, int paramSetCount, DynSensorControl[] controlParameters)
Set group of dynamic sensor control parameters to register.
In case you are using a variable ROI size in dynamic sensor control parameters, set the initial ROI (the one before dynamic sensor control begins) to the largest size you have in the dynamic sensor control parameter list. For example, if you have ROI heights 100, 500, and 1000 in the list, set the initial ROI height to the highest value 1000. This must be done because the size of internal data buffers is determined by the initial ROI size. Therefore, setting the initial ROI size to the largest value will ensure that the data from the largest ROI will fit in the internal data buffers.
| cameraID | [in] Identifier of the camera. |
| param_set_count | [in] Number of control parameter structures. |
| control_parameters | [in] Group set of control parameter for sensor. |
| int _FieldCalibrationSave | ( | char * | cameraId, |
| char * | fileName | ||
| ) |
C# function: CameraStatusCode FieldCalibrationSave(string cameraId, string fileName)
Save accepted field calibration results to the calibration file
| cameraId | [in] Identifier of the camera. |
| fileName | [in] Full path for the saved z-calibration file. |
| int _FieldCalibrationStart | ( | char * | cameraID, |
| char * | xCalibFile, | ||
| char * | zCalibFile, | ||
| double * | grooveHeightsExpected, | ||
| int | numOfGrooveHeightsExpected, | ||
| FieldCalibrationResults * | results | ||
| ) |
C# function: CameraStatusCode FieldCalibrationStart(string cameraId, string xCalibFile, string zCalibFile, List<double> grooveHeightsExpected, ref FieldCalibrationResults results)
Start calibration procedure. Type of the calibration block is detected and calculate calibration correction is written to the results. The output file is not saved yet. Function overrides existing camera parameters.
| cameraID | [in] Identifier of the camera. |
| xCalibFile | [in] Full path of the x-calibration. |
| zCalibFile | [in] Full path of the z-calibration. |
| grooveHeightsExpected | [in] Array of expected groove heights in um. |
| numOfGrooveHeightsExpected | [in] Number of values in array. 0 if default groove heights are used. |
| results | [out] Measured calibration. (FieldCalibrationResults) |
| int _GetDeviceVersion | ( | char * | cameraId, |
| char * | deviceVersion | ||
| ) |
C# function: CameraStatusCode GetDeviceVersion(string cameraId, out string deviceVersion)
Get the device version of a camera.
| cameraId | [in] Identifier of the camera. |
| deviceVersion | [out] Device version read from the camera. |
| int _GetDoubleParameter | ( | char * | cameraID, |
| char * | paramName, | ||
| double * | value | ||
| ) |
C# function: CameraStatusCode GetParameter(string cameraId, string name, out double value)
Get a double parameter from a camera.
| cameraID | [in] Identifier of the camera. |
| paramName | [in] Name of the parameter as string. Parameters are listed in Parameters for Camera |
| value | [out] Value of the parameter. |
| int _GetFloatParameter | ( | char * | cameraID, |
| char * | paramName, | ||
| float * | value | ||
| ) |
C# function: CameraStatusCode GetParameter(string cameraId, string name, out float value)
Get a float parameter from a camera.
| cameraID | [in] Identifier of the camera. |
| paramName | [in] Name of the parameter as string. Parameters are listed in Parameters for Camera |
| value | [out] Value of the parameter. |
| int _GetIntParameter | ( | char * | cameraID, |
| char * | paramName, | ||
| int * | value | ||
| ) |
C# function: CameraStatusCode GetParameter(string cameraId, string name, out int value)
Get an integer parameter from a camera.
| cameraID | [in] Identifier of the camera. |
| paramName | [in] Name of the parameter as string. Parameters are listed in Parameters for Camera |
| value | [out] Value of the parameter. |
| int _GetLayerFloatParameter | ( | char * | cameraID, |
| int | layerId, | ||
| char * | paramName, | ||
| float * | value | ||
| ) |
C# function: CameraStatusCode GetLayerParameter(string cameraId, int layerId, string name, out float value)
Get a float parameter from a specific layer.
| cameraID | [in] Identifier for the camera, may be NULL for one camera systems. |
| layerId | [in] Id of the layer (0 = first layer). |
| paramName | [in] Name of the parameter as string. |
| value | The value. |
| int _GetLayerIntParameter | ( | char * | cameraID, |
| int | layerId, | ||
| char * | paramName, | ||
| int * | value | ||
| ) |
C# function: CameraStatusCode GetLayerParameter(string cameraId, int layerId, string name, out int value)
Get an integer parameter from a specific layer.
| cameraID | [in] Identifier for the camera, may be NULL for one camera systems. |
| layerId | [in] Id of the layer (0 = first layer). |
| paramName | [in] Name of the parameter as string. |
| value | The value. |
| int _GetParameterSupport | ( | char * | cameraID, |
| char * | paramName, | ||
| bool * | is_supported | ||
| ) |
C# function: CameraStatusCode GetParameterSupport(string cameraId, string name, out bool value)
Check is the parameter supported or not with the specified sensor
| cameraID | [in] Identifier of the camera. |
| paramName | [in] Name of checked parameter. |
| is_supported | [out] false if not supported. true if supported. |
| int _GetSerialNumber | ( | char * | cameraId, |
| char * | serialNumber | ||
| ) |
C# function: CameraStatusCode GetSerialNumber(string cameraId, out string serialNumber)
Get the serial number of a camera.
| cameraId | [in] >Identifier of the camera. |
| serialNumber | [out] Serial number read from the sensor. |
| int _GetStringParameter | ( | char * | cameraID, |
| char * | paramName, | ||
| char * | value | ||
| ) |
C# function: CameraStatusCode GetParameter(string cameraId, string name, out string value)
Get a string parameter from a camera.
| cameraID | [in] Identifier of the camera. |
| paramName | [in] Name of the parameter as string. Parameters are listed in Parameters for Camera |
| value | [out] Value of the parameter. |
| double _IntensityCalibrationProgress | ( | char * | cameraID, |
| char * | progressBitmapFile | ||
| ) |
| bool _IntensityCalibrationSave | ( | char * | cameraId, |
| char * | outputFile | ||
| ) |
| int _IntensityCalibrationStart | ( | char * | cameraID, |
| char * | xCalibrationFile, | ||
| char * | zCalibrationFile, | ||
| char * | intensityCalibrationFile, | ||
| bool | smoothHorizontal, | ||
| double | gain | ||
| ) |
| void _IntensityCalibrationStop | ( | char * | cameraID, |
| char * | correctedBitmapFile | ||
| ) |
| int _IsConnected | ( | char * | cameraID | ) |
C# function: CameraStatusCode IsConnected(string cameraId)
Check whether a camera is connected.
| cameraID | [in] Identifier of the camera. |
| int _Open | ( | int * | cameraCount, |
| char *** | cameraIds, | ||
| int | timeout | ||
| ) |
C# function: CameraStatusCode Open(ref int cameraCount, out List<string> cameraIds, int timeout)
Opens the API and discovers cameras from the connected network. If expected camera count is not reached within given timeout, an additional timeout is waited until all expected cameras are found.
| cameraCount | [in] Expected camera count as an input. [out] Returns count of connected cameras. |
| cameraIds | [out] Pointer to a C-string array that will be populated with IDs of the discovered cameras. API will allocate and deallocate memory. |
| timeout | [in] Timeout to wait for replies in milliseconds. |
| int _SetBatchCallback | ( | char * | cameraID, |
| int | layerId, | ||
| BatchCallback | callback | ||
| ) |
C# function: CameraStatusCode SetBatchCallback(string cameraId, int layerId, BatchCallback callback)
Set a Batch line callback for a camera.
| cameraID | [in] Identifier of the camera. |
| layerId | [in] Layer id. 0 is the first layer in defined sorting order. Multiple layers can be configured by calling this function multiple times. Range 0-9. |
| callback | [in] Callback method that is called whenever a line is received from the camera. 0 if callback is removed. |
| int _SetDoubleParameter | ( | char * | cameraID, |
| char * | paramName, | ||
| double | value | ||
| ) |
C# function: CameraStatusCode SetParameter(string cameraId, string name, double value)
Set a double parameter to a camera.
| cameraID | [in] Identifier of the camera. |
| paramName | [in] Name of the parameter as string. Parameters are listed in Parameters for Camera |
| value | [in] Value of the parameter. |
| int _SetFloatParameter | ( | char * | cameraID, |
| char * | paramName, | ||
| float | value | ||
| ) |
C# function: CameraStatusCode SetParameter(string cameraId, string name, float value)
Set a float parameter to a camera.
| cameraID | [in] Identifier of the camera. |
| paramName | [in] Name of the parameter as string. Parameters are listed in Parameters for Camera |
| value | [in] Value of the parameter. |
| int _SetIntParameter | ( | char * | cameraID, |
| char * | paramName, | ||
| int | value | ||
| ) |
C# function: CameraStatusCode SetParameter(string cameraId, string name, int value)
Set an integer parameter to a camera.
| cameraID | [in] Identifier of the camera. |
| paramName | [in] Name of the parameter as string. Parameters are listed in Parameters for Camera |
| value | [in] Value of the parameter. |
| int _SetLayerFloatParameter | ( | char * | cameraID, |
| int | layerId, | ||
| char * | paramName, | ||
| float | value | ||
| ) |
C# function: CameraStatusCode SetLayerParameter(string cameraId,int layerId, string name, float value)
Set a float parameter for a specific layer.
| cameraID | [in] Identifier of the camera. |
| layerId | [in] Id of the layer (0 = first layer). |
| paramName | [in] Name of the parameter as string. Parameters are listed in Parameters for Camera |
| value | [in] Value of the parameter. |
| int _SetLayerIntParameter | ( | char * | cameraID, |
| int | layerId, | ||
| char * | paramName, | ||
| int | value | ||
| ) |
C# function: CameraStatusCode SetLayerParameter(string cameraId, int layerId, string name, int value)
Set an integer parameter for a specific layer.
| cameraID | [in] Identifier of the camera. |
| layerId | [in] Id of the layer (0 = first layer). |
| paramName | [in] Name of the parameter as string. Parameters are listed in Parameters for Camera |
| value | [in] Value of the parameter. |
| int _SetLineCallback | ( | char * | cameraID, |
| int | layerId, | ||
| LineCallback | callback | ||
| ) |
C# function: CameraStatusCode SetLineCallback(string cameraId, int layerId, LineCallback callback)
Set a line reception callback for a camera.
| cameraID | [in] Identifier of the camera. |
| layerId | [in] Layer id. 0 is the first layer in defined sorting order. Multiple layers can be configured by calling this function multiple times. Range 0-3. |
| callback | [in] Callback method that is called whenever a line is received from the camera. 0 if callback is removed. |
| int _SetLineSortingOrder | ( | char * | cameraID, |
| int | sortingOrder | ||
| ) |
C# function: CameraStatusCode SetLineSortingOrder(string cameraId, SortingOrder sortingOrder)
Set sorting order for layers in the line callback functions.
| cameraID | [in] Identifier of the camera. |
| sortingOrder | [in] enum SurfaceSorting defines values |
| int _SetPeakDetectionParameters | ( | char * | cameraID, |
| MaterialType | type, | ||
| DetectionSensitivity | sensitivity | ||
| ) |
C# function: CameraStatusCode SetPeakDetectionParameters(string cameraId, MaterialType type, DetectionSensitivity sensitivity)
Simplified peak detection configuration based on material type. Note! Set PARAM_LAYER_MIN_THICKNESS before calling this function for transparent materials. Following parameters are set automatically PARAM_PEAK_FIR_LENGTH, PARAM_PEAK_AVERAGE_INTENSITY_FILTER_LENGTH, PARAM_SIGNAL_DETECTION_FILTER_LENGTH, PARAM_PEAK_AVER_FIR_LENGTH and PARAM_PEAK_THRESHOLD.
| cameraID | [in] Identifier for the camera, may be NULL for one camera systems. |
| type | [in] Inspected material type (MaterialType) . |
| sensitivity | [in] Sensitivity for the peak detection (DetectionSensitivity). |
| int _SetProfileCallback | ( | char * | cameraID, |
| ProfileCallback | callback | ||
| ) |
C# function: CameraStatusCode SetProfileCallback(string cameraId, ProfileCallback callback)
Set a profile reception callback for a camera.
| cameraID | [in] Identifier of the camera. |
| callback | [in] Callback method that is called whenever a profile is received from the camera. |
| int _SetRawImageCallback | ( | char * | cameraID, |
| RawImageCallback | callback | ||
| ) |
C# function: CameraStatusCode SetRawImageCallback(string cameraId, RawImageCallback callback)
Set a raw image reception callback for a camera.
| cameraID | [in] Identifier of the camera. |
| callback | [in] Callback method that is called whenever a raw image is received from the camera. |
| int _SetStringParameter | ( | char * | cameraID, |
| char * | paramName, | ||
| char * | value | ||
| ) |
C# function: CameraStatusCode SetParameter(string cameraId, string name, string value)
Set a string parameter to a camera.
| cameraID | [in] Identifier of the camera. |
| paramName | [in] Name of the parameter as string. Parameters are listed in Parameters for Camera |
| value | [in] Value of the parameter. |
| int _StartGrabbing | ( | char * | cameraID | ) |
C# function: CameraStatusCode StartGrabbing(string cameraId)
Start data receiving data from a camera.
| cameraID | [in] Identifier of the camera. |
| int _StopGrabbing | ( | char * | cameraID | ) |
C# function: CameraStatusCode StopGrabbing(string cameraId)
Stop receiving data from a camera.
| cameraID | [in] Identifier of the camera. |
| int _ZCompensationCalibrationGetStatus | ( | char * | cameraId | ) |
| void _ZCompensationCalibrationProgress | ( | char * | cameraID, |
| char * | progressBitmapFile, | ||
| double * | levelsX, | ||
| int | levelsMaxX, | ||
| int * | levelsCountX, | ||
| double * | levelsY, | ||
| int | levelsMaxY, | ||
| int * | levelsCountY | ||
| ) |
| bool _ZCompensationCalibrationRemoveLatest | ( | char * | cameraId, |
| int | direction | ||
| ) |
| bool _ZCompensationCalibrationSave | ( | char * | cameraId, |
| char * | outputFile | ||
| ) |
| int _ZCompensationCalibrationStart | ( | char * | cameraID, |
| int | direction | ||
| ) |
| void _ZCompensationCalibrationStartNewLevel | ( | char * | cameraID, |
| int | direction | ||
| ) |
| bool _ZCompensationCalibrationVisualizeCurrent | ( | char * | cameraID, |
| int | direction, | ||
| char * | darkToBrightFile, | ||
| char * | brightToDarkFile | ||
| ) |
| bool _ZCompensationCalibrationVisualizeResult | ( | char * | calibrationFile, |
| int | direction, | ||
| char * | darkToBrightFile, | ||
| char * | brightToDarkFile | ||
| ) |