Leptonica 1.68
C Image Processing Library
|
Demonstrates theory behind Otsu splitting by generating plots of histogram and Otsu score function. More...
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "allheaders.h"
Go to the source code of this file.
Functions | |
static l_int32 | GenerateSplitPlot (l_int32 i) |
static NUMA * | MakeGaussian (l_int32 mean, l_int32 stdev, l_float32 fract) |
main (int argc, char **argv) | |
Variables | |
static const l_int32 | NTests = 5 |
static const l_int32 | gaussmean1 [5] = {20, 40, 60, 80, 60} |
static const l_int32 | gaussstdev1 [5] = {10, 20, 20, 20, 30} |
static const l_int32 | gaussmean2 [5] = {220, 200, 140, 180, 150} |
static const l_int32 | gaussstdev2 [5] = {15, 20, 40, 20, 30} |
static const l_float32 | gaussfract1 [5] = {0.2, 0.3, 0.1, 0.5, 0.3} |
static char | buf [256] |
Demonstrates theory behind Otsu splitting by generating plots of histogram and Otsu score function.
Definition in file otsutest1.c.
Definition at line 72 of file otsutest1.c.
References buf, gaussfract1, gaussmean1, gaussmean2, gaussstdev1, GPLOT_LINES, GPLOT_PNG, gplotAddPlot(), gplotCreate(), gplotDestroy(), gplotMakeOutput(), L_ARITH_ADD, MakeGaussian(), NULL, numaArithOp(), numaDestroy(), numaGetMax(), numaMakeConstant(), numaReplaceNumber(), and numaSplitDistribution().
Referenced by main().
Definition at line 132 of file otsutest1.c.
References numaMakeConstant(), numaSetValue(), and total.
Referenced by GenerateSplitPlot().
main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 38 of file otsutest1.c.
References buf, GenerateSplitPlot(), IFF_PNG, NTests, pixaCreate(), pixaDestroy(), pixaDisplay(), pixDestroy(), pixDisplay(), pixRead(), pixSaveTiled(), and pixWrite().
Definition at line 25 of file otsutest1.c.
Referenced by main().
const l_int32 gaussmean1[5] = {20, 40, 60, 80, 60} [static] |
Definition at line 26 of file otsutest1.c.
Referenced by GenerateSplitPlot().
const l_int32 gaussstdev1[5] = {10, 20, 20, 20, 30} [static] |
Definition at line 27 of file otsutest1.c.
Referenced by GenerateSplitPlot().
const l_int32 gaussmean2[5] = {220, 200, 140, 180, 150} [static] |
Definition at line 28 of file otsutest1.c.
Referenced by GenerateSplitPlot().
const l_int32 gaussstdev2[5] = {15, 20, 40, 20, 30} [static] |
Definition at line 29 of file otsutest1.c.
const l_float32 gaussfract1[5] = {0.2, 0.3, 0.1, 0.5, 0.3} [static] |
Definition at line 30 of file otsutest1.c.
Referenced by GenerateSplitPlot().
char buf[256] [static] |
Definition at line 31 of file otsutest1.c.
Referenced by BoxaSortTest(), cleanProtoSignature(), convertFilesTo1bpp(), DoPageSegmentation(), findFileFormatBuffer(), fpixaDisplayQuadtree(), generateColormapStringsPdf(), generateContentStringPdf(), generateFixedStringsPdf(), generatePagesObjStringPdf(), generatePageStringPdf(), generatePreXStringsPdf(), GenerateSplitPlot(), genTempFilename(), get_header_data(), gplotAddPlot(), gplotCreate(), gplotGenCommandFile(), gplotMakeOutput(), gplotRead(), jbDataWrite(), l_getFormattedDate(), main(), makeTrailerStringPdf(), PixaSortTest(), pixcmapConvertToHex(), pixSplitDistributionFgBg(), substituteObjectNumbers(), test_gif(), and TestImage().