Skip to content

超分辨率

ink-image edited this page Jun 3, 2017 · 1 revision

1.图片上传接口

url(post消息):
"http://api.ink-image.com:9001/rest/1.0/ink_image/v1/upload?AppKey="+Key+"&AppSecret="+Secret+"&imageBody="+imageBody

参数说明:
Key:墨图科技分配给客户的唯一标识符
Secret:墨图科技分配给客户的唯一标识符
imageBody:经过Base64、URL编码后的图片内容

返回消息:
{"code":"Proc Succ","tagid":"42532ac6-67a2-4405-8995-3d99d6b80266"}
tagid是图片在服务器的uuid

使用例子(以java为例):

            String server = "http://api.ink-image.com:9001/";
           
            String imageBody = Base64.encode(readFile("test.jpg"));
            imageBody        = URLEncoder.encode(imageBody, "utf-8");
   
            //发送post消息函数需要用户实现
            HttpRequest.sendPost(server + "rest/1.0/ink_image/v1/upload", "AppKey=123456&AppSecret=U6VEsPIZXL35BmWaAEnsHZUv&imageBody="+imageBody);

2.超分辨率接口

url(get消息):
"http://api.ink-image.com:9001/rest/1.0/ink_image/v1/scale?AppKey="+Key+"&AppSecret="+Secret+"&uuid="+uuid+"&scale="+scaleMulti

参数说明:
Key:墨图科技分配给客户的唯一标识符
Secret:墨图科技分配给客户的唯一标识符
uuid:图片在服务器的uuid,一般由服务器在别的接口(比如上传、滤镜、随意融合等接口)返回的tagid
scaleMulti:放大倍数,目前只支持放大2倍、4倍

返回消息:
{"code":"Proc Succ","tagid":"b134319a-314d-4dbb-b56a-2218799dd938scale4"}
tagid是分辨率放大处理后生成图片在服务器的uuid

使用例子(以java为例):

            String server = "http://api.ink-image.com:9001/";
           
            String uuid = "42532ac6-67a2-4405-8995-3d99d6b80266";
            String scaleMulti = "4";
           
            //发送get消息函数需要用户实现
            HttpRequest.sendGet(server + "rest/1.0/ink_image/v1/scale", "AppKey=123456&AppSecret=U6VEsPIZXL35BmWaAEnsHZUv&uuid="+uuid+"&scale="+scaleMulti);

3.拉取图片接口

url(get消息):
"http://api.ink-image.com:9002/rest/1.0/ink_image/v1/get_image?AppKey="+Key+"&uuid="+uuid

参数说明:
Key:墨图科技分配给客户的唯一标识符
uuid:图片在服务器的uuid,一般由服务器在别的接口(比如图片上传、滤镜、随意融合、超分辨率等接口)返回的tagid

返回消息:
返回图片

超分辨率典型应用场景调用说明

(1)调用上传接口
(2)调用超分辨率接口
(3)调用拉取图片接口

You can’t perform that action at this time.