Package apple.vision

Class VNRecognizeTextRequest

    • Constructor Detail

      • VNRecognizeTextRequest

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static VNRecognizeTextRequest 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()
      • currentRevision

        public static long currentRevision()
      • customWords

        @NotNull
        public @NotNull 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: VNRequestProgressProviding
        If 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:
        indeterminate in interface VNRequestProgressProviding
      • 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)
      • 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.
      • progressHandler

        @NotNull
        public VNRequestProgressProviding.Block_progressHandler_ret progressHandler()
        Description copied from interface: VNRequestProgressProviding
        Requests 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:
        progressHandler in interface VNRequestProgressProviding
      • recognitionLanguages

        @NotNull
        public @NotNull 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​(@NotNull
                                   @NotNull 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​(@NotNull
                                       VNRequestProgressProviding.Block_setProgressHandler value)
        Description copied from interface: VNRequestProgressProviding
        Requests 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:
        setProgressHandler in interface VNRequestProgressProviding
      • setRecognitionLanguages

        public void setRecognitionLanguages​(@NotNull
                                            @NotNull 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

        @Nullable
        @Deprecated
        public static @Nullable NSArray<java.lang.String> supportedRecognitionLanguagesForTextRecognitionLevelRevisionError​(long recognitionLevel,
                                                                                                                            long requestRevision,
                                                                                                                            @Nullable
                                                                                                                            @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Deprecated.
        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. API-Since: 13.0 Deprecated-Since: 15.0
      • supportedRevisions

        @NotNull
        public static @NotNull 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()
      • supportedRecognitionLanguagesAndReturnError

        @Nullable
        public @Nullable NSArray<java.lang.String> supportedRecognitionLanguagesAndReturnError​(@Nullable
                                                                                               @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Obtain the collection of supported recognition languages. This method will return the collection of all possible language identifiers that are recognized by the target request based on its current state of configuration at the time of the call.
        Parameters:
        error - The address of the variable that will be populated with the error if the call fails.
        Returns:
        The collection of language identifiers, or nil if a failure occurs. API-Since: 15.0
      • automaticallyDetectsLanguage

        public boolean automaticallyDetectsLanguage()
        Language detection will try to automatically identify the script/langauge during the detection and use the appropiate model for recognition and language correction. This can be particularly helpful, if the nature of the content is unkown and with this flag being set it will for instance determine if text is latin vs chinese so you don't have to pick the language model in the first case. But as the language correction cannot always guarantee the correct detection, it is advisable to set the languages, if you have domain knowledge of what language to expect. The default value is NO. Also note that this feature is only available since VNRecognizeTextRequestRevision3 and is a no-op before that. API-Since: 16.0
      • setAutomaticallyDetectsLanguage

        public void setAutomaticallyDetectsLanguage​(boolean value)
        Language detection will try to automatically identify the script/langauge during the detection and use the appropiate model for recognition and language correction. This can be particularly helpful, if the nature of the content is unkown and with this flag being set it will for instance determine if text is latin vs chinese so you don't have to pick the language model in the first case. But as the language correction cannot always guarantee the correct detection, it is advisable to set the languages, if you have domain knowledge of what language to expect. The default value is NO. Also note that this feature is only available since VNRecognizeTextRequestRevision3 and is a no-op before that. API-Since: 16.0
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.