QueenEngine Class Reference

Inherits from NSObject
Declared in QueenEngine.h

Overview

queen engine object

  delegate

queen engine delegate

@property (nonatomic, weak) id<QueenEngineDelegate> delegate

Discussion

queen engine delegate

Declared In

QueenEngine.h

+ getVersion

get sdk version

+ (NSString *)getVersion

Declared In

QueenEngine.h

– initWithConfigInfo:

initial queen engine

- (instancetype)initWithConfigInfo:(QueenEngineConfigInfo *)configInfo

Parameters

configInfo

queen engine config information

Declared In

QueenEngine.h

– updateConfigInfo:

update queen engine config info. note: this method only be actived when initWithConfigInfo with nil, and it can be called only one chance)

- (void)updateConfigInfo:(QueenEngineConfigInfo *)configInfo

Parameters

configInfo

queen engine config information

Declared In

QueenEngine.h

– destroyEngine

destroyer queen engine, should be called in the rendering thread

- (void)destroyEngine

Declared In

QueenEngine.h

– powerSavingEnabled:

higher performance lower effect, default is NO

- (void)powerSavingEnabled:(BOOL)enabled

Parameters

enabled

YES/NO

Declared In

QueenEngine.h

– setQueenBeautyType:enable:

enabled feature or not

- (void)setQueenBeautyType:(kQueenBeautyType)type enable:(BOOL)enabled

Parameters

type

QueenBeautyType

enabled

YES/NO

Declared In

QueenEngine.h

– setQueenBeautyType:enable:mode:

enabled feature or not

- (void)setQueenBeautyType:(kQueenBeautyType)type enable:(BOOL)enabled mode:(kQueenBeautyFilterMode)mode

Parameters

type

QueenBeautyType

enabled

YES/NO

mode

kQueenBeautyFilterMode

Declared In

QueenEngine.h

– setQueenBeautyParams:value:

feature configuration

- (void)setQueenBeautyParams:(kQueenBeautyParams)param value:(float)value

Parameters

param

kQueenBeautyParams

value

[0,1], default is 0

Declared In

QueenEngine.h

– getQueenBeautyParams:

get value of feature

- (float)getQueenBeautyParams:(kQueenBeautyParams)param

Parameters

param

QueenBeautyParams

Declared In

QueenEngine.h

– setLutImagePath:

set filter res, actived by enabled kQueenBeautyTypeLUT

- (void)setLutImagePath:(NSString *)imagePath

Parameters

imagePath

filter res

Declared In

QueenEngine.h

– setFaceShape:value:

face shape configuration, actived by enabled kQueenBeautyTypeFaceShape

- (void)setFaceShape:(kQueenBeautyFaceShapeType)faceShapeType value:(float)value

Parameters

faceShapeType

QueenBeautyFaceShapeType

value

[-1, 1] or [0, 1], default is 0

Declared In

QueenEngine.h

– setBodyShape:value:

body shape configuration, actived by enabled kQueenBeautyTypeBodyShape

- (void)setBodyShape:(kQueenBeautyBodyShapeType)bodyShapeType value:(float)value

Parameters

bodyShapeType

QueenBeautyBodyShapeType

value

[-1, 1] or [0, 1], default is 0

Declared In

QueenEngine.h

– setMakeupWithType:paths:blendType:

makeup configuration, actived by enabled kQueenBeautyTypeMakeup

- (void)setMakeupWithType:(kQueenBeautyMakeupType)makeupType paths:(NSArray<NSString*> *)imagePaths blendType:(kQueenBeautyBlend)blend

Parameters

makeupType

kQueenBeautyMakeupType

imagePaths

res paths

blend

kQueenBeautyBlend

Declared In

QueenEngine.h

– setMakeupWithType:paths:blendType:fps:

makeup configuration, actived by enabled kQueenBeautyTypeMakeup

- (void)setMakeupWithType:(kQueenBeautyMakeupType)makeupType paths:(NSArray<NSString*> *)imagePaths blendType:(kQueenBeautyBlend)blend fps:(int)fps

Parameters

makeupType

kQueenBeautyMakeupType

imagePaths

res paths

blend

kQueenBeautyBlend

fps

res fps

Declared In

QueenEngine.h

– setMakeupAlphaWithType:female:alpha:

makeup alpha configuration

- (void)setMakeupAlphaWithType:(kQueenBeautyMakeupType)makeupType female:(BOOL)isFeMale alpha:(float)alpha

Parameters

makeupType

kQueenBeautyMakeupType

isFeMale

YES/NO,only YES by now

alpha

the alpha of makeup

Declared In

QueenEngine.h

– setMakeupBlendWithType:blendType:

makeup blend mode configuration

- (void)setMakeupBlendWithType:(kQueenBeautyMakeupType)makeupType blendType:(kQueenBeautyBlend)blend

Parameters

makeupType

kQueenBeautyMakeupType

blend

kQueenBeautyBlend

Declared In

QueenEngine.h

– resetAllMakeupType

clear all makeup configurations

- (void)resetAllMakeupType

Declared In

QueenEngine.h

– addMaterialWithPath:

add sticker

- (void)addMaterialWithPath:(NSString *)materialPath

Parameters

materialPath

sticker res path

Declared In

QueenEngine.h

– removeMaterialWithPath:

remove sticker

- (void)removeMaterialWithPath:(NSString *)materialPath

Parameters

materialPath

sticker res path

Declared In

QueenEngine.h

– setGreenScreen:blueScreenEnabled:threshold:autoThresholdEnabled:

green/blue screen matting, this feature enabled, pure color screen matting will be disabled

- (void)setGreenScreen:(NSString *)backgroundImagePath blueScreenEnabled:(BOOL)blueScreenEnabled threshold:(float)threshold autoThresholdEnabled:(BOOL)autoThresholdEnabled

Parameters

backgroundImagePath

disabled feature by nil

blueScreenEnabled

is blue screen matting

threshold

[1, 10], default is 1

autoThresholdEnabled

auto set thread hold

Declared In

QueenEngine.h

– setSegmentBackgroundProcessType:

ai background matting configuration

- (void)setSegmentBackgroundProcessType:(kQueenBackgroundProcessType)backgroundProcessType

Parameters

backgroundProcessType

kQueenBackgroundProcessType

Declared In

QueenEngine.h

– setPureColorToBackground:colorType:threshold:

pure color screen matting, this feature enabled, green/blue screnn matting will be disabled

- (void)setPureColorToBackground:(NSString *)backgroundImagePath colorType:(kQueenBeautyBgColorType)colorType threshold:(float)threshold

Parameters

backgroundImagePath

disabled feature by nil

colorType

kQueenBeautyBgColorType

threshold

[-1, 1], default is 0

Declared In

QueenEngine.h

– setAISegmentForegroundPadding:

ai background matting padding configuration

- (void)setAISegmentForegroundPadding:(int)foregroundPadding

Parameters

foregroundPadding

[0,15],default is 0

Declared In

QueenEngine.h

– setFaceRenderFlipY:faceInfoFlipY:

render flip configuration

- (void)setFaceRenderFlipY:(BOOL)faceRenderFlipY faceInfoFlipY:(BOOL)faceInfoFlipY

Parameters

faceRenderFlipY

default is NO

faceInfoFlipY

default is NO

Discussion

render flip configuration

Declared In

QueenEngine.h

– processPixelBuffer:

processed pixelBuffer data

- (kQueenResultCode)processPixelBuffer:(QEPixelBufferData *)pixelBufferData

Parameters

pixelBufferData

input data

Return Value

kQueenResultCode

Discussion

processed pixelBuffer data

Declared In

QueenEngine.h

– processTexture:

processed gl_texture data

- (kQueenResultCode)processTexture:(QETextureData *)textureData

Parameters

textureData

input data

Return Value

kQueenResultCode

Discussion

processed gl_texture data

Declared In

QueenEngine.h

– updateInputDataAndRunAlg:withImgFormat:withWidth:withHeight:withStride:withInputAngle:withOutputAngle:withFlipAxis:

should be called when processed gl_texture data not pixelBuffer data

- (void)updateInputDataAndRunAlg:(uint8_t *)imageData withImgFormat:(kQueenImageFormat)format withWidth:(int)width withHeight:(int)height withStride:(int)stride withInputAngle:(int)intputAngle withOutputAngle:(int)outputAngle withFlipAxis:(int)flipAxis

Parameters

imageData

input image raw data

format

input image format

width

input data width

height

input data height

stride

in pixels, default is 0

intputAngle

the angle of input texture, the value can be 0/90/180/270, default is 0, note: this property only be actived when QueenEngineConfigInfo.autoSettingImgAngle == NO

outputAngle

the angle of output texure, the value can be 0/90/180/270, default is 0, note: this property only be actived when QueenEngineConfigInfo.autoSettingImgAngle == NO

flipAxis

0 not flip, 1 flipX, 2 filpY

Discussion

should be called when processed gl_texture data not pixelBuffer data

Declared In

QueenEngine.h

– showFaceDetectPoint:

show face detection key points

- (void)showFaceDetectPoint:(BOOL)show

Parameters

show

YES/NO, default is NO

Declared In

QueenEngine.h

– showBodyDetectPoint:

show body detection key points

- (void)showBodyDetectPoint:(BOOL)show

Parameters

show

YES/NO, default is NO

Declared In

QueenEngine.h

– showHandDetectPoint:

show hand detection key points

- (void)showHandDetectPoint:(BOOL)show

Parameters

show

YES/NO, default is NO

Declared In

QueenEngine.h

– showMakeupLine:

show face detection key lines

- (void)showMakeupLine:(BOOL)show

Parameters

show

YES/NO, default is NO

Declared In

QueenEngine.h