Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/app/DefaultParamsDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ DefaultParamsDialog::DefaultParamsDialog(QWidget* parent)
thresholdMethodBox->addItem(tr("Wolf"), T_WOLF);
thresholdMethodBox->addItem(tr("Bradley"), T_BRADLEY);
thresholdMethodBox->addItem(tr("Grad"), T_GRAD);
thresholdMethodBox->addItem(tr("EdgePlus"), T_EDGEPLUS);
thresholdMethodBox->addItem(tr("BlurDiv"), T_BLURDIV);
thresholdMethodBox->addItem(tr("EdgeDiv"), T_EDGEDIV);

pictureShapeSelector->addItem(tr("Off"), OFF_SHAPE);
Expand Down Expand Up @@ -670,8 +668,7 @@ std::unique_ptr<DefaultParams> DefaultParamsDialog::buildParams() const {
blackWhiteOptions.setBinarizationMethod(binarizationMethod);
blackWhiteOptions.setThresholdAdjustment(thresholdSlider->value());
blackWhiteOptions.setSauvolaCoef(sauvolaCoef->value());
if (binarizationMethod == T_SAUVOLA || binarizationMethod == T_BRADLEY || binarizationMethod == T_EDGEPLUS
|| binarizationMethod == T_BLURDIV || binarizationMethod == T_EDGEDIV) {
if (binarizationMethod == T_SAUVOLA || binarizationMethod == T_BRADLEY || binarizationMethod == T_EDGEDIV) {
blackWhiteOptions.setWindowSize(sauvolaWindowSize->value());
} else if (binarizationMethod == T_WOLF || binarizationMethod == T_GRAD) {
blackWhiteOptions.setWindowSize(wolfWindowSize->value());
Expand Down
2 changes: 1 addition & 1 deletion src/core/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void Application::initTranslations() {
#endif
const QStringList translationDirs(QString::fromUtf8(TRANSLATION_DIRS).split(QChar(':'), opt));

const QStringList languageFileFilter("scantailor_*.qm");
const QStringList languageFileFilter("scantailor-advanced_*.qm");
for (const QString& path : translationDirs) {
QDir dir = (QDir::isAbsolutePath(path)) ? QDir(path) : QDir::cleanPath(applicationDirPath() + '/' + path);
if (dir.exists()) {
Expand Down
10 changes: 0 additions & 10 deletions src/core/filters/output/BlackWhiteOptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,6 @@ BinarizationMethod BlackWhiteOptions::parseBinarizationMethod(const QString& str
return T_BRADLEY;
} else if (str == "grad") {
return T_GRAD;
} else if (str == "edgeplus") {
return T_EDGEPLUS;
} else if (str == "blurdiv") {
return T_BLURDIV;
} else if (str == "edgediv") {
return T_EDGEDIV;
} else {
Expand Down Expand Up @@ -115,12 +111,6 @@ QString BlackWhiteOptions::formatBinarizationMethod(BinarizationMethod type) {
case T_GRAD:
str = "grad";
break;
case T_EDGEPLUS:
str = "edgeplus";
break;
case T_BLURDIV:
str = "blurdiv";
break;
case T_EDGEDIV:
str = "edgediv";
break;
Expand Down
2 changes: 0 additions & 2 deletions src/core/filters/output/BlackWhiteOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ enum BinarizationMethod {
T_WINDOW,
T_BRADLEY,
T_GRAD,
T_EDGEPLUS,
T_BLURDIV,
T_EDGEDIV
};

Expand Down
8 changes: 0 additions & 8 deletions src/core/filters/output/OptionsWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ OptionsWidget::OptionsWidget(std::shared_ptr<Settings> settings, const PageSelec
thresholdMethodBox->addItem(tr("Window"), T_WINDOW);
thresholdMethodBox->addItem(tr("Bradley"), T_BRADLEY);
thresholdMethodBox->addItem(tr("Grad"), T_GRAD);
thresholdMethodBox->addItem(tr("EdgePlus"), T_EDGEPLUS);
thresholdMethodBox->addItem(tr("BlurDiv"), T_BLURDIV);
thresholdMethodBox->addItem(tr("EdgeDiv"), T_EDGEDIV);

fillingColorBox->addItem(tr("Background"), FILL_BACKGROUND);
Expand All @@ -63,10 +61,6 @@ OptionsWidget::OptionsWidget(std::shared_ptr<Settings> settings, const PageSelec
QPointer<OptionsWidgetBinarization> bradleyOptionsWidgetBinarization
= new OptionsWidgetBinarizationSauvola(m_settings);
QPointer<OptionsWidgetBinarization> gradOptionsWidgetBinarization = new OptionsWidgetBinarizationWolf(m_settings);
QPointer<OptionsWidgetBinarization> edgeplusOptionsWidgetBinarization
= new OptionsWidgetBinarizationSauvola(m_settings);
QPointer<OptionsWidgetBinarization> blurdivOptionsWidgetBinarization
= new OptionsWidgetBinarizationSauvola(m_settings);
QPointer<OptionsWidgetBinarization> edgedivOptionsWidgetBinarization
= new OptionsWidgetBinarizationSauvola(m_settings);

Expand All @@ -80,8 +74,6 @@ OptionsWidget::OptionsWidget(std::shared_ptr<Settings> settings, const PageSelec
addOptionsWidgetBinarization(windowOptionsWidgetBinarization);
addOptionsWidgetBinarization(bradleyOptionsWidgetBinarization);
addOptionsWidgetBinarization(gradOptionsWidgetBinarization);
addOptionsWidgetBinarization(edgeplusOptionsWidgetBinarization);
addOptionsWidgetBinarization(blurdivOptionsWidgetBinarization);
addOptionsWidgetBinarization(edgedivOptionsWidgetBinarization);
updateBinarizationOptionsDisplay(binarizationOptions->currentIndex());

Expand Down
16 changes: 0 additions & 16 deletions src/core/filters/output/OutputGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2374,22 +2374,6 @@ BinaryImage OutputGenerator::Processor::binarize(const QImage& image) const {
binarized = binarizeGrad(image, windowsSize, lowerBound, upperBound, thresholdCoef, thresholdDelta);
break;
}
case T_EDGEPLUS: {
const double thresholdDelta = blackWhiteOptions.thresholdAdjustment();
const QSize windowsSize = QSize(blackWhiteOptions.getWindowSize(), blackWhiteOptions.getWindowSize());
const double thresholdCoef = blackWhiteOptions.getSauvolaCoef();

binarized = binarizeEdgeDiv(image, windowsSize, thresholdCoef, 0.0, thresholdDelta);
break;
}
case T_BLURDIV: {
const double thresholdDelta = blackWhiteOptions.thresholdAdjustment();
const QSize windowsSize = QSize(blackWhiteOptions.getWindowSize(), blackWhiteOptions.getWindowSize());
const double thresholdCoef = blackWhiteOptions.getSauvolaCoef();

binarized = binarizeEdgeDiv(image, windowsSize, 0.0, thresholdCoef, thresholdDelta);
break;
}
case T_EDGEDIV: {
const double thresholdDelta = blackWhiteOptions.thresholdAdjustment();
const QSize windowsSize = QSize(blackWhiteOptions.getWindowSize(), blackWhiteOptions.getWindowSize());
Expand Down
Loading