Interface Recognizer

All Known Implementing Classes:
Recognizer.CppProxy

public interface Recognizer
  • Method Details

    • getFeature

      @Nullable Feature getFeature​(@NonNull FeatureId feature)
    • setFeatures

      void setFeatures​(@NonNull java.util.HashSet<FeatureId> features)
    • addFeature

      void addFeature​(@Nullable Feature feature, @NonNull java.util.HashSet<FeatureId> dependencies, boolean needsGpu)
    • removeFeature

      void removeFeature​(@Nullable Feature feature)
    • setMaxFaces

      void setMaxFaces​(int num)
      sets maximum allowed face results, if face tracking feature is present
    • setOfflineMode

      void setOfflineMode​(boolean on)
    • setNnEnable

      void setNnEnable​(boolean enable)
      Set flag which enable NN's features. True by default, if device compatible with NN player When this flag is false, recognizer will skip NN-dependent features during set_features call. In case when device have no NN player support (is_device_nn_compatible return false), setting enable to true have no any effect
    • getNnEnable

      boolean getNnEnable()
    • setEyesCorrection

      void setEyesCorrection​(boolean on)
      sets eyes correction
    • setLipsCorrection

      void setLipsCorrection​(boolean on)
      sets lips correction
    • isDeviceNnCompatible

      boolean isDeviceNnCompatible()
      Check if device compatible with NN player.
    • setFaceSearchMode

      void setFaceSearchMode​(@NonNull FaceSearchMode mode)
      Clear pipeline state and set face search mode
    • process

      void process​(@Nullable FrameData frameData)
    • pushCameraFrame

      void pushCameraFrame​(@Nullable FrameData inputFrameData)
    • popFrameData

      boolean popFrameData​(@Nullable FrameData outputFrameData)
    • start

      void start()
      start the recognizer
    • pause

      void pause()
      pause the recognizer
    • stop

      void stop()
      pause + clear
    • clear

      void clear()
      clear input and output buffers and pipeline state, also clean cached features
    • create

      @Nullable static Recognizer create​(@NonNull RecognizerMode mode, @Nullable java.lang.Integer maxTokens)
      Parameters:
      maxTokens - If greater than 0: recognizer will run processing on push-ed() frame only if it can "consume" a token - and will wait for the token to become available if all maxTokens tokens have been used up. Consumed tokens are "produced" again one-by-one when pop-ping() processed frame(s). This mode prevents processing frames more often than a consumer(e.g. renderer) can use: potentially reducing energy consumption at the cost of higher latency. Only for asynchronous mode.
    • getFeatureId

      static long getFeatureId​(@NonNull FeatureId feature)