diff --git a/prog/baseline_reg.c b/prog/baseline_reg.c index 0b081d473..51fcd5a15 100644 --- a/prog/baseline_reg.c +++ b/prog/baseline_reg.c @@ -104,7 +104,8 @@ L_REGPARAMS *rp; numaDestroy(&na); ptaDestroy(&pta); - /* Another test for baselines, with dark image */ + /* Another test for baselines, with dark image. + * With minw = 60, the number at the top of the page is skipped. */ pixadb = pixaCreate(6); pixs = pixRead("pedante.079.jpg"); /* 75 ppi */ pix1 = pixRemoveBorder(pixs, 30); @@ -120,7 +121,7 @@ L_REGPARAMS *rp; pixDestroy(&pix3); pixDestroy(&pix4); pix1 = pixDeskew(pix5, 2); - na = pixFindBaselines(pix1, &pta, pixadb); + na = pixFindBaselinesGen(pix1, 50, &pta, pixadb); regTestCompareValues(rp, 35, numaGetCount(na), 0); /* 9 */ pix2 = pixaDisplayTiledInRows(pixadb, 32, 1500, 1.0, 0, 30, 2); regTestWritePixAndCheck(rp, pix2, IFF_PNG); /* 10 */ diff --git a/src/baseline.c b/src/baseline.c index 55dbb050a..2ac8fbab5 100644 --- a/src/baseline.c +++ b/src/baseline.c @@ -301,7 +301,7 @@ PTA *pta; found = FALSE; for (j = 0; j < nbox; j++) { boxaGetBoxGeometry(boxa3, j, &bx, &by, &bw, &bh); - if (bh > 8 && L_ABS(locval - (by + bh)) <= 24) { + if (bh > 12 && L_ABS(locval - (by + bh)) <= 24) { ptaAddPt(pta, bx, locval); ptaAddPt(pta, bx + bw, locval); found = TRUE;