Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
tyronetao committed Nov 4, 2016
1 parent 4912f8a commit 7f8db3e
Showing 1 changed file with 19 additions and 21 deletions.
40 changes: 19 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,35 +19,33 @@ java sdk for [腾讯云智能优图服务](http://www.qcloud.com/product/fr.html

## 使用示例

import org.json.JSONObject;
import com.youtu.*;
import org.json.JSONObject;
import com.youtu.*;

##### 设置APP 鉴权信息
public static final String APP_ID = "your appid";
public static final String SECRET_ID = "your secretId ";
public static final String SECRET_KEY = "your secretKey ";
public static final String USER_ID = "your qq ";
public static final String APP_ID = "your appid";
public static final String SECRET_ID = "your secretId ";
public static final String SECRET_KEY = "your secretKey ";
public static final String USER_ID = "your qq ";
##### 根据你使用的平台选择一种初始化方式
* 优图开放平台初始化
* 优图开放平台初始化
Youtu faceYoutu = new Youtu(APP_ID, SECRET_ID, SECRET_KEY,Youtu.API_YOUTU_END_POINT,USER_ID);

* 优图开放平台核身服务初始化(**核身服务目前仅支持核身专有接口,需要联系商务开通**
* 优图开放平台核身服务初始化(**核身服务目前仅支持核身专有接口,需要联系商务开通**
Youtu faceYoutu = new Youtu(APP_ID, SECRET_ID, SECRET_KEY,Youtu.API_YOUTU_CHARGE_END_POINT,USER_ID);

* 腾讯云初始化方式
* 腾讯云初始化方式
Youtu faceYoutu = new Youtu(APP_ID, SECRET_ID, SECRET_KEY,Youtu.API_TENCENTYUN_END_POINT,USER_ID);

* 人脸检测调用示例
JSONObject respose = faceYoutu.DetectFace("test.jpg");
* get respose
System.out.println(respose);
* get detail info
if(respose.getInt("errorcode")==0){
System.out.println(respose.get("image_height"));
System.out.println(respose.get("face"));
System.out.println(respose.getJSONArray("face").getJSONObject(0).get("yaw"));
System.out.println(respose.getInt("errorcode"));
System.out.println(respose.get("errormsg"));
* 人脸检测调用示例
JSONObject response = faceYoutu.DetectFace("test.jpg");
* 获取详细信息
if(response.getInt("errorcode")==0){
System.out.println(response.get("image_height"));
System.out.println(response.get("face"));
System.out.println(response.getJSONArray("face").getJSONObject(0).get("yaw"));
System.out.println(response.getInt("errorcode"));
System.out.println(response.get("errormsg"));
}


Expand Down Expand Up @@ -235,7 +233,7 @@ if(respose.getInt("errorcode")==0){
- 参数
- `idcard_number` 身份证号码
- `idcard_name` 身份证姓名
- `image_path` 照片的路径
- `image_path` 照片的路径

####更多详情和文档说明参见
* [腾讯云智能优图服务](http://www.qcloud.com/product/fr.html)
Expand Down

0 comments on commit 7f8db3e

Please sign in to comment.