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

资源简介

C#控制笔记本摄像头可以拍照

资源截图

代码片段和文件信息

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  2018-04-10 12:04  c#操作摄像头\
     目录           0  2018-04-10 14:31  c#操作摄像头\OperateCamera\
     目录           0  2018-04-10 14:31  c#操作摄像头\OperateCamera\.vs\
     目录           0  2018-04-10 14:31  c#操作摄像头\OperateCamera\.vs\OperateCamera\
     目录           0  2018-04-10 14:32  c#操作摄像头\OperateCamera\.vs\OperateCamera\v14\
     文件        4608  2018-04-10 14:32  c#操作摄像头\OperateCamera\.vs\OperateCamera\v14\.suo
     目录           0  2014-02-16 17:57  c#操作摄像头\OperateCamera\bin\
     目录           0  2018-04-10 14:31  c#操作摄像头\OperateCamera\bin\Debug\
     文件       44544  2013-07-15 23:04  c#操作摄像头\OperateCamera\bin\Debug\AForge.Controls.dll
     文件       17920  2013-07-15 23:04  c#操作摄像头\OperateCamera\bin\Debug\AForge.dll
     文件      262656  2013-07-15 23:04  c#操作摄像头\OperateCamera\bin\Debug\AForge.Imaging.dll
     文件       61440  2013-07-15 23:04  c#操作摄像头\OperateCamera\bin\Debug\AForge.Video.DirectShow.dll
     文件       20992  2013-07-15 23:04  c#操作摄像头\OperateCamera\bin\Debug\AForge.Video.dll
     目录           0  2014-02-16 21:02  c#操作摄像头\OperateCamera\bin\Debug\Images\
     文件       12288  2014-02-16 22:21  c#操作摄像头\OperateCamera\bin\Debug\OperateCamera.exe
     文件       28160  2014-02-16 22:21  c#操作摄像头\OperateCamera\bin\Debug\OperateCamera.pdb
     文件       22696  2018-04-10 14:31  c#操作摄像头\OperateCamera\bin\Debug\OperateCamera.vshost.exe
     文件         490  2015-10-22 09:54  c#操作摄像头\OperateCamera\bin\Debug\OperateCamera.vshost.exe.manifest
     目录           0  2014-02-16 22:14  c#操作摄像头\OperateCamera\bin\Debug\PersonImg\
     目录           0  2014-02-16 17:57  c#操作摄像头\OperateCamera\bin\Release\
     文件        4468  2014-02-17 00:08  c#操作摄像头\OperateCamera\Form1.cs
     文件        5322  2014-02-17 00:08  c#操作摄像头\OperateCamera\Form1.Designer.cs
     文件        5817  2014-02-17 00:08  c#操作摄像头\OperateCamera\Form1.resx
     目录           0  2014-02-16 20:30  c#操作摄像头\OperateCamera\lib\
     文件       44544  2013-07-15 23:04  c#操作摄像头\OperateCamera\lib\AForge.Controls.dll
     文件       17920  2013-07-15 23:04  c#操作摄像头\OperateCamera\lib\AForge.dll
     文件      262656  2013-07-15 23:04  c#操作摄像头\OperateCamera\lib\AForge.Imaging.dll
     文件       61440  2013-07-15 23:04  c#操作摄像头\OperateCamera\lib\AForge.Video.DirectShow.dll
     文件       20992  2013-07-15 23:04  c#操作摄像头\OperateCamera\lib\AForge.Video.dll
     目录           0  2014-02-16 17:21  c#操作摄像头\OperateCamera\obj\
     目录           0  2014-02-16 17:21  c#操作摄像头\OperateCamera\obj\x86\
............此处省略21个文件信息

评论

共有 条评论