LibMesaSR

Classes

struct  _CSCamera
struct  _CSData
struct  _ImgEntry
 structure used in SR_GetImageList() More...
struct  _ParamVal

Defines

#define CM_CAM_SELECT   0x0030
 #define for SR_FuncCB
#define CM_CHANGED   0x0011
 #define for SR_FuncCB
#define CM_CHANGING   0x0010
 #define for SR_FuncCB
#define CM_MSG_DISPLAY   0x0001
 #define for SR_FuncCB
#define CM_PROGRESS   0x0020
 #define for SR_FuncCB
#define CM_SRS_FILE   0x0002
 #define for SR_FuncCB
#define CP_AFFECTS_BUFFER   0x0001
 #define for SR_FuncCB
#define CP_CAM_REBOOT   0x0005
 #define for SR_FuncCB
#define CP_CONNECT   0x0004
 #define for SR_FuncCB
#define CP_CS_CLOSEDLG   0x0005
 #define for SR_FuncCB
#define CP_CS_OPENDLG   0x0000
 #define for SR_FuncCB
#define CP_DONE   0x0006
 #define for SR_FuncCB
#define CP_FIND_DONE   0x0003
 #define for SR_FuncCB
#define CP_FLASH_ERASE   0x0001
 #define for SR_FuncCB
#define CP_FLASH_READ   0x0003
 #define for SR_FuncCB
#define CP_FLASH_WRITE   0x0002
 #define for SR_FuncCB
#define CP_FOUND_CAM   0x0002
 #define for SR_FuncCB
#define CP_FPGA_BOOT   0x0004
 #define for SR_FuncCB
#define CP_GET_FILENAME   0x0006
 #define for SR_FuncCB
#define CP_SCAN_CAM   0x0001
 #define for SR_FuncCB
#define CP_SRS_EOF   0x0001
 #define for SR_FuncCB
#define CP_SRS_FRAMEPOS   0x0002
 #define for SR_FuncCB
#define CP_UNKNOWN   0x0000
 #define for SR_FuncCB

Typedefs

typedef struct _CSCamera CSCamera
typedef struct _CSData CSData
typedef struct _ImgEntry ImgEntry
 structure used in SR_GetImageList()
typedef struct _ParamVal ParamVal
 typedef struct _ParamVal
typedef int( SR_FuncCB )(SRCAM srCam, unsigned int msg, unsigned int param, void *data)
typedef struct _CMesaDevice * SRCAM
 handle to camera

Enumerations

enum  AcquireMode {
  AM_COR_FIX_PTRN = 0x01, AM_MEDIAN = 0x04, AM_TOGGLE_FRQ = 0x08, AM_CONV_GRAY = 0x10,
  AM_SW_ANF = 0x20, AM_RESERVED0 = 0x40, AM_RESERVED1 = 0x80, AM_CONF_MAP = 0x0100,
  AM_HW_TRIGGER = 0x0200, AM_SW_TRIGGER = 0x0400, AM_DENOISE_ANF = 0x0800, AM_MEDIANCROSS = 0x1000
}
enum  FSCmd { FS_JMP_FRAME_REL, FS_JMP_FRAME_BEGIN, FS_JMP_FRAME_END, FS_GET_NUM_FRAME }
 

Switches to jump/setup the reading of srs streams.

More...
enum  IPBArg {
  IPB_SETUP_GUI, IPB_SETUP_CONV, IPB_SETUP_BINARIZE, IPB_HISTOGRAM,
  IPB_CONV0, IPB_CONV1, IPB_IN_THRESHOLD_MIN, IPB_IN_THRESHOLD_MAX,
  IPB_OUT_THRESHOLD_MIN, IPB_OUT_THRESHOLD_MAX
}
enum  IPBinatizeSetup { IPBS_BINARIZE_IN = 0x01, IPBS_BINARIZE_OUT = 0x02 }
enum  IPConvSetup {
  IPCS_SRC_DIST = 0x00, IPCS_SRC_AMPL = 0x80, IPCS_OPP_ADD = 0x00, IPCS_OPP_SUB = 0x20,
  IPCS_OPP_ABS = 0x10
}
enum  ModulationFrq {
  MF_40MHz = 0, MF_30MHz, MF_21MHz, MF_20MHz,
  MF_19MHz, MF_60MHz, MF_15MHz, MF_10MHz,
  MF_29MHz, MF_31MHz, MF_14_5MHz, MF_15_5MHz,
  MF_LAST
}
enum  SRMsgCategory {
  MC_GENERAL = 0x0000, MC_DLL_FUNC = 0x0100, MC_CAM = 0x0200, MC_USB = 0x0300,
  MC_CONFIG = 0x0400, MC_FIRMWARE = 0x0500, MC_XML = 0x0600, MC_CAM_DLG = 0x0700,
  MC_HTTP = 0x0800, MC_ETH = 0x0900, MC_RESERVED = 0x0a00, MC_FILEIO = 0x0b00,
  MC_B_GIG_E = 0x0c00
}
 

Message Category: enum for function SR_FuncCB with message type CM_MSG_DISPLAY.

More...
enum  SRMsgKind { MK_DEBUG_STRING = 0x00, MK_BOX_INFO = 0x01, MK_BOX_WARN = 0x02, MK_BOX_ERR = 0x03 }
 

Message Kind: enum for function SR_FuncCB with message type CM_MSG_DISPLAY.

More...

Functions

 SR_API (enum ModulationFrq) SR_GetModulationFrequency(SRCAM srCam)
 SR_API (void *) SR_GetImage(SRCAM srCam
 SR_API (unsigned int) SR_GetRows(SRCAM srCam)
 returns the number of rows the camera will deliver
 SR_API (void) SR_SetTimeout(SRCAM srCam
 SR_API (SR_FuncCB *) SR_SetCallback(SR_FuncCB *cb)
 SR_API (int) SR_GetVersion(unsigned short version[4])
 returns the version of this libMesaSR library.

Variables

const char * addr
char * buf
char int buflen
unsigned char unsigned char
unsigned char unsigned char 
desiredPos
unsigned short distOfs
const unsigned char const
unsigned char const unsigned
short * 
iDst
unsigned char idx
ImgEntry ** imgEntryArray
unsigned int DWORD inAddr
unsigned int DWORD DWORD inMask
unsigned char intTime
 IPBArg
const unsigned char * iX
const unsigned char const
unsigned char * 
iY
unsigned char unsigned char maxIntTime
unsigned char minIntTime
int mode
enum ModulationFrq modFrq
int ms
const unsigned char const
unsigned char const unsigned
short short short unsigned
short int 
num
unsigned int numSrCam
const unsigned char const
unsigned char const unsigned
short short * 
oX
const unsigned char const
unsigned char const unsigned
short short short * 
oY
const unsigned char const
unsigned char const unsigned
short short short unsigned
short * 
oZ
int HWND parent
unsigned char unsigned char
unsigned char 
percentOverPos
short short unsigned short int pitchX
short short unsigned short int int pitchY
short short unsigned short int
int int 
pitchZ
unsigned char reg
unsigned int serialNumber
unsigned short val
short * x
short short * y
short short unsigned short * z

Define Documentation

#define CM_CAM_SELECT   0x0030

#define for SR_FuncCB

Definition at line 240 of file definesSR.h.

#define CM_CHANGED   0x0011

#define for SR_FuncCB

Definition at line 224 of file definesSR.h.

#define CM_CHANGING   0x0010

#define for SR_FuncCB

Definition at line 223 of file definesSR.h.

#define CM_MSG_DISPLAY   0x0001

#define for SR_FuncCB

Definition at line 216 of file definesSR.h.

#define CM_PROGRESS   0x0020

#define for SR_FuncCB

Definition at line 228 of file definesSR.h.

#define CM_SRS_FILE   0x0002

#define for SR_FuncCB

Definition at line 218 of file definesSR.h.

#define CP_AFFECTS_BUFFER   0x0001

#define for SR_FuncCB

Definition at line 226 of file definesSR.h.

#define CP_CAM_REBOOT   0x0005

#define for SR_FuncCB

Definition at line 235 of file definesSR.h.

#define CP_CONNECT   0x0004

#define for SR_FuncCB

Definition at line 246 of file definesSR.h.

#define CP_CS_CLOSEDLG   0x0005

#define for SR_FuncCB

Definition at line 247 of file definesSR.h.

#define CP_CS_OPENDLG   0x0000

#define for SR_FuncCB

Definition at line 242 of file definesSR.h.

#define CP_DONE   0x0006

#define for SR_FuncCB

Definition at line 236 of file definesSR.h.

#define CP_FIND_DONE   0x0003

#define for SR_FuncCB

Definition at line 245 of file definesSR.h.

#define CP_FLASH_ERASE   0x0001

#define for SR_FuncCB

Definition at line 231 of file definesSR.h.

#define CP_FLASH_READ   0x0003

#define for SR_FuncCB

Definition at line 233 of file definesSR.h.

#define CP_FLASH_WRITE   0x0002

#define for SR_FuncCB

Definition at line 232 of file definesSR.h.

#define CP_FOUND_CAM   0x0002

#define for SR_FuncCB

Definition at line 244 of file definesSR.h.

#define CP_FPGA_BOOT   0x0004

#define for SR_FuncCB

Definition at line 234 of file definesSR.h.

#define CP_GET_FILENAME   0x0006

#define for SR_FuncCB

Definition at line 248 of file definesSR.h.

#define CP_SCAN_CAM   0x0001

#define for SR_FuncCB

Definition at line 243 of file definesSR.h.

#define CP_SRS_EOF   0x0001

#define for SR_FuncCB

Definition at line 220 of file definesSR.h.

#define CP_SRS_FRAMEPOS   0x0002

#define for SR_FuncCB

Definition at line 221 of file definesSR.h.

#define CP_UNKNOWN   0x0000

#define for SR_FuncCB

Definition at line 230 of file definesSR.h.


Typedef Documentation

typedef struct _CSCamera CSCamera
typedef struct _CSData CSData
typedef struct _ImgEntry ImgEntry

structure used in SR_GetImageList()

typedef struct _ImgEntry

typedef struct _ParamVal ParamVal

typedef struct _ParamVal

Enum and struct used in the function SR_SetParam() {structure}

typedef int( SR_FuncCB)(SRCAM srCam, unsigned int msg, unsigned int param, void *data)

function type used in SR_SetCallback()

Parameters:
funcData is the user data pointer that was set with SR_SetCallback.
msg is the received message of type CM_XXX as listed below
param is a message specific parameter as listed below
data is a message specific pointer as listed below

defines used for the callback function SR_SetCallback() are:


message: CM_CHANGING and CM_CHANGED
CM_CHANGING is sent before modification of register values or filtering functions
CM_CHANGED is sent after modification of register values or filtering functions
parameters:
CP_AFFECTS_BUFFER is set if the buffer and therefore the images pointers will change or changed
data:
no meaning

message: CM_MSG_DISPLAY
CM_MSG_DISPLAY is sent to display a message
parameters:
the param is a kind ored with a category: SRMsgKind|SRMsgCategory.
the default handling will display Messages as followed:
  • MK_DEBUG_STRING OutputDebugString
  • MK_BOX_INFO open a ASTERISK MessageBox
  • MK_BOX_WARN open a WARNING MessageBox
  • MK_BOX_ERR open a HAND MessageBox
data:
the data is a pointer to the string to display

message: CM_PROGRESS
CM_PROGRESS is sent to display a progress bar window. the default handling will open a window with a progress bar and close this window on the param CP_DONE.
parameters:
the param split in a LOWORD and HIWORD part.
  • LOWORD: indicates that type of progress message. E.g. CP_FLASH_ERASE means that the flash is beeing erased..
  • HIWORD: indicates the percentage (0-100) of the grogress.

Definition at line 213 of file definesSR.h.

typedef struct _CMesaDevice* SRCAM

handle to camera

Definition at line 170 of file definesSR.h.


Enumeration Type Documentation

Enum used in the function SR_SetMode() The suggested default settings are:

  • SR2,SR3k: AM_COR_FIX_PTRN|AM_MEDIAN
  • SR4k: AM_COR_FIX_PTRN|AM_CONV_GRAY|AM_DENOISE_ANF These modes are explained in more detail in the User Manual.
    Warning:
    Some enumerations are for internal usage only and are not recommended for general use.
Enumerator:
AM_COR_FIX_PTRN 

turns on fix pattern noise correction this should always be enabled for good distance measurement

AM_MEDIAN 

turns on a 3x3 median filter

AM_TOGGLE_FRQ 

For sr3k: toggles each frame from 19 to 21 MHz {mode}.

AM_CONV_GRAY 

Converts the amplitude image by multiplying by the square of the distance, resulting in image more like a conventional camera.

AM_SW_ANF 

Turns on the 7x7 software adaptive neighborhood filter {mode}.

AM_RESERVED0 

was AM_SR3K_2TAP_PROC {mode}

AM_RESERVED1 

was AM_SHORT_RANGE For sr4k: this flag results in more precise coordinate transformations for small distances(<1m) works only for SR_CoordTrfFlt()

AM_CONF_MAP 

For sr4k: process a confidencemap. this map is accesssible with SR_GetImageList.

AM_HW_TRIGGER 

For sr4k: Acquisition starts, when a Hardware Trigger is received (AM_SW_TRIGGER must also be set).

AM_SW_TRIGGER 

For sr4k: Light source is only turned on, when an image is requested.

AM_DENOISE_ANF 

For sr4k: Turns on the 5x5 hardware adaptive neighborhood filter.

AM_MEDIANCROSS 

turns on a 3x3 cross-median filter (5 values) {mode}

Definition at line 47 of file definesSR.h.

enum FSCmd

Switches to jump/setup the reading of srs streams.

Enumerator:
FS_JMP_FRAME_REL 

jump to frame relative to current position

FS_JMP_FRAME_BEGIN 

jump to n-th frame from the begin of the stream

FS_JMP_FRAME_END 

jump to n-th frame from the end of the stream (Forces to read the whole file)

FS_GET_NUM_FRAME 

gets the number of frames in the stream

Definition at line 110 of file definesSR.h.

enum IPBArg

Argument for image processing block.

ImgProcBlk.png

samples:

   SR_SetImgProcBlk(dev,IPB_HISTOGRAM,1);
   SR_SetImgProcBlk(dev,IPB_IN_THRESHOLD_MIN,12000);
   char kernel[25]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24};
   SR_SetImgProcBlk(dev,IPB_CONV0,kernel);
   
See also:
SR_SetImgProcBlk
Warning:
{mode}
Enumerator:
IPB_SETUP_GUI 

Opens a GUI for configuration (Only Windows).

IPB_SETUP_CONV 

convolution switches. See also: IPConvSetup

IPB_SETUP_BINARIZE 

Binatize switches. See also: IPBinatizeSetup.

IPB_HISTOGRAM 

histrogram in last line (on/off). Followed by a uchar with value 0 or 1

IPB_CONV0 

Convolution kernel 0. Followed by a char[25] with the kernel values.

IPB_CONV1 

Convolution kernel 1. Followed by a char[25] with the kernel values.

IPB_IN_THRESHOLD_MIN 

Input minimal threshold value. followed by a ushort value.

IPB_IN_THRESHOLD_MAX 

Input minimal threshold value. followed by a ushort value.

IPB_OUT_THRESHOLD_MIN 

Input minimal threshold value. followed by a ushort value.

IPB_OUT_THRESHOLD_MAX 

Input minimal threshold value. followed by a ushort value.

Definition at line 73 of file definesSR.h.

Switches for binarization blocks. Uned in combination with IPB_SETUP_BINARIZE sample: SR_SetImgProcBlk(dev,IPB_SETUP_BINARIZE,IPBS_BINARIZE_IN|IPBS_BINARIZE_OUT); SR_SetImgProcBlk(dev,IPB_SETUP_BINARIZE,0); value is: Ored IPBinatizeSetup.

Enumerator:
IPBS_BINARIZE_IN 

input binarization (ON/OFF)

IPBS_BINARIZE_OUT 

output binarization (ON/OFF)

Definition at line 104 of file definesSR.h.

Switches for convolution block. Uned in combination with IPB_SETUP_CONV sample: SR_SetImgProcBlk(dev,IPB_SETUP_CONV,(IPCS_SRC_DIST|IPCS_OPP_ADD|IPCS_OPP_ABS)+sensitivity); value is: (Ored IPConvSetup) + sensitivity. sensitivity may have a value from 0 to 16

Enumerator:
IPCS_SRC_DIST 

source selector distance or amplitude

IPCS_SRC_AMPL 

"

IPCS_OPP_ADD 

kernel combination operation

IPCS_OPP_SUB 

"

IPCS_OPP_ABS 

absolute value (on/off)

Definition at line 91 of file definesSR.h.

Modulation frequency for function SR_SetModulationFrequency()

Warning:
some frequencies are only for internal usage and not released for customer.
Enumerator:
MF_40MHz 

SR3k: maximal range 3.75m.

MF_30MHz 

SR3k, SR4k: maximal range 5m.

MF_21MHz 

SR3k: maximal range 7.14m.

MF_20MHz 

SR3k: maximal range 7.5m.

MF_19MHz 

SR3k: maximal range 7.89m.

MF_60MHz 

SR4k: maximal range 2.5m {frequency}.

MF_15MHz 

SR4k: maximal range 10m {frequency}.

MF_10MHz 

SR4k: maximal range 15m {frequency}.

MF_29MHz 

SR4k: maximal range 5.17m.

MF_31MHz 

SR4k: maximal range 4.84m.

MF_14_5MHz 

SR4k: maximal range 10.34m {frequency}.

MF_15_5MHz 

SR4k: maximal range 9.68m {frequency}.

MF_LAST 

Definition at line 27 of file definesSR.h.

Message Category: enum for function SR_FuncCB with message type CM_MSG_DISPLAY.

Enumerator:
MC_GENERAL 

general category

MC_DLL_FUNC 

DllMain,DllFunction messages.

MC_CAM 

Camera, USB Info messages.

MC_USB 

USB messages -> is logged to NIL because it slowed down the frame rate!

MC_CONFIG 

configuration messages (open, read registry etc.)

MC_FIRMWARE 

Firmware upload messages.

MC_XML 

XML messages.

MC_CAM_DLG 

A CDlgCamSettings messages.

MC_HTTP 

HTTP messages.

MC_ETH 

Ethernet messages.

MC_RESERVED 

was MC_1394: Baumer Firewire messages

MC_FILEIO 

File IO messages.

MC_B_GIG_E 

Baumer GigE messages.

Definition at line 285 of file definesSR.h.

enum SRMsgKind

Message Kind: enum for function SR_FuncCB with message type CM_MSG_DISPLAY.

Enumerator:
MK_DEBUG_STRING 

OutputDebugString.

MK_BOX_INFO 

MessageBox ASTERISK.

MK_BOX_WARN 

MessageBox WARNING.

MK_BOX_ERR 

MessageBox HAND.

Definition at line 276 of file definesSR.h.


Function Documentation

SR_API ( enum  ModulationFrq  ) 

Gets the modulation frequency of the LEDs. This determins the measurement range.

See also:
SR_SetModulationFrequency(), ModulationFrq
SR_API ( void *   ) 

Returns the pointer to the idx-th image. The idx has a value from 0 to SR_GetImageList()-1. Details about which image contains what kind of data can be extracted with SR_GetImageList() Usually index is 0 for distance image and 1 for amplitude image

See also:
SR_GetRows(), SR_GetCols(), SR_GetImageList(), _ImgEntry::ImgType
SR_API ( unsigned  int  ) 

returns the number of rows the camera will deliver

Returns the serial number (if existing) of the camera.

returns the number of columns the camera will deliver

Gets the Integration time of the camera The intTime is a value from 0 to 255. The integration time in ms depends on the camera

See also:
SR_SetIntegrationTime()

Gets the Amplitude Threshold of the camera

See also:
SR_SetAmplitudeThreshold()

Gets the Distance Offset. This function should only be used on SR2 cameras. On newer cameras the distance offset correction is handeled with a camera specific calibration file.

See also:
SR_SetDistanceOffset()

Returns a desired register value of the camera.

See also:
SR_SetReg()
SR_API ( void   ) 

sets the timeout in ms. This timeout is used at reading and writing on USB or Ethernet port. Any function which communicates with the camera will fail if it exeeds the timeout.

SR_API ( SR_FuncCB  ) 

SR_SetCallback() can set a user callback function of type SR_FuncCB that is called on special events. Such special events can be:

  • image buffers will be/have been changed.
  • a message should be displayed to the user
  • a register or buffer changes in the camera dialog box
  • etc. (for a list of all events look at SR_FuncCB) This allows the main program to reallocate image pointers and enter e.g. critical sections to avoid access of freed buffers.
Returns:
this function returns the previous function pointer. This gives the possibility to forward not handled message to the default handling
See also:
SR_FuncCB, SR_GetDefaultCallback()
Returns:
the default callback function. This gives the possibility to forward unhandled message to the API default handling function.
See also:
SR_FuncCB, SR_SetCallback()
SR_API ( int   ) 

returns the version of this libMesaSR library.

Generic Open for any kind of camera. This opens a dialog box and lists all available USB and Ethernet swissranger Cameras. One of them can be selected and opened. A reference of the most recently connected camera is stored in the registry. The mode is used to select how the dialog is handled.

the mode is used to select how the dialog is handled
the mode bits are:

  • 0 use registry if existing: tries to open the same device as last time
  • 1 open dialog
  • 2 open without configuration (internal usage only)

so following modes make sense:

  • 1 use registry, if it failed error is returned, no GUI opened
  • 2 always open dialog
  • 3 use registry, if it failed open the GUI dialog

The parent is a HWND window handle.

Returns:
the return value is the number of opened cameras: therefore <=0 means FAILED.

Seeks for all visible devices and opens them all. the caller gives a srCam array with size num.
{function}

Returns:
the return value is the number of opened cameras: therefore <=0 means FAILED.

Opens the Swissranger USB device and returns a device ID. The serial number is only used, if more than one camera is connected to the computer.
Setting the serialNumber to 0 opens the first found camera To open a specific camera, serialNumber is set to the last 8 digits of the printed serial number, as a hexadecimal value, e.g. 0x4000002f for the camera SN: 00-00-40-00-00-2F.

Returns:
the return value is the number of opened cameras: therefore <=0 means FAILED.

Opens the Swissranger Ethernet device and returns a device ID. The addr is the ip address of the camera. e.g. "192.168.2.14"

Returns:
the return value is the number of opened cameras: therefore <=0 means FAILED.

Opens a dialog which allows control of important camera settings. The parent is an HWND. The parent is a HWND. The Window is Non Modal and will be destroyed if it is closed or if the camera is closed.

Closes the swissranger device, first releasing the claimed interface.

Parameters:
srCam a valid device returned by the SR_Open() function.
Returns:
a negative number in case of error. 0 success -1 wrong device -2 can't release interface -3 can't close device

The mode controls a number of characteristics of the image acquisition process, as described in the enumeration AcquireMode. The mode is an ored value of the enumerator AcquireMode. The recommended mode is described in AcquireMode.

Returns the current mode setting. It is an ored value of the enumerator AcquireMode.

See also:
SR_SetMode

SR_Acquire() triggers image acquisition on the camera and transfers the data from the camera to the PC. The acquired images can be retrieved with SR_GetImage(). After this function normally the spherical coordinates are transformed to cartesian coordinates. for that purpose use one of the following functions:
SR_CoordTrfUint16(), SR_CoordTrfFlt(),SR_CoordTrfDbl()
The AcquisitionMode can be set with the function SR_SetMode().

Returns:
the number of transfered bytes or a negative number if failed
See also:
SR_GetImageList()

Transforms spherical coordinates to cartesian coordinates. The pointers x,y,z are unsigned short arrays of the length SR_GetRows() * SR_GetCols(). The result values are in mm. The pitches is the distance in byte from one value to the next. Default value is sizeof(unsigned short)=2

See also:
SR_CoordTrfFlt(),coordTrf

Transforms spherical coordinates to cartesian coordinates. The pointers x,y,z are float arrays of the length SR_GetRows() * SR_GetCols(). The result values are in m. The pitches is the distance in byte from one value to the next. Default value is sizeof(float)=4

See also:
coordTrf

Transforms spherical coordinates to cartesian coordinates. The pointers x,y,z are double arrays of the length SR_GetRows() * SR_GetCols(). The result values are in m. The pitches is the distance in byte from one value to the next. Default value is sizeof(double)=8 This function is not more precise than SR_CoordTrfFlt(), but can be useful, if double values are used.

See also:
SR_CoordTrfFlt(), coordTrf

Transforms spherical coordinates to cartesian coordinates. All pointers are arrays with the length num. The pointers iX,iY,iDst are input pixel coordinates and distance value. The pointers oX,oY,oZ are output cartesian coordinates.

See also:
SR_CoordTrfPntFlt(), coordTrf

Returns a identification string of the device: The string is formated as:

   "VendorID:0x%04x, ProductID:0x%04x, Manufacturer:'%s', Product:'%s'" e.g.:
   VendorID:0x0852, ProductID:0x0071, Manufacturer:'CSEM SA', Product:'3D-SR2 16Bit'
   

Returns the number of images available and a pointer to an imgEntryArray. Images may be accessed directly by the data member of the ImEntry elements, or using SR_GetImage() with the corresponding array index.

See also:
SR_GetRows(), SR_GetCols(), SR_GetImage()

Sets the Integration time of the camera The intTime is a value from 0 to 255. The integration time in ms depends on the camera:

SR2A intTime*0.256 ms
SR2B,SR3k (intTime+1)*0.200 ms
SR4k 0.300ms+(intTime)*0.100 ms
See also:
SR_GetIntegrationTime()

Sets the Amplitude Threshold of the camera. The default amplitude threshold is 0. Setting this value will set all distance values to 0 if their amplitude is lower than the amplitude threshold

See also:
SR_GetAmplitudeThreshold()

Sets the modulation frequency of the LEDs. This also changes the full-scale (0xFFFF) measurement range of the raw distance.
The supported frequencies depend on the camera.
A table of the supported frequency is listed in ModulationFrq .
SR_SetModulationFrequency allows simultaneous operation of multiple cameras without interference by using different frequencies, e.g. using 29, 30 and 31MHz.

Returns:
this function returns:
  • 0 if the frequency change was successful.
  • a negative value if it failed.
See also:
SR_GetModulationFrequency(), ModulationFrq

Sets the Distance Offset. This function should only be used on SR2 cameras. On newer cameras the distance offset correction is handeled with a camera specific calibration file.

See also:
SR_GetDistanceOffset()

Turns the AutoExposure on/off and set the desired parameters. if minIntTime=0xff the AutoExposure is turned off.
good values are:

  • for SR3k: 5,255,10,45
  • for SR4k: 1,150,5,70 The function sets the integration time to a value between minIntTime and maxIntTime.
    Therefore a special position is searched in the intensity histogram (reduced from 16bit to 8bit) described as percentOverPos.
    autoillum.png
    percentOverPos (values 0-100) is the x-position of the histogram where percentOverPos percent of the points are above. The integration time is adapted slowly to move this position to the desiredPos(value 0-255)intensity value. In case of background light saturation saturation the histogram is not a linear function. This can lead to an instable, swinging system, if there are strong background light in the image.

Sets a desired register value of the camera. The register values are given to the customer only for special usages.

Parameters:
srCam a valid device id returned by the SR_Open() function.
reg the register of the descriptor to write to.
val the value to send to the given descriptor.
Returns:
the number of bytes sent to the camera, which should be 2, or a negative number if an error occurs. -1 wrong device -2 error in request frame (usb_bulk_write)
See also:
SR_GetReg()
Warning:
This must not be used without explicit instructions from Mesa-Imaging

Setup the image processing block.

Warning:
{function}
See also:
IPBArg

Same as SR_SetImgProcBlk with variable arguments pointer.

Warning:
{function}
See also:
SR_SetImgProcBlk()

Variable Documentation

const char* addr

Definition at line 132 of file libMesaSR.h.

char* buf

Definition at line 233 of file libMesaSR.h.

char int buflen

Definition at line 233 of file libMesaSR.h.

unsigned char unsigned char unsigned char unsigned char desiredPos

Definition at line 325 of file libMesaSR.h.

unsigned short distOfs

Definition at line 306 of file libMesaSR.h.

const unsigned char const unsigned char const unsigned short * iDst

Definition at line 201 of file libMesaSR.h.

unsigned char idx

Definition at line 249 of file libMesaSR.h.

Definition at line 254 of file libMesaSR.h.

unsigned int DWORD inAddr

Definition at line 119 of file libMesaSR.h.

unsigned int DWORD DWORD inMask

Definition at line 119 of file libMesaSR.h.

unsigned char intTime

Definition at line 267 of file libMesaSR.h.

Definition at line 351 of file libMesaSR.h.

const unsigned char * iX

Definition at line 201 of file libMesaSR.h.

const unsigned char const unsigned char * iY

Definition at line 201 of file libMesaSR.h.

unsigned char unsigned char maxIntTime

Definition at line 325 of file libMesaSR.h.

unsigned char minIntTime

Definition at line 325 of file libMesaSR.h.

int mode

Definition at line 113 of file libMesaSR.h.

Definition at line 297 of file libMesaSR.h.

int ms

Definition at line 237 of file libMesaSR.h.

const unsigned char const unsigned char const unsigned short float float float int num

Definition at line 201 of file libMesaSR.h.

unsigned int numSrCam

Definition at line 119 of file libMesaSR.h.

const unsigned char const unsigned char const unsigned short float * oX

Definition at line 201 of file libMesaSR.h.

const unsigned char const unsigned char const unsigned short float float * oY

Definition at line 201 of file libMesaSR.h.

const unsigned char const unsigned char const unsigned short float float float * oZ

Definition at line 201 of file libMesaSR.h.

Definition at line 113 of file libMesaSR.h.

unsigned char unsigned char unsigned char percentOverPos

Definition at line 325 of file libMesaSR.h.

double double double int pitchX

Definition at line 179 of file libMesaSR.h.

double double double int int pitchY

Definition at line 179 of file libMesaSR.h.

double double double int int int pitchZ

Definition at line 179 of file libMesaSR.h.

unsigned char reg

Definition at line 339 of file libMesaSR.h.

unsigned int serialNumber

Definition at line 127 of file libMesaSR.h.

unsigned char unsigned char val

Definition at line 279 of file libMesaSR.h.

double * x

Definition at line 179 of file libMesaSR.h.

double double * y

Definition at line 179 of file libMesaSR.h.

double double double * z

Definition at line 179 of file libMesaSR.h.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines


libmesasr
Author(s): Florian Weisshardt
autogenerated on Fri Jan 11 09:12:16 2013