• 大小: 0.95M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2020-12-26
  • 语言: C#
  • 标签: 摄像头  C#  摄像  

资源简介

C#连接摄像头,可以干好多事情了,自己扩展,这个只是个demo

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing.Imaging;
using System.Text;
using System.Windows;
using System.Windows.Forms;
using System.IO;
using System.Windows.Media.Imaging;
using AForge;
using AForge.Controls;
using AForge.Video;
using AForge.Video.DirectShow;
using Size = System.Drawing.Size;


namespace OperateCamera
{
    public partial class Form1 : Form
    {
        private FilterInfoCollection videoDevices;
        private VideoCaptureDevice videoSource;
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender EventArgs e)
        {
            
            try
            {
                // 枚举所有视频输入设备
   

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2016-12-14 23:08  连接电脑摄像头\
     文件        5605  2016-12-14 23:05  连接电脑摄像头\Form1.Designer.cs
     文件        4536  2016-12-14 23:06  连接电脑摄像头\Form1.cs
     文件        5817  2016-12-14 23:05  连接电脑摄像头\Form1.resx
     文件        4450  2014-02-16 21:16  连接电脑摄像头\OperateCamera.csproj
     文件         227  2014-02-16 20:18  连接电脑摄像头\OperateCamera.csproj.user
     文件        3584  2016-12-14 23:08  连接电脑摄像头\OperateCamera.v12.suo
     文件         494  2014-02-16 17:21  连接电脑摄像头\Program.cs
     目录           0  2014-02-16 17:21  连接电脑摄像头\Properties\
     文件        1358  2014-02-16 17:21  连接电脑摄像头\Properties\AssemblyInfo.cs
     文件        2877  2014-02-16 17:21  连接电脑摄像头\Properties\Resources.Designer.cs
     文件        5612  2014-02-16 17:21  连接电脑摄像头\Properties\Resources.resx
     文件        1099  2014-02-16 17:21  连接电脑摄像头\Properties\Settings.Designer.cs
     文件         249  2014-02-16 17:21  连接电脑摄像头\Properties\Settings.settings
     目录           0  2016-12-14 23:08  连接电脑摄像头\Service References\
     目录           0  2014-02-16 17:57  连接电脑摄像头\bin\
     目录           0  2016-12-14 23:02  连接电脑摄像头\bin\Debug\
     文件       44544  2013-07-15 23:04  连接电脑摄像头\bin\Debug\AForge.Controls.dll
     文件      262656  2013-07-15 23:04  连接电脑摄像头\bin\Debug\AForge.Imaging.dll
     文件       61440  2013-07-15 23:04  连接电脑摄像头\bin\Debug\AForge.Video.DirectShow.dll
     文件       20992  2013-07-15 23:04  连接电脑摄像头\bin\Debug\AForge.Video.dll
     文件       17920  2013-07-15 23:04  连接电脑摄像头\bin\Debug\AForge.dll
     目录           0  2016-12-14 23:08  连接电脑摄像头\bin\Debug\Images\
     文件       12800  2016-12-14 23:06  连接电脑摄像头\bin\Debug\OperateCamera.exe
     文件       32256  2016-12-14 23:06  连接电脑摄像头\bin\Debug\OperateCamera.pdb
     文件       24224  2016-12-14 23:08  连接电脑摄像头\bin\Debug\OperateCamera.vshost.exe
     文件         490  2016-07-16 19:44  连接电脑摄像头\bin\Debug\OperateCamera.vshost.exe.manifest
     目录           0  2016-12-14 23:04  连接电脑摄像头\bin\Debug\PersonImg\
     文件      603135  2016-12-14 23:04  连接电脑摄像头\bin\Debug\PersonImg\xiaosy.jpg
     目录           0  2016-12-14 23:08  连接电脑摄像头\bin\Release\
     目录           0  2014-02-16 20:30  连接电脑摄像头\lib\
............此处省略20个文件信息

评论

共有 条评论