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

📄 lvdc.pas

📁 相机传输图像程序源代码 拜耳模式(RAW格式文件)与RGB图像数据互相转换函数库
💻 PAS
📖 第 1 页 / 共 2 页
字号:
//
// Delphi unit describing the DirectCapture dll interface
//
unit lvdc;

interface

uses windows;

type

HDCVIDEOWIN   = THandle;
HDCCONNECTION = THandle;
LVSTATUS        = cardinal;
HOVERLAYTEXT  = THandle;

function LvDcAllocConnection : HDCCONNECTION; stdcall;

function LvDcCreateOnScreenWin(Window : HWND) : HDCVIDEOWIN; stdcall;

function LvDcCreateOffScreenWin : HDCVIDEOWIN;  stdcall;

function LvDcLive(hDCVideoWin : HDCVIDEOWIN ; LiveSync : DWORD) : LVSTATUS;  stdcall;

function LvDcFreeze(hDCVideoWin : HDCVIDEOWIN ; FreezeSync : DWORD) : LVSTATUS;  stdcall;

function LvDcGetConnectionHandle(hDCVideoWin : HDCVIDEOWIN) : HDCCONNECTION;  stdcall;

function LvDcConnectWin(hDCConnection : HDCCONNECTION ; hDCVideoWin : HDCVIDEOWIN; Target : BYTE ) : LVSTATUS;  stdcall;

function LvDcDisconnectWin(hDCConnection : HDCCONNECTION) : LVSTATUS;  stdcall;

function LvDcIsWinConnected(hDCVideoWin : HDCVIDEOWIN) : boolean;  stdcall;

function LvDcSetResizeMode(hDCVideoWin : HDCVIDEOWIN; ResizeMode : DWORD; KeepSameVideoSize : boolean) : LVSTATUS; stdcall;

function LvDcGetResizeMode(hDCVideoWin : HDCVIDEOWIN) : LVSTATUS; stdcall;

function LvDcSetLiveAction(hDCVideoWin : HDCVIDEOWIN; LiveAction : DWORD) : LVSTATUS; stdcall;

function LvDcGetLiveAction(hDCVideoWin : HDCVIDEOWIN) : LVSTATUS; stdcall;

function LvDcSetFreezeAction(hDCVideoWin : HDCVIDEOWIN; FreezeAction : DWORD) : LVSTATUS; stdcall;

function LvDcGetFreezeAction(hDCVideoWin : HDCVIDEOWIN; FreezeAction : DWORD) : LVSTATUS; stdcall;

function LvDcSetMirrorMode(hDCVideoWin : HDCVIDEOWIN; MirrorMode : BYTE) : LVSTATUS; stdcall;

function LvDcGetMirrorMode(hDCVideoWin : HDCVIDEOWIN) : LVSTATUS; stdcall;

function LvDcSetWinSize(hDCVideoWin : HDCVIDEOWIN; Width : DWORD; Height : DWORD) : LVSTATUS; stdcall;

function LvDcGetWinSize(hDCVideoWin : HDCVIDEOWIN; Width : DWORD; Height : DWORD) : LVSTATUS; stdcall;

function LvDcSetWinVideoSize(hDCVideoWin : HDCVIDEOWIN; Width : DWORD; Height : DWORD) : LVSTATUS; stdcall;

function LvDcGetWinVideoSize(hDCVideoWin : HDCVIDEOWIN; Width : LPDWORD; Height : LPDWORD) : LVSTATUS; stdcall;

function LvDcSetWinPos(hDCVideoWin : HDCVIDEOWIN; XPos : DWORD; YPos : DWORD) : LVSTATUS; stdcall;

function LvDcGetWinPos(hDCVideoWin : HDCVIDEOWIN; XPos : LPDWORD; YPos : LPDWORD) : LVSTATUS; stdcall;

function LvDcCopyToClipboard(hDCVideoWin : HDCVIDEOWIN) : LVSTATUS; stdcall;

function LvDcGetBMP(hDCVideoWin : HDCVIDEOWIN) : THandle; stdcall;

function LvDcSetVisibility(hDCVideoWin : HDCVIDEOWIN; Vis : DWORD) : LVSTATUS; stdcall;

function LvDcGetVisibility(hDCVideoWin : HDCVIDEOWIN) : LVSTATUS; stdcall;

function LvDcAddOverlayText(hDCVideoWin : HDCVIDEOWIN; Text : LPSTR; x : integer ; y : integer ; Enable : BOOL; color : COLORREF; hfont : HFONT) : HOVERLAYTEXT; stdcall;

function LvDcChangeOverlayText(hDCVideoWin : HDCVIDEOWIN;  hText : HOVERLAYTEXT; Text : LPSTR) : LVSTATUS; stdcall;

function LvDcChangeOverlayTextPos(hDCVideoWin : HDCVIDEOWIN;  hText : HOVERLAYTEXT; x,y : integer) : LVSTATUS; stdcall;

function LvDcChangeOverlayTextFont(hDCVideoWin : HDCVIDEOWIN;  hText : HOVERLAYTEXT; color : COLORREF; hfont : HFONT) : LVSTATUS; stdcall;

function LvDcChangeOverlayTextEnable(hDCVideoWin : HDCVIDEOWIN;  hText : HOVERLAYTEXT; Enable : BOOL) : LVSTATUS; stdcall;

function LvDcDeleteOverlayText(hDCVideoWin : HDCVIDEOWIN;  hText : HOVERLAYTEXT) : LVSTATUS; stdcall;

function LvDcSetUserMask(hDCVideoWin : HDCVIDEOWIN;  Bitmap : HBITMAP; Stretch, Enable : BOOl) : LVSTATUS; stdcall;

function LvDcLoadUserMask(hDCVideoWin : HDCVIDEOWIN; Filename : LPSTR; Stretch, Enable : BOOl) : LVSTATUS; stdcall;

function LvDcUpdateUserMask(hDCVideoWin : HDCVIDEOWIN; Enable : BOOl) : LVSTATUS; stdcall;

function LvDcGetCameraHeight(hDCVideoWin : HDCVIDEOWIN) : LVSTATUS; stdcall;

function LvDcGetCameraWidth(hDCVideoWin : HDCVIDEOWIN) : LVSTATUS; stdcall;

function LvDcSetColorFormat(hDCVideoWin : HDCVIDEOWIN; ColorFormat : BYTE) : LVSTATUS; stdcall;

function LvDcGetColorFormat(hDCVideoWin : HDCVIDEOWIN) : BYTE; stdcall;

function LvDcAssociateOnWin(hDCOffVideoWin, hDCVideoWin : HDCVIDEOWIN) : LVSTATUS; stdcall;

function LvDcSetBrightness(hDCVideoWin : HDCVIDEOWIN; Level_0_100 : Single ) : LVSTATUS; stdcall;

function LvDcSetContrast(hDCVideoWin : HDCVIDEOWIN; Level_0_100 : Single ) : LVSTATUS; stdcall;

function LvDcSetHue(hDCVideoWin : HDCVIDEOWIN; Level_0_100 : Single ) : LVSTATUS; stdcall;

function LvDcSetSaturation(hDCVideoWin : HDCVIDEOWIN; Level_0_100 : Single ) : LVSTATUS; stdcall;

function LvDcGetBrightness(hDCVideoWin : HDCVIDEOWIN) : Single; stdcall;

function LvDcGetContrast(hDCVideoWin : HDCVIDEOWIN) : Single; stdcall;

function LvDcGetHue(hDCVideoWin : HDCVIDEOWIN) : Single; stdcall;

function LvDcGetSaturation(hDCVideoWin : HDCVIDEOWIN) : Single; stdcall;

function LvDcLoadLUT(hDCVideoWin : HDCVIDEOWIN; Values : PBYTE; NrItem : Word) : LVSTATUS; stdcall;

function LvDcEnableLog(FileName : LPSTR) : LVSTATUS; stdcall;

function LvDcDisableLog : LVSTATUS; stdcall;

function LvDcGetVersion: DWORD; stdcall;

function LvDcCreateFont(FontName : LPSTR; PointSize : DWORD; UnderLine, Strikethrough, Italic, Bold : BOOL): THandle; stdcall

function LvDcSetLiveMode(hDCVideoWin : HDCVIDEOWIN; LiveMode : DWORD ) : LVSTATUS; stdcall;

function LvDcGetLiveMode(hDCVideoWin : HDCVIDEOWIN) : DWORD; stdcall;

function LvDcGetVideoType(hDCConnection : HDCCONNECTION ): DWORD; stdcall;

function LvDcEnableWin(hDCVideoWin : HDCVIDEOWIN) : LVSTATUS; stdcall;

function LvDcIsLive(hDCVideoWin : HDCVIDEOWIN): BOOL; stdcall;

function LvDcGetWinType(hDCVideoWin : HDCVIDEOWIN): DWORD; stdcall;

function LvDcCopyWin(hDCSrcWin : HDCVIDEOWIN; hDCDestWin : HDCVIDEOWIN): LVSTATUS; stdcall;

function LvDcGetOptocoupler(hDCVideoWin : HDCVIDEOWIN): DWORD; stdcall;

function LvDcSetOptocoupler(hDCVideoWin : HDCVIDEOWIN; OptoMask : DWORD): LVSTATUS; stdcall;

function LvDcSaveBMP(hDCVideoWin : HDCVIDEOWIN; Filename : LPSTR): LVSTATUS; stdcall;


// Resize modes for LvDcSetResizeMode
const
RM_CLIP=                              $0001;
	// OnScreenWindow definition -
	//& The window can be freely resized by the user but the video
	//& will be clipped to match the size of the window with the visiable portion of the video
	//& centered in window. Scroll bars	will be added to the window as necessary.
	//
	// OffScreenWindow definition -
	//& The video will be clipped to match the size of the window with the visiable
	//& portion of the video centered in window.
	//
RM_SCALE=                            $0002;
	// OnScreenWindow definition -
	//& The window can be freely resized by the user and the video will
	//& be scaled to match the size of the window.
	//
	// OffScreenWindow definition -
	//& The video will be scaled to match the size of the window.
	//
RM_CLIPFIXED=                        $0004;
	// OnScreenWindow definition -
	//& The video window will be sized to match the max size of the video
	//& source and the window size will be fixed and unalterable by the user.
	//
	// OffScreenWindow definition -
	//& The video window will be sized to match the maximum size of the video source.
	//
RM_SCALEFIXED=                         $0008;
	// OnScreenWindow definition -
	//& The video will be clipped to match the size of the window with the visiable 
	//& portion of the video centered in window. Also scroll bars will be added if
	//& necessary. The size of the window will be fixed and unalterable by the user.
	//
	// OffScreenWindow definition -
	//& Same as RM_CLIPFIXED.
	//
RM_SOURCESIZE=                        $0010;
	// OnScreenWindow definition -
	//& The video will be scaled to fit the size of the window and the size
	//& of the window will be fixed and unalterable by the user.
	//
	// OffScreenWindow definition -
	//Same as RM_SCALE.
	//
RM_FROMONSCREEN=                      $0020;
	// OnScreenWindow definition -
	//& No Meaning
	//
	// OffScreenWindow definition -
	//& The resize mode of the window will be made to match the associated
	//& on screen video window.
	//.
 RM_LAST=$0040;

//[DEFINE!] MirrorModes
// Mirroring mode definitions
 MM_NONE=                             $0001;
	// No Mirroring
 MM_VERTICAL=                         $0002;
	// Mirroring along the vertical axis
 MM_HORIZONTAL=                       $0004;
	// Mirroring along the horizontal axis
 MM_BOTH=                             $0008;
	// Mirroring along both the horizontal and vertical axis

⌨️ 快捷键说明

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