面料图片搜索
更新时间:2022-11-15
面料图片搜索
面料图片搜索—入库
SDK 调用示例
C#
1Json::Value result;
2
3std::string image;
4aip::get_file_content("/assets/sample.jpg", &image);
5std::string brief = "{\"name\":\"周杰伦\", \"id\":\"666\"}";
6
7// 调用面料图片搜索—入库, 图片参数为本地图片
8result = client.materiel_add(image, brief, aip::null);
9
10// 如果有可选参数
11std::map<std::string, std::string> options;
12options["tags"] = "100,11";
13
14// 带参数调用面料图片搜索—入库, 图片参数为本地图片
15result = client.materiel_add(image, brief, options);
16
17Json::Value result;
18
19std::string url = "http//www.x.com/sample.jpg";
20
21// 调用面料图片搜索—入库, 图片参数为远程url图片
22result = client.materiel_add_url(url, brief, aip::null);
23
24// 如果有可选参数
25std::map<std::string, std::string> options;
26options["tags"] = "100,11";
27
28// 带参数调用面料图片搜索—入库, 图片参数为远程url图片
29result = client.materiel_add_url(url, brief, options);
接口详情
可参考API文档:面料图片搜索—入库
面料图片搜索—检索
SDK 调用示例
C#
1Json::Value result;
2
3std::string image;
4aip::get_file_content("/assets/sample.jpg", &image);
5
6// 调用面料图片搜索—检索, 图片参数为本地图片
7result = client.materiel_search(image, aip::null);
8
9// 如果有可选参数
10std::map<std::string, std::string> options;
11options["tags"] = "100,11";
12options["tag_logic"] = "0";
13options["pn"] = "100";
14options["rn"] = "250";
15
16// 带参数调用面料图片搜索—检索, 图片参数为本地图片
17result = client.materiel_search(image, options);
18
19Json::Value result;
20
21std::string url = "http//www.x.com/sample.jpg";
22
23// 调用面料图片搜索—检索, 图片参数为远程url图片
24result = client.materiel_search_url(url, aip::null);
25
26// 如果有可选参数
27std::map<std::string, std::string> options;
28options["tags"] = "100,11";
29options["tag_logic"] = "0";
30options["pn"] = "100";
31options["rn"] = "250";
32
33// 带参数调用面料图片搜索—检索, 图片参数为远程url图片
34result = client.materiel_search_url(url, options);
接口详情
可参考API文档:面料图片搜索—检索
面料图片搜索—更新
SDK 调用示例
C#
1Json::Value result;
2
3std::string image;
4aip::get_file_content("/assets/sample.jpg", &image);
5std::string brief = "{\"name\":\"周杰伦\", \"id\":\"666\"}";
6
7// 调用面料图片搜索—更新, 图片参数为本地图片
8result = client.materiel_update(image, brief, aip::null);
9
10// 如果有可选参数
11std::map<std::string, std::string> options;
12options["tags"] = "100,11";
13
14// 带参数调用面料图片搜索—更新, 图片参数为本地图片
15result = client.materiel_update(image, brief, options);
16
17Json::Value result;
18
19std::string url = "http//www.x.com/sample.jpg";
20
21// 调用面料图片搜索—更新, 图片参数为远程url图片
22result = client.materiel_update_url(url, brief, aip::null);
23
24// 如果有可选参数
25std::map<std::string, std::string> options;
26options["tags"] = "100,11";
27
28// 带参数调用面料图片搜索—更新, 图片参数为远程url图片
29result = client.materiel_update_url(url, brief, options);
30
31Json::Value result;
32
33std::string cont_sign = "8cnn32frvrr2cd901";
34
35// 调用相同图检索—更新, 图片参数为图片签名
36result = client.materiel_update_cont_sign(cont_sign, brief, aip::null);
37
38// 如果有可选参数
39std::map<std::string, std::string> options;
40options["tags"] = "100,11";
41
42// 带参数调用相同图检索—更新, 图片参数为图片签名
43result = client.materiel_update_cont_sign(cont_sign, brief, options);
接口详情
可参考API文档:面料图片搜索—更新
面料图片搜索—删除
SDK 调用示例
C#
1Json::Value result;
2
3std::string image;
4aip::get_file_content("/assets/sample.jpg", &image);
5
6// 调用删除相似图,传入参数为图片
7result = client.materiel_delete_by_image(image, aip::null);
8
9Json::Value result;
10
11std::string url = "http//www.x.com/sample.jpg";
12
13// 调用删除相似图,图片参数为远程url图片
14result = client.materiel_delete_by_url(url, aip::null);
15
16Json::Value result;
17
18std::string cont_sign = "8cnn32frvrr2cd901";
19
20// 调用删除相似图,传入参数为图片签名
21result = client.materiel_delete_by_sign(cont_sign, aip::null);
接口详情
可参考API文档:面料图片搜索—删除
