การอ้างอิงเฟรมเวิร์ก MLKitTextRecognitionCommon
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
TextBlock
class TextBlock : NSObject
บล็อกข้อความที่รู้จักในรูปภาพที่ประกอบด้วยอาร์เรย์ของบรรทัดข้อความ
-
การแสดงสตริงของบล็อกข้อความที่รู้จัก
คำประกาศ
Swift
var text: String { get }
-
อาร์เรย์ของบรรทัดข้อความที่ประกอบเป็นบล็อก
คำประกาศ
Swift
var lines: [MLKTextLine] { 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"],[[["`MLKTextBlock` represents a recognized text block in an image, containing an array of text lines."],["It provides access to the recognized text, individual text lines, and the block's bounding box within the image."],["Information about recognized languages and corner points of the text block are also available."],["It's worth noting that the `MLKTextBlock` instance itself is not directly instantiable, likely created internally during text recognition."]]],["A `TextBlock` object represents recognized text in an image. It provides the `text` (string representation), `lines` (array of `TextLine` objects), and `frame` (rectangle coordinates). It also details the `recognizedLanguages` and `cornerPoints` (four corners as `CGPoint`s). The `TextBlock` object cannot be initialized directly and is derived from image processing. The object contains the full recognized text of the block.\n"]]