Unity uses OpenCV face recognition library to realize 2D real person dressing

Software development plug-ins; OpenCv, DlibFaceLandmarkDetector, FaceMaskExample, if you have any questions about this, you can visit the first two articles; Unity version is 2018.4.36; if you are skilled, you can encapsulate the function of obtaining the camera yourself. Anyway, I don’t know how to use Opencv to encapsulate it. of. I found that the version after 2019 is a bit stuck, the version before 2019 is very good, the package of Xiangxin Technology is particularly good, you can learn about it if you need it. Here is the screen recording before going online. No beauty effect,. Beautify has connected to Xiangxin Technology's SDK. The following is the reference effect;
Please add a picture description
1: Thinking analysis, first obtain the face range of the special face detection point through OpenCV: Rect => size; the following script is mounted on a Quad object separately; the main function: InterceptImg(), intercept the face area The plug-in face special detection points only include the features between the ears below the eyebrows of the face, not all face headshots. Here I will expand the returned special detection points to facilitate the interception of all face information. OnDetectfacePoint() This function is mainly for face recognition and returns special detection points;

using System;
using System.Collections

Guess you like

Origin blog.csdn.net/qq_41088607/article/details/125225804