이미지 파일에서 텍스트를 추출하는 방법

C#에서 Iron Tesseract를 사용하는 방법

This article was translated from English: Does it need improvement?
Translated
View the article in English

C#에서 Iron Tesseract는 IronTesseract 인스턴스를 생성하고 언어 및 OCR 설정으로 구성한 다음 이미지나 PDF가 포함된 OcrInput 객체에서 Read() 메서드를 호출하는 데 사용됩니다. 이는 Tesseract 5의 최적화된 엔진을 사용하여 텍스트의 이미지를 검색 가능한 PDF로 변환합니다.

IronOCR은 Iron Tesseract라고 알려진 맞춤형으로 최적화된 Tesseract 5를 활용하기 위한 직관적인 API를 제공합니다. IronOCR 및 IronTesseract를 사용하면 텍스트 및 스캔 문서의 이미지를 텍스트와 검색 가능한 PDF로 변환할 수 있습니다. 이 라이브러리는 125개 국제 언어를 지원하며 바코드 판독컴퓨터 비전 과 같은 고급 기능을 포함하고 있습니다.

빠른 시작: C#에서 IronTesseract 구성 설정하기

이 예시는 특정 설정으로 IronTesseract를 구성하고 한 줄의 코드로 OCR을 수행하는 방법을 보여줍니다.

  1. NuGet 패키지 관리자를 사용하여 https://www.nuget.org/packages/IronOcr 설치하기

    PM > Install-Package IronOcr
  2. 다음 코드 조각을 복사하여 실행하세요.

    var result = new IronOcr.IronTesseract { Language = IronOcr.OcrLanguage.English, Configuration = new IronOcr.TesseractConfiguration { ReadBarCodes = false, RenderSearchablePdf = true, WhiteListCharacters = "ABCabc123" } }.Read(new IronOcr.OcrInput("image.png"));
  3. 실제 운영 환경에서 테스트할 수 있도록 배포하세요.

    무료 체험판으로 오늘 프로젝트에서 IronOCR 사용 시작하기

    arrow pointer

IronTesseract 인스턴스를 어떻게 생성하나요?

다음 코드를 사용하여 Tesseract 객체를 초기화하세요.

:path=/static-assets/ocr/content-code-examples/how-to/irontesseract-initialize-irontesseract.cs
using IronOcr;

IronTesseract ocr = new IronTesseract();
$vbLabelText   $csharpLabel

IronTesseract의 동작은 다른 언어를 선택하고, 바코드 읽기를 활성화하며, 문자 화이트리스트/블랙리스트를 설정하여 사용자 정의할 수 있습니다. IronOCR은 OCR 프로세스를 세밀하게 조정할 수 있는 포괄적인 구성 옵션을 제공합니다.

:path=/static-assets/ocr/content-code-examples/how-to/irontesseract-configure-irontesseract.cs
IronTesseract ocr = new IronTesseract
{
    Configuration = new TesseractConfiguration
    {
        ReadBarCodes = false,
        RenderHocr = true,
        TesseractVariables = null,
        WhiteListCharacters = null,
        BlackListCharacters = "`ë|^",
    },
    MultiThreaded = false,
    Language = OcrLanguage.English,
    EnableTesseractConsoleMessages = true, // False as default
};
$vbLabelText   $csharpLabel

구성된 후에는 Tesseract 기능을 사용하여 OcrInput 객체를 읽을 수 있습니다. OcrInput 클래스는 다양한 입력 형식을 로드하기 위한 유연한 메서드를 제공합니다.

:path=/static-assets/ocr/content-code-examples/how-to/irontesseract-read.cs
IronTesseract ocr = new IronTesseract();

using OcrInput input = new OcrInput();
input.LoadImage("attachment.png");
OcrResult result = ocr.Read(input);
string text = result.Text;
$vbLabelText   $csharpLabel

복잡한 시나리오의 경우 멀티스레딩 기능을 활용하여 여러 문서를 동시에 처리함으로써 일괄 작업 성능을 크게 향상시킬 수 있습니다.

고급 테서랙트 구성 변수는 무엇인가요?

IronOcr Tesseract 인터페이스는 IronOcr.TesseractConfiguration 클래스를 통해 Tesseract 구성 변수를 완벽하게 제어할 수 있도록 합니다. 이러한 고급 설정을 통해 저품질 스캔 이미지 보정 이나 특정 문서 유형 읽기 와 같은 특정 사용 사례에 맞게 OCR 성능을 최적화할 수 있습니다.

코드에서 Tesseract 설정을 어떻게 사용하나요?

:path=/static-assets/ocr/content-code-examples/how-to/irontesseract-tesseract-configuration.cs
using IronOcr;
using System;

IronTesseract Ocr = new IronTesseract();

Ocr.Language = OcrLanguage.English;
Ocr.Configuration.PageSegmentationMode = TesseractPageSegmentationMode.AutoOsd;

// Configure Tesseract Engine
Ocr.Configuration.TesseractVariables["tessedit_parallelize"] = false;

using var input = new OcrInput();
input.LoadImage("/path/file.png");

OcrResult Result = Ocr.Read(input);
Console.WriteLine(Result.Text);
$vbLabelText   $csharpLabel

IronOCR은 다양한 문서 유형에 맞는 특수 설정도 제공합니다. 예를 들어 여권 판독 이나 MICR 수표 처리 시 특정 전처리 필터 및 영역 감지 기능을 적용하여 정확도를 향상시킬 수 있습니다.

재무 문서에 대한 구성 예시:

// Example: Configure for financial documents
IronTesseract ocr = new IronTesseract
{
    Language = OcrLanguage.English,
    Configuration = new TesseractConfiguration
    {
        PageSegmentationMode = TesseractPageSegmentationMode.SingleBlock,
        TesseractVariables = new Dictionary<string, object>
        {
            ["tessedit_char_whitelist"] = "0123456789.$,",
            ["텍스트_헤비_nr"] = false,
            ["엣지_아웃당 최대 자식 수"] = 10
        }
    }
};

// Apply preprocessing filters for better accuracy
using OcrInput input = new OcrInput();
input.LoadPdf("financial-document.pdf");
input.Deskew();
input.EnhanceResolution(300);

OcrResult result = ocr.Read(input);
// Example: Configure for financial documents
IronTesseract ocr = new IronTesseract
{
    Language = OcrLanguage.English,
    Configuration = new TesseractConfiguration
    {
        PageSegmentationMode = TesseractPageSegmentationMode.SingleBlock,
        TesseractVariables = new Dictionary<string, object>
        {
            ["tessedit_char_whitelist"] = "0123456789.$,",
            ["텍스트_헤비_nr"] = false,
            ["엣지_아웃당 최대 자식 수"] = 10
        }
    }
};

// Apply preprocessing filters for better accuracy
using OcrInput input = new OcrInput();
input.LoadPdf("financial-document.pdf");
input.Deskew();
input.EnhanceResolution(300);

OcrResult result = ocr.Read(input);
$vbLabelText   $csharpLabel

테서랙트의 모든 설정 변수 목록은 무엇입니까?

이는 IronTesseract.Configuration.TesseractVariables["key"] = value;를 사용하여 설정할 수 있습니다. 구성 변수를 사용하면 특정 문서에 맞는 최적의 결과를 얻기 위해 OCR 동작을 세밀하게 조정할 수 있습니다. OCR 성능 최적화에 대한 자세한 지침은 빠른 OCR 구성 가이드를 참조하십시오.

0Use old baseline algorithm 0All doc is proportial text 0Debug on fixed pitch test 0Turn off dp fixed pitch algorithm 0Do even faster pitch algorithm 0Write full metric stuff 0Draw row-level cuts 0Draw page-level cuts 0Use correct answer for fixed/prop 0Attempt whole doc/block fixed pitch 0Display separate words 0Display separate words 0Display forced fixed pitch words 0Moan about prop blocks 0Moan about fixed pitch blocks 0Dump stats when moaning 0Do current test 0.08Fraction of xheight for sameness 0.5Max initial cluster size 0.15Min initial cluster spacing 0.25Fraction of xheight 0.75Fraction of xheight 0.6Allowed size variance 0.3Non-fuzzy spacing region 2.8Min ratio space/nonspace 2Min ratio space/nonspace 1.5Pitch IQR/Gap IQR threshold 0.2Xh fraction noise in pitch 0.5Min width of decent blobs 0.1Fraction of x to ignore 0Debug level for unichar ambiguities 0Classify debug level 1Normalization Method ... 0Matcher Debug Level 0Matcher Debug Flags 0Learning Debug Level: 1Min # of permanent classes 3Reliable Config Threshold 5Enable adaption even if the ambiguities have not been seen 230Threshold for good protos during adaptive 0-255 230Threshold for good features during adaptive 0-255 229Class Pruner Threshold 0-255 15Class Pruner Multiplier 0-255: 7Class Pruner CutoffStrength: 10Integer Matcher Multiplier 0-255: 0Set to 1 for general debug info, to 2 for more details, to 3 to see all the debug messages 0Debug level for hyphenated words. 2Size of dict word to be treated as non-dict word 0Stopper debug level 10Max words to keep in list 10000Maximum number of different character choices to consider during permutation. This limit is especially useful when user patterns are specified, since overly generic patterns can result in dawg search exploring an overly large number of options. 1Fix blobs that aren't chopped 0Chop debug 10000Split Length 2Same distance 6Min Number of Points on Outline 150Max number of seams in seam_pile -50Min Inside Angle Bend 2000Min Outline Area 90Width of (smaller) chopped blobs above which we don't care that a chop is not near the center. 3X / Y length weight 0Debug level for wordrec 4Max number of broken pieces to associate 0SegSearch debug level 2000Maximum number of pain points stored in the queue 0Language model debug level 8Maximum order of the character ngram model 10Maximum number of prunable (those for which PrunablePath() is true) entries in each viterbi list recorded in BLOB_CHOICEs 500Maximum size of viterbi lists recorded in BLOB_CHOICEs 3Minimum length of compound words 0Display Segmentations 6Page seg mode: 0=osd only, 1=auto+osd, 2=auto_only, 3=auto, 4=column, 5=block_vert, 6=block, 7=line, 8=word, 9=word_circle, 10=char,11=sparse_text, 12=sparse_text+osd, 13=raw_line (Values from PageSegMode enum in tesseract/publictypes.h) 2Which OCR engine(s) to run (Tesseract, LSTM, both). 기본s to loading and running the most accurate available. 0Whether to use the top-line splitting process for Devanagari documents while performing page-segmentation. 0Whether to use the top-line splitting process for Devanagari documents while performing ocr. 0Debug level for BiDi 1Debug level 0Page number to apply boxes from 0Amount of debug output for bigram correction. 0Debug reassignment of small outlines 8Max diacritics to apply to a blob 16Max diacritics to apply to a word 0Reestimate debug 2alphas in a good word 39Adaptation decision algorithm for tess 0Print multilang debug info. 0Print paragraph debug info. 2Only preserve wds longer than this 10For adj length in rating per ch 1How many potential indicators needed 4Don't crunch words with long lower case strings 4Don't crunch words with long lower case strings 3Crunch words with long repetitions 1How many non-noise blbs either side? 1What constitues done for spacing 0Contextual fixspace debug 8Max allowed deviation of blob top outside of font data 8Min change in xht before actually trying it 0Debug level for sub & superscript fixer 85Set JPEG quality level 0Specify DPI for input image 50Specify minimum characters to try during OSD 0Rejection algorithm 2Rej blbs near image edge limit 8Reject any x-ht lt or eq than this -1-1 -> All pages, else specific page to process 1Run in parallel where possible 2Allows to include alternative symbols choices in the hOCR output. Valid input values are 0, 1 and 2. 0 is the default value. With 1 the alternative symbol choices per timestep are included. With 2 alternative symbol choices are extracted from the CTC process instead of the lattice. The choices are mapped per character. 5Sets the number of cascading iterations for the Beamsearch in lstm_choice_mode. Note that lstm_choice_mode must be set to a value greater than 0 to produce results. 0Debug data 3or should we use mean 10No.samples reqd to reestimate for row 40No.gaps reqd with 1 large gap to treat as a table 20No.gaps reqd with few cert spaces to use certs 1How to avoid being silly 7Pixel size of noise 0Baseline debug level 10Fraction of size for maxima 16Transitions for normal blob 1super norm blobs to save row 0Use ambigs for deciding whether to adapt to a character 0Prioritize blob division over chopping 1Enable adaptive classifier 0Character Normalized Matching 0Baseline Normalized Matching 1Enable adaptive classifier 0Use pre-adapted classifier templates 0Save adapted templates to a file 0Enable match debugger 0Non-linear stroke-density normalization 0Bring up graphical debugging windows for fragments training 0Use two different windows for debugging the matching: One for the protos and one for the features. 0Assume the input is numbers [0-9]. 1Load system word dawg. 1Load frequent word dawg. 1Load unambiguous word dawg. 1Load dawg with punctuation patterns. 1Load dawg with number patterns. 1Load dawg with special word bigrams. 0Use only the first UTF8 step of the given string when computing log probabilities. 0Make AcceptableChoice() always return false. Useful when there is a need to explore all segmentations 0Don't use any alphabetic-specific tricks. Set to true in the traineddata config file for scripts that are cursive or inherently fixed-pitch 0Save Document Words 1Merge the fragments in the ratings matrix and delete them after merging 1Associator Enable 0force associator to run regardless of what enable_assoc is. This is used for CJK where component grouping is necessary. 1Chop enable 0Vertical creep 1Use new seam_pile 0include fixed-pitch heuristics in char segmentation 0Only run OCR for words that had truth recorded in BlamerBundle 0Print blamer debug messages 0Try to set the blame for errors 1Save alternative paths found during chopping and segmentation search 1Words are delimited by space 0Use sigmoidal score for certainty 0Take segmentation and labeling from box file 0Conversion of word/line box file to char box file 0Generate training data from boxed chars 0Generate more boxes from boxed chars 0Break input into lines and remap boxes if present 0Dump intermediate images made during page segmentation 1Try inverting the image in `LSTMRecognizeWord` 0Perform training for ambiguities 0Generate and print debug information for adaption 0Learn both character fragments (as is done in the special low exposure mode) as well as unfragmented characters. 0Each bounding box is assumed to contain ngrams. Only learn the ngrams whose outlines overlap horizontally. 0Draw output words 0Dump char choices 0Print timing stats 1Try to improve fuzzy spaces 0Don't bother with word plausibility 1Crunch double hyphens? 1Add words to the document dictionary 0Output font info per char 0Block and Row stats 1Enable correction based on the word bigram dictionary. 0Enable single word correction based on the dictionary. 1Remove and conditionally reassign small outlines when they confuse layout analysis, determining diacritics vs noise 0Do minimal rejection on pass 1 output 0Test adaption criteria 0Test for point 1Run paragraph detection on the post-text-recognition (more accurate) 1Use ratings matrix/beam search with lstm 1Reduce rejection on good docs 1Reject spaces? 0Add font info to hocr output 0Add coordinates for each character to hocr output 1Before word crunch? 0Take out ~^ early? 1As it says 1Don't touch sensible strings 0Use dictword test 1Individual rejection control 1Individual rejection control 1Individual rejection control 0Extend permuter check 0Extend permuter check 0Output text with boxes 0Capture the image from the IPE 0Run interactively? 1According to dict_word 0In multilingual mode use params model of the primary language 0Debug line finding 0Use CJK fixed pitch model 0Allow feature extractors to see the original outline 0Only initialize with the config file. Useful if the instance is not going to be used for OCR but say only for layout analysis. 0Turn on equation detector 1Enable vertical detection 0Force using vertical text page mode 0Preserve multiple interword spaces 1Detect music staff and remove intersecting components 0Script has no xheight, so use a single mode 0Space stats use prechopping? 0Constrain relative values of inter and intra-word gaps for old_to_method. 1Block stats to use fixed pitch rows? 0Force word breaks on punct to break long lines in non-space delimited langs 0Space stats use prechopping? 0Fix suspected bug in old code 1Only stat OBVIOUS spaces 1Only stat OBVIOUS spaces 1Only stat OBVIOUS spaces 1Only stat OBVIOUS spaces 1Use row alone when inadequate cert spaces 0Better guess 0Pass ANY flip to context? 1Don't restrict kn->sp fuzzy limit to tables 0Don't remove noise blobs 0Display unsorted blobs 0Display unsorted blobs 1Reject noise-like words 1Reject noise-like rows 0Debug row garbage detector Class str to debug learning A filename of user-provided words. A suffix of user-provided words located in tessdata. A filename of user-provided patterns. A suffix of user-provided patterns located in tessdata. Output file for ambiguities found in the dictionary Word for which stopper debug information should be printed to stdout Blacklist of chars not to recognize Whitelist of chars to recognize List of chars to override tessedit_char_blacklist .expExposure value follows this pattern in the image filename. The name of the image files are expected to be in the form [lang].[fontname].exp [num].tif 선행 구두점).,;:?!1st Trailing punctuation 2nd Trailing punctuationPage separator (default is form feed control character) 0.2Character Normalization Range ... 1.5Veto ratio between classifier ratings 5.5Veto difference between classifier certainties 0.125Good Match (0-1) 0Great Match (0-1) 0.02Perfect Match (0-1) 0.15Bad Match Pad (0-1) 0.1New template margin (0-1) 12Avg. noise blob length 0.015Maximum angle delta for prototype clustering 0Penalty to apply when a non-alnum is vertically out of its expected textline position 1.5Rating scaling factor 20Certainty scaling factor 0.00390625Scale factor for features not used 2.5Prune poor adapted results this much worse than best result -1Threshold at which classify_adapted_pruning_factor starts -3Exclude fragments that do not look like whole characters from training and adaption 0.3Max large speckle size 10Penalty to add to worst rating for noise 0.125Score penalty (0.1 = 10%) added if there are subscripts or superscripts in a word, but it is otherwise OK. 0.25Score penalty (0.1 = 10%) added if an xheight is inconsistent. 1Score multiplier for word matches which have good case and are frequent in the given language (lower is better). 1.1Score multiplier for word matches that have good case (lower is better). 1.3125기본 score multiplier for word matches, which may have case issues (lower is better). 1.25Score multiplier for glyph fragment segmentations which do not match a dictionary word (lower is better). -2.25Worst certainty for words that can be inserted into the document dictionary -2.25Good blob limit 2최대 문자 너비 대 높이 비율
테서랙트 설정 변수 기본 의미
classify_num_cp_levels3클래스 가지치기 레벨 수
텍스트드_디버그_탭찾기0디버그 탭 찾기
textord_debug_bugs0탭 찾기 버그 관련 출력 기능을 켜세요
textord_testregion_left-1디버그 보고 사각형의 왼쪽 가장자리
텍스트_테스트지역_상단-1디버그 보고 사각형의 상단 가장자리
텍스트_테스트지역_오른쪽2147483647디버그 사각형의 오른쪽 가장자리
텍스트_테스트지역_하단2147483647디버그 사각형의 하단 가장자리
textord_tabfind_show_partitions0파티션 경계를 표시하고, 1보다 크면 대기합니다.
데바나가리_분할_디버그레벨0분할된 시로-레카 프로세스의 디버그 레벨입니다.
엣지_아웃당 최대 자식 수10문자 윤곽선 내 자식 요소의 최대 개수
edges_max_children_layers5캐릭터 윤곽선 내부에 중첩된 자식 요소의 최대 레이어 수
손자녀당 엣지_자녀_10외곽선 던지기의 중요도 비율
엣지_자식_카운트_제한45덩어리에 허용되는 최대 구멍 수
edges_min_nonhole12상자 안에 잠재적인 숯을 위한 최소 픽셀 수
모서리_경로_비율40Max lensq/area for acceptable child outline
textord_fp_chop_error2최대 허용 절단 세포 굽힘
textord_tabfind_show_images0Show image blobs
텍스트_skewsmooth_offset4평활도 요인
텍스트_skewsmooth_offset21평활도 요인
텍스트_테스트_x-2147483647테스트 포인트의 좌표
텍스트_테스트_y-2147483647테스트 포인트의 좌표
textord_min_blobs_in_row4그래디언트 계산 전 최소 블롭 수
textord_spline_minblobs8Min blobs in each spline segment
textord_spline_medianwin6Size of window for spline segmentation
textord_max_blob_overlaps4Max number of blobs a big blob can overlap
텍스트_최소 x 높이10Min credible pixel xheight
textord_lms_line_trials12Number of linew fits to do
오래된 구멍 손실 수10Max lost before fallback line used
pitsync_linear_version6Use new fast algorithm
pitsync_fake_depth1Max advance fake generation
textord_tabfind_show_strokewidths0Show stroke widths
텍스트드_도트매트릭스_간격3Max pixel gap for broken pixed pitch
텍스트_디버그_블록0Block to do debug on
텍스트드 피치 범위2Max range test on pitch
textord_words_veto_power5Rows required to outvote a veto
equationdetect_save_bi_image0Save input bi image
equationdetect_save_spt_image0Save special character image
equationdetect_save_seed_image0Save the seed image
equationdetect_save_merged_image0Save the merged image
폴리_디버그0Debug old poly
폴리 와이드 오브젝트_베터1More accurate approx on wide things
단어 표시 분할0Display splits
텍스트_디버그_인쇄 가능0Make debug windows printable
텍스트 공간 크기는 가변적입니다0If true, word delimiter spaces are assumed to have variable width, even though characters have fixed pitch.
textord_tabfind_show_initial_partitions0Show partition bounds
textord_tabfind_show_reject_blobs0Show blobs rejected as noise
textord_tabfind_show_columns0Show column bounds
textord_tabfind_show_blocks0Show final block bounds
textord_tabfind_find_tables1run table detection
데바나가리_분할_디버그이미지0Whether to create a debug image for split shiro-rekha process.
textord_show_fixed_cuts0Draw fixed pitch cell boundaries
edges_use_new_outline_complexity0Use the new outline complexity module
edges_debug0turn on debugging for this module
edges_children_fix0Remove boxy parents of char-like children
gapmap_debug0Say which blocks have tables
gapmap_use_ends0Use large space at start and end of rows
gapmap_no_isolated_quanta0Ensure gaps not less than 2quanta wide
텍스트_헤비_nr0Vigorously remove noise
textord_show_initial_rows0Display row accumulation
textord_show_parallel_rows0Display page correlated rows
textord_show_expanded_rows0Display rows after expanding
textord_show_final_rows0Display rows after final fitting
textord_show_final_blobsDisplay blob bounds after pre-ass
텍스트 테스트_풍경0Tests refer to land/port
textord_parallel_baselines1Force parallel baselines
textord_straight_baselines0Force straight baselines
textord_old_baselines1
텍스트_올드_x 높이0Use old xheight algorithm
textord_fix_xheight_bug1Use spline baseline
textord_fix_makerow_bug1Prevent multiple baselines
textord_debug_xheights0Test xheight algorithms
텍스트_편향_왜곡 계산1Bias skew estimates with line length
텍스트_보간_기울기1Interpolate across gaps
textord_new_initial_xheight1Use test xheight mechanism
텍스트드_디버그_블롭0Print test blob information
텍스트_정말_오래된_x높이0Use original wiseowl xheight
textord_oldbl_debug0Debug old baseline generation
textord_debug_baselines0Debug baseline generation
textord_oldbl_paradef1Use para default mechanism
textord_oldbl_split_splines1Split stepped splines
textord_oldbl_merge_parts1Merge suspect partitions
oldbl_corrfix1Improve correlation of heights
oldbl_xhfix0Fix bug in modes threshold for xheights
textord_ocropus_mode0Make baselines for ocropus
textord_tabfind_only_strokewidths0Only run stroke widths
textord_tabfind_show_initialtabs0Show tab candidates
textord_tabfind_show_finaltabs0Show tab vectors
textord_show_tables0Show table regions
textord_tablefind_show_mark0Debug table marking steps in detail
textord_tablefind_show_stats0Show page stats used in table finding
textord_tablefind_recognize_tables0Enables the table recognizer for table layout and filtering.
텍스트_올_프로프
텍스트드 디버그 피치 테스트
textord_disable_pitch_test
textord_fast_pitch_test
textord_debug_pitch_metric
textord_show_row_cuts
textord_show_page_cuts
텍스트드_피치_치트
textord_blockndoc_fixed
textord_show_initial_words
textord_show_new_words
textord_show_fixed_words
textord_blocksall_fixed
textord_blocksall_prop
textord_blocksall_testing
텍스트_테스트_모드
텍스트_피치_로우 유사성
단어_이니셜_낮음
단어_첫 글자_대문자
단어_기본 속성_공백
단어_기본_고정_공백
단어 기본 고정 제한
textord_words_definite_spread
텍스트_공간 크기_비율
텍스트_공간 크기_비율 속성
텍스트드_fpiqr_비율
텍스트드_맥스_피치_iqr
textord_fp_min_width
텍스트_밑줄_오프셋
ambigs_debug_level
디버그 레벨 분류
분류_정규화_방법
매처 디버그 레벨
매처_디버그_플래그
classify_learning_debug_level
matcher_permanent_classes_min
프로토타이핑을 위한 matcher_min_examples_for_prototyping
프로토타이핑을 위한 충분한 예시들을 매처에 추가
classify_adapt_proto_threshold
classify_adapt_feature_threshold
classify_class_pruner_threshold
클래스_프루너_승수
classify_cp_cutoff_strength
정수 매칭 승수 분류
개 디버그 레벨
하이픈_디버그_레벨
stopper_smallword_size
스토퍼 디버그 레벨
tessedit_truncate_wordchoice_log
최대 변경 시도 횟수
repair_unchopped_blobs
chop_debug
chop_split_length
같은 거리를 자르다
chop_min_outline_points
chop_seam_pile_size
chop_inside_angle
자르기_최소_윤곽선_영역
chop_centered_maxwidth
chop_x_y_weight
워드렉 디버그 레벨
단어 검색 최대 조인 청크
세그멘테이션 검색 디버그 레벨
세그멘테이션 검색 최대 고통점
segsearch_max_futile_classifications20Maximum number of pain point classifications per chunk that did not result in finding a better word choice.
언어 모델 디버그 레벨
언어 모델 n-gram 순서
언어 모델_비터비_리스트_ 최대 가지치기 가능 개수
언어 모델_viterbi_list_max_size
언어 모델 최소 복합 길이
단어 표시 분할
tessedit_pageseg_mode
tessedit_ocr_engine_mode
페이지eg_devanagari_split_strategy
ocr_데바나가리_분할_전략
비디_디버그
applybox_debug
applybox_page
tessedit_bigram_debug
디버그 노이즈 제거
노이즈_maxperblob
noise_maxperword
debug_x_ht_level
품질_최소_초기_알파값_요구사항
tessedit_tess_adaption_mode
다국어 디버그 레벨
단락 디버그 레벨
tessedit_preserve_min_wd_len
크런치_레이팅_맥스
크런치팟지표
crunch_leave_lc_strings
crunch_leave_uc_strings
크런치_긴_반복
crunch_debug0As it says
fixsp_non_noise_limit
fixsp_done_mode
debug_fix_space_level
x_ht_수용성
x_ht_min_change
superscript_debug
jpg_quality
사용자 정의 DPI
시도할 최소 문자 수
suspect_level99Suspect marker level
suspect_short_words2Don't suspect dict wds longer than this
tessedit_reject_mode
tessedit_image_border
최소 정상 x_ht_픽셀
tessedit_page_number
tessedit_parallelize
lstm_choice_mode
lstm_choice_iterations
tosp_debug_level
중앙값에 대한 충분한 공간 샘플
tosp_redo_kern_limit
tosp_few_samples
tosp_short_row
tosp_sanity_method
textord_max_noise_size
텍스트_베이스라인_디버그
텍스트_노이즈_크기분
텍스트드_노이즈_트랜스리밋
텍스트_노이즈_스카운트
적응을 위해 모호함을 사용합니다
우선순위_분할
분류_활성화_학습
tess_cn_matching
테스_bn_매칭
classify_enable_adaptive_matcher
사전 적응된 템플릿을 분류하고 사용합니다.
적응형 템플릿을 분류하고 저장합니다.
classify_enable_adaptive_debugger
비선형 노름 분류
disable_character_fragments1Do not include character fragments in the results of the classifier
classify_debug_character_fragments
matcher_debug_separate_windows
classify_bln_numeric_mode
로드_시스템_도그
로드_freq_dawg
로드_unambig_dawg
로드_펀치_도그
로드_넘버_도그
로드_비그램_도그
use_only_first_uft8_step
stopper_no_acceptable_choices
segment_nonalphabetic_script
save_doc_words
매트릭스에 조각들을 병합하세요
단어 검색 활성화 연결
포스_워드_어소크
chop_enable
수직 크리프를 자르다
chop_new_seam_pile
고정 피치 문자 세그먼트 가정
wordrec_skip_no_truth_words
워드렉_디버그_블레이머
워드렉_런_블레이머
대체 선택 사항을 저장하세요
language_model_ngram_on0Turn on/off the use of character ngram model
language_model_ngram_use_ only_first_uft8_step0Use only the first UTF8 step of the given string when computing log probabilities.
언어 모델 n-gram 공간 구분된 언어
언어 모델 사용 시그모이드 확실성
tessedit_resegment_from_boxes
tessedit_resegment_from_line_boxes
tessedit_train_from_boxes
tessedit_make_boxes_from_boxes
tessedit_train_line_recognizer
tessedit_dump_pageseg_images
tessedit_do_invert
tessedit_ambigs_training
tessedit_adaption_debug
applybox_learn_chars_and_char_frags_mode
applybox_learn_ngrams_mode
tessedit_display_outwords
tessedit_dump_choices
tessedit_timing_debug
tessedit_fix_fuzzy_spaces
tessedit_unrej_any_wd
tessedit_fix_hyphens
tessedit_enable_doc_dict
tessedit_debug_fonts
tessedit_debug_block_rejection
tessedit_enable_bigram_correction
tessedit_enable_dict_correction
노이즈 제거 활성화
tessedit_minimal_rej_pass1
tessedit_test_adaption
테스트_pt
단락 텍스트 기반
lstm_use_matrix
tessedit_good_quality_unrej
tessedit_use_reject_spaces
tessedit_preserve_blk_rej_perfect_wds1Only rej partially rejected words in block rejection
tessedit_preserve_row_rej_perfect_wds1Only rej partially rejected words in row rejection
tessedit_dont_blkrej_good_wds0Use word segmentation quality metric
tessedit_dont_rowrej_good_wds0Use word segmentation quality metric
tessedit_row_rej_good_docs1Apply row rejection to good docs
tessedit_reject_bad_qual_wds1Reject all bad quality wds
tessedit_debug_doc_rejection0Page stats
tessedit_debug_quality_metrics0Output data to debug file
bland_unrej0unrej potential with no checks
unlv_tilde_crunching0Mark v.bad words for tilde crunch
hocr_font_info
hocr_char_boxes
crunch_early_merge_tess_fails
크런치_얼리_컨버트_배드_언블_치스
크런치_끔찍한_쓰레기
crunch_leave_ok_strings
crunch_accept_ok1Use acceptability in okstring
crunch_leave_accept_strings0Don't pot crunch sensible strings
crunch_include_numerals0Fiddle alpha figures
tessedit_prefer_joined_punct0Reward punctuation joins
tessedit_write_block_separators0Write block separators in output
tessedit_write_rep_codes0Write repetition char code
tessedit_write_unlv0Write .unlv output file
tessedit_create_txt0Write .txt output file
tessedit_create_hocr0Write .html hOCR output file
tessedit_create_alto0Write .xml ALTO file
tessedit_create_lstmbox0Write .box file for LSTM training
tessedit_create_tsv0Write .tsv output file
tessedit_create_wordstrbox0Write WordStr format .box output file
tessedit_create_pdf0Write .pdf output file
textonly_pdf0Create PDF with only one invisible text layer
suspect_constrain_1Il0UNLV keep 1Il chars rejected
tessedit_minimal_rejection0Only reject tess failures
tessedit_zero_rejection0Don't reject ANYTHING
tessedit_word_for_word0Make output have exactly one word per WERD
tessedit_zero_kelvin_rejection0Don't reject ANYTHING AT ALL
tessedit_rejection_debug0Adaption debug
tessedit_flip_0O1Contextual 0O O0 flips
rej_trust_doc_dawg0Use DOC dawg in 11l conf. detector
rej_1Il_use_dict_word
rej_1Il_trust_permuter_type1Don't double check
rej_use_tess_accepted
rej_use_tess_blanks
rej_use_good_perm
rej_use_sensible_wd
rej_alphas_in_number_perm
tessedit_create_boxfile
tessedit_write_images
대화형 표시 모드
tessedit_override_permuter
tessedit_use_primary_params_model
textord_tabfind_show_vlines
textord_use_cjk_fp_model
폴리_세부적인_fx 허용
tessedit_init_config_only
텍스트_방정식_탐지
textord_tabfind_vertical_text
textord_tabfind_force_vertical_text
단어 사이 공백을 보존합니다
pageseg_apply_music_mask
텍스트_싱글_높이_모드
tosp_old_to_method
tosp_old_to_constrain_sp_kn
tosp_only_use_prop_rows
tosp_force_wordbreak_on_punct
tosp_use_pre_chopping
tosp_old_to_bug_fix
tosp_block_use_cert_spaces
tosp_row_use_cert_spaces
tosp_narrow_blobs_not_cert
tosp_row_use_cert_spaces1
tosp_recovery_isolated_row_stats
tosp_only_small_gaps_for_kern
tosp_all_flips_fuzzy
tosp_fuzzy_limit_all
textord_no_rejects
텍스트_쇼_블롭스
텍스트_표시_박스
textord_noise_rejwords
텍스트_노이즈_리즈로우
텍스트드_노이즈_디버그
classify_learn_debug_str
사용자_단어_파일
사용자_단어_접미사
사용자 패턴 파일
사용자 패턴 접미사
output_ambig_words_file
디버그할 단어
tessedit_char_blacklist
tessedit_char_whitelist
tessedit_char_unblacklist
tessedit_write_params_to_fileWrite all parameters to the given file.
applybox_exposure_pattern
chs_leading_punct('`"
chs_trailing_punct1
chs_trailing_punct2)'`"
윤곽선_이상함%|비표준 윤곽선 수
outlines_2ij!?%":;비표준 윤곽선 수
숫자 구두점.,Punct. chs expected WITHIN numbers
인식할 수 없는 문자|Output char for unidentified blobs
ok_repeated_ch_non_alphanum_wds-?*=Allow NN to unrej
conflict_set_I_l_1Il1 []Il1 conflict set
파일 유형.tifFilename extension
tessedit_load_sublangsList of languages to load with this one
페이지 구분선
classify_char_norm_range
최대 등급 비율 분류
최대 확실성 마진 분류
matcher_good_threshold
매치어_신뢰할 수 있는_적응형_결과
매처_완벽한_임계값
matcher_bad_match_pad
매처_레이팅_마진
matcher_avg_noise_size
매처_클러스터링_최대_각도_델타
부적합 분류_정크_벌점
평점 척도
확실성 척도
tessedit_class_miss_scale
classify_adapted_pruning_factor
classify_adapted_pruning_threshold
문자 조각 분류_쓰레기_확실성_임계값
스페클_대형_최대 크기
얼룩 등급 페널티
x높이_페널티_하위첨자
xheight_penalty_inconsistent
세그먼트 페널티 딕셔너리 빈번 단어
세그먼트 페널티 딕셔너리 케이스 확인
세그먼트 페널티 딕셔너리 케이스 잘못됨
세그먼트 페널티 사전 비단어
확실성 척도20Certainty scaling factor
stopper_nondict_certainty_base-2.5Certainty threshold for non-dict words
stopper_phase2_certainty_rejection_offset1Reject certainty offset
stopper_certainty_per_char-0.5Certainty to add for each dict char above small word size.
stopper_allowable_character_badness3Max certaintly variation allowed in a word (in sigma)
doc_dict_pending_threshold0Worst certainty for using pending dictionary
doc_dict_certainty_threshold
tessedit_확실성_임계값
chop_split_dist_knob0.5Split length adjustment
chop_overlap_knob0.9Split overlap adjustment
chop_center_knob0.15Split center adjustment
chop_sharpness_knob0.06Split sharpness adjustment
chop_width_change_knob5Width change adjustment
chop_ok_split100OK split limit
chop_good_split50Good split limit
segsearch_max_char_wh_ratio

최상의 결과를 얻으려면 OCR을 적용하기 전에 IronOCR의 이미지 전처리 필터를 사용하는 것이 좋습니다. 이러한 필터는 특히 품질이 낮은 스캔 이미지 와 같은 복잡한 문서를 다룰 때 정확도를 크게 향상시킬 수 있습니다.

자주 묻는 질문

C#에서 IronTesseract를 OCR에 맞게 설정하는 방법은 무엇인가요?

IronTesseract를 구성하려면 IronTesseract 인스턴스를 생성하고 언어 및 구성과 같은 속성을 설정하세요. OCR 언어(지원되는 125개 언어 중)를 지정하고, 바코드 읽기를 활성화하고, 검색 가능한 PDF 출력을 구성하고, 문자 화이트리스트를 설정할 수 있습니다. 예를 들면 다음과 같습니다. var tesseract = new IronOcr.IronTesseract { Language = IronOcr.OcrLanguage.English, Configuration = new IronOcr.TesseractConfiguration { ReadBarCodes = false, RenderSearchablePdf = true } };

IronTesseract는 어떤 입력 형식을 지원하나요?

IronTesseract는 OcrInput 클래스를 통해 다양한 입력 형식을 지원합니다. 이미지(PNG, JPG 등), PDF 파일, 스캔 문서 등을 처리할 수 있습니다. OcrInput 클래스는 이러한 다양한 형식을 로드하는 유연한 메서드를 제공하여 텍스트가 포함된 거의 모든 문서에 대해 손쉽게 OCR을 수행할 수 있도록 합니다.

IronTesseract를 사용하여 텍스트와 함께 바코드를 읽을 수 있습니까?

네, IronTesseract에는 고급 바코드 인식 기능이 포함되어 있습니다. TesseractConfiguration에서 ReadBarCodes = true로 설정하면 바코드 감지를 활성화할 수 있습니다. 이를 통해 단일 OCR 작업으로 동일한 문서에서 텍스트와 바코드 데이터를 모두 추출할 수 있습니다.

스캔한 문서를 검색 가능한 PDF 파일로 만들려면 어떻게 해야 하나요?

IronTesseract는 TesseractConfiguration에서 RenderSearchablePdf = true로 설정하여 스캔한 문서와 이미지를 검색 가능한 PDF로 변환할 수 있습니다. 이렇게 하면 원본 문서의 모양을 유지하면서 텍스트를 선택하고 검색할 수 있는 PDF 파일이 생성됩니다.

IronTesseract는 OCR에서 어떤 언어를 지원하나요?

IronTesseract는 텍스트 인식에 125개 국제 언어를 지원합니다. IronTesseract 인스턴스의 Language 속성을 설정하여 언어를 지정할 수 있습니다. 예를 들어 IronOcr.OcrLanguage.English, Spanish, Chinese, Arabic 등을 사용할 수 있습니다.

OCR 과정에서 인식되는 문자를 제한할 수 있나요?

네, IronTesseract는 TesseractConfiguration의 WhiteListCharacters 속성을 통해 문자 화이트리스트 및 블랙리스트를 설정할 수 있습니다. 이 기능은 예상되는 문자 집합을 알고 있을 때, 예를 들어 영숫자만으로 인식 범위를 제한할 때 정확도를 향상시키는 데 도움이 됩니다.

여러 문서를 동시에 OCR 처리하려면 어떻게 해야 하나요?

IronTesseract는 일괄 처리를 위한 멀티스레딩 기능을 지원합니다. 병렬 처리를 활용하여 여러 문서를 동시에 OCR 처리할 수 있으므로 대용량 이미지 또는 PDF 파일을 처리할 때 성능이 크게 향상됩니다.

IronOCR은 어떤 버전의 Tesseract를 사용하나요?

IronOCR은 Iron Tesseract라고 알려진 맞춤형 최적화 버전의 Tesseract 5를 사용합니다. 이 향상된 엔진은 표준 Tesseract 구현에 비해 정확도와 성능이 향상되었으며, .NET 애플리케이션과의 호환성도 유지합니다.

커티스 차우
기술 문서 작성자

커티스 차우는 칼턴 대학교에서 컴퓨터 과학 학사 학위를 취득했으며, Node.js, TypeScript, JavaScript, React를 전문으로 하는 프론트엔드 개발자입니다. 직관적이고 미적으로 뛰어난 사용자 인터페이스를 만드는 데 열정을 가진 그는 최신 프레임워크를 활용하고, 잘 구성되고 시각적으로 매력적인 매뉴얼을 제작하는 것을 즐깁니다.

커티스는 개발 분야 외에도 사물 인터넷(IoT)에 깊은 관심을 가지고 있으며, 하드웨어와 소프트웨어를 통합하는 혁신적인 방법을 연구합니다. 여가 시간에는 게임을 즐기거나 디스코드 봇을 만들면서 기술에 대한 애정과 창의성을 결합합니다.

검토자:
제프 프리츠
제프리 T. 프리츠
.NET 커뮤니티 팀의 수석 프로그램 관리자
제프는 .NET 및 Visual Studio 팀의 수석 프로그램 관리자이기도 합니다. 그는 .NET Conf 가상 컨퍼런스 시리즈의 총괄 프로듀서이며, 개발자를 위한 라이브 스트림 'Fritz and Friends'를 주 2회 진행하며 시청자들과 함께 기술에 대해 이야기하고 코드를 작성합니다. 제프는 Microsoft Build, Microsoft Ignite, .NET Conf, Microsoft MVP Summit 등 주요 Microsoft 개발자 행사를 위한 워크숍, 프레젠테이션 및 콘텐츠 기획을 담당합니다.
시작할 준비 되셨나요?
Nuget 다운로드 5,525,971 | 버전: 2026.3 방금 출시되었습니다
Still Scrolling Icon

아직도 스크롤하고 계신가요?

빠른 증거를 원하시나요? PM > Install-Package IronOcr
샘플을 실행하세요 이미지가 검색 가능한 텍스트로 바뀌는 것을 확인해 보세요.