-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
fixSomething works, but is uglySomething works, but is ugly
Description
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
Labels
fixSomething works, but is uglySomething works, but is ugly