FaceSignSystem | 本项目为实习期间做的一款基于百度AI的QT人脸考勤打卡系统

 by   Color-l C++ Version: Current License: GPL-3.0

kandi X-RAY | FaceSignSystem Summary

kandi X-RAY | FaceSignSystem Summary

FaceSignSystem is a C++ library. FaceSignSystem has no bugs, it has no vulnerabilities, it has a Strong Copyleft License and it has low support. You can download it from GitHub.

作者 翁飞龙 QQ交流群 692695467(点击跳转) 博客地址 源码地址 Github 码云 使用环境 支持C++编译器的QT5,Sqlite数据库,本项目在Ubuntu20.04系统下制作完成. 准备材料 1、QT5 C/C++ 2、Sqlite数据库 3、一台自带摄像头的电脑或者Linux单片机 百度AI接入 接入步骤. 1、注册百度账号,用来登录百度AI开发平台(2、注册成为开发者 3、创建应用,应用创建成功之后也就开通了人脸检测、人脸比对等等相关业务 4、获取密钥,AppID、API Key和Secret key 5、生成签名(Access Token),这个写代码的时候要用到,每个应用的Access Token有效期为30天,到期后要重新获取,或者是在写代码时每次都获取一下 百度AI开放平台上有详细的接入指南:这里使用了QtNetwork模块中的网络接口来实现http编程,需要在.pro文件中添加 QT += network,主要用到了下面三个类:. application/x-www-form-urlencoded multipart/form-data application/json text/xml. grant_type: 必须参数,固定为client_credentials; client_id: 必须参数,应用的API Key; client_secret: 必须参数,应用的Secret Key;. bool JasonQt_Face::refreshToken(void)//自动获取token { QNetworkRequest request(QUrl(QString("QByteArray append = QString("grant_type=client_credentials&client_id=%1&client_secret=%2").arg(m_apiKey).arg(m_secretKey).toUtf8(); QByteArray buf;. 3.图片Base64编码 1、提取图片 2、数据转换为BASE64编码 实现代码. QByteArray ba; QBuffer buf(&ba); image.save(&buf, "png"); QString imgData = QString(ba.toBase64()); buf.close(); 全选代码复制 4.JSON数据解析 数据上传. bool JasonQt_Face::RegisterMember(QString qstrImage,QString UserId)//人脸注册 { //设置请求地址 QUrl url("QNetworkRequest request(url); QJsonObject append; m_UserId = UserId; //设置数据提交格式 request.setRawHeader("Content-Type", "aspplication/json"); append["face_token"] = m_token; append["image"] = qstrImage;//face dat append["image_type"] = "BASE64"; append["group_id"] = "Color";//member owner append["user_id"] =UserId; // append["quality_control"]="NORMAL"; QByteArray buf; //发送请求 m_http.post(request, QJsonDocument(append).toJson(), buf, 15000); QJsonObject acceptedData(QJsonDocument::fromJson(buf).object()); if(buf.isEmpty() || acceptedData.isEmpty() || !acceptedData.contains("result")) { return false; } else { return true; } }. QUrl url("QNetworkRequest request(url); QJsonObject append; request.setRawHeader("Content-Type", "aspplication/json"); append["image"] = qstrImage;//face dat append["image_type"]="BASE64"; append["group_id_list"] = "Color"; //append["quality_control"]="NORMAL"; QByteArray buf; m_http.post(request, QJsonDocument(append).toJson(), buf, 15000); QJsonObject acceptedData(QJsonDocument::fromJson(buf).object()); if(buf.isEmpty() || acceptedData.isEmpty() || !acceptedData.contains("result")) { return false; }. QJsonObject result=acceptedData.take("result").toObject(); if(result.contains("user_list")) { QJsonArray user_list = result.take("user_list").toArray(); QJsonObject userObj = user_list.at(0).toObject(); double score = userObj["score"].toDouble(); QString user_id=userObj["user_id"].toString(); int tmp=user_id.toInt(); if(score>=m_dThresholdValue) return tmp; else return false; } return false;.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              FaceSignSystem has a low active ecosystem.
              It has 3 star(s) with 0 fork(s). There are no watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              FaceSignSystem has no issues reported. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of FaceSignSystem is current.

            kandi-Quality Quality

              FaceSignSystem has no bugs reported.

            kandi-Security Security

              FaceSignSystem has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              FaceSignSystem is licensed under the GPL-3.0 License. This license is Strong Copyleft.
              Strong Copyleft licenses enforce sharing, and you can use them when creating open source projects.

            kandi-Reuse Reuse

              FaceSignSystem releases are not available. You will need to build from source code and install.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of FaceSignSystem
            Get all kandi verified functions for this library.

            FaceSignSystem Key Features

            No Key Features are available at this moment for FaceSignSystem.

            FaceSignSystem Examples and Code Snippets

            No Code Snippets are available at this moment for FaceSignSystem.

            Community Discussions

            No Community Discussions are available at this moment for FaceSignSystem.Refer to stack overflow page for discussions.

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install FaceSignSystem

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/Color-l/FaceSignSystem.git

          • CLI

            gh repo clone Color-l/FaceSignSystem

          • sshUrl

            git@github.com:Color-l/FaceSignSystem.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link