----------------------------------------------------------------* * Static debug helper * *----------------------------------------------------------------*/ * pixDebugFlipDetect() * * Input: filename (for output debug file) * pixs (input to pix*Detect) * pixhm (hit-miss result from ascenders or descenders) *
| 1102 | * Return: void |
| 1103 | */ |
| 1104 | static void |
| 1105 | pixDebugFlipDetect(const char *filename, |
| 1106 | PIX *pixs, |
| 1107 | PIX *pixhm, |
| 1108 | l_int32 enable) |
| 1109 | { |
| 1110 | PIX *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 | } |
no test coverage detected