BNBRecognizer
Objective-C
@interface BNBRecognizer : NSObject
+ (nullable BNBRecognizer *)create:(BNBRecognizerMode)mode;
+ (int64_t)getFeatureId:(BNBFeatureId)feature;
- (nullable id<BNBFeature>)getFeature:(BNBFeatureId)feature;
- (void)setFeatures:(nonnull NSSet<NSNumber *> *)features;
- (void)addFeature:(nullable id<BNBFeature>)feature
dependencies:(nonnull NSSet<NSNumber *> *)dependencies;
- (void)removeFeature:(nullable id<BNBFeature>)feature;
/** sets maximum allowed face results, if face tracking feature is present */
- (void)setMaxFaces:(int32_t)num;
- (void)setOfflineMode:(BOOL)on;
/**
* Set future frame filtrarion mode.
* Produce smoother recognition result (anti jitter), however adds inconsistency in push'ed/pop'ed frames (one frame lag)
* Applied only in push_camera_frame/pop_frame_data methods, when offline mode is disabled.
* Example: push frame 1 - pop frame 1, push frame 2 - pop frame 1, push frame 3 - pop frame 2, ...
*/
- (void)setUseFutureFilter:(BOOL)on;
/**
* Set future frame interpolation mode.
* Produce faster recognition result (skip even frames), however adds inconsistency in push'ed/pop'ed frames (one frame lag)
* Applied only in push_camera_frame/pop_frame_data methods, when offline mode is disabled.
* Example: push frame 1 - pop frame 1, push frame 2 - pop frame 1, push frame 3 - pop frame 2, ...
*/
- (void)setUseFutureInterpolate:(BOOL)on;
- (void)process:(nullable BNBFrameData *)frameData;
- (void)pushCameraFrame:(nullable BNBFrameData *)inputFrameData;
- (BOOL)popFrameData:(nullable BNBFrameData *)outputFrameData;
/** start the recognizer */
- (void)start;
/** pause the recognizer */
- (void)pause;
/** pause + clear */
- (void)stop;
/** clear input and output buffers and pipeline state, also clean cached features */
- (void)clear;
@end
Swift
class BNBRecognizer : NSObject
Undocumented
-
Undocumented
Declaration
Objective-C
+ (nullable BNBRecognizer *)create:(BNBRecognizerMode)mode;
Swift
class func create(_ mode: BNBRecognizerMode) -> BNBRecognizer?
-
Undocumented
Declaration
Objective-C
+ (int64_t)getFeatureId:(BNBFeatureId)feature;
Swift
class func getFeatureId(_ feature: BNBFeatureId) -> Int64
-
Undocumented
Declaration
Objective-C
- (nullable id<BNBFeature>)getFeature:(BNBFeatureId)feature;
Swift
func getFeature(_ feature: BNBFeatureId) -> BNBFeature?
-
Undocumented
Declaration
Objective-C
- (void)setFeatures:(nonnull NSSet<NSNumber *> *)features;
Swift
func setFeatures(_ features: Set<NSNumber>)
-
Undocumented
Declaration
Objective-C
- (void)addFeature:(nullable id<BNBFeature>)feature dependencies:(nonnull NSSet<NSNumber *> *)dependencies;
Swift
func add(_ feature: BNBFeature?, dependencies: Set<NSNumber>)
-
Undocumented
Declaration
Objective-C
- (void)removeFeature:(nullable id<BNBFeature>)feature;
Swift
func remove(_ feature: BNBFeature?)
-
sets maximum allowed face results, if face tracking feature is present
Declaration
Objective-C
- (void)setMaxFaces:(int32_t)num;
Swift
func setMaxFaces(_ num: Int32)
-
Undocumented
Declaration
Objective-C
- (void)setOfflineMode:(BOOL)on;
Swift
func setOfflineMode(_ on: Bool)
-
Set future frame filtrarion mode. Produce smoother recognition result (anti jitter), however adds inconsistency in push'ed/pop'ed frames (one frame lag) Applied only in push_camera_frame/pop_frame_data methods, when offline mode is disabled. Example: push frame 1 - pop frame 1, push frame 2 - pop frame 1, push frame 3 - pop frame 2, …
Declaration
Objective-C
- (void)setUseFutureFilter:(BOOL)on;
Swift
func setUseFutureFilter(_ on: Bool)
-
Set future frame interpolation mode. Produce faster recognition result (skip even frames), however adds inconsistency in push'ed/pop'ed frames (one frame lag) Applied only in push_camera_frame/pop_frame_data methods, when offline mode is disabled. Example: push frame 1 - pop frame 1, push frame 2 - pop frame 1, push frame 3 - pop frame 2, …
Declaration
Objective-C
- (void)setUseFutureInterpolate:(BOOL)on;
Swift
func setUseFutureInterpolate(_ on: Bool)
-
Undocumented
Declaration
Objective-C
- (void)process:(nullable BNBFrameData *)frameData;
Swift
func process(_ frameData: BNBFrameData?)
-
Undocumented
Declaration
Objective-C
- (void)pushCameraFrame:(nullable BNBFrameData *)inputFrameData;
Swift
func pushCameraFrame(_ inputFrameData: BNBFrameData?)
-
Undocumented
Declaration
Objective-C
- (BOOL)popFrameData:(nullable BNBFrameData *)outputFrameData;
Swift
func pop(_ outputFrameData: BNBFrameData?) -> Bool
-
start the recognizer
Declaration
Objective-C
- (void)start;
Swift
func start()
-
pause the recognizer
Declaration
Objective-C
- (void)pause;
Swift
func pause()
-
pause + clear
Declaration
Objective-C
- (void)stop;
Swift
func stop()
-
clear input and output buffers and pipeline state, also clean cached features
Declaration
Objective-C
- (void)clear;
Swift
func clear()