Package apple.vision
Class VNGenerateOpticalFlowRequest
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.vision.VNRequest
-
- apple.vision.VNImageBasedRequest
-
- apple.vision.VNTargetedImageRequest
-
- apple.vision.VNGenerateOpticalFlowRequest
-
public class VNGenerateOpticalFlowRequest extends VNTargetedImageRequest
VNGenerateOpticalFlowRequest will determine directional change vectors for each pixel in the targeted image to transform it into the image processed by the request handler, reporting this result with a single VNPixelBufferObservation. Because this request works at the pixel level, both images must have the same dimensions in order for the request to be successfully performed. Setting a region of interest will isolate where the change determination is performed; however, the resultant observation will still be reported with a full resolution VNPixelBufferObservation. Optical flow requests are very resource intensive, so it is recommended that only one request at a time be created and that the handler where the request was issued be released immediately after generating optical flows. Example usage: - (nullable VNPixelBufferObservation*) opticalFlowFromImage:(CVPixelBufferRef)fromImage toImage:(CVPixelBuffer)toImage error:(NSError**)error { VNImageRequestHandler* imageRequestHandler = [[VNImageRequestHandler alloc] initWithCVPixelBuffer:fromImage options:@{}]; VNGenerateOpticalFlowRequest* request = [[VNGenerateOpticalFlowRequest alloc] initWithTargetedCVPixelBuffer:toImage options:@{}]; if (![imageRequestHandler performRequests:@[ request ] error:error]) { return nil; } return [[request results] firstObject]; } API-Since: 14.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class apple.vision.VNTargetedImageRequest
VNTargetedImageRequest.Block_initWithTargetedCGImageOptionsCompletionHandler, VNTargetedImageRequest.Block_initWithTargetedCGImageOrientationOptionsCompletionHandler, VNTargetedImageRequest.Block_initWithTargetedCIImageOptionsCompletionHandler, VNTargetedImageRequest.Block_initWithTargetedCIImageOrientationOptionsCompletionHandler, VNTargetedImageRequest.Block_initWithTargetedCMSampleBufferOptionsCompletionHandler, VNTargetedImageRequest.Block_initWithTargetedCMSampleBufferOrientationOptionsCompletionHandler, VNTargetedImageRequest.Block_initWithTargetedCVPixelBufferOptionsCompletionHandler, VNTargetedImageRequest.Block_initWithTargetedCVPixelBufferOrientationOptionsCompletionHandler, VNTargetedImageRequest.Block_initWithTargetedImageDataOptionsCompletionHandler, VNTargetedImageRequest.Block_initWithTargetedImageDataOrientationOptionsCompletionHandler, VNTargetedImageRequest.Block_initWithTargetedImageURLOptionsCompletionHandler, VNTargetedImageRequest.Block_initWithTargetedImageURLOrientationOptionsCompletionHandler
-
Nested classes/interfaces inherited from class apple.vision.VNRequest
VNRequest.Block_completionHandler_ret, VNRequest.Block_initWithCompletionHandler
-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Block_accessibilityActivateBlock_ret, NSObject.Block_accessibilityActivationPointBlock_ret, NSObject.Block_accessibilityAttributedHintBlock_ret, NSObject.Block_accessibilityAttributedLabelBlock_ret, NSObject.Block_accessibilityAttributedUserInputLabelsBlock_ret, NSObject.Block_accessibilityAttributedValueBlock_ret, NSObject.Block_accessibilityContainerTypeBlock_ret, NSObject.Block_accessibilityCustomActionsBlock_ret, NSObject.Block_accessibilityCustomRotorsBlock_ret, NSObject.Block_accessibilityDecrementBlock_ret, NSObject.Block_accessibilityElementsBlock_ret, NSObject.Block_accessibilityElementsHiddenBlock_ret, NSObject.Block_accessibilityFrameBlock_ret, NSObject.Block_accessibilityHeaderElementsBlock_ret, NSObject.Block_accessibilityHintBlock_ret, NSObject.Block_accessibilityIdentifierBlock_ret, NSObject.Block_accessibilityIncrementBlock_ret, NSObject.Block_accessibilityLabelBlock_ret, NSObject.Block_accessibilityLanguageBlock_ret, NSObject.Block_accessibilityMagicTapBlock_ret, NSObject.Block_accessibilityNavigationStyleBlock_ret, NSObject.Block_accessibilityPathBlock_ret, NSObject.Block_accessibilityPerformEscapeBlock_ret, NSObject.Block_accessibilityRespondsToUserInteractionBlock_ret, NSObject.Block_accessibilityShouldGroupAccessibilityChildrenBlock_ret, NSObject.Block_accessibilityTextualContextBlock_ret, NSObject.Block_accessibilityTraitsBlock_ret, NSObject.Block_accessibilityUserInputLabelsBlock_ret, NSObject.Block_accessibilityValueBlock_ret, NSObject.Block_accessibilityViewIsModalBlock_ret, NSObject.Block_automationElementsBlock_ret, NSObject.Block_isAccessibilityElementBlock_ret, NSObject.Block_setAccessibilityActivateBlock, NSObject.Block_setAccessibilityActivationPointBlock, NSObject.Block_setAccessibilityAttributedHintBlock, NSObject.Block_setAccessibilityAttributedLabelBlock, NSObject.Block_setAccessibilityAttributedUserInputLabelsBlock, NSObject.Block_setAccessibilityAttributedValueBlock, NSObject.Block_setAccessibilityContainerTypeBlock, NSObject.Block_setAccessibilityCustomActionsBlock, NSObject.Block_setAccessibilityCustomRotorsBlock, NSObject.Block_setAccessibilityDecrementBlock, NSObject.Block_setAccessibilityElementsBlock, NSObject.Block_setAccessibilityElementsHiddenBlock, NSObject.Block_setAccessibilityFrameBlock, NSObject.Block_setAccessibilityHeaderElementsBlock, NSObject.Block_setAccessibilityHintBlock, NSObject.Block_setAccessibilityIdentifierBlock, NSObject.Block_setAccessibilityIncrementBlock, NSObject.Block_setAccessibilityLabelBlock, NSObject.Block_setAccessibilityLanguageBlock, NSObject.Block_setAccessibilityMagicTapBlock, NSObject.Block_setAccessibilityNavigationStyleBlock, NSObject.Block_setAccessibilityPathBlock, NSObject.Block_setAccessibilityPerformEscapeBlock, NSObject.Block_setAccessibilityRespondsToUserInteractionBlock, NSObject.Block_setAccessibilityShouldGroupAccessibilityChildrenBlock, NSObject.Block_setAccessibilityTextualContextBlock, NSObject.Block_setAccessibilityTraitsBlock, NSObject.Block_setAccessibilityUserInputLabelsBlock, NSObject.Block_setAccessibilityValueBlock, NSObject.Block_setAccessibilityViewIsModalBlock, NSObject.Block_setAutomationElementsBlock, NSObject.Block_setIsAccessibilityElementBlock, NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedVNGenerateOpticalFlowRequest(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()static VNGenerateOpticalFlowRequestalloc()static VNGenerateOpticalFlowRequestallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)static booleanautomaticallyNotifiesObserversForKey(@NotNull java.lang.String key)static voidcancelPreviousPerformRequestsWithTarget(@NotNull java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(@NotNull java.lang.Object aTarget, @NotNull org.moe.natj.objc.SEL aSelector, @Nullable java.lang.Object anArgument)static @NotNull NSArray<java.lang.String>classFallbacksForKeyedArchiver()static @NotNull org.moe.natj.objc.ClassclassForKeyedUnarchiver()longcomputationAccuracy()The level of accuracy used to compute the optical flow.static longcurrentRevision()static java.lang.StringdebugDescription_static()static longdefaultRevision()static java.lang.Stringdescription_static()static longhash_static()VNGenerateOpticalFlowRequestinit()Creates a new VNRequest with no completion handler.VNGenerateOpticalFlowRequestinitWithCompletionHandler(VNRequest.Block_initWithCompletionHandler completionHandler)Creates a new VNRequest with an optional completion handler.VNGenerateOpticalFlowRequestinitWithTargetedCGImageOptions(@NotNull CGImageRef cgImage, @NotNull NSDictionary<java.lang.String,?> options)Create a new request with a targeted CGImage.VNGenerateOpticalFlowRequestinitWithTargetedCGImageOptionsCompletionHandler(@NotNull CGImageRef cgImage, @NotNull NSDictionary<java.lang.String,?> options, VNTargetedImageRequest.Block_initWithTargetedCGImageOptionsCompletionHandler completionHandler)Create a new request with a targeted CGImage.VNGenerateOpticalFlowRequestinitWithTargetedCGImageOrientationOptions(@NotNull CGImageRef cgImage, int orientation, @NotNull NSDictionary<java.lang.String,?> options)Create a new request with a targeted CGImage.VNGenerateOpticalFlowRequestinitWithTargetedCGImageOrientationOptionsCompletionHandler(@NotNull CGImageRef cgImage, int orientation, @NotNull NSDictionary<java.lang.String,?> options, VNTargetedImageRequest.Block_initWithTargetedCGImageOrientationOptionsCompletionHandler completionHandler)Create a new request with a targeted CGImage.VNGenerateOpticalFlowRequestinitWithTargetedCIImageOptions(@NotNull CIImage ciImage, @NotNull NSDictionary<java.lang.String,?> options)Create a new request with a targeted CIImage.VNGenerateOpticalFlowRequestinitWithTargetedCIImageOptionsCompletionHandler(@NotNull CIImage ciImage, @NotNull NSDictionary<java.lang.String,?> options, VNTargetedImageRequest.Block_initWithTargetedCIImageOptionsCompletionHandler completionHandler)Create a new request with a targeted CIImage.VNGenerateOpticalFlowRequestinitWithTargetedCIImageOrientationOptions(@NotNull CIImage ciImage, int orientation, @NotNull NSDictionary<java.lang.String,?> options)Create a new request with a targeted CIImage.VNGenerateOpticalFlowRequestinitWithTargetedCIImageOrientationOptionsCompletionHandler(@NotNull CIImage ciImage, int orientation, @NotNull NSDictionary<java.lang.String,?> options, VNTargetedImageRequest.Block_initWithTargetedCIImageOrientationOptionsCompletionHandler completionHandler)Create a new request with a targeted CIImage.VNGenerateOpticalFlowRequestinitWithTargetedCMSampleBufferOptions(@NotNull CMSampleBufferRef sampleBuffer, @NotNull NSDictionary<java.lang.String,?> options)Create a new request with a targeted CMSampleBuffer.VNGenerateOpticalFlowRequestinitWithTargetedCMSampleBufferOptionsCompletionHandler(@NotNull CMSampleBufferRef sampleBuffer, @NotNull NSDictionary<java.lang.String,?> options, VNTargetedImageRequest.Block_initWithTargetedCMSampleBufferOptionsCompletionHandler completionHandler)Create a new request with a targeted CMSampleBuffer.VNGenerateOpticalFlowRequestinitWithTargetedCMSampleBufferOrientationOptions(@NotNull CMSampleBufferRef sampleBuffer, int orientation, @NotNull NSDictionary<java.lang.String,?> options)Create a new request with a targeted CMSampleBuffer.VNGenerateOpticalFlowRequestinitWithTargetedCMSampleBufferOrientationOptionsCompletionHandler(@NotNull CMSampleBufferRef sampleBuffer, int orientation, @NotNull NSDictionary<java.lang.String,?> options, VNTargetedImageRequest.Block_initWithTargetedCMSampleBufferOrientationOptionsCompletionHandler completionHandler)Create a new request with a targeted CMSampleBuffer.VNGenerateOpticalFlowRequestinitWithTargetedCVPixelBufferOptions(@NotNull CVBufferRef pixelBuffer, @NotNull NSDictionary<java.lang.String,?> options)Create a new request that targets an image in a pixel buffer.VNGenerateOpticalFlowRequestinitWithTargetedCVPixelBufferOptionsCompletionHandler(@NotNull CVBufferRef pixelBuffer, @NotNull NSDictionary<java.lang.String,?> options, VNTargetedImageRequest.Block_initWithTargetedCVPixelBufferOptionsCompletionHandler completionHandler)Create a new request that targets an image in a pixel buffer.VNGenerateOpticalFlowRequestinitWithTargetedCVPixelBufferOrientationOptions(@NotNull CVBufferRef pixelBuffer, int orientation, @NotNull NSDictionary<java.lang.String,?> options)Create a new request that targets an image in a pixel buffer.VNGenerateOpticalFlowRequestinitWithTargetedCVPixelBufferOrientationOptionsCompletionHandler(@NotNull CVBufferRef pixelBuffer, int orientation, @NotNull NSDictionary<java.lang.String,?> options, VNTargetedImageRequest.Block_initWithTargetedCVPixelBufferOrientationOptionsCompletionHandler completionHandler)Create a new request that targets an image in a pixel buffer.VNGenerateOpticalFlowRequestinitWithTargetedImageDataOptions(@NotNull NSData imageData, @NotNull NSDictionary<java.lang.String,?> options)Create a new request with a targeted image data.VNGenerateOpticalFlowRequestinitWithTargetedImageDataOptionsCompletionHandler(@NotNull NSData imageData, @NotNull NSDictionary<java.lang.String,?> options, VNTargetedImageRequest.Block_initWithTargetedImageDataOptionsCompletionHandler completionHandler)Create a new request with a targeted image data.VNGenerateOpticalFlowRequestinitWithTargetedImageDataOrientationOptions(@NotNull NSData imageData, int orientation, @NotNull NSDictionary<java.lang.String,?> options)Create a new request with a targeted image data.VNGenerateOpticalFlowRequestinitWithTargetedImageDataOrientationOptionsCompletionHandler(@NotNull NSData imageData, int orientation, @NotNull NSDictionary<java.lang.String,?> options, VNTargetedImageRequest.Block_initWithTargetedImageDataOrientationOptionsCompletionHandler completionHandler)Create a new request with a targeted image data.VNGenerateOpticalFlowRequestinitWithTargetedImageURLOptions(@NotNull NSURL imageURL, @NotNull NSDictionary<java.lang.String,?> options)Create a new request with a targeted image URL.VNGenerateOpticalFlowRequestinitWithTargetedImageURLOptionsCompletionHandler(@NotNull NSURL imageURL, @NotNull NSDictionary<java.lang.String,?> options, VNTargetedImageRequest.Block_initWithTargetedImageURLOptionsCompletionHandler completionHandler)Create a new request with a targeted image URL.VNGenerateOpticalFlowRequestinitWithTargetedImageURLOrientationOptions(@NotNull NSURL imageURL, int orientation, @NotNull NSDictionary<java.lang.String,?> options)Create a new request with a targeted image URL.VNGenerateOpticalFlowRequestinitWithTargetedImageURLOrientationOptionsCompletionHandler(@NotNull NSURL imageURL, int orientation, @NotNull NSDictionary<java.lang.String,?> options, VNTargetedImageRequest.Block_initWithTargetedImageURLOrientationOptionsCompletionHandler completionHandler)Create a new request with a targeted image URL.static NSObject.Function_instanceMethodForSelector_retinstanceMethodForSelector(org.moe.natj.objc.SEL aSelector)static NSMethodSignatureinstanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)static booleaninstancesRespondToSelector(org.moe.natj.objc.SEL aSelector)static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)booleankeepNetworkOutput()Setting this to YES will keep the raw pixel buffer coming from the the ML network.static @NotNull NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(@NotNull java.lang.String key)static VNGenerateOpticalFlowRequestnew_objc()intoutputPixelFormat()Pixel format type of the output buffer.static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)@Nullable NSArray<? extends VNPixelBufferObservation>results()VNPixelBufferObservation results.voidsetComputationAccuracy(long value)The level of accuracy used to compute the optical flow.voidsetKeepNetworkOutput(boolean value)Setting this to YES will keep the raw pixel buffer coming from the the ML network.voidsetOutputPixelFormat(int value)Pixel format type of the output buffer.static voidsetVersion_static(long aVersion)static org.moe.natj.objc.Classsuperclass_static()static @NotNull NSIndexSetsupportedRevisions()static booleanuseStoredAccessor()Deprecated.static longversion_static()-
Methods inherited from class apple.vision.VNImageBasedRequest
regionOfInterest, setRegionOfInterest
-
Methods inherited from class apple.vision.VNRequest
cancel, completionHandler, computeDeviceForComputeStage, copyWithZone, preferBackgroundProcessing, revision, setComputeDeviceForComputeStage, setPreferBackgroundProcessing, setRevision, setUsesCPUOnly, supportedComputeStageDevicesAndReturnError, usesCPUOnly
-
Methods inherited from class apple.NSObject
accessibilityActivate, accessibilityActivateBlock, accessibilityActivationPoint, accessibilityActivationPointBlock, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedHintBlock, accessibilityAttributedLabel, accessibilityAttributedLabelBlock, accessibilityAttributedUserInputLabels, accessibilityAttributedUserInputLabelsBlock, accessibilityAttributedValue, accessibilityAttributedValueBlock, accessibilityContainerType, accessibilityContainerTypeBlock, accessibilityCustomActions, accessibilityCustomActionsBlock, accessibilityCustomRotors, accessibilityCustomRotorsBlock, accessibilityDecrement, accessibilityDecrementBlock, accessibilityDirectTouchOptions, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsBlock, accessibilityElementsHidden, accessibilityElementsHiddenBlock, accessibilityFrame, accessibilityFrameBlock, accessibilityHeaderElementsBlock, accessibilityHint, accessibilityHintBlock, accessibilityIdentifierBlock, accessibilityIncrement, accessibilityIncrementBlock, accessibilityLabel, accessibilityLabelBlock, accessibilityLanguage, accessibilityLanguageBlock, accessibilityMagicTapBlock, accessibilityNavigationStyle, accessibilityNavigationStyleBlock, accessibilityPath, accessibilityPathBlock, accessibilityPerformEscape, accessibilityPerformEscapeBlock, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityRespondsToUserInteractionBlock, accessibilityScroll, accessibilityShouldGroupAccessibilityChildrenBlock, accessibilityTextualContext, accessibilityTextualContextBlock, accessibilityTraits, accessibilityTraitsBlock, accessibilityUserInputLabels, accessibilityUserInputLabelsBlock, accessibilityValue, accessibilityValueBlock, accessibilityViewIsModal, accessibilityViewIsModalBlock, accessibilityZoomInAtPoint, accessibilityZoomOutAtPoint, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, automationElements, automationElementsBlock, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hash, indexOfAccessibilityElement, isAccessibilityElement, isAccessibilityElementBlock, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivateBlock, setAccessibilityActivationPoint, setAccessibilityActivationPointBlock, setAccessibilityAttributedHint, setAccessibilityAttributedHintBlock, setAccessibilityAttributedLabel, setAccessibilityAttributedLabelBlock, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedUserInputLabelsBlock, setAccessibilityAttributedValue, setAccessibilityAttributedValueBlock, setAccessibilityContainerType, setAccessibilityContainerTypeBlock, setAccessibilityCustomActions, setAccessibilityCustomActionsBlock, setAccessibilityCustomRotors, setAccessibilityCustomRotorsBlock, setAccessibilityDecrementBlock, setAccessibilityDirectTouchOptions, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsBlock, setAccessibilityElementsHidden, setAccessibilityElementsHiddenBlock, setAccessibilityFrame, setAccessibilityFrameBlock, setAccessibilityHeaderElementsBlock, setAccessibilityHint, setAccessibilityHintBlock, setAccessibilityIdentifierBlock, setAccessibilityIncrementBlock, setAccessibilityLabel, setAccessibilityLabelBlock, setAccessibilityLanguage, setAccessibilityLanguageBlock, setAccessibilityMagicTapBlock, setAccessibilityNavigationStyle, setAccessibilityNavigationStyleBlock, setAccessibilityPath, setAccessibilityPathBlock, setAccessibilityPerformEscapeBlock, setAccessibilityRespondsToUserInteraction, setAccessibilityRespondsToUserInteractionBlock, setAccessibilityShouldGroupAccessibilityChildrenBlock, setAccessibilityTextualContext, setAccessibilityTextualContextBlock, setAccessibilityTraits, setAccessibilityTraitsBlock, setAccessibilityUserInputLabels, setAccessibilityUserInputLabelsBlock, setAccessibilityValue, setAccessibilityValueBlock, setAccessibilityViewIsModal, setAccessibilityViewIsModalBlock, setAutomationElements, setAutomationElementsBlock, setIsAccessibilityElement, setIsAccessibilityElementBlock, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, storedValueForKey, superclass, takeStoredValueForKey, takeValueForKey, takeValueForKeyPath, takeValuesFromDictionary, unableToSetNilForKey, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, valuesForKeys, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
alloc
public static VNGenerateOpticalFlowRequest alloc()
-
allocWithZone
public static VNGenerateOpticalFlowRequest 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()
-
computationAccuracy
public long computationAccuracy()
The level of accuracy used to compute the optical flow. Default is VNGenerateOpticalFlowRequestComputationAccuracyMedium. The computational time typically trends with the accuracy level. This parameter allows for selective tuning by the client application.
-
currentRevision
public static long currentRevision()
-
debugDescription_static
public static java.lang.String debugDescription_static()
-
defaultRevision
public static long defaultRevision()
-
description_static
public static java.lang.String description_static()
-
hash_static
public static long hash_static()
-
init
public VNGenerateOpticalFlowRequest init()
Description copied from class:VNRequestCreates a new VNRequest with no completion handler.- Overrides:
initin classVNTargetedImageRequest
-
initWithCompletionHandler
public VNGenerateOpticalFlowRequest initWithCompletionHandler(@Nullable VNRequest.Block_initWithCompletionHandler completionHandler)
Description copied from class:VNRequestCreates a new VNRequest with an optional completion handler.- Overrides:
initWithCompletionHandlerin classVNTargetedImageRequest- Parameters:
completionHandler- The block to be invoked after the request has completed its processing. The completion handler gets executed on the same dispatch queue as the request being executed.
-
initWithTargetedCGImageOptions
public VNGenerateOpticalFlowRequest initWithTargetedCGImageOptions(@NotNull @NotNull CGImageRef cgImage, @NotNull @NotNull NSDictionary<java.lang.String,?> options)
Description copied from class:VNTargetedImageRequestCreate a new request with a targeted CGImage.- Overrides:
initWithTargetedCGImageOptionsin classVNTargetedImageRequest- Parameters:
cgImage- The CGImageRef of the targeted image.options- A dictionary with options specifying auxiliary information for the image.
-
initWithTargetedCGImageOptionsCompletionHandler
public VNGenerateOpticalFlowRequest initWithTargetedCGImageOptionsCompletionHandler(@NotNull @NotNull CGImageRef cgImage, @NotNull @NotNull NSDictionary<java.lang.String,?> options, @Nullable VNTargetedImageRequest.Block_initWithTargetedCGImageOptionsCompletionHandler completionHandler)
Description copied from class:VNTargetedImageRequestCreate a new request with a targeted CGImage.- Overrides:
initWithTargetedCGImageOptionsCompletionHandlerin classVNTargetedImageRequest- Parameters:
cgImage- The CGImageRef of the targeted image.options- A dictionary with options specifying auxiliary information for the image.completionHandler- The block that is invoked when the request has been performed.
-
initWithTargetedCGImageOrientationOptions
public VNGenerateOpticalFlowRequest initWithTargetedCGImageOrientationOptions(@NotNull @NotNull CGImageRef cgImage, int orientation, @NotNull @NotNull NSDictionary<java.lang.String,?> options)
Description copied from class:VNTargetedImageRequestCreate a new request with a targeted CGImage.- Overrides:
initWithTargetedCGImageOrientationOptionsin classVNTargetedImageRequest- Parameters:
cgImage- The CGImageRef of the targeted image.orientation- The orientation of the image/buffer based on the EXIF specification. For details see kCGImagePropertyOrientation. The value has to be an integer from 1 to 8. This supersedes every other orientation information.options- A dictionary with options specifying auxiliary information for the image.
-
initWithTargetedCGImageOrientationOptionsCompletionHandler
public VNGenerateOpticalFlowRequest initWithTargetedCGImageOrientationOptionsCompletionHandler(@NotNull @NotNull CGImageRef cgImage, int orientation, @NotNull @NotNull NSDictionary<java.lang.String,?> options, @Nullable VNTargetedImageRequest.Block_initWithTargetedCGImageOrientationOptionsCompletionHandler completionHandler)
Description copied from class:VNTargetedImageRequestCreate a new request with a targeted CGImage.- Overrides:
initWithTargetedCGImageOrientationOptionsCompletionHandlerin classVNTargetedImageRequest- Parameters:
cgImage- The CGImageRef of the targeted image.orientation- The orientation of the image/buffer based on the EXIF specification. For details see kCGImagePropertyOrientation. The value has to be an integer from 1 to 8. This supersedes every other orientation information.options- A dictionary with options specifying auxiliary information for the image.completionHandler- The block that is invoked when the request has been performed.
-
initWithTargetedCIImageOptions
public VNGenerateOpticalFlowRequest initWithTargetedCIImageOptions(@NotNull @NotNull CIImage ciImage, @NotNull @NotNull NSDictionary<java.lang.String,?> options)
Description copied from class:VNTargetedImageRequestCreate a new request with a targeted CIImage.- Overrides:
initWithTargetedCIImageOptionsin classVNTargetedImageRequest- Parameters:
ciImage- The CIImage of the targeted image.options- A dictionary with options specifying auxiliary information for the image.
-
initWithTargetedCIImageOptionsCompletionHandler
public VNGenerateOpticalFlowRequest initWithTargetedCIImageOptionsCompletionHandler(@NotNull @NotNull CIImage ciImage, @NotNull @NotNull NSDictionary<java.lang.String,?> options, @Nullable VNTargetedImageRequest.Block_initWithTargetedCIImageOptionsCompletionHandler completionHandler)
Description copied from class:VNTargetedImageRequestCreate a new request with a targeted CIImage.- Overrides:
initWithTargetedCIImageOptionsCompletionHandlerin classVNTargetedImageRequest- Parameters:
ciImage- The CIImage of the targeted image.options- A dictionary with options specifying auxiliary information for the image.completionHandler- The block that is invoked when the request has been performed.
-
initWithTargetedCIImageOrientationOptions
public VNGenerateOpticalFlowRequest initWithTargetedCIImageOrientationOptions(@NotNull @NotNull CIImage ciImage, int orientation, @NotNull @NotNull NSDictionary<java.lang.String,?> options)
Description copied from class:VNTargetedImageRequestCreate a new request with a targeted CIImage.- Overrides:
initWithTargetedCIImageOrientationOptionsin classVNTargetedImageRequest- Parameters:
ciImage- The CIImage of the targeted image.orientation- The orientation of the image/buffer based on the EXIF specification. For details see kCGImagePropertyOrientation. The value has to be an integer from 1 to 8. This supersedes every other orientation information.options- A dictionary with options specifying auxiliary information for the image.
-
initWithTargetedCIImageOrientationOptionsCompletionHandler
public VNGenerateOpticalFlowRequest initWithTargetedCIImageOrientationOptionsCompletionHandler(@NotNull @NotNull CIImage ciImage, int orientation, @NotNull @NotNull NSDictionary<java.lang.String,?> options, @Nullable VNTargetedImageRequest.Block_initWithTargetedCIImageOrientationOptionsCompletionHandler completionHandler)
Description copied from class:VNTargetedImageRequestCreate a new request with a targeted CIImage.- Overrides:
initWithTargetedCIImageOrientationOptionsCompletionHandlerin classVNTargetedImageRequest- Parameters:
ciImage- The CIImage of the targeted image.orientation- The orientation of the image/buffer based on the EXIF specification. For details see kCGImagePropertyOrientation. The value has to be an integer from 1 to 8. This supersedes every other orientation information.options- A dictionary with options specifying auxiliary information for the image.completionHandler- The block that is invoked when the request has been performed.
-
initWithTargetedCMSampleBufferOptions
public VNGenerateOpticalFlowRequest initWithTargetedCMSampleBufferOptions(@NotNull @NotNull CMSampleBufferRef sampleBuffer, @NotNull @NotNull NSDictionary<java.lang.String,?> options)
Description copied from class:VNTargetedImageRequestCreate a new request with a targeted CMSampleBuffer.- Overrides:
initWithTargetedCMSampleBufferOptionsin classVNTargetedImageRequest- Parameters:
sampleBuffer- The CMSampleBuffer containing the CVImageBuffer to be used by the request.options- A dictionary with options specifying auxiliary information for the image. API-Since: 14.0
-
initWithTargetedCMSampleBufferOptionsCompletionHandler
public VNGenerateOpticalFlowRequest initWithTargetedCMSampleBufferOptionsCompletionHandler(@NotNull @NotNull CMSampleBufferRef sampleBuffer, @NotNull @NotNull NSDictionary<java.lang.String,?> options, @Nullable VNTargetedImageRequest.Block_initWithTargetedCMSampleBufferOptionsCompletionHandler completionHandler)
Description copied from class:VNTargetedImageRequestCreate a new request with a targeted CMSampleBuffer.- Overrides:
initWithTargetedCMSampleBufferOptionsCompletionHandlerin classVNTargetedImageRequest- Parameters:
sampleBuffer- The CMSampleBuffer containing the CVImageBuffer to be used by the request.options- A dictionary with options specifying auxiliary information for the image.completionHandler- The block that is invoked after the request has been performed. API-Since: 14.0
-
initWithTargetedCMSampleBufferOrientationOptions
public VNGenerateOpticalFlowRequest initWithTargetedCMSampleBufferOrientationOptions(@NotNull @NotNull CMSampleBufferRef sampleBuffer, int orientation, @NotNull @NotNull NSDictionary<java.lang.String,?> options)
Description copied from class:VNTargetedImageRequestCreate a new request with a targeted CMSampleBuffer.- Overrides:
initWithTargetedCMSampleBufferOrientationOptionsin classVNTargetedImageRequest- Parameters:
sampleBuffer- The CMSampleBuffer containing the CVImageBuffer to be used by the request.orientation- The orientation of the image/buffer based on the EXIF specification. For details see kCGImagePropertyOrientation. The value has to be an integer from 1 to 8. This supersedes every other orientation information.options- A dictionary with options specifying auxiliary information for the image. API-Since: 14.0
-
initWithTargetedCMSampleBufferOrientationOptionsCompletionHandler
public VNGenerateOpticalFlowRequest initWithTargetedCMSampleBufferOrientationOptionsCompletionHandler(@NotNull @NotNull CMSampleBufferRef sampleBuffer, int orientation, @NotNull @NotNull NSDictionary<java.lang.String,?> options, @Nullable VNTargetedImageRequest.Block_initWithTargetedCMSampleBufferOrientationOptionsCompletionHandler completionHandler)
Description copied from class:VNTargetedImageRequestCreate a new request with a targeted CMSampleBuffer.- Overrides:
initWithTargetedCMSampleBufferOrientationOptionsCompletionHandlerin classVNTargetedImageRequest- Parameters:
sampleBuffer- The CMSampleBuffer containing the CVImageBuffer to be used by the request.orientation- The orientation of the image/buffer based on the EXIF specification. For details see kCGImagePropertyOrientation. The value has to be an integer from 1 to 8. This supersedes every other orientation information.options- A dictionary with options specifying auxiliary information for the image.completionHandler- The block that is invoked after the request has been performed. API-Since: 14.0
-
initWithTargetedCVPixelBufferOptions
public VNGenerateOpticalFlowRequest initWithTargetedCVPixelBufferOptions(@NotNull @NotNull CVBufferRef pixelBuffer, @NotNull @NotNull NSDictionary<java.lang.String,?> options)
Description copied from class:VNTargetedImageRequestCreate a new request that targets an image in a pixel buffer.- Overrides:
initWithTargetedCVPixelBufferOptionsin classVNTargetedImageRequest- Parameters:
pixelBuffer- The pixel buffer containing the targeted image.options- A dictionary with options specifying auxiliary information for the image.
-
initWithTargetedCVPixelBufferOptionsCompletionHandler
public VNGenerateOpticalFlowRequest initWithTargetedCVPixelBufferOptionsCompletionHandler(@NotNull @NotNull CVBufferRef pixelBuffer, @NotNull @NotNull NSDictionary<java.lang.String,?> options, @Nullable VNTargetedImageRequest.Block_initWithTargetedCVPixelBufferOptionsCompletionHandler completionHandler)
Description copied from class:VNTargetedImageRequestCreate a new request that targets an image in a pixel buffer.- Overrides:
initWithTargetedCVPixelBufferOptionsCompletionHandlerin classVNTargetedImageRequest- Parameters:
pixelBuffer- The pixel buffer containing the targeted image.options- A dictionary with options specifying auxiliary information for the image.completionHandler- The block that is invoked when the request has been performed.
-
initWithTargetedCVPixelBufferOrientationOptions
public VNGenerateOpticalFlowRequest initWithTargetedCVPixelBufferOrientationOptions(@NotNull @NotNull CVBufferRef pixelBuffer, int orientation, @NotNull @NotNull NSDictionary<java.lang.String,?> options)
Description copied from class:VNTargetedImageRequestCreate a new request that targets an image in a pixel buffer.- Overrides:
initWithTargetedCVPixelBufferOrientationOptionsin classVNTargetedImageRequest- Parameters:
pixelBuffer- The pixel buffer containing the targeted image.orientation- The orientation of the image/buffer based on the EXIF specification. For details see kCGImagePropertyOrientation. The value has to be an integer from 1 to 8. This supersedes every other orientation information.options- A dictionary with options specifying auxiliary information for the image.
-
initWithTargetedCVPixelBufferOrientationOptionsCompletionHandler
public VNGenerateOpticalFlowRequest initWithTargetedCVPixelBufferOrientationOptionsCompletionHandler(@NotNull @NotNull CVBufferRef pixelBuffer, int orientation, @NotNull @NotNull NSDictionary<java.lang.String,?> options, @Nullable VNTargetedImageRequest.Block_initWithTargetedCVPixelBufferOrientationOptionsCompletionHandler completionHandler)
Description copied from class:VNTargetedImageRequestCreate a new request that targets an image in a pixel buffer.- Overrides:
initWithTargetedCVPixelBufferOrientationOptionsCompletionHandlerin classVNTargetedImageRequest- Parameters:
pixelBuffer- The pixel buffer containing the targeted image.orientation- The orientation of the image/buffer based on the EXIF specification. For details see kCGImagePropertyOrientation. The value has to be an integer from 1 to 8. This supersedes every other orientation information.options- A dictionary with options specifying auxiliary information for the image.completionHandler- The block that is invoked when the request has been performed.
-
initWithTargetedImageDataOptions
public VNGenerateOpticalFlowRequest initWithTargetedImageDataOptions(@NotNull @NotNull NSData imageData, @NotNull @NotNull NSDictionary<java.lang.String,?> options)
Description copied from class:VNTargetedImageRequestCreate a new request with a targeted image data.- Overrides:
initWithTargetedImageDataOptionsin classVNTargetedImageRequest- Parameters:
imageData- The data of the targeted image.options- A dictionary with options specifying auxiliary information for the image.
-
initWithTargetedImageDataOptionsCompletionHandler
public VNGenerateOpticalFlowRequest initWithTargetedImageDataOptionsCompletionHandler(@NotNull @NotNull NSData imageData, @NotNull @NotNull NSDictionary<java.lang.String,?> options, @Nullable VNTargetedImageRequest.Block_initWithTargetedImageDataOptionsCompletionHandler completionHandler)
Description copied from class:VNTargetedImageRequestCreate a new request with a targeted image data.- Overrides:
initWithTargetedImageDataOptionsCompletionHandlerin classVNTargetedImageRequest- Parameters:
imageData- The data of the targeted image.options- A dictionary with options specifying auxiliary information for the image.completionHandler- The block that is invoked when the request has been performed.
-
initWithTargetedImageDataOrientationOptions
public VNGenerateOpticalFlowRequest initWithTargetedImageDataOrientationOptions(@NotNull @NotNull NSData imageData, int orientation, @NotNull @NotNull NSDictionary<java.lang.String,?> options)
Description copied from class:VNTargetedImageRequestCreate a new request with a targeted image data.- Overrides:
initWithTargetedImageDataOrientationOptionsin classVNTargetedImageRequest- Parameters:
imageData- The data of the targeted image.orientation- The orientation of the image/buffer based on the EXIF specification. For details see kCGImagePropertyOrientation. The value has to be an integer from 1 to 8. This supersedes every other orientation information.options- A dictionary with options specifying auxiliary information for the image.
-
initWithTargetedImageDataOrientationOptionsCompletionHandler
public VNGenerateOpticalFlowRequest initWithTargetedImageDataOrientationOptionsCompletionHandler(@NotNull @NotNull NSData imageData, int orientation, @NotNull @NotNull NSDictionary<java.lang.String,?> options, @Nullable VNTargetedImageRequest.Block_initWithTargetedImageDataOrientationOptionsCompletionHandler completionHandler)
Description copied from class:VNTargetedImageRequestCreate a new request with a targeted image data.- Overrides:
initWithTargetedImageDataOrientationOptionsCompletionHandlerin classVNTargetedImageRequest- Parameters:
imageData- The data of the targeted image.orientation- The orientation of the image/buffer based on the EXIF specification. For details see kCGImagePropertyOrientation. The value has to be an integer from 1 to 8. This supersedes every other orientation information.options- A dictionary with options specifying auxiliary information for the image.completionHandler- The block that is invoked when the request has been performed.
-
initWithTargetedImageURLOptions
public VNGenerateOpticalFlowRequest initWithTargetedImageURLOptions(@NotNull @NotNull NSURL imageURL, @NotNull @NotNull NSDictionary<java.lang.String,?> options)
Description copied from class:VNTargetedImageRequestCreate a new request with a targeted image URL.- Overrides:
initWithTargetedImageURLOptionsin classVNTargetedImageRequest- Parameters:
imageURL- The URL of the targeted image.options- A dictionary with options specifying auxiliary information for the image.
-
initWithTargetedImageURLOptionsCompletionHandler
public VNGenerateOpticalFlowRequest initWithTargetedImageURLOptionsCompletionHandler(@NotNull @NotNull NSURL imageURL, @NotNull @NotNull NSDictionary<java.lang.String,?> options, @Nullable VNTargetedImageRequest.Block_initWithTargetedImageURLOptionsCompletionHandler completionHandler)
Description copied from class:VNTargetedImageRequestCreate a new request with a targeted image URL.- Overrides:
initWithTargetedImageURLOptionsCompletionHandlerin classVNTargetedImageRequest- Parameters:
imageURL- The URL of the targeted image.options- A dictionary with options specifying auxiliary information for the image.completionHandler- The block that is invoked when the request has been performed.
-
initWithTargetedImageURLOrientationOptions
public VNGenerateOpticalFlowRequest initWithTargetedImageURLOrientationOptions(@NotNull @NotNull NSURL imageURL, int orientation, @NotNull @NotNull NSDictionary<java.lang.String,?> options)
Description copied from class:VNTargetedImageRequestCreate a new request with a targeted image URL.- Overrides:
initWithTargetedImageURLOrientationOptionsin classVNTargetedImageRequest- Parameters:
imageURL- The URL of the targeted image.orientation- The orientation of the image/buffer based on the EXIF specification. For details see kCGImagePropertyOrientation. The value has to be an integer from 1 to 8. This supersedes every other orientation information.options- A dictionary with options specifying auxiliary information for the image.
-
initWithTargetedImageURLOrientationOptionsCompletionHandler
public VNGenerateOpticalFlowRequest initWithTargetedImageURLOrientationOptionsCompletionHandler(@NotNull @NotNull NSURL imageURL, int orientation, @NotNull @NotNull NSDictionary<java.lang.String,?> options, @Nullable VNTargetedImageRequest.Block_initWithTargetedImageURLOrientationOptionsCompletionHandler completionHandler)
Description copied from class:VNTargetedImageRequestCreate a new request with a targeted image URL.- Overrides:
initWithTargetedImageURLOrientationOptionsCompletionHandlerin classVNTargetedImageRequest- Parameters:
imageURL- The URL of the targeted image.orientation- The orientation of the image/buffer based on the EXIF specification. For details see kCGImagePropertyOrientation. The value has to be an integer from 1 to 8. This supersedes every other orientation information.options- A dictionary with options specifying auxiliary information for the image.completionHandler- The block that is invoked when the request has been performed.
-
instanceMethodForSelector
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
-
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
@NotNull public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(@NotNull @NotNull java.lang.String key)
-
new_objc
public static VNGenerateOpticalFlowRequest new_objc()
-
outputPixelFormat
public int outputPixelFormat()
Pixel format type of the output buffer. Valid values are kCVPixelFormatType_TwoComponent32Float and kCVPixelFormatType_TwoComponent16Half. Default is kCVPixelFormatType_TwoComponent32Float.
-
resolveClassMethod
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
-
resolveInstanceMethod
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
-
setComputationAccuracy
public void setComputationAccuracy(long value)
The level of accuracy used to compute the optical flow. Default is VNGenerateOpticalFlowRequestComputationAccuracyMedium. The computational time typically trends with the accuracy level. This parameter allows for selective tuning by the client application.
-
setOutputPixelFormat
public void setOutputPixelFormat(int value)
Pixel format type of the output buffer. Valid values are kCVPixelFormatType_TwoComponent32Float and kCVPixelFormatType_TwoComponent16Half. Default is kCVPixelFormatType_TwoComponent32Float.
-
setVersion_static
public static void setVersion_static(long aVersion)
-
superclass_static
public static org.moe.natj.objc.Class superclass_static()
-
supportedRevisions
@NotNull public static @NotNull NSIndexSet supportedRevisions()
-
version_static
public static long version_static()
-
results
@Nullable public @Nullable NSArray<? extends VNPixelBufferObservation> results()
VNPixelBufferObservation results.
-
keepNetworkOutput
public boolean keepNetworkOutput()
Setting this to YES will keep the raw pixel buffer coming from the the ML network. The default is NO. When set to YES, the outputPixelFormat is ignored. Setting this for revision 1 is a no-op as it is not ML-based. API-Since: 16.0
-
setKeepNetworkOutput
public void setKeepNetworkOutput(boolean value)
Setting this to YES will keep the raw pixel buffer coming from the the ML network. The default is NO. When set to YES, the outputPixelFormat is ignored. Setting this for revision 1 is a no-op as it is not ML-based. API-Since: 16.0
-
useStoredAccessor
@Deprecated public static boolean useStoredAccessor()
Deprecated.
-
-