MLKitTextRecognitionCommon Framework রেফারেন্স
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
TextRecognizer
class TextRecognizer : NSObject
একটি পাঠ্য শনাক্তকারী যা একটি চিত্রের পাঠ্যকে শনাক্ত করে।
প্রদত্ত বিকল্পগুলির সাথে একটি পাঠ্য শনাক্তকারী প্রদান করে।
বিভিন্ন ভাষার বিকল্পের সাথে একাধিক TextRecognizer
দৃষ্টান্তের একযোগে ব্যবহার বাঞ্ছনীয় নয়, কারণ এটি কার্যক্ষমতার অবনতি ঘটাতে পারে।
ঘোষণা
সুইফট
class func textRecognizer(options: MLKCommonTextRecognizerOptions) -> Self
পরামিতি
options | পাঠ্য শনাক্তকারী কনফিগার করার জন্য বিকল্প। |
রিটার্ন ভ্যালু
প্রদত্ত বিকল্পগুলির সাথে কনফিগার করা একটি পাঠ্য শনাক্তকারী৷
পাঠ্য শনাক্তকরণের জন্য প্রদত্ত চিত্রটি প্রক্রিয়া করে।
পরামিতি
image | প্রক্রিয়া করার জন্য ছবি. |
completion | পাঠ্য শনাক্তকরণ সম্পূর্ণ হলে প্রধান সারিতে ফিরে কল করার জন্য হ্যান্ডলার। |
প্রদত্ত চিত্রে পাঠ্য শনাক্তকরণ ফলাফল প্রদান করে বা কোনো ত্রুটি থাকলে nil
। পাঠ্য শনাক্তকরণ কলিং থ্রেডে সিঙ্ক্রোনাসভাবে সঞ্চালিত হয়।
UI ব্লক করা এড়াতে মূল থ্রেড থেকে এই পদ্ধতিটিকে কল করার পরামর্শ দেওয়া হচ্ছে। ফলস্বরূপ, একটি NSException
উত্থাপিত হয় যদি এই পদ্ধতিটিকে মূল থ্রেডে কল করা হয়।
পরামিতি
image | |
error | একটি ঐচ্ছিক ত্রুটি পরামিতি পপুলেট যখন ফলাফল পেতে একটি ত্রুটি আছে. |
রিটার্ন ভ্যালু
টেক্সট শনাক্তকরণের ফলে প্রদত্ত ইমেজ বা nil
যদি কোনো ত্রুটি থাকে।
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-25 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-07-25 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003e\u003ccode\u003eTextRecognizer\u003c/code\u003e identifies and extracts text within images.\u003c/p\u003e\n"],["\u003cp\u003eIt offers both synchronous and asynchronous processing options.\u003c/p\u003e\n"],["\u003cp\u003eConcurrent use with varying language settings may impact performance.\u003c/p\u003e\n"],["\u003cp\u003eDirect use on the main thread is discouraged due to potential UI blocking.\u003c/p\u003e\n"]]],["The `TextRecognizer` class recognizes text in images. It can be initialized with specific options via `textRecognizer(options:)`. The `process(_:)` method performs text recognition on an image asynchronously, while `results(in:)` performs it synchronously, returning the recognized text or `nil` if an error occurs. Concurrent usage of multiple `TextRecognizer` instances with different language options may reduce performance. `results(in:)` should not be called on the main thread.\n"],null,["# MLKitTextRecognitionCommon Framework Reference\n\nTextRecognizer\n==============\n\n class TextRecognizer : NSObject\n\nA text recognizer that recognizes text in an image.\n- `\n ``\n ``\n `\n\n ### [textRecognizer(options:)](#/c:objc(cs)MLKTextRecognizer(cm)textRecognizerWithOptions:)\n\n `\n ` \n Returns a text recognizer with the given options.\n\n Concurrent usage of multiple `TextRecognizer` instances with different language\n options is not recommended, since it may lead to performance degradation. \n\n #### Declaration\n\n Swift \n\n class func textRecognizer(options: MLKCommonTextRecognizerOptions) -\u003e Self\n\n #### Parameters\n\n |-----------------|----------------------------------------------|\n | ` `*options*` ` | Options for configuring the text recognizer. |\n\n #### Return Value\n\n An text recognizer configured with the given options.\n- `\n ``\n ``\n `\n\n ### [process(_:)](#/c:objc(cs)MLKTextRecognizer(im)processImage:completion:)\n\n `\n ` \n Processes the given image for text recognition. \n\n #### Declaration\n\n Swift \n\n func process(_ image: ../Protocols.html#/c:objc(pl)MLKCompatibleImage) async throws -\u003e MLKText\n\n #### Parameters\n\n |--------------------|-------------------------------------------------------------------------|\n | ` `*image*` ` | The image to process. |\n | ` `*completion*` ` | Handler to call back on the main queue when text recognition completes. |\n\n- `\n ``\n ``\n `\n\n ### [results(in:)](#/c:objc(cs)MLKTextRecognizer(im)resultsInImage:error:)\n\n `\n ` \n Returns text recognition result in the given image or `nil` if there was an error. The text\n recognition is performed synchronously on the calling thread.\n\n It is advised to call this method off the main thread to avoid blocking the UI. As a\n result, an `NSException` is raised if this method is called on the main thread. \n\n #### Declaration\n\n Swift \n\n func results(in image: ../Protocols.html#/c:objc(pl)MLKCompatibleImage) throws -\u003e MLKText\n\n #### Parameters\n\n |---------------|-------------------------------------------------------------------------------|\n | ` `*image*` ` | The image to get results in. |\n | ` `*error*` ` | An optional error parameter populated when there is an error getting results. |\n\n #### Return Value\n\n Text recognition result in the given image or `nil` if there was an error."]]