Bir görüntü dosyasından metin nasıl çıkarılır

C#'da Iron Tesseract Nasıl Kullanılır

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

Iron Tesseract in C# bir IronTesseract örneği oluşturarak, dil ve OCR ayarlarıyla yapılandırarak, ardından görüntülerinizi veya PDF'lerinizi içeren bir OcrInput nesnesi üzerinde Read() yöntemini çağırarak kullanılır. Bu, metin görüntülerini Tesseract 5'in optimize edilmiş motorunu kullanarak aranabilir PDF'lere dönüştürür.

IronOCR, Iron Tesseract olarak bilinen ozellestirilmis ve optimize edilmis Tesseract 5'i kullanmak icin sezgisel bir API saglar. IronOCR ve IronTesseract kullanarak, metin görüntülerini ve taranmış belgeleri metin ve aranabilir PDF'lere dönüştürebileceksiniz. Kutuphane, 125 uluslar arasi dili destekler ve barkod okuma ve bilgisayarla görme gibi gelişmiş özellikler icermektedir.

Hızlı Başlangıç: C#'da IronTesseract Yapılandırması

Bu örnek, IronTesseract'ı belirli ayarlarla nasıl yapılandıracağınızı ve tek bir kod satırında OCR işlemi yapacağınızı gösterir.

  1. NuGet Paket Yöneticisi ile https://www.nuget.org/packages/IronOcr yükleyin

    PM > Install-Package IronOcr
  2. Bu kod parçasını kopyalayıp çalıştırın.

    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. Canlı ortamınızda test etmek için dağıtın

    Bugün projenizde IronOCR kullanmaya başlayın ücretsiz deneme ile

    arrow pointer

IronTesseract Ornegi Nasıl Oluşturulur?

Bu kodla bir Tesseract nesnesini başlangıç yapın:

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

IronTesseract ocr = new IronTesseract();
Imports IronOcr

Dim ocr As New IronTesseract()
$vbLabelText   $csharpLabel

Farklı diller seçerek, barkod okumayı etkinleştirerek ve karakterleri beyaz/kara listeye alarak IronTesseract davranışını özelleştirebilirsiniz. IronOCR, OCR sürecinizi ince ayarlamak icin kapsamli konfigurasyon seçenekleri sunar:

: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
};
Dim ocr As New IronTesseract With {
	.Configuration = New TesseractConfiguration With {
		.ReadBarCodes = False,
		.RenderHocr = True,
		.TesseractVariables = Nothing,
		.WhiteListCharacters = Nothing,
		.BlackListCharacters = "`ë|^"
	},
	.MultiThreaded = False,
	.Language = OcrLanguage.English,
	.EnableTesseractConsoleMessages = True
}
$vbLabelText   $csharpLabel

Yapılandırıldıktan sonra, OcrInput nesnelerini okumak için Tesseract işlevselliğini kullanabilirsiniz. OcrInput sinifi çeşitli giris formatlarini yüklemek icin esnek yöntemler saglar:

: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;
Dim ocr As New IronTesseract()

Using input As New OcrInput()
	input.LoadImage("attachment.png")
	Dim result As OcrResult = ocr.Read(input)
	Dim text As String = result.Text
End Using
$vbLabelText   $csharpLabel

Karmaşık senaryolar icin, coklu dokümanlari ayni anda işleyerek toplu işlemeler icin performansı önemli derecede iyilestirmek icin coklu işleme yeteneklerini kullanabilirsiniz.

Gelişmiş Tesseract Yapılandırma Degiskenleri Nelerdir?

IronOcr Tesseract arayuzu, IronOcr.TesseractConfiguration Sinifi aracılığıyla Tesseract yapılandırma degiskenlerinin tamamen kontrolunu saglar. Bu gelişmiş ayarlar, dusuk kaliteli taramalar düzeltmek ya da belirli doküman tiplerini okuma gibi ozel kullanim durumlari icin OCR performansini optimize etmenizi saglar.

Tesseract Yapılandırması Kodda Nasıl Kullanılır?

: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);
Imports IronOcr
Imports System

Private Ocr As New IronTesseract()

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

' Configure Tesseract Engine
Ocr.Configuration.TesseractVariables("tessedit_parallelize") = False

Dim input = New OcrInput()
input.LoadImage("/path/file.png")

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

IronOCR, farkli doküman tipleri icin ozellestirilmis yapılandırma da sunar. Ornegin, pasaport okuma veya MICR cek işleme</a sırasında, ozgul on işleme filtreleri ve bolge algilama uygulayarak doğruluk artışı elde edebilirsiniz.

Finans belgeleri icin örnek yapılandırma:

// 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.$,",
            ["textord_heavy_nr"] = false,
            ["edges_max_children_per_outline"] = 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.$,",
            ["textord_heavy_nr"] = false,
            ["edges_max_children_per_outline"] = 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);
Imports IronOcr

' Example: Configure for financial documents
Dim ocr As New IronTesseract With {
    .Language = OcrLanguage.English,
    .Configuration = New TesseractConfiguration With {
        .PageSegmentationMode = TesseractPageSegmentationMode.SingleBlock,
        .TesseractVariables = New Dictionary(Of String, Object) From {
            {"tessedit_char_whitelist", "0123456789.$,"},
            {"textord_heavy_nr", False},
            {"edges_max_children_per_outline", 10}
        }
    }
}

' Apply preprocessing filters for better accuracy
Using input As New OcrInput()
    input.LoadPdf("financial-document.pdf")
    input.Deskew()
    input.EnhanceResolution(300)

    Dim result As OcrResult = ocr.Read(input)
End Using
$vbLabelText   $csharpLabel

Tüm Tesseract Yapılandırması Degiskenlerinin Tam Listesi Nedir?

Bunlar IronTesseract.Configuration.TesseractVariables["key"] = value; kullanılarak ayarlanabilir. Yapılandırma degiskenleri, ozel dokümanlariniz icin optimal sonuclar almak icin OCR davranisini ince ayar yapmanizi saglar. OCR performansini optimum hale getirmek icin detayli rehberlik icin hizli OCR yapılandırma kılavuzuna basvurun.

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). Varsayilans 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_seçim_modu. Note that lstm_seçim_modu 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 Öndeki noktalama işareti).,;:?!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.3125Varsıyılan 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 2Maksimum karakter genişlik-yükseklik oranı
Tesseract Yapılandırma Degiskeni Varsıyılan Anlami
sınıflandırma_numu_cp_seviyeleri3Sınıf Pruner Seviyeleri Sayısı
textord_debug_tabfind0Debug sekme bulma
textord_debug_bugs0Sekme bulmadaki hatalarla ilgili cikis acma
textord_testregion_sola-1Debug raporlama dikdörtgeninin sol kenari
textord_testregion_ustu-1Debug raporlama dikdörtgeninin ust kenari
textord_testregion_sağa2147483647Debug dikdörtgeninin sağ kenari
textord_testregion_alt2147483647Debug dikdörtgeninin alt kenari
textord_tabfind_show_partitions0Bolme sinirlarini göster, >1 ise bekliyor
devanagari_split_debuglevel0Şiro-rekha bölmesinin debug seviyesi.
edges_max_children_per_outline10Bir karakter taslaği içindeki maksimum çocuk sayisi
edges_max_children_layers5Bir karakter taslağı içindeki yerleşik çocuk katmanlarının en fazla sayisi
edges_children_per_grandchild10Cizimleri ayiklamanin onem oranı
edges_children_count_limit45Blobda izin verilen maksimum delik sayisi
edges_min_nonhole12Kutuda potansiyel karakter icin minimum pikseller
edges_patharea_ratio40Max lensq/area for acceptable child outline
textord_fp_chop_error2Kesme hucrelerinin maksimum izin verilen bukulmesi
textord_tabfind_show_images0Show image blobs
textord_skewsmooth_offset4Düzgün faktör icin
textord_skewsmooth_offset21Düzgün faktör icin
textord_test_x-2147483647coord of test pt
textord_test_y-2147483647coord of test pt
textord_min_blobs_in_row4Gradyan sayılmadan önceki minimum damlacıklar
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
textord_min_xheight10Min credible pixel xheight
textord_lms_line_trials12Number of linew fits to do
oldbl_holed_losscount10Max lost before fallback line used
pitsync_linear_version6Use new fast algorithm
pitsync_fake_depth1Max advance fake generation
textord_tabfind_show_strokewidths0Show stroke widths
textord_dotmatrix_gap3Max pixel gap for broken pixed pitch
textord_debug_block0Block to do debug on
textord_pitch_range2Max 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
poly_debug0Debug old poly
poly_wide_objects_better1More accurate approx on wide things
wordrec_display_splits0Display splits
textord_debug_printable0Make debug windows printable
textord_space_size_is_variable0If 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
devanagari_split_debugimage0Whether 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
textord_heavy_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
textord_test_landscape0Tests refer to land/port
textord_parallel_baselines1Force parallel baselines
textord_straight_baselines0Force straight baselines
textord_old_baselines1
textord_old_xheight0Use old xheight algorithm
textord_fix_xheight_bug1Use spline baseline
textord_fix_makerow_bug1Prevent multiple baselines
textord_debug_xheights0Test xheight algorithms
textord_biased_skewcalc1Bias skew estimates with line length
textord_interpolating_skew1Interpolate across gaps
textord_new_initial_xheight1Use test xheight mechanism
textord_debug_blob0Print test blob information
textord_really_old_xheight0Use 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_all_prop
textord_debug_pitch_test
textord_disable_pitch_test
textord_fast_pitch_test
textord_debug_pitch_metric
textord_show_row_cuts
textord_show_page_cuts
textord_pitch_cheat
textord_blockndoc_sabit
textord_göster_başlangıç_kelimeri
textord_göster_yeni_kelimeri
textord_göster_sabit_kelimeri
textord_blocksall_sabit
textord_blocksall_prop
textord_blocksall_test
textord_test_modu
textord_pitch_satırsimilarlığı
kelimeler_haftalık_küçültmek
kelimeler_haftalık_büyütmek
kelimeler_varsayılan_prop_boşluksuz
kelimeler_varsayılan_sabit_boşluk
kelimeler_varsayılan_sabit_limit
textord_kelimeler_kesin_yayılım
textord_boyut_oran_fp
textord_boyut_oranı_prop
textord_fpiqr_oranı
textord_max_pitch_iqr
textord_fp_min_gan
textord_altçizgi_ofset
ambigs_hata_ayolama_seviyesi
siniflandir_hata_ayolama_seviyesi
sınıflandırma_norm_yöntem
eşleştir_hata_ayolama_seviyesi
eşleştir_hata_ayolama_bayrakları
sınıflandırma_öğrenme_hata_ayolama_seviyesi
eşleştir_kalıcı_sınıflar_min
eşleştir_minörnekler_ prototipleme için
eşleştir_yeterli_ornekler_ prototipleme için
sınıflandırma_uyarlanabilir_proto_eşik
sınıflandırma_uyarlanabilir_özellik_eşik
sınıflandırma_sınıf_budayıcı_eşik
sınıflandırma_sınıf_budayıcı_çarpan
sınıflandırma_cp_kesme_gücü
sınıflandırma_tam_sayı_eşleştirici_çarpan
dawg_hata_ayolama_seviyesi
tire_hata_ayolama_seviyesi
durdurucu_küçük_kelime_boyutu
durdurucu_hata_ayolama_seviyesi
tessedit_kelime_seçimi_logunu_kısalt
maks_permutator_girişimleri
tamir_et_hatalı_parçalanmamış_karakterler
chop_hata_ayolama
chop_bölünme_uzunluğu
chop_aynı_uzaklık
chop_min_çevre_noktaları
chop_dikiş_yığın_boyu
chop_iç_açı
chop_min_çevre_alanı
chop_ortalanmış_maksimum genişlik
chop_x_y_ağırlık
wordrec_hata_ayolama_seviyesi
wordrec_max_birleşim_küçükleri
segsearch_hata_ayolama_seviyesi
segsearch_max_acı_puanları
segsearch_max_futile_classifications20Maximum number of pain point classifications per chunk that did not result in finding a better word choice.
dil_modeli_hata_ayolama_seviyesi
dil_modeli_ngram_sırası
dil_modeli_viterbi_listesi_ maksimum_budanan_sayı
dil_modeli_viterbi_listesi_max_boy
dil_modeli_min_bileşik_uzunluk
wordrec_segmentasyonları_göster
tessedit_pageseg_modu
tessedit_ocr_motor_modu
pageseg_devanagari_bölme_stratejisi
ocr_devanagari_bölme_stratejisi
iki_tön_hata_ayolama
uygulamak_ilki_hata_ayolama
uygulamak_ilki_sayfa
tessedit_ikili_hata_ayolama
hata_ayolama_gürültü_çıkarma
gürültü_maxperblob
gürültü_maxperword
hata_ayolama_x_ht_seviyesi
kalite_min_başlangıç_alfabeler_gerekiyor
tessedit_tess_uyarlama_modu
çoklu_dil_hata_ayolama_seviyesi
paragraf_hata_ayolama_seviyesi
tessedit_min_wd_len_korur
crunch_ortalama_max
crunch_saklamak_göstergeleri
crunch_küçük_harf_strikleri_bırak
crunch_büyük_harf_strikleri_bırak
Büyük harf dizgilerini sıkıştırma
crunch_debug0As it says
fixsp_olmayan_gürültü_limit
fixsp_yapılmış_modu
hata_ayolama_fix_space_seviyesi
x_ht_kabul_toleransı
x_ht_min_değişiklik
üstü_hata_ayolama
jpg_kalite
kullanıcı_tanımlı_dpi
denemeye_küçük_karakterler_min
suspect_level99Suspect marker level
suspect_short_words2Don't suspect dict wds longer than this
tessedit_reject_modu
tessedit_resim_kenar
min_makul_x_ht_piksel
tessedit_sayfa_numarası
tessedit_parallelize
lstm_seçim_modu
lstm_seçim_iterations
tosp_hata_ayolama_seviyesi
tosp_enough_space_samples_for_median
tosp_redo_kern_limit
tosp_few_samples
tosp_short_row
tosp_sanity_method
textord_max_noise_size
textord_baseline_debug
textord_noise_sizefraction
textord_noise_translimit
textord_noise_sncount
use_ambigs_for_adaption
öncelikli_bölme
sınıflandırmayı_öğrenmeyi_etkinleştir
tess_cn_eşleşmesi
tess_bn_eşleşmesi
sınıflandırmayı_adaptive_eşleşmeyle_etkinleştir
önceden_adapte_edilmiş_şablonlar_kullan
adapte_edilmiş_şablonları_kaydet
adaptif_hata_ayıklayıcıyı_etkinleştir
sınıflandırmayı_doğrusal_olmayan_norm_etkinleştir
disable_character_fragments1Do not include character fragments in the results of the classifier
sınıflandırma_karakter_parçalarını_hata_tespitle_debug_kullan
eşleştirici_hata_ayıklama_ayrı_pencereler
sayı_modlu_sınınfılandırma_bln
sistem_dawg_yükle
frekans_dawg_yükle
açık_çözüm_dawg_yükle
nokta_dawg_yükle
sayı_dawg_yükle
ikili_dawg_yükle
yalnızca_ilk_uft8_adımını_kullan
durdurucu_kabul_edilebilir_seçenekler_yok
alfabetik_olmayan_senaryo_segmenti
belge_kelimesini_kaydet
matrikste_parçaları_birleştir
wordrec_birliği_etkinleştir
kelime_birliği_zorunlu
kırma_etkinleştir
kesme_dikey_yavaş_ilerleme
kesme_yeni_dikiş_yığını
sabit_adım_karakter_segmenti_varsay
wordrec_doğru_sözcükleri_olmayan_atla
wordrec_blamer_debug_kullan
wordrec_blamer_çalıştır
kaydet_alt_secimleri
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.
language_model_ngram_space_ delimited_language
dil_modeli_sigmoidal_kesinliği_kullan
tessedit_kutuyla_yeniden_segment
tessedit_satır_kutuları_ile_yeniden_segment
tessedit_kutularla_eğit
tessedit_kutularla_kutular_yap
tessedit_satır_tanıma_eğit
tessedit_sayfa_bölme_görüntülerini_dök
tessedit_tersine_çevir
tessedit_çift_anlam_hataları_eğitimi
tessedit_adapte_şablon_debug
kutu_uygula_karakter_ve_parçalarını_öğren_modu
kutu_uygula_ngrams_modu_öğren
tessedit_çıktı_sözcükleri_görüntüle
tessedit_seçimleri_dök
tessedit_zamanlama_debug
tessedit_belirsizlikli_boşlukları_düzelt
tessedit_herhangi_düşürülmüş_sözcüğü_kabul_et_tek
tessedit_tireleri_düzelt
tessedit_belge_sözlüğünü_etkinleştir
tessedit_font_hatalarını_debug_kullan
tessedit_blok_reddetmesini_debug_kullan
tessedit_ikili_kelime_düzeltmektedir_etkinleştir
tessedit_sözlük_düzeltmesini_etkinleştir
gürültü_giderme_etkinleştir
tessedit_asgari_rdd_pas1
tessedit_adapteyi_test_et
test_et
paragraf_metni_tabanli
lstm_kullan_matrisi
tessedit_iyi_kalite_basarisizliklari
tessedit_alanlari_reddet_kullan
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_bilgisi
hocr_karakter_kutuları
tess_erken_birleştirme_hataları_kes
kötü_unlv_chs_çevrimini_katıl
korkunç_çöp_tess_katıl
iyi_dizeler_öğütmek
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_sözlük_kelime_kullan
rej_1Il_trust_permuter_type1Don't double check
tes_ad_opts_kullan
tes_boşlukaları_kullan
rej_iyi_perm_kullan
anlamlı_sözcük_kullan
rej_sayı_perminde_alfalar
tessedit_kutuyla_dosyası_oluştur
tessedit_resimleri_yaz
etkileşimli_görüntü_modu
tessedit_permuteri_override
tessedit_uyumlu_para_modelinc_kullan
textord_tabfind_vlines_göster
textord_cjk_fp_modelini_kullan
poly_detailed_fx_izin_kullan
tessedit_yalnızca_config_init
textord_denklem_algıla
textord_tabfind_dikey_metin
textord_tabfind_zorunlu_dikey_metin
kelime_arası_boşlukları_koru
sayfa_segment_apply_müzik_maskesi
textord_tek_yükseklik_modu
tosp_eski_yöntem
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_show_blobs
textord_show_boxes
textord_noise_rejwords
textord_noise_rejrows
textord_noise_debug
classify_learn_debug_str
user_words_file
user_words_suffix
user_patterns_file
user_patterns_suffix
output_ambig_words_file
word_to_debug
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_odd%|Standart dışı kontur sayısı
outlines_2ij!?%":;Standart dışı kontur sayısı
numeric_punctuation.,Punct. chs expected WITHIN numbers
unrecognised_char|Output char for unidentified blobs
ok_repeated_ch_non_alphanum_wds-?*=Allow NN to unrej
conflict_set_I_l_1Il1 []Il1 conflict set
file_type.tifFilename extension
tessedit_load_sublangsList of languages to load with this one
page_separator
classify_char_norm_range
classify_max_rating_ratio
classify_max_certainty_margin
matcher_good_threshold
matcher_reliable_adaptive_result
matcher_perfect_threshold
matcher_bad_match_pad
matcher_rating_margin
matcher_avg_noise_size
matcher_clustering_max_angle_delta
classify_misfit_junk_penalty
rating_scale
certainty_scale
tessedit_class_miss_scale
classify_adapted_pruning_factor
classify_adapted_pruning_threshold
classify_character_fragments_ çöp kesinlik eşiği
speckle_large_max_size
speckle_rating_penalty
xheight_penalty_subscripts
xheight_penalty_inconsistent
segment_penalty_dict_frequent_word
segment_penalty_dict_case_ok
segment_penalty_dict_case_bad
segment_penalty_dict_nonword
certainty_scale20Certainty 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_certainty_threshold
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

En iyi sonuçlar için, OCR uygulamadan önce IronOCR'un görüntü ön işleme filtreleri kullanılması önerilir. Bu filtreler, özellikle düşük kalite taramalar veya tablolar gibi karmaşık belgelerle çalışırken doğruluğu önemli ölçüde artırabilir.

Sıkça Sorulan Sorular

C#'da OCR için IronTesseract nasıl yapılandırılır?

IronTesseract'i yapılandırmak için bir IronTesseract örneği oluşturun ve Dil ve Konfigürasyon gibi özellikleri ayarlayın. OCR dilini belirtebilirsiniz (125 desteklenen dilden), barkod okuma etkinleştirilebilir, aranabilir PDF çıktı konfigüre edilebilir ve karakter beyaz listeye alınabilir. Örneğin: var tesseract = new IronOcr.IronTesseract { Language = IronOcr.OcrLanguage.English, Configuration = new IronOcr.TesseractConfiguration { ReadBarCodes = false, RenderSearchablePdf = true } };

IronTesseract hangi girdi formatlarını destekler?

IronTesseract, OcrInput sınıfı aracılığıyla çeşitli giriş formatlarını kabul eder. Görüntüleri (PNG, JPG, vb.), PDF dosyalarını ve taranmış belgeleri işleyebilirsiniz. OcrInput sınıfı, bu farklı formatların yüklenmesi için esnek yöntemler sunar, böylece metin içeren hemen her belge üzerinde OCR işlemi yapmayı kolaylaştırır.

IronTesseract ile metin yanında barkodları okuyabilir miyim?

Evet, IronTesseract gelişmiş barkod okuma yeteneklerini içerir. TesseractConfiguration'da ReadBarCodes = true ayarlayarak barkod algılamayı etkinleştirebilirsiniz. Bu, aynı belgeden hem metin hem de barkod verilerini çıkarmanıza olanak tanır.

Taranmış belgelerden aranabilir PDF'leri nasıl oluşturabilirim?

IronTesseract, TesseractConfiguration'da RenderSearchablePdf = true ayarlanarak taranmış belgeleri ve görüntüleri aranabilir PDF'lere dönüştürebilir. Bu, metnin seçilebilir ve aranabilir olduğu, ancak orijinal belge görünümünü koruyan PDF dosyaları oluşturur.

IronTesseract, OCR için hangi dilleri destekler?

IronTesseract, metin tanıma için 125 uluslararası dili destekler. Dili, IronTesseract örneğinizdeki Dil özelliğini ayarlayarak belirtebilirsiniz, örneğin IronOcr.OcrLanguage.English, İspanyolca, Çince, Arapça ve daha birçokları.

OCR sırasında hangi karakterlerin tanındığını kısıtlayabilir miyim?

Evet, IronTesseract, TesseractConfiguration'daki WhiteListCharacters özelliği aracılığıyla karakterleri beyaz/siyah listeye almanıza olanak tanır. Bu özellik, beklenen karakter kümesini bildiğinizde, örneğin tanımayı yalnızca alfanümerik karakterlerle sınırlamak gibi, doğruluğu artırmaya yardımcı olur.

Birden fazla belgede eşzamanlı OCR işlemini nasıl yaparım?

IronTesseract, toplu işleme için çoklu iş parçalama yeteneklerini destekler. Büyük miktarda görüntü veya PDF ile çalışırken performansı önemli ölçüde artıran eşzamanlı olarak birçok belgede eşzamanlı OCR yapmasını sağlamak için paralel işlemeyi kullanabilirsiniz.

IronOCR hangi Tesseract sürümünü kullanıyor?

IronOCR, Iron Tesseract olarak bilinen, Tesseract 5'in özelleştirilmiş ve optimize edilmiş bir sürümünü kullanır. Bu gelişmiş motor, standart Tesseract uygulamalarına kıyasla geliştirilmiş doğruluk ve performans sağlar ve .NET uygulamaları ile uyumluluğu sürdürür.

Curtis Chau
Teknik Yazar

Curtis Chau, Bilgisayar Bilimleri alanında lisans derecesine sahiptir (Carleton Üniversitesi) ve Node.js, TypeScript, JavaScript ve React konularında uzmanlaşmış ön uç geliştirme üzerine uzmanlaşmıştır. Kullanıcı dostu ve estetik açıdan hoş arayüzler tasarlamaya tutkuyla bağlı olan Curtis, modern çerç...

Daha Fazlasını Oku
İnceleyen
Jeff Fritz
Jeffrey T. Fritz
Baş Program Yöneticisi - .NET Topluluk Ekibi
Jeff, aynı zamanda .NET ve Visual Studio ekipleri için Baş Program Yöneticisi'dir. Microsoft geliştirici etkinlikleri (Microsoft Build, Microsoft Ignite, .NET Conf, Microsoft MVP Summit) için atölye çalışmaları, sunumlar yazar ve içerik planlar ve haftada iki kez yayınlanan 'Fritz ve Arkadaşları' canlı yayınının ev sahibidir.
Başlamaya Hazır mısınız?
Nuget İndirmeler 5,585,834 | Sürüm: 2026.4 just released
Still Scrolling Icon

Hala Kaydiriyor musunuz?

Hızlı bir kanit mi istiyorsunuz? PM > Install-Package IronOcr
örnekleri çalıştır resminizin aranabilir metne donuşünü izleyin.