MeiCam SDK For Android
3.14.0
|
Special effect context. More...
Classes | |
interface | DebugLogCallback |
Debug log callback interface. More... | |
class | SdkVersion |
Meishe SDK version information. More... | |
Public Member Functions | |
boolean | isSdkAuthorised () |
Check whether sdk is authorized. More... | |
SdkVersion | getSdkVersion () |
Gets Meishe SDK version information. More... | |
NvsAssetPackageManager | getAssetPackageManager () |
Gets the resource package manager. More... | |
List< String > | getAllBuiltinVideoFxNames () |
Gets all built-in video effects names. More... | |
NvsVideoEffect | createVideoEffect (String fxIds, NvsRational aspectRatio) |
Creates video effect object. More... | |
NvsVideoEffect | createVideoEffect (String fxIds, NvsRational aspectRatio, boolean realTimeMode) |
Creates video effect object. More... | |
NvsVideoEffectTransition | createVideoTransition (String transitionIds, NvsRational aspectRatio) |
Creates video transition object. More... | |
NvsVideoEffectAnimatedSticker | createAnimatedSticker (long inPoint, long duration, boolean isPanoramic, String animatedStickerId, NvsRational aspectRatio) |
Creates animated sticker object. More... | |
NvsVideoEffectAnimatedSticker | createCustomAnimatedSticker (long inPoint, long duration, boolean isPanoramic, String animatedStickerId, String customImageFilePath, NvsRational aspectRatio) |
Creates custom animated sticker object. More... | |
NvsVideoEffectCompoundCaption | createCompoundCaption (long inPoint, long duration, String compoundCaptionPackageId, NvsRational aspectRatio) |
Creates compound caption object. More... | |
NvsVideoEffectCompoundCaption | createPanoramicCompoundCaption (long inPoint, long duration, String compoundCaptionPackageId, NvsRational aspectRatio) |
Creates compound caption object. More... | |
NvsVideoEffectCaption | createCaption (String captionText, long inPoint, long duration, String captionStylePackageId, NvsRational aspectRatio) |
Create caption. More... | |
NvsVideoEffectCaption | CreatePanoramicCaption (String captionText, long inPoint, long duration, String captionStylePackageId, NvsRational aspectRatio) |
Add a panorama caption on the timeline. More... | |
NvsVideoEffectCaption | createModularCaption (String captionText, long inPoint, long duration, NvsRational aspectRatio) |
Add a modular caption on the timeline. More... | |
NvsVideoEffectCaption | createPanoramicModularCaption (String captionText, long inPoint, long duration, NvsRational aspectRatio) |
Add a modular caption on the timeline. More... | |
NvsEffectRenderCore | createEffectRenderCore () |
Creates effect rendering object. More... | |
String | registerFontByFilePath (String fontFilePath) |
Gets font file's fontFamily. More... | |
void | unRegisterFontByFilePath (String fontFilePath) |
Unregister fonts according to the file path. More... | |
List< NvsFontInfo > | getFontInfoByFilePath (String fontFilePath) |
Gets font file's font information. More... | |
int | getDeviceCpuLevel () |
Get Android camera device cpu power level. More... | |
Static Public Member Functions | |
static NvsEffectSdkContext | init (Context ctx, String sdkLicenseFilePath, int flags) |
Initializes a singleton instance of the effect context. More... | |
static NvsEffectSdkContext | init (Activity mainActivity, String sdkLicenseFilePath, int flags) |
Initializes a singleton instance of the effect context. More... | |
static NvsEffectSdkContext | init (Activity mainActivity, String sdkLicenseFilePath) |
Initialize a singleton instance of the effect context. More... | |
static void | close () |
Destroies the effect context instance. Note: users can create and get it again after it is destroyed. More... | |
static NvsEffectSdkContext | getInstance () |
Gets a singleton instance of the effect context (users must initialize it before it can be used). More... | |
static int | hasARModule () |
Checks if the current SDK contains an AR module. More... | |
static boolean | initHumanDetection (Context cxt, String modelFilePath, String licenseFilePath, int features) |
Initializes the human body detection mechanism. More... | |
static boolean | initHumanDetection (Context ctx, String modelFilePath, String licenseFilePath, int features, Hashtable< String, Object > options) |
Initializes human detection. Only once needed. More... | |
static boolean | initHumanDetectionExt (Context ctx, String modelFilePath, String licenseFilePath, int features) |
Human detection initialization extension. More... | |
static boolean | initHumanDetectionExt (Context ctx, String modelFilePath, String licenseFilePath, int features, Hashtable< String, Object > options) |
Human detection initialization extension. Must be called after calling initHumanDetection. More... | |
static void | closeHumanDetection () |
Closes the human detection mechanism. More... | |
static boolean | setupHumanDetectionData (int dataType, String dataFilePath) |
Initializes human detection related data packages. More... | |
Static Public Attributes | |
Human detection features | |
static final int | HUMAN_DETECTION_FEATURE_FACE_LANDMARK = 1 |
Landmarks on human face. More... | |
static final int | HUMAN_DETECTION_FEATURE_FACE_ACTION = 2 |
Actions of human face. More... | |
static final int | HUMAN_DETECTION_FEATURE_AVATAR_EXPRESSION = 4 |
Avatar Expressions of human face. More... | |
static final int | HUMAN_DETECTION_FEATURE_VIDEO_MODE = 8 |
Video detection mode. More... | |
static final int | HUMAN_DETECTION_FEATURE_IMAGE_MODE = 16 |
Image detection mode. More... | |
static final int | HUMAN_DETECTION_FEATURE_SEMI_IMAGE_MODE = 32768 |
Semi-image detection mode. More... | |
static final int | HUMAN_DETECTION_FEATURE_MULTI_THREAD = 32 |
Multi thread detection. More... | |
static final int | HUMAN_DETECTION_FEATURE_SINGLE_THREAD = 64 |
Single thread detection. More... | |
static final int | HUMAN_DETECTION_FEATURE_EXTRA = 128 |
Extra features of human face. More... | |
static final int | HUMAN_DETECTION_FEATURE_SEGMENTATION_BACKGROUND = 256 |
Background segmentation. More... | |
static final int | HUMAN_DETECTION_FEATURE_HAND_LANDMARK = 512 |
Landmarks on hand. More... | |
static final int | HUMAN_DETECTION_FEATURE_HAND_ACTION = 1024 |
Hand actions. More... | |
static final int | HUMAN_DETECTION_FEATURE_HAND_BONE = 2048 |
Bone landmarks of hand. More... | |
static final int | HUMAN_DETECTION_FEATURE_EYEBALL_LANDMARK = 4096 |
Eyeball landmarks. More... | |
static final int | HUMAN_DETECTION_FEATURE_MULTI_DETECT = 8192 |
Multiple detect, say multiple rois detection. More... | |
static final int | HUMAN_DETECTION_FEATURE_SEGMENTATION_SKY = 16384 |
Sky segmentation. More... | |
static final int | HUMAN_DETECTION_FEATURE_SEGMENTATION_HALF_BODY = 65536 |
Half body segmentation. More... | |
static final int | HUMAN_DETECTION_FEATURE_FACE_ATTR = 131072 |
Base face attributes. More... | |
static final int | HUMAN_DETECTION_FEATURE_FACE_ATTR_SHAPE = 262144 |
Human detection options | |
static final String | HUMAN_DETECTION_OPTIONS_FACE_DETECT_THREAD_NUM = "Face Detect Thread Num" |
Face detect thread number. More... | |
static final String | HUMAN_DETECTION_OPTIONS_FACE_LANDMARK_THREAD_NUM = "Face Landmark Thread Num" |
Face landmark thread number. More... | |
static final String | HUMAN_DETECTION_OPTIONS_FACE_TRACK_THREAD_NUM = "Face Track Thread Num" |
Face track thread number. More... | |
static final String | HUMAN_DETECTION_OPTIONS_SKY_SEGMENTATION_THREAD_NUM = "Sky Segmentation Thread Num" |
Human detection package type | |
static final int | HUMAN_DETECTION_DATA_TYPE_FAKE_FACE = 0 |
Fake face package type. More... | |
static final int | HUMAN_DETECTION_DATA_TYPE_MAKEUP = 1 |
Makeup data pack type (deprecated) More... | |
static final int | HUMAN_DETECTION_DATA_TYPE_SKIN_COLOR = 2 |
Skin color data pack type. More... | |
static final int | HUMAN_DETECTION_DATA_TYPE_PE106 = 3 |
PE 106 data pack type. More... | |
static final int | HUMAN_DETECTION_DATA_TYPE_PE240 = 4 |
PE 240 data pack type. More... | |
static final int | HUMAN_DETECTION_DATA_TYPE_CUSTOM_AVATAR = 5 |
Custom avatar data pack type. More... | |
static final int | HUMAN_DETECTION_DATA_TYPE_MAKEUP2 = 6 |
Makeup2 data pack type (deprecated, replaced by HUMAN_DETECTION_DATA_TYPE_FACE_COMMON) More... | |
static final int | HUMAN_DETECTION_DATA_TYPE_FACE_COMMON = 7 |
Face common data pack type. More... | |
static final int | HUMAN_DETECTION_DATA_TYPE_ADVANCED_BEAUTY = 8 |
Advanced beauty data pack type. More... | |
cpu power level | |
static final int | DEVICE_CPU_POWER_LEVEL_UNKNOWN = -1 |
unknown level More... | |
static final int | DEVICE_CPU_POWER_LEVEL_LOW = 0 |
low level More... | |
static final int | DEVICE_CPU_POWER_LEVEL_MEDIUM = 1 |
medium level More... | |
static final int | DEVICE_CPU_POWER_LEVEL_HIGH = 2 |
Special effect context.
The effect context class is the entry to the entire SDK framework. During development, NvsEffectSdkContext provides the "sharedInstance" interface to create the unique streaming context instance. With this instance object, users can handle one or more effects. After use, the object instance of the effect context should be destroyed.Whening adding asset package (capture effect package, scene resource package, etc.), users should firstly install it and get the package Id of the effect after installation. The package ID serves as the handle of effect. However built-in effects can be directly used by their names.
Paths for resource, authorization, etc. in sdk interfaces must be full path.
|
inlinestatic |
Destroies the effect context instance. Note: users can create and get it again after it is destroyed.
|
inlinestatic |
Closes the human detection mechanism.
|
inline |
Creates animated sticker object.
inPoint | In point of sticker |
duration | Duration of sticker |
isPanoramic | Whether panoramic sticker |
animatedStickerId | Animated sticker package id. |
aspectRatio | The aspect ratio of animated sticker. |
|
inline |
Create caption.
captionText | Text of caption |
inPoint | The in point of the caption (in microseconds) |
duration | Caption display duration (in microseconds) |
captionStylePackageId | Caption style package Id.If it does not exist, you can pass an empty string or null. |
|
inline |
Creates compound caption object.
inPoint | In point of caption |
duration | Duration of caption |
compoundCaptionPackageId | caption package id. |
aspectRatio | The aspect ratio of caption |
|
inline |
Creates custom animated sticker object.
inPoint | In point of sticker |
duration | Duration of sticker |
isPanoramic | Whether panoramic sticker |
animatedStickerId | Animated sticker package id. |
customImageFilePath | custom sticker image file path. |
aspectRatio | The aspect ratio of animated sticker. |
|
inline |
Creates effect rendering object.
|
inline |
Add a modular caption on the timeline.
captionText | Text of caption |
inPoint | The in point of the caption on the timeline (in microseconds) |
duration | Caption display duration (in microseconds) |
|
inline |
Add a panorama caption on the timeline.
captionText | Text of caption |
inPoint | The in point of the caption on the timeline (in microseconds) |
duration | Caption display duration (in microseconds) |
captionStylePackageId | Caption style package Id.If it does not exist, you can pass an empty string or null. |
|
inline |
Creates compound caption object.
inPoint | In point of caption |
duration | Duration of caption |
compoundCaptionPackageId | caption package id. |
aspectRatio | The aspect ratio of caption |
|
inline |
Add a modular caption on the timeline.
captionText | Text of caption |
inPoint | The in point of the caption on the timeline (in microseconds) |
duration | Caption display duration (in microseconds) |
|
inline |
Creates video effect object.
fxIds | Video effects id. For built-in video effects, it is the name of the effect. If it is a resource package effect, it is the resource package id. |
aspectRatio | The aspect ratio of special effect. |
|
inline |
Creates video effect object.
fxIds | Video effects id. For built-in video effects, it is the name of the effect. If it is a resource package effect, it is the resource package id. |
aspectRatio | The aspect ratio of special effect. |
realTimeMode | real time mode. |
|
inline |
Creates video transition object.
fxIds | Video transition id. For built-in video transitions, it is the name of the transition. If it is a resource package transition, it is the resource package id. |
aspectRatio | The aspect ratio of special transition. |
|
inline |
Gets all built-in video effects names.
|
inline |
Gets the resource package manager.
|
inline |
Get Android camera device cpu power level.
|
inline |
Gets font file's font information.
fontFilePath | Font file path |
|
inlinestatic |
|
inline |
Gets Meishe SDK version information.
|
inlinestatic |
Checks if the current SDK contains an AR module.
|
inlinestatic |
Initialize a singleton instance of the effect context.
mainActivity | Main Android Activity object |
sdkLicenseFilePath | The specified path of the SDK license file |
|
inlinestatic |
Initializes a singleton instance of the effect context.
mainActivity | Main Android Activity object. |
sdkLicenseFilePath | Specified the path of the SDK license file. |
flags | Flag field. If there is no special requirement, please fill in 0. |
|
inlinestatic |
Initializes a singleton instance of the effect context.
ctx | Android Context object. |
sdkLicenseFilePath | Specifies the path of the SDK license file. |
flags | Flag field. If there is no special requirement, please fill in 0. |
|
inlinestatic |
Initializes human detection. Only once needed.
ctx | The context object from android. |
modelFilePath | The path of modle file. |
licenseFilePath | The path of authorization file. |
features | Human detection features field, please refer to Human detection features. |
options | detect options, please refer to Human detection features. |
|
inlinestatic |
Initializes the human body detection mechanism.
cxt | The context object from android. |
modelFilePath | The path of model file. |
licenseFilePath | The path of license file. |
features | Human detection feature flag field. Please refer to Human detection features. |
|
inlinestatic |
Human detection initialization extension.
ctx | The context object from android. |
modelFilePath | The path of extra modle file. |
licenseFilePath | The path of authorization file. |
features | Human detection features field, please refer to Human detection features. |
|
inlinestatic |
Human detection initialization extension. Must be called after calling initHumanDetection.
ctx | The context object from android. |
modelFilePath | The path of extra modle file. |
licenseFilePath | The path of authorization file. |
features | Human detection features field, please refer to Human detection features. |
options | detect options, please refer to Human detection features. |
|
inline |
Check whether sdk is authorized.
|
inline |
Gets font file's fontFamily.
fontFilePath | Font file path |
|
inlinestatic |
Initializes human detection related data packages.
dataType | Human detection package type. Please refer to Human Detection Packet Type. |
dataFilePath | The path of the data file. |
|
inline |
Unregister fonts according to the file path.
|
static |
high level
|
static |
low level
|
static |
medium level
|
static |
unknown level
|
static |
Advanced beauty data pack type.
|
static |
Custom avatar data pack type.
|
static |
Face common data pack type.
|
static |
Fake face package type.
|
static |
Makeup data pack type (deprecated)
|
static |
Makeup2 data pack type (deprecated, replaced by HUMAN_DETECTION_DATA_TYPE_FACE_COMMON)
|
static |
PE 106 data pack type.
|
static |
PE 240 data pack type.
|
static |
Skin color data pack type.
|
static |
Avatar Expressions of human face.
|
static |
Extra features of human face.
|
static |
Eyeball landmarks.
|
static |
Actions of human face.
|
static |
Base face attributes.
|
static |
Face shape attribute
|
static |
Landmarks on human face.
|
static |
Hand actions.
|
static |
Bone landmarks of hand.
|
static |
Landmarks on hand.
|
static |
Image detection mode.
|
static |
Multiple detect, say multiple rois detection.
|
static |
Multi thread detection.
|
static |
Background segmentation.
|
static |
Half body segmentation.
|
static |
Sky segmentation.
|
static |
Semi-image detection mode.
|
static |
Single thread detection.
|
static |
Video detection mode.
|
static |
Face detect thread number.
|
static |
Face landmark thread number.
|
static |
Face track thread number.
|
static |
Face track thread number