调用api实现源码
/**
* 调用Face++ API实现人脸检测
*
* @param picUrl 待检测图片的访问地址
* @return List<Face> 人脸列表
*/
private static List<Face> faceDetect(String picUrl) {
List<Face> faceList = new ArrayList<Face>();
try {
// String picUrl = "http://pic11.nipic.com/20101111/6153002_002722872554_2.jpg";
byte[] buff = getFileStream(picUrl);
String url = "https://api-cn.faceplusplus.com/facepp/v3/detect";
HashMap<String, String> map = new HashMap<>();
HashMap<String, byte[]> byteMap = new HashMap<>();
map.put("api_key", "你的api_key");
map