مرجع چارچوب مشترک MLKitTextRecognition
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
TextElement
class TextElement : NSObject
یک عنصر متنی که در یک تصویر شناسایی می شود. یک عنصر متنی یک بخش جدا شده با فاصله در یک خط متن است (به عنوان مثال، یک کلمه در اکثر زبان های خط لاتین).
نمایش رشته ای عنصر متنی که شناسایی شد.
اعلامیه
سویفت
var text: String { get }
مستطیلی که حاوی عنصر متن نسبت به تصویر در فضای مختصات پیش فرض است.
اعلامیه
سویفت
var frame: CGRect { get }
آرایه ای از زبان های شناخته شده در عنصر متن. اگر هیچ زبانی شناسایی نشد، آرایه خالی است.
اعلامیه
سویفت
var recognizedLanguages: [MLKTextRecognizedLanguage] { get }
چهار نقطه گوشه عنصر متن به ترتیب در جهت عقربههای ساعت از نقطه بالا سمت چپ نسبت به تصویر در فضای مختصات پیشفرض شروع میشود. اشیاء NSValue
CGPoint
s هستند.
اعلامیه
سویفت
var cornerPoints: [NSValue] { get }
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2024-11-11 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2024-11-11 بهوقت ساعت هماهنگ جهانی."],[[["`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"]]