视频捕获问题!!!(50分)

  • 主题发起人 主题发起人 zhai769275
  • 开始时间 开始时间
Z

zhai769275

Unregistered / Unconfirmed
GUEST, unregistred user!
各位大侠我现在想让我的摄象机所照到的东西
通过视频采集卡传到我的应用程序中来;
 
给你一段代码看看,是以前我用天敏sdk2000开发的一个采集程序
procedure SaveJpgFile(iCardNo:SmallInt;VideoInNum:Smallint;
SbId:string;StatusFlag:String);
var
time1,time2,timeLen:DWORD;
DirName,FileName:string;
TimeStr1,TimeStr2:string;
begin

TimeStr1:=FormatDateTime('hhmmss',Time);
// TimeStr2:=Copy(TimeStr1,1,2)+'.'+Copy(TimeStr1,4,2)+Copy(TimeStr1,7,2);
DirName:='d:/'+SbId ;
if not DirectoryExists(DirName) then

if not CreateDir(DirName) then

raise Exception.Create('创建目录失败');
DirName:=DirName+'/'+StatusFlag ;
if not DirectoryExists(DirName) then

if not CreateDir(DirName) then

raise Exception.Create('创建目录失败');
// ShortDateFormat := 'yyyy-mm-dd';
// ShortDateFormat := 'mm/dd/yyyy';
FileName:= DirName+'/'+Formatdatetime('yyyymmdd',Date)+'-'+TimeStr1+'.jpg';
case iCardNo of
0: begin

CapView.SDK_20001.Run ;
CapView.SDK_20001.VideoSource := VideoInNum;
CapView.SDK_20001.Visible := True;
//----延时捕获帧
time1 := GetTickCount();
time2 := time1;
timeLen := 500;
repeat
CapView.SDK_20001.EditCopy ;
time2 := GetTickCount();
Application.ProcessMessages ;
until time2-time1>timeLen;
CapView.SDK_20001.SaveImageToJpg(FileName,80);
end;

// end case 0
1: begin

CapView.SDK_20002.Run ;
CapView.SDK_20002.VideoSource := VideoInNum;
CapView.SDK_20002.Visible := True;
//----延时捕获帧
time1 := GetTickCount();
time2 := time1;
timeLen := 500;
repeat
CapView.SDK_20002.EditCopy ;
time2 := GetTickCount();
Application.ProcessMessages ;
until time2-time1>timeLen;
CapView.SDK_20002.SaveImageToJpg(FileName,80);
end;

//end case of 1

2: begin

CapView.SDK_20003.Run ;
CapView.SDK_20003.VideoSource := VideoInNum;
CapView.SDK_20003.Visible := True;
//----延时捕获帧
time1 := GetTickCount();
time2 := time1;
timeLen := 500;
repeat
CapView.SDK_20003.EditCopy ;
time2 := GetTickCount();
Application.ProcessMessages ;

until time2-time1>timeLen;
CapView.SDK_20003.SaveImageToJpg(FileName,80);
end;

//end case of 1
end;
// end case

end;

//---------- end SaveJpgFile;
 
给你一个网址: http://www.progdigy.com/download/DSPACK231.zip 去下一套DSPACK吧,
支持VIDEOCAP,而且非常不错,自带的DEMO就可以解决你的问题
 
问一下楼上的大虾,天敏sdk2000是什么?
是那个公司出的第三方控件吗?
 
请问qince,DSPACK231控件是要注册的吗?
 
天敏sdk2000是天敏视频卡的二次开发包,在买视频卡时随盘送的,它有一个.ocx,在DELPHI中安装就可以了
 
多人接受答案了。
 
后退
顶部