66 #include "allheaders.h" 71 static const l_int32 MIN_COMPS_FOR_BIN_SORT = 200;
101 PROCNAME(
"boxaTransform");
104 return (
BOXA *)ERROR_PTR(
"boxas not defined", procName, NULL);
107 return (
BOXA *)ERROR_PTR(
"boxad not made", procName, NULL);
108 for (i = 0; i < n; i++) {
111 return (
BOXA *)ERROR_PTR(
"boxs not found", procName, NULL);
113 boxd =
boxTransform(boxs, shiftx, shifty, scalex, scaley);
143 PROCNAME(
"boxTransform");
146 return (
BOX *)ERROR_PTR(
"box not defined", procName, NULL);
147 if (box->
w <= 0 || box->
h <= 0)
150 return boxCreate((l_int32)(scalex * (box->
x + shiftx) + 0.5),
151 (l_int32)(scaley * (box->
y + shifty) + 0.5),
152 (l_int32)(L_MAX(1.0, scalex * box->
w + 0.5)),
153 (l_int32)(L_MAX(1.0, scaley * box->
h + 0.5)));
206 PROCNAME(
"boxaTransformOrdered");
209 return (
BOXA *)ERROR_PTR(
"boxas not defined", procName, NULL);
212 return (
BOXA *)ERROR_PTR(
"boxad not made", procName, NULL);
213 for (i = 0; i < n; i++) {
216 return (
BOXA *)ERROR_PTR(
"boxs not found", procName, NULL);
219 xcen, ycen, angle, order);
290 l_int32 bx, by, bw, bh, tx, ty, tw, th;
291 l_int32 xcent, ycent;
292 l_float32 sina, cosa, xdif, ydif, rx, ry, rw, rh;
295 PROCNAME(
"boxTransformOrdered");
298 return (
BOX *)ERROR_PTR(
"boxs not defined", procName, NULL);
301 return (
BOX *)ERROR_PTR(
"order invalid", procName, NULL);
304 if (bw <= 0 || bh <= 0)
312 tx = (l_int32)(scalex * (bx + shiftx) + 0.5);
313 ty = (l_int32)(scaley * (by + shifty) + 0.5);
314 tw = (l_int32)(L_MAX(1.0, scalex * bw + 0.5));
315 th = (l_int32)(L_MAX(1.0, scaley * bh + 0.5));
316 xcent = (l_int32)(scalex * xcen + 0.5);
317 ycent = (l_int32)(scaley * ycen + 0.5);
321 xdif = tx + 0.5 * tw - xcent;
322 ydif = ty + 0.5 * th - ycent;
323 rw = L_ABS(tw * cosa) + L_ABS(th * sina);
324 rh = L_ABS(th * cosa) + L_ABS(tw * sina);
325 rx = xcent + xdif * cosa - ydif * sina - 0.5 * rw;
326 ry = ycent + ydif * cosa + xdif * sina - 0.5 * rh;
327 boxd =
boxCreate((l_int32)rx, (l_int32)ry, (l_int32)rw,
331 tx = (l_int32)(scalex * bx + shiftx + 0.5);
332 ty = (l_int32)(scaley * by + shifty + 0.5);
333 tw = (l_int32)(L_MAX(1.0, scalex * bw + 0.5));
334 th = (l_int32)(L_MAX(1.0, scaley * bh + 0.5));
335 xcent = (l_int32)(scalex * xcen + 0.5);
336 ycent = (l_int32)(scaley * ycen + 0.5);
340 xdif = tx + 0.5 * tw - xcent;
341 ydif = ty + 0.5 * th - ycent;
342 rw = L_ABS(tw * cosa) + L_ABS(th * sina);
343 rh = L_ABS(th * cosa) + L_ABS(tw * sina);
344 rx = xcent + xdif * cosa - ydif * sina - 0.5 * rw;
345 ry = ycent + ydif * cosa + xdif * sina - 0.5 * rh;
346 boxd =
boxCreate((l_int32)rx, (l_int32)ry, (l_int32)rw,
356 xdif = bx + 0.5 * bw - xcen;
357 ydif = by + 0.5 * bh - ycen;
358 rw = L_ABS(bw * cosa) + L_ABS(bh * sina);
359 rh = L_ABS(bh * cosa) + L_ABS(bw * sina);
360 rx = xcen + xdif * cosa - ydif * sina - 0.5 * rw;
361 ry = ycen + ydif * cosa + xdif * sina - 0.5 * rh;
363 tx = (l_int32)(scalex * (rx + shiftx) + 0.5);
364 ty = (l_int32)(scaley * (ry + shifty) + 0.5);
365 tw = (l_int32)(L_MAX(1.0, scalex * rw + 0.5));
366 th = (l_int32)(L_MAX(1.0, scaley * rh + 0.5));
375 xdif = bx + 0.5 * bw - xcen;
376 ydif = by + 0.5 * bh - ycen;
377 rw = L_ABS(bw * cosa) + L_ABS(bh * sina);
378 rh = L_ABS(bh * cosa) + L_ABS(bw * sina);
379 rx = xcen + xdif * cosa - ydif * sina - 0.5 * rw;
380 ry = ycen + ydif * cosa + xdif * sina - 0.5 * rh;
382 tx = (l_int32)(scalex * rx + shiftx + 0.5);
383 ty = (l_int32)(scaley * ry + shifty + 0.5);
384 tw = (l_int32)(L_MAX(1.0, scalex * rw + 0.5));
385 th = (l_int32)(L_MAX(1.0, scaley * rh + 0.5));
396 xdif = tx + 0.5 * bw - xcen;
397 ydif = ty + 0.5 * bh - ycen;
398 rw = L_ABS(bw * cosa) + L_ABS(bh * sina);
399 rh = L_ABS(bh * cosa) + L_ABS(bw * sina);
400 rx = xcen + xdif * cosa - ydif * sina - 0.5 * rw;
401 ry = ycen + ydif * cosa + xdif * sina - 0.5 * rh;
403 tx = (l_int32)(scalex * rx + 0.5);
404 ty = (l_int32)(scaley * ry + 0.5);
405 tw = (l_int32)(L_MAX(1.0, scalex * rw + 0.5));
406 th = (l_int32)(L_MAX(1.0, scaley * rh + 0.5));
409 tx = (l_int32)(scalex * bx + 0.5);
410 ty = (l_int32)(scaley * by + 0.5);
411 tw = (l_int32)(L_MAX(1.0, scalex * bw + 0.5));
412 th = (l_int32)(L_MAX(1.0, scaley * bh + 0.5));
413 xcent = (l_int32)(scalex * xcen + 0.5);
414 ycent = (l_int32)(scaley * ycen + 0.5);
421 xdif = tx + 0.5 * tw - xcent;
422 ydif = ty + 0.5 * th - ycent;
423 rw = L_ABS(tw * cosa) + L_ABS(th * sina);
424 rh = L_ABS(th * cosa) + L_ABS(tw * sina);
425 rx = xcent + xdif * cosa - ydif * sina - 0.5 * rw;
426 ry = ycent + ydif * cosa + xdif * sina - 0.5 * rh;
428 tx = (l_int32)(rx + shiftx + 0.5);
429 ty = (l_int32)(ry + shifty + 0.5);
430 tw = (l_int32)(rw + 0.5);
431 th = (l_int32)(rh + 0.5);
463 PROCNAME(
"boxaRotateOrth");
466 return (
BOXA *)ERROR_PTR(
"boxas not defined", procName, NULL);
467 if (rotation < 0 || rotation > 3)
468 return (
BOXA *)ERROR_PTR(
"rotation not in {0,1,2,3}", procName, NULL);
474 return (
BOXA *)ERROR_PTR(
"boxad not made", procName, NULL);
475 for (i = 0; i < n; i++) {
478 return (
BOXA *)ERROR_PTR(
"boxs not found", procName, NULL);
511 l_int32 bx, by, bw, bh, xdist, ydist;
513 PROCNAME(
"boxRotateOrth");
516 return (
BOX *)ERROR_PTR(
"box not defined", procName, NULL);
517 if (rotation < 0 || rotation > 3)
518 return (
BOX *)ERROR_PTR(
"rotation not in {0,1,2,3}", procName, NULL);
523 if (bw <= 0 || bh <= 0)
529 else if (rotation == 2)
565 l_int32 i, n, x, y, w, h, size;
569 PROCNAME(
"boxaSort");
571 if (pnaindex) *pnaindex = NULL;
573 return (
BOXA *)ERROR_PTR(
"boxas not defined", procName, NULL);
575 L_WARNING(
"boxas is empty\n", procName);
586 return (
BOXA *)ERROR_PTR(
"invalid sort type", procName, NULL);
588 return (
BOXA *)ERROR_PTR(
"invalid sort order", procName, NULL);
591 if (n > MIN_COMPS_FOR_BIN_SORT &&
595 return boxaBinSort(boxas, sorttype, sortorder, pnaindex);
599 return (
BOXA *)ERROR_PTR(
"na not made", procName, NULL);
600 for (i = 0; i < n; i++) {
642 L_WARNING(
"invalid sort type\n", procName);
650 return (
BOXA *)ERROR_PTR(
"naindex not made", procName, NULL);
689 l_int32 i, n, x, y, w, h;
693 PROCNAME(
"boxaBinSort");
695 if (pnaindex) *pnaindex = NULL;
697 return (
BOXA *)ERROR_PTR(
"boxas not defined", procName, NULL);
699 L_WARNING(
"boxas is empty\n", procName);
705 return (
BOXA *)ERROR_PTR(
"invalid sort type", procName, NULL);
707 return (
BOXA *)ERROR_PTR(
"invalid sort order", procName, NULL);
711 return (
BOXA *)ERROR_PTR(
"na not made", procName, NULL);
712 for (i = 0; i < n; i++) {
732 L_WARNING(
"invalid sort type\n", procName);
740 return (
BOXA *)ERROR_PTR(
"naindex not made", procName, NULL);
768 PROCNAME(
"boxaSortByIndex");
771 return (
BOXA *)ERROR_PTR(
"boxas not defined", procName, NULL);
773 L_WARNING(
"boxas is empty\n", procName);
777 return (
BOXA *)ERROR_PTR(
"naindex not defined", procName, NULL);
780 for (i = 0; i < n; i++) {
843 l_int32 i, index, h, nt, ne, n, m, ival;
845 BOXA *boxa, *boxae, *boxan, *boxa1, *boxa2, *boxa3, *boxav, *boxavs;
846 BOXAA *baa, *baa1, *baad;
847 NUMA *naindex, *nae, *nan, *nah, *nav, *na1, *na2, *nad, *namap;
848 NUMAA *naa, *naa1, *naad;
850 PROCNAME(
"boxaSort2d");
852 if (pnaad) *pnaad = NULL;
854 return (
BOXAA *)ERROR_PTR(
"boxas not defined", procName, NULL);
856 return (
BOXAA *)ERROR_PTR(
"boxas is empty", procName, NULL);
861 return (
BOXAA *)ERROR_PTR(
"boxa not made", procName, NULL);
869 for (i = 0; i < nt; i++) {
896 for (i = 0; i < ne; i++) {
929 for (i = 0; i < n; i++) {
946 for (i = 0; i < n; i++) {
963 for (i = 0; i < m; i++) {
983 for (i = 0; i < m; i++) {
990 for (i = 0; i < m; i++) {
1027 l_int32 ntot, boxtot, i, j, n, nn, index;
1033 PROCNAME(
"boxaSort2dByIndex");
1036 return (
BOXAA *)ERROR_PTR(
"boxas not defined", procName, NULL);
1038 return (
BOXAA *)ERROR_PTR(
"boxas is empty", procName, NULL);
1040 return (
BOXAA *)ERROR_PTR(
"naindex not defined", procName, NULL);
1045 return (
BOXAA *)ERROR_PTR(
"element count mismatch", procName, NULL);
1049 for (i = 0; i < n; i++) {
1053 for (j = 0; j < nn; j++) {
1100 l_int32 keepinvalid)
1102 l_int32 i, n, left, top, right, bot, w, h;
1104 PROCNAME(
"boxaExtractAsNuma");
1106 if (!pnal && !pnat && !pnar && !pnab && !pnaw && !pnah)
1107 return ERROR_INT(
"no output requested", procName, 1);
1108 if (pnal) *pnal = NULL;
1109 if (pnat) *pnat = NULL;
1110 if (pnar) *pnar = NULL;
1111 if (pnab) *pnab = NULL;
1112 if (pnaw) *pnaw = NULL;
1113 if (pnah) *pnah = NULL;
1115 return ERROR_INT(
"boxa not defined", procName, 1);
1117 return ERROR_INT(
"no valid boxes", procName, 1);
1126 for (i = 0; i < n; i++) {
1128 if (!keepinvalid && (w <= 0 || h <= 0))
1130 right = left + w - 1;
1177 l_int32 keepinvalid)
1179 l_int32 i, n, left, top, right, bot, w, h;
1181 PROCNAME(
"boxaExtractAsPta");
1183 if (!pptal && !pptar && !pptat && !pptab && !pptaw && !pptah)
1184 return ERROR_INT(
"no output requested", procName, 1);
1185 if (pptal) *pptal = NULL;
1186 if (pptat) *pptat = NULL;
1187 if (pptar) *pptar = NULL;
1188 if (pptab) *pptab = NULL;
1189 if (pptaw) *pptaw = NULL;
1190 if (pptah) *pptah = NULL;
1192 return ERROR_INT(
"boxa not defined", procName, 1);
1194 return ERROR_INT(
"no valid boxes", procName, 1);
1203 for (i = 0; i < n; i++) {
1205 if (!keepinvalid && (w <= 0 || h <= 0))
1207 right = left + w - 1;
1209 if (pptal)
ptaAddPt(*pptal, i, left);
1210 if (pptat)
ptaAddPt(*pptat, i, top);
1211 if (pptar)
ptaAddPt(*pptar, i, right);
1212 if (pptab)
ptaAddPt(*pptab, i, bot);
1258 l_float32 xval, yval, wval, hval;
1259 NUMA *nax, *nay, *naw, *nah;
1261 PROCNAME(
"boxaGetRankVals");
1268 return ERROR_INT(
"boxa not defined", procName, 1);
1269 if (fract < 0.0 || fract > 1.0)
1270 return ERROR_INT(
"fract not in [0.0 ... 1.0]", procName, 1);
1272 return ERROR_INT(
"no valid boxes in boxa", procName, 1);
1279 *px = (l_int32)xval;
1283 *py = (l_int32)yval;
1287 *pw = (l_int32)wval;
1291 *ph = (l_int32)hval;
1323 PROCNAME(
"boxaGetMedianVals");
1326 return ERROR_INT(
"boxa not defined", procName, 1);
1328 return ERROR_INT(
"no valid boxes in boxa", procName, 1);
1347 l_int32 i, n, bw, bh;
1348 l_float32 sumw, sumh;
1350 PROCNAME(
"boxaGetAverageSize");
1355 return ERROR_INT(
"boxa not defined", procName, 1);
1357 return ERROR_INT(
"boxa is empty", procName, 1);
1360 for (i = 0; i < n; i++) {
1366 if (pw) *pw = sumw / n;
1367 if (ph) *ph = sumh / n;
1404 l_int32 i, n, x, y, w, h, xmax, ymax, xmin, ymin, found;
1408 PROCNAME(
"boxaaGetExtent");
1410 if (!pw && !ph && !pbox && !pboxa)
1411 return ERROR_INT(
"no ptrs defined", procName, 1);
1414 if (pbox) *pbox = NULL;
1415 if (pboxa) *pboxa = NULL;
1417 return ERROR_INT(
"baa not defined", procName, 1);
1421 return ERROR_INT(
"no boxa in baa", procName, 1);
1425 xmin = ymin = 100000000;
1427 for (i = 0; i < n; i++) {
1432 if (w > 0 && h > 0) {
1434 xmin = L_MIN(xmin, x);
1435 ymin = L_MIN(ymin, y);
1436 xmax = L_MAX(xmax, x + w);
1437 ymax = L_MAX(ymax, y + h);
1447 *pbox =
boxCreate(xmin, ymin, xmax - xmin, ymax - ymin);
1487 PROCNAME(
"boxaaFlattenToBoxa");
1489 if (pnaindex) *pnaindex = NULL;
1491 return (
BOXA *)ERROR_PTR(
"baa not defined", procName, NULL);
1493 return (
BOXA *)ERROR_PTR(
"invalid copyflag", procName, NULL);
1496 *pnaindex = naindex;
1501 for (i = 0; i < n; i++) {
1510 for (j = 0; j < m; j++) {
1549 l_int32 i, j, m, n, mval, nshort;
1550 BOXA *boxat, *boxad;
1553 PROCNAME(
"boxaaFlattenAligned");
1556 return (
BOXA *)ERROR_PTR(
"baa not defined", procName, NULL);
1558 return (
BOXA *)ERROR_PTR(
"invalid copyflag", procName, NULL);
1562 for (i = 0; i < n; i++) {
1565 mval = L_MIN(m, num);
1566 nshort = num - mval;
1567 for (j = 0; j < mval; j++) {
1571 for (j = 0; j < nshort; j++) {
1606 l_int32 i, j, n, nbaa, index;
1611 PROCNAME(
"boxaEncapsulateAligned");
1614 return (
BOXAA *)ERROR_PTR(
"boxa not defined", procName, NULL);
1616 return (
BOXAA *)ERROR_PTR(
"invalid copyflag", procName, NULL);
1620 if (num * nbaa != n)
1621 L_ERROR(
"inconsistent alignment: num doesn't divide n\n", procName);
1623 for (i = 0, index = 0; i < nbaa; i++) {
1625 for (j = 0; j < num; j++, index++) {
1658 l_int32 i, j, ny, nb, nbox;
1663 PROCNAME(
"boxaaTranspose");
1666 return (
BOXAA *)ERROR_PTR(
"baas not defined", procName, NULL);
1668 return (
BOXAA *)ERROR_PTR(
"baas empty", procName, NULL);
1671 for (i = 0; i < ny; i++) {
1673 return (
BOXAA *)ERROR_PTR(
"baas is missing a boxa", procName, NULL);
1678 else if (nb != nbox)
1679 return (
BOXAA *)ERROR_PTR(
"boxa are not all the same size",
1685 for (i = 0; i < nbox; i++) {
1687 for (j = 0; j < ny; j++) {
1720 l_int32 i, n, m, y, yt, h, ht, ovlp, maxovlp, maxindex;
1724 PROCNAME(
"boxaaAlignBox");
1726 if (pindex) *pindex = 0;
1728 return ERROR_INT(
"baa not defined", procName, 1);
1730 return ERROR_INT(
"box not defined", procName, 1);
1732 return ERROR_INT(
"&index not defined", procName, 1);
1736 maxovlp = -10000000;
1737 for (i = 0; i < n; i++) {
1741 L_WARNING(
"no boxes in boxa\n", procName);
1751 ovlp = y + h - 1 - yt;
1753 ovlp = yt + ht - 1 - y;
1754 if (ovlp > maxovlp) {
1760 if (maxovlp + delta >= 0)
BOXAA * boxaSort2dByIndex(BOXA *boxas, NUMAA *naa)
boxaSort2dByIndex()
l_int32 numaaReplaceNuma(NUMAA *naa, l_int32 index, NUMA *na)
numaaReplaceNuma()
l_int32 boxaGetRankVals(BOXA *boxa, l_float32 fract, l_int32 *px, l_int32 *py, l_int32 *pw, l_int32 *ph)
boxaGetRankVals()
BOX * boxRotateOrth(BOX *box, l_int32 w, l_int32 h, l_int32 rotation)
boxRotateOrth()
l_int32 boxaExtractAsPta(BOXA *boxa, PTA **pptal, PTA **pptat, PTA **pptar, PTA **pptab, PTA **pptaw, PTA **pptah, l_int32 keepinvalid)
boxaExtractAsPta()
l_int32 numaAddNumber(NUMA *na, l_float32 val)
numaAddNumber()
l_int32 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()
NUMA * numaSortByIndex(NUMA *nas, NUMA *naindex)
numaSortByIndex()
l_int32 boxaaGetExtent(BOXAA *baa, l_int32 *pw, l_int32 *ph, BOX **pbox, BOXA **pboxa)
boxaaGetExtent()
l_int32 ptaAddPt(PTA *pta, l_float32 x, l_float32 y)
ptaAddPt()
l_int32 numaaGetNumberCount(NUMAA *naa)
numaaGetNumberCount()
l_int32 boxaaGetCount(BOXAA *baa)
boxaaGetCount()
NUMA * numaGetBinSortIndex(NUMA *nas, l_int32 sortorder)
numaGetBinSortIndex()
PTA * ptaCreate(l_int32 n)
ptaCreate()
l_int32 boxaAddBox(BOXA *boxa, BOX *box, l_int32 copyflag)
boxaAddBox()
l_int32 numaJoin(NUMA *nad, NUMA *nas, l_int32 istart, l_int32 iend)
numaJoin()
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()
l_int32 boxaJoin(BOXA *boxad, BOXA *boxas, l_int32 istart, l_int32 iend)
boxaJoin()
l_int32 boxaGetBoxGeometry(BOXA *boxa, l_int32 index, l_int32 *px, l_int32 *py, l_int32 *pw, l_int32 *ph)
boxaGetBoxGeometry()
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()
l_int32 numaaAddNumber(NUMAA *naa, l_int32 index, l_float32 val)
numaaAddNumber()
void numaaDestroy(NUMAA **pnaa)
numaaDestroy()
l_int32 numaaAddNuma(NUMAA *naa, NUMA *na, l_int32 copyflag)
numaaAddNuma()
NUMA * numaaGetNuma(NUMAA *naa, l_int32 index, l_int32 accessflag)
numaaGetNuma()
void boxaaDestroy(BOXAA **pbaa)
boxaaDestroy()
static const l_int32 L_INSERT
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()
l_int32 boxaaAddBox(BOXAA *baa, l_int32 index, BOX *box, l_int32 accessflag)
boxaaAddBox()
BOXA * boxaTransform(BOXA *boxas, l_int32 shiftx, l_int32 shifty, l_float32 scalex, l_float32 scaley)
boxaTransform()
l_int32 numaGetCount(NUMA *na)
numaGetCount()
l_int32 numaGetRankValue(NUMA *na, l_float32 fract, NUMA *nasort, l_int32 usebins, l_float32 *pval)
numaGetRankValue()
l_int32 boxGetGeometry(BOX *box, l_int32 *px, l_int32 *py, l_int32 *pw, l_int32 *ph)
boxGetGeometry()
l_int32 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()
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()
l_int32 boxaaReplaceBoxa(BOXAA *baa, l_int32 index, BOXA *boxa)
boxaaReplaceBoxa()
BOXA * boxaRotateOrth(BOXA *boxas, l_int32 w, l_int32 h, l_int32 rotation)
boxaRotateOrth()
l_int32 boxaGetAverageSize(BOXA *boxa, l_float32 *pw, l_float32 *ph)
boxaGetAverageSize()
l_int32 boxaGetValidCount(BOXA *boxa)
boxaGetValidCount()
l_int32 boxaGetMedianVals(BOXA *boxa, l_int32 *px, l_int32 *py, l_int32 *pw, l_int32 *ph)
boxaGetMedianVals()
l_int32 boxaaAddBoxa(BOXAA *baa, BOXA *ba, l_int32 copyflag)
boxaaAddBoxa()
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()
l_int32 boxaGetExtent(BOXA *boxa, l_int32 *pw, l_int32 *ph, BOX **pbox)
boxaGetExtent()
BOXAA * boxaSort2d(BOXA *boxas, NUMAA **pnaad, l_int32 delta1, l_int32 delta2, l_int32 minh1)
boxaSort2d()
l_int32 boxaGetCount(BOXA *boxa)
boxaGetCount()
l_int32 numaGetIValue(NUMA *na, l_int32 index, l_int32 *pival)
numaGetIValue()
BOXAA * boxaEncapsulateAligned(BOXA *boxa, l_int32 num, l_int32 copyflag)
boxaEncapsulateAligned()
BOXA * boxaaFlattenToBoxa(BOXAA *baa, NUMA **pnaindex, l_int32 copyflag)
boxaaFlattenToBoxa()
BOX * boxCreate(l_int32 x, l_int32 y, l_int32 w, l_int32 h)
boxCreate()
BOXA * boxaaGetBoxa(BOXAA *baa, l_int32 index, l_int32 accessflag)
boxaaGetBoxa()
BOXA * boxaSortByIndex(BOXA *boxas, NUMA *naindex)
boxaSortByIndex()