MCPcopy Create free account
hub / github.com/creatale/node-dv / pixDebugFlipDetect

Function pixDebugFlipDetect

deps/leptonica/src/flipdetect.c:1104–1123  ·  view source on GitHub ↗

----------------------------------------------------------------* * Static debug helper * *----------------------------------------------------------------*/ * pixDebugFlipDetect() * * Input: filename (for output debug file) * pixs (input to pix*Detect) * pixhm (hit-miss result from ascenders or descenders) *

Source from the content-addressed store, hash-verified

1102 * Return: void
1103 */
1104static void
1105pixDebugFlipDetect(const char *filename,
1106 PIX *pixs,
1107 PIX *pixhm,
1108 l_int32 enable)
1109{
1110PIX *pixt, *pixthm;
1111
1112 if (!enable) return;
1113
1114 /* Display with red dot at counted locations */
1115 pixt = pixConvert1To4Cmap(pixs);
1116 pixthm = pixMorphSequence(pixhm, "d5.5", 0);
1117 pixSetMaskedCmap(pixt, pixthm, 0, 0, 255, 0, 0);
1118
1119 pixWriteDebug(filename, pixt, IFF_PNG);
1120 pixDestroy(&pixthm);
1121 pixDestroy(&pixt);
1122 return;
1123}

Callers 2

pixUpDownDetectGeneralFunction · 0.85
pixMirrorDetectFunction · 0.85

Calls 5

pixConvert1To4CmapFunction · 0.85
pixMorphSequenceFunction · 0.85
pixSetMaskedCmapFunction · 0.85
pixWriteDebugFunction · 0.85
pixDestroyFunction · 0.85

Tested by

no test coverage detected