Artificial intelligence big job - face recognition system (2): using opencv to achieve simple face detection

1. Homework review
  Basic task: To develop a face recognition system, it is required to use the ORL face database as the experimental data to construct a complete face recognition system, which requires an interface, which can choose to input a single image and display the image, and then Realize the recognition of the image, and output the corresponding recognition result image. Five photos of each person in the database are required as a training set, and the other 5 photos are used as a test set, and the correct rate of recognition is counted. (The program language used in the experiment is not limited, and the face recognition algorithm is not limited)
  Extended tasks: 1. Implement a complete face recognition system, collect photos by yourself, require more than 30 people, and realize two modes of cameras and photos as input people For face detection and recognition, the accuracy rate must be more than 95%. 2. Realize a complete multi-person face recognition system, collect photos by yourself, require more than 30 people, realize multi-face detection and recognition with camera and photo as input, and the accuracy rate requires more than 95%.
2. Introduction to openCV
  In fact, when I first started doing it, I was definitely confused, but some students still asked if they could use the openCV library to implement it. After getting the teacher's permission, it seems that this library has become a public standard answer in the class. So everyone searched for information and searched for resources in this library.
  The full name of this library is Open Source Computer Vision Library, which translates to an open source computer vision library. Open source means that the source code is open. In short, every line of code written in it can be edited, viewed, and modified.
  openCV was first initiated by Intel Corporation and is now used to develop real-time image processing, computer vision and pattern recognition programs, mainly involving augmented reality, face recognition, gesture recognition, human-computer interaction, action recognition, motion tracking, object recognition , image segmentation, robotics and other fields (from wiki). To put it simply, using its library and calling its interface, the functions that you might have had to complete in dozens of lines or hundreds of lines are now encapsulated and you may be able to complete them in just a few lines. The purpose is actually to complete "don't reinvent the wheel", but to focus on the satisfaction and realization of user functional requirements, which is also the meaning of open source.
3. Install openCV
  So with such a good thing, how to use this thing? First of all, it must be downloaded. Search for openCV, find its official website, find the release version of openCV in the release section, and then choose the appropriate platform, the simpler way is to choose Windows (it will jump to SourceForge, an open source software development platform, and it will automatically prompt to download to the local after 5s) , There are also a series of options such as source code and Github (it seems that you can also download the source code package and then compile it yourself. I found that it seems to use cmake to compile, I only chose its Windows), and got an exe file.

Guess you like

Origin blog.csdn.net/qq_41745118/article/details/107091840