Win10 下 Qt5.13.2+OpenCV4.5.1 Step by Step

OpenCV4.5.1-step-by-step

从零开始学习OpenCV。

前置知识

  1. C++
  2. QT基础开发

开发环境

  1. Win10
  2. Qt5.13.2
  3. MinGW,g++ 8.1.0
  4. OpenCV4.5.1
    目前我机器上 OpenCV 路劲为 D:\opencv4.5.1\opencv-build,代码中需要根据各位实际的 OpenCV 路径修改。

Github地址

GitHub地址为 https://github.com/ZHOUYI-UM/OpenCV4.5.1-step-by-step,欢迎各位大佬打星支持。

已经完成功能

  1. 人脸检测
  2. 人脸数据采集
  3. 脸训练
  4. 人脸识别

项目步骤

Step 1: Compile OpenCV4.5.1 using MinGW in Win10

For more detail, please refer to this URL[Win10 环境下搭建 Qt5.13.2 + OpenCV4.5.1 + MinGW 开发环境] (https://blog.csdn.net/justidle/article/details/121488711)。

Step 2: Project 1, First Qt project using OpenCV to read a picture

In this project, we will open a picture and show this picture in QMainWindow. Using QtCreator 4.10.1 to generate a “Qt Widgets Application”, use the default selection, But in “Kit Selection”, please use “MinGW 64-bit” not use “MSVC2017 64bit”.

Step 3: Project 2, Using OpenCV to face and eyes detection

In this project, we will use opencv to face and eyes detection. Using haarcascade_frontalface_alt.xml to do face detection. Using haarcascade_eye_tree_eyeglasses.xml to do eyes detection. This to files are provided by OpenCV, you can get it in the direction “sources/data/haarcascades”.

Step 4: Project 3, Using OpenCV to open a camera

In this project, get vedio from camera.

Step 5: Project 4, face detection from vedio

In this project, using a 100ms timer to detect face from vedio.

Step 6: Project 5, collect face data from vedio

In this project, we detect a face in vedio, and save this pic every 500ms.

Step 7: Project 6, Train the image

In this project, we will use python to train the face image. Because python is simplier than C++.

Step 8: Project 7, Generate face data in C++

In this project, we will use the at.txt, which is generated in project 6, to make a face data. We will open a face image, and push “Face data” button, We will generate EigenFaceRecognizer, FisherFaceRecognizer and LBPHFaceRecognizer from at.txt. Then press load image to load a 92*112 gray image to recognize the face.

Step 9: Project 8, Real time face recognization

In this project, we will use the face data, which is generated in poject 7, to make a face recognization from a camera. It seems that the correction using FisherFaceRecognizer is a little low.

问题

目前使用 OpenCV 最基本的人脸识别,即 EigenFaceRecognizer, FisherFaceRecognizer 和 LBPHFaceRecognizer,简单测试后,发现人脸识别的准确率没有资料中说明那么高。
可能问题是自己对 OpenCV 了解还不够,还需要进一步阅读文档。

下一步

使用 OpenCV 中的 DNN 来识别人脸。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

努力的老周

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值