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

资源简介

打开摄像头、摄像头截图保存为图片 示例源码

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Imaging;
using System.Text;
using System.Windows.Forms;
using System.Threading;

using AForge;
using AForge.Video;
using AForge.Video.DirectShow;
using AForge.Imaging;
using AForge.Imaging.Filters;
using System.IO;

namespace Camera
{
    public partial class Test : Form
    {
        private FilterInfoCollection videoDevices;

        public Test()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender EventArgs e)
        {
            try
            {
                // 枚举所有视频输入设备
                videoDevices = new FilterInfoCollection(FilterCategory.VideoInputDevice);

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2020-02-15 16:32  摄像头操作\
     目录           0  2020-02-15 16:32  摄像头操作\Camera\
     目录           0  2020-02-15 16:33  摄像头操作\Camera\Camera\
     目录           0  2020-02-15 16:32  摄像头操作\Camera\Camera\Camera\
     文件         860  2012-04-21 16:22  摄像头操作\Camera\Camera\Camera.sln
     文件       21504  2015-01-11 00:42  摄像头操作\Camera\Camera\Camera.suo
     文件       40960  2020-02-15 17:32  摄像头操作\Camera\Camera\Camera.v11.suo
     目录           0  2020-02-15 16:32  摄像头操作\Camera\Camera\Camera\bin\
     目录           0  2020-02-15 16:33  摄像头操作\Camera\Camera\Camera\bin\Debug\
     文件       14336  2008-10-12 13:34  摄像头操作\Camera\Camera\Camera\bin\Debug\AForge.Controls.dll
     文件        9728  2008-11-16 11:45  摄像头操作\Camera\Camera\Camera\bin\Debug\AForge.dll
     文件       97792  2008-11-18 10:46  摄像头操作\Camera\Camera\Camera\bin\Debug\AForge.Imaging.dll
     文件       27136  2008-10-12 13:34  摄像头操作\Camera\Camera\Camera\bin\Debug\AForge.Video.DirectShow.dll
     文件       13312  2008-10-12 13:34  摄像头操作\Camera\Camera\Camera\bin\Debug\AForge.Video.dll
     文件       14336  2020-02-15 16:33  摄像头操作\Camera\Camera\Camera\bin\Debug\Camera.exe
     文件       30208  2020-02-15 16:33  摄像头操作\Camera\Camera\Camera\bin\Debug\Camera.pdb
     文件       21472  2020-02-15 17:03  摄像头操作\Camera\Camera\Camera\bin\Debug\Camera.vshost.exe
     文件         490  2018-09-15 15:29  摄像头操作\Camera\Camera\Camera\bin\Debug\Camera.vshost.exe.manifest
     目录           0  2020-02-15 16:32  摄像头操作\Camera\Camera\Camera\bin\Release\
     文件        3994  2015-01-11 00:41  摄像头操作\Camera\Camera\Camera\Camera.csproj
     文件        2718  2015-01-11 00:42  摄像头操作\Camera\Camera\Camera\Form1.cs
     文件        6146  2015-01-11 00:42  摄像头操作\Camera\Camera\Camera\Form1.Designer.cs
     文件        9515  2015-01-11 00:42  摄像头操作\Camera\Camera\Camera\Form1.resx
     目录           0  2020-02-15 16:32  摄像头操作\Camera\Camera\Camera\Include\
     文件       14336  2008-10-12 13:34  摄像头操作\Camera\Camera\Camera\Include\AForge.Controls.dll
     文件        9728  2008-11-16 11:45  摄像头操作\Camera\Camera\Camera\Include\AForge.dll
     文件       97792  2008-11-18 10:46  摄像头操作\Camera\Camera\Camera\Include\AForge.Imaging.dll
     文件       27136  2008-10-12 13:34  摄像头操作\Camera\Camera\Camera\Include\AForge.Video.DirectShow.dll
     文件       13312  2008-10-12 13:34  摄像头操作\Camera\Camera\Camera\Include\AForge.Video.dll
     目录           0  2020-02-15 16:32  摄像头操作\Camera\Camera\Camera\obj\
     目录           0  2020-02-15 16:32  摄像头操作\Camera\Camera\Camera\obj\x86\
............此处省略21个文件信息

评论

共有 条评论