1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
| unit uctools;
interface
uses Windows;
const vformat: array[0..6, 0..4] of string =
(('752 x 480','','','',''),
('752 x 480','','','',''),
('1280 x 1024','640 x 512','640 x 480 ROI','320 x 240 ROI',''),
('2048 x 1536','1024 x 768','640 x 480','512 x 384','1280 x 1024 ROI'),
('2592 x 1944','1280 x 960','1024 x 768','640 x 480','1280 x 1024 ROI'),
('1024 x 768','','','',''),
('1360 x 1024','','','',''));
type PARAMETER =
(
PARAMETER_1 = 0,
PARAMETER_2 = 1,
PARAMETER_3 = 2,
PARAMETER_4 = 3
);
type DS_FILE_TYPE =
(
FILE_JPG = 1,
FILE_BMP = 2,
FILE_RAW = 4
);
const para: array[0..3] of PARAMETER = (PARAMETER_1,PARAMETER_2,PARAMETER_3,PARAMETER_4);
type UC_RUNMODE =
(
RUNMODE_PLAY=0,
RUNMODE_PAUSE=1,
RUNMODE_STOP=2
);
//***********************************************************************************************
function SoftTrigger() : Shortint ; stdcall;
function GetCamNumber(var camno:byte) : Shortint ; stdcall;
function CameraWriteSerial(var Sn : byte; len : byte): Shortint; stdcall;
function CameraReadSerial(var Sn : byte): Shortint; stdcall;
function CameraGetMultiCameraNumber(var CamTotal : byte):shortint; stdcall;
function CameraUnInit() : Shortint; stdcall ;
function InitCamera(callback:pointer;callback_mode,res:integer; twnd :hwnd;c : Pointer;CamNum : byte) : Shortint ; stdcall;
function CameraPlay(value : byte) : Shortint ; stdcall;
function CameraStop() : Shortint ; stdcall;
function set_runmode(runmode:UC_RUNMODE) : Shortint ; stdcall;
function CameraGetImageSize(var pWidth, pHeight: integer ) : Shortint ; stdcall;
function Get_ImageBuffer(var tim :PBYTE) : Shortint ; stdcall;
function Get_ProcImage(var tim :pbyte) : Shortint ; stdcall;
function Get_GrabStopImage(var tim :pbyte) : Shortint ; stdcall;
function CameraCaptureFile(filename : string;filetype : byte) : Shortint ; stdcall;
function CameraSetAeState(state : bool) : Shortint ; stdcall;
function CameraGetAeState(var state : bool) : Shortint ; stdcall;
function CameraSaveParameter(group : PARAMETER ) : Shortint ; stdcall;
function CameraReadParameter(group : PARAMETER ) : Shortint ; stdcall;
function CameraGetCurrentParameterTeam(var group : byte) : Shortint ; stdcall;
function CameraSetAeTarget(value : byte) : Shortint ; stdcall;
function CameraGetAeTarget(var value : byte) : Shortint ; stdcall;
function CameraSetExposureTime(value : integer) : Shortint ; stdcall;
function CameraGetExposureTime(var value : integer) : Shortint ; stdcall;
function CameraSetAnalogGain(value : integer) : Shortint ; stdcall;
function CameraGetAnalogGain(var value : integer) : Shortint ; stdcall;
function CameraSetGamma(value : byte) : Shortint ; stdcall;
function CameraGetGamma(var value : byte) : Shortint ; stdcall;
function CameraSetContrast(value : byte) : Shortint ; stdcall;
function CameraGetContrast(var value : byte) : Shortint ; stdcall;
function CameraSetFrameSpeed(value : byte) : Shortint ; stdcall;
function CameraGetFrameSpeed(var value : byte) : Shortint ; stdcall;
function CameraGetBitmap(PData: pbyte;flipmode : byte): Shortint; stdcall;
function CameraCopyBitmap(srcData: pbyte;PData: pbyte): Shortint; stdcall;
function CameraSetMirror(direction : byte; state : bool) : Shortint; stdcall;
function CameraGetLightFrquency(var value:byte):ShortInt; stdcall;
//*****************************************************************************
function SoftTrigger() : Shortint ; stdcall; external 'uc1311.dll' name 'CameraSoftTriggerStart';
function GetCamNumber(var camno:byte) : Shortint ; stdcall; external 'uc1311.dll' name 'CameraGetMultiCameraNumber';
function CameraWriteSerial(var Sn : byte; len : byte): Shortint; stdcall; external 'uc1311.dll' name 'CameraWriteSerial';
function CameraReadSerial(var Sn : byte): Shortint; stdcall; external 'uc1311.dll' name 'CameraReadSerial';
function CameraGetMultiCameraNumber(var CamTotal : byte): Shortint; stdcall; external 'uc1311.dll' name 'CameraGetMultiCameraNumber';
function CameraUnInit() : Shortint ; stdcall; external 'uc1311.dll' name 'CameraUnInit';
function InitCamera(callback:pointer;callback_mode,res:integer;twnd :hwnd;c : Pointer;CamNum : byte) : Shortint ; stdcall; external 'uc1311.dll' name 'CameraInit';
function CameraPlay(value : byte) : Shortint ; stdcall; external 'uc1311.dll' name 'CameraPlay';
function CameraStop() : Shortint ; stdcall; external 'uc1311.dll' name 'CameraStop';
function set_runmode(runmode:UC_RUNMODE) : Shortint ; stdcall; external 'uc1311.dll' name 'set_runmode';
function CameraGetImageSize(var pWidth,pHeight: integer ) : Shortint ; stdcall; external 'uc1311.dll' name 'CameraGetImageSize';
function Get_ImageBuffer(var tim :pbyte) : Shortint ; stdcall; external 'uc1311.dll' name 'Get_ImageBuffer';
function Get_ProcImage(var tim :pbyte) : Shortint ; stdcall; external 'uc1311.dll' name 'Get_ProcImage';
function Get_GrabStopImage(var tim :pbyte) : Shortint ; stdcall; external 'uc1311.dll' name 'Get_GrabStopImage';
function CameraCaptureFile(filename : string;filetype : byte) : Shortint ; stdcall; external 'uc1311.dll' name 'CameraCaptureFile';
function CameraSetAeState(state : bool) : Shortint ; stdcall; external 'uc1311.dll' name 'CameraSetAeState';
function CameraGetAeState(var state : bool) : Shortint ; stdcall; external 'uc1311.dll' name 'CameraGetAeState';
function CameraSaveParameter(group : PARAMETER ) : Shortint ; stdcall; external 'uc1311.dll' name 'CameraSaveParameter';
function CameraReadParameter(group : PARAMETER ) : Shortint ; stdcall; external 'uc1311.dll' name 'CameraReadParameter';
function CameraGetCurrentParameterTeam(var group : byte) : Shortint ; stdcall; external 'uc1311.dll' name 'CameraGetCurrentParameterTeam';
function CameraSetAeTarget(value : byte) : Shortint ; stdcall; external 'uc1311.dll' name 'CameraSetAeTarget';
function CameraGetAeTarget(var value : byte) : Shortint ; stdcall; external 'uc1311.dll' name 'CameraGetAeTarget';
function CameraSetExposureTime(value : integer) : Shortint ; stdcall; external 'uc1311.dll' name 'CameraSetExposureTime';
function CameraGetExposureTime(var value : integer) : Shortint ; stdcall; external 'uc1311.dll' name 'CameraGetExposureTime';
function CameraSetAnalogGain(value : integer) : Shortint ; stdcall; external 'uc1311.dll' name 'CameraSetAnalogGain';
function CameraGetAnalogGain(var value : integer) : Shortint ; stdcall; external 'uc1311.dll' name 'CameraGetAnalogGain';
function CameraSetFrameSpeed(value : byte) : Shortint ; stdcall; external 'uc1311.dll' name 'CameraSetFrameSpeed';
function CameraGetFrameSpeed(var value : byte) : Shortint ; stdcall; external 'uc1311.dll' name 'CameraGetFrameSpeed';
function CameraSetGamma(value : byte) : Shortint ; stdcall; external 'uc1311.dll' name 'CameraSetGamma';
function CameraGetGamma(var value : byte) : Shortint ; stdcall; external 'uc1311.dll' name 'CameraGetGamma';
function CameraSetContrast(value : byte) : Shortint ; stdcall; external 'uc1311.dll' name 'CameraSetContrast';
function CameraGetContrast(var value : byte) : Shortint ; stdcall; external 'uc1311.dll' name 'CameraGetContrast';
function CameraGetBitmap(PData: pbyte;flipmode : byte) : Shortint ; stdcall; external 'uc1311.dll' name 'CameraGetBitmap';
function CameraCopyBitmap(srcData: pbyte;PData: pbyte) : Shortint ; stdcall; external 'uc1311.dll' name 'CameraCopyBitmap';
function CameraSetMirror(direction : byte; state : bool) : Shortint ; stdcall; external 'uc1311.dll' name 'CameraSetMirror';
function CameraGetLightFrquency(var value:byte):ShortInt ; stdcall; external 'uc1311.dll' name 'CameraGetLightFrquency';
//*************************************************************************************************************
var
uc_video_mode : byte;
implementation
end. |
Partager