/// <summary> /// 获取组列表 /// </summary> /// <param name="dic"></param> /// <returns></returns> public static ParaData GetGroupids(Dictionary <string, string> dic) { var sendData = Init(dic); string sign = sendData.MakeSign(dic["key"]); sendData.SetValue("sign", sign); string postData = string.Join("&", sendData.GetValues().Select(x => x.Key.Trim() + "=" + ParaData.UrlEncode(x.Value.ToString())).ToArray()); string json = ParaData.HttpPost(FaceUrl.getGroupidsUrl, postData, Encoding.UTF8); return(new ParaData(json)); }
/// <summary> /// 人脸检测与分析 /// </summary> /// <param name="dic"></param> /// <returns></returns> public static ParaData DetectFace(Dictionary <string, string> dic) { var sendData = Init(dic); sendData.SetValue("image", dic["image"]); //检测模式,0-正常,1-大脸模式(默认1) sendData.SetValue("mode", dic["mode"]); string sign = sendData.MakeSign(dic["key"]); sendData.SetValue("sign", sign); string postData = string.Join("&", sendData.GetValues().Select(x => x.Key.Trim() + "=" + ParaData.UrlEncode(x.Value.ToString())).ToArray()); string json = ParaData.HttpPost(FaceUrl.detectFaceUrl, postData, Encoding.UTF8); return(new ParaData(json)); }
/// <summary> /// 行驶证驾驶证OCR /// </summary> /// <param name="dic"></param> /// <returns></returns> public static ParaData Drvie(Dictionary <string, string> dic) { var sendData = Init(dic); sendData.SetValue("image", dic["image"]); //识别类型,0-行驶证识别,1-驾驶证识别 sendData.SetValue("card_type", dic["card_type"]); string sign = sendData.MakeSign(dic["key"]); sendData.SetValue("sign", sign); string postData = string.Join("&", sendData.GetValues().Select(x => x.Key.Trim() + "=" + ParaData.UrlEncode(x.Value.ToString())).ToArray()); string json = ParaData.HttpPost(OcrUrl.driveUrl, postData, Encoding.UTF8); return(new ParaData(json)); }
/// <summary> /// 个体创建 /// </summary> /// <param name="dic"></param> /// <returns></returns> public static ParaData NewPerson(Dictionary <string, string> dic) { var sendData = Init(dic); sendData.SetValue("image", dic["image"]); sendData.SetValue("person_id", dic["person_id"]); sendData.SetValue("group_ids", dic["group_ids"]); sendData.SetValue("person_name ", dic["person_name"]); sendData.SetValue("tag", dic["tag"]); string sign = sendData.MakeSign(dic["key"]); sendData.SetValue("sign", sign); string postData = string.Join("&", sendData.GetValues().Select(x => x.Key.Trim() + "=" + ParaData.UrlEncode(x.Value.ToString())).ToArray()); string json = ParaData.HttpPost(FaceUrl.newPersonFaceUrl, postData, Encoding.UTF8); return(new ParaData(json)); }
/// <summary> /// 车牌OCR /// </summary> /// <param name="dic"></param> /// <returns></returns> public static ParaData Car(Dictionary <string, string> dic) { var sendData = Init(dic); if (dic.ContainsKey("image")) { sendData.SetValue("image", dic["image"]); } if (dic.ContainsKey("image_url")) { sendData.SetValue("image_url", dic["image_url"]); } string sign = sendData.MakeSign(dic["key"]); sendData.SetValue("sign", sign); string postData = string.Join("&", sendData.GetValues().Select(x => x.Key.Trim() + "=" + ParaData.UrlEncode(x.Value.ToString())).ToArray()); string json = ParaData.HttpPost(OcrUrl.carUrl, postData, Encoding.UTF8); return(new ParaData(json)); }