更新时间:2022-05-24 01:48:17
我认为您应该看一下DirectX,我想您应该看一下这个站点:
I Think you should have a look a DirectX and I think you should have a look at this site :
http://www.delphibasics.info/home/delphibasicsprojects/directxdelphiwebcamcaptureexample
此页面提供了一种在Windows下使用网络摄像头的好方法,它非常可靠,并允许您设置任何cam属性.它全部开源,易于使用,并且基于本机Windows DirectX库.
This page offers a great way to use webcams under windows, its very reliable and allows you to set any cam property. Its all opensource, easy to use and based on native windows DirectX libraries.
使用此示例:
这是由michael@grizzlymotion.com进行的Pascal的DirectX转换
This is a directX conversion to pascal made by michael@grizzlymotion.com
将VSample.pas和VFrames.pas添加到您的项目中
add VSample.pas and VFrames.pas to your project
uses VFrames;
procedure TForm6.Button1Click(Sender: TObject);
var
cam:TVideoImage;
strlst:TStringList;
begin
strlst := TStringList.Create ;
cam := TVideoImage.Create;
cam.GetListOfDevices(strlst);
cam.SetDisplayCanvas(PaintBox1.Canvas);
cam.VideoStart(strlst.Strings[0]) ;//specify your cam by number
end;
或者您可以看一下: http://sourceforge.net/projects/webcam-cap/它使用对AVICAP32.DLL的纯API调用
Or you can have a look at this : http://sourceforge.net/projects/webcam-cap/ it uses pure API calls to AVICAP32.DLL