Facedemo填空代码
Posted Supreme小志
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Facedemo填空代码相关的知识,希望对你有一定的参考价值。
<!--todo step 1: add authorization of camera --> <uses-feature android:name="android.hardware.camera" /> <uses-permission android:name="android.permission.CAMERA"/>
// todo step 2: add on-device face analyzer MLFaceAnalyzerSetting setting = new MLFaceAnalyzerSetting.Factory() .setFeatureType(MLFaceAnalyzerSetting.TYPE_FEATURES) .setPerformanceType(MLFaceAnalyzerSetting.TYPE_SPEED) .allowTracing() .create(); this.analyzer = MLAnalyzerFactory.getInstance().getFaceAnalyzer(setting); // finish
// todo step 3: add on-device lens engine this.mLensEngine = new LensEngine.Creator(context, this.analyzer) .setLensType(this.lensType) .applyDisplayDimension(1600, 1024) .applyFps(25.0f) .enableAutomaticFocus(true) .create(); // finish
// todo step 4: add on-device face graphic MLFaceGraphic graphic = new MLFaceGraphic(this.mGraphicOverlay, faceSparseArray.valueAt(i)); this.mGraphicOverlay.add(graphic); // finish
以上是关于Facedemo填空代码的主要内容,如果未能解决你的问题,请参考以下文章