⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lvbus_lvcamusb.h

📁 相机传输图像程序源代码 拜耳模式(RAW格式文件)与RGB图像数据互相转换函数库
💻 H
字号:
#ifndef ___LVBUS_LVCAMUSB_H
#define ___LVBUS_LVCAMUSB_H

#include <lvbus.h>

#include <lvpackon.h>

#ifdef __cplusplus
    extern "C" {
#endif

// typedef struct _tagLvUSBAcquisition LvUSBAcquisition;
// typedef struct _tagLvUSBImageInfo LvUSBImageInfo;
// typedef void (WINAPI* LVUSBGrabCallbackFunction) (U32BIT ImgNr, U32BIT CurrentImgNr, LvBusAcquisition *ImgCfg, LvBusImageInfo* ImgInfo);

typedef struct _tagLvUSBAcquisition {
    U32BIT Size;            // Size of the structure. sizeof(LvGvpAcquisition)+(NrBuffer-1)*sizeof(U8BIT *)
    U32BIT Flags;           // Flags and modifiers.
    // acquisition mode (binning, partial, etc.)
    U32BIT AcqSizeMode;
    U32BIT AcqSizeWidth;
    U32BIT AcqSizeHeight;
    U32BIT AcqSizeClock;
    // Image params
    U32BIT ImgStartX;       // Image X origin in pixels
    U32BIT ImgStartY;       // Image Y origin in lines
    U32BIT ImgWidth;        // Image X width in pixels
    U32BIT ImgHeight;       // Image Y width in lines
    U32BIT ColorFormat;     // ColF_ definitions in dsydef.h
    // Processing
    LVRAWPTR UserParam;     // Parameter for user app
    // LVBusGrabCallbackFunction GrabCallback;  // Callback function.
    // Buffer params
    U32BIT LineIncrement;   // Raw format=ImgWidth*PixelSize.
                            // Better implementations can use this value to avoid
                            // reformatting at app level.
    U32BIT NrBuffer;        // Nr of acqusition buffers
    U32BIT *LockTable;
    U32BIT *CurrentFrame;
    U8BIT  *Buffer[1];      // Pointers to NrBuffer buffers of LineIncrement*ImgHeight each
                            // These may be allocated at application level or by
                            // the library
} LvUSBAcquisition;

typedef struct _tagLvUSBTimeStamp {
    U32BIT High;
    U32BIT Low;
} LvUSBTimeStamp;

typedef struct _tagLvUSBImageInfo {
    U32BIT Status;
    U32BIT PixelType;
    U32BIT SizeX;
    U32BIT SizeY;
    U32BIT OffsetX;
    U32BIT OffsetY;
    U32BIT SeqStatus;
    LvUSBTimeStamp TimeStamp;
    U32BIT FrameNumber;
} LvUSBImageInfo;



typedef struct _tagLvUSBVersionInfo {
    U32BIT      dwStructSize;               //!< size of this structure
    U32BIT      dwSerialNumber;             //!< serial number
    U8BIT       szDeviceName[8];            //!< short name of device

    U16BIT      wSensorType;                //!< image sensor type, see ST_XX constants
    U8BIT       bDSPType;                   //!< DSP type, see DSP_XX constants
    U8BIT       bFLASHType;                 //!< FLASH type, see FLASH_XX constants
    U8BIT       bFPGAType;                  //!< FPGA type, see FPGA_XX constants
    U8BIT       bCPLDType;                  //!< CPLD type, see CPLD_XX constants
    U8BIT       bUSBType;                   //!< USB controller type, see USB_XX constants

    U16BIT      wBuildType;                 //!< Type of application
    U8BIT       bReserved[3];               //!< reserved for future use

    U16BIT      wBootldrVersion;            //!< DSP bootloader firmware version (running)
    U16BIT      wAppVersion;                //!< DSP application firmware version (running)
    U16BIT      wFPGAVersion;               //!< FPGA configuration version (running)
    U16BIT      wCPLDVersion;               //!< CPLD configuration version (running)

    U16BIT      wBootldrVersionFlash;       //!< DSP bootloader firmware version (in flash memory)
    U16BIT      wAppVersionFlash;           //!< DSP application firmware version (in flash memory)
    U16BIT      wFPGAVersionFlash;          //!< FPGA configuration version (in flash memory)
    U16BIT      wCPLDVersionFlash;          //!< CPLD configuration version (in flash memory)

    U32BIT      dwMaxBootLdrSize;           //!< max. size of Bootloader firmware data
    U32BIT      dwMaxAppSize;               //!< max. size of DSP application firmware data
    U32BIT      dwMaxFPGASize;              //!< max. size of FPGA configuration data
    U32BIT      dwMaxCPLDSize;              //!< max. size of CPLD configuration data
    U32BIT      dwSDRAMSize;

} LvUSBVersionInfo;




#ifdef _MSC_VER
typedef LVSTATUS (__stdcall *FnLvBus_Reset)(int Device, U32BIT Timeout);
typedef LVSTATUS (__stdcall *FnLvBus_AcqFreeze)(int Device, U32BIT);
#else
typedef LVBUSAPI(LVSTATUS) (*FnLvBus_Reset)(int Device, U32BIT Timeout);
typedef LVBUSAPI(LVSTATUS) (*FnLvBus_AcqFreeze)(int Device, U32BIT);
#endif

LVBUSAPI(LVSTATUS) LvBus_IsDeviceConnected(int Device);
LVBUSAPI(LVSTATUS) LvBus_GetDeviceId(int Device, U32BIT *VendId, U32BIT *DevId);
LVBUSAPI(LVSTATUS) LvBus_GetImage(int Device, char **Mem, void *Hdr);

LVBUSAPI(LVSTATUS) LvBus_Reset(int Device, U32BIT Timeout);

LVBUSAPI(LVSTATUS) LvBus_AcqLive(int Device, U32BIT);
LVBUSAPI(LVSTATUS) LvBus_AcqFreeze(int Device, U32BIT);
LVBUSAPI(LVSTATUS) LvBus_AcqReset(int Device, U32BIT);
LVBUSAPI(LVSTATUS) LvBus_AcqSetScaleMode(int Device, U32BIT ScaleMode, U32BIT Width, U32BIT Height);
LVBUSAPI(LVSTATUS) LvBus_AcqGetScaleMode(int Device, U32BIT *ScaleMode, U32BIT *Width, U32BIT *Height);

LVBUSAPI(LVSTATUS) LvBus_AcqSetShutter(int Device, U32BIT uSec);
LVBUSAPI(LVSTATUS) LvBus_AcqGetShutter(int Device, U32BIT* uSec);
LVBUSAPI(LVSTATUS) LvBus_AcqGetShutterAndLimits(int Device, U32BIT* uSec, U32BIT* MinuSec, U32BIT* MaxuSec);
LVBUSAPI(LVSTATUS) LvBus_AcqSetGain(int Device, U32BIT Type, U32BIT Gain);
LVBUSAPI(LVSTATUS) LvBus_AcqGetGain(int Device, U32BIT Type, U32BIT* CurrGain, U32BIT* MinGain, U32BIT* MaxGain);
LVBUSAPI(LVSTATUS) LvBus_AcqGetBlackLevel(int Device, U32BIT* CurrBlackLevel, U32BIT* MinBlackLevel, U32BIT* MaxBlackLevel);
LVBUSAPI(LVSTATUS) LvBus_AcqSetBlackLevel(int Device, U32BIT BlackLevel);

LVBUSAPI(LVSTATUS) LvBus_Query(int Device, U32BIT QueryItem, U32BIT Param, U32BIT *Value);

LVBUSAPI(LVSTATUS) LvBus_StreamLink(int Device, U32BIT Mode);
LVBUSAPI(LVSTATUS) LvBus_StreamUnlink(int Device);
LVBUSAPI(LVSTATUS) LvBus_StreamStart(int Device, U32BIT NrImg);
LVBUSAPI(LVSTATUS) LvBus_StreamStop(int Device);
LVBUSAPI(LVSTATUS) LvBus_StreamSetCfg(int Device, LvBusAcquisition *Cfg);
LVBUSAPI(LVSTATUS) LvBus_StreamGetCfg(int Device, LvBusAcquisition *Cfg);
LVBUSAPI(LVSTATUS) LvBus_StreamIsAlive(int Device);

LVBUSAPI(LVSTATUS) LvBus_SeqActivate(int Device, void *Cfg, int NrBuffer, U32BIT *BufferOffset);
LVBUSAPI(LVSTATUS) LvBus_SeqInit(int Device);
LVBUSAPI(LVSTATUS) LvBus_SeqStart(int Device);
LVBUSAPI(LVSTATUS) LvBus_SeqStop(int Device);
LVBUSAPI(LVSTATUS) LvBus_SeqPause(int Device);
LVBUSAPI(BOOL)     LvBus_SeqIsPaused(int Device);
LVBUSAPI(LVSTATUS) LvBus_SeqContinue(int Device);
LVBUSAPI(LVSTATUS) LvBus_SeqSetExtEvent(int Device, int ExtEvent);
LVBUSAPI(LVSTATUS) LvBus_SeqGetExtEvent(int Device, int *ExtEvent);
LVBUSAPI(LVSTATUS) LvBus_SeqARSetShutterTime(int Device, U32BIT Shtusec);
LVBUSAPI(LVSTATUS) LvBus_SeqARGetShutterTime(int Device, U32BIT *Shtusec);
LVBUSAPI(LVSTATUS) LvBus_SeqARSetFlashMode(int Device, int FshMode, int Enabled);
LVBUSAPI(LVSTATUS) LvBus_SeqARGetFlashMode(int Device, int *FshMode, int *Enabled);
LVBUSAPI(LVSTATUS) LvBus_SeqARSetRestartDelay(int Device, U32BIT usec);
LVBUSAPI(LVSTATUS) LvBus_SeqARGetRestartDelay(int Device, U32BIT *usec);
LVBUSAPI(LVSTATUS) LvBus_SeqGetFreeIO(int Device, U32BIT *Opto, U32BIT *Gpio);
LVBUSAPI(LVSTATUS) LvBus_SeqSetFreeIO(int Device, U32BIT Opto, U32BIT OptoMask, U32BIT Gpio, U32BIT GpioMask);
LVBUSAPI(LVSTATUS) LvBus_LoadApplicationFromFile(int Device, char *FileName);
LVBUSAPI(LVSTATUS) LvBus_GetVersionInfo(int Device, LvUSBVersionInfo *Info);
LVBUSAPI(LVSTATUS) LvBus_ReadNovram(int Device, int MB, LvUSBFullNovram *Nvr);
LVBUSAPI(LVSTATUS) LvBus_GetDesignNames(int Device, char *Buffer, int Size);
LVBUSAPI(LVSTATUS) LvBus_WriteNovram(int Device, int MB, LvUSBFullNovram *Nvr);
LVBUSAPI(LVSTATUS) LvBus_GetLog(int Device, char *Buffer, int Size);
LVBUSAPI(LVSTATUS) LvBus_SendCameraData(int Device, void *Buffer, int Size);
LVBUSAPI(LVSTATUS) LvBus_FindCameraData(int Device, void *Buffer, int *Size);

LVBUSAPI(LVSTATUS) LvBus_LoadBootloaderFromFile(int Device, char *FileName);
LVBUSAPI(LVSTATUS) LvBus_LoadCPLDFromFile(int Device, char *FileName);

#include <lvpackof.h>

#ifdef __cplusplus
    };
#endif


#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -