目录

ImageVisionInterface

Interface Info

public interface ImageVisionInterface

提供了图像处理功能的接口。

Public Method Summary

Qualifier and Type

Method Name and Description

int

init(android.content.Context context,org.json.JSONObject authJson)

初始化滤镜服务。

ImageVisionResult

getColorFilter(org.json.JSONObject requestJson, android.graphics.Bitmap imageBitmap)

获取颜色滤镜处理结果,返回封装类ImageVisionResult。

ImageLayoutInfo

analyzeImageLayout(org.json.JSONObject requestJson, android.graphics.Bitmap imageBitmap)

获取图文排版处理结果,返回封装类ImageLayoutInfo。

说明:

图文智能排版服务已于2022/7/11下线,如使用将返回默认兜底版式样式三。

ImageVisionResult

analyzeImageThemeTag(org.json.JSONObject requestJson, android.graphics.Bitmap imageBitmap)

获取智能标签处理结果,返回封装类ImageVisionResult。

说明:

图像主题标签服务已于2022/7/11下线,如使用将报错误码200300

,详见场景智能设计错误码。

int

stop()

停止滤镜服务。

Public Methods

[h2]init

Method

public int init(android.content.Context context,org.json.JSONObject authJson)

初始化滤镜服务。

Parameters

Name

Description

context

上下文。

authJson

Json格式。

Returns

Type

Description

int

错误码,参见ResultCode。

[h2]getColorFilter

Method

public ImageVisionResult getColorFilter(org.json.JSONObject requestJson, android.graphics.Bitmap imageBitmap)

获取颜色滤镜处理结果,返回封装类。

Parameters

Name

Description

requestJson

请求JSON,参见开发指南滤镜服务步骤4。

imageBitmap

需要添加滤镜效果的图片的bitmap格式。

Returns

Type

Description

ImageVisionResult

封装类ImageVisionResult。

[h2]analyzeImageLayout

图文智能排版服务已于2022/7/11下线,如使用将返回默认兜底版式样式三。

Method

public ImageLayoutInfo analyzeImageLayout(JSONObject requestJson, Bitmap imageBitmap)

获取智能排版处理结果,返回封装类。

Parameters

Name

Description

requestJson

请求json,参见开发指南图文智能排版服务步骤4。

imageBitmap

需要制作智能排版的图片的bitmap格式。

Returns

Type

Description

ImageLayoutInfo

封装类ImageLayoutInfo。

[h2]analyzeImageThemeTag

图像主题标签服务已于2022/7/11下线,如使用将报错误码200300,详见场景智能设计错误码。

Method

public ImageVisionResult analyzeImageThemeTag(org.json.JSONObject requestJson, android.graphics.Bitmap imageBitmap)

获取智能标签处理结果,返回封装类ImageVisionResult。

Parameters

Name

Description

requestJson

请求json,参见开发指南图像主题标签服务步骤4。

imageBitmap

需要添加滤镜效果的bitmap。

Returns

Type

Description

ImageVisionResult

封装类ImageVisionResult。

[h2]stop

Method

public int stop()

停止图像服务。

Returns

Type

Description

int

结果码。