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

  • 大小: 530KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發布日期: 2021-05-21
  • 語言: C#
  • 標簽: C#??人臉識別??

資源簡介

用C#做學習型人臉識別程序(嘗鮮版)DEMO和源碼

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Text;
using?System.Windows.Forms;
using?Emgu.CV;
using?Emgu.CV.Structure;
using?System.IO;

namespace?FaceRecognition
{
????/***************
?????*?face?recognition
?????*?by?Nobi?(conmajia@gmail.com)
?????*?May?11th?2012
?????*?this?is?an?experiment
?????*?and?based?on?EmguCV
?????*?all?codes?are?almost?standard.
?????*?
?????*?Sergio?Andrés?Guitérrez?Rojas‘s?work
?????*?was?the?start?point.
?????*?More?features?added.?
?????*?--?conmajia
?????*??
?????*?use?it?in?anyway?as?you?wish.
?????*?you?can?keep?my?name?or?not.
?????*?it?depends?on?you.
?????*?all?that?I?expect?is?a?nice?meal.?(haha)
?????*?**************/
????public?partial?class?Form1?:?Form
????{
????????#region?variables
????????//?webcam
????????Capture?webcam;
????????bool?cameraInUse?=?false;

????????//?cascading?lib
????????HaarCascade?faceHaar;

????????//?Font?to?show?name
????????MCvFont?font?=?new?MCvFont(
????????????Emgu.CV.CvEnum.FONT.CV_FONT_HERSHEY_TRIPLEX
????????????1.2
????????????1.2
????????????);

????????//?frame?being?dealing?dealed?trained
????????Image?current;
????????Image?gray?=?null;

????????//?List?to?store?trained?faces?&?people
????????List>?learnedFaces?=?new?List>();
????????List?learnedPeople?=?new?List();

????????MCvAvgComp[]?foundFaces;

????????#endregion

????????#region?initiates
????????public?Form1()
????????{
????????????InitializeComponent();
????????}

????????private?void?initHaar(ref?HaarCascade?h?string?path)
????????{
????????????h?=?new?HaarCascade(path);
????????}

????????//?try?load?early?trained?faces
????????private?void?loadBackupImages(List>?list)
????????{
????????????//try
????????????//{
????????????//????//?names?stored?in?/backup/names.txt
????????????//????//?names?delimilited?by?‘|‘?(the?pipe)
????????????//????string?nameFileContent
????????????//????????=?File.ReadAllText(Application.StartupPath?+?“/backup/names.txt“);
????????????//????string[]?names?=?nameFileContent.Split(‘|‘);

????????????//????foreach?(string?name?in?names)
????????????//????{
????????????//????????//?load?images
????????????//????????list.Add(
????????????//????????????new?Image
????????????//????????????????Application.StartupPath
????????????//????????????????+?“/backup/face_“
????????????//????????????????+?name
????????????//????????????????+?“.bmp“
????????????//????????????????)
????????????//????????????);
????????????//????????//?TODO:?change?list?into?dictionary
????????????//????????people.Add(name);
????????????//????}
????????????//}
????????????//catch?(Exception)
????????????//{
????????????//????Console.WriteLine(“Load?nothing?from?backup?files.“);
????????????//}
????????}
????????#endregio

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????10332??2012-05-11?22:05??Form1.Designer.cs
?????文件???????10652??2012-05-11?22:13??Form1.cs
?????文件??????506314??2012-05-11?18:15??haarcascade_eye.xml
?????文件?????3644763??2012-05-11?18:15??haarcascade_frontalface_alt_tree.xml
?????文件???????32768??2012-05-11?22:13??FaceRecognition.exe

評論

共有 條評論