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

  • 大小: 270KB
    文件類型: .7z
    金幣: 1
    下載: 1 次
    發布日期: 2021-06-05
  • 語言: C#
  • 標簽: Face++??C#??Demo??

資源簡介

實現了以下接口 https://api-cn.faceplusplus.com/facepp/v3/compare https://api-cn.faceplusplus.com/facepp/v3/detect https://api-cn.faceplusplus.com/facepp/v3/faceset/create https://api-cn.faceplusplus.com/facepp/v3/faceset/addface https://api-cn.faceplusplus.com/facepp/v3/search 人臉識別,人臉集合創建,查找,兩張人臉圖片比對 并對返回結果的json反序列化到實體對象,結果一目了然。 注: 前提需要創建一個免費的測試賬號------- //注冊自己的face++賬號,地址:https://console.faceplusplus.com.cn/register String strApiKey = ""; String strApiSecret = ""; //如果需要上傳人臉到人臉集合,請先創建人臉集合后填入得到的facesetToken, 人臉添加到人臉集合時需要用它制定哪個集合 String strFacesetToken = "";

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Drawing.Imaging;
using?System.IO;
using?System.Linq;
using?System.Net;
using?System.Text;
using?System.Threading.Tasks;
using?System.Windows.Forms;
using?System.xml.Linq;
using?WindowsFormsApplication1.Entities;

namespace?WindowsFormsApplication1
{
????public?partial?class?Form1?:?Form
????{
????????String?picPath1?=?““;
????????String?picPath2?=?““;
????????//OuterId:賬號下全局唯一的?FaceSet?自定義標識,可以生成一個UUID作為outer_id
????????String?strOuterId?=?“26c543b95fa142a5985c0aaab8b854d2“;//System.Guid.NewGuid().ToString(“N“);
????????//注冊自己的face++賬號,地址:https://console.faceplusplus.com.cn/register
????????String?strApiKey?=?““;
????????String?strApiSecret?=?““;
????????//請先創建人臉集合后填入得到的facesetToken?人臉添加到人臉集合時需要用它制定哪個集合
????????String?strFacesetToken?=?““;

????????public?Form1()
????????{
????????????InitializeComponent();
????????}

????????private?void?button1_Click(object?sender?EventArgs?e)
????????{
????????????OpenFileDialog?openFileDialog?=?new?OpenFileDialog();
????????????openFileDialog.title?=?“選擇文件“;
????????????openFileDialog.Filter?=?“jpg文件|*.jpg|png文件|*.png|所有文件|*.*“;
????????????openFileDialog.FileName?=?string.Empty;
????????????openFileDialog.FilterIndex?=?1;
????????????openFileDialog.RestoreDirectory?=?true;
????????????openFileDialog.DefaultExt?=?“jpg“;
????????????DialogResult?result?=?openFileDialog.ShowDialog();
????????????if?(result?==?System.Windows.Forms.DialogResult.Cancel)
????????????{
????????????????return;
????????????}
????????????String?filepath?=?openFileDialog.FileName;
????????????pictureBox1.ImageLocation?=?filepath;
????????????picPath1?=?filepath;
????????}

????????private?void?button2_Click(object?sender?EventArgs?e)
????????{
????????????OpenFileDialog?openFileDialog?=?new?OpenFileDialog();
????????????openFileDialog.title?=?“選擇文件“;
????????????openFileDialog.Filter?=?“jpg文件|*.jpg|png文件|*.png|所有文件|*.*“;
????????????openFileDialog.FileName?=?string.Empty;
????????????openFileDialog.FilterIndex?=?1;
????????????openFileDialog.RestoreDirectory?=?true;
????????????openFileDialog.DefaultExt?=?“jpg“;
????????????DialogResult?result?=?openFileDialog.ShowDialog();
????????????if?(result?==?System.Windows.Forms.DialogResult.Cancel)
????????????{
????????????????return;
????????????}
????????????String?filepath?=?openFileDialog.FileName;
????????????pictureBox2.ImageLocation?=?filepath;
????????????picPath2=?filepath;
????????}

????????private?void?button3_Click(object?sender?EventArgs?e)
????????{

???????????????????
????????????Dictionaryject>?verifyPostParameters?=?new?Dictionaryject>();
????????????verifyPostParameters.Add(“api_key“?strApiKey);
????????????verifyPostParameters.Add(“api_secret“?strApiSecret);
????????????Bitmap?bmp?=?new?Bitmap(picPath1);?//?圖片地址
????????????byte[]?fileIma

評論

共有 條評論