image_face 0.0.1 image_face: ^0.0.1 copied to clipboard
A new flutter plugin project.
image_face #
A new flutter plugin project.
Getting Started #
This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
需求 #
该插件有一个类 ImageFace 该类有一个静态方法 hasFace 参数接收 File类型图片 , 通过_channel.invokeMethod 获取native返回的结果, 结果为bool
. true
说明图里有人脸, false
说明图里没有人脸. 该插件开发要求尽量精简, 只做检查人脸一件事.
usage #
File pickedFile = await ImagePicker.pickImage(
source: ImageSource.gallery,
);
bool _has = await ImageFace.hasFace(pickedFile);
print('this image ${_has?'has':'no'} face');