Delphi Webcam Simple Program

后端 未结 2 1303
忘了有多久
忘了有多久 2020-12-30 16:40

Can anyone help me to create a simple viewing of cam using just a simple TVideo component in delphi having a vid size of 160x120 only as default (no resize). Just a simple o

相关标签:
2条回答
  • 2020-12-30 17:10

    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/.

    0 讨论(0)
  • 2020-12-30 17:14

    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;
    
    0 讨论(0)
提交回复
热议问题