การอ้างอิงเฟรมเวิร์ก MLKitTextRecognitionCommon
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
TextElement
class TextElement : NSObject
องค์ประกอบของข้อความที่รู้จักในรูปภาพ องค์ประกอบของข้อความคือส่วนที่คั่นด้วยช่องว่างในข้อความ
(เช่น คำในภาษาส่วนใหญ่ที่มีสคริปต์ละติน)
-
การแสดงสตริงขององค์ประกอบข้อความที่รับรู้
คำประกาศ
Swift
var text: String { get }
-
สี่เหลี่ยมผืนผ้าที่มีองค์ประกอบของข้อความที่สัมพันธ์กับรูปภาพในพิกัดเริ่มต้น
พื้นที่ทำงาน
คำประกาศ
Swift
var frame: CGRect { get }
-
อาร์เรย์ของภาษาที่รู้จักในองค์ประกอบของข้อความ หากไม่มีภาษาที่รู้จัก อาร์เรย์
ว่างเปล่า
คำประกาศ
Swift
var recognizedLanguages: [MLKTextRecognizedLanguage] { get }
-
จุดมุม 4 จุดขององค์ประกอบข้อความตามลำดับตามเข็มนาฬิกาโดยเริ่มจากจุดซ้ายบน
เมื่อเทียบกับภาพในพื้นที่พิกัดเริ่มต้น ออบเจ็กต์ NSValue
มีขนาด CGPoint
คำประกาศ
Swift
var cornerPoints: [NSValue] { get }
-
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-08-22 UTC
[[["เข้าใจง่าย","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-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"]]