mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 11:12:36 +01:00
Update Tesseract OCR to 5.3.1
This commit is contained in:
parent
77344c4e85
commit
017cf8026e
@ -24,7 +24,7 @@ namespace Nikse.SubtitleEdit.Core.Common
|
|||||||
public static readonly string ShotChangesDirectory = DataDirectory + "ShotChanges" + Path.DirectorySeparatorChar;
|
public static readonly string ShotChangesDirectory = DataDirectory + "ShotChanges" + Path.DirectorySeparatorChar;
|
||||||
public static readonly string AutoBackupDirectory = DataDirectory + "AutoBackup" + Path.DirectorySeparatorChar;
|
public static readonly string AutoBackupDirectory = DataDirectory + "AutoBackup" + Path.DirectorySeparatorChar;
|
||||||
public static readonly string VobSubCompareDirectory = DataDirectory + "VobSub" + Path.DirectorySeparatorChar;
|
public static readonly string VobSubCompareDirectory = DataDirectory + "VobSub" + Path.DirectorySeparatorChar;
|
||||||
public static readonly string TesseractDirectory = DataDirectory + "Tesseract530" + Path.DirectorySeparatorChar;
|
public static readonly string TesseractDirectory = DataDirectory + "Tesseract531" + Path.DirectorySeparatorChar;
|
||||||
public static readonly string Tesseract302Directory = DataDirectory + "Tesseract302" + Path.DirectorySeparatorChar;
|
public static readonly string Tesseract302Directory = DataDirectory + "Tesseract302" + Path.DirectorySeparatorChar;
|
||||||
public static readonly string WaveformsDirectory = DataDirectory + "Waveforms" + Path.DirectorySeparatorChar;
|
public static readonly string WaveformsDirectory = DataDirectory + "Waveforms" + Path.DirectorySeparatorChar;
|
||||||
public static readonly string PluginsDirectory = DataDirectory + "Plugins";
|
public static readonly string PluginsDirectory = DataDirectory + "Plugins";
|
||||||
|
@ -10,7 +10,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
|
|||||||
{
|
{
|
||||||
public sealed partial class DownloadTesseract5 : Form
|
public sealed partial class DownloadTesseract5 : Form
|
||||||
{
|
{
|
||||||
public const string TesseractDownloadUrl = "https://github.com/SubtitleEdit/support-files/raw/master/Tesseract530.zip";
|
public const string TesseractDownloadUrl = "https://github.com/SubtitleEdit/support-files/raw/master/Tesseract531.zip";
|
||||||
private readonly CancellationTokenSource _cancellationTokenSource;
|
private readonly CancellationTokenSource _cancellationTokenSource;
|
||||||
|
|
||||||
public DownloadTesseract5(string version)
|
public DownloadTesseract5(string version)
|
||||||
|
@ -330,7 +330,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
|
|||||||
// Dictionaries/spellchecking/fixing
|
// Dictionaries/spellchecking/fixing
|
||||||
private OcrFixEngine _ocrFixEngine;
|
private OcrFixEngine _ocrFixEngine;
|
||||||
private int _tesseractOcrAutoFixes;
|
private int _tesseractOcrAutoFixes;
|
||||||
private string Tesseract5Version = "5.3.0";
|
private string Tesseract5Version = "5.3.1";
|
||||||
|
|
||||||
private Subtitle _bdnXmlOriginal;
|
private Subtitle _bdnXmlOriginal;
|
||||||
private Subtitle _bdnXmlSubtitle;
|
private Subtitle _bdnXmlSubtitle;
|
||||||
@ -7108,7 +7108,13 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
|
|||||||
checkBoxTesseractFallback.Text = string.Format(LanguageSettings.Current.VobSubOcr.FallbackToX, "Tesseract 3.02");
|
checkBoxTesseractFallback.Text = string.Format(LanguageSettings.Current.VobSubOcr.FallbackToX, "Tesseract 3.02");
|
||||||
if (Configuration.IsRunningOnWindows && !File.Exists(Path.Combine(Configuration.TesseractDirectory, "tesseract.exe")))
|
if (Configuration.IsRunningOnWindows && !File.Exists(Path.Combine(Configuration.TesseractDirectory, "tesseract.exe")))
|
||||||
{
|
{
|
||||||
if (MessageBox.Show($"{LanguageSettings.Current.GetTesseractDictionaries.Download} Tesseract {Tesseract5Version}", LanguageSettings.Current.General.Title, MessageBoxButtons.YesNoCancel) == DialogResult.Yes)
|
if (IntPtr.Size * 8 == 32)
|
||||||
|
{
|
||||||
|
MessageBox.Show("Sorry, Tesseract {Tesseract5Version} requires a 64-bit processor");
|
||||||
|
comboBoxOcrMethod.SelectedIndex = _ocrMethodBinaryImageCompare;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else if (MessageBox.Show($"{LanguageSettings.Current.GetTesseractDictionaries.Download} Tesseract {Tesseract5Version}", LanguageSettings.Current.General.Title, MessageBoxButtons.YesNoCancel) == DialogResult.Yes)
|
||||||
{
|
{
|
||||||
comboBoxTesseractLanguages.Items.Clear();
|
comboBoxTesseractLanguages.Items.Clear();
|
||||||
using (var form = new DownloadTesseract5(Tesseract5Version))
|
using (var form = new DownloadTesseract5(Tesseract5Version))
|
||||||
|
Loading…
Reference in New Issue
Block a user