检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
NET开发环境配置 环境配置 使用图像识别.NET版本SDK包,需要先配置.Net开发环境。 从Visual Studio官网,下载最新版Visual Studio。 下载完毕后,单击exe文件,开始安装。 安装过程中选择工作负荷ASP.NET和Web开发,安装完成后启动即可。
$token = "用户获取得到的实际token值"; $imagePath = __DIR__.'data/image-tagging.jpg'; $data = array(); if (stripos($imagePath, 'http://') !==
值 httpConfig.setConnectTimeout(60); httpConfig.setReadTimeout(120); SSL配置(可选) // 配置跳过服务端证书验证 httpConfig.setIgnoreSslVerification(true); 配置认证信息
修改默认值。 $config->setTimeout(120); $config->setConnectionTimeout(60); SSL配置(可选) // 配置跳过服务端证书验证 $config->setIgnoreSslVerification(true); // 配置服
std::endl; } catch (SslHandShakeException& e) { std::cout << "ssl handshake error:" << e.what() << std::endl; } catch (RetryOutageException&
std::endl; } catch (SslHandShakeException& e) { std::cout << "ssl handshake error:" << e.what() << std::endl; } catch (RetryOutageException&
std::endl; } catch (SslHandShakeException& e) { std::cout << "ssl handshake error:" << e.what() << std::endl; } catch (RetryOutageException&
DTQCAQExDTALBglghkgBZQMEAgEwgguVBgkqhkiG... Request Body(form-data): file:File(图片文件) scale:3 model:ESPCN 方式一:图片为BASE64字符串。 成功响应示例 { "
"error_code": "AIS.0014", "error_msg": "The JSON format of the input data is incorrect." } 返回值 正常 200 失败 返回值 说明 400 语义有误,当前请求无法被服务器解析。除非进行修改,否则客户端不应重复提交这个请求。
'X-Auth-Token': token} imagepath = r'data/image-tagging.jpg' with open(imagepath, "rb") as bin_data: image_data = bin_data.read() image_base64 = base64
* @param data 数据 * @throws IOException */ public static void writeBytesToFile(String fileName, byte[] data) throws IOException{
e/tagging"; String token = "用户获取得到的实际token值"; String imgPath = "data/image-tagging.jpg"; //File path or URL of the image to be recognized
"error_code": "AIS.0014", "error_msg": "The JSON format of the input data is incorrect." } 返回值 正常 200 失败 返回值 说明 400 语义有误,当前请求无法被服务器解析。除非进行修改,否则客户端不应重复提交这个请求。
JSON format of the input data is incorrect. 输入数据JSON格式错误。 请检查输入数据的JSON格式。 400 AIS.0015 Base64 decoding of the input data is incorrect. 输入数据BASE64解码错误。
DCCDTQCAQExDTALBglghkgBZQMEAgEwgguVBgkqhkiG... Request Body(form-data): file:File(图片文件) gamma:1.5 natural_look:true 方式一:图片文件为BASE64字符串。 成功响应示例