MLKitTextRecognitionCommon 프레임워크 참조
TextElement
class TextElement : NSObject
이미지에서 인식된 텍스트 요소입니다. 텍스트 요소는 텍스트에서 공백으로 구분된 세그먼트입니다.
행 (예: 대부분의 라틴 자모 언어로 된 단어)
-
선언
Swift
var text: String { get }
-
기본 좌표의 이미지를 기준으로 한 텍스트 요소가 포함된 직사각형
있습니다.
선언
Swift
var frame: CGRect { get }
-
텍스트 요소에서 인식된 언어의 배열입니다. 언어가 인식되지 않은 경우 배열은
비어 있습니다.
선언
Swift
var recognizedLanguages: [MLKTextRecognizedLanguage] { get }
-
왼쪽 상단 지점부터 시계 방향으로 텍스트 요소의 네 모서리 지점
상대적 위치를 나타냅니다. NSValue
객체는 CGPoint
입니다.
선언
Swift
var cornerPoints: [NSValue] { get }
-
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2024-08-22(UTC)
[null,null,["최종 업데이트: 2024-08-22(UTC)"],[[["`MLKTextElement` represents a word or space-separated text segment recognized within an image."],["It provides access to the text content, its bounding rectangle (`frame`), and recognized languages."],["Corner points of the element's location in the image are also available, along with a string representation of the recognized text."],["Direct initialization of `MLKTextElement` is not allowed; it's obtained through text recognition results."]]],["A `TextElement` represents a recognized word in an image. It provides the `text` as a string, its `frame` (bounding rectangle), and an array of `recognizedLanguages`. It also offers `cornerPoints`, detailing the four corners of the element's position. The text's properties are provided as get-only. It is not initializable with `init`, so you will have to retrieve them from an existing recognized text object.\n"]]