Leptonica 1.82.0
Image processing and image analysis suite
pixlabel.c
Go to the documentation of this file.
1/*====================================================================*
2 - Copyright (C) 2001 Leptonica. All rights reserved.
3 -
4 - Redistribution and use in source and binary forms, with or without
5 - modification, are permitted provided that the following conditions
6 - are met:
7 - 1. Redistributions of source code must retain the above copyright
8 - notice, this list of conditions and the following disclaimer.
9 - 2. Redistributions in binary form must reproduce the above
10 - copyright notice, this list of conditions and the following
11 - disclaimer in the documentation and/or other materials
12 - provided with the distribution.
13 -
14 - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
15 - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
16 - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
17 - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY
18 - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19 - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20 - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
21 - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
22 - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
23 - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *====================================================================*/
26
82#ifdef HAVE_CONFIG_H
83#include <config_auto.h>
84#endif /* HAVE_CONFIG_H */
85
86#include <string.h>
87#include <math.h>
88#include "allheaders.h"
89
90/*-----------------------------------------------------------------------*
91 * Label pixels by an index for connected component membership *
92 *-----------------------------------------------------------------------*/
115PIX *
117 l_int32 connect,
118 l_int32 depth)
119{
120l_int32 i, n, index, w, h, xb, yb, wb, hb;
121BOXA *boxa;
122PIX *pix1, *pix2, *pixd;
123PIXA *pixa;
124
125 PROCNAME("pixConnCompTransform");
126
127 if (!pixs || pixGetDepth(pixs) != 1)
128 return (PIX *)ERROR_PTR("pixs undefined or not 1 bpp", procName, NULL);
129 if (connect != 4 && connect != 8)
130 return (PIX *)ERROR_PTR("connectivity must be 4 or 8", procName, NULL);
131 if (depth != 0 && depth != 8 && depth != 16 && depth != 32)
132 return (PIX *)ERROR_PTR("depth must be 0, 8, 16 or 32", procName, NULL);
133
134 boxa = pixConnComp(pixs, &pixa, connect);
135 n = pixaGetCount(pixa);
136 boxaDestroy(&boxa);
137 pixGetDimensions(pixs, &w, &h, NULL);
138 if (depth == 0) {
139 if (n < 254)
140 depth = 8;
141 else if (n < 0xfffe)
142 depth = 16;
143 else
144 depth = 32;
145 }
146 pixd = pixCreate(w, h, depth);
147 pixSetSpp(pixd, 1);
148 if (n == 0) { /* no fg */
149 pixaDestroy(&pixa);
150 return pixd;
151 }
152
153 /* Label each component and blit it in */
154 for (i = 0; i < n; i++) {
155 pixaGetBoxGeometry(pixa, i, &xb, &yb, &wb, &hb);
156 pix1 = pixaGetPix(pixa, i, L_CLONE);
157 if (depth == 8) {
158 index = 1 + (i % 254);
159 pix2 = pixConvert1To8(NULL, pix1, 0, index);
160 } else if (depth == 16) {
161 index = 1 + (i % 0xfffe);
162 pix2 = pixConvert1To16(NULL, pix1, 0, index);
163 } else { /* depth == 32 */
164 index = 1 + i;
165 pix2 = pixConvert1To32(NULL, pix1, 0, index);
166 }
167 pixRasterop(pixd, xb, yb, wb, hb, PIX_PAINT, pix2, 0, 0);
168 pixDestroy(&pix1);
169 pixDestroy(&pix2);
170 }
171
172 pixaDestroy(&pixa);
173 return pixd;
174}
175
176
177/*-----------------------------------------------------------------------*
178 * Label pixels by the area of their connected component *
179 *-----------------------------------------------------------------------*/
195PIX *
197 l_int32 connect)
198{
199l_int32 i, n, npix, w, h, xb, yb, wb, hb;
200l_int32 *tab8;
201BOXA *boxa;
202PIX *pix1, *pix2, *pixd;
203PIXA *pixa;
204
205 PROCNAME("pixConnCompAreaTransform");
206
207 if (!pixs || pixGetDepth(pixs) != 1)
208 return (PIX *)ERROR_PTR("pixs undefined or not 1 bpp", procName, NULL);
209 if (connect != 4 && connect != 8)
210 return (PIX *)ERROR_PTR("connectivity must be 4 or 8", procName, NULL);
211
212 boxa = pixConnComp(pixs, &pixa, connect);
213 n = pixaGetCount(pixa);
214 boxaDestroy(&boxa);
215 pixGetDimensions(pixs, &w, &h, NULL);
216 pixd = pixCreate(w, h, 32);
217 pixSetSpp(pixd, 1);
218 if (n == 0) { /* no fg */
219 pixaDestroy(&pixa);
220 return pixd;
221 }
222
223 /* Label each component and blit it in */
224 tab8 = makePixelSumTab8();
225 for (i = 0; i < n; i++) {
226 pixaGetBoxGeometry(pixa, i, &xb, &yb, &wb, &hb);
227 pix1 = pixaGetPix(pixa, i, L_CLONE);
228 pixCountPixels(pix1, &npix, tab8);
229 pix2 = pixConvert1To32(NULL, pix1, 0, npix);
230 pixRasterop(pixd, xb, yb, wb, hb, PIX_PAINT, pix2, 0, 0);
231 pixDestroy(&pix1);
232 pixDestroy(&pix2);
233 }
234
235 pixaDestroy(&pixa);
236 LEPT_FREE(tab8);
237 return pixd;
238}
239
240
241/*-------------------------------------------------------------------------*
242 * Label pixels to allow incremental computation of connected components *
243 *-------------------------------------------------------------------------*/
268l_ok
270 l_int32 conn,
271 PIX **ppixd,
272 PTAA **pptaa,
273 l_int32 *pncc)
274{
275l_int32 empty, w, h, ncc;
276PIX *pixd;
277PTA *pta;
278PTAA *ptaa;
279
280 PROCNAME("pixConnCompIncrInit");
281
282 if (ppixd) *ppixd = NULL;
283 if (pptaa) *pptaa = NULL;
284 if (pncc) *pncc = 0;
285 if (!ppixd || !pptaa || !pncc)
286 return ERROR_INT("&pixd, &ptaa, &ncc not all defined", procName, 1);
287 if (!pixs || pixGetDepth(pixs) != 1)
288 return ERROR_INT("pixs undefined or not 1 bpp", procName, 1);
289 if (conn != 4 && conn != 8)
290 return ERROR_INT("connectivity must be 4 or 8", procName, 1);
291
292 pixGetDimensions(pixs, &w, &h, NULL);
293 pixZero(pixs, &empty);
294 if (empty) {
295 *ppixd = pixCreate(w, h, 32);
296 pixSetSpp(*ppixd, 1);
297 pixSetSpecial(*ppixd, conn);
298 *pptaa = ptaaCreate(0);
299 pta = ptaCreate(1);
300 ptaaAddPta(*pptaa, pta, L_INSERT); /* reserve index 0 for background */
301 return 0;
302 }
303
304 /* Set up the initial labeled image and indexed pixel arrays */
305 if ((pixd = pixConnCompTransform(pixs, conn, 32)) == NULL)
306 return ERROR_INT("pixd not made", procName, 1);
307 pixSetSpecial(pixd, conn);
308 *ppixd = pixd;
309 if ((ptaa = ptaaIndexLabeledPixels(pixd, &ncc)) == NULL)
310 return ERROR_INT("ptaa not made", procName, 1);
311 *pptaa = ptaa;
312 *pncc = ncc;
313 return 0;
314}
315
316
352l_int32
354 PTAA *ptaa,
355 l_int32 *pncc,
356 l_float32 x,
357 l_float32 y,
358 l_int32 debug)
359{
360l_int32 conn, i, j, w, h, count, nvals, ns, firstindex;
361l_uint32 val;
362l_int32 *neigh;
363PTA *ptas, *ptad;
364
365 PROCNAME("pixConnCompIncrAdd");
366
367 if (!pixs || pixGetDepth(pixs) != 32)
368 return ERROR_INT("pixs not defined or not 32 bpp", procName, 1);
369 if (!ptaa)
370 return ERROR_INT("ptaa not defined", procName, 1);
371 if (!pncc)
372 return ERROR_INT("&ncc not defined", procName, 1);
373 conn = pixs->special;
374 if (conn != 4 && conn != 8)
375 return ERROR_INT("connectivity must be 4 or 8", procName, 1);
376 pixGetDimensions(pixs, &w, &h, NULL);
377 if (x < 0 || x >= w)
378 return ERROR_INT("invalid x pixel location", procName, 1);
379 if (y < 0 || y >= h)
380 return ERROR_INT("invalid y pixel location", procName, 1);
381
382 pixGetPixel(pixs, x, y, &val);
383 if (val > 0) /* already belongs to a set */
384 return -1;
385
386 /* Find unique neighbor pixel values in increasing order of value.
387 * If %nvals > 0, these are returned in the %neigh array, which
388 * is of size %nvals. Note that the pixel values in each
389 * connected component are used as the index into the pta
390 * array of the ptaa, giving the pixel locations. */
391 pixGetSortedNeighborValues(pixs, x, y, conn, &neigh, &nvals);
392
393 /* If there are no neighbors, just add a new component */
394 if (nvals == 0) {
395 count = ptaaGetCount(ptaa);
396 pixSetPixel(pixs, x, y, count);
397 ptas = ptaCreate(1);
398 ptaAddPt(ptas, x, y);
399 ptaaAddPta(ptaa, ptas, L_INSERT);
400 *pncc += 1;
401 LEPT_FREE(neigh);
402 return 0;
403 }
404
405 /* Otherwise, there is at least one neighbor. Add the pixel
406 * to the first neighbor c.c. */
407 firstindex = neigh[0];
408 pixSetPixel(pixs, x, y, firstindex);
409 ptaaAddPt(ptaa, neigh[0], x, y);
410 if (nvals == 1) {
411 if (debug == 1)
412 lept_stderr("nvals = %d: neigh = (%d)\n", nvals, neigh[0]);
413 LEPT_FREE(neigh);
414 return 0;
415 }
416
417 /* If nvals > 1, there are at least 2 neighbors, so this pixel
418 * joins at least one pair of existing c.c. Join each component
419 * to the first component in the list, which is the one with
420 * the smallest integer label. This is done in two steps:
421 * (a) re-label the pixels in the component to the label of the
422 * first component, and
423 * (b) save the pixel locations in the pta for the first component. */
424 if (nvals == 2) {
425 if (debug >= 1 && debug <= 2) {
426 lept_stderr("nvals = %d: neigh = (%d,%d)\n", nvals,
427 neigh[0], neigh[1]);
428 }
429 } else if (nvals == 3) {
430 if (debug >= 1 && debug <= 3) {
431 lept_stderr("nvals = %d: neigh = (%d,%d,%d)\n", nvals,
432 neigh[0], neigh[1], neigh[2]);
433 }
434 } else { /* nvals == 4 */
435 if (debug >= 1 && debug <= 4) {
436 lept_stderr("nvals = %d: neigh = (%d,%d,%d,%d)\n", nvals,
437 neigh[0], neigh[1], neigh[2], neigh[3]);
438 }
439 }
440 ptad = ptaaGetPta(ptaa, firstindex, L_CLONE);
441 for (i = 1; i < nvals; i++) {
442 ptas = ptaaGetPta(ptaa, neigh[i], L_CLONE);
443 ns = ptaGetCount(ptas);
444 for (j = 0; j < ns; j++) { /* relabel pixels */
445 ptaGetPt(ptas, j, &x, &y);
446 pixSetPixel(pixs, x, y, firstindex);
447 }
448 ptaJoin(ptad, ptas, 0, -1); /* add relabeled pixel locations */
449 *pncc -= 1;
450 ptaDestroy(&ptaa->pta[neigh[i]]);
451 ptaDestroy(&ptas); /* the clone */
452 }
453 ptaDestroy(&ptad); /* the clone */
454 LEPT_FREE(neigh);
455 return 0;
456}
457
458
482l_ok
484 l_int32 x,
485 l_int32 y,
486 l_int32 conn,
487 l_int32 **pneigh,
488 l_int32 *pnvals)
489{
490l_int32 i, npt, index;
491l_int32 neigh[4];
492l_uint32 val;
493l_float32 fx, fy;
494L_ASET *aset;
496PTA *pta;
497RB_TYPE key;
498
499 PROCNAME("pixGetSortedNeighborValues");
500
501 if (pneigh) *pneigh = NULL;
502 if (pnvals) *pnvals = 0;
503 if (!pneigh || !pnvals)
504 return ERROR_INT("&neigh and &nvals not both defined", procName, 1);
505 if (!pixs || pixGetDepth(pixs) < 8)
506 return ERROR_INT("pixs not defined or depth < 8", procName, 1);
507
508 /* Identify the locations of nearest neighbor pixels */
509 if ((pta = ptaGetNeighborPixLocs(pixs, x, y, conn)) == NULL)
510 return ERROR_INT("pta of neighbors not made", procName, 1);
511
512 /* Find the pixel values and insert into a set as keys */
513 aset = l_asetCreate(L_UINT_TYPE);
514 npt = ptaGetCount(pta);
515 for (i = 0; i < npt; i++) {
516 ptaGetPt(pta, i, &fx, &fy);
517 pixGetPixel(pixs, (l_int32)fx, (l_int32)fy, &val);
518 key.utype = val;
519 l_asetInsert(aset, key);
520 }
521
522 /* Extract the set keys and put them into the %neigh array.
523 * Omit the value 0, which indicates the pixel doesn't
524 * belong to one of the sets of connected components. */
525 node = l_asetGetFirst(aset);
526 index = 0;
527 while (node) {
528 val = node->key.utype;
529 if (val > 0)
530 neigh[index++] = (l_int32)val;
531 node = l_asetGetNext(node);
532 }
533 *pnvals = index;
534 if (index > 0) {
535 *pneigh = (l_int32 *)LEPT_CALLOC(index, sizeof(l_int32));
536 for (i = 0; i < index; i++)
537 (*pneigh)[i] = neigh[i];
538 }
539
540 ptaDestroy(&pta);
541 l_asetDestroy(&aset);
542 return 0;
543}
544
545
546/*-----------------------------------------------------------------------*
547 * Label pixels with spatially-dependent color coding *
548 *-----------------------------------------------------------------------*/
568PIX *
570{
571l_int32 w, h, w2, h2, wpls, wplr, wplg, wplb, wplcc, i, j, rval, gval, bval;
572l_float32 invw2, invh2;
573l_uint32 *datas, *datar, *datag, *datab, *datacc;
574l_uint32 *lines, *liner, *lineg, *lineb, *linecc;
575PIX *pix1, *pixcc, *pixr, *pixg, *pixb, *pixd;
576
577 PROCNAME("pixLocToColorTransform");
578
579 if (!pixs || pixGetDepth(pixs) != 1)
580 return (PIX *)ERROR_PTR("pixs undefined or not 1 bpp", procName, NULL);
581
582 /* Label each pixel with the area of the c.c. to which it belongs.
583 * Clip the result to 255 in an 8 bpp pix. This is used for
584 * the blue component of pixd. */
585 pixGetDimensions(pixs, &w, &h, NULL);
586 w2 = w / 2;
587 h2 = h / 2;
588 invw2 = 255.0 / (l_float32)w2;
589 invh2 = 255.0 / (l_float32)h2;
590 pix1 = pixConnCompAreaTransform(pixs, 8);
592 pixDestroy(&pix1);
593
594 /* Label the red and green components depending on the location
595 * of the fg pixels, in a way that is 4-fold rotationally invariant. */
596 pixr = pixCreate(w, h, 8);
597 pixg = pixCreate(w, h, 8);
598 pixb = pixCreate(w, h, 8);
599 wpls = pixGetWpl(pixs);
600 wplr = pixGetWpl(pixr);
601 wplg = pixGetWpl(pixg);
602 wplb = pixGetWpl(pixb);
603 wplcc = pixGetWpl(pixcc);
604 datas = pixGetData(pixs);
605 datar = pixGetData(pixr);
606 datag = pixGetData(pixg);
607 datab = pixGetData(pixb);
608 datacc = pixGetData(pixcc);
609 for (i = 0; i < h; i++) {
610 lines = datas + i * wpls;
611 liner = datar + i * wplr;
612 lineg = datag + i * wplg;
613 lineb = datab + i * wplb;
614 linecc = datacc+ i * wplcc;
615 for (j = 0; j < w; j++) {
616 if (GET_DATA_BIT(lines, j) == 0) continue;
617 if (w < h) {
618 rval = invh2 * L_ABS((l_float32)(i - h2));
619 gval = invw2 * L_ABS((l_float32)(j - w2));
620 } else {
621 rval = invw2 * L_ABS((l_float32)(j - w2));
622 gval = invh2 * L_ABS((l_float32)(i - h2));
623 }
624 bval = GET_DATA_BYTE(linecc, j);
625 SET_DATA_BYTE(liner, j, rval);
626 SET_DATA_BYTE(lineg, j, gval);
627 SET_DATA_BYTE(lineb, j, bval);
628 }
629 }
630 pixd = pixCreateRGBImage(pixr, pixg, pixb);
631
632 pixDestroy(&pixcc);
633 pixDestroy(&pixr);
634 pixDestroy(&pixg);
635 pixDestroy(&pixb);
636 return pixd;
637}
#define GET_DATA_BYTE(pdata, n)
Definition: arrayaccess.h:188
#define SET_DATA_BYTE(pdata, n, val)
Definition: arrayaccess.h:198
#define GET_DATA_BIT(pdata, n)
Definition: arrayaccess.h:123
void boxaDestroy(BOXA **pboxa)
boxaDestroy()
Definition: boxbasic.c:583
BOXA * pixConnComp(PIX *pixs, PIXA **ppixa, l_int32 connectivity)
pixConnComp()
Definition: conncomp.c:151
void pixDestroy(PIX **ppix)
pixDestroy()
Definition: pix1.c:621
l_ok pixGetDimensions(const PIX *pix, l_int32 *pw, l_int32 *ph, l_int32 *pd)
pixGetDimensions()
Definition: pix1.c:1113
PIX * pixCreate(l_int32 width, l_int32 height, l_int32 depth)
pixCreate()
Definition: pix1.c:315
l_uint32 * pixGetData(PIX *pix)
pixGetData()
Definition: pix1.c:1763
l_ok pixSetPixel(PIX *pix, l_int32 x, l_int32 y, l_uint32 val)
pixSetPixel()
Definition: pix2.c:263
l_ok pixGetPixel(PIX *pix, l_int32 x, l_int32 y, l_uint32 *pval)
pixGetPixel()
Definition: pix2.c:190
PIX * pixCreateRGBImage(PIX *pixr, PIX *pixg, PIX *pixb)
pixCreateRGBImage()
Definition: pix2.c:2423
l_int32 * makePixelSumTab8(void)
makePixelSumTab8()
Definition: pix3.c:2411
l_ok pixZero(PIX *pix, l_int32 *pempty)
pixZero()
Definition: pix3.c:1815
l_ok pixCountPixels(PIX *pixs, l_int32 *pcount, l_int32 *tab8)
pixCountPixels()
Definition: pix3.c:1937
@ L_CLONE
Definition: pix.h:713
@ L_INSERT
Definition: pix.h:711
#define PIX_PAINT
Definition: pix.h:336
@ L_CLIP_TO_FF
Definition: pix.h:851
@ L_LS_TWO_BYTES
Definition: pix.h:852
void pixaDestroy(PIXA **ppixa)
pixaDestroy()
Definition: pixabasic.c:412
l_int32 pixaGetCount(PIXA *pixa)
pixaGetCount()
Definition: pixabasic.c:650
PIX * pixaGetPix(PIXA *pixa, l_int32 index, l_int32 accesstype)
pixaGetPix()
Definition: pixabasic.c:691
l_ok pixaGetBoxGeometry(PIXA *pixa, l_int32 index, l_int32 *px, l_int32 *py, l_int32 *pw, l_int32 *ph)
pixaGetBoxGeometry()
Definition: pixabasic.c:854
PIX * pixConvert1To16(PIX *pixd, PIX *pixs, l_uint16 val0, l_uint16 val1)
pixConvert1To16()
Definition: pixconv.c:1978
PIX * pixConvert1To32(PIX *pixd, PIX *pixs, l_uint32 val0, l_uint32 val1)
pixConvert1To32()
Definition: pixconv.c:2052
PIX * pixConvert1To8(PIX *pixd, PIX *pixs, l_uint8 val0, l_uint8 val1)
pixConvert1To8()
Definition: pixconv.c:2401
PIX * pixConvert32To8(PIX *pixs, l_int32 type16, l_int32 type8)
pixConvert32To8()
Definition: pixconv.c:3722
PIX * pixConnCompAreaTransform(PIX *pixs, l_int32 connect)
pixConnCompAreaTransform()
Definition: pixlabel.c:196
l_ok pixConnCompIncrInit(PIX *pixs, l_int32 conn, PIX **ppixd, PTAA **pptaa, l_int32 *pncc)
pixConnCompIncrInit()
Definition: pixlabel.c:269
PIX * pixLocToColorTransform(PIX *pixs)
pixLocToColorTransform()
Definition: pixlabel.c:569
l_int32 pixConnCompIncrAdd(PIX *pixs, PTAA *ptaa, l_int32 *pncc, l_float32 x, l_float32 y, l_int32 debug)
pixConnCompIncrAdd()
Definition: pixlabel.c:353
PIX * pixConnCompTransform(PIX *pixs, l_int32 connect, l_int32 depth)
pixConnCompTransform()
Definition: pixlabel.c:116
l_ok pixGetSortedNeighborValues(PIX *pixs, l_int32 x, l_int32 y, l_int32 conn, l_int32 **pneigh, l_int32 *pnvals)
pixGetSortedNeighborValues()
Definition: pixlabel.c:483
l_ok ptaaAddPt(PTAA *ptaa, l_int32 ipta, l_float32 x, l_float32 y)
ptaaAddPt()
Definition: ptabasic.c:1286
PTA * ptaCreate(l_int32 n)
ptaCreate()
Definition: ptabasic.c:120
l_ok ptaaAddPta(PTAA *ptaa, PTA *pta, l_int32 copyflag)
ptaaAddPta()
Definition: ptabasic.c:1038
l_int32 ptaaGetCount(PTAA *ptaa)
ptaaGetCount()
Definition: ptabasic.c:1125
PTA * ptaaGetPta(PTAA *ptaa, l_int32 index, l_int32 accessflag)
ptaaGetPta()
Definition: ptabasic.c:1145
l_ok ptaAddPt(PTA *pta, l_float32 x, l_float32 y)
ptaAddPt()
Definition: ptabasic.c:343
l_ok ptaGetPt(PTA *pta, l_int32 index, l_float32 *px, l_float32 *py)
ptaGetPt()
Definition: ptabasic.c:548
l_int32 ptaGetCount(PTA *pta)
ptaGetCount()
Definition: ptabasic.c:527
PTAA * ptaaCreate(l_int32 n)
ptaaCreate()
Definition: ptabasic.c:976
void ptaDestroy(PTA **ppta)
ptaDestroy()
Definition: ptabasic.c:195
PTAA * ptaaIndexLabeledPixels(PIX *pixs, l_int32 *pncc)
ptaaIndexLabeledPixels()
Definition: ptafunc1.c:2196
l_ok ptaJoin(PTA *ptad, PTA *ptas, l_int32 istart, l_int32 iend)
ptaJoin()
Definition: ptafunc1.c:167
PTA * ptaGetNeighborPixLocs(PIX *pixs, l_int32 x, l_int32 y, l_int32 conn)
ptaGetNeighborPixLocs()
Definition: ptafunc1.c:2253
l_ok pixRasterop(PIX *pixd, l_int32 dx, l_int32 dy, l_int32 dw, l_int32 dh, l_int32 op, PIX *pixs, l_int32 sx, l_int32 sy)
pixRasterop()
Definition: rop.c:204
Definition: pix.h:492
Definition: pix.h:139
l_int32 special
Definition: pix.h:151
Definition: pix.h:456
Definition: pix.h:517
Definition: pix.h:531
struct Pta ** pta
Definition: pix.h:534
Definition: rbtree.h:62
void lept_stderr(const char *fmt,...)
lept_stderr()
Definition: utils1.c:306