![]() |
PUCLIB 1.7.0.0
PHOTRON USB Control Library
|
Go to the source code of this file.
Data Structures | |
| struct | PUC_DETECT_INFO |
| Structure for storing device search results. More... | |
| struct | PUC_DETECT_FILTER |
| Structure for specifying device search conditions (for PUC_DetectDevice2) More... | |
| struct | PUC_RESO_LIMIT_INFO |
| Structure for storing resolution limit values. More... | |
| struct | PUC_FRAMERATE_LIMIT_INFO |
| Structure for storing framerate limit values. More... | |
| struct | PUC_XFER_DATA_INFO |
| Structure for storing the information of transfer data. More... | |
| struct | PUC_NETWORK_INFO |
Typedefs | |
| typedef struct PUC_DETECT_INFO * | PPUC_DETECT_INFO |
| typedef struct PUC_DETECT_FILTER * | PPUC_DETECT_FILTER |
| typedef struct PUC_RESO_LIMIT_INFO * | PPUC_RESO_LIMIT_INFO |
| typedef struct PUC_FRAMERATE_LIMIT_INFO * | PPUC_FRAMERATE_LIMIT_INFO |
| typedef struct PUC_XFER_DATA_INFO * | PPUC_XFER_DATA_INFO |
| typedef struct PUC_NETWORK_INFO * | PPUC_NETWORK_INFO |
| typedef void(* | RECEIVE_CALLBACK) (PPUC_XFER_DATA_INFO, void *) |
| The callback function type called during continuous transfer. | |
| typedef RECEIVE_CALLBACK | RECIEVE_CALLBACK |
| Deprecated alias kept for backward compatibility. Use RECEIVE_CALLBACK. | |
Functions | |
| PUCRESULT WINAPI | PUC_Initialize () |
| This initializes the library. | |
| PUCRESULT WINAPI | PUC_DetectDevice (PPUC_DETECT_INFO pDetectInfo) |
| This searches for the device. (UC1 only) | |
| PUCRESULT WINAPI | PUC_OpenDevice (UINT32 nDeviceNo, PPUC_HANDLE pDeviceHandle) |
| This opens the device. (UC1 only) | |
| PUCRESULT WINAPI | PUC_CloseDevice (PUC_HANDLE hDevice) |
| This closes the device. | |
| PUCRESULT WINAPI | PUC_IsSupported (PUC_HANDLE hDevice, PUC_CAPABILITY cap, bool *pIsSupported) |
| This checks whether the connected camera supports the specified capability. | |
| PUCRESULT WINAPI | PUC_GetColorType (PUC_HANDLE hDevice, PUC_COLOR_TYPE *pType) |
| This retrieves color/monochrome information of the device. | |
| PUCRESULT WINAPI | PUC_GetDeviceName (PUC_HANDLE hDevice, UINT32 *pName) |
| This retrieves the device name. | |
| PUCRESULT WINAPI | PUC_GetDeviceType (PUC_HANDLE hDevice, UINT32 *pType) |
| This retrieves the device type. | |
| PUCRESULT WINAPI | PUC_GetDeviceVersion (PUC_HANDLE hDevice, UINT32 *pVersion) |
| This retrieves device version information. | |
| PUCRESULT WINAPI | PUC_GetSerialNo (PUC_HANDLE hDevice, UINT64 *pSerialNo) |
| This retrieves the device serial number. | |
| PUCRESULT WINAPI | PUC_GetResolution (PUC_HANDLE hDevice, UINT32 *pWidth, UINT32 *pHeight) |
| This retrieves the device resolution. | |
| PUCRESULT WINAPI | PUC_GetMaxResolution (PUC_HANDLE hDevice, UINT32 *pCurMaxWidth, UINT32 *pCurMaxHeight) |
| This retrieves the maximum resolution setting allowed for the current frame rate of the device. | |
| PUCRESULT WINAPI | PUC_GetResolutionLimit (PUC_HANDLE hDevice, PPUC_RESO_LIMIT_INFO pLimitInfo) |
| This retrieves the resolution limit for the device, and minimum unit for altering the resolution. | |
| PUCRESULT WINAPI | PUC_SetResolution (PUC_HANDLE hDevice, UINT32 nWidth, UINT32 nHeight) |
| This sets the device resolution. | |
| PUCRESULT WINAPI | PUC_GetQuantization (PUC_HANDLE hDevice, UINT32 nPoint, USHORT *pVal) |
| This retrieves one set of quantization table data stored to the device. | |
| PUCRESULT WINAPI | PUC_SetQuantization (PUC_HANDLE hDevice, UINT32 nPoint, USHORT nVal) |
| This overwrites one set of quantization table data stored to the device. | |
| PUCRESULT WINAPI | PUC_GetFanState (PUC_HANDLE hDevice, PUC_MODE *pState) |
| This retrieves the state of the device fan. | |
| PUCRESULT WINAPI | PUC_SetFanState (PUC_HANDLE hDevice, PUC_MODE nState) |
| This sets the state of the device fan. | |
| PUCRESULT WINAPI | PUC_GetSyncInMode (PUC_HANDLE hDevice, PUC_SYNC_MODE *pMode, PUC_SIGNAL *pSignal) |
| This retrieves the synchronous signal input mode for the device. | |
| PUCRESULT WINAPI | PUC_SetSyncInMode (PUC_HANDLE hDevice, PUC_SYNC_MODE nMode, PUC_SIGNAL nSignal) |
| This sets the synchronous signal input mode for the device. | |
| PUCRESULT WINAPI | PUC_GetSyncOutSignal (PUC_HANDLE hDevice, PUC_SIGNAL *pSignal) |
| This retrieves the synchronization signal output polarity for the device. | |
| PUCRESULT WINAPI | PUC_SetSyncOutSignal (PUC_HANDLE hDevice, PUC_SIGNAL nSignal) |
| This sets the synchronous signal output polarity for the device. | |
| PUCRESULT WINAPI | PUC_GetSyncOutDelay (PUC_HANDLE hDevice, UINT32 *pDelay) |
| This retrieves the delay value of device's synchronization signal output in nsec. The value less than 100nsec is rounded up, so an error will occur. | |
| PUCRESULT WINAPI | PUC_SetSyncOutDelay (PUC_HANDLE hDevice, UINT32 nDelay) |
| This sets the delay value of device's synchronization signal output in nsec. | |
| PUCRESULT WINAPI | PUC_GetSyncOutWidth (PUC_HANDLE hDevice, UINT32 *pWidth) |
| This retrieves the output width of synchronization signal for the device. If it is less than 100nsec, it will be rounded up and an error will occur. | |
| PUCRESULT WINAPI | PUC_SetSyncOutWidth (PUC_HANDLE hDevice, UINT32 nWidth) |
| This sets the output width of synchronization signal for the device. | |
| PUCRESULT WINAPI | PUC_GetSyncOutMagnification (PUC_HANDLE hDevice, UINT32 *pMagnification) |
| This retrieves the output magnification rate for the synchronization signal. | |
| PUCRESULT WINAPI | PUC_SetSyncOutMagnification (PUC_HANDLE hDevice, UINT32 nMagnification) |
| This sets the output magnification rate for the synchronization signal. | |
| PUCRESULT WINAPI | PUC_GetSyncOutTimes (PUC_HANDLE hDevice, PUC_SYNC_OUT_TIMES *pTimes) |
| This retrieves the output times for the synchronization signal. | |
| PUCRESULT WINAPI | PUC_SetSyncOutTimes (PUC_HANDLE hDevice, PUC_SYNC_OUT_TIMES nTimes) |
| This sets the output times for the synchronization signal. | |
| PUCRESULT WINAPI | PUC_GetLEDMode (PUC_HANDLE hDevice, PUC_MODE *pMode) |
| This retrieves the LED state of the device. | |
| PUCRESULT WINAPI | PUC_SetLEDMode (PUC_HANDLE hDevice, PUC_MODE nMode) |
| This sets the LED state of the device. | |
| PUCRESULT WINAPI | PUC_GetSensorTemperature (PUC_HANDLE hDevice, UINT32 *pTemp) |
| This retrieves the device sensor temperature. | |
| PUCRESULT WINAPI | PUC_GetExternalSyncStatus (PUC_HANDLE hDevice, UINT32 *pStatus, UINT32 *pFrequency) |
| This retrieves the external sync status. | |
| PUCRESULT WINAPI | PUC_GetXferDataSize (PUC_HANDLE hDevice, UINT32 *pDataSize) |
| This retrieves the size of transfer data from the device. | |
| PUCRESULT WINAPI | PUC_GetMaxXferDataSize (PUC_HANDLE hDevice, UINT32 *pDataSize) |
| This retrieves the maximum size of transfer data from the device. | |
| PUCRESULT WINAPI | PUC_GetSingleXferData (PUC_HANDLE hDevice, PPUC_XFER_DATA_INFO pXferData) |
| This retrieves the current live image from the device. | |
| PUCRESULT WINAPI | PUC_BeginXferData (PUC_HANDLE hDevice, RECEIVE_CALLBACK callback, void *arg) |
| This starts continuous transfer. | |
| PUCRESULT WINAPI | PUC_EndXferData (PUC_HANDLE hDevice) |
| This finishes continuous transfer. | |
| PUCRESULT WINAPI | PUC_IsXferring (PUC_HANDLE hDevice, BOOL *pIsXferring) |
| This checks whether a continuous transfer is in progress. | |
| PUCRESULT WINAPI | PUC_ExtractSequenceNo (const PUCHAR pData, UINT32 nWidth, UINT32 nHeight, PUSHORT pSeqNo) |
| This extracts the sequence number from the compressed image data. (UC1 only) | |
| PUCRESULT WINAPI | PUC_DecodeData (PUINT8 pDst, UINT32 nX, UINT32 nY, UINT32 nWidth, UINT32 nHeight, UINT32 nLineBytes, const PUINT8 pSrc, const PUSHORT pQVals) |
| This unpacks the compressed image data to luminance data. | |
| PUCRESULT WINAPI | PUC_SetWhiteBalanceGain (double nGainR, double nGainG, double nGainB) |
| Sets the per-channel white balance gain (R/G/B) applied during GbE-2 color (bayer) decoding by PUC_DecodeData. 1.0 means no change. The value is stored process-globally and used by subsequent decodes. | |
| PUCRESULT WINAPI | PUC_DecodeDataMultiThread (PUINT8 pDst, UINT32 nX, UINT32 nY, UINT32 nWidth, UINT32 nHeight, UINT32 nLineBytes, const PUINT8 pSrc, const PUSHORT pQVals, UINT32 nThreadCount) |
| This unpacks the compressed image data to luminance data. This process is multithreaded. | |
| PUCRESULT WINAPI | PUC_DecodeDCTData (PINT16 pDst, UINT32 nX, UINT32 nY, UINT32 nWidth, UINT32 nHeight, UINT32 nLineBytes, const PUINT8 pSrc, const PUSHORT pQVals) |
| This unpacks the compressed image data to DCT coefficients. | |
| PUCRESULT WINAPI | PUC_DecodeDCData (PUINT8 pDst, UINT32 nBlockX, UINT32 nBlockY, UINT32 nBlockCountX, UINT32 nBlockCountY, const PUINT8 pSrc) |
| Decodes the DC component of compressed image data. | |
| PUCRESULT WINAPI | PUC_GetRingBufferCount (PUC_HANDLE hDevice, UINT32 *pCount) |
| This retrieves the ring buffer count for continuous transfer. | |
| PUCRESULT WINAPI | PUC_SetRingBufferCount (PUC_HANDLE hDevice, UINT32 nCount) |
| This sets the ring buffer count for continuous transfer. | |
| PUCRESULT WINAPI | PUC_GetXferTimeOut (PUC_HANDLE hDevice, UINT32 *pSingleXferTimeOut, UINT32 *pContinuousXferTimeOut) |
| This retrieves the timeout duration (ms) for data transfer from the device. | |
| PUCRESULT WINAPI | PUC_SetXferTimeOut (PUC_HANDLE hDevice, UINT32 nSingleXferTimeOut, UINT32 nContinuousXferTimeOut) |
| This sets the timeout duration (ms) for data transfer from the device. | |
| PUCRESULT WINAPI | PUC_GetMaxFramerate (PUC_HANDLE hDevice, UINT32 *pFramerate) |
| This retrieves the maximum framerate for the current resolution. | |
| PUCRESULT WINAPI | PUC_GetFramerateLimit (PUC_HANDLE hDevice, PPUC_FRAMERATE_LIMIT_INFO pLimitInfo) |
| This retrieves the framerate limit information. | |
| PUCRESULT WINAPI | PUC_GetFramerateShutter (PUC_HANDLE hDevice, UINT32 *pFramerate, UINT32 *pShutterSpeedFps) |
| This retrieves the framerate and the shutter speed (1/fps) for the device. | |
| PUCRESULT WINAPI | PUC_SetFramerateShutter (PUC_HANDLE hDevice, UINT32 nFramerate, UINT32 nShutterSpeedFps) |
| This sets the framerate and the shutter speed (1/fps) for the device. | |
| PUCRESULT WINAPI | PUC_GetExposeTime (PUC_HANDLE hDevice, UINT32 *pExpOnTime, UINT32 *pExpOffTime) |
| This retrieves the exposure/non-exposure time of the device. | |
| PUCRESULT WINAPI | PUC_GetMinExposeTime (PUC_HANDLE hDevice, UINT32 *pMinExpOnTime, UINT32 *pMinExpOffTime) |
| This retrieves the minimum exposure/non-exposure time of the device. If it is less than 100nsec, it will be rounded up and an error will occur. | |
| PUCRESULT WINAPI | PUC_SetExposeTime (PUC_HANDLE hDevice, UINT32 nExpOnTime, UINT32 nExpOffTime) |
| This sets the exposure/non-exposure time of the device. | |
| PUCRESULT WINAPI | PUC_ResetDevice (UINT32 nDeviceNo) |
| This resets the device. (UC1 only) | |
| PUCRESULT WINAPI | PUC_ResetSequenceNo (PUC_HANDLE hDevice) |
| This resets the sequence number. | |
| PUCRESULT WINAPI | PUC_GetAvailableGPUProcess () |
| This retrieves whether the PC is capable of GPU processing. | |
| PUCRESULT WINAPI | PUC_SetupGPUDecode (PUC_GPU_SETUP_PARAM param) |
| Allocates memory for GPU processing. | |
| PUCRESULT WINAPI | PUC_TeardownGPUDecode () |
| Releases memory used by GPU processing. | |
| PUCRESULT WINAPI | PUC_DecodeGPU (bool download, unsigned char *pSrc, unsigned char **pDst, UINT32 lineBytes) |
| This unpacks the compressed image data to luminance data.(GPU processing) | |
| PUCRESULT WINAPI | PUC_GetGPULastError (int &errorCode) |
| This retrieves the error code from the last GPU processing. | |
| PUCRESULT WINAPI | PUC_IsSetupGPUDecode (bool &status) |
| This retrieves whether GPU decode memory is allocated. | |
| PUCRESULT WINAPI | PUC_DetectDevice2 (const PPUC_DETECT_FILTER pFilter, PPUC_DETECT_INFO pDetectInfo) |
| This searches for devices matching the specified search conditions. | |
| PUCRESULT WINAPI | PUC_OpenDevice2 (UINT32 index, PPUC_HANDLE pDeviceHandle) |
| This opens a device found by the last device search. | |
| PUCRESULT WINAPI | PUC_GetAdaptersInfoList (UINT32 *pNumAdapters, PPUC_NETWORK_INFO pAdaptersInfo) |
| This retrieves the list of network adapters on the PC. (GbE-2 only) | |
| PUCRESULT WINAPI | PUC_DiscoveryDevice (UINT32 nAdapterIPaddress, UINT32 *pNumDetectedDevice, PPUC_NETWORK_INFO pDetectedDevicesInfo) |
| This searches for devices under the specified network adapter. (GbE-2 only) | |
| PUCRESULT WINAPI | PUC_ForceSetNetworkSetting (UINT32 nAdapterIPaddress, const PPUC_NETWORK_INFO pTargetInfo, UINT32 nForTemporary, PPUC_NETWORK_INFO pResultInfo) |
| This forcibly writes network settings to a device that is not opened. (GbE-2 only) | |
| PUCRESULT WINAPI | PUC_GetIPAddress (PUC_HANDLE hDevice, UINT32 *pIPAddress) |
| This retrieves the IP address of the device from the cache. (GbE-2 only) | |
| PUCRESULT WINAPI | PUC_GetMacAddress (PUC_HANDLE hDevice, UINT8 *pMacAddress) |
| This retrieves the MAC address of the device from the cache. (GbE-2 only) | |
| PUCRESULT WINAPI | PUC_GetTimeCode2EPOC (PUINT8 pSrc, time_t *time) |
| This converts the time code in the transfer data into epoch time. (GbE-2 only) | |
| PUCRESULT WINAPI | PUC_GetQuantization2 (PUC_HANDLE hDevice, unsigned short *pQvals) |
| This retrieves the whole quantization table of the device at once. | |
| PUCRESULT WINAPI | PUC_SetQuantization2 (PUC_HANDLE hDevice, unsigned short *pQvals) |
| This sets the whole quantization table of the device at once. | |
| PUCRESULT WINAPI | PUC_GetSupportedGeneralOutSignal (PUC_HANDLE hDevice, PUC_GENERAL_OUT_SIGNAL_TYPE GenOutType, bool *isSupported) |
| This retrieves whether the device supports the specified general output signal type. (GbE-2 only) | |
| PUCRESULT WINAPI | PUC_GetGeneralOutSignal (PUC_HANDLE hDevice, int portNo, PUC_GENERAL_OUT_SIGNAL_TYPE *type) |
| This retrieves the signal type assigned to the specified general output port. (GbE-2 only) | |
| PUCRESULT WINAPI | PUC_SetGeneralOutSignal (PUC_HANDLE hDevice, int portNo, PUC_GENERAL_OUT_SIGNAL_TYPE type) |
| This assigns a signal type to the specified general output port. (GbE-2 only) | |
| PUCRESULT WINAPI | PUC_GetSupportedGeneralInSignal (PUC_HANDLE hDevice, PUC_GENERAL_IN_SIGNAL_TYPE GenInType, bool *isSupported) |
| This retrieves whether the device supports the specified general input signal type. (GbE-2 only) | |
| PUCRESULT WINAPI | PUC_SetGeneralInSignal (PUC_HANDLE hDevice, int portNo, PUC_GENERAL_IN_SIGNAL_TYPE type) |
| This assigns a signal type to the specified general input port. (GbE-2 only) | |
| PUCRESULT WINAPI | PUC_GetGeneralInSignal (PUC_HANDLE hDevice, int portNo, PUC_GENERAL_IN_SIGNAL_TYPE *type) |
| This retrieves the signal type assigned to the specified general input port. (GbE-2 only) | |
| PUCRESULT WINAPI | PUC_GetSyncInDelay (PUC_HANDLE hDevice, UINT32 *pDelay) |
| This retrieves the delay of the SYNC IN signal for the device. (GbE-2 only) | |
| PUCRESULT WINAPI | PUC_SetSyncInDelay (PUC_HANDLE hDevice, UINT32 nDelay) |
| This sets the delay of the SYNC IN signal for the device. (GbE-2 only) | |
| PUCRESULT WINAPI | PUC_GetTrigInDelay (PUC_HANDLE hDevice, UINT32 *pDelay) |
| This retrieves the delay of the TRIG IN signal for the device. (GbE-2 only) | |
| PUCRESULT WINAPI | PUC_SetTrigInDelay (PUC_HANDLE hDevice, UINT32 nDelay) |
| This sets the delay of the TRIG IN signal for the device. (GbE-2 only) | |
| PUCRESULT WINAPI | PUC_GetTrigOutWidth (PUC_HANDLE hDevice, UINT32 *pWidth) |
| This retrieves the output width of the TRIG OUT signal for the device. (GbE-2 only) | |
| PUCRESULT WINAPI | PUC_SetTrigOutWidth (PUC_HANDLE hDevice, UINT32 nWidth) |
| This sets the output width of the TRIG OUT signal for the device. (GbE-2 only) | |
| PUCRESULT WINAPI | PUC_GetExposeDelay (PUC_HANDLE hDevice, UINT32 *pDelay) |
| This retrieves the exposure delay of the device. | |
| PUCRESULT WINAPI | PUC_SetExposeDelay (PUC_HANDLE hDevice, UINT32 nDelay) |
| This sets the exposure delay of the device. | |
| PUCRESULT WINAPI | PUC_GetPPOutWidth (PUC_HANDLE hDevice, UINT32 *pWidth) |
| This retrieves the output width of the PP OUT (PTP pulse per second) signal for the device. (GbE-2 only) | |
| PUCRESULT WINAPI | PUC_SetPPOutWidth (PUC_HANDLE hDevice, UINT32 nWidth) |
| This sets the output width of the PP OUT (PTP pulse per second) signal for the device. (GbE-2 only) | |
| PUCRESULT WINAPI | PUC_GetPPOutDelay (PUC_HANDLE hDevice, UINT32 *pDelay) |
| This retrieves the delay of the PP OUT (PTP pulse per second) signal for the device. (GbE-2 only) | |
| PUCRESULT WINAPI | PUC_SetPPOutDelay (PUC_HANDLE hDevice, UINT32 nDelay) |
| This sets the delay of the PP OUT (PTP pulse per second) signal for the device. (GbE-2 only) | |
| PUCRESULT WINAPI | PUC_SetEPOCTime (PUC_HANDLE hDevice, UINT32 year, UINT32 month, UINT32 day, UINT32 hour, UINT32 minute, UINT32 second) |
| This sets the clock of the device by specifying the date and time. (GbE-2 only) | |
| PUCRESULT WINAPI | PUC_SetTimeOfDay (PUC_HANDLE hDevice, UINT64 epochSeconds) |
| This sets the clock of the device by specifying the epoch time. (GbE-2 only) | |
| PUCRESULT WINAPI | PUC_SetNetworkInfo (PUC_HANDLE hDevice, PUC_NETWORK_INFO_TYPE type, UINT32 value) |
| This changes the network setting of the opened device. (GbE-2 only) | |
| PUCRESULT WINAPI | PUC_ExtractSequenceNo_GBE2 (const PUCHAR pData, PUSHORT pSeqNo) |
| This extracts the sequence number from the transfer data. (GbE-2 only) | |
| PUCRESULT WINAPI | PUC_ExtractGbe2XferHeader (const PUCHAR pData, PPUC_GBE2_XFER_HEADER pHeader) |
| This parses the header of the transfer data. (GbE-2 only) | |
| typedef struct PUC_DETECT_FILTER * PPUC_DETECT_FILTER |
| typedef struct PUC_DETECT_INFO * PPUC_DETECT_INFO |
| typedef struct PUC_FRAMERATE_LIMIT_INFO * PPUC_FRAMERATE_LIMIT_INFO |
| typedef struct PUC_NETWORK_INFO * PPUC_NETWORK_INFO |
| typedef struct PUC_RESO_LIMIT_INFO * PPUC_RESO_LIMIT_INFO |
| typedef struct PUC_XFER_DATA_INFO * PPUC_XFER_DATA_INFO |
| typedef void(* RECEIVE_CALLBACK) (PPUC_XFER_DATA_INFO, void *) |
| typedef RECEIVE_CALLBACK RECIEVE_CALLBACK |
Deprecated alias kept for backward compatibility. Use RECEIVE_CALLBACK.
| PUCRESULT WINAPI PUC_BeginXferData | ( | PUC_HANDLE | hDevice, |
| RECEIVE_CALLBACK | callback, | ||
| void * | arg ) |
This starts continuous transfer.
If the callback function takes a long time to process, sequential image data will be stored to the ring buffer set in PUC_SetRingBufferCount.
If the ring buffer is used up, it will wait until the callback function process is complete. Be aware that any data received during this period will not be stored to the buffer. (Dropped frames)
PUC_EndXferData and PUC_CloseDevice cannot be called from inside the callback function (PUC_ERROR_XFERRING is returned).
| [in] | hDevice | The device handle to be controlled |
| [in] | callback | This callback function is called every time an image is received from the device in the SDK. |
| [in] | arg | The argument passed to the callback function |
| PUCRESULT WINAPI PUC_CloseDevice | ( | PUC_HANDLE | hDevice | ) |
This closes the device.
An error will be returned when specifying an unopened device.
This function cannot be called from inside the callback function of PUC_BeginXferData (PUC_ERROR_XFERRING is returned).
| [in] | hDevice | The device handle to be closed |
| PUCRESULT WINAPI PUC_DecodeData | ( | PUINT8 | pDst, |
| UINT32 | nX, | ||
| UINT32 | nY, | ||
| UINT32 | nWidth, | ||
| UINT32 | nHeight, | ||
| UINT32 | nLineBytes, | ||
| const PUINT8 | pSrc, | ||
| const PUSHORT | pQVals ) |
This unpacks the compressed image data to luminance data.
The camera model is determined from the header of the compressed image data, and the decoding process is switched accordingly.
The upper limit of nWidth and nHeight differs depending on the model. (UC1: 1246x1024, GbE-2: 800x600)
For the GbE-2, the transferred image is rotated 180 degrees, so it is rotated back to the correct orientation. For the GbE-2 color model, the bayer conversion is also applied.
| [out] | pDst | The buffer at the unpacking destination. The size of the width must be allocated rounded up to a multiple of four. (e.g., If the width is 1246 px, a buffer is required 1248 bytes at least) For the GbE-2 color model, BGR 24-bit data (3 bytes per pixel, nWidth*3 bytes per line) is written, so at least nWidth*nHeight*3 bytes are required. |
| [in] | nX | The upper left coordinate X for starting unpacking. This must be 0, or a multiple of 8. |
| [in] | nY | The upper left coordinate Y for starting unpacking. This must be 0, or a multiple of 8. |
| [in] | nWidth | The width for unpacking |
| [in] | nHeight | The height for unpacking |
| [in] | nLineBytes | The number of bytes of the buffer width at the unpacking destination For the GbE-2 color model, pass nWidth. (This is the line width of the bayer data before conversion, not of the BGR output.) |
| [in] | pSrc | The compressed image data |
| [in] | pQVals | A quantization table |
| PUCRESULT WINAPI PUC_DecodeDataMultiThread | ( | PUINT8 | pDst, |
| UINT32 | nX, | ||
| UINT32 | nY, | ||
| UINT32 | nWidth, | ||
| UINT32 | nHeight, | ||
| UINT32 | nLineBytes, | ||
| const PUINT8 | pSrc, | ||
| const PUSHORT | pQVals, | ||
| UINT32 | nThreadCount ) |
This unpacks the compressed image data to luminance data. This process is multithreaded.
The model determination and the decoding result are the same as PUC_DecodeData.
For the GbE-2, only the decoding is split across threads. The 180 degree rotation and the bayer conversion require the whole frame, so they are performed on the calling thread after all threads have finished.
| [out] | pDst | The buffer at the unpacking destination. The size of the width must be allocated rounded up to a multiple of four. (e.g., If the width is 1246 px, a buffer is required 1248 bytes at least) For the GbE-2 color model, BGR 24-bit data (3 bytes per pixel, nWidth*3 bytes per line) is written, so at least nWidth*nHeight*3 bytes are required. |
| [in] | nX | The upper left coordinate X for starting unpacking. This must be 0, or a multiple of 8. |
| [in] | nY | The upper left coordinate Y for starting unpacking. This must be 0, or a multiple of 8. |
| [in] | nWidth | The width for unpacking |
| [in] | nHeight | The height for unpacking |
| [in] | nLineBytes | The number of bytes of the buffer width at the unpacking destination For the GbE-2 color model, pass nWidth. (This is the line width of the bayer data before conversion, not of the BGR output.) |
| [in] | pSrc | The compressed image data |
| [in] | pQVals | A quantization table |
| [in] | nThreadCount | The number of threads to process in multiple threads. |
| PUCRESULT WINAPI PUC_DecodeDCData | ( | PUINT8 | pDst, |
| UINT32 | nBlockX, | ||
| UINT32 | nBlockY, | ||
| UINT32 | nBlockCountX, | ||
| UINT32 | nBlockCountY, | ||
| const PUINT8 | pSrc ) |
Decodes the DC component of compressed image data.
The camera model is determined from the header of the compressed image data.
For the GbE-2, the block order is reversed so that the result has the same orientation as PUC_DecodeData (the transferred image is rotated 180 degrees).
The maximum number of blocks in the X direction is based on the width of the transferred data, including the optical black area. (UC1: 160 blocks, GbE-2: 100 blocks)
| [out] | pDst | The buffer at the decoding destination. Must be allocated for the total number of blocks included in the decoding range. |
| [in] | nBlockX | The block coordinates X for starting decoding |
| [in] | nBlockY | The block coordinates Y for starting decoding |
| [in] | nBlockCountX | Number of blocks in the X direction to be decoded |
| [in] | nBlockCountY | Number of blocks in the Y direction to be decoded |
| [in] | pSrc | The compressed image data |
| PUCRESULT WINAPI PUC_DecodeDCTData | ( | PINT16 | pDst, |
| UINT32 | nX, | ||
| UINT32 | nY, | ||
| UINT32 | nWidth, | ||
| UINT32 | nHeight, | ||
| UINT32 | nLineBytes, | ||
| const PUINT8 | pSrc, | ||
| const PUSHORT | pQVals ) |
This unpacks the compressed image data to DCT coefficients.
The camera model is determined from the header of the compressed image data.
For the GbE-2, the transferred image is rotated 180 degrees, so the coefficients are rotated back to have the same orientation as PUC_DecodeData. This is done by reversing the block order and inverting the sign of the coefficients where (u + v) is odd, which is an exact rotation in the frequency domain.
| [out] | pDst | The buffer at the unpacking destination. The size of the width must be allocated rounded up to a multiple of four. (e.g., If the width is 1246 px, a buffer is required 1248 bytes at least) |
| [in] | nX | The upper left coordinate X for starting unpacking. This must be 0, or a multiple of 8. |
| [in] | nY | The upper left coordinate Y for starting unpacking. This must be 0, or a multiple of 8. |
| [in] | nWidth | The width for unpacking. For the GbE-2, this must be a multiple of 8. |
| [in] | nHeight | The height for unpacking. For the GbE-2, this must be a multiple of 8. |
| [in] | nLineBytes | The number of bytes of the buffer width at the unpacking destination. This must be at least nWidth * 2. |
| [in] | pSrc | The compressed image data |
| [in] | pQVals | A quantization table |
| PUCRESULT WINAPI PUC_DecodeGPU | ( | bool | download, |
| unsigned char * | pSrc, | ||
| unsigned char ** | pDst, | ||
| UINT32 | lineBytes ) |
This unpacks the compressed image data to luminance data.(GPU processing)
| [in] | download | If false is specified, the decoded data is stored in device (GPU) memory; if true is specified, it is stored in host (CPU) memory. |
| [in] | pSrc | The original encoded frame data to be decoded. |
| [out] | pDst | The decoded processing result frame data, which is output to device memory or host memory depending on the setting of the download argument. |
| [in] | lineBytes | The number of bytes of the buffer width at the unpacking destination If the download argument is true, the data decoded by the GPU is copied to the address specified by this argument. Therefore, it is necessary to allocate a buffer in host memory in advance. The size of the width must be allocated rounded up to a multiple of four. (e.g., If the width is 1246 px, a buffer is required 1248 bytes at least) If the download argument is false, the address of the device memory of the data decoded by the GPU is acquired. Allocation of host memory is not required. |
| PUCRESULT WINAPI PUC_DetectDevice | ( | PPUC_DETECT_INFO | pDetectInfo | ) |
This searches for the device. (UC1 only)
If the device number is already identified, the device can also be opened without searching it.
| [out] | pDetectInfo | Stores the information of detected device. |
| PUCRESULT WINAPI PUC_DetectDevice2 | ( | const PPUC_DETECT_FILTER | pFilter, |
| PPUC_DETECT_INFO | pDetectInfo ) |
This searches for devices matching the specified search conditions.
Specify the search target device types and network conditions via PUC_DETECT_FILTER.
If pFilter is NULL or zero-initialized, all device types are searched.
The detected devices can be opened with PUC_OpenDevice2 by specifying the index of the result.
| [in] | pFilter | Search conditions. NULL searches all device types. |
| [out] | pDetectInfo | Stores the information of detected devices. |
| PUCRESULT WINAPI PUC_DiscoveryDevice | ( | UINT32 | nAdapterIPaddress, |
| UINT32 * | pNumDetectedDevice, | ||
| PPUC_NETWORK_INFO | pDetectedDevicesInfo ) |
This searches for devices under the specified network adapter. (GbE-2 only)
Unlike PUC_DetectDevice2 with PUC_DETECT_MODE_TARGET_IP, this retrieves the network settings (IP address, subnet mask, gateway, MAC address) of each device, so it can also find devices whose IP address is not yet known.
The network interface module must be loaded. If it is not, PUC_ERROR_MODULE_LOAD will be returned.
| [in] | nAdapterIPaddress | The IP address of the adapter to search on |
| [in,out] | pNumDetectedDevice | On input, the number of elements in pDetectedDevicesInfo. On output, the number of devices detected. |
| [out] | pDetectedDevicesInfo | Stores the network information of the detected devices. |
| PUCRESULT WINAPI PUC_EndXferData | ( | PUC_HANDLE | hDevice | ) |
This finishes continuous transfer.
This function cannot be called from inside the callback function of PUC_BeginXferData (PUC_ERROR_XFERRING is returned).
| [in] | The | device handle to be controlled |
| PUCRESULT WINAPI PUC_ExtractGbe2XferHeader | ( | const PUCHAR | pData, |
| PPUC_GBE2_XFER_HEADER | pHeader ) |
This parses the header of the transfer data. (GbE-2 only)
This retrieves the image number, the packet loss flag, the synchronization/PTP/trigger status and the epoch time all at once. Use this when the frame status is needed in addition to the sequence number.
The header is embedded in the transfer data, so this can also be used for data saved offline.
The model is identified by the model code in the transfer data header (2nd byte). For UC1 data, PUC_ERROR_NOTSUPPORT will be returned.
For data with an unknown model code, PUC_ERROR_XFER_DATA_INVALID_HEADER will be returned. This also applies to a frame whose first packet (including the header) was lost, because the missing part is filled with 0.
If failed, the output is not modified.
| [in] | pData | The transfer data |
| [out] | pHeader | The storage destination for the parsed header |
| PUCRESULT WINAPI PUC_ExtractSequenceNo | ( | const PUCHAR | pData, |
| UINT32 | nWidth, | ||
| UINT32 | nHeight, | ||
| PUSHORT | pSeqNo ) |
This extracts the sequence number from the compressed image data. (UC1 only)
The model is identified by the model code in the transfer data header (2nd byte).
For GbE-2 data, PUC_ERROR_NOTSUPPORT will be returned. Use PUC_ExtractSequenceNo_GBE2 instead.
For data with an unknown model code, PUC_ERROR_XFER_DATA_INVALID_HEADER will be returned.
| [in] | pData | The compressed image data |
| [in] | nWidth | The image width |
| [in] | nHeight | The image height |
| [out] | pSeqNo | The storage destination for the sequence number extracted |
| PUCRESULT WINAPI PUC_ExtractSequenceNo_GBE2 | ( | const PUCHAR | pData, |
| PUSHORT | pSeqNo ) |
This extracts the sequence number from the transfer data. (GbE-2 only)
Unlike PUC_ExtractSequenceNo, the resolution is not required because the sequence number is stored in the transfer data header.
The model is identified by the model code in the transfer data header (2nd byte). For UC1 data, PUC_ERROR_NOTSUPPORT will be returned.
For data with an unknown model code, PUC_ERROR_XFER_DATA_INVALID_HEADER will be returned. This also applies to a frame whose first packet (including the header) was lost, because the missing part is filled with 0.
If failed, the output is not modified.
| [in] | pData | The transfer data |
| [out] | pSeqNo | The storage destination for the sequence number |
| PUCRESULT WINAPI PUC_ForceSetNetworkSetting | ( | UINT32 | nAdapterIPaddress, |
| const PPUC_NETWORK_INFO | pTargetInfo, | ||
| UINT32 | nForTemporary, | ||
| PPUC_NETWORK_INFO | pResultInfo ) |
This forcibly writes network settings to a device that is not opened. (GbE-2 only)
Use this to recover a device that cannot be connected to because its IP address does not match the PC's network. Identify the target device by the MAC address obtained with PUC_DiscoveryDevice.
The network interface module must be loaded. If it is not, PUC_ERROR_MODULE_LOAD will be returned.
| [in] | nAdapterIPaddress | The IP address of the adapter used to reach the device |
| [in] | pTargetInfo | The target device and the network settings to write. The device is identified by the MAC address. |
| [in] | nForTemporary | Specify a non-zero value to apply the setting temporarily (until the device is restarted), or 0 to store it in the device. |
| [out] | pResultInfo | Stores the network settings after the change. |
| PUCRESULT WINAPI PUC_GetAdaptersInfoList | ( | UINT32 * | pNumAdapters, |
| PPUC_NETWORK_INFO | pAdaptersInfo ) |
This retrieves the list of network adapters on the PC. (GbE-2 only)
This is the starting point for connecting to a network-connected device. Search for devices with PUC_DiscoveryDevice using the IP address of the retrieved adapter.
The network interface module must be loaded. If it is not, PUC_ERROR_MODULE_LOAD will be returned.
| [in,out] | pNumAdapters | On input, the number of elements in pAdaptersInfo. On output, the number of adapters retrieved. |
| [out] | pAdaptersInfo | Stores the information of the adapters. |
| PUCRESULT WINAPI PUC_GetAvailableGPUProcess | ( | ) |
This retrieves whether the PC is capable of GPU processing.
| PUCRESULT WINAPI PUC_GetColorType | ( | PUC_HANDLE | hDevice, |
| PUC_COLOR_TYPE * | pType ) |
This retrieves color/monochrome information of the device.
| [in] | hDevice | The device handle to be controlled |
| [out] | pType | The storage destination for color/monochrome information |
| PUCRESULT WINAPI PUC_GetDeviceName | ( | PUC_HANDLE | hDevice, |
| UINT32 * | pName ) |
This retrieves the device name.
| [in] | hDevice | The device handle to be controlled |
| [out] | pID | The storage destination for the device name |
| PUCRESULT WINAPI PUC_GetDeviceType | ( | PUC_HANDLE | hDevice, |
| UINT32 * | pType ) |
This retrieves the device type.
| [in] | hDevice | The device handle to be controlled |
| [out] | pID | The storage destination for the device type |
| PUCRESULT WINAPI PUC_GetDeviceVersion | ( | PUC_HANDLE | hDevice, |
| UINT32 * | pVersion ) |
This retrieves device version information.
| [in] | hDevice | The device handle to be controlled |
| [out] | pVersion | The storage destination for the version number |
| PUCRESULT WINAPI PUC_GetExposeDelay | ( | PUC_HANDLE | hDevice, |
| UINT32 * | pDelay ) |
This retrieves the exposure delay of the device.
This is the delay from the synchronization signal until exposure starts.
PUC_ERROR_NOTSUPPORT will be returned if the connected device does not support this. Check in advance with PUC_IsSupported (PUC_CAP_EXPOSE_DELAY).
| [in] | hDevice | The device handle to be controlled |
| [out] | pDelay | The storage destination for the delay (nsec units) |
| PUCRESULT WINAPI PUC_GetExposeTime | ( | PUC_HANDLE | hDevice, |
| UINT32 * | pExpOnTime, | ||
| UINT32 * | pExpOffTime ) |
This retrieves the exposure/non-exposure time of the device.
The return value of this function will change if the frame rate and shutter speed is changed with PUC_SetFramerateShutter function.
Changing the exposure/non-exposure time resets the output magnification rate of synchronization signal to x1.
If it is less than 100nsec, it will be rounded up and an error will occur.
| [in] | hDevice | The device handle to be controlled |
| [out] | pExpOnTime | The storage destination for the exposure period (nsec units) |
| [out] | pExpOffTime | The storage destination for the non-exposure period (nsec units) |
| PUCRESULT WINAPI PUC_GetExternalSyncStatus | ( | PUC_HANDLE | hDevice, |
| UINT32 * | pStatus, | ||
| UINT32 * | pFrequency ) |
This retrieves the external sync status.
| [in] | hDevice | The device handle to be controlled |
| [out] | pStatus | The storage destination for the sync status (0=no sync, 1=synced, 2=no signal, 3=over sync) |
| [out] | pFrequency | The storage destination for the frequency (Hz) |
| PUCRESULT WINAPI PUC_GetFanState | ( | PUC_HANDLE | hDevice, |
| PUC_MODE * | pState ) |
This retrieves the state of the device fan.
PUC_ERROR_NOTSUPPORT will be returned if the connected device does not have a fan. Check in advance with PUC_IsSupported (PUC_CAP_FAN).
| [in] | hDevice | The device handle to be controlled |
| [out] | nState | The storage destination for the fan state (ON/OFF) |
| PUCRESULT WINAPI PUC_GetFramerateLimit | ( | PUC_HANDLE | hDevice, |
| PPUC_FRAMERATE_LIMIT_INFO | pLimitInfo ) |
This retrieves the framerate limit information.
| [in] | hDevice | The device handle to be controlled. |
| [out] | pLimitInfo | Structure for storing framerate limit values. |
| PUCRESULT WINAPI PUC_GetFramerateShutter | ( | PUC_HANDLE | hDevice, |
| UINT32 * | pFramerate, | ||
| UINT32 * | pShutterSpeedFps ) |
This retrieves the framerate and the shutter speed (1/fps) for the device.
Note that the return value with this function will be invalid if the exposure/non-exposure time is set directly with PUC_SetExposeTime function.
| [in] | hDevice | The device handle to be controlled |
| [out] | pFramerate | The storage destination for the framerate |
| [out] | pShutterSpeedFps | The storage destination for the shutter speed (1/fps) |
| PUCRESULT WINAPI PUC_GetGeneralInSignal | ( | PUC_HANDLE | hDevice, |
| int | portNo, | ||
| PUC_GENERAL_IN_SIGNAL_TYPE * | type ) |
This retrieves the signal type assigned to the specified general input port. (GbE-2 only)
PUC_ERROR_NOTSUPPORT will be returned if the connected device does not support general input/output. Check in advance with PUC_IsSupported (PUC_CAP_GENERAL_IO).
| [in] | hDevice | The device handle to be controlled |
| [in] | portNo | The port number of the general input |
| [out] | type | The storage destination for the signal type |
| PUCRESULT WINAPI PUC_GetGeneralOutSignal | ( | PUC_HANDLE | hDevice, |
| int | portNo, | ||
| PUC_GENERAL_OUT_SIGNAL_TYPE * | type ) |
This retrieves the signal type assigned to the specified general output port. (GbE-2 only)
PUC_ERROR_NOTSUPPORT will be returned if the connected device does not support general input/output. Check in advance with PUC_IsSupported (PUC_CAP_GENERAL_IO).
| [in] | hDevice | The device handle to be controlled |
| [in] | portNo | The port number of the general output |
| [out] | type | The storage destination for the signal type |
| PUCRESULT WINAPI PUC_GetGPULastError | ( | int & | errorCode | ) |
This retrieves the error code from the last GPU processing.
| [out] | The | error code from GPU. |
| PUCRESULT WINAPI PUC_GetIPAddress | ( | PUC_HANDLE | hDevice, |
| UINT32 * | pIPAddress ) |
This retrieves the IP address of the device from the cache. (GbE-2 only)
The value cached when PUC_OpenDevice2 succeeded is returned.
| [in] | hDevice | The device handle to be controlled |
| [out] | pIPAddress | Stores the IP address. |
| PUCRESULT WINAPI PUC_GetLEDMode | ( | PUC_HANDLE | hDevice, |
| PUC_MODE * | pMode ) |
This retrieves the LED state of the device.
| [in] | hDevice | The device handle to be controlled |
| [out] | pMode | The storage destination for the LED state (ON/OFF) |
| PUCRESULT WINAPI PUC_GetMacAddress | ( | PUC_HANDLE | hDevice, |
| UINT8 * | pMacAddress ) |
This retrieves the MAC address of the device from the cache. (GbE-2 only)
The value cached via Discovery when PUC_OpenDevice2 succeeded is returned.
| [in] | hDevice | The device handle to be controlled |
| [out] | pMacAddress | Stores the MAC address. (6-byte array) |
| PUCRESULT WINAPI PUC_GetMaxFramerate | ( | PUC_HANDLE | hDevice, |
| UINT32 * | pFramerate ) |
This retrieves the maximum framerate for the current resolution.
| [in] | hDevice | The device handle to be controlled |
| [out] | pFramerate | The storage destination for the maximum framerate |
| PUCRESULT WINAPI PUC_GetMaxResolution | ( | PUC_HANDLE | hDevice, |
| UINT32 * | pCurMaxWidth, | ||
| UINT32 * | pCurMaxHeight ) |
This retrieves the maximum resolution setting allowed for the current frame rate of the device.
| [in] | hDevice | The device handle to be controlled |
| [out] | pCurMaxWidth | The storage destination for the maximum horizontal resolution setting allowed for the current framerate |
| [out] | pCurMaxHeight | The storage destination for the maximum vertical resolution setting allowed for the current framerate |
| PUCRESULT WINAPI PUC_GetMaxXferDataSize | ( | PUC_HANDLE | hDevice, |
| UINT32 * | pDataSize ) |
This retrieves the maximum size of transfer data from the device.
This will vary depending on the current resolution.
| [in] | hDevice | The device handle to be controlled |
| [out] | pDataSize | The storage destination for the maximum data size |
| PUCRESULT WINAPI PUC_GetMinExposeTime | ( | PUC_HANDLE | hDevice, |
| UINT32 * | pMinExpOnTime, | ||
| UINT32 * | pMinExpOffTime ) |
This retrieves the minimum exposure/non-exposure time of the device.
If it is less than 100nsec, it will be rounded up and an error will occur.
| [in] | hDevice | The device handle to be controlled |
| [out] | pMinExpOnTime | The storage destination for the minimum exposure period (nsec units) |
| [out] | pMinExpOffTime | The storage destination for the minimum non-exposure period (nsec units) |
| PUCRESULT WINAPI PUC_GetPPOutDelay | ( | PUC_HANDLE | hDevice, |
| UINT32 * | pDelay ) |
This retrieves the delay of the PP OUT (PTP pulse per second) signal for the device. (GbE-2 only)
PUC_ERROR_NOTSUPPORT will be returned if the connected device does not support this. Check in advance with PUC_IsSupported (PUC_CAP_PP_OUT).
| [in] | hDevice | The device handle to be controlled |
| [out] | pDelay | The storage destination for the delay (nsec units) |
| PUCRESULT WINAPI PUC_GetPPOutWidth | ( | PUC_HANDLE | hDevice, |
| UINT32 * | pWidth ) |
This retrieves the output width of the PP OUT (PTP pulse per second) signal for the device. (GbE-2 only)
PUC_ERROR_NOTSUPPORT will be returned if the connected device does not support this. Check in advance with PUC_IsSupported (PUC_CAP_PP_OUT).
| [in] | hDevice | The device handle to be controlled |
| [out] | pWidth | The storage destination for the output width (nsec units) |
| PUCRESULT WINAPI PUC_GetQuantization | ( | PUC_HANDLE | hDevice, |
| UINT32 | nPoint, | ||
| USHORT * | pVal ) |
This retrieves one set of quantization table data stored to the device.
The number of quantization tables is defined in PUC_Q_COUNT.
| [in] | hDevice | The device handle to be controlled |
| [in] | nPoint | The position of the quantization table |
| [out] | pVal | The storage destination of the quantization table data |
| PUCRESULT WINAPI PUC_GetQuantization2 | ( | PUC_HANDLE | hDevice, |
| unsigned short * | pQvals ) |
This retrieves the whole quantization table of the device at once.
This returns the same values as calling PUC_GetQuantization for every point. Use the retrieved table as the pQVals argument of the decode functions.
| [in] | hDevice | The device handle to be controlled |
| [out] | pQvals | The storage destination for the quantization table. An array of PUC_Q_COUNT elements is required. |
| PUCRESULT WINAPI PUC_GetResolution | ( | PUC_HANDLE | hDevice, |
| UINT32 * | pWidth, | ||
| UINT32 * | pHeight ) |
This retrieves the device resolution.
| [in] | hDevice | The device handle to be controlled |
| [out] | pWidth | The storage destination for the horizontal resolution |
| [out] | pHeight | The storage destination for the vertical resolution |
| PUCRESULT WINAPI PUC_GetResolutionLimit | ( | PUC_HANDLE | hDevice, |
| PPUC_RESO_LIMIT_INFO | pLimitInfo ) |
This retrieves the resolution limit for the device, and minimum unit for altering the resolution.
| [in] | hDevice | The device handle to be controlled |
| [out] | pLimitInfo | The storage destination for resolution limit, and minimum unit for altering the resolution |
| PUCRESULT WINAPI PUC_GetRingBufferCount | ( | PUC_HANDLE | hDevice, |
| UINT32 * | pCount ) |
This retrieves the ring buffer count for continuous transfer.
| [in] | hDevice | The device handle to be controlled |
| [out] | pCount | The storage destination for the buffer count |
| PUCRESULT WINAPI PUC_GetSensorTemperature | ( | PUC_HANDLE | hDevice, |
| UINT32 * | pTemp ) |
This retrieves the device sensor temperature.
| [in] | hDevice | The device handle to be controlled |
| [out] | pTemp | The storage destination for the sensor temperature |
| PUCRESULT WINAPI PUC_GetSerialNo | ( | PUC_HANDLE | hDevice, |
| UINT64 * | pSerialNo ) |
This retrieves the device serial number.
| [in] | hDevice | The device handle to be controlled |
| [out] | pSerialNo | The storage destination for the serial number |
| PUCRESULT WINAPI PUC_GetSingleXferData | ( | PUC_HANDLE | hDevice, |
| PPUC_XFER_DATA_INFO | pXferData ) |
This retrieves the current live image from the device.
The image may appear fuzzy during continuous transfer.
Retrieve the size of the image data with PUC_GetXferDataSize.
Compressed data can be unpacked to luminace data with PUC_DecodeData.
| [in] | hDevice | The device handle to be controlled |
| [out] | pXferData | The storage destination for transfer data. Retrieve the required memory size with PUC_GetXferDataSize. When using PUC_DATA_DECOMPRESSED_GRAY, a size rounded up to a multiple of 4 must be allocated for the width. |
| PUCRESULT WINAPI PUC_GetSupportedGeneralInSignal | ( | PUC_HANDLE | hDevice, |
| PUC_GENERAL_IN_SIGNAL_TYPE | GenInType, | ||
| bool * | isSupported ) |
This retrieves whether the device supports the specified general input signal type. (GbE-2 only)
Not all signal types defined in PUC_GENERAL_IN_SIGNAL_TYPE are available on every model. Check with this function before calling PUC_SetGeneralInSignal.
| [in] | hDevice | The device handle to be controlled |
| [in] | GenInType | The signal type to check |
| [out] | isSupported | true : supported, false : not supported |
| PUCRESULT WINAPI PUC_GetSupportedGeneralOutSignal | ( | PUC_HANDLE | hDevice, |
| PUC_GENERAL_OUT_SIGNAL_TYPE | GenOutType, | ||
| bool * | isSupported ) |
This retrieves whether the device supports the specified general output signal type. (GbE-2 only)
Not all signal types defined in PUC_GENERAL_OUT_SIGNAL_TYPE are available on every model. Check with this function before calling PUC_SetGeneralOutSignal.
| [in] | hDevice | The device handle to be controlled |
| [in] | GenOutType | The signal type to check |
| [out] | isSupported | true : supported, false : not supported |
| PUCRESULT WINAPI PUC_GetSyncInDelay | ( | PUC_HANDLE | hDevice, |
| UINT32 * | pDelay ) |
This retrieves the delay of the SYNC IN signal for the device. (GbE-2 only)
PUC_ERROR_NOTSUPPORT will be returned if the connected device does not support this. Check in advance with PUC_IsSupported (PUC_CAP_SYNC_IN_DELAY).
| [in] | hDevice | The device handle to be controlled |
| [out] | pDelay | The storage destination for the delay (nsec units) |
| PUCRESULT WINAPI PUC_GetSyncInMode | ( | PUC_HANDLE | hDevice, |
| PUC_SYNC_MODE * | pMode, | ||
| PUC_SIGNAL * | pSignal ) |
This retrieves the synchronous signal input mode for the device.
| [in] | hDevice | The device handle to be controlled |
| [out] | pMode | The storage destination for the synchronous signal input mode (Internal/External) |
| [out] | pSignal | The storage destination for the polarity (positive polarity/negative polarity), It can be obtained only when external synchronization is set. |
| PUCRESULT WINAPI PUC_GetSyncOutDelay | ( | PUC_HANDLE | hDevice, |
| UINT32 * | pDelay ) |
This retrieves the delay value of device's synchronization signal output in nsec.
The value less than 100nsec is rounded up, so an error will occur.
| [in] | hDevice | The device handle to be controlled |
| [out] | pDelay | The storage destination for the delay amount (nsec units) |
| PUCRESULT WINAPI PUC_GetSyncOutMagnification | ( | PUC_HANDLE | hDevice, |
| UINT32 * | pMagnification ) |
This retrieves the output magnification rate for the synchronization signal.
| [in] | hDevice | The device handle to be controlled |
| [out] | pMagnification | The storage destination for the output magnification |
| PUCRESULT WINAPI PUC_GetSyncOutSignal | ( | PUC_HANDLE | hDevice, |
| PUC_SIGNAL * | pSignal ) |
This retrieves the synchronization signal output polarity for the device.
| [in] | hDevice | The device handle to be controlled |
| [out] | pSignal | The storage destination for the polarity (positive polarity/negative polarity) |
| PUCRESULT WINAPI PUC_GetSyncOutTimes | ( | PUC_HANDLE | hDevice, |
| PUC_SYNC_OUT_TIMES * | pTimes ) |
This retrieves the output times for the synchronization signal.
| [in] | hDevice | The device handle to be controlled |
| [out] | pTimes | The storage destination for the sync out times |
| PUCRESULT WINAPI PUC_GetSyncOutWidth | ( | PUC_HANDLE | hDevice, |
| UINT32 * | pWidth ) |
This retrieves the output width of synchronization signal for the device.
If it is less than 100nsec, it will be rounded up and an error will occur.
| [in] | hDevice | The device handle to be controlled |
| [out] | pWidth | The storage destination for the output width (nsec units) |
| PUCRESULT WINAPI PUC_GetTimeCode2EPOC | ( | PUINT8 | pSrc, |
| time_t * | time ) |
This converts the time code in the transfer data into epoch time. (GbE-2 only)
The time code is embedded in the transfer data header, so this can also be used for data saved offline.
For data of a model that has no time code, PUC_ERROR_NOTSUPPORT will be returned.
| [in] | pSrc | The transfer data |
| [out] | time | The storage destination for the epoch time (seconds) |
| PUCRESULT WINAPI PUC_GetTrigInDelay | ( | PUC_HANDLE | hDevice, |
| UINT32 * | pDelay ) |
This retrieves the delay of the TRIG IN signal for the device. (GbE-2 only)
PUC_ERROR_NOTSUPPORT will be returned if the connected device does not support this. Check in advance with PUC_IsSupported (PUC_CAP_TRIG_IN_DELAY).
| [in] | hDevice | The device handle to be controlled |
| [out] | pDelay | The storage destination for the delay (nsec units) |
| PUCRESULT WINAPI PUC_GetTrigOutWidth | ( | PUC_HANDLE | hDevice, |
| UINT32 * | pWidth ) |
This retrieves the output width of the TRIG OUT signal for the device. (GbE-2 only)
PUC_ERROR_NOTSUPPORT will be returned if the connected device does not support this. Check in advance with PUC_IsSupported (PUC_CAP_TRIG_OUT_WIDTH).
| [in] | hDevice | The device handle to be controlled |
| [out] | pWidth | The storage destination for the output width (nsec units) |
| PUCRESULT WINAPI PUC_GetXferDataSize | ( | PUC_HANDLE | hDevice, |
| UINT32 * | pDataSize ) |
This retrieves the size of transfer data from the device.
This will vary depending on the current resolution.
| [in] | hDevice | The device handle to be controlled |
| [out] | pDataSize | The storage destination for the data size |
| PUCRESULT WINAPI PUC_GetXferTimeOut | ( | PUC_HANDLE | hDevice, |
| UINT32 * | pSingleXferTimeOut, | ||
| UINT32 * | pContinuousXferTimeOut ) |
This retrieves the timeout duration (ms) for data transfer from the device.
| [in] | hDevice | The device handle to be controlled |
| [out] | pSingleXferTimeOut | The storage destination for the timeout duration (ms) for a single transfer |
| [out] | pContinuousXferTimeOut | The storage destination for the timeout duration (ms) for continuous transfer |
| PUCRESULT WINAPI PUC_Initialize | ( | ) |
This initializes the library.
Only use this function once the first time PUCLIB is used.
The termination operation is automatically performed when a process is terminated.
| PUCRESULT WINAPI PUC_IsSetupGPUDecode | ( | bool & | status | ) |
This retrieves whether GPU decode memory is allocated.
| [out] | status | true : allocated, false : not allocated. |
| PUCRESULT WINAPI PUC_IsSupported | ( | PUC_HANDLE | hDevice, |
| PUC_CAPABILITY | cap, | ||
| bool * | pIsSupported ) |
This checks whether the connected camera supports the specified capability.
Model-dependent APIs return PUC_ERROR_NOTSUPPORT on unsupported cameras. Use this function to check support beforehand instead of branching by device type.
| [in] | hDevice | The device handle to be controlled |
| [in] | cap | The capability to check |
| [out] | pIsSupported | The storage destination for the result (true = supported) |
| PUCRESULT WINAPI PUC_IsXferring | ( | PUC_HANDLE | hDevice, |
| BOOL * | pIsXferring ) |
This checks whether a continuous transfer is in progress.
| [in] | hDevice | The device handle to be controlled |
| [out] | pIsXferring | If a continuous transfer is in progress this will be TRUE, if not this will be FALSE. |
| PUCRESULT WINAPI PUC_OpenDevice | ( | UINT32 | nDeviceNo, |
| PPUC_HANDLE | pDeviceHandle ) |
This opens the device. (UC1 only)
Note that specifying a device number of the opened device closes the device temporarily.
| [in] | nDeviceNo | Specify the retrieved device ID here. |
| [out] | pDeviceHandle | Stores the handle to control the opened device. |
| PUCRESULT WINAPI PUC_OpenDevice2 | ( | UINT32 | index, |
| PPUC_HANDLE | pDeviceHandle ) |
This opens a device found by the last device search.
Specify the index of the device in the search result of PUC_DetectDevice2.
The connection method is selected automatically according to the device type, so this function can be used without regard to the model.
If no search has been performed, or if the index is out of range, PUC_ERROR_NOT_EXIST_DEVICE_NO will be returned.
| [in] | index | The index of the device in the search result |
| [out] | pDeviceHandle | The storage destination for the device handle |
| PUCRESULT WINAPI PUC_ResetDevice | ( | UINT32 | nDeviceNo | ) |
This resets the device. (UC1 only)
There is possibility for PUC_OpenDevice to return error even though device is detected. Please set this to resets device.
| [in] | nDeviceNo | Specify the retrieved device ID here. |
| PUCRESULT WINAPI PUC_ResetSequenceNo | ( | PUC_HANDLE | hDevice | ) |
This resets the sequence number.
| [in] | hDevice | The device handle to be controlled |
| PUCRESULT WINAPI PUC_SetEPOCTime | ( | PUC_HANDLE | hDevice, |
| UINT32 | year, | ||
| UINT32 | month, | ||
| UINT32 | day, | ||
| UINT32 | hour, | ||
| UINT32 | minute, | ||
| UINT32 | second ) |
This sets the clock of the device by specifying the date and time. (GbE-2 only)
The set time becomes the reference for the time code embedded in the transfer data header.
PUC_ERROR_NOTSUPPORT will be returned if the connected device does not support this. Check in advance with PUC_IsSupported (PUC_CAP_EPOC_TIME).
| [in] | hDevice | The device handle to be controlled |
| [in] | year | The year (western calendar) |
| [in] | month | The month |
| [in] | day | The day |
| [in] | hour | The hour |
| [in] | minute | The minute |
| [in] | second | The second |
| PUCRESULT WINAPI PUC_SetExposeDelay | ( | PUC_HANDLE | hDevice, |
| UINT32 | nDelay ) |
This sets the exposure delay of the device.
PUC_ERROR_NOTSUPPORT will be returned if the connected device does not support this. Check in advance with PUC_IsSupported (PUC_CAP_EXPOSE_DELAY).
Restarting the device will reset this setting.
The device resolution is 100nsec, so the specified value is truncated to a multiple of 100nsec.
| [in] | hDevice | The device handle to be controlled |
| [in] | nDelay | The delay (nsec units) |
| PUCRESULT WINAPI PUC_SetExposeTime | ( | PUC_HANDLE | hDevice, |
| UINT32 | nExpOnTime, | ||
| UINT32 | nExpOffTime ) |
This sets the exposure/non-exposure time of the device.
Opening the device will reset this setting.
Note that the return value of PUC_GetFramerateShutter function will be invalid if the exposure/non-exposure time is set directly with this function.
If it is less than 100nsec, it will be rounded up and an error will occur.
| [in] | hDevice | The device handle to be controlled |
| [in] | nExpOnTime | The exposure period (nsec units) |
| [in] | nExpOffTime | The non-exposure period (nsec units) |
| PUCRESULT WINAPI PUC_SetFanState | ( | PUC_HANDLE | hDevice, |
| PUC_MODE | nState ) |
This sets the state of the device fan.
Restarting the device will reset this setting.
PUC_ERROR_NOTSUPPORT will be returned if the connected device does not have a fan. Check in advance with PUC_IsSupported (PUC_CAP_FAN).
| [in] | hDevice | The device handle to be controlled |
| [in] | nState | The fan state (ON/OFF) |
| PUCRESULT WINAPI PUC_SetFramerateShutter | ( | PUC_HANDLE | hDevice, |
| UINT32 | nFramerate, | ||
| UINT32 | nShutterSpeedFps ) |
This sets the framerate and the shutter speed (1/fps) for the device.
Opening the device will reset this setting.
When executing this function, the return value of PUC_GetExposeTime will change.
Changing the frame rate resets the output magnification rate of synchronization signal to x1.
| [in] | hDevice | The device handle to be controlled |
| [in] | nFramerate | The framerate |
| [in] | nShutterSpeedFps | The shutter speed (1/fps) |
| PUCRESULT WINAPI PUC_SetGeneralInSignal | ( | PUC_HANDLE | hDevice, |
| int | portNo, | ||
| PUC_GENERAL_IN_SIGNAL_TYPE | type ) |
This assigns a signal type to the specified general input port. (GbE-2 only)
Restarting the device will reset this setting.
Confirm in advance with PUC_GetSupportedGeneralInSignal that the signal type is available.
| [in] | hDevice | The device handle to be controlled |
| [in] | portNo | The port number of the general input |
| [in] | type | The signal type to assign |
| PUCRESULT WINAPI PUC_SetGeneralOutSignal | ( | PUC_HANDLE | hDevice, |
| int | portNo, | ||
| PUC_GENERAL_OUT_SIGNAL_TYPE | type ) |
This assigns a signal type to the specified general output port. (GbE-2 only)
Restarting the device will reset this setting.
Confirm in advance with PUC_GetSupportedGeneralOutSignal that the signal type is available.
| [in] | hDevice | The device handle to be controlled |
| [in] | portNo | The port number of the general output |
| [in] | type | The signal type to assign |
| PUCRESULT WINAPI PUC_SetLEDMode | ( | PUC_HANDLE | hDevice, |
| PUC_MODE | nMode ) |
This sets the LED state of the device.
Restarting the device will reset this setting.
| [in] | hDevice | The device handle to be controlled |
| [in] | nMode | The LED state (ON/OFF) |
| PUCRESULT WINAPI PUC_SetNetworkInfo | ( | PUC_HANDLE | hDevice, |
| PUC_NETWORK_INFO_TYPE | type, | ||
| UINT32 | value ) |
This changes the network setting of the opened device. (GbE-2 only)
Specify which setting to change with type, and give the new value in value.
For PUC_NETWORK_INFO_TYPE::DHCP_ON and DHCP_OFF, the value argument is not used.
Changing the IP address will disconnect the current connection. Close the device with PUC_CloseDevice and reopen it with the new address.
PUC_ERROR_NOTSUPPORT will be returned if the connected device does not support this. Check in advance with PUC_IsSupported (PUC_CAP_NETWORK_INFO).
| [in] | hDevice | The device handle to be controlled |
| [in] | type | The setting to change |
| [in] | value | The value to set. For an IP address, subnet mask, or gateway, specify it as a 32-bit value. |
| PUCRESULT WINAPI PUC_SetPPOutDelay | ( | PUC_HANDLE | hDevice, |
| UINT32 | nDelay ) |
This sets the delay of the PP OUT (PTP pulse per second) signal for the device. (GbE-2 only)
Restarting the device will reset this setting.
The device resolution is 100nsec, so the specified value is truncated to a multiple of 100nsec.
| [in] | hDevice | The device handle to be controlled |
| [in] | nDelay | The delay (nsec units) |
| PUCRESULT WINAPI PUC_SetPPOutWidth | ( | PUC_HANDLE | hDevice, |
| UINT32 | nWidth ) |
This sets the output width of the PP OUT (PTP pulse per second) signal for the device. (GbE-2 only)
Restarting the device will reset this setting.
The device resolution is 100nsec, so the specified value is truncated to a multiple of 100nsec.
| [in] | hDevice | The device handle to be controlled |
| [in] | nWidth | The output width (nsec units) |
| PUCRESULT WINAPI PUC_SetQuantization | ( | PUC_HANDLE | hDevice, |
| UINT32 | nPoint, | ||
| USHORT | nVal ) |
This overwrites one set of quantization table data stored to the device.
The number of quantization tables is defined in PUC_Q_COUNT.
Restarting the device will reset this setting.
| [in] | hDevice | The device handle to be controlled |
| [in] | nPoint | The position of the quantization table |
| [in] | nVal | The quantization table data being set |
| PUCRESULT WINAPI PUC_SetQuantization2 | ( | PUC_HANDLE | hDevice, |
| unsigned short * | pQvals ) |
This sets the whole quantization table of the device at once.
Opening the device will reset this setting.
Note that GPU decoding does not take the quantization table as an argument and decodes on the assumption of the camera's initial table. If the table is changed with this function, the result of PUC_DecodeGPU will not match that of PUC_DecodeData.
| [in] | hDevice | The device handle to be controlled |
| [in] | pQvals | The quantization table to set. An array of PUC_Q_COUNT elements is required. |
| PUCRESULT WINAPI PUC_SetResolution | ( | PUC_HANDLE | hDevice, |
| UINT32 | nWidth, | ||
| UINT32 | nHeight ) |
This sets the device resolution.
Opening the device will reset this setting.
| [in] | hDevice | The device handle to be controlled |
| [in] | nWidth | Horizontal resolution |
| [in] | nHeight | Vertical resolution |
| PUCRESULT WINAPI PUC_SetRingBufferCount | ( | PUC_HANDLE | hDevice, |
| UINT32 | nCount ) |
This sets the ring buffer count for continuous transfer.
Opening the device will reset this setting.
| [in] | hDevice | The device handle to be controlled |
| [in] | nCount | The buffer count |
| PUCRESULT WINAPI PUC_SetSyncInDelay | ( | PUC_HANDLE | hDevice, |
| UINT32 | nDelay ) |
This sets the delay of the SYNC IN signal for the device. (GbE-2 only)
Restarting the device will reset this setting.
The device resolution is 100nsec, so the specified value is truncated to a multiple of 100nsec.
| [in] | hDevice | The device handle to be controlled |
| [in] | nDelay | The delay (nsec units) |
| PUCRESULT WINAPI PUC_SetSyncInMode | ( | PUC_HANDLE | hDevice, |
| PUC_SYNC_MODE | nMode, | ||
| PUC_SIGNAL | nSignal ) |
This sets the synchronous signal input mode for the device.
Restarting the device will reset this setting.
Changing the synchronization signal output mode resets the output magnification rate to x1.
When setting to external device synchronization, the exposure time is automatically adjusted considering the variation of external devices. Set the exposure time and framerate before setting the external device synchronization.
| [in] | hDevice | The device handle to be controlled |
| [in] | nMode | The synchronous signal input mode (Internal/External) |
| [in] | nSignal | Polarity (positive/negative), Specifying the polarity is not supported for devices prior to version 1.01. |
| PUCRESULT WINAPI PUC_SetSyncOutDelay | ( | PUC_HANDLE | hDevice, |
| UINT32 | nDelay ) |
This sets the delay value of device's synchronization signal output in nsec.
Restarting the device will reset this setting.
The value less than 100nsec is rounded up, so an error will occur.
| [in] | hDevice | The device handle to be controlled |
| [in] | nDelay | The delay (nsec units) |
| PUCRESULT WINAPI PUC_SetSyncOutMagnification | ( | PUC_HANDLE | hDevice, |
| UINT32 | nMagnification ) |
This sets the output magnification rate for the synchronization signal.
Opening the device will reset this setting.
Changing the frame rate or exposure/non-exposure time also resets the output magnification rate to x1.
| [in] | hDevice | The device handle to be controlled |
| [in] | nMagnification | The output magnification (e.g.: for 2x set to 2, for 4x set to 4). For 0.5x, set PUC_SYNC_OUT_MAGNIFICATION_0_5. |
| PUCRESULT WINAPI PUC_SetSyncOutSignal | ( | PUC_HANDLE | hDevice, |
| PUC_SIGNAL | nSignal ) |
This sets the synchronous signal output polarity for the device.
Restarting the device will reset this setting.
| [in] | hDevice | The device handle to be controlled |
| [in] | nSignal | The polarity (positive polarity/negative polarity) |
| PUCRESULT WINAPI PUC_SetSyncOutTimes | ( | PUC_HANDLE | hDevice, |
| PUC_SYNC_OUT_TIMES | nTimes ) |
This sets the output times for the synchronization signal.
| [in] | hDevice | The device handle to be controlled |
| [in] | nTimes | The sync out times value |
| PUCRESULT WINAPI PUC_SetSyncOutWidth | ( | PUC_HANDLE | hDevice, |
| UINT32 | nWidth ) |
This sets the output width of synchronization signal for the device.
Restarting the device will reset this setting.
Changing the output width resets the output magnification rate to x1.
If it is less than 100nsec, it will be rounded up and an error will occur.
| [in] | hDevice | The device handle to be controlled |
| [in] | nWidth | The output width of the synchronous signal (nsec units). |
| PUCRESULT WINAPI PUC_SetTimeOfDay | ( | PUC_HANDLE | hDevice, |
| UINT64 | epochSeconds ) |
This sets the clock of the device by specifying the epoch time. (GbE-2 only)
This has the same effect as PUC_SetEPOCTime, but the time is given in epoch seconds so the value obtained from time() can be passed as is.
PUC_ERROR_NOTSUPPORT will be returned if the connected device does not support this. Check in advance with PUC_IsSupported (PUC_CAP_EPOC_TIME).
| [in] | hDevice | The device handle to be controlled |
| [in] | epochSeconds | The epoch time (seconds) |
| PUCRESULT WINAPI PUC_SetTrigInDelay | ( | PUC_HANDLE | hDevice, |
| UINT32 | nDelay ) |
This sets the delay of the TRIG IN signal for the device. (GbE-2 only)
Restarting the device will reset this setting.
The device resolution is 100nsec, so the specified value is truncated to a multiple of 100nsec.
| [in] | hDevice | The device handle to be controlled |
| [in] | nDelay | The delay (nsec units) |
| PUCRESULT WINAPI PUC_SetTrigOutWidth | ( | PUC_HANDLE | hDevice, |
| UINT32 | nWidth ) |
This sets the output width of the TRIG OUT signal for the device. (GbE-2 only)
Restarting the device will reset this setting.
The device resolution is 100nsec, so the specified value is truncated to a multiple of 100nsec.
| [in] | hDevice | The device handle to be controlled |
| [in] | nWidth | The output width (nsec units) |
| PUCRESULT WINAPI PUC_SetupGPUDecode | ( | PUC_GPU_SETUP_PARAM | param | ) |
Allocates memory for GPU processing.
| [in] | param | This is a configuration parameter. |
| PUCRESULT WINAPI PUC_SetWhiteBalanceGain | ( | double | nGainR, |
| double | nGainG, | ||
| double | nGainB ) |
Sets the per-channel white balance gain (R/G/B) applied during GbE-2 color (bayer) decoding by PUC_DecodeData. 1.0 means no change. The value is stored process-globally and used by subsequent decodes.
| [in] | nGainR | Red gain (1.0 = no change) |
| [in] | nGainG | Green gain (1.0 = no change) |
| [in] | nGainB | Blue gain (1.0 = no change) |
| PUCRESULT WINAPI PUC_SetXferTimeOut | ( | PUC_HANDLE | hDevice, |
| UINT32 | nSingleXferTimeOut, | ||
| UINT32 | nContinuousXferTimeOut ) |
This sets the timeout duration (ms) for data transfer from the device.
Opening the device will reset this setting.
Set PUC_XFER_TIMEOUT_AUTO to automatically adjust the timeout duration based on the framerate.
Set PUC_XFER_TIMEOUT_INFINITE to disable timeout.
| [in] | hDevice | The device handle to be controlled |
| [in] | nSingleXferTimeOut | The timeout duration (ms) for a single transfer |
| [in] | nContinuousXferTimeOut | The timeout duration (ms) for continuous transfer |
| PUCRESULT WINAPI PUC_TeardownGPUDecode | ( | ) |
Releases memory used by GPU processing.