【开源】Masaccio
Masaccio
- https://github.com/Subito-it/Masaccio
介绍:
MasaccioImageView是一个通过检测图像中人脸所在位置,剪裁出最佳效果图片的库。运行效果:
![]()
使用说明:
xml中
|
1
2
3
4
5
6
7
|
<it.subito.masaccio.MasaccioImageView android:id="@+id/masaccio_view" android:layout_width="300dp" android:layout_height="200dp" masaccio:center_face="true" masaccio:activate_matrix="ifNoFace" masaccio:translate_y="0.25" android:scaleType="centerCrop"/> |
因为sdk中检测人脸的api是异步的,为了不造成UI线程的阻塞,library中提供了一个helper工具类来开启新线程加载。该控件支持ImageView的所有属性。
你还可以在 这里 查看如何自定义MasaccioImageView。
posted on 2015-04-03 13:02 wasdchenhao 阅读(147) 评论(0) 收藏 举报

浙公网安备 33010602011771号