Skip to content

Commit 03e546e

Browse files
committed
Update DLLs to Tesseract 5.2
1 parent bd2f395 commit 03e546e

File tree

14 files changed

+17
-17
lines changed

14 files changed

+17
-17
lines changed

src/Tesseract.Net48Tests/Tesseract.Net48Tests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,13 +194,13 @@
194194
<None Include="..\Tesseract\x64\leptonica-1.82.0.dll" Link="x64\leptonica-1.82.0.dll">
195195
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
196196
</None>
197-
<None Include="..\Tesseract\x64\tesseract50.dll" Link="x64\tesseract50.dll">
197+
<None Include="..\Tesseract\x64\tesseract52.dll" Link="x64\tesseract52.dll">
198198
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
199199
</None>
200200
<None Include="..\Tesseract\x86\leptonica-1.82.0.dll" Link="x86\leptonica-1.82.0.dll">
201201
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
202202
</None>
203-
<None Include="..\Tesseract\x86\tesseract50.dll" Link="x86\tesseract50.dll">
203+
<None Include="..\Tesseract\x86\tesseract52.dll" Link="x86\tesseract52.dll">
204204
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
205205
</None>
206206
</ItemGroup>

src/Tesseract.NetCore31Tests/Tesseract.NetCore31Tests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,13 @@
192192
<None Include="..\Tesseract\x64\leptonica-1.82.0.dll" Link="x64\leptonica-1.82.0.dll">
193193
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
194194
</None>
195-
<None Include="..\Tesseract\x64\tesseract50.dll" Link="x64\tesseract50.dll">
195+
<None Include="..\Tesseract\x64\tesseract52.dll" Link="x64\tesseract52.dll">
196196
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
197197
</None>
198198
<None Include="..\Tesseract\x86\leptonica-1.82.0.dll" Link="x86\leptonica-1.82.0.dll">
199199
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
200200
</None>
201-
<None Include="..\Tesseract\x86\tesseract50.dll" Link="x86\tesseract50.dll">
201+
<None Include="..\Tesseract\x86\tesseract52.dll" Link="x86\tesseract52.dll">
202202
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
203203
</None>
204204
</ItemGroup>

src/Tesseract.Tests/BaseApiTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class BaseApiTests
1111
public void CanGetVersion()
1212
{
1313
var version = Interop.TessApi.BaseApiGetVersion();
14-
Assert.That(version, Does.StartWith("5.0.0"));
14+
Assert.That(version, Does.StartWith("5.2.0"));
1515
}
1616
}
1717
}

src/Tesseract.Tests/EngineTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using NUnit.Framework;
1+
using NUnit.Framework;
22
using System;
33
using System.Collections.Generic;
44
using System.Drawing;
@@ -20,7 +20,7 @@ public void CanGetVersion()
2020
{
2121
using (var engine = CreateEngine())
2222
{
23-
Assert.That(engine.Version, Does.StartWith("5.0.0"));
23+
Assert.That(engine.Version, Does.StartWith("5.2.0"));
2424
}
2525
}
2626

@@ -71,7 +71,7 @@ public void CanParseMultipageTifOneByOne()
7171
[TestCase(PageSegMode.SingleColumn, "This is a lot of 12 point text to test the")]
7272
[TestCase(PageSegMode.SingleLine, "This is a lot of 12 point text to test the")]
7373
[TestCase(PageSegMode.SingleWord, "This")]
74-
[TestCase(PageSegMode.SingleChar, "T")]
74+
[TestCase(PageSegMode.SingleChar, "hl")]
7575
[TestCase(PageSegMode.SingleBlockVertText, "A line of text", Ignore = "#490")]
7676
public void CanParseText_UsingMode(PageSegMode mode, String expectedText)
7777
{
@@ -135,7 +135,7 @@ public void CanProcessBitmap()
135135
var text = page.GetText();
136136

137137
const string expectedText =
138-
"This is a lot of 12 point text to test the\nocr code and see if it works on all types\nof file format.\n\nThe quick brown dog jumped over the\nlazy fox. The quick brown dog jumped\nover the lazy fox. The quick brown dog\njumped over the lazy fox. The quick\nbrown dog jumped over the lazy fox.\n";
138+
"This is a lot of 12 point text to test the\nocr code and see if it works on all types\nof file format.\n\nThe quick brown dog jumped over the\n\nlazy fox. The quick brown dog jumped\nover the lazy fox. The quick brown dog\njumped over the lazy fox. The quick\nbrown dog jumped over the lazy fox.\n\n";
139139

140140
Assert.That(text, Is.EqualTo(expectedText));
141141
}

src/Tesseract.Tests/Results/EngineTests/CanPrintVariables.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ tessedit_train_from_boxes 0 Generate training data from boxed chars
339339
tessedit_make_boxes_from_boxes 0 Generate more boxes from boxed chars
340340
tessedit_train_line_recognizer 0 Break input into lines and remap boxes if present
341341
tessedit_dump_pageseg_images 0 Dump intermediate images made during page segmentation
342-
tessedit_do_invert 1 Try inverting the image in `LSTMRecognizeWord`
342+
tessedit_do_invert 1 Try inverted line image if necessary (deprecated, will be removed in release 6, use the 'invert_threshold' parameter instead)
343343
thresholding_debug 0 Debug the thresholding process
344344
tessedit_ambigs_training 0 Perform training for ambiguities
345345
tessedit_adaption_debug 0 Generate and print debug information for adaption
@@ -488,7 +488,6 @@ matcher_avg_noise_size 12 Avg. noise blob length
488488
matcher_clustering_max_angle_delta 0.015 Maximum angle delta for prototype clustering
489489
classify_misfit_junk_penalty 0 Penalty to apply when a non-alnum is vertically out of its expected textline position
490490
rating_scale 1.5 Rating scaling factor
491-
certainty_scale 20 Certainty scaling factor
492491
tessedit_class_miss_scale 0.00390625 Scale factor for features not used
493492
classify_adapted_pruning_factor 2.5 Prune poor adapted results this much worse than best result
494493
classify_adapted_pruning_threshold -1 Threshold at which classify_adapted_pruning_factor starts
@@ -531,11 +530,12 @@ language_model_penalty_chartype 0.3 Penalty for inconsistent character type
531530
language_model_penalty_font 0 Penalty for inconsistent font
532531
language_model_penalty_spacing 0.05 Penalty for inconsistent spacing
533532
language_model_penalty_increment 0.01 Penalty increment
534-
thresholding_window_size 0.33 Window size for measuring local statistics (to be multiplied by image DPI). This parameter is used by the Sauvola thresolding method
535-
thresholding_kfactor 0.34 Factor for reducing threshold due to variance. This parameter is used by the Sauvola thresolding method. Normal range: 0.2-0.5
536-
thresholding_tile_size 0.33 Desired tile size (to be multiplied by image DPI). This parameter is used by the LeptonicaOtsu thresolding method
537-
thresholding_smooth_kernel_size 0 Size of convolution kernel applied to threshold array (to be multiplied by image DPI). Use 0 for no smoothing. This parameter is used by the LeptonicaOtsu thresolding method
538-
thresholding_score_fraction 0.1 Fraction of the max Otsu score. This parameter is used by the LeptonicaOtsu thresolding method. For standard Otsu use 0.0, otherwise 0.1 is recommended
533+
invert_threshold 0.7 For lines with a mean confidence below this value, OCR is also tried with an inverted image
534+
thresholding_window_size 0.33 Window size for measuring local statistics (to be multiplied by image DPI). This parameter is used by the Sauvola thresholding method
535+
thresholding_kfactor 0.34 Factor for reducing threshold due to variance. This parameter is used by the Sauvola thresholding method. Normal range: 0.2-0.5
536+
thresholding_tile_size 0.33 Desired tile size (to be multiplied by image DPI). This parameter is used by the LeptonicaOtsu thresholding method
537+
thresholding_smooth_kernel_size 0 Size of convolution kernel applied to threshold array (to be multiplied by image DPI). Use 0 for no smoothing. This parameter is used by the LeptonicaOtsu thresholding method
538+
thresholding_score_fraction 0.1 Fraction of the max Otsu score. This parameter is used by the LeptonicaOtsu thresholding method. For standard Otsu use 0.0, otherwise 0.1 is recommended
539539
noise_cert_basechar -8 Hingepoint for base char certainty
540540
noise_cert_disjoint -1 Hingepoint for disjoint certainty
541541
noise_cert_punc -3 Threshold for new punc char certainty

src/Tesseract/Interop/Constants.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Tesseract.Interop
88
internal static class Constants
99
{
1010
public const string LeptonicaDllName = "leptonica-1.82.0";
11-
public const string TesseractDllName = "tesseract50";
11+
public const string TesseractDllName = "tesseract52";
1212

1313
// tesseract uses an int to represent true false values.
1414
public const int TRUE = 1;
60 KB
Binary file not shown.

src/Tesseract/x64/tesseract.exe

-2.15 MB
Binary file not shown.

src/Tesseract/x64/tesseract50.dll

-2.66 MB
Binary file not shown.

src/Tesseract/x64/tesseract52.dll

2.61 MB
Binary file not shown.

0 commit comments

Comments
 (0)