Recognizer
public class Recognizer
图像文本识别器
-
识别结果
See moreDeclaration
Swift
public struct Result : Sendable
-
识别图片文字,可设置语言(zh-CN,en-US)等,完成时主线程回调结果
Declaration
Swift
public static func recognizeText(in image: CGImage, configuration: (@Sendable (VNRecognizeTextRequest) -> Void)?, completion: @escaping @MainActor @Sendable ([Result]) -> Void)
-
识别指定文字的主要语言,可指定限制范围
Declaration
Swift
public static func recognizeLanguage(with string: String, constraints: [NLLanguage]? = nil) -> NLLanguage?