📄 dapproc.ah
字号:
#ifndef ___DACOLDEC_AH
#define ___DACOLDEC_AH
#include <lvdef.h>
#include <dsylib.h>
#include <dsapp.h>
#define DaPProc_Name "DaPProc.dll"
enum _DaPProcess {
DaPProcess_ClearAll=-2,
DaPProcess_All=-1,
DaPProcess_None,
DaPProcess_ColorDecode,
DaPProcess_NoiseReduction,
DaPProcess_WhiteBalance,
DaPProcess_ColorSpace,
DaPProcess_ShadingCorrection,
DaPProcess_Last,
DaPProcess_Internal,
DaPProcess_Copy,
DaPProcess_LastInternal
};
#define DaPPFlag_Default 0x00
#define DaPPFlag_GlobalLUT 0x01
#define DaPPFlag_HP1 0x02
#define DaPPFlag_VP1 0x04
#define DaPPFlag_BayerForce 0x08
#define DaPPFlag_RXLBayer 0x10
// following DaPPFlagBayer_ definitions are repeated in Bayer.cpp,
// if changed, must be changed also there!!!
#define DaPPFlagBayer_KeepSaturatedWhite 0x00100000ul
#define DaPPFlagBayer_IgnoreSaturated 0x00200000ul
#define DaPPFlagBayer_3x3_Bilinear 0x00000000ul
#define DaPPFlagBayer_2x2_Nearest 0x01000000ul
#define DaPPFlagBayer_5x5_Grouping 0x02000000ul
#define DaPPFlagBayer_5x5_Gradients 0x04000000ul
#define DaPPStatus_None 0x00000000
#define DaPPStatus_NoDDraw 0x00000001
#define DaPPStatus_DDrawOnCPUMemory 0x00000002
#define DaPPStatus_DDrawLimitsImageDim 0x00000004
#define DaPPParam_Nr 10 // The number bigger then the maximum of the DaPPParamShCorr* -- keep updated when new one is added
// keep synchronised with LvCCParamShCorr_* params in lvcconv.h
#define DaPPParamShCorr_AcquireBlackImg 0x01
#define DaPPParamShCorr_AcquireWhiteImg 0x02
#define DaPPParamShCorr_GetImagePointers 0x03
#define DaPPParamShCorr_RecalcFactorMatrix 0x04
#define _MaxPreProcessRect 64
#define _MaxPreProcess 32
typedef struct _tagDaPProcCfg {
U16BIT Size; // must be filled with sizeof(DaPProcCfg)
// Temp (debug)
HDEVICE hDevice;
} DaPProcCfg;
typedef struct _tagDaPProcStat {
int FnType;
int FnId;
int FnId0;
double Time;
int Count;
} DaPProcStat;
typedef struct _tagDaPProcStatus {
U16BIT Size; // must be filled with sizeof(DaPProcStatus)
// Decode Rectangle list
U32BIT NrPreProcessRect;
RECT PreProcessRect[_MaxPreProcessRect];
U32BIT StatusFlag;
// Statistic
int NrStat;
DaPProcStat Stat[_MaxPreProcess];
} DaPProcStatus;
// New type used for passing parameters to ShadingCorrection function
typedef struct {
unsigned char *BlackImage;
unsigned char *WhiteImage;
DWORD LineIncrement;
DWORD FullImgWidth;
DWORD FullImgHeight;
int BitDepth; // Pixel size (in bits)
DWORD Command; // one of DaPPParamShCorr_* constants
} DaPProcRefImage;
// just for backward compatibility -- in the fist release the struct was named RefImage
#define RefImage DaPProcRefImage
#ifndef __UNIX__
#ifdef _MSC_VER
#ifdef __WIN32__
typedef __declspec(dllimport) U32BIT (_cdecl *TPProcAddPreProcessRect)(void *, RECT *);
typedef __declspec(dllimport) U32BIT (_cdecl *TPProcEmptyPreProcessRectList)(void *);
typedef __declspec(dllimport) LVSTATUS (_cdecl *TPProcPreProcessImage)(void *, U32BIT, BOOL);
typedef __declspec(dllimport) LVSTATUS (_cdecl *TPProcSetDestinationWindow)(void *, HWND);
typedef __declspec(dllimport) LVSTATUS (_cdecl *TPProcEqualizeColorImage)(void *, RECT *);
typedef __declspec(dllimport) LVSTATUS (_cdecl *TPProcSetColorLUT)(void *, unsigned char *, unsigned char *, unsigned char *);
typedef __declspec(dllimport) LVSTATUS (_cdecl *TPProcGetColorLUT)(void *, unsigned char *, unsigned char *, unsigned char *);
typedef __declspec(dllimport) LPBITMAPINFO (_cdecl *TPProcGetUserBufferBitmapInfo)(void *);
typedef __declspec(dllimport) LVSTATUS (_cdecl *TPProcAddPreProcessFunction)(void *, int, DWORD, DWORD);
typedef __declspec(dllimport) LVSTATUS (_cdecl *TPProcChangePreProcessParam)(void *, int, DWORD, int);
typedef __declspec(dllimport) LVSTATUS (_cdecl *TPProcSetDestinationBuffer)(void *, unsigned char *, int, int, U32BIT *);
typedef __declspec(dllimport) LvROIInfo *(_cdecl *TPProcGetUserBufferROI)(void *);
typedef __declspec(dllimport) LVSTATUS (_cdecl *TPProcSetInputROI)(void *, LvROIInfo *);
typedef __declspec(dllimport) U32BIT (_cdecl *TPProcGetUserBufferSize)(void *);
typedef __declspec(dllimport) LVSTATUS (_cdecl *TPProcResetPreProcess)(void *, int, int);
typedef __declspec(dllimport) BOOL (_cdecl *TPProcNoiseReductionReady)(void *, int);
#else
typedef U32BIT(CALLBACK *TPProcAddPreProcessRect)(void *, RECT *);
typedef U32BIT(CALLBACK *TPProcEmptyPreProcessRectList)(void *);
typedef LVSTATUS(CALLBACK *TPProcPreProcessImage)(void *, U32BIT, BOOL);
typedef LVSTATUS(CALLBACK *TPProcSetDestinationWindow)(void *, HWND);
typedef LVSTATUS(CALLBACK *TPProcEqualizeColorImage)(void *, RECT *);
typedef LVSTATUS(CALLBACK *TPProcSetColorLUT)(void *, unsigned char *, unsigned char *, unsigned char *);
typedef LVSTATUS(CALLBACK *TPProcGetColorLUT)(void *, unsigned char *, unsigned char *, unsigned char *);
typedef LPBITMAPINFO(CALLBACK *TPProcGetUserBufferBitmapInfo)(void *);
typedef LVSTATUS(CALLBACK *TPProcAddPreProcessFunction)(void *, int, DWORD, DWORD);
typedef LVSTATUS(CALLBACK *TPProcChangePreProcessParam)(void *, int, DWORD, int);
typedef LVSTATUS(CALLBACK *TPProcSetDestinationBuffer)(void *, unsigned char *, int, int, U32BIT *);
typedef LvROIInfo *(CALLBACK *TPProcGetUserBufferROI)(void *);
typedef LVSTATUS(CALLBACK *TPProcSetInputROI)(void *, LvROIInfo *);
typedef U32BIT(CALLBACK *TPProcGetUserBufferSize)(void *);
typedef LVSTATUS(CALLBACK *TPProcResetPreProcess)(void *, int, int);
typedef BOOL (CALLBACK *TPProcNoiseReductionReady)(void *, int);
#endif
typedef struct _tagDaPProcIf {
TPProcAddPreProcessRect AddPreProcessRect;
TPProcEmptyPreProcessRectList EmptyPreProcessRectList;
TPProcPreProcessImage PreProcessImage;
TPProcSetDestinationWindow SetDestinationWindow;
TPProcEqualizeColorImage EqualizeColorImage;
TPProcSetColorLUT SetColorLUT;
TPProcGetColorLUT GetColorLUT;
TPProcGetUserBufferBitmapInfo GetUserBufferBitmapInfo;
TPProcAddPreProcessFunction AddPreProcessFunction;
TPProcChangePreProcessParam ChangePreProcessParam;
TPProcSetDestinationBuffer SetDestinationBuffer;
TPProcGetUserBufferROI GetUserBufferROI;
TPProcSetInputROI SetInputROI;
TPProcGetUserBufferSize GetUserBufferSize;
TPProcResetPreProcess ResetPreProcess;
TPProcNoiseReductionReady NoiseReductionReady;
} DaPProcIf;
#else
// Borland
typedef struct _tagDaPProcIf {
LVDAPAPI(U32BIT)(_cdecl *AddPreProcessRect)(void *App, RECT *r);
LVDAPAPI(U32BIT)(_cdecl *EmptyPreProcessRectList)(void *App);
LVDAPAPI(LVSTATUS)(_cdecl *PreProcessImage)(void *App, U32BIT Offset, BOOL TimeStat);
LVDAPAPI(LVSTATUS)(_cdecl *SetDestinationWindow)(void *App, HWND hWnd);
LVDAPAPI(LVSTATUS)(_cdecl *EqualizeColorImage)(void *App, RECT *Rect);
LVDAPAPI(LVSTATUS)(_cdecl *SetColorLUT)(void *App, unsigned char *Red, unsigned char *Green, unsigned char *Blue);
LVDAPAPI(LVSTATUS)(_cdecl *GetColorLUT)(void *App, unsigned char *Red, unsigned char *Green, unsigned char *Blue);
LVDAPAPI(LPBITMAPINFO)(_cdecl *GetUserBufferBitmapInfo)(void *App);
LVDAPAPI(LVSTATUS)(_cdecl *AddPreProcessFunction)(void *App, int WhichProcess, DWORD Flags, DWORD Param);
LVDAPAPI(LVSTATUS)(_cdecl *ChangePreProcessParam)(void *App, int WhichProcess, DWORD Param, int Order);
LVDAPAPI(LVSTATUS)(_cdecl *SetDestinationBuffer)(void *App, unsigned char *Buffer, int Size, int Format, U32BIT *NeededSize);
LVDAPAPI(LvROIInfo *)(_cdecl *GetUserBufferROI)(void *App);
LVDAPAPI(LVSTATUS)(_cdecl *SetInputROI)(void *App, LvROIInfo *Roi);
LVDAPAPI(U32BIT)(_cdecl *GetUserBufferSize)(void *App);
LVDAPAPI(LVSTATUS)(_cdecl *ResetPreProcess)(void *App, int WhichProcess, int Order);
LVDAPAPI(BOOL) (_cdecl *NoiseReductionReady)(void *App, int Order);
} DaPProcIf;
#endif
#endif
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -