Package apple.arkit

Class ARMatteGenerator

  • All Implemented Interfaces:
    NSObject

    public class ARMatteGenerator
    extends NSObject
    An object designed to generate either full resolution or half resolution matte given the ARFrame. The caller initializes the object once and calls the alpha matte generation API for every ARFrame with the captured image and segmentation stencil.
    • Constructor Detail

      • ARMatteGenerator

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

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

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

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

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

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

        public static org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

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

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

        public MTLTexture generateDilatedDepthFromFrameCommandBuffer​(ARFrame frame,
                                                                     MTLCommandBuffer commandBuffer)
        Generates dilated depth at the resolution of the segmentation stencil. The caller can use depth information when compositing a virtual object with the captured scene. This API returns the dilated linear depth to the caller. The reprojection of this depth to the caller's scene space is carried out externally.
        Parameters:
        frame - Current ARFrame containing camera image and estimated depth buffer. The caller is to ensure that a valid depth buffer is present.
        commandBuffer - Metal command buffer for encoding depth dilation operations. The command buffer is committed by the caller externally.
        Returns:
        Dilated depth MTLTexture for the given ARFrame at the segmentation stencil resolution. The texture consists of a single channel and is of type float16.
      • generateMatteFromFrameCommandBuffer

        public MTLTexture generateMatteFromFrameCommandBuffer​(ARFrame frame,
                                                              MTLCommandBuffer commandBuffer)
        Generates alpha matte at either full resolution or half the resolution of the captured image.
        Parameters:
        frame - Current ARFrame containing camera image and segmentation stencil. The caller is to ensure that a valid segmentation buffer is present.
        commandBuffer - Metal command buffer for encoding matting related operations. The command buffer is committed by the caller externally.
        Returns:
        Alpha matte MTLTexture for the given ARFrame at full resolution or half resolution as chosen by the caller during initialization.
      • hash_static

        public static long hash_static()
      • initWithDeviceMatteResolution

        public ARMatteGenerator initWithDeviceMatteResolution​(MTLDevice device,
                                                              long matteResolution)
        Initializes an instance of ARMatteGenerator. For efficient creation of alpha mattes in real time it is recommended to instantiate this object only once and to generate an alpha matte for every incoming frame.
        Parameters:
        device - The device the filter will run on.
        matteResolution - The resolution at which the matte is to be generated. Set using one of the values from 'ARMatteResolution'.
        Returns:
        Instance of ARMatteGenerator.
        See Also:
        ARFrame, ARMatteResolution
      • 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)
      • keyPathsForValuesAffectingValueForKey

        public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(java.lang.String key)
      • new_objc

        public static java.lang.Object new_objc()
      • 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)
      • superclass_static

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

        public static long version_static()