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.
In the future it might be useful to load these values from an external file which the user can edit (if needed).
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.
In the future it might be useful to load these values from an external file which the user can edit (if needed).