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

资源简介

打开摄像头、关闭摄像头,并将摄像头拍照保存图片,基于AForge实现的例子

资源截图

代码片段和文件信息

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);

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      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

     文件      13824  2015-01-11 00:42  Camera\Camera\Camera\bin\Debug\Camera.exe

     文件      26112  2015-01-11 00:42  Camera\Camera\Camera\bin\Debug\Camera.pdb

     文件      11608  2015-01-11 00:42  Camera\Camera\Camera\bin\Debug\Camera.vshost.exe

     文件       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

     文件      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

     文件       1759  2015-01-11 00:42  Camera\Camera\Camera\obj\x86\Debug\Camera.csproj.FileListAbsolute.txt

     文件        904  2015-01-11 00:42  Camera\Camera\Camera\obj\x86\Debug\Camera.csproj.GenerateResource.Cache

     文件      18712  2015-01-11 00:18  Camera\Camera\Camera\obj\x86\Debug\Camera.csprojResolveAssemblyReference.cache

     文件      13824  2015-01-11 00:42  Camera\Camera\Camera\obj\x86\Debug\Camera.exe

     文件      26112  2015-01-11 00:42  Camera\Camera\Camera\obj\x86\Debug\Camera.pdb

     文件        180  2015-01-11 00:41  Camera\Camera\Camera\obj\x86\Debug\Camera.Properties.Resources.resources

     文件       2810  2015-01-11 00:42  Camera\Camera\Camera\obj\x86\Debug\Camera.Test.resources

     文件      12165  2015-01-11 00:18  Camera\Camera\Camera\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache

     文件       5647  2015-01-11 00:42  Camera\Camera\Camera\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件       3806  2012-04-21 16:56  Camera\Camera\Camera\obj\x86\Debug\ResGen.read.1.tlog

     文件        700  2012-04-21 16:56  Camera\Camera\Camera\obj\x86\Debug\ResGen.write.1.tlog

     文件      17492  2012-04-21 16:31  Camera\Camera\Camera\obj\x86\Debug\ResolveAssemblyReference.cache

     文件        466  2015-01-11 00:25  Camera\Camera\Camera\Program.cs

............此处省略22个文件信息

评论

共有 条评论