91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 0.21M
    文件類型: .zip
    金幣: 1
    下載: 0 次
    發布日期: 2024-05-03
  • 語言: C#
  • 標簽: 攝像頭??攝像??拍照??

資源簡介

調取本機攝像頭拍照  要引用 bin debug下目錄下的5個文件 

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Drawing.Imaging;
using?System.Linq;
using?System.Text;
using?System.Windows.Forms;
using?AForge;
using?AForge.Controls;
using?AForge.Imaging;
using?AForge.Video;
using?AForge.Video.DirectShow;

namespace?人臉識別
{
????public?partial?class?Form1?:?Form
????{
???????private?FilterInfoCollection?videoDevices;


????????public?int?selectedDeviceIndex?=?0;
????????public?Form1()
????????{
????????????InitializeComponent();
????????}

????????private?void?Form1_Load(object?sender?EventArgs?e)
????????{
????????????try
????????????{
????????????????//?枚舉所有視頻輸入設備
????????????????videoDevices?=?new?FilterInfoCollection(FilterCategory.VideoInputDevice);

????????????????if?(videoDevices.Count?==?0)
????????????????????throw?new?ApplicationException();

????????????????foreach?(FilterInfo?device?in?videoDevices)
????????????????{
????????????????????comboBox1.Items.Add(device.Name);
????????????????}
????????????????//下拉框用來更換攝像頭
????????????????comboBox1.SelectedIndex?=?0;

????????????}
????????????catch?(ApplicationException)
????????????{
????????????????comboBox1.Items.Add(“未發現攝像頭“);
????????????????comboBox1.SelectedIndex?=?0;
????????????????videoDevices?=?null;
????????????}
????????}

????????private?void?button2_Click(object?sender?EventArgs?e)
????????{
????????????if?(videoSourcePlayer1?!=?null?&&?videoSourcePlayer1.IsRunning)
????????????{
????????????????videoSourcePlayer1.SignalToStop();
????????????????videoSourcePlayer1.WaitForStop();
????????????}
????????}

????????private?void?button1_Click(object?sender?EventArgs?e)
????????{
????????????button2_Click(null?null);
????????????if?(comboBox1.SelectedItem.ToString()?==?“未發現攝像頭“)
????????????{
????????????????MessageBox.Show(“未發現攝像頭“?“錯誤提示“?MessageBoxButtons.OK?MessageBoxIcon.Hand);
????????????????return;
????????????}

????????????VideoCaptureDevice?videoSource?=?new?VideoCaptureDevice(videoDevices[comboBox1.SelectedIndex].MonikerString);
????????????videoSource.VideoResolution?=?videoSource.VideoCapabilities[comboBox1.SelectedIndex];

????????????videoSourcePlayer1.VideoSource?=?videoSource;
????????????videoSourcePlayer1.Start();
????????}

????????private?void?comboBox1_SelectedIndexChanged(object?sender?EventArgs?e)
????????{
????????????if?(comboBox1.SelectedItem.ToString()?==?“未發現攝像頭“)
????????????{
????????????????comboBox2.Items.Add(“未發現攝像頭“);
????????????????comboBox2.SelectedIndex?=?0;
????????????????return;
????????????}
????????????VideoCaptureDevice?videoSource?=?new?VideoCaptureDevice(videoDevices[comboBox1.SelectedIndex].MonikerString);
????????????if?(videoSource.VideoCapabilities.Count()?==?0)
????????????{
????????????????comboBox2.Items.Add(“攝像頭異常“);
????????????????comboBox2.SelectedIndex?=?0;
????????????????return;
????????????}
????????????c

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2020-08-18?19:47??調取本機攝像頭拍照\
?????目錄???????????0??2020-08-18?19:47??調取本機攝像頭拍照\.vs\
?????目錄???????????0??2020-08-18?19:47??調取本機攝像頭拍照\.vs\人臉識別\
?????目錄???????????0??2020-08-15?23:56??調取本機攝像頭拍照\.vs\人臉識別\v16\
?????文件???????41472??2020-08-16?15:44??調取本機攝像頭拍照\.vs\人臉識別\v16\.suo
?????目錄???????????0??2020-08-18?19:47??調取本機攝像頭拍照\bin\
?????目錄???????????0??2020-08-18?19:47??調取本機攝像頭拍照\bin\Debug\
?????文件???????44544??2020-08-15?23:24??調取本機攝像頭拍照\bin\Debug\AForge.Controls.dll
?????文件???????17920??2020-08-15?23:24??調取本機攝像頭拍照\bin\Debug\AForge.dll
?????文件??????262656??2020-08-15?23:24??調取本機攝像頭拍照\bin\Debug\AForge.Imaging.dll
?????文件???????61440??2020-08-15?23:24??調取本機攝像頭拍照\bin\Debug\AForge.Video.DirectShow.dll
?????文件???????20992??2020-08-15?23:23??調取本機攝像頭拍照\bin\Debug\AForge.Video.dll
?????目錄???????????0??2020-08-18?19:43??調取本機攝像頭拍照\bin\Debug\Picture\
?????文件???????12288??2020-08-16?12:59??調取本機攝像頭拍照\bin\Debug\人臉識別.exe
?????文件???????34304??2020-08-16?12:59??調取本機攝像頭拍照\bin\Debug\人臉識別.pdb
?????文件????????4373??2020-08-16?12:59??調取本機攝像頭拍照\Form1.cs
?????文件????????5910??2020-08-16?12:59??調取本機攝像頭拍照\Form1.Designer.cs
?????文件????????5817??2020-08-16?12:59??調取本機攝像頭拍照\Form1.resx
?????目錄???????????0??2020-08-18?19:47??調取本機攝像頭拍照\obj\
?????目錄???????????0??2020-08-18?19:47??調取本機攝像頭拍照\obj\Debug\
?????文件?????????208??2020-08-15?23:56??調取本機攝像頭拍照\obj\Debug\.NETframeworkVersion=v4.0.AssemblyAttributes.cs
?????文件???????12099??2020-08-16?12:52??調取本機攝像頭拍照\obj\Debug\DesignTimeResolveAssemblyReferences.cache
?????文件????????7077??2020-08-16?00:01??調取本機攝像頭拍照\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
?????目錄???????????0??2020-08-15?23:56??調取本機攝像頭拍照\obj\Debug\TempPE\
?????文件???????????0??2020-08-16?12:59??調取本機攝像頭拍照\obj\Debug\人臉識別.csproj.CopyComplete
?????文件??????????42??2020-08-16?00:05??調取本機攝像頭拍照\obj\Debug\人臉識別.csproj.CoreCompileInputs.cache
?????文件?????????634??2020-08-16?00:12??調取本機攝像頭拍照\obj\Debug\人臉識別.csproj.FileListAbsolute.txt
?????文件????????1012??2020-08-16?12:59??調取本機攝像頭拍照\obj\Debug\人臉識別.csproj.GenerateResource.cache
?????文件????????2193??2020-08-16?12:56??調取本機攝像頭拍照\obj\Debug\人臉識別.csprojAssemblyReference.cache
?????文件???????12288??2020-08-16?12:59??調取本機攝像頭拍照\obj\Debug\人臉識別.exe
?????文件?????????180??2020-08-16?12:59??調取本機攝像頭拍照\obj\Debug\人臉識別.Form1.resources
............此處省略11個文件信息

評論

共有 條評論