|
MeiCam SDK For Android
3.6.0
|
The Usage Method of Human Face Detection Effect for the Meishe SDK is used as follows:
1.Initializes AR Face,it only need to be initialized once. NvsFaceEffectV1 is a face effect class of SDK, "NvFaceData.asset" is a kind of face data file package,and "authpack.java" is a class of authorization file. The function of setMaxFaces() can set the max count of face detection after starting detecting. It can detect up to 8 faces at the same time,the default is 1 face. Initialization codes are as follows:
NvsFaceEffectV1.setup("assets:/NvFaceData.asset", com.meishe.arface.authpack.A());
NvsFaceEffectV1.setMaxFaces(2);
m_ARFace = m_streamingContext.appendBuiltinCaptureVideoFx("Face Effect");
m_ARFace.setStringVal("Beautification Package", "assets:/NvBeautification.asset");
m_ARFace.setStringVal("Face Ornament", "assets:/" + packageName);//"packageName" is a props package with the suffix .asset.
m_ARFace.setMenuVal("Face Type", "Default"); //Default
m_ARFace.setMenuVal("Face Type", "Goddness"); //Goddess
m_ARFace.setMenuVal("Face Type", "Internet Celebrity"); //Internet celebrity
m_ARFace.setMenuVal("Face Type", "Natural"); //Natural
m_ARFace.setFloatVal("Face Shape Level", val);//Specifies the basic face shape level.
m_ARFace.setFloatVal("Eye Enlarging", val); //Eye enlarging for controlling the size of eyes.
m_ARFace.setFloatVal("Cheek Thinning", val); //Face thinning for adjusting the size of face.
NvsFaceEffectV1.done();
1.8.17