Add pageseg_apply_music_mask option to allow disabling the music mask

This commit is contained in:
Nat 2019-10-23 16:01:31 -05:00
parent 048f729785
commit 52bc15acd9
3 changed files with 5 additions and 1 deletions

View File

@ -209,7 +209,7 @@ int Tesseract::AutoPageSeg(PageSegMode pageseg_mode, BLOCK_LIST* blocks,
ColumnFinder* finder = SetupPageSegAndDetectOrientation(
pageseg_mode, blocks, osd_tess, osr, &temp_blocks, &photomask_pix,
&musicmask_pix);
pageseg_apply_music_mask ? &musicmask_pix : nullptr);
int result = 0;
if (finder != nullptr) {
TO_BLOCK_IT to_block_it(&temp_blocks);

View File

@ -526,6 +526,8 @@ Tesseract::Tesseract()
"coefficient, the better are the ratings for each choice and less "
"information is lost due to the cut off at 0. The standard value is "
"5", this->params()),
BOOL_MEMBER(pageseg_apply_music_mask, true,
"Detect music staff and remove intersecting components", this->params()),
backup_config_file_(nullptr),
pix_binary_(nullptr),

View File

@ -1092,6 +1092,8 @@ class Tesseract : public Wordrec {
"the coefficient, the better are the ratings for each choice "
"and less information is lost due to the cut off at 0. The "
"standard value is 5.");
BOOL_VAR_H(pageseg_apply_music_mask, true,
"Detect music staff and remove intersecting components");
//// ambigsrecog.cpp /////////////////////////////////////////////////////////
FILE* init_recog_training(const STRING& fname);