资讯 社区 文档
技术能力
语音技术
文字识别
人脸与人体
图像技术
语言与知识
视频技术

滤镜

Filter

此类描述json滤镜相关字段

Fields
Filter disable_filter_group
是否屏蔽滤镜组
Filter disable_pass_list
是否屏蔽滤该层的镜组
Filter filter_group_id
滤镜组的序号
Filter filter_group_set
滤镜组
Filter mix_target
mix_target层的滤镜
Filter multi_source_files
多个资源相对路径(仅适用于multi_picture多图片类型滤镜)
Filter params
滤镜额外参数
Filter pass_id
滤镜组中的滤镜id
Filter pass_list
滤镜
Filter pass_type
一级滤镜类型
Filter reality_target
reality_target层的滤镜
Filter source_file
常规资源相对路径
Filter source_type
资源类型
Filter start_filter_group_id
开发者自定义,默认开始滤镜的编号
Filter sub_type
二级滤镜类型,需要配合一级滤镜pass_type使用
Filter virtual_target
virtual_target层的滤镜
Public methods
Filter FilterDemo()
Filter示例

FilterDemo ()

Filter示例

sample:
{
   "start_filter_group_id": 500001,
   "filter_group_set": [
   {
      "filter_group_id": 500001,
      "disable_filter_group": 0,
      "reality_target": {
      "disable_pass_list": 0,
      "pass_list": [
      {
         "pass_type": "color_adjust",
         "sub_type": "brightness",
         "params": {}
      }
      ]
      },
      "virtual_target": {
      "disable_pass_list": 0,
      "pass_list": [
      {
         "pass_id": 1,
         "pass_type": "color_adjust",
         "sub_type": "brightness",
         "params": {}
      }
      ]
      },
     "mix_target": {
     "disable_pass_list": 0,
     "pass_list": [
    ]
   }
}]

disable_filter_group

version 130

是否屏蔽滤镜组。1:屏蔽;0:不屏蔽

sample:
"disable_filter_group":0

disable_pass_list

version 130

是否屏蔽滤该层的镜组。1:屏蔽;0:不屏蔽

sample:
"disable_pass_list":0

filter_group_id

version 130

滤镜组的序号

sample:
"filter_group_id":100001

filter_group_set

version 130

滤镜组

sample:
"filter_group_set": [
{
   "filter_group_id": 500001,
   "disable_filter_group": 0,
   "reality_target": {
   "disable_pass_list": 0,
   "pass_list": [
   {
      "pass_id":1,
      "pass_type": "color_adjust",
      "sub_type": "brightness",
      "params": {}
   }
   ]
   },
   "virtual_target": {
   "disable_pass_list": 0,
   "pass_list": [
   {
      "pass_id": 1,
      "pass_type": "color_adjust",
      "sub_type": "brightness",
      "params": {}
   }
   ]
   },
   "mix_target": {
   "disable_pass_list": 0,
   "pass_list": []
   }
   }]    

mix_target

version 130

mix_target层的滤镜

sample:
"mix_target": {
"disable_pass_list": 0,
"pass_list": [
{
   "pass_type": "color_adjust",
   "sub_type": "brightness",
   "params": {}
}
]
} 

multi_source_files

version 130

多个资源相对路径(仅适用于multi_picture多图片类型滤镜)

sample:
"multi_source_files": "curve" 

params

version 130

滤镜额外参数

sample:
"params": {}

pass_id

version 130

滤镜组中的滤镜id

sample:
"pass_id": 1

pass_list

version 130

滤镜

sample:
"pass_list": [
{
   "pass_type": "color_adjust",
   "sub_type": "brightness",
   "params": {}
}
]

pass_type

version 130

一级滤镜类型。包括:color_adjust、mask_blend、stylize、beauty、custom

sample:
"pass_type" : "color_adjust"

reality_target

version 130

reality_target层的滤镜

sample:
"reality_target": {
"disable_pass_list": 0,
"pass_list": [
{
   "pass_type": "color_adjust",
   "sub_type": "brightness",
   "params": {}
}
]
}

source_file

version 130

常规资源相对路径

sample:
"source_file": "/res/filter/weimei.ar"

source_type

version 130

资源类型curve、picture、multi_picture

sample:
"source_type": "curve"

start_filter_group_id

version 130

开发者自定义,默认开始滤镜的编号

sample:
"start_filter_group_id":1000001

sub_type

version 130

二级滤镜类型,需要配合一级滤镜pass_type使用。
具体包括:
一级滤镜:color_adjust,对应二级滤镜:brightness、exposure、contrast、saturation、hsb、grayscale、saturation_ps;
一级滤镜:mask_blend,对应二级滤镜:multi_picture_blend、look_up、curve_ps、curve_right、curve_left;
一级滤镜:stylize,对应二级滤镜:gaussian_blur;
一级滤镜:beauty,对应二级滤镜:无;
一级滤镜:custom,对应二级滤镜:无。

sample:
"sub_type":"brightness"

virtual_target

version 130

virtual_target层的滤镜

sample:
"virtual_target": {
"disable_pass_list": 0,
"pass_list": [
{
   "pass_type": "color_adjust",
   "sub_type": "brightness",
   "params": {}
}
]
}
上一篇
粒子
下一篇
实时跟踪