Dokumentacja platformy MLKitTextRecognitionCommon
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
TextElement
class TextElement : NSObject
Element tekstowy rozpoznany na obrazie. Element tekstowy to rozdzielany spacjami segment w tekście
wiersz (np. słowo w większości języków z alfabetem łacińskim).
-
Reprezentacja rozpoznanego elementu tekstowego w formie ciągu znaków.
Deklaracja
Swift
var text: String { get }
-
Prostokąt zawierający element tekstowy względem obrazu we współrzędnej domyślnej
kosmosu.
Deklaracja
Swift
var frame: CGRect { get }
-
Tablica rozpoznanych języków w elemencie tekstowym. Jeśli nie rozpoznano żadnego języka, tablica
jest puste.
Deklaracja
Swift
var recognizedLanguages: [MLKTextRecognizedLanguage] { get }
-
Cztery punkty narożne elementu tekstowego w kolejności według ruchu wskazówek zegara, zaczynając od lewego górnego punktu
względem obrazu w domyślnej przestrzeni współrzędnych. Obiekty NSValue
to CGPoint
.
Deklaracja
Swift
var cornerPoints: [NSValue] { get }
-
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2024-08-22 UTC.
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 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"]]