接口说明(新版)
更新时间:2025-11-04
图像特效
黑白图像上色
SDK 调用示例
C++
1Json::Value result;
2
3std::string image;
4aip::get_file_content("/assets/sample.jpg", &image);
5std::string image_url = "http://image";
6
7// 调用黑白图像上色
8result = client.colourize_v1(image, aip::null);
9result = client.colourize_v1_url(image_url, aip::null);
接口详情
可参考API文档:黑白图像上色
图像风格转换
SDK 调用示例
C++
1Json::Value result;;
2std::string image;
3std::string option = "cartoon";
4aip::get_file_content("/assets/sample.jpg", &image);
5
6// 图像风格转换
7result = client.imagestyletrans(image,option,aip::null);
8// 文件url
9std::string = "http://host/test.jpeg"
10result = client.imagestyletransurl(url,option,aip::null);
接口详情
可参考API文档:图像风格转换
人像动漫化
SDK 调用示例
C++
1Json::Value result;;
2std::string image;
3aip::get_file_content("/assets/sample.jpg", &image);
4
5// 人像动漫化接口
6result = client.selfieanime(image,aip::null);
7// 文件url
8std::string = "http://host/test.jpeg"
9result = client.selfieanimeurl(url,aip::null);
10// 如果有可选参数
11std::map<std::string, std::string> options;
12// 带参数调用人像动漫化接口
13result = client.selfieanime(image, options);
接口详情
可参考API文档:人像动漫化
图像增强
图像去雾
SDK 调用示例
C++
1Json::Value result;
2
3std::string image;
4aip::get_file_content("/assets/sample.jpg", &image);
5std::string image_url = "http://image";
6
7// 调用图像去雾
8result = client.dehaze_v1(image, aip::null);
9result = client.dehaze_v1_url(image_url, aip::null);
接口详情
可参考API文档:图像去雾
图像对比度增强
SDK 调用示例
C++
1Json::Value result;
2
3std::string image;
4aip::get_file_content("/assets/sample.jpg", &image);
5std::string image_url = "http://image";
6
7// 调用图像对比度增强
8result = client.contrast_enhance_v1(image, aip::null);
9result = client.contrast_enhance_v1_urls(image_url, aip::null);
接口详情
可参考API文档:图像对比度增强
图像无损放大
SDK 调用示例
C++
1Json::Value result;
2
3std::string image;
4aip::get_file_content("/assets/sample.jpg", &image);
5std::string image_url = "http://image";
6
7// 调用图像无损放大
8result = client.image_quality_enhance_v1(image, aip::null);
9result = client.image_quality_enhance_v1_url(image_url, aip::null);
接口详情
可参考API文档:图像无损放大
拉伸图像恢复
SDK 调用示例
C++
1Json::Value result;
2
3std::string image;
4aip::get_file_content("/assets/sample.jpg", &image);
5std::string image_url = "http://image";
6
7// 调用拉伸图像恢复
8result = client.stretch_restore_v1(image, aip::null);
9result = client.stretch_restore_v1_url(image_url, aip::null);
接口详情
可参考API文档:拉伸图像恢复
图像修复
SDK 调用示例
C++
1Json::Value result;;
2std::string image;
3Json::Value rectangle;
4Json::Value property;
5property["width"]=1;
6property["height"]=1;
7property["left"]=1;
8property["top"]=1;
9rectangle.append(property);
10aip::get_file_content("/assets/sample.jpg", &image);
11
12// 图像修复
13result = client.imageinpainting(image,rectangle,aip::null);
接口详情
可参考API文档:图像修复
图像清晰度增强
SDK 调用示例
C++
1Json::Value result;;
2std::string image;
3aip::get_file_content("/assets/sample.jpg", &image);
4
5// 图像清晰增强
6result = client.imagedefinitionenhance(image,aip::null);
7// 文件url
8std::string = "http://host/test.jpeg"
9result = client.imagedefinitionenhanceurl(url,aip::null);
接口详情
可参考API文档:图像清晰度增强
