MBFrameGrabberRecognizerDelegate

@protocol MBFrameGrabberRecognizerDelegate <NSObject>
@required
/**
 * Called when {FrameGrabberRecognizer} received new frame for processing.
 * Note that all buffers associated with image are available only during life of this method.
 * As soon as this method exits, there is no guarantee that buffers will be valid. If you need
 * to store image for later processing, showing or saving, make sure you create a copy of it.
 * @param cameraFrame The {PPImage} containing frame that will be processed.
 * @param focused Information whether or not given frame is considered to be in focus. This
 *                  information is calculated on the basis of frame quality estimation algorithm
 *                  combined with information about actual frame that was provided by camera device.
 * @param frameQuality A number indicating calculated quality of given frame. This number is
 *                     non-negative, however it's maximum is not defined - the higher the number
 *                     is, the better the observed quality of frame is.
 */
- (void)onFrameAvailable:(MBImage *)cameraFrame isFocused:(BOOL)focused frameQuality:(CGFloat)frameQuality;

@end

Undocumented

  • Called when {FrameGrabberRecognizer} received new frame for processing. Note that all buffers associated with image are available only during life of this method. As soon as this method exits, there is no guarantee that buffers will be valid. If you need to store image for later processing, showing or saving, make sure you create a copy of it.

    Declaration

    Objective-C

    - (void)onFrameAvailable:(nonnull MBImage *)cameraFrame
                   isFocused:(BOOL)focused
                frameQuality:(CGFloat)frameQuality;

    Swift

    func onFrameAvailable(_ cameraFrame: MBImage, isFocused focused: Bool, frameQuality: CGFloat)

    Parameters

    cameraFrame

    The {PPImage} containing frame that will be processed.

    focused

    Information whether or not given frame is considered to be in focus. This information is calculated on the basis of frame quality estimation algorithm combined with information about actual frame that was provided by camera device.

    frameQuality

    A number indicating calculated quality of given frame. This number is non-negative, however it’s maximum is not defined - the higher the number is, the better the observed quality of frame is.