35 #include "allheaders.h" 37 PIX *pixHMTDwa_1(
PIX *pixd,
PIX *pixs,
const char *selname);
38 PIX *pixFHMTGen_1(
PIX *pixd,
PIX *pixs,
const char *selname);
39 l_int32 fhmtgen_low_1(l_uint32 *datad, l_int32 w,
40 l_int32 h, l_int32 wpld,
41 l_uint32 *datas, l_int32 wpls,
44 static l_int32 NUM_SELS_GENERATED = 10;
45 static char SEL_NAMES[][80] = {
73 pixHMTDwa_1(
PIX *pixd,
77 PIX *pixt1, *pixt2, *pixt3;
79 PROCNAME(
"pixHMTDwa_1");
82 return (
PIX *)ERROR_PTR(
"pixs not defined", procName, pixd);
83 if (pixGetDepth(pixs) != 1)
84 return (
PIX *)ERROR_PTR(
"pixs must be 1 bpp", procName, pixd);
87 pixt2 = pixFHMTGen_1(NULL, pixt1, selname);
121 pixFHMTGen_1(
PIX *pixd,
125 l_int32 i, index, found, w, h, wpls, wpld;
126 l_uint32 *datad, *datas, *datat;
129 PROCNAME(
"pixFHMTGen_1");
132 return (
PIX *)ERROR_PTR(
"pixs not defined", procName, pixd);
133 if (pixGetDepth(pixs) != 1)
134 return (
PIX *)ERROR_PTR(
"pixs must be 1 bpp", procName, pixd);
137 for (i = 0; i < NUM_SELS_GENERATED; i++) {
138 if (strcmp(selname, SEL_NAMES[i]) == 0) {
145 return (
PIX *)ERROR_PTR(
"sel index not found", procName, pixd);
149 return (
PIX *)ERROR_PTR(
"pixd not made", procName, NULL);
153 wpls = pixGetWpl(pixs);
154 wpld = pixGetWpl(pixd);
160 w = pixGetWidth(pixs) - 64;
161 h = pixGetHeight(pixs) - 64;
166 if ((pixt =
pixCopy(NULL, pixs)) == NULL)
167 return (
PIX *)ERROR_PTR(
"pixt not made", procName, pixd);
169 fhmtgen_low_1(datad, w, h, wpld, datat, wpls, index);
173 fhmtgen_low_1(datad, w, h, wpld, datas, wpls, index);
l_ok pixResizeImageData(PIX *pixd, const PIX *pixs)
pixResizeImageData()
PIX * pixCreateTemplate(const PIX *pixs)
pixCreateTemplate()
PIX * pixCopy(PIX *pixd, const PIX *pixs)
pixCopy()
l_uint32 * pixGetData(PIX *pix)
pixGetData()
PIX * pixAddBorder(PIX *pixs, l_int32 npix, l_uint32 val)
pixAddBorder()
PIX * pixRemoveBorder(PIX *pixs, l_int32 npix)
pixRemoveBorder()
void pixDestroy(PIX **ppix)
pixDestroy()