全部产品
云市场

RecolorImage色彩转换/拓色

更新时间:2019-10-14 16:11:23

介绍

  • 名称:色彩迁移/拓色
  • Action: RecolorImage

将输入图自动或根据指定色板进行色彩转换,同时保证视觉热点区域避免不正常拓色。

示例结果:

参数定义

输入/输出:输入一张图片;输出拓色后的对应图片。

输入字段:

字段 类型 是否必须 描述
url string 尺寸变换后的图片地址
mode string 拓色模式,默认AUTO,取值范围[AUTO:自动拓色, TEMPLATE:色板拓色, REF_PIC:参考图拓色]
colorTemplate List<String> 色板拓色,Top主色列表,颜色值定义ARGB,如:0A0B0C,数组大小[1, 7]
refUrl string 参考图拓色,参考图URL
colorCount int 拓展色系数量,取值范围[1, 8], 默认:1

注:colorTemplate/refUrl/colorCount根据mode三选一

输出字段:

字段 类型 是否必须 描述
imageList List<string> 拓色完成后的图片地址

示例

输入

  1. 自动拓色:
  2. {
  3. "url": "http://ivpd-demo.oss-cn-shanghai.aliyuncs.com/ivpd-demo/images/RecolorImage/recolor-1-src.png",
  4. "mode": "AUTO",
  5. "colorCount": 3
  6. }
  7. 参考图拓色:
  8. {
  9. "url": "http://ivpd-demo.oss-cn-shanghai.aliyuncs.com/ivpd-demo/images/RecolorImage/recolor-1-src.png",
  10. "refUrl": "http://ivpd-demo.oss-cn-shanghai.aliyuncs.com/ivpd-demo/images/RecolorImage/recolor-refurl-src.png",
  11. "mode": "REF_PIC"
  12. }
  13. 色板拓色
  14. {
  15. "url": "http://ivpd-demo.oss-cn-shanghai.aliyuncs.com/ivpd-demo/images/RecolorImage/recolor-2-src.png",
  16. "colorTemplate": [
  17. { "color": "056A6B"},
  18. { "color": "FF0000"},
  19. { "color": "00FF00"},
  20. { "color": "0000FF"}
  21. ],
  22. "mode": "TEMPLATE"
  23. }

输出:

  1. 自动拓色
  2. {
  3. "imageList":[
  4. "http://vigen-invi-cdn.alibaba.com/aliyun-doc/pop/images/recolor-1-src.png"
  5. ]
  6. }
  7. 参考图拓色
  8. {
  9. "imageList":[
  10. "http://luban-vgd-invi.oss-cn-hangzhou.aliyuncs.com/upload/result_filter/2019-9-27/invi_filter_015695525019881035078_nHdEYO.png?Expires=1569638902&OSSAccessKeyId=LTAI4Fc5SVvzUQ19K1Cz3Ew9&Signature=zGHmW0fH9Q24fA9402qi1uJ7y1E%3D"
  11. ]
  12. }
  13. 色板拓色
  14. {
  15. "imageList":[
  16. "http://luban-vgd-invi.oss-cn-hangzhou.aliyuncs.com/upload/result_filter/2019-9-27/invi_filter_015695525030751035079_q1003K.png?Expires=1569638903&OSSAccessKeyId=LTAI4Fc5SVvzUQ19K1Cz3Ew9&Signature=AOJj%2F%2ByjLsyerUJ5nO3VrkrDnLw%3D"
  17. ]
  18. }

具体SDK示例请查看[SDK参考](https://help.aliyun.com/document_detail/133952.html