Copyright © 2000, 2006 Integrated Design Tools, Inc. sshhaarrppVVIISSIIOONN™™ SSDDKK RReeffeerreennccee MMaannuuaall SSooffttwwaarree DDeevvee
sharpVISION™ Camera sharpVISION™ SDK Reference 10 2.3. Enumerate/Open a camera To get the list of available cameras, call SvEnumCameras. Use the came
sharpVISION™ Camera sharpVISION™ SDK Reference 100 7.4.2. IdtSvStartAcquire [nResult] = sharpML (‘IdtSvStartAcquire’, nCameraId) Inputs nCameraId Spe
sharpVISION™ Camera sharpVISION™ VISION SDK 101 7.4.3. IdtSvAcquire [nResult, image] = sharpML (‘IdtSvAcquire’, nCameraId) Inputs nCameraId Specifies
sharpVISION™ Camera sharpVISION™ SDK Reference 102 7.4.4. IdtSvImageIsReady [nResult, nIsReady] = sharpML (‘IdtSvImageIsReady’, nCameraId) Inputs nC
sharpVISION™ Camera sharpVISION™ VISION SDK 103 7.4.5. IdtSvStopAcquire [nResult] = sharpML (‘IdtSvStopAcquire’, nCameraId) Inputs nCameraId Specifie
sharpVISION™ Camera sharpVISION™ SDK Reference 104 7.5. How to use the Interface functions 7.5.1. Opening and closing a camera A camera must be open
sharpVISION™ Camera sharpVISION™ VISION SDK 105 7.6. Examples 7.6.1. IdtSvEnumEx This example shows how to obtain the list of all available cameras. 7
sharpVISION™ Camera sharpVISION™ SDK Reference 106 88.. AAppppeennddiixx 8.1. Appendix A - Return Codes The following table shows the values of the
sharpVISION™ Camera sharpVISION™ VISION SDK 107 8.2. Appendix B – Information Parameters The following table shows the values and a brief description
sharpVISION™ Camera sharpVISION™ SDK Reference 108 8.3. Appendix C – Camera Settings The following table shows the values and a brief description of
sharpVISION™ Camera sharpVISION™ VISION SDK 109 8.4. Appendix D – Data types This appendix describes the data types defined in the SharpAPI.h header f
sharpVISION™ Camera sharpVISION™ VISION SDK 11 2.4. Configuring a camera The camera state is represented by the opaque SV_SETTINGS structure. You can
sharpVISION™ Camera sharpVISION™ SDK Reference 110 SV_TM_SOFTWARE: exposure starts on software trigger. 8.4.5. SV_BINNING The SV_BINNING enumerates t
sharpVISION™ Camera sharpVISION™ VISION SDK 111 8.4.10. SV_INFO The SV_INFO enumerates the camera information index. See Appendix B. 8.4.11. SV_PARAM
sharpVISION™ Camera sharpVISION™ SDK Reference 112 8.5. Appendix E – Structures This appendix describes the structures defined in the SharpAPI.h head
sharpVISION™ Camera sharpVISION™ VISION SDK 113 8.5.2. SV_ENUMITEM The SV_ENUMITEM structure contains information about a camera. It must be used in t
sharpVISION™ Camera sharpVISION™ SDK Reference 114 8.5.3. SV_FRAME The SV_FRAME structure contains information about the image frame to be grabbed. I
sharpVISION™ Camera sharpVISION™ VISION SDK 115 frameNumber Specifies the rolling frame number. reserved Reserved for future use errorCode Specifies t
sharpVISION™ Camera sharpVISION™ SDK Reference 116 8.5.4. SV_AsyncCallback The SV_AsyncCallback is the prototype of the callback function passed to t
sharpVISION™ Camera sharpVISION™ SDK Reference 12 2.5. Synchronous Streaming Data Grab To grab an image from steaming data, you need to allocate an i
sharpVISION™ Camera sharpVISION™ VISION SDK 13 2.6. Asynchronous Streaming Data Grab An asynchronous grab function is available: SvQueueOneFrame. Many
sharpVISION™ Camera sharpVISION™ SDK Reference 14 2.8. Binning Binning is the process of combining adjacent pixels of the sensor during readout. The
sharpVISION™ Camera sharpVISION™ VISION SDK 15 2.9. Read-out Speed and Pixel Format The maximum readout speed depends on bit depth, although this rest
sharpVISION™ Camera sharpVISION™ SDK Reference 16 2.10. Region of Interest (ROI) Different camera models have different behaviors: 1300-DE: ROI bound
sharpVISION™ Camera sharpVISION™ VISION SDK 17 33.. sshhaarrppVVIISSIIOONN™™ SSDDKK RReeffeerreennccee 3.1. Initialization Functions 3.1.1. Overvi
sharpVISION™ Camera sharpVISION™ SDK Reference 18 3.1.2. SvGetVersion SV_ERROR SvGetVersion( unsigned short *pVerMajor, unsigned short *pVerMinor , i
sharpVISION™ Camera sharpVISION™ VISION SDK 19 3.1.3. SvLoadDriver SV_ERROR SvLoadDriver( void ) Return values SVC_SUCCESS if successful, otherwise SV
sharpVISION™ Camera sharpVISION™ SDK Reference 2 SDK Release 2.07 Document Revision October 2006 Products Information http://www.id
sharpVISION™ Camera sharpVISION™ SDK Reference 20 3.1.4. SvUnloadDriver void SvUnloadDriver( void ) Return values None Parameters None Remarks This f
sharpVISION™ Camera sharpVISION™ VISION SDK 21 3.1.5. SvEnumCameras SV_ERROR SvEnumCameras( PSV_ENUMITEM pItemList, unsigned long *pItemNr ) Return va
sharpVISION™ Camera sharpVISION™ SDK Reference 22 3.1.6. SvOpenCamera SV_ERROR SvOpenCamera( unsigned long cameraId, SV_HANDLE* pHandle ) Return valu
sharpVISION™ Camera sharpVISION™ VISION SDK 23 3.1.7. SvCloseCamera SV_ERROR SvCloseCamera( SV_HANDLE hCamera ) Return values SVC_SUCCESS if successfu
sharpVISION™ Camera sharpVISION™ SDK Reference 24 3.2. Configuration Functions 3.2.1. Overview: Configuration functions The configuration functions a
sharpVISION™ Camera sharpVISION™ VISION SDK 25 3.2.2. SvGetCameraInfo SV_ERROR SvGetCameraInfo( SV_HANDLE hCamera, SV_INFO infoKey, unsigned long *pVa
sharpVISION™ Camera sharpVISION™ SDK Reference 26 3.2.3. SvReadDefaultSettings SV_ERROR SvReadDefaultSettings( SV_HANDLE hCamera, PSV_SETTINGS pSetti
sharpVISION™ Camera sharpVISION™ VISION SDK 27 3.2.4. SvReadCameraSettings SV_ERROR SvReadCameraSettings ( SV_HANDLE hCamera, PSV_SETTINGS pSettings )
sharpVISION™ Camera sharpVISION™ SDK Reference 28 3.2.5. SvSendCameraSettings SV_ERROR SvSendCameraSettings ( SV_HANDLE hCamera, PSV_SETTINGS pSettin
sharpVISION™ Camera sharpVISION™ VISION SDK 29 3.2.6. SvQueueCameraSettings SV_ERROR SvQueueCameraSettings ( SV_HANDLE hCamera, PSV_SETTINGS pSettings
sharpVISION™ Camera sharpVISION™ VISION SDK 3 Table of Contents 1. OVERVIEW...
sharpVISION™ Camera sharpVISION™ SDK Reference 30 3.2.7. SvSetParameter SV_ERROR SvSetParameter ( PSV_SETTINGS pSettings, SV_PARAM paramKey, unsigned
sharpVISION™ Camera sharpVISION™ VISION SDK 31 3.2.8. SvGetParameter SV_ERROR SvGetParameter( PSV_SETTINGS pSettings, SV_PARAM paramKey, unsigned long
sharpVISION™ Camera sharpVISION™ SDK Reference 32 3.2.9. SvGetParameterMin SV_ERROR SvGetParameterMin( PSV_SETTINGS pSettings, SV_PARAM paramKey, uns
sharpVISION™ Camera sharpVISION™ VISION SDK 33 3.2.10. SvGetParameterMax SV_ERROR SvGetParameterMax( PSV_SETTINGS pSettings, SV_PARAM paramKey, unsign
sharpVISION™ Camera sharpVISION™ SDK Reference 34 3.2.11. SvEnableStreaming SV_ERROR SvEnableStreaming( SV_HANDLE hCamera, unsigned long bEnable ) Re
sharpVISION™ Camera sharpVISION™ VISION SDK 35 3.3. Grab Functions 3.3.1. Overview: Grab functions Grab functions allow the user to capture streamed d
sharpVISION™ Camera sharpVISION™ SDK Reference 36 3.3.2. SvGrabOneFrame SV_ERROR SvGrabOneFrame( SV_HANDLE hCamera, PSV_FRAME pFrame ) Return values
sharpVISION™ Camera sharpVISION™ VISION SDK 37 3.3.3. SvQueueOneFrame SV_ERROR SvQueueOneFrame(SV_HANDLE hCamera, PSV_FRAME pFrame, SV_AsyncCallback
sharpVISION™ Camera sharpVISION™ SDK Reference 38 3.3.4. SvAbortGrab SV_ERROR SvAbortGrab( SV_HANDLE hCamera ) Return values SVC_SUCCESS if successfu
sharpVISION™ Camera sharpVISION™ VISION SDK 39 3.3.5. SvTrigger SV_ERROR SvTrigger( SV_HANDLE hCamera ) Return values SVC_SUCCESS if successful, other
sharpVISION™ Camera sharpVISION™ SDK Reference 4 4.2.4. CmdShowSaveSequenceDialogBox ...
sharpVISION™ Camera sharpVISION™ SDK Reference 40 44.. sshhaarrppXXvviissiioonn™™ AAccttiivveeXX CCoonnttrrooll RReeffeerreennccee 4.1. Overview
sharpVISION™ Camera sharpVISION™ VISION SDK 41 4.2. Camera Control Functions 4.2.1. Overview: Camera Control functions Camera Control functions allows
sharpVISION™ Camera sharpVISION™ SDK Reference 42 4.2.2. CmdShowMainToolbar short CmdShowMainToolbar( short nShow ) Return values SVC_SUCCESS, if suc
sharpVISION™ Camera sharpVISION™ VISION SDK 43 4.2.3. CmdShowCameraBar void CmdShowCameraBar( short nShow ) Return values SVC_SUCCESS, if successful,
sharpVISION™ Camera sharpVISION™ SDK Reference 44 4.2.4. CmdShowSaveSequenceDialogBox void CmdShowSaveSequenceDialogBox ( void ) Return values None P
sharpVISION™ Camera sharpVISION™ VISION SDK 45 4.2.5. CmdRecord short CmdRecord( void ) Return values SVC_SUCCESS, if successful, otherwise SVC_GENERI
sharpVISION™ Camera sharpVISION™ SDK Reference 46 4.2.6. CmdPlay short CmdPlay( void ) Return values SVC_SUCCESS, if successful, otherwise SVC_GENERI
sharpVISION™ Camera sharpVISION™ VISION SDK 47 4.2.7. CmdStop short CmdStop( void ) Return values SVC_SUCCESS, if successful, otherwise SVC_GENERICERR
sharpVISION™ Camera sharpVISION™ SDK Reference 48 4.2.8. CmdRewind short CmdRewind( void ) Return values SVC_SUCCESS, if successful, otherwise SVC_GE
sharpVISION™ Camera sharpVISION™ VISION SDK 49 4.2.9. CmdFastForward short CmdFastForward( void ) Return values SVC_SUCCESS, if successful, otherwise
sharpVISION™ Camera sharpVISION™ VISION SDK 5 6.6. HOW TO USE THE VIS ...
sharpVISION™ Camera sharpVISION™ SDK Reference 50 4.2.10. CmdShowPreviousFrame short CmdShowPreviousFrame( void ) Return values SVC_SUCCESS, if succe
sharpVISION™ Camera sharpVISION™ VISION SDK 51 4.2.11. CmdShowNextFrame short CmdShowNextFrame( void ) Return values SVC_SUCCESS, if successful, other
sharpVISION™ Camera sharpVISION™ SDK Reference 52 4.2.12. CmdShowFirstFrame short CmdShowFirstFrame( void ) Return values SVC_SUCCESS, if successful,
sharpVISION™ Camera sharpVISION™ VISION SDK 53 4.2.13. CmdShowLastFrame short CmdShowLastFrame( void ) Return values SVC_SUCCESS, if successful, other
sharpVISION™ Camera sharpVISION™ SDK Reference 54 4.2.14. GetImageWidth long GetImageWidth() Return values The image width, in pixels Parameters None
sharpVISION™ Camera sharpVISION™ VISION SDK 55 4.2.15. GetImageHeight long GetImageHeight() Return values The image height, in pixels Parameters None
sharpVISION™ Camera sharpVISION™ SDK Reference 56 4.2.16. GetImagePixelDepth long GetImagePixelDepth( ) Return values The image pixel depth (8 or 10
sharpVISION™ Camera sharpVISION™ VISION SDK 57 4.2.17. GetExposure long GetExposure() Return values The camera exposure, in microseconds Parameters No
sharpVISION™ Camera sharpVISION™ SDK Reference 58 4.2.18. GetFramesNumber long GetFramesNumber() Return values The number of allocate frames Paramete
sharpVISION™ Camera sharpVISION™ VISION SDK 59 4.2.19. GetFrames long GetFrames (long nFrames, long nStartIndex, long pDataBuff ) Return values SVC_SU
sharpVISION™ Camera sharpVISION™ SDK Reference 6 8.3. APPENDIX C – CAMERA SETTINGS ...
sharpVISION™ Camera sharpVISION™ SDK Reference 60 4.2.20. IsCameraOK long IsCameraOK ( void ) Return values Returns 1 if the camera is initialized an
sharpVISION™ Camera sharpVISION™ VISION SDK 61 4.2.21. IsCameraRecording long IsCameraRecording ( void ) Return values Returns 1 if the camera is reco
sharpVISION™ Camera sharpVISION™ SDK Reference 62 4.2.22. SetExposure void SetExposure ( long nExposure ) Return values None Parameters nExposure Spe
sharpVISION™ Camera sharpVISION™ VISION SDK 63 4.2.23. SetFramesNumber void SetFramesNumber ( long nFrames ) Return values None Parameters nFrames Spe
sharpVISION™ Camera sharpVISION™ SDK Reference 64 55.. sshhaarrppVVIISSIIOONN™™ TTWWAAIINN™™ DDrriivveerr RReeffeerreennccee 5.1. Overview TWAIN
sharpVISION™ Camera sharpVISION™ VISION SDK 65 5.3. Acquire images If the user selects the Acquire option, the sharp VISION User Interface is displaye
sharpVISION™ Camera sharpVISION™ SDK Reference 66 5.3.1. Parameters The camera configuration parameters may be interactively changed. Exposure Time:
sharpVISION™ Camera sharpVISION™ VISION SDK 67 5.3.3. Camera Control Group Play: it’s the standard Play button of any camera interface. If the button
sharpVISION™ Camera sharpVISION™ SDK Reference 68 66.. sshhaarrppVVIISSIIOONN™™ LLaabbVVIIEEWW™™ IInntteerrffaaccee RReeffeerreennccee 6.1. Over
sharpVISION™ Camera sharpVISION™ VISION SDK 69 6.2.2. IDT List Cameras Inputs Error Specifies a standard error cluster input terminal Outputs Error
sharpVISION™ Camera sharpVISION™ VISION SDK 7 11.. OOvveerrvviieeww The on-line documentation of the sharpVISION™ Software Development Kit and its c
sharpVISION™ Camera sharpVISION™ SDK Reference 70 6.2.3. IDT Open Inputs Camera ID Specifies the ID of the camera to be opened, or 0 for the first a
sharpVISION™ Camera sharpVISION™ VISION SDK 71 6.2.4. IDT Close Inputs Camera ID Specifies the ID of the camera to be closed Error Specifies a standa
sharpVISION™ Camera sharpVISION™ SDK Reference 72 6.3. Configuration VIs 6.3.1. Overview: Configuration VIs Configuration VIs allow the user to read
sharpVISION™ Camera sharpVISION™ VISION SDK 73 6.3.2. IDT Get Info Inputs Camera ID Specifies a valid camera ID Info Key Specifies which parameter ha
sharpVISION™ Camera sharpVISION™ SDK Reference 74 6.3.3. IDT Setup Inputs Camera ID Specifies a valid camera ID Error Specifies a standard error clu
sharpVISION™ Camera sharpVISION™ VISION SDK 75 6.3.4. IDT Get Param Inputs Camera ID Specifies a valid camera ID Error Specifies a standard error cl
sharpVISION™ Camera sharpVISION™ SDK Reference 76 6.3.5. IDT Set Param Inputs Camera ID Specifies a valid camera ID Error Specifies a standard erro
sharpVISION™ Camera sharpVISION™ VISION SDK 77 6.3.6. IDT Trig Setup Inputs Camera ID Specifies a valid camera ID Error Specifies a standard error c
sharpVISION™ Camera sharpVISION™ SDK Reference 78 6.4. Grab VIs 6.4.1. Overview: Grab VIs Grab VIs allow the user to grab images from the camera. IDT
sharpVISION™ Camera sharpVISION™ VISION SDK 79 6.4.2. IDT Snap Inputs Camera ID Specifies a valid camera ID Error Specifies a standard error cluster
sharpVISION™ Camera sharpVISION™ SDK Reference 8 1.1. Directories structure The default installation directory of the SDK is “C:\Program Files\IDT\sh
sharpVISION™ Camera sharpVISION™ SDK Reference 80 6.4.3. IDT Grab Setup Inputs Camera ID Specifies a valid camera ID Error Specifies a standard erro
sharpVISION™ Camera sharpVISION™ VISION SDK 81 6.4.4. IDT Grab Inputs Camera ID Specifies a valid camera ID Error Specifies a standard error cluster
sharpVISION™ Camera sharpVISION™ SDK Reference 82 6.4.5. IDT Grab Stop Inputs Camera ID Specifies a valid camera ID Error Specifies a standard error
sharpVISION™ Camera sharpVISION™ VISION SDK 83 6.4.6. IDT Grab Abort Inputs Variable value Specifies the value to set the variable Outputs None Remar
sharpVISION™ Camera sharpVISION™ SDK Reference 84 6.5.2. IDT Image To Picture Inputs Error Specifies a standard error cluster input terminal Top-Le
sharpVISION™ Camera sharpVISION™ VISION SDK 85 6.6. How to use the VIs 6.6.1. Snapping an image The easiest way to acquire an image is to use the IDT
sharpVISION™ Camera sharpVISION™ SDK Reference 86 6.7. Examples VIs 6.7.1. 1_enum_cameras It’s a very simple example which shows how to display the r
sharpVISION™ Camera sharpVISION™ VISION SDK 87 77.. sshhaarrppVVIISSIIOONN™™ MMAATTLLAABB™™ IInntteerrffaaccee RReeffeerreennccee 7.1. Overview T
sharpVISION™ Camera sharpVISION™ SDK Reference 88 7.2. Initialization Functions 7.2.1. Overview: Initialization functions Initialization functions al
sharpVISION™ Camera sharpVISION™ VISION SDK 89 7.2.2. IdtSvVersion [strVersion] = SharpML (‘IdtSvVersion’) Inputs None Outputs strVersion Specifies th
sharpVISION™ Camera sharpVISION™ VISION SDK 9 22.. UUssiinngg sshhaarrppVVIISSIIOONN™™ SSDDKK 2.1. Programming Language A C/C++ header file is inc
sharpVISION™ Camera sharpVISION™ SDK Reference 90 7.2.3. IdtSvEnumCameras [nResult, nItems, svArray] = SharpML (‘IdtSvEnumCameras’) Inputs None Outpu
sharpVISION™ Camera sharpVISION™ VISION SDK 91 7.2.4. IdtSvOpenCamera [nResult, nCameraId] = SharpML (‘IdtSvOpenCamera’, nInputId) Inputs nInputId Spe
sharpVISION™ Camera sharpVISION™ SDK Reference 92 7.2.5. IdtSvCloseCamera [nResult] = SharpML (‘IdtSvCloseCamera’, nCameraId) Inputs nCameraId Speci
sharpVISION™ Camera sharpVISION™ VISION SDK 93 7.3. Configuration functions 7.3.1. Overview: Configuration functions Configuration functions allow the
sharpVISION™ Camera sharpVISION™ SDK Reference 94 7.3.2. IdtSvGetCameraInfo [nResult, nInfoValue] = SharpML (‘IdtSvGetCameraInfo’, nCameraId, nInfoKe
sharpVISION™ Camera sharpVISION™ VISION SDK 95 7.3.3. IdtSvGetParameter [nResult, nValue, nMinValue, nMaxValue] = SharpML (‘IdtSvGetParameter’, nCamer
sharpVISION™ Camera sharpVISION™ SDK Reference 96 7.3.4. IdtSvSetParameter [nResult] = SharpML (‘IdtSvSetParameter’, nCameraId, nParamKey, nValue) In
sharpVISION™ Camera sharpVISION™ VISION SDK 97 7.3.5. IdtSvConfigure [nResult] = SharpML (‘IdtSvConfigure’, nCameraId, nFormat, nBinning, nRoiX, nRo
sharpVISION™ Camera sharpVISION™ SDK Reference 98 7.3.6. IdtSvSetTriggerMode [nResult] = SharpML (‘IdtSvSetTriggerMode’, nCameraId, nTriggerMode) Inp
sharpVISION™ Camera sharpVISION™ VISION SDK 99 7.4. Grab Functions 7.4.1. Overview: Grab Functions Preview Mode grab functions allow the user to snap
Comments to this Manuals