Package apple.vision
Class VNRecognizeTextRequest
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.vision.VNRequest
-
- apple.vision.VNImageBasedRequest
-
- apple.vision.VNRecognizeTextRequest
-
- All Implemented Interfaces:
NSCopying,NSObject,VNRequestProgressProviding
public class VNRecognizeTextRequest extends VNImageBasedRequest implements VNRequestProgressProviding
A request that will detect regions of text and recognize the containing text in an image. This request will generate VNRecognizedTextObservation objects describing the locations of text and the actual text recognized.
-
-
Nested Class Summary
-
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.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
Nested classes/interfaces inherited from interface apple.vision.protocol.VNRequestProgressProviding
VNRequestProgressProviding.Block_progressHandler_ret, VNRequestProgressProviding.Block_setProgressHandler
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedVNRecognizeTextRequest(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()static VNRecognizeTextRequestalloc()static java.lang.ObjectallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)static booleanautomaticallyNotifiesObserversForKey(java.lang.String key)static voidcancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)static NSArray<java.lang.String>classFallbacksForKeyedArchiver()static org.moe.natj.objc.ClassclassForKeyedUnarchiver()static longcurrentRevision()NSArray<java.lang.String>customWords()An array of strings that will be used at the word recognition stage in addition to the recognition languages.static java.lang.StringdebugDescription_static()static longdefaultRevision()static java.lang.Stringdescription_static()static longhash_static()booleanindeterminate()If a request cannot determine its progress in fractions completed, this property will be set.VNRecognizeTextRequestinit()Creates a new VNRequest with no completion handler.VNRecognizeTextRequestinitWithCompletionHandler(VNRequest.Block_initWithCompletionHandler completionHandler)Creates a new VNRequest with an optional completion handler.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)static NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(java.lang.String key)floatminimumTextHeight()Minimum height of the text expected to be recognized, relative to the image height (e.g. for half of the image height, use 0.5).static java.lang.Objectnew_objc()VNRequestProgressProviding.Block_progressHandler_retprogressHandler()Requests that support the VNRequestProgressProviding protocol would periodically call the progressHandler to report progress on longer running tasks.NSArray<java.lang.String>recognitionLanguages()Specify the languages used for the detection.longrecognitionLevel()The recognition level selects which techniques will be used during the text recognition.static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)voidsetCustomWords(NSArray<java.lang.String> value)An array of strings that will be used at the word recognition stage in addition to the recognition languages.voidsetMinimumTextHeight(float value)Minimum height of the text expected to be recognized, relative to the image height (e.g. for half of the image height, use 0.5).voidsetProgressHandler(VNRequestProgressProviding.Block_setProgressHandler value)Requests that support the VNRequestProgressProviding protocol would periodically call the progressHandler to report progress on longer running tasks.voidsetRecognitionLanguages(NSArray<java.lang.String> value)Specify the languages used for the detection.voidsetRecognitionLevel(long value)The recognition level selects which techniques will be used during the text recognition.voidsetUsesLanguageCorrection(boolean value)Determines whether language correction should be applied during the recognition process.static voidsetVersion_static(long aVersion)static org.moe.natj.objc.Classsuperclass_static()static NSArray<java.lang.String>supportedRecognitionLanguagesForTextRecognitionLevelRevisionError(long recognitionLevel, long requestRevision, org.moe.natj.general.ptr.Ptr<NSError> error)Returns all the supported languages for a given text recognition level.static NSIndexSetsupportedRevisions()booleanusesLanguageCorrection()Determines whether language correction should be applied during the recognition process.static longversion_static()-
Methods inherited from class apple.vision.VNImageBasedRequest
regionOfInterest, setRegionOfInterest
-
Methods inherited from class apple.vision.VNRequest
cancel, completionHandler, copyWithZone, preferBackgroundProcessing, results, revision, setPreferBackgroundProcessing, setRevision, setUsesCPUOnly, usesCPUOnly
-
Methods inherited from class apple.NSObject
accessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, 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, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
alloc
public static VNRecognizeTextRequest alloc()
-
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()
-
currentRevision
public static long currentRevision()
-
customWords
public NSArray<java.lang.String> customWords()
An array of strings that will be used at the word recognition stage in addition to the recognition languages. The customWords list takes precedence over the standard lexicon.
-
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()
-
indeterminate
public boolean indeterminate()
Description copied from interface:VNRequestProgressProvidingIf a request cannot determine its progress in fractions completed, this property will be set. If this is set, it doesn't mean that the request will run forever just that the nature of the request is not broken down into identifiable fractions on which progress can be reported in increments. The progressHandler will nonetheless be called at suitable intervals.- Specified by:
indeterminatein interfaceVNRequestProgressProviding
-
init
public VNRecognizeTextRequest init()
Description copied from class:VNRequestCreates a new VNRequest with no completion handler.- Overrides:
initin classVNImageBasedRequest
-
initWithCompletionHandler
public VNRecognizeTextRequest initWithCompletionHandler(VNRequest.Block_initWithCompletionHandler completionHandler)
Description copied from class:VNRequestCreates a new VNRequest with an optional completion handler.- Overrides:
initWithCompletionHandlerin classVNImageBasedRequest- 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.
-
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
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
-
minimumTextHeight
public float minimumTextHeight()
Minimum height of the text expected to be recognized, relative to the image height (e.g. for half of the image height, use 0.5). Increasing the size will reduce the memory consumption and speed up the recognition with the trade-off that text smaller than the minimum height may not be recognized properly. If the minimum height is set to 0.0 the image gets processed at the highest possible resolution with no downscaling. With that the processing time will be the longest and the memory usage the highest but the smallest technically readable text will be recognized. The default value for this is 0.0.
-
new_objc
public static java.lang.Object new_objc()
-
progressHandler
public VNRequestProgressProviding.Block_progressHandler_ret progressHandler()
Description copied from interface:VNRequestProgressProvidingRequests that support the VNRequestProgressProviding protocol would periodically call the progressHandler to report progress on longer running tasks. The progessHandler is optional allowing clients of the request to report progress to the user and/or display or process partial results when they become available. Note that the progressHandler can be called on a different dispatch queue than what the request was initiated from.- Specified by:
progressHandlerin interfaceVNRequestProgressProviding
-
recognitionLanguages
public NSArray<java.lang.String> recognitionLanguages()
Specify the languages used for the detection. The order of the languages in the array defines the order in which languages will be used during the language processing. The languages are specified as ISO language codes.
-
recognitionLevel
public long recognitionLevel()
The recognition level selects which techniques will be used during the text recognition. There are trade-offs between performance and accuracy.
-
resolveClassMethod
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
-
resolveInstanceMethod
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
-
setCustomWords
public void setCustomWords(NSArray<java.lang.String> value)
An array of strings that will be used at the word recognition stage in addition to the recognition languages. The customWords list takes precedence over the standard lexicon.
-
setMinimumTextHeight
public void setMinimumTextHeight(float value)
Minimum height of the text expected to be recognized, relative to the image height (e.g. for half of the image height, use 0.5). Increasing the size will reduce the memory consumption and speed up the recognition with the trade-off that text smaller than the minimum height may not be recognized properly. If the minimum height is set to 0.0 the image gets processed at the highest possible resolution with no downscaling. With that the processing time will be the longest and the memory usage the highest but the smallest technically readable text will be recognized. The default value for this is 0.0.
-
setProgressHandler
public void setProgressHandler(VNRequestProgressProviding.Block_setProgressHandler value)
Description copied from interface:VNRequestProgressProvidingRequests that support the VNRequestProgressProviding protocol would periodically call the progressHandler to report progress on longer running tasks. The progessHandler is optional allowing clients of the request to report progress to the user and/or display or process partial results when they become available. Note that the progressHandler can be called on a different dispatch queue than what the request was initiated from.- Specified by:
setProgressHandlerin interfaceVNRequestProgressProviding
-
setRecognitionLanguages
public void setRecognitionLanguages(NSArray<java.lang.String> value)
Specify the languages used for the detection. The order of the languages in the array defines the order in which languages will be used during the language processing. The languages are specified as ISO language codes.
-
setRecognitionLevel
public void setRecognitionLevel(long value)
The recognition level selects which techniques will be used during the text recognition. There are trade-offs between performance and accuracy.
-
setUsesLanguageCorrection
public void setUsesLanguageCorrection(boolean value)
Determines whether language correction should be applied during the recognition process. Disabling this will return the raw recognition results providing performance benefits but less accurate results.
-
setVersion_static
public static void setVersion_static(long aVersion)
-
superclass_static
public static org.moe.natj.objc.Class superclass_static()
-
supportedRecognitionLanguagesForTextRecognitionLevelRevisionError
public static NSArray<java.lang.String> supportedRecognitionLanguagesForTextRecognitionLevelRevisionError(long recognitionLevel, long requestRevision, org.moe.natj.general.ptr.Ptr<NSError> error)
Returns all the supported languages for a given text recognition level. Note that a language supported in one recognition level might not be available in another.
-
supportedRevisions
public static NSIndexSet supportedRevisions()
-
usesLanguageCorrection
public boolean usesLanguageCorrection()
Determines whether language correction should be applied during the recognition process. Disabling this will return the raw recognition results providing performance benefits but less accurate results.
-
version_static
public static long version_static()
-
-