IRONOCRの使い方 コンピュータビジョンを使用したOCR(例のチュートリアル) Kannapat Udonpant 更新日:6月 22, 2025 Download IronOCR NuGet Download テキストの検索と置換 テキストと画像のスタンプ Start Free Trial Copy for LLMs Copy for LLMs Copy page as Markdown for LLMs Open in ChatGPT Ask ChatGPT about this page Open in Gemini Ask Gemini about this page Open in Grok Ask Grok about this page Open in Perplexity Ask Perplexity about this page Share Share on Facebook Share on X (Twitter) Share on LinkedIn Copy URL Email article Optical Character Recognition (OCR) with IronOCR Optical Character Recognition (OCR) is a technology that enables machines to read and interpret text from images, making data processing and automation faster and more efficient. This article provides guidelines on using OCR with the IronOCR library and how it can enhance text recognition, automating this process. Why OCR is Important? OCR along with computer vision is an advanced form of Optical Character Recognition (OCR) that leverages the power of artificial intelligence and machine learning algorithms to recognize text characters from images more accurately and efficiently. Computer vision image processing algorithms allow OCR systems to understand the context and layout of text in an image and recognize characters based on their shape and structure. OCR along with computer vision can extract text from complex images with multiple fonts, styles, and sizes, making it a valuable tool in document digitization, data extraction, and automation. IronOCR: C# OCR Library IronOCR is a popular OCR library that uses computer vision techniques for text extraction from images and documents. It is easy to use and integrates with multiple programming languages, including C# and VB.NET. IronOCR is available in both on-premise and cloud versions and offers a range of functionalities to process and extract text from images. Installing IronOCR To install IronOCR, use the following command in the NuGet Package Manager Console: Install-Package IronOcr OCR System with IronOCR The following image is used to test the OCR System with Computer Vision using IronOCR. Image sample used for OCR detection FindTextRegion Method The FindTextRegion method is used to identify a single text region within an image. The method takes several optional parameters, including Scale, DilationAmount, Binarize, and Invert: Scale adjusts the size of the image for better text recognition. DilationAmount increases the thickness of the text to enhance visibility. Binarize converts the image into black and white, improving contrast. Invert inverts the colors of the image, which can be useful for certain types of images. using IronOcr; using System; // Initialize the IronTesseract OCR engine var ocr = new IronTesseract(); // Create an OcrInput object for the image using (var inputOCR = new OcrInput("test.jpg")) { // Identify a text region within the image inputOCR.FindTextRegion(); // Perform OCR on the identified text region OcrResult result = ocr.Read(inputOCR); // Extract and print the recognized text string resultText = result.Text; Console.WriteLine(resultText); } using IronOcr; using System; // Initialize the IronTesseract OCR engine var ocr = new IronTesseract(); // Create an OcrInput object for the image using (var inputOCR = new OcrInput("test.jpg")) { // Identify a text region within the image inputOCR.FindTextRegion(); // Perform OCR on the identified text region OcrResult result = ocr.Read(inputOCR); // Extract and print the recognized text string resultText = result.Text; Console.WriteLine(resultText); } Imports IronOcr Imports System ' Initialize the IronTesseract OCR engine Private ocr = New IronTesseract() ' Create an OcrInput object for the image Using inputOCR = New OcrInput("test.jpg") ' Identify a text region within the image inputOCR.FindTextRegion() ' Perform OCR on the identified text region Dim result As OcrResult = ocr.Read(inputOCR) ' Extract and print the recognized text Dim resultText As String = result.Text Console.WriteLine(resultText) End Using $vbLabelText $csharpLabel Note: After running the code, you'll see that it extracts text from the text region using a machine-learning process. The output result appears in the console with high text recognition accuracy. The Console results from the text extraction process FindMultipleTextRegions Method The FindMultipleTextRegions method is similar to FindTextRegion, but it is used when there are multiple text regions in an image. It returns a list of CropRectangle objects that define the location of each text region. This method is useful when you want to extract text from an image that contains multiple sections of text. using IronOcr; // Initialize the IronTesseract OCR engine var ocr = new IronTesseract(); // Create an OcrInput object for the image using (var input = new OcrInput("test.jpg")) { // Identify multiple text regions within the image input.FindMultipleTextRegions(Scale: 2.0, DilationAmount: -1, Binarize: true, Invert: false); // Perform OCR on the pre-processed image OcrResult result = ocr.Read(input); // Extract and print the recognized text string resultText = result.Text; Console.WriteLine(resultText); } using IronOcr; // Initialize the IronTesseract OCR engine var ocr = new IronTesseract(); // Create an OcrInput object for the image using (var input = new OcrInput("test.jpg")) { // Identify multiple text regions within the image input.FindMultipleTextRegions(Scale: 2.0, DilationAmount: -1, Binarize: true, Invert: false); // Perform OCR on the pre-processed image OcrResult result = ocr.Read(input); // Extract and print the recognized text string resultText = result.Text; Console.WriteLine(resultText); } Imports IronOcr ' Initialize the IronTesseract OCR engine Private ocr = New IronTesseract() ' Create an OcrInput object for the image Using input = New OcrInput("test.jpg") ' Identify multiple text regions within the image input.FindMultipleTextRegions(Scale:= 2.0, DilationAmount:= -1, Binarize:= True, Invert:= False) ' Perform OCR on the pre-processed image Dim result As OcrResult = ocr.Read(input) ' Extract and print the recognized text Dim resultText As String = result.Text Console.WriteLine(resultText) End Using $vbLabelText $csharpLabel Explanation: The code snippet provided above is an example of how to use the IronOCR library to perform OCR on an image file. It first imports the IronOCR library and creates a new instance of the IronTesseract class. Then, it initializes an OcrInput object with the path of the input image file and applies some pre-processing techniques for image correction using the FindMultipleTextRegions method. The Output of IronOCR The output of IronOCR is very accurate, even when dealing with complex images with multiple fonts, sizes, and styles of text. OCR accuracy is crucial when extracting data from images because the extracted text is often used for further processing, such as data analysis, manual data entry, machine learning, or natural language processing. If the extracted text contains errors, it can cause problems downstream. Additionally, IronOCR allows investigation into result objects to check confidence levels. Use Cases of OCR Computer Vision Optical Character Recognition (OCR) technology has revolutionized the way printed text is handled. OCR tools have become an indispensable part of document processing and data extraction. Here are some use cases of Optical Character Recognition software: OCR License Plate Recognition License plate recognition plays a significant role in automating traffic management, parking systems, and law enforcement activities. By implementing OCR computer vision in C#, developers can create applications that quickly and accurately identify license plates from images or live video feeds. This technology can be used to: Monitor traffic violations and identify vehicles involved in criminal activities. Automate the parking systems, facilitating entry and exit management and streamlining the billing process. Enhance security measures by tracking and monitoring vehicle movement in restricted areas. Extracting Text from Invoices OCR computer vision in C# can be utilized to develop OCR applications that automate the extraction of text from invoices and other financial documents. This process can drastically reduce manual data entry errors and streamline accounting tasks. Key benefits include: Increased productivity by automating the data entry process. Improved accuracy, as OCR reduces the likelihood of human errors. Seamless integration with accounting software and systems for efficient data management. OCR Subtitles Generation Creating subtitles for videos can be time-consuming and labor-intensive. OCR computer vision in C# can simplify this process by automatically detecting and transcribing the on-screen text, enabling developers to: Create accurate subtitles for movies, TV shows, and online videos. Enhance accessibility for individuals with hearing impairments or those who speak different languages. Boost SEO efforts by providing searchable, indexable content for the video platform OCR PDF Processing PDFs are widely used for sharing and storing documents, but extracting text from them can be challenging. OCR computer vision in C# can help developers build OCR applications that effortlessly process PDF files and extract their content, facilitating: Easy conversion of PDFs into editable file formats like Word, Excel, or plain text. Efficient data extraction for analysis, indexing, or further processing. Improved accessibility by converting scanned PDFs into searchable, readable text. Digitizing Printed Text OCR software is widely used to digitize printed text from document images. OCR tools can extract text from scanned digital documents, PDFs, and images in various formats. This is particularly useful in document management, where you can easily search, store, and share text-based documents. Data Extraction OCR technology is widely used to extract data from input data such as invoices, receipts, and forms. OCR models can recognize and extract key data fields such as names, addresses, dates, and amounts. This eliminates the need for manual data entry and reduces errors in the data processing. Image Search OCR technology is also used for image search, where you can search for images based on the text contained within them. This is particularly useful for large image libraries, where manual searching would be time-consuming. Translation OCR software can be used to extract text from documents in one language and translate it into another language. This is particularly useful for international businesses, where documents need to be translated quickly and accurately. Summary Optical character recognition (OCR) is a technology that enables computers to read text from images. OCR along with computer vision is important because it allows machines to understand and interpret the visual world, which is essential for applications such as self-driving cars, robotics, and automated document processing. IronOCR is a powerful OCR engine that can be used to apply OCR with computer vision to accurately recognize text and perform text extraction from images. It provides a range of methods for finding and extracting text regions, including FindTextRegion, FindMultipleTextRegions, and GetTextRegions. Each method has its own set of parameters that can be used to fine-tune the OCR process and provide high OCR accuracy. By using IronOCR, you can extract the scanned text from input images quickly and accurately using concurrency and customized configuration, which can save you time and effort when dealing with large volumes of input image data. Whether you are working with scanned documents, photographs, or screenshots, IronOCR can help you unlock the text contained within. IronOCR offers a free trial to users who want to test the software before making a purchase decision. The license for IronOCR starts from $799 and includes support and updates for one year. With its robust features and reasonable pricing, IronOCR is a great option for anyone looking for a reliable OCR solution with high OCR accuracy. よくある質問 C#を使用して画像をテキストに変換するにはどうすればいいですか? IronOCRのOCR機能を使用してC#で画像をテキストに変換することができます。ReadやReadAsyncメソッドなどを利用することで、効率的に画像を処理してテキストを抽出できます。 コンピュータービジョンと一緒にOCRを使用する利点は何ですか? コンピュータービジョンと一緒にOCRを使用することで、複雑な画像レイアウト、フォント、およびスタイルからのより正確なテキスト認識が可能になります。IronOCRはAIと機械学習を活用してテキスト抽出を強化し、データ処理を自動化します。 C#でOCRの精度を向上させるにはどうすればいいですか? IronOCRは、設定の調整、並行性の使用、信頼度レベルのための結果オブジェクトの検査など、OCRの精度を向上させるためのさまざまな方法を提供します。これにより、より良い結果のためにOCRプロセスを微調整できます。 画像の複数の領域からテキストを抽出するプロセスは何ですか? IronOCRを使用して画像の複数の領域からテキストを抽出するには、FindMultipleTextRegionsメソッドを使用できます。このメソッドは、各テキスト領域の位置を示すCropRectangleオブジェクトのリストを返します。 OCR技術はナンバープレート認識に使用できますか? はい、IronOCRが提供するようなOCR技術はナンバープレート認識に応用できます。ナンバープレートの画像を処理することで、IronOCRはさまざまなアプリケーションのためのテキストを抽出できます。 C#プロジェクトにIronOCRをインストールするにはどうすればいいですか? NuGetパッケージマネージャーコンソールを使用してC#プロジェクトにIronOCRをインストールできます。Install-Package IronOcrコマンドを実行してプロジェクトにライブラリを追加します。 C#のOCRライブラリを試すためのトライアルバージョンはありますか? はい、IronOCRは試用ライブラリの機能を試すことができる無料トライアルバージョンを提供しています。 C#用のOCRライブラリのライセンスオプションにはどのようなものがありますか? IronOCRは、1年間のサポートと更新を含む$liteLicenseから始まるさまざまなライセンスオプションを提供しており、さまざまなプロジェクトのニーズと予算に対応しています。 Kannapat Udonpant 今すぐエンジニアリングチームとチャット ソフトウェアエンジニア ソフトウェアエンジニアになる前に、Kannapatは北海道大学で環境資源の博士号を修了しました。博士号を追求する間に、彼はバイオプロダクションエンジニアリング学科の一部である車両ロボティクスラボラトリーのメンバーになりました。2022年には、C#のスキルを活用してIron Softwareのエンジニアリングチームに参加し、IronPDFに注力しています。Kannapatは、IronPDFの多くのコードを執筆している開発者から直接学んでいるため、この仕事を大切にしています。同僚から学びながら、Iron Softwareでの働く社会的側面も楽しんでいます。コードやドキュメントを書いていない時は、KannapatはPS5でゲームをしたり、『The Last of Us』を再視聴したりしていることが多いです。 関連する記事 公開日 9月 29, 2025 IronOCRを使用して.NET OCR SDKを作成する方法 IronOCRの.NET SDKで強力なOCRソリューションを構築。シンプルなAPI、エンタープライズ機能、クロスプラットフォーム対応。 詳しく読む 公開日 9月 29, 2025 IronOCRを使用してC# GitHubプロジェクトにOCRを統合する方法 OCR C# GitHubチュートリアル:IronOCRを使用してGitHubプロジェクトにテキスト認識を実装。コードサンプルとバージョン管理のヒントを含む。 詳しく読む 更新日 9月 4, 2025 私たちが文書処理メモリを98%削減した方法:IronOCRのエンジニアリングブレークスルー IronOCR 2025.9は、TIFF処理メモリを98%削減するストリーミングアーキテクチャを採用し、クラッシュを回避し、企業のワークフローのために速度を向上。 詳しく読む OCRレシートデータ抽出(ステップバイステップチュートリアル)C#で免許証をOCRする方法
公開日 9月 29, 2025 IronOCRを使用して.NET OCR SDKを作成する方法 IronOCRの.NET SDKで強力なOCRソリューションを構築。シンプルなAPI、エンタープライズ機能、クロスプラットフォーム対応。 詳しく読む
公開日 9月 29, 2025 IronOCRを使用してC# GitHubプロジェクトにOCRを統合する方法 OCR C# GitHubチュートリアル:IronOCRを使用してGitHubプロジェクトにテキスト認識を実装。コードサンプルとバージョン管理のヒントを含む。 詳しく読む
更新日 9月 4, 2025 私たちが文書処理メモリを98%削減した方法:IronOCRのエンジニアリングブレークスルー IronOCR 2025.9は、TIFF処理メモリを98%削減するストリーミングアーキテクチャを採用し、クラッシュを回避し、企業のワークフローのために速度を向上。 詳しく読む