Class CNObjectTracker

  • All Implemented Interfaces:
    NSObject

    public class CNObjectTracker
    extends NSObject
    Converts a normalized point or rectangle into a detection track that tracks an object over time. API-Since: 17.0
    • Constructor Detail

      • CNObjectTracker

        protected CNObjectTracker​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static CNObjectTracker allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(@NotNull
                                                                   @NotNull java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(@NotNull
                                                                                 @NotNull java.lang.Object aTarget,
                                                                                 @NotNull
                                                                                 @NotNull org.moe.natj.objc.SEL aSelector,
                                                                                 @Nullable
                                                                                 @Nullable java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        @NotNull
        public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        @NotNull
        public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
      • continueTrackingAtSourceImageSourceDisparity

        @Nullable
        public @Nullable CNBoundsPrediction continueTrackingAtSourceImageSourceDisparity​(CMTime time,
                                                                                         @NotNull
                                                                                         @NotNull CVBufferRef sourceImage,
                                                                                         @NotNull
                                                                                         @NotNull CVBufferRef sourceDisparity)
        Continue tracking an object for which tracking has started, and add a new detection to the detection track being built. - Parameters: - time: the presentation time of the frame to be added to the detection track - Returns: a prediction of where the object is in the source image
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • findObjectAtPointSourceImage

        @Nullable
        public @Nullable CNBoundsPrediction findObjectAtPointSourceImage​(CGPoint point,
                                                                         @NotNull
                                                                         @NotNull CVBufferRef sourceImage)
        Find the bounds of an object at the given point. Can be used to convert a normalized point in an image to a rectangle that can be used to start tracking. - Parameters: - point: location of object in image in normalized coordinates where (0.0, 0.0) is the upper left corner, and (1.0, 1.0) is the lower right - sourceImage: pixel buffer containing the image - Returns: A prediction, which includes bounds that can be used to start tracking, or `nil` if no discernible object is detected.
      • finishDetectionTrack

        @NotNull
        public @NotNull CNDetectionTrack finishDetectionTrack()
        Finish constructing the detection track and return it. - Returns: a detection track which tracks the object
      • hash_static

        public static long hash_static()
      • initWithCommandQueue

        public CNObjectTracker initWithCommandQueue​(@NotNull
                                                    @NotNull MTLCommandQueue commandQueue)
        Create a new detection track builder. - Parameters: - commandQueue: the command queue of a metal device to which commands should be submitted to perform work
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • isSupported

        public static boolean isSupported()
        Indicates whether the current device supports object detection and tracking.
      • keyPathsForValuesAffectingValueForKey

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • resetDetectionTrack

        public void resetDetectionTrack()
        Reset the builder to construct a new detection track.
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • startTrackingAtWithinSourceImageSourceDisparity

        public boolean startTrackingAtWithinSourceImageSourceDisparity​(CMTime time,
                                                                       CGRect normalizedBounds,
                                                                       @NotNull
                                                                       @NotNull CVBufferRef sourceImage,
                                                                       @NotNull
                                                                       @NotNull CVBufferRef sourceDisparity)
        Start creating a detection track to track an object within the given bounds. - Parameters: - time: the presentation time of the first frame in the detection track - normalizedBounds: the bounds of the object to track in normalized coordinates where (0.0, 0.0) is the upper left corner, and (1.0, 1.0) is the lower right - sourceImage: image buffer containing the image - sourceDisparity: disparity buffer containing depth information - Returns: whether the object can be tracked - Note: if the object can be tracked, a detection is added to the detection track being built
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.
      • version_static

        public static long version_static()