# 컴퓨터 비전을 이용하여 C#에서 텍스트 찾기
IronOCR은 OpenCV 컴퓨터 비전을 사용하여 이미지에서 OCR 처리를 하기 전에 자동으로 텍스트 영역을 감지합니다. 이런 방식은 Tessseract 인식을 식별된 텍스트 영역에만 집중하도록 함으로써 시끄럽고, 복수 영역이나 왜곡된 텍스트의 정확도를 향상시키며 전체 이미지를 처리하는 것보다 추출 결과를 크게 개선합니다.
*as-heading:2(시작하기: 주요 텍스트 영역 탐지 및 OCR)*
이 예제는 즉시 텍스트 추출을 보여줍니다: 이미지를 로드하고 `FindTextRegion()`로 IronOCR의 컴퓨터 비전을 사용하여 기본 텍스트 영역을 자동 감지한 다음 한 줄로 텍스트를 추출합니다.
```cs
:title=Start OCR with Computer Vision in One Line
using var result = new IronTesseract().Read(new OcrInput().LoadImage("image.png").FindTextRegion());
```
- [C#에서 자동차 번호판 OCR 방법 (튜토리얼)](/csharp/ocr/blog/using-ironocr/license-plate-ocr-csharp-tutorial/)
- [C# 튜토리얼에서 송장에서 텍스트 가져오는 방법](/csharp/ocr/blog/using-ironocr/invoice-ocr-csharp-tutorial/)
- [C#에서 스크린샷으로부터 OCR 텍스트 가져오는 방법](/csharp/ocr/blog/using-ironocr/get-text-ocr-screenshot-csharp-tutorial/)
- [C#에서 자막 OCR 방법 (튜토리얼)](/csharp/ocr/blog/using-ironocr/subtitle-ocr-csharp-tutorial/)
<div class="hsg-featured-snippet">
<h3>최소 워크플로우(5단계)</h3>
<ol>
<li><a class="js-modal-open" data-modal-id="trial-license-after-download" href="https://nuget.org/packages/IronOcr/">컴퓨터 비전과 함께 OCR을 사용하기 위한 C# 라이브러리 다운로드</a></li>
<li><code>FindTextRegion</code> 메서드를 사용하여 텍스트 영역을 자동 감지합니다</li>
<li><code>StampCropRectangleAndSaveAs</code> 메서드를 사용하여 감지된 텍스트 영역을 확인합니다</li>
<li><code>FindMultipleTextRegions</code> 메서드를 사용하여 텍스트 영역에 따라 원본 이미지를 여러 이미지로 나눕니다</li>
<li><code>GetTextRegions</code> 메서드를 사용하여 텍스트가 감지된 자르기 영역 목록을 얻습니다</li>
</ol>
</div>
## IronOcr.ComputerVision을 NuGet 패키지를 통해 설치하는 방법은?
IronOCR에서 컴퓨터 비전을 수행하는 OpenCV 메서드는 일반 IronOCR NuGet 패키지에서 확인할 수 있습니다. 자세한 설치 지침은 [NuGet 설치 가이드](https://ironsoftware.com/csharp/ocr/get-started/advanced-installation-nuget/)를 참조하세요.
### IronOCR이 별도의 컴퓨터 비전 패키지를 필요로 하는 이유는?
이러한 방법을 사용하려면 솔루션에 `IronOcr.ComputerVision`의 NuGet 설치가 필요합니다. 설치되어 있지 않으면 다운로드 요청이 표시됩니다. 컴퓨터 비전 기능은 OpenCV 알고리즘을 활용하여 텍스트 감지 정확도를 크게 향상시킵니다. 이는 [번호판 인식](https://ironsoftware.com/csharp/ocr/how-to/read-license-plate/) 및 [여권 스캔](https://ironsoftware.com/csharp/ocr/how-to/read-passport/) 기능에 사용된 기술과 유사합니다.
### 어떤 플랫폼 특정 패키지를 설치해야 하나요?
- Windows: `IronOcr.ComputerVision.Windows` - [Windows 설정 가이드](https://ironsoftware.com/csharp/ocr/get-started/windows/)를 참조하세요
- Linux: `IronOcr.ComputerVision.Linux` - [Linux 설치 튜토리얼](https://ironsoftware.com/csharp/ocr/get-started/linux/)을 확인하세요
- macOS: `IronOcr.ComputerVision.MacOS` - [macOS 설정 지침](https://ironsoftware.com/csharp/ocr/get-started/mac/)을 검토하세요
- macOS ARM: `IronOcr.ComputerVision.MacOS.ARM`
### 패키지 관리자 콘솔을 사용해 설치하는 방법은?
NuGet 패키지 관리자를 사용하여 설치하거나 패키지 관리자 콘솔에 다음을 붙여 넣으세요:
```shell
:InstallCmd Install-Package IronOcr.ComputerVision.Windows
```
이 구성 요소는 IronOCR 컴퓨터 비전을 모델 파일과 함께 사용하는 데 필요한 어셈블리를 제공합니다.
## IronOCR에서 사용할 수 있는 컴퓨터 비전 메서드는?
이 튜토리얼의 아래쪽에 코드 예제가 포함되어 있습니다. 다음은 현재 사용할 수 있는 메서드의 일반 개요입니다:
<table class="table table__configuration-variables">
<tr>
<th scope="col">메서드</th>
<th scope="col">설명</th>
</tr>
<tr>
<td><a href="#anchor-findtextregion"><code>FindTextRegion</code></a></td>
<td class="word-break--break-word">텍스트 요소를 포함한 영역을 감지하고 Tesseract에 감지된 텍스트 영역 내에서만 텍스트를 검색하도록 지시합니다.</td>
</tr>
<tr>
<td><a href="#anchor-findmultipletextregions"><code>FindMultipleTextRegions</code></a></td>
<td class="word-break--break-word">텍스트 요소를 포함한 영역을 탐지하고 페이지를 텍스트 영역에 따라 개별 이미지로 나눕니다.</td>
</tr>
<tr>
<td><a href="#anchor-gettextregions"><code>GetTextRegions</code></a></td>
<td class="word-break--break-word">Scans the image and returns a list of text regions as <code>List<CropRectangle></code>.</td>
</tr>
</table>
## FindTextRegion을 사용하여 텍스트 영역을 탐지하는 방법은?
`FindTextRegion`은 모든 `OcrInput` 객체 페이지에 있는 텍스트 요소가 포함된 영역을 감지하기 위해 컴퓨터 비전을 사용합니다. 이 메서드는 흩어진 텍스트가 있는 이미지를 처리하거나 텍스트가 포함된 영역에만 집중하여 성능을 향상시켜야 할 때 특히 유용합니다.
### 기본 FindTextRegion 사용법은 무엇인가요?
```csharp
:path=/static-assets/ocr/content-code-examples/how-to/computer-vision-findtextregion-1.cs
```
[[e:( 이 메서드 확장은 현재 `IronOcr 2025.6.x`에서 더 이상 사용되지 않으며 사용자 지정 매개변수를 받아들이지 않습니다.)]]
### FindTextRegion 매개변수를 사용자 지정할 수 있는 방법은?
텍스트 감지를 세분화하기 위해 사용자 정의 매개변수를 사용하여 이 메서드를 호출하세요. 이 매개변수는 [이미지 필터 구성](https://ironsoftware.com/csharp/ocr/how-to/image-quality-correction/)과 유사하게 작동합니다:
```csharp
:path=/static-assets/ocr/content-code-examples/how-to/computer-vision-findtextregion-2.cs
```
### FindTextRegion이 실제로 어떤 모습인가요?
이 예제에서, 나는 텍스트를 포함한 영역으로 자를 필요가 있는 메서드를 위해 다음 이미지를 사용하지만 입력 이미지의 텍스트 위치는 다를 수 있습니다. 저는 Computer Vision이 텍스트를 감지한 영역으로 스캔 범위를 좁히기 위해 `FindTextRegion`을 사용합니다. 이 방법은 [콘텐츠 영역과 자르기 영역 튜토리얼](https://ironsoftware.com/csharp/ocr/troubleshooting/crop-regions-rectangles/)에서 사용된 기술과 유사합니다. 예제 이미지 이다:
<div class="content-img-align-center">
<div class="center-image-wrapper">
<img src="/static-assets/ocr/how-to/computer-vision/iron-2022.webp" alt="Iron Software 2022 회사 통계는 개발자 성과 및 비즈니스 성과 데이터를 보여줍니다" class="img-responsive add-shadow" />
</div>
</div>
```csharp
:path=/static-assets/ocr/content-code-examples/how-to/computer-vision-findtextregion-3.cs
```
### 텍스트 영역 탐지를 디버그하고 확인하는 방법은?
이 코드는 두 가지 출력을 가집니다. 첫 번째는 디버깅에 사용되는 `StampCropRectangleAndSaveAs`에 의해 저장된 `.png` 파일입니다. 이 기술은 [디버깅을 위한 텍스트 강조 표시 가이드](https://ironsoftware.com/csharp/ocr/examples/highlight-texts-for-debugging/)에서도 다루어집니다. IronCV (컴퓨터 비전)가 텍스트를 감지한 위치를 볼 수 있습니다:
<div class="content-img-align-center">
<div class="center-image-wrapper">
<img src="/static-assets/ocr/how-to/computer-vision/text_area_0.PNG" alt="Iron Software 2022 통계는 빨간색 경계 상자로 FindTextRegion 텍스트 감지 기능을 보여줍니다" class="img-responsive add-shadow" />
</div>
</div>
탐지 기능은 텍스트 영역을 정확히 식별합니다. 두 번째 출력은 텍스트 자체입니다:
```text
IRONSOFTWARE
50,000+
Developers in our active community
10,777,061 19,313
NuGet downloads Support tickets resolved
50%+ 80%+
Engineering Team growth Support Team growth
$25,000+
Raised with #TEAMSEAS to clean our beaches & waterways
```
## 다중 텍스트 영역을 위한 FindMultipleTextRegions의 사용 방법은?
`FindMultipleTextRegions`은 모든 `OcrInput` 객체의 페이지를 가져와 컴퓨터 비전을 사용하여 텍스트 요소가 포함된 영역을 감지한 다음 이를 텍스트 구역을 기반으로 별개의 이미지로 나눕니다. 이는 [문서 내 테이블 기능 읽기](https://ironsoftware.com/csharp/ocr/examples/read-table-in-document/)와 유사한 여러 구분 텍스트 영역을 처리할 때 특히 유용합니다:
### 기본 FindMultipleTextRegions 사용법은 무엇인가요?
```csharp
:path=/static-assets/ocr/content-code-examples/how-to/computer-vision-findmultipletextregions-1.cs
```
[[e:( IronOCR v2025.6.x부터 `FindMultipleTextRegions` 메서드가 더 이상 사용자 지정 매개변수를 지원하지 않습니다.)]]
### FindMultipleTextRegions 매개변수를 사용자 지정할 수 있는 방법은?
영역이 감지되고 분리되는 방식을 제어하기 위해 사용자 정의 매개변수를 사용하여 이 메서드를 호출하세요:
```csharp
:path=/static-assets/ocr/content-code-examples/how-to/computer-vision-findmultipletextregions-2.cs
```
### FindMultipleTextRegions으로 개별 페이지를 처리하는 방법은?
또 다른 `FindMultipleTextRegions`의 과다로드 메서드는 OCR 페이지를 받아서 그 위의 각 텍스트 구역에 대해 하나의 OCR 페이지 목록을 반환합니다. 이는 [다중 페이지 TIFF 처리 가이드](https://ironsoftware.com/csharp/ocr/examples/csharp-tesseract-multipage-tiff/)에 설명된 기술과 유사하게 복잡한 레이아웃을 다룰 때 도움이 됩니다:
```csharp
:path=/static-assets/ocr/content-code-examples/how-to/computer-vision-findmultipletextregions-3.cs
```
## GetTextRegions을 사용하여 텍스트 영역 좌표를 얻는 방법은?
`GetTextRegions`은 페이지에서 텍스트가 감지된 잘린 영역의 목록을 반환합니다. 이 메서드는 추가 처리를 위해 텍스트 영역의 좌표가 필요하거나 사용자 정의 OCR 워크플로우를 구현할 때 특히 유용합니다. 결과 작업에 대한 자세한 내용은 [OcrResult 클래스 문서](https://ironsoftware.com/csharp/ocr/examples/results-objects/)를 참조하세요:
### FindTextRegion 대신 GetTextRegions을 사용할 때는?
```csharp
:path=/static-assets/ocr/content-code-examples/how-to/computer-vision-10.cs
```
### OCR에서 컴퓨터 비전의 일반적인 사용 사례는?
컴퓨터 비전은 까다로운 시나리오에서 OCR 정확도를 크게 향상시킵니다. 다음은 실제 응용 프로그램입니다:
1. **문서 레이아웃 분석**: 복합 문서의 다른 섹션을 자동으로 식별하고 처리합니다. 스캔된 문서와 함께 특히 유용합니다 <a href="https://ironsoftware.com/csharp/ocr/examples/read-scanned-document/">.</a>
2. **다중 열 텍스트**: 신문이나 잡지를 위해 열을 독립적으로 분리하고 읽습니다. [멀티 스레드 처리](https://ironsoftware.com/csharp/ocr/examples/csharp-tesseract-multithreading-for-speed/)를 사용하여 결과를 빠르게 얻습니다.
3. **혼합된 콘텐츠**: 문서에 있는 텍스트 영역과 그래픽을 구별합니다. 텍스트가 내장된 [사진 처리를 할 때](https://ironsoftware.com/csharp/ocr/examples/read-photo/) 도움이 됩니다.
4. **성능 최적화**: 텍스트가 포함된 영역에만 OCR 처리를 집중시킵니다. 빠른 OCR 구성 가이드를 [참조하세요](https://ironsoftware.com/csharp/ocr/examples/tune-tesseract-for-speed-in-dotnet/).
5. **품질 관리**: 전체 OCR 처리를 시작하기 전에 텍스트 탐지를 확인합니다. 각 단계를 모니터링하는 진행 추적 기능을 사용할 수 있습니다 [查看進度追踪功能](https://ironsoftware.com/csharp/ocr/examples/progress-tracking/).
올바른 설정과 입력 파일로, OCR은 사람 수준의 읽기 기능에 가까운 결과를 제공합니다. 최적의 결과를 위해 컴퓨터 비전과 [이미지 최적화 필터](https://ironsoftware.com/csharp/ocr/examples/ocr-image-filters-for-net-tesseract/)를 결합하여 가능한 최고의 OCR 정확도를 달성하세요. 저품질 이미지를 처리할 때, [저품질 스캔 수정 가이드](https://ironsoftware.com/csharp/ocr/examples/ocr-low-quality-scans-tesseract/)가 유용한 전처리 기술을 제공합니다.
### 고급 컴퓨터 비전 기법
OCR 정확도 경계를 밀기 위해 아래의 고급 접근법을 고려하세요:
- **사용자 정의 학습**: 전용 폰트를 위한 OCR 엔진 훈련을 우리 [사용자 정의 언어 파일 가이드](https://ironsoftware.com/csharp/ocr/examples/ocr-tesseract-custom-languages/)와 함께 제공합니다
- **다국어 지원**: 다국어 문서를 [여러 언어 기능](https://ironsoftware.com/csharp/ocr/examples/ocr-tesseract-multiple-languages/)으로 처리합니다
- **바코드 통합**: 바코드 읽기를 통한 텍스트 인식을 [OCR과 결합](https://ironsoftware.com/csharp/ocr/examples/csharp-ocr-barcodes/)하십시오
IronOCR은 OpenCV 컴퓨터 비전을 사용하여 이미지에서 OCR 처리를 하기 전에 자동으로 텍스트 영역을 감지합니다. 이런 방식은 Tessseract 인식을 식별된 텍스트 영역에만 집중하도록 함으로써 시끄럽고, 복수 영역이나 왜곡된 텍스트의 정확도를 향상시키며 전체 이미지를 처리하는 것보다 추출 결과를 크게 개선합니다.
시작하기: 주요 텍스트 영역 탐지 및 OCR
이 예제는 즉시 텍스트 추출을 보여줍니다: 이미지를 로드하고 FindTextRegion()로 IronOCR의 컴퓨터 비전을 사용하여 기본 텍스트 영역을 자동 감지한 다음 한 줄로 텍스트를 추출합니다.
1Install IronOCR with NuGet Package Manager
PM > Install-Package IronOcr
Install-Package IronOcr
2다음 코드 조각을 복사하여 실행하세요.
using var result = new IronTesseract().Read(new OcrInput().LoadImage("image.png").FindTextRegion());
using var result = new IronTesseract().Read(new OcrInput().LoadImage("image.png").FindTextRegion());
StampCropRectangleAndSaveAs 메서드를 사용하여 감지된 텍스트 영역을 확인합니다
FindMultipleTextRegions 메서드를 사용하여 텍스트 영역에 따라 원본 이미지를 여러 이미지로 나눕니다
GetTextRegions 메서드를 사용하여 텍스트가 감지된 자르기 영역 목록을 얻습니다
IronOcr.ComputerVision을 NuGet 패키지를 통해 설치하는 방법은?
IronOCR에서 컴퓨터 비전을 수행하는 OpenCV 메서드는 일반 IronOCR NuGet 패키지에서 확인할 수 있습니다. 자세한 설치 지침은 NuGet 설치 가이드를 참조하세요.
IronOCR이 별도의 컴퓨터 비전 패키지를 필요로 하는 이유는?
이러한 방법을 사용하려면 솔루션에 IronOcr.ComputerVision의 NuGet 설치가 필요합니다. 설치되어 있지 않으면 다운로드 요청이 표시됩니다. 컴퓨터 비전 기능은 OpenCV 알고리즘을 활용하여 텍스트 감지 정확도를 크게 향상시킵니다. 이는 번호판 인식 및 여권 스캔 기능에 사용된 기술과 유사합니다.
어떤 플랫폼 특정 패키지를 설치해야 하나요?
Windows: IronOcr.ComputerVision.Windows - Windows 설정 가이드를 참조하세요
Linux: IronOcr.ComputerVision.Linux - Linux 설치 튜토리얼을 확인하세요
macOS: IronOcr.ComputerVision.MacOS - macOS 설정 지침을 검토하세요
macOS ARM: IronOcr.ComputerVision.MacOS.ARM
패키지 관리자 콘솔을 사용해 설치하는 방법은?
NuGet 패키지 관리자를 사용하여 설치하거나 패키지 관리자 콘솔에 다음을 붙여 넣으세요:
Scans the image and returns a list of text regions as List<CropRectangle>.
FindTextRegion을 사용하여 텍스트 영역을 탐지하는 방법은?
FindTextRegion은 모든 OcrInput 객체 페이지에 있는 텍스트 요소가 포함된 영역을 감지하기 위해 컴퓨터 비전을 사용합니다. 이 메서드는 흩어진 텍스트가 있는 이미지를 처리하거나 텍스트가 포함된 영역에만 집중하여 성능을 향상시켜야 할 때 특히 유용합니다.
기본 FindTextRegion 사용법은 무엇인가요?
using IronOcr;var ocr = new IronTesseract();using var input = new OcrInput();input.LoadImage("/path/file.png");input.FindTextRegion();OcrResult result = ocr.Read(input);string resultText = result.Text;
using IronOcr;
var ocr = new IronTesseract();
using var input = new OcrInput();
input.LoadImage("/path/file.png");
input.FindTextRegion();
OcrResult result = ocr.Read(input);
string resultText = result.Text;
ImportsIronOcrPrivate ocr = New IronTesseract()Private input = New OcrInput()input.LoadImage("/path/file.png")input.FindTextRegion()Dim result AsOcrResult = ocr.Read(input)Dim resultText AsString = result.Text
Imports IronOcr
Private ocr = New IronTesseract()
Private input = New OcrInput()
input.LoadImage("/path/file.png")
input.FindTextRegion()
Dim result As OcrResult = ocr.Read(input)
Dim resultText As String = result.Text
주의: 이 메서드 확장은 현재 IronOcr 2025.6.x에서 더 이상 사용되지 않으며 사용자 지정 매개변수를 받아들이지 않습니다.
FindTextRegion 매개변수를 사용자 지정할 수 있는 방법은?
텍스트 감지를 세분화하기 위해 사용자 정의 매개변수를 사용하여 이 메서드를 호출하세요. 이 매개변수는 이미지 필터 구성과 유사하게 작동합니다:
using IronOcr;var ocr = new IronTesseract();using var input = new OcrInput();input.LoadImage("/path/file.png");input.FindTextRegion();OcrResult result = ocr.Read(input);string resultText = result.Text;
using IronOcr;
var ocr = new IronTesseract();
using var input = new OcrInput();
input.LoadImage("/path/file.png");
input.FindTextRegion();
OcrResult result = ocr.Read(input);
string resultText = result.Text;
ImportsIronOcrPrivate ocr = New IronTesseract()Private input = New OcrInput()input.LoadImage("/path/file.png")input.FindTextRegion()Dim result AsOcrResult = ocr.Read(input)Dim resultText AsString = result.Text
Imports IronOcr
Private ocr = New IronTesseract()
Private input = New OcrInput()
input.LoadImage("/path/file.png")
input.FindTextRegion()
Dim result As OcrResult = ocr.Read(input)
Dim resultText As String = result.Text
FindTextRegion이 실제로 어떤 모습인가요?
이 예제에서, 나는 텍스트를 포함한 영역으로 자를 필요가 있는 메서드를 위해 다음 이미지를 사용하지만 입력 이미지의 텍스트 위치는 다를 수 있습니다. 저는 Computer Vision이 텍스트를 감지한 영역으로 스캔 범위를 좁히기 위해 FindTextRegion을 사용합니다. 이 방법은 콘텐츠 영역과 자르기 영역 튜토리얼에서 사용된 기술과 유사합니다. 예제 이미지 이다:
using IronOcr;using IronSoftware.Drawing;using System;using System.Linq;var ocr = new IronTesseract();using var input = new OcrInput();input.LoadImage("wh-words-sign.jpg");// Find the text region using Computer VisionRectangle textCropArea = input.GetPages().First().FindTextRegion();// For debugging and demonstration purposes, lets see what region it found:input.StampCropRectangleAndSaveAs(textCropArea, Color.Red, "image_text_area", AnyBitmap.ImageFormat.Png);// Looks good, so let us apply this region to hasten the read:var ocrResult = ocr.Read("wh-words-sign.jpg", textCropArea);Console.WriteLine(ocrResult.Text);
using IronOcr;
using IronSoftware.Drawing;
using System;
using System.Linq;
var ocr = new IronTesseract();
using var input = new OcrInput();
input.LoadImage("wh-words-sign.jpg");
// Find the text region using Computer Vision
Rectangle textCropArea = input.GetPages().First().FindTextRegion();
// For debugging and demonstration purposes, lets see what region it found:
input.StampCropRectangleAndSaveAs(textCropArea, Color.Red, "image_text_area", AnyBitmap.ImageFormat.Png);
// Looks good, so let us apply this region to hasten the read:
var ocrResult = ocr.Read("wh-words-sign.jpg", textCropArea);
Console.WriteLine(ocrResult.Text);
ImportsIronOcrImportsIronSoftware.DrawingImportsSystemImportsSystem.LinqPrivate ocr = New IronTesseract()Private input = New OcrInput()input.LoadImage("wh-words-sign.jpg")' Find the text region using Computer VisionDim textCropArea AsRectangle = input.GetPages().First().FindTextRegion()' For debugging and demonstration purposes, lets see what region it found:input.StampCropRectangleAndSaveAs(textCropArea, Color.Red, "image_text_area", AnyBitmap.ImageFormat.Png)' Looks good, so let us apply this region to hasten the read:Dim ocrResult = ocr.Read("wh-words-sign.jpg", textCropArea)Console.WriteLine(ocrResult.Text)
Imports IronOcr
Imports IronSoftware.Drawing
Imports System
Imports System.Linq
Private ocr = New IronTesseract()
Private input = New OcrInput()
input.LoadImage("wh-words-sign.jpg")
' Find the text region using Computer Vision
Dim textCropArea As Rectangle = input.GetPages().First().FindTextRegion()
' For debugging and demonstration purposes, lets see what region it found:
input.StampCropRectangleAndSaveAs(textCropArea, Color.Red, "image_text_area", AnyBitmap.ImageFormat.Png)
' Looks good, so let us apply this region to hasten the read:
Dim ocrResult = ocr.Read("wh-words-sign.jpg", textCropArea)
Console.WriteLine(ocrResult.Text)
텍스트 영역 탐지를 디버그하고 확인하는 방법은?
이 코드는 두 가지 출력을 가집니다. 첫 번째는 디버깅에 사용되는 StampCropRectangleAndSaveAs에 의해 저장된 .png 파일입니다. 이 기술은 디버깅을 위한 텍스트 강조 표시 가이드에서도 다루어집니다. IronCV (컴퓨터 비전)가 텍스트를 감지한 위치를 볼 수 있습니다:
탐지 기능은 텍스트 영역을 정확히 식별합니다. 두 번째 출력은 텍스트 자체입니다:
IRONSOFTWARE50,000+Developers in our active community10,777,061 19,313NuGet downloads Support tickets resolved50%+ 80%+Engineering Team growth Support Team growth$25,000+Raised with #TEAMSEAS to clean our beaches & waterways
IRONSOFTWARE
50,000+
Developers in our active community
10,777,061 19,313
NuGet downloads Support tickets resolved
50%+ 80%+
Engineering Team growth Support Team growth
$25,000+
Raised with #TEAMSEAS to clean our beaches & waterways
Text
다중 텍스트 영역을 위한 FindMultipleTextRegions의 사용 방법은?
FindMultipleTextRegions은 모든 OcrInput 객체의 페이지를 가져와 컴퓨터 비전을 사용하여 텍스트 요소가 포함된 영역을 감지한 다음 이를 텍스트 구역을 기반으로 별개의 이미지로 나눕니다. 이는 문서 내 테이블 기능 읽기와 유사한 여러 구분 텍스트 영역을 처리할 때 특히 유용합니다:
기본 FindMultipleTextRegions 사용법은 무엇인가요?
using IronOcr;var ocr = new IronTesseract();using var input = new OcrInput();input.LoadImage("/path/file.png");input.FindMultipleTextRegions();OcrResult result = ocr.Read(input);string resultText = result.Text;
using IronOcr;
var ocr = new IronTesseract();
using var input = new OcrInput();
input.LoadImage("/path/file.png");
input.FindMultipleTextRegions();
OcrResult result = ocr.Read(input);
string resultText = result.Text;
ImportsIronOcrPrivate ocr = New IronTesseract()Private input = New OcrInput()input.LoadImage("/path/file.png")input.FindMultipleTextRegions()Dim result AsOcrResult = ocr.Read(input)Dim resultText AsString = result.Text
Imports IronOcr
Private ocr = New IronTesseract()
Private input = New OcrInput()
input.LoadImage("/path/file.png")
input.FindMultipleTextRegions()
Dim result As OcrResult = ocr.Read(input)
Dim resultText As String = result.Text
주의: IronOCR v2025.6.x부터 FindMultipleTextRegions 메서드가 더 이상 사용자 지정 매개변수를 지원하지 않습니다.
FindMultipleTextRegions 매개변수를 사용자 지정할 수 있는 방법은?
영역이 감지되고 분리되는 방식을 제어하기 위해 사용자 정의 매개변수를 사용하여 이 메서드를 호출하세요:
using IronOcr;var ocr = new IronTesseract();using var input = new OcrInput();input.LoadImage("/path/file.png");input.FindMultipleTextRegions();OcrResult result = ocr.Read(input);string resultText = result.Text;
using IronOcr;
var ocr = new IronTesseract();
using var input = new OcrInput();
input.LoadImage("/path/file.png");
input.FindMultipleTextRegions();
OcrResult result = ocr.Read(input);
string resultText = result.Text;
ImportsIronOcrPrivate ocr = New IronTesseract()Private input = New OcrInput()input.LoadImage("/path/file.png")input.FindMultipleTextRegions()Dim result AsOcrResult = ocr.Read(input)Dim resultText AsString = result.Text
Imports IronOcr
Private ocr = New IronTesseract()
Private input = New OcrInput()
input.LoadImage("/path/file.png")
input.FindMultipleTextRegions()
Dim result As OcrResult = ocr.Read(input)
Dim resultText As String = result.Text
FindMultipleTextRegions으로 개별 페이지를 처리하는 방법은?
또 다른 FindMultipleTextRegions의 과다로드 메서드는 OCR 페이지를 받아서 그 위의 각 텍스트 구역에 대해 하나의 OCR 페이지 목록을 반환합니다. 이는 다중 페이지 TIFF 처리 가이드에 설명된 기술과 유사하게 복잡한 레이아웃을 다룰 때 도움이 됩니다:
using IronOcr;using System.Collections.Generic;using System.Linq;int pageIndex = 0;using var input = new OcrInput();input.LoadImage("/path/file.png");var selectedPage = input.GetPages().ElementAt(pageIndex);List<OcrInputPage> textRegionsOnPage = selectedPage.FindMultipleTextRegions();
using IronOcr;
using System.Collections.Generic;
using System.Linq;
int pageIndex = 0;
using var input = new OcrInput();
input.LoadImage("/path/file.png");
var selectedPage = input.GetPages().ElementAt(pageIndex);
List<OcrInputPage> textRegionsOnPage = selectedPage.FindMultipleTextRegions();
Imports IronOcr
Imports System.Collections.Generic
Imports System.Linq
Private pageIndex As Integer = 0
Private input = New OcrInput()
input.LoadImage("/path/file.png")
Dim selectedPage = input.GetPages().ElementAt(pageIndex)
Dim textRegionsOnPage As List(Of OcrInputPage) = selectedPage.FindMultipleTextRegions()
GetTextRegions을 사용하여 텍스트 영역 좌표를 얻는 방법은?
GetTextRegions은 페이지에서 텍스트가 감지된 잘린 영역의 목록을 반환합니다. 이 메서드는 추가 처리를 위해 텍스트 영역의 좌표가 필요하거나 사용자 정의 OCR 워크플로우를 구현할 때 특히 유용합니다. 결과 작업에 대한 자세한 내용은 OcrResult 클래스 문서를 참조하세요:
FindTextRegion 대신 GetTextRegions을 사용할 때는?
/* :path=/static-assets/ocr/content-code-examples/how-to/computer-vision-gettextregions.cs */using IronOcr;using IronSoftware.Drawing;using System;using System.Collections.Generic;using System.Linq;// Create a new IronTesseract object for OCRvar ocr = new IronTesseract();// Load an image into OcrInputusing var input = new OcrInput();input.LoadImage("/path/file.png");// Get the first page from the inputvar firstPage = input.GetPages().First();// Get all text regions detected on this pageList<Rectangle> textRegions = firstPage.GetTextRegions();// Display information about each detected regionConsole.WriteLine($"Found {textRegions.Count} text regions:");foreach (var region in textRegions){Console.WriteLine($"Region at X:{region.X}, Y:{region.Y}, Width:{region.Width}, Height:{region.Height}");}// You can also process each region individuallyforeach (var region in textRegions){ var regionResult = ocr.Read(input, region);Console.WriteLine($"Text in region: {regionResult.Text}");}
/* :path=/static-assets/ocr/content-code-examples/how-to/computer-vision-gettextregions.cs */
using IronOcr;
using IronSoftware.Drawing;
using System;
using System.Collections.Generic;
using System.Linq;
// Create a new IronTesseract object for OCR
var ocr = new IronTesseract();
// Load an image into OcrInput
using var input = new OcrInput();
input.LoadImage("/path/file.png");
// Get the first page from the input
var firstPage = input.GetPages().First();
// Get all text regions detected on this page
List<Rectangle> textRegions = firstPage.GetTextRegions();
// Display information about each detected region
Console.WriteLine($"Found {textRegions.Count} text regions:");
foreach (var region in textRegions)
{
Console.WriteLine($"Region at X:{region.X}, Y:{region.Y}, Width:{region.Width}, Height:{region.Height}");
}
// You can also process each region individually
foreach (var region in textRegions)
{
var regionResult = ocr.Read(input, region);
Console.WriteLine($"Text in region: {regionResult.Text}");
}
ImportsIronOcrImportsIronSoftware.DrawingImportsSystemImportsSystem.Collections.GenericImportsSystem.Linq' Create a new IronTesseract object for OCRDim ocr As New IronTesseract()' Load an image into OcrInputUsing input As New OcrInput() input.LoadImage("/path/file.png") ' Get the first page from the input Dim firstPage = input.GetPages().First() ' Get all text regions detected on this page Dim textRegions AsList(OfRectangle) = firstPage.GetTextRegions() ' Display information about each detected regionConsole.WriteLine($"Found {textRegions.Count} text regions:") For Each region In textRegionsConsole.WriteLine($"Region at X:{region.X}, Y:{region.Y}, Width:{region.Width}, Height:{region.Height}") Next ' You can also process each region individually For Each region In textRegions Dim regionResult = ocr.Read(input, region)Console.WriteLine($"Text in region: {regionResult.Text}") NextEndUsing
Imports IronOcr
Imports IronSoftware.Drawing
Imports System
Imports System.Collections.Generic
Imports System.Linq
' Create a new IronTesseract object for OCR
Dim ocr As New IronTesseract()
' Load an image into OcrInput
Using input As New OcrInput()
input.LoadImage("/path/file.png")
' Get the first page from the input
Dim firstPage = input.GetPages().First()
' Get all text regions detected on this page
Dim textRegions As List(Of Rectangle) = firstPage.GetTextRegions()
' Display information about each detected region
Console.WriteLine($"Found {textRegions.Count} text regions:")
For Each region In textRegions
Console.WriteLine($"Region at X:{region.X}, Y:{region.Y}, Width:{region.Width}, Height:{region.Height}")
Next
' You can also process each region individually
For Each region In textRegions
Dim regionResult = ocr.Read(input, region)
Console.WriteLine($"Text in region: {regionResult.Text}")
Next
End Using
OCR에서 컴퓨터 비전의 일반적인 사용 사례는?
컴퓨터 비전은 까다로운 시나리오에서 OCR 정확도를 크게 향상시킵니다. 다음은 실제 응용 프로그램입니다:
문서 레이아웃 분석: 복합 문서의 다른 섹션을 자동으로 식별하고 처리합니다. 스캔된 문서와 함께 특히 유용합니다 .
다중 열 텍스트: 신문이나 잡지를 위해 열을 독립적으로 분리하고 읽습니다. 멀티 스레드 처리를 사용하여 결과를 빠르게 얻습니다.
혼합된 콘텐츠: 문서에 있는 텍스트 영역과 그래픽을 구별합니다. 텍스트가 내장된 사진 처리를 할 때 도움이 됩니다.
성능 최적화: 텍스트가 포함된 영역에만 OCR 처리를 집중시킵니다. 빠른 OCR 구성 가이드를 참조하세요.
품질 관리: 전체 OCR 처리를 시작하기 전에 텍스트 탐지를 확인합니다. 각 단계를 모니터링하는 진행 추적 기능을 사용할 수 있습니다 查看進度追踪功能.
올바른 설정과 입력 파일로, OCR은 사람 수준의 읽기 기능에 가까운 결과를 제공합니다. 최적의 결과를 위해 컴퓨터 비전과 이미지 최적화 필터를 결합하여 가능한 최고의 OCR 정확도를 달성하세요. 저품질 이미지를 처리할 때, 저품질 스캔 수정 가이드가 유용한 전처리 기술을 제공합니다.
IronOCR의 컴퓨터 비전 기술은 OpenCV 알고리즘을 사용하여 OCR 처리 전에 이미지에서 텍스트 영역을 자동으로 감지합니다. 이를 통해 전체 이미지를 처리하는 대신 식별된 텍스트 영역에만 Tesseract 인식을 집중함으로써 노이즈가 많거나, 여러 영역으로 구성되어 있거나, 왜곡된 텍스트에 대한 정확도를 크게 향상시킬 수 있습니다.
C#으로 컴퓨터 비전 OCR을 빠르게 구현하는 방법은 무엇인가요?
IronOCR을 사용하면 단 한 줄의 코드로 컴퓨터 비전 OCR을 구현할 수 있습니다. IronTesseract의 FindTextRegion() 메서드를 사용하여 주요 텍스트 영역을 자동으로 감지한 다음, .Read()를 실행하여 텍스트를 즉시 추출하면 됩니다.
컴퓨터 비전 패키지를 별도로 설치해야 하는 이유는 무엇인가요?
IronOCR은 컴퓨터 비전 기능이 OpenCV 알고리즘을 활용하기 때문에 별도의 IronOcr.ComputerVision NuGet 패키지가 필요합니다. 이러한 알고리즘은 텍스트 감지 정확도를 크게 향상시키며 차량 번호판 인식 및 여권 스캔과 같은 기능에 필수적입니다.
어떤 플랫폼별 컴퓨터 비전 패키지를 설치해야 할까요?
IronOCR은 플랫폼별 패키지를 제공합니다. Windows 시스템용 IronOcr.ComputerVision.Windows, Linux 배포판용 IronOcr.ComputerVision.Linux, macOS 환경용 IronOcr.ComputerVision.MacOS가 있습니다.
이미지에서 여러 텍스트 영역을 어떻게 감지할 수 있나요?
IronOCR은 감지된 텍스트 영역을 기준으로 원본 이미지를 여러 이미지로 분할하는 FindMultipleTextRegions 메서드를 제공합니다. 또한 GetTextRegions 메서드를 사용하여 텍스트가 감지된 자르기 영역 목록을 가져올 수 있습니다.
처리 전에 어떤 텍스트 영역이 감지되었는지 확인할 수 있나요?
네, IronOCR에는 StampCropRectangleAndSaveAs 메서드가 포함되어 있어 실제 OCR 프로세스를 실행하기 전에 컴퓨터 비전 알고리즘이 어떤 텍스트 영역을 감지했는지 확인할 수 있습니다.
What is the use of the GetTextRegions method in IronOCR?
The GetTextRegions method in IronOCR provides a list of detected text regions as coordinates, useful for further processing or implementing custom OCR workflows.
How can IronOCR assist in processing documents with multiple text areas?
IronOCR uses the FindMultipleTextRegions method to detect and process documents with multiple distinct text areas by automatically separating them into individual sections for better OCR performance.
Why might IronOCR require a separate Computer Vision package?
The separate Computer Vision package for IronOCR, available via NuGet, is necessary to utilize advanced text detection features powered by OpenCV algorithms, enhancing OCR accuracy beyond standard capabilities.
What common uses does computer vision in IronOCR support?
Computer vision in IronOCR can be used for document layout analysis, multi-column text recognition, distinguishing mixed content, performance optimizations, and quality control in OCR processes.
커티스 차우는 칼턴 대학교에서 컴퓨터 과학 학사 학위를 취득했으며, Node.js, TypeScript, JavaScript, React를 전문으로 하는 프론트엔드 개발자입니다. 직관적이고 미적으로 뛰어난 사용자 인터페이스를 만드는 데 열정을 가진 그는 최신 프레임워크를 활용하고, 잘 구성되고 시각적으로 매력적인 매뉴얼을 제작하는 것을 즐깁니다.