Delphi Webcam Simple Program

落花浮王杯 提交于 2019-11-30 10:26:34

There are many ways to do it , I couldn't understand what do you mean by TVideo component but my solution can show image on a paintbox(any TCanvas)

use

http://www.delphibasics.info/home/delphibasicsprojects/directxdelphiwebcamcaptureexample/DirectXDelphiWebcamCapture.rar

this is a directX conversion to pascal made by michael@grizzlymotion.com

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;

I don't know what TVideo is, but if you can use another component, for non-commercial projects, the Mitov Video library is free. It works with DirectX video, which is what most (all?) webcams use. It comes with excellent example programs, including one that plays back videos.

You can accomplish your goal with almost no programming. You simply drag and drop his components and connect them in his GUI component editor (named OpenWire)in the IDE.

We have used their components for years and are very happy with them. Highly recommended.

They also have great real-time plotting and audio processing tools that all work together with threading built-in to make it fast, fast, fast.

http://www.mitov.com/.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!