66 #include "allheaders.h" 71 static const l_int32 MIN_COMPS_FOR_BIN_SORT = 200;
103 PROCNAME(
"boxaTransform");
106 return (
BOXA *)ERROR_PTR(
"boxas not defined", procName, NULL);
109 return (
BOXA *)ERROR_PTR(
"boxad not made", procName, NULL);
110 for (i = 0; i < n; i++) {
113 return (
BOXA *)ERROR_PTR(
"boxs not found", procName, NULL);
115 boxd =
boxTransform(boxs, shiftx, shifty, scalex, scaley);
147 PROCNAME(
"boxTransform");
150 return (
BOX *)ERROR_PTR(
"box not defined", procName, NULL);
151 if (box->
w <= 0 || box->
h <= 0)
154 return boxCreate((l_int32)(scalex * (box->
x + shiftx) + 0.5),
155 (l_int32)(scaley * (box->
y + shifty) + 0.5),
156 (l_int32)(L_MAX(1.0, scalex * box->
w + 0.5)),
157 (l_int32)(L_MAX(1.0, scaley * box->
h + 0.5)));
212 PROCNAME(
"boxaTransformOrdered");
215 return (
BOXA *)ERROR_PTR(
"boxas not defined", procName, NULL);
218 return (
BOXA *)ERROR_PTR(
"boxad not made", procName, NULL);
219 for (i = 0; i < n; i++) {
222 return (
BOXA *)ERROR_PTR(
"boxs not found", procName, NULL);
225 xcen, ycen, angle, order);
298 l_int32 bx, by, bw, bh, tx, ty, tw, th;
299 l_int32 xcent, ycent;
300 l_float32 sina, cosa, xdif, ydif, rx, ry, rw, rh;
303 PROCNAME(
"boxTransformOrdered");
306 return (
BOX *)ERROR_PTR(
"boxs not defined", procName, NULL);
309 return (
BOX *)ERROR_PTR(
"order invalid", procName, NULL);
312 if (bw <= 0 || bh <= 0)
320 tx = (l_int32)(scalex * (bx + shiftx) + 0.5);
321 ty = (l_int32)(scaley * (by + shifty) + 0.5);
322 tw = (l_int32)(L_MAX(1.0, scalex * bw + 0.5));
323 th = (l_int32)(L_MAX(1.0, scaley * bh + 0.5));
324 xcent = (l_int32)(scalex * xcen + 0.5);
325 ycent = (l_int32)(scaley * ycen + 0.5);
329 xdif = tx + 0.5 * tw - xcent;
330 ydif = ty + 0.5 * th - ycent;
331 rw = L_ABS(tw * cosa) + L_ABS(th * sina);
332 rh = L_ABS(th * cosa) + L_ABS(tw * sina);
333 rx = xcent + xdif * cosa - ydif * sina - 0.5 * rw;
334 ry = ycent + ydif * cosa + xdif * sina - 0.5 * rh;
335 boxd =
boxCreate((l_int32)rx, (l_int32)ry, (l_int32)rw,
339 tx = (l_int32)(scalex * bx + shiftx + 0.5);
340 ty = (l_int32)(scaley * by + shifty + 0.5);
341 tw = (l_int32)(L_MAX(1.0, scalex * bw + 0.5));
342 th = (l_int32)(L_MAX(1.0, scaley * bh + 0.5));
343 xcent = (l_int32)(scalex * xcen + 0.5);
344 ycent = (l_int32)(scaley * ycen + 0.5);
348 xdif = tx + 0.5 * tw - xcent;
349 ydif = ty + 0.5 * th - ycent;
350 rw = L_ABS(tw * cosa) + L_ABS(th * sina);
351 rh = L_ABS(th * cosa) + L_ABS(tw * sina);
352 rx = xcent + xdif * cosa - ydif * sina - 0.5 * rw;
353 ry = ycent + ydif * cosa + xdif * sina - 0.5 * rh;
354 boxd =
boxCreate((l_int32)rx, (l_int32)ry, (l_int32)rw,
364 xdif = bx + 0.5 * bw - xcen;
365 ydif = by + 0.5 * bh - ycen;
366 rw = L_ABS(bw * cosa) + L_ABS(bh * sina);
367 rh = L_ABS(bh * cosa) + L_ABS(bw * sina);
368 rx = xcen + xdif * cosa - ydif * sina - 0.5 * rw;
369 ry = ycen + ydif * cosa + xdif * sina - 0.5 * rh;
371 tx = (l_int32)(scalex * (rx + shiftx) + 0.5);
372 ty = (l_int32)(scaley * (ry + shifty) + 0.5);
373 tw = (l_int32)(L_MAX(1.0, scalex * rw + 0.5));
374 th = (l_int32)(L_MAX(1.0, scaley * rh + 0.5));
383 xdif = bx + 0.5 * bw - xcen;
384 ydif = by + 0.5 * bh - ycen;
385 rw = L_ABS(bw * cosa) + L_ABS(bh * sina);
386 rh = L_ABS(bh * cosa) + L_ABS(bw * sina);
387 rx = xcen + xdif * cosa - ydif * sina - 0.5 * rw;
388 ry = ycen + ydif * cosa + xdif * sina - 0.5 * rh;
390 tx = (l_int32)(scalex * rx + shiftx + 0.5);
391 ty = (l_int32)(scaley * ry + shifty + 0.5);
392 tw = (l_int32)(L_MAX(1.0, scalex * rw + 0.5));
393 th = (l_int32)(L_MAX(1.0, scaley * rh + 0.5));
404 xdif = tx + 0.5 * bw - xcen;
405 ydif = ty + 0.5 * bh - ycen;
406 rw = L_ABS(bw * cosa) + L_ABS(bh * sina);
407 rh = L_ABS(bh * cosa) + L_ABS(bw * sina);
408 rx = xcen + xdif * cosa - ydif * sina - 0.5 * rw;
409 ry = ycen + ydif * cosa + xdif * sina - 0.5 * rh;
411 tx = (l_int32)(scalex * rx + 0.5);
412 ty = (l_int32)(scaley * ry + 0.5);
413 tw = (l_int32)(L_MAX(1.0, scalex * rw + 0.5));
414 th = (l_int32)(L_MAX(1.0, scaley * rh + 0.5));
417 tx = (l_int32)(scalex * bx + 0.5);
418 ty = (l_int32)(scaley * by + 0.5);
419 tw = (l_int32)(L_MAX(1.0, scalex * bw + 0.5));
420 th = (l_int32)(L_MAX(1.0, scaley * bh + 0.5));
421 xcent = (l_int32)(scalex * xcen + 0.5);
422 ycent = (l_int32)(scaley * ycen + 0.5);
429 xdif = tx + 0.5 * tw - xcent;
430 ydif = ty + 0.5 * th - ycent;
431 rw = L_ABS(tw * cosa) + L_ABS(th * sina);
432 rh = L_ABS(th * cosa) + L_ABS(tw * sina);
433 rx = xcent + xdif * cosa - ydif * sina - 0.5 * rw;
434 ry = ycent + ydif * cosa + xdif * sina - 0.5 * rh;
436 tx = (l_int32)(rx + shiftx + 0.5);
437 ty = (l_int32)(ry + shifty + 0.5);
438 tw = (l_int32)(rw + 0.5);
439 th = (l_int32)(rh + 0.5);
471 PROCNAME(
"boxaRotateOrth");
474 return (
BOXA *)ERROR_PTR(
"boxas not defined", procName, NULL);
475 if (rotation < 0 || rotation > 3)
476 return (
BOXA *)ERROR_PTR(
"rotation not in {0,1,2,3}", procName, NULL);
482 return (
BOXA *)ERROR_PTR(
"boxad not made", procName, NULL);
483 for (i = 0; i < n; i++) {
486 return (
BOXA *)ERROR_PTR(
"boxs not found", procName, NULL);
519 l_int32 bx, by, bw, bh, xdist, ydist;
521 PROCNAME(
"boxRotateOrth");
524 return (
BOX *)ERROR_PTR(
"box not defined", procName, NULL);
525 if (rotation < 0 || rotation > 3)
526 return (
BOX *)ERROR_PTR(
"rotation not in {0,1,2,3}", procName, NULL);
531 if (bw <= 0 || bh <= 0)
537 else if (rotation == 2)
573 l_int32 i, n, x, y, w, h, size;
577 PROCNAME(
"boxaSort");
579 if (pnaindex) *pnaindex = NULL;
581 return (
BOXA *)ERROR_PTR(
"boxas not defined", procName, NULL);
583 L_WARNING(
"boxas is empty\n", procName);
594 return (
BOXA *)ERROR_PTR(
"invalid sort type", procName, NULL);
596 return (
BOXA *)ERROR_PTR(
"invalid sort order", procName, NULL);
599 if (n > MIN_COMPS_FOR_BIN_SORT &&
603 return boxaBinSort(boxas, sorttype, sortorder, pnaindex);
607 return (
BOXA *)ERROR_PTR(
"na not made", procName, NULL);
608 for (i = 0; i < n; i++) {
650 L_WARNING(
"invalid sort type\n", procName);
658 return (
BOXA *)ERROR_PTR(
"naindex not made", procName, NULL);
697 l_int32 i, n, x, y, w, h;
701 PROCNAME(
"boxaBinSort");
703 if (pnaindex) *pnaindex = NULL;
705 return (
BOXA *)ERROR_PTR(
"boxas not defined", procName, NULL);
707 L_WARNING(
"boxas is empty\n", procName);
713 return (
BOXA *)ERROR_PTR(
"invalid sort type", procName, NULL);
715 return (
BOXA *)ERROR_PTR(
"invalid sort order", procName, NULL);
719 return (
BOXA *)ERROR_PTR(
"na not made", procName, NULL);
720 for (i = 0; i < n; i++) {
740 L_WARNING(
"invalid sort type\n", procName);
748 return (
BOXA *)ERROR_PTR(
"naindex not made", procName, NULL);
776 PROCNAME(
"boxaSortByIndex");
779 return (
BOXA *)ERROR_PTR(
"boxas not defined", procName, NULL);
781 L_WARNING(
"boxas is empty\n", procName);
785 return (
BOXA *)ERROR_PTR(
"naindex not defined", procName, NULL);
788 for (i = 0; i < n; i++) {
851 l_int32 i, index, h, nt, ne, n, m, ival;
853 BOXA *boxa, *boxae, *boxan, *boxa1, *boxa2, *boxa3, *boxav, *boxavs;
854 BOXAA *baa, *baa1, *baad;
855 NUMA *naindex, *nae, *nan, *nah, *nav, *na1, *na2, *nad, *namap;
856 NUMAA *naa, *naa1, *naad;
858 PROCNAME(
"boxaSort2d");
860 if (pnaad) *pnaad = NULL;
862 return (
BOXAA *)ERROR_PTR(
"boxas not defined", procName, NULL);
864 return (
BOXAA *)ERROR_PTR(
"boxas is empty", procName, NULL);
869 return (
BOXAA *)ERROR_PTR(
"boxa not made", procName, NULL);
877 for (i = 0; i < nt; i++) {
904 for (i = 0; i < ne; i++) {
937 for (i = 0; i < n; i++) {
954 for (i = 0; i < n; i++) {
971 for (i = 0; i < m; i++) {
991 for (i = 0; i < m; i++) {
998 for (i = 0; i < m; i++) {
1035 l_int32 ntot, boxtot, i, j, n, nn, index;
1041 PROCNAME(
"boxaSort2dByIndex");
1044 return (
BOXAA *)ERROR_PTR(
"boxas not defined", procName, NULL);
1046 return (
BOXAA *)ERROR_PTR(
"boxas is empty", procName, NULL);
1048 return (
BOXAA *)ERROR_PTR(
"naindex not defined", procName, NULL);
1053 return (
BOXAA *)ERROR_PTR(
"element count mismatch", procName, NULL);
1057 for (i = 0; i < n; i++) {
1061 for (j = 0; j < nn; j++) {
1108 l_int32 keepinvalid)
1110 l_int32 i, n, left, top, right, bot, w, h;
1112 PROCNAME(
"boxaExtractAsNuma");
1114 if (!pnal && !pnat && !pnar && !pnab && !pnaw && !pnah)
1115 return ERROR_INT(
"no output requested", procName, 1);
1116 if (pnal) *pnal = NULL;
1117 if (pnat) *pnat = NULL;
1118 if (pnar) *pnar = NULL;
1119 if (pnab) *pnab = NULL;
1120 if (pnaw) *pnaw = NULL;
1121 if (pnah) *pnah = NULL;
1123 return ERROR_INT(
"boxa not defined", procName, 1);
1125 return ERROR_INT(
"no valid boxes", procName, 1);
1134 for (i = 0; i < n; i++) {
1136 if (!keepinvalid && (w <= 0 || h <= 0))
1138 right = left + w - 1;
1185 l_int32 keepinvalid)
1187 l_int32 i, n, left, top, right, bot, w, h;
1189 PROCNAME(
"boxaExtractAsPta");
1191 if (!pptal && !pptar && !pptat && !pptab && !pptaw && !pptah)
1192 return ERROR_INT(
"no output requested", procName, 1);
1193 if (pptal) *pptal = NULL;
1194 if (pptat) *pptat = NULL;
1195 if (pptar) *pptar = NULL;
1196 if (pptab) *pptab = NULL;
1197 if (pptaw) *pptaw = NULL;
1198 if (pptah) *pptah = NULL;
1200 return ERROR_INT(
"boxa not defined", procName, 1);
1202 return ERROR_INT(
"no valid boxes", procName, 1);
1211 for (i = 0; i < n; i++) {
1213 if (!keepinvalid && (w <= 0 || h <= 0))
1215 right = left + w - 1;
1217 if (pptal)
ptaAddPt(*pptal, i, left);
1218 if (pptat)
ptaAddPt(*pptat, i, top);
1219 if (pptar)
ptaAddPt(*pptar, i, right);
1220 if (pptab)
ptaAddPt(*pptab, i, bot);
1273 l_float32 xval, yval, rval, bval, wval, hval;
1274 NUMA *nax, *nay, *nar, *nab, *naw, *nah;
1276 PROCNAME(
"boxaGetRankVals");
1285 return ERROR_INT(
"boxa not defined", procName, 1);
1286 if (fract < 0.0 || fract > 1.0)
1287 return ERROR_INT(
"fract not in [0.0 ... 1.0]", procName, 1);
1289 return ERROR_INT(
"no valid boxes in boxa", procName, 1);
1296 *px = (l_int32)xval;
1300 *py = (l_int32)yval;
1304 *pr = (l_int32)rval;
1308 *pb = (l_int32)bval;
1312 *pw = (l_int32)wval;
1316 *ph = (l_int32)hval;
1354 PROCNAME(
"boxaGetMedianVals");
1357 return ERROR_INT(
"boxa not defined", procName, 1);
1359 return ERROR_INT(
"no valid boxes in boxa", procName, 1);
1378 l_int32 i, n, bw, bh;
1379 l_float32 sumw, sumh;
1381 PROCNAME(
"boxaGetAverageSize");
1386 return ERROR_INT(
"boxa not defined", procName, 1);
1388 return ERROR_INT(
"boxa is empty", procName, 1);
1391 for (i = 0; i < n; i++) {
1397 if (pw) *pw = sumw / n;
1398 if (ph) *ph = sumh / n;
1435 l_int32 i, n, x, y, w, h, xmax, ymax, xmin, ymin, found;
1439 PROCNAME(
"boxaaGetExtent");
1441 if (!pw && !ph && !pbox && !pboxa)
1442 return ERROR_INT(
"no ptrs defined", procName, 1);
1445 if (pbox) *pbox = NULL;
1446 if (pboxa) *pboxa = NULL;
1448 return ERROR_INT(
"baa not defined", procName, 1);
1452 return ERROR_INT(
"no boxa in baa", procName, 1);
1456 xmin = ymin = 100000000;
1458 for (i = 0; i < n; i++) {
1463 if (w > 0 && h > 0) {
1465 xmin = L_MIN(xmin, x);
1466 ymin = L_MIN(ymin, y);
1467 xmax = L_MAX(xmax, x + w);
1468 ymax = L_MAX(ymax, y + h);
1478 *pbox =
boxCreate(xmin, ymin, xmax - xmin, ymax - ymin);
1518 PROCNAME(
"boxaaFlattenToBoxa");
1520 if (pnaindex) *pnaindex = NULL;
1522 return (
BOXA *)ERROR_PTR(
"baa not defined", procName, NULL);
1524 return (
BOXA *)ERROR_PTR(
"invalid copyflag", procName, NULL);
1527 *pnaindex = naindex;
1532 for (i = 0; i < n; i++) {
1541 for (j = 0; j < m; j++) {
1580 l_int32 i, j, m, n, mval, nshort;
1581 BOXA *boxat, *boxad;
1584 PROCNAME(
"boxaaFlattenAligned");
1587 return (
BOXA *)ERROR_PTR(
"baa not defined", procName, NULL);
1589 return (
BOXA *)ERROR_PTR(
"invalid copyflag", procName, NULL);
1593 for (i = 0; i < n; i++) {
1596 mval = L_MIN(m, num);
1597 nshort = num - mval;
1598 for (j = 0; j < mval; j++) {
1602 for (j = 0; j < nshort; j++) {
1637 l_int32 i, j, n, nbaa, index;
1642 PROCNAME(
"boxaEncapsulateAligned");
1645 return (
BOXAA *)ERROR_PTR(
"boxa not defined", procName, NULL);
1647 return (
BOXAA *)ERROR_PTR(
"invalid copyflag", procName, NULL);
1651 if (num * nbaa != n)
1652 L_ERROR(
"inconsistent alignment: num doesn't divide n\n", procName);
1654 for (i = 0, index = 0; i < nbaa; i++) {
1656 for (j = 0; j < num; j++, index++) {
1689 l_int32 i, j, ny, nb, nbox;
1694 PROCNAME(
"boxaaTranspose");
1697 return (
BOXAA *)ERROR_PTR(
"baas not defined", procName, NULL);
1699 return (
BOXAA *)ERROR_PTR(
"baas empty", procName, NULL);
1702 for (i = 0; i < ny; i++) {
1704 return (
BOXAA *)ERROR_PTR(
"baas is missing a boxa", procName, NULL);
1709 else if (nb != nbox)
1710 return (
BOXAA *)ERROR_PTR(
"boxa are not all the same size",
1716 for (i = 0; i < nbox; i++) {
1718 for (j = 0; j < ny; j++) {
1751 l_int32 i, n, m, y, yt, h, ht, ovlp, maxovlp, maxindex;
1755 PROCNAME(
"boxaaAlignBox");
1757 if (pindex) *pindex = 0;
1759 return ERROR_INT(
"baa not defined", procName, 1);
1761 return ERROR_INT(
"box not defined", procName, 1);
1763 return ERROR_INT(
"&index not defined", procName, 1);
1767 maxovlp = -10000000;
1768 for (i = 0; i < n; i++) {
1772 L_WARNING(
"no boxes in boxa\n", procName);
1782 ovlp = y + h - 1 - yt;
1784 ovlp = yt + ht - 1 - y;
1785 if (ovlp > maxovlp) {
1791 if (maxovlp + delta >= 0)
BOXAA * boxaSort2dByIndex(BOXA *boxas, NUMAA *naa)
boxaSort2dByIndex()
BOX * boxRotateOrth(BOX *box, l_int32 w, l_int32 h, l_int32 rotation)
boxRotateOrth()
l_ok boxaJoin(BOXA *boxad, BOXA *boxas, l_int32 istart, l_int32 iend)
boxaJoin()
l_ok boxaExtractAsNuma(BOXA *boxa, NUMA **pnal, NUMA **pnat, NUMA **pnar, NUMA **pnab, NUMA **pnaw, NUMA **pnah, l_int32 keepinvalid)
boxaExtractAsNuma()
NUMA * numaGetSortIndex(NUMA *na, l_int32 sortorder)
numaGetSortIndex()
BOXA * boxaSort(BOXA *boxas, l_int32 sorttype, l_int32 sortorder, NUMA **pnaindex)
boxaSort()
l_ok boxaaReplaceBoxa(BOXAA *baa, l_int32 index, BOXA *boxa)
boxaaReplaceBoxa()
NUMA * numaSortByIndex(NUMA *nas, NUMA *naindex)
numaSortByIndex()
l_ok ptaAddPt(PTA *pta, l_float32 x, l_float32 y)
ptaAddPt()
l_ok numaAddNumber(NUMA *na, l_float32 val)
numaAddNumber()
l_ok boxaGetMedianVals(BOXA *boxa, l_int32 *px, l_int32 *py, l_int32 *pr, l_int32 *pb, l_int32 *pw, l_int32 *ph)
boxaGetMedianVals()
l_int32 numaaGetNumberCount(NUMAA *naa)
numaaGetNumberCount()
l_ok boxaaGetExtent(BOXAA *baa, l_int32 *pw, l_int32 *ph, BOX **pbox, BOXA **pboxa)
boxaaGetExtent()
l_int32 boxaaGetCount(BOXAA *baa)
boxaaGetCount()
NUMA * numaGetBinSortIndex(NUMA *nas, l_int32 sortorder)
numaGetBinSortIndex()
PTA * ptaCreate(l_int32 n)
ptaCreate()
BOXA * boxaCopy(BOXA *boxa, l_int32 copyflag)
boxaCopy()
NUMA * numaCreate(l_int32 n)
numaCreate()
void boxaDestroy(BOXA **pboxa)
boxaDestroy()
BOX * boxTransform(BOX *box, l_int32 shiftx, l_int32 shifty, l_float32 scalex, l_float32 scaley)
boxTransform()
BOXA * boxaHandleOverlaps(BOXA *boxas, l_int32 op, l_int32 range, l_float32 min_overlap, l_float32 max_ratio, NUMA **pnamap)
boxaHandleOverlaps()
NUMAA * numaaCreate(l_int32 n)
numaaCreate()
BOX * boxTransformOrdered(BOX *boxs, l_int32 shiftx, l_int32 shifty, l_float32 scalex, l_float32 scaley, l_int32 xcen, l_int32 ycen, l_float32 angle, l_int32 order)
boxTransformOrdered()
void numaaDestroy(NUMAA **pnaa)
numaaDestroy()
l_ok boxaExtractAsPta(BOXA *boxa, PTA **pptal, PTA **pptat, PTA **pptar, PTA **pptab, PTA **pptaw, PTA **pptah, l_int32 keepinvalid)
boxaExtractAsPta()
l_ok boxaaAddBoxa(BOXAA *baa, BOXA *ba, l_int32 copyflag)
boxaaAddBoxa()
l_ok boxaGetRankVals(BOXA *boxa, l_float32 fract, l_int32 *px, l_int32 *py, l_int32 *pr, l_int32 *pb, l_int32 *pw, l_int32 *ph)
boxaGetRankVals()
NUMA * numaaGetNuma(NUMAA *naa, l_int32 index, l_int32 accessflag)
numaaGetNuma()
l_ok numaGetIValue(NUMA *na, l_int32 index, l_int32 *pival)
numaGetIValue()
void boxaaDestroy(BOXAA **pbaa)
boxaaDestroy()
l_ok boxaGetAverageSize(BOXA *boxa, l_float32 *pw, l_float32 *ph)
boxaGetAverageSize()
BOXA * boxaTransformOrdered(BOXA *boxas, l_int32 shiftx, l_int32 shifty, l_float32 scalex, l_float32 scaley, l_int32 xcen, l_int32 ycen, l_float32 angle, l_int32 order)
boxaTransformOrdered()
BOXA * boxaTransform(BOXA *boxas, l_int32 shiftx, l_int32 shifty, l_float32 scalex, l_float32 scaley)
boxaTransform()
l_int32 numaGetCount(NUMA *na)
numaGetCount()
l_ok boxaGetBoxGeometry(BOXA *boxa, l_int32 index, l_int32 *px, l_int32 *py, l_int32 *pw, l_int32 *ph)
boxaGetBoxGeometry()
l_ok boxaAddBox(BOXA *boxa, BOX *box, l_int32 copyflag)
boxaAddBox()
l_ok boxaaAddBox(BOXAA *baa, l_int32 index, BOX *box, l_int32 accessflag)
boxaaAddBox()
l_ok boxaaAlignBox(BOXAA *baa, BOX *box, l_int32 delta, l_int32 *pindex)
boxaaAlignBox()
BOX * boxaGetBox(BOXA *boxa, l_int32 index, l_int32 accessflag)
boxaGetBox()
BOXA * boxaaFlattenAligned(BOXAA *baa, l_int32 num, BOX *fillerbox, l_int32 copyflag)
boxaaFlattenAligned()
l_ok numaaReplaceNuma(NUMAA *naa, l_int32 index, NUMA *na)
numaaReplaceNuma()
l_ok numaaAddNumber(NUMAA *naa, l_int32 index, l_float32 val)
numaaAddNumber()
l_ok boxaGetExtent(BOXA *boxa, l_int32 *pw, l_int32 *ph, BOX **pbox)
boxaGetExtent()
void numaDestroy(NUMA **pna)
numaDestroy()
BOXAA * boxaaTranspose(BOXAA *baas)
boxaaTranspose()
BOXA * boxaBinSort(BOXA *boxas, l_int32 sorttype, l_int32 sortorder, NUMA **pnaindex)
boxaBinSort()
BOXAA * boxaaCreate(l_int32 n)
boxaaCreate()
BOXA * boxaRotateOrth(BOXA *boxas, l_int32 w, l_int32 h, l_int32 rotation)
boxaRotateOrth()
l_int32 boxaGetValidCount(BOXA *boxa)
boxaGetValidCount()
l_ok numaJoin(NUMA *nad, NUMA *nas, l_int32 istart, l_int32 iend)
numaJoin()
l_int32 numaaGetCount(NUMAA *naa)
numaaGetCount()
BOX * boxCopy(BOX *box)
boxCopy()
BOX * boxaaGetBox(BOXAA *baa, l_int32 iboxa, l_int32 ibox, l_int32 accessflag)
boxaaGetBox()
BOXA * boxaCreate(l_int32 n)
boxaCreate()
void boxDestroy(BOX **pbox)
boxDestroy()
BOXAA * boxaSort2d(BOXA *boxas, NUMAA **pnaad, l_int32 delta1, l_int32 delta2, l_int32 minh1)
boxaSort2d()
l_int32 boxaGetCount(BOXA *boxa)
boxaGetCount()
BOXAA * boxaEncapsulateAligned(BOXA *boxa, l_int32 num, l_int32 copyflag)
boxaEncapsulateAligned()
BOXA * boxaaFlattenToBoxa(BOXAA *baa, NUMA **pnaindex, l_int32 copyflag)
boxaaFlattenToBoxa()
l_ok boxGetGeometry(BOX *box, l_int32 *px, l_int32 *py, l_int32 *pw, l_int32 *ph)
boxGetGeometry()
BOX * boxCreate(l_int32 x, l_int32 y, l_int32 w, l_int32 h)
boxCreate()
l_ok numaGetRankValue(NUMA *na, l_float32 fract, NUMA *nasort, l_int32 usebins, l_float32 *pval)
numaGetRankValue()
l_ok numaaAddNuma(NUMAA *naa, NUMA *na, l_int32 copyflag)
numaaAddNuma()
BOXA * boxaaGetBoxa(BOXAA *baa, l_int32 index, l_int32 accessflag)
boxaaGetBoxa()
BOXA * boxaSortByIndex(BOXA *boxas, NUMA *naindex)
boxaSortByIndex()