| class info |
| com.huawei.hms.mlsdk.face.MLMaxSizeFaceTransactor |
| Represents the largest face processor, which processes only the largest face in an image at a certain time. (For details, please refer to Smile Camera on GitHub.) |
- // Create a face analyzer.
- MLFaceAnalyzer analyzer = MLAnalyzerFactory.getInstance().getFaceAnalyzer();
- // Create a largest face processor to recognize the largest face and pass the result to MLResMLResultTrailerprocessing. MLResMLResultTrailer base class, which needs to be inherited and implemented by developers based on service logic.
- MLMaxSizeFaceTransactor transactor = new MLMaxSizeFaceTransactor.Creator(analyzer, new MLResultTrailer<MLFace>()).create();
- analyzer.setTransactor(transactor);
- // The processor is used only for real-time video detection and is invalid for single image detection.
- LensEngine lensEngine = new LensEngine.Creator(context, analyzer)
- .applyDisplayDimension(640, 480)
- .create();