Skip to content

Put configuration values together #19

@klanderfri

Description

@klanderfri

The program has literals that are of a configurative nature. Regard the code below:
do {
threshold(workOriginal, binaryImage, binaryThreshold, 255, THRESH_BINARY);
binaryThreshold -= 20;
} while (!ImageHelper::IsBlackTextWhiteBackground(binaryImage) && binaryThreshold > 0);

The 255 and the 0 are literals, and should be so. The 20 however might need to be changed in the future since it is a literal that might need to be configured.

  • Compile all configurative values in one single class.

In the future it might be useful to load these values from an external file which the user can edit (if needed).

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixSomething works, but is ugly

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions