Leptonica 1.68
C Image Processing Library

prog Directory Reference

Directory dependency graph for prog/:

Files

file  adaptmaptest.c [code]
 

Generates adaptive mappings in both gray and color, testing individual parts. Uses pixGetBackgroundGrayMap(), pixGetInvBackgroundMap(), pixApplyInvBackgroundGrayMap(), pixGetBackgroundRGBMap(), pixBackgroundNorm().


file  adaptnorm_reg.c [code]
 

Normalizes background by expanding dynamic range using pixContrastNorm() for very light text, or for rapidly varying background using pixBackgroundNormFlex().


file  affine_reg.c [code]
 

Tests various affine transformations: pixAffineSequential(), pixAffineSampledPta(), pixAffinePta(), and pixAffine().


file  alltests_reg.c [code]
 

Tests all the reg tests.


file  alphaclean_reg.c [code]
 

Tests transparency and cleaning under alpha.


file  alphaxform_reg.c [code]
 

Tests the alpha blending functions when used with various transforms (scaling, rotation, affine, projective, bilinear)


file  arithtest.c [code]
 

Demonstrates grayscale image arithmetic using pixAccumulate(), pixMultConstAccumulate(), and pixFinalAccumulate().


file  barcodetest.c [code]
 

For each barcode in the image, if the barcode format is supported, this deskews and crops it, and then decodes it twice: (1) as is (deskewed) (2) after 180 degree rotation.


file  baselinetest.c [code]
 

Demonstrates keystone warping correction using a projective transform and finding text baselines.


file  bilinear_reg.c [code]
 

Tests various bilinear transformations: pixBilinearSampledPta() and pixBilinearPta().


file  binarize_reg.c [code]
 

Tests Sauvola local binarization using pixSauvolaBinarize() and pixSauvolaBinarizeTiled().


file  bincompare.c [code]
 

Exploration of various ways to bitwise compare two binary images.


file  binmorph1_reg.c [code]
 

This is a thorough regression test of different methods for doing binary morphology.


file  binmorph2_reg.c [code]
 

Thorough regression test for binary separable rasterops, using the sequence interpreters. This compares the results for 2-way composite Sels with unitary Sels, all invoked on the separable block morph ops.


file  binmorph3_reg.c [code]
 

This is a regression test of dwa functions.


file  binmorph4_reg.c [code]
 

Regression test for dwa brick morph operations.


file  binmorph5_reg.c [code]
 

Regression test for expanded dwa morph operations.


file  blend2_reg.c [code]
 

Regression test for pixBlendWithGrayMask().


file  blend_reg.c [code]
 

Regression test for pixBlendGray(), pixBlendGrayAdapt(), and pixBlendColor().


file  blendcmaptest.c [code]
 

Regression test for blending colormaps using pixBlendCmap().


file  blendtest1.c [code]
 

Exploration of various pixel blending techniques.


file  buffertest.c [code]
 

Demonstrates using the bbuffer (byte buffer) operations.


file  byteatest.c [code]
 

Tests bytearray.c routines.


file  ccbordtest.c [code]
 

Comprehensive test for border-following representations of binary images.


file  cctest1.c [code]
 

Demonstrates using pixConnComp() and testing its speed.


file  ccthin1_reg.c [code]
 

Tests the "best" cc-preserving thinning functions. Displays all the strong cc-preserving 3x3 Sels.


file  ccthin2_reg.c [code]
 

Tests the examples in pixThinExamples().


file  cmapquant_reg.c [code]
 

Tests quantization of rgb image to a specific colormap. Does this by starting with a grayscale image, doing a grayscale quantization with a colormap in the dest, then adding new colors, scaling (which removes the colormap), and finally re-quantizing back to the original colormap.


file  colormask_reg.c [code]
 

Tests the ability to identify regions in HSV color space by analyzing the HS histogram and building masks that cover peaks in HS.


file  colormorphtest.c [code]
 

Tests color image morphology.


file  colorquant_reg.c [code]
 

Regression test for various color quantizers.


file  colorseg_reg.c [code]
 

This explores the space of the four parameters input for color segmentation: maxdist (the maximum distance between pixels that get clustered), selsize (responsible for smoothing the result), maxcolors and finalcolors.


file  colorsegtest.c [code]
 

Demonstrates unsupervised color segmentation using pixColorSegment().


file  colorspacetest.c [code]
 

Demonstrates various color techniques using pixConvertRGBToHSV(), pixOctreeQuantNumColors(), pixColorContent(), pixGlobalNormRGB(), pixColorMagnitude().


file  comparepages.c [code]
 

Demonstrates comparing text pages using the location of word bounding boxes with pixGetWordBoxesInTextlines() and numaaCompareImagesByBoxes(), The goal is to get a fast and robust determination for whether two pages are the same.


file  comparetest.c [code]
 

Compares two images, using either the absolute value of the pixel differences or the difference clipped to 0.


file  compfilter_reg.c [code]
 

Tests filters that select components based on size, areaPerimRatio, areaFraction, etc.


file  conncomp_reg.c [code]
 

Regression test for connected components (both 4 and 8 connected), including regeneration of the original image from the components. This is also an implicit test of rasterop.


file  contrasttest.c [code]
 

Enhances contrast of image using pixContrastTRC().


file  conversion_reg.c [code]
 

Regression test (_reg) for depth conversion functions including some of the octcube quantization.


file  convertfilestopdf.c [code]
 

Converts all image files in the given directory with matching substring to a pdf.


file  convertfilestops.c [code]
 

Converts all files in the given directory with matching substring to a level 3 compressed PostScript file, at the specified resolution.


file  convertformat.c [code]
 

Converts an image file from one format to another.


file  convertsegfilestopdf.c [code]
 

Converts all segmented image files in the given directory with matching substring to a mixed-raster pdf.


file  convertsegfilestops.c [code]
 

Converts all image files in a 'page' directory, using optional corresponding segmentation mask files in a 'mask' directory, to a level 2 compressed PostScript file.


file  converttogray.c [code]
 

Demonstrates converting a file to grayscale.


file  converttops.c [code]
 

Convert any image file to PS for embedding.


file  convolve_reg.c [code]
 

Tests a number of convolution functions.


file  convolvetest.c [code]
 

Exploration of various convolution operations using: pixBlockconvGray(), pixBlockconv(), pixBlockrank(), pixBlocksum(), pixCensusTransform(), and pixConvolve().


file  cornertest.c [code]
 

Demonstrates using pixFindCornerPixels().


file  croptext.c [code]
 

Simple program that crops text pages to a given border.


file  dewarp_reg.c [code]
 

Regression test for image dewarp based on text lines.


file  dewarptest.c [code]
 

Demonstrates image dewarping based on text lines.


file  digitprep1.c [code]
 

Extract barcode digits and put in a pixaa (a resource file for readnum.c).


file  distance_reg.c [code]
 

This tests pixDistanceFunction() for a variety of usage with all 8 combinations of these parameters: connectivity (4 or 8), dest depth (8 or 16), and boundary cond (L_BOUNDARY_BG or L_BOUNDARY_FG).


file  dithertest.c [code]
 

Demonstrates dithering using: pixDitherToBinary(), pixDitherTo2bpp(), pixScaleGray2xLIDither(), and pixScaleGray4xLIDither().


file  dwalinear.3.c [code]
 

Top-level fast binary morphology with auto-generated sels.


file  dwalineargen.c [code]
 

Generates the C code for the full set of linear Sels, for dilation, erosion, opening and closing, and for both horizontal and vertical operations, from length 2 to 63. These are put in files: dwalinear.3.c and dwalinearlow.3.c.


file  dwalinearlow.3.c [code]
 

Low-level fast binary morphology with auto-generated sels.


file  dwamorph1_reg.c [code]
 

Implements full regression test, including autogen of code, compilation, and running the result. (Works by running make so won't work under Windows)


file  dwamorph2_reg.c [code]
 

Fairly thorough regression test for autogen'd dwa.


file  edgetest.c [code]
 

Demontrates edge detection using pixSobelEdgeFilter().


file  endiantest.c [code]
file  enhance_reg.c [code]
 

Enhance with various gamma TRC mappings, hue, saturation, contrast, and sharpening.


file  equal_reg.c [code]
 

Tests the pixEqual() function in many situations. This also tests the quantization of grayscale and color images (to generate a colormapped image), and removal of the colormap to either RGB or grayscale.


file  expand_reg.c [code]
 

Tests of various image expansion techniques.


file  extrema_reg.c [code]
 

Tests procedure for locating extrema (minima and maxima) of a sampled function.


file  falsecolortest.c [code]
 

Demonstrates conversion from grayscale to false color using pixConvertGrayToFalseColor(), where the colormap is modeled after the Matlab "jet" configuration.


file  fcombautogen.c [code]
 

This program is used to generate the two files of dwa code for combs, that are used in linear composite dwa operations for brick Sels. These two files, when compiled, are used to implement all the composite dwa operations for brick Sels, that are generated by selaAddDwaCombs().


file  fhmtauto_reg.c [code]
 

Basic regression test for hit-miss transform: rasterops & dwa. Tests hmt from a set of hmt structuring elements by comparing the full image rasterop results with the automatically generated dwa results.


file  fhmtautogen.c [code]
 

This program is used to generate the two files of dwa code for the hit-miss transform. These two files, when compiled, implement hit-miss dwa operations for all sels generated by selaAddHitMiss().


file  fileinfo.c [code]
 

Returns information about the image data file.


file  findpattern1.c [code]
 

Demonstrates using a hit-miss sel to find the letter "c" in feyn.tif.


file  findpattern2.c [code]
 

Demonstrates generating a hit-miss sel by extracting the letter "c" and the word "Caltech" from feyn.tif and using pixGenerateSelRandom().


file  findpattern3.c [code]
 

Demonstrates generating a hit-miss sel by extracting the letter "c" and the word "Caltech" from feyn.tif and using pixGenerateSelBoundary().


file  findpattern_reg.c [code]
 

Uses pixGenerateSelBoundary() to generate hit-miss Sels that are a good fit for two 1 bpp patterns: a "T" in the banner name and the banner name ("Tribune").


file  flipdetect_reg.c [code]
 

Tests 90 degree orientation of text and whether the text is mirror reversed. Compares the rasterop with dwa implementations for speed. Shows the typical 'confidence' outputs from the functions in flipdetect.c.


file  flipselgen.c [code]
 

Generates dwa code for hit-miss transform (hmt) that is used in pixPageFlipDetectDWA().


file  fmorphauto_reg.c [code]
 

Basic regression test for erosion & dilation: rasterops & dwa. Tests erosion and dilation from 58 structuring elements by comparing the full image rasterop results with the automatically generated dwa results.


file  fmorphautogen.c [code]
 

This program is used to generate the two files of dwa code for the basic morphological operations. These two files, when compiled, implement dwa operations for all sels generated by selaAddBasic().


file  fpix_reg.c [code]
 

Regression test for a number of functions in the FPix utility. FPix allows you to do floating point operations such as convolution, with conversions to and from Pix.


file  gammatest.c [code]
 

Exploration of gamma adjustment using pixGammaTRC() and numaGammaTRC().


file  genfonts.c [code]
 

This program can be used to generate characters for a font and save them in .pixa format.


file  gifio_reg.c [code]
 

This tests reading and writing gif for various image types.


file  graphicstest.c [code]
 

Demonstrates line graphics using: pixRenderLineArb(), pixRenderLineBlend(), pixRenderBoxArb(), pixRenderBoxaBlend(), and pixRenderPolylineBlend().


file  grayfill_reg.c [code]
 

Regression test for various grayscale seed filling: pixSeedfillGray(), pixSeedfillGrayInv(), pixSeedfillGrayBasin(), and pixAddConstantGray().


file  graymorph1_reg.c [code]
 

(1) Tests the interpreter for grayscale morphology, as given in morphseq.c. (2) Tests composite operations: tophat and hdome. (3) Tests duality for grayscale erode/dilate, open/close, and black/white tophat. (4) Demonstrates closing plus white tophat. Note that this combination of operations can be quite useful. (5) Demonstrates a method of doing contrast enhancement by taking 3 * pixs and subtracting from this the closing and opening of pixs. (6) Playing around: extract the feynman diagrams from the stamp, using the tophat.


file  graymorph2_reg.c [code]
 

Compares graymorph results with special (3x1, 1x3, 3x3) cases against the general case.


file  graymorphtest.c [code]
 

Exploration of basic grayscale morphology.


file  grayquant_reg.c [code]
 

Tests gray thresholding to 1, 2 and 4 bpp, with and without colormaps.


file  hardlight_reg.c [code]
 

Regression test for pixBlendHardLight().


file  heap_reg.c [code]
 

Tests the heap utility.


file  histotest.c [code]
 

Makes histograms of grayscale and color pixels from a pix using pixOctcubeHistogram() or pixGetGrayHistogram(). For RGB color, this uses rgb --> octcube indexing.


file  inserttest.c [code]
 

Demonstrates removing and inserting to various array structures using: numaInsertNumber(), boxaInsertBox(), pixaInsertPix().


file  ioformats_reg.c [code]
 

This is the primary Leptonica regression test for lossless read/write I/O to standard image files (png, tiff, bmp, etc.)


file  iotest.c [code]
 

Tests all I/O except multipage/custom tiff and PostScript, which are separately tested in mtifftest and psiotest, respectively.


file  jbcorrelation.c [code]
 

Demonstrates unsupervised classification of collections of connected components in binary images using jbCorrelation().


file  jbrankhaus.c [code]
 

Demonstrates unsupervised classification of collections of connected components in binary images using jbRankHaus().


file  jbwords.c [code]
 

Demonstrates extracting and classifying words in textline order.


file  kernel_reg.c [code]
 

Test kernel creation, convolution,.


file  lineremoval.c [code]
 

Demonstrates removing dark lines from a light pencil drawing (see http://leptonica.com/line-removal.html for details).


file  listtest.c [code]
 

Exploration of the main functions in the generic list facility, given in list.c and list.h.


file  livre_adapt.c [code]
 

Shows two ways to normalize a document image for uneven illumination. It is somewhat more complicated than using the morphological tophat.


file  livre_hmt.c [code]
 

Makes Figures 7-8 in Chapter 18, "Document Image Applications" of the book "Mathematical morphology: from theory to applications"; demonstrates use of pixGenerateSelBoundary() to generate a hit-miss Sel.


file  livre_makefigs.c [code]
 

Makes all the figures in Chapter 18, "Document Image Applications" of the book "Mathematical morphology: from theory to applications", edited by Laurent Najman and hugues Talbot. Published by Hermes Scientific Publishing, Ltd, 2010.


file  livre_orient.c [code]
 

Generates an image of the set of 4 HMT Sels that are used for counting ascenders and descenders to detect text orientation.


file  livre_pageseg.c [code]
 

Makes Figures 2-5 in Chapter 18, "Document Image Applications" of the book "Mathematical morphology: from theory to applications"; demonstrates page segmentation.


file  livre_seedgen.c [code]
 

Makes Figure 1 in Chapter 18, "Document Image Applications" of the book "Mathematical morphology: from theory to applications"; demonstrates page segmentation.


file  livre_tophat.c [code]
 

Makes Figure 9 in Chapter 18, "Document Image Applications" of the book "Mathematical morphology: from theory to applications"; demonstrates tophat background cleaning.


file  locminmax_reg.c [code]
 

Tests pixLocalExtrema().


file  logicops_reg.c [code]
 

Tests pix3.c boolean operations.


file  lowaccess_reg.c [code]
 

Test low-level accessors: GET_DATA_BIT(), l_getDataBit(), pixGetPixel(), etc.


file  maketile.c [code]
 

Generates a single image tiling of all images of a specific depth in a directory.


file  maze_reg.c [code]
 

Tests the functions in maze.c: binary and gray maze search, largest rectangle in bg or fg.


file  misctest1.c [code]
 

Demonstrates: Combining two grayscale images using a mask with pixCombineMaskedGeneral() Combining two binary images using a mask with pixCombineMaskedGeneral() Doing a restricted seedfill with pixSeedfillBinaryRestricted() Colorizing a grayscale image with pixaDisplayRandomCmap() Converting color images to grayscale with pixConvertRGBToGray()


file  modifyhuesat.c [code]
 

Demonstrates modifying the hue and saturation of an image.


file  morphseq_reg.c [code]
 

Simple regression test for binary morph sequence (interpreter), showing display mode and rejection of invalid sequence components.


file  morphtest1.c [code]
 

Exploration of rasterop-based morphological operations.


file  mtifftest.c [code]
 

Exploration of multi-page tiff I/O and writing special tiff tags.


file  numa_reg.c [code]
 

Tests various numa functions: numaMakeHistogramClipped(), numaMakeSequence(), numaMakeHistogramAuto(), numaGetStatsUsingHistogram(), numaHistogramGetRankFromVal(), etc.


file  numaranktest.c [code]
 

Generates histogram rank vs value & value vs rank plots.


file  otsutest1.c [code]
 

Demonstrates theory behind Otsu splitting by generating plots of histogram and Otsu score function.


file  otsutest2.c [code]
 

Demonstrates the usefulness of the modified version of Otsu for thresholding an image that doesn't have a well-defined background color.


file  overlap_reg.c [code]
 

Tests the function that combines boxes that overlap into their bounding regions.


file  pagesegtest1.c [code]
 

Demonstrates Top level page segmentation using pixGetRegionsBinary().


file  pagesegtest2.c [code]
 

Demonstrates the use of binary morphology for some simple and fast document segmentation operations using: pixScaleToGray2(), pixReduceRankBinaryCascade(), pixOpenBrick(), pixCloseSafeBrick(), pixSeedfillBinary(), pixMorphCompSequence(), pixGetOuterBordersPtaa(). Probably same basic thing that pixGetRegionsBinary() does?


file  paint_reg.c [code]
 

Test various painting techniques: pixColorGray(), pixPaintThroughMask(), pixSetSelectCmap(), pixRenderLineArb(), pixRenderBoxArb(), pixRenderLineBlend(), and pixRenderBoxBlend().


file  paintmask_reg.c [code]
 

Regression test for painting through a mask onto various depth images.


file  partitiontest.c [code]
 

Demonstrates Bruel algorithm for extracting large whitespace boxes from a binary image using boxaGetWhiteblocks().


file  pdfiotest.c [code]
 

Tests PDF file I/O.


file  pdfseg_reg.c [code]
 

Generates segmented images and encodes them efficiently in a mixed-raster pdf.


file  pixa1_reg.c [code]
 

Tests removal of components using: pixConnComp() and pixSelectBySize().


file  pixa2_reg.c [code]
 

Tests various replacement functions on pixa.


file  pixaatest.c [code]
 

Regression test of pix splitting and pix array handling using pixaSplitPix().


file  pixadisp_reg.c [code]
 

Exercises various pixaDisplay*() functions: pixaDisplay(), pixaDisplayRandomCmap(), pixaDisplayOnLattice(), pixaDisplayUnsplit(), pixaDisplayTiled(), pixaDisplayTiledInRows(), and pixaDisplayTiledAndScaled().


file  pixalloc_reg.c [code]
 

Tests custom pix allocator.


file  pixcomp_reg.c [code]
 

Regression test for compressed pix and compressed pix arrays in memory.


file  pixmem_reg.c [code]
 

Tests the low-level pix data accessors, and functions that call them using: pixCopy(), pixTransferAllData(), pixClone(), pixExtractData(), and pixSetData().


file  pixserial_reg.c [code]
 

Tests the fast (uncompressed) serialization of pix to a string in memory and the deserialization back to a pix.


file  pixtile_reg.c [code]
 

Test pix tiling using: pixTilingCreate(), pixTilingGetTile(), pixTilingPaintTile(), and pixTilingDestroy().


file  plottest.c [code]
 

Regression test of the gplot library functions that generate the plot commands and data required for input to gnuplot.


file  pngio_reg.c [code]
 

Tests reading and writing of images in PNG format for various depths, with and without colormaps.


file  printimage.c [code]
 

Prints an image file.


file  printsplitimage.c [code]
 

Prints an image file on multiple pages.


file  printtiff.c [code]
 

Prints a multipage tiff file to a printer.


file  projection_reg.c [code]
 

Tests projection stats for rows and columns.


file  projective_reg.c [code]
 

Test projective image transformations using pixProjectiveSampledPta() and pixProjectivePta().


file  psio_reg.c [code]
 

Tests writing of images in PS, with arbitrary scaling and translation, in the following formats: uncompressed DCT compressed (jpeg for 8 bpp grayscale and RGB) CCITT-G4 compressed (g4 fax compression for 1 bpp) Flate compressed (gzip compression)


file  psioseg_reg.c [code]
 

This tests the PostScript output for images with mixed text and images, coming from source of different depths, with and without colormaps. Illustrates binary halftone segmentation, combining images with masks, PS generation.


file  pta_reg.c [code]
 

This tests several ptaa functions, including: ptaaGetBoundaryPixels(), pixRenderRandomCmapPtaa(), and ptaaGetPta().


file  ptra1_reg.c [code]
 

Testing basic ptra operations using: ptraRemove(), ptraInsert(), ptraSwap(), and ptraAdd().


file  ptra2_reg.c [code]
 

Testing basic ptra and ptraa operations, bin sort using ptra, boxaEqual() and pixaEqual().


file  quadtreetest.c [code]
 

Tests quadtree statistical functions.


file  rank_reg.c [code]
 

Tests grayscale rank functions: pixRankFilterGray(), pixScaleGrayMinMax(), and pixScaleGrayRankCascade().


file  rankbin_reg.c [code]
 

Tests rank bin functions: numaDiscretizeRankAndIntensity() and numaGetRankBinValues().


file  rankhisto_reg.c [code]
 

Tests grayscale rank functions: pixGetRankColorArray() and numaDiscretizeRankAndIntensity().


file  ranktest.c [code]
 

Tests rank filters on 8 and 32 bpp images.


file  rasterop_reg.c [code]
 

This is a fairly rigorous test of rasterop. It demonstrates both that the results are correct with many different rop configurations, and, if done under valgrind, that no memory violations occur.


file  rasteropip_reg.c [code]
 

Tests in-place operation using the general 2-image pixRasterop(). The in-place operation works because there is no overlap between the src and dest rectangles.


file  reducetest.c [code]
 

Generate reduced image via a rank binary cascade of up to four 2x reductions using pixReduceRankBinaryCascade().


file  removecmap.c [code]
 

Removes colormap from image.


file  renderfonts.c [code]
 

Exploration of various text drawing techniques.


file  rotate1_reg.c [code]
 

Regression test for rotation by shear and area mapping. Displays results when images are rotated sequentially multiple times.


file  rotate2_reg.c [code]
 

Regression test for rotation by shear, sampling and area mapping. Displays results from all the various types of rotations.


file  rotatefastalt.c [code]
 

Alternative (slightly slower) method for rotating color images, with antialiasing. This is here just for comparison with the better methods in the library.


file  rotateorth_reg.c [code]
 

Regression test for all rotateorth functions.


file  rotateorthtest1.c [code]
 

Exploration of 90 and 180 degree rotations.


file  rotatetest1.c [code]
 

Exploration of image rotation techniques.


file  rotatetest2.c [code]
 

Demonstrates image rotation.


file  runlengthtest.c [code]
 

Demonstrates labeling pixels by membership in runs using pixRunlengthTransform().


file  scale_reg.c [code]
 

This tests a number of scaling operations, through the pixScale() interface.


file  scaleandtile.c [code]
 

Generates a single image tiling of all images in a directory whose filename contains a given substring.


file  scaletest1.c [code]
 

Exploration of image scaling techniques.


file  scaletest2.c [code]
 

Exploration of scale-to-gray and color scaling.


file  seedfilltest.c [code]
 

Exploration of hole-filling and seedfilling.


file  seedspread_reg.c [code]
 

Tests the seedspreading (voronoi finding & filling) function for both 4 and 8 connectivity.


file  selio_reg.c [code]
 

Runs a number of tests on reading and writing of Sels.


file  sharptest.c [code]
 

Generate unsharp mask of image.


file  shear2_reg.c [code]
 

Regression test for quadratic shear, both sampled and interpolated.


file  shear_reg.c [code]
 

Regression test for shear, both IP and to new pix.


file  sheartest.c [code]
 

Exploration of image shearing techniques.


file  showedges.c [code]
 

Generates edges by using pixHalfEdgeByBandpass(), along with thresholding.


file  skew_reg.c [code]
 

Regression test for skew detection.


file  skewtest.c [code]
 

Exploration of various skew finding methods, optionally deskewing the input (binary) image. The best version does a linear sweep followed by a binary (angle-splitting) search.


file  smallpix_reg.c [code]
 

This is a regression test for scaling and rotation. The question to be answered is: in the quantization, where, if anywhere, do we add 0.5? The answer is that it should usually, but not always, be omitted. To see this, we operate on a very small pix and for visualization, scale up with replication to avoid aliasing and shifting.


file  smoothedge_reg.c [code]
 

Analyzes edges of a 1 bpp (connected component) image for smoothness.


file  snapcolortest.c [code]
 

Demonstrates adjusting one or more colors to a target color using pixSnapColor().


file  sorttest.c [code]
 

Demonstrates sorting pix arrays.


file  splitcomp_reg.c [code]
 

Regression test for splittings of a single component and for an image composed of several components, using different components and parameters.


file  splitimage2pdf.c [code]
 

Generates pdf of image tiles. Rotates the image before tiling if the tiles otherwise will have larger width than height.


file  string_reg.c [code]
 

This tests several sarray functions.


file  subpixel_reg.c [code]
 

Regression test for subpixel scaling.


file  sudokutest.c [code]
 

Tests sudoku solver.


file  textlinemask.c [code]
 

Exploration of ways to find textline masks for very simple geometries. To do this task for more general layout, use pagesegtest* programs.


file  threshnorm_reg.c [code]
 

Regression test for adaptive threshold normalization using: pixThresholdSpreadNorm() and pixThresholdToBinary().


file  translate_reg.c [code]
 

Regression test for in-place translation.


file  trctest.c [code]
 

Generate gamma adjusted image using pixGammaTRC().


file  viewertest.c [code]
 

Generate smaller images for viewing and write html.


file  warper_reg.c [code]
 

Regression test for captchas using pixRandomHarmonicWarp() and pixSimpleCaptcha().


file  warpertest.c [code]
 

Tests stereoscopic warp and associated shear and stretching functions. Uses gthumb for visually identifying problems.


file  watershedtest.c [code]
 

Demonstrates the watershed algorithmn using wshedCreate(), pixLocalExtrema(), pixSelectMinInConnComp(), and pixRemoveSeededComponents().


file  wordsinorder.c [code]
 

Demonstrates finding word boxes in line order by using pixGetWordBoxesInTextlines().


file  writemtiff.c [code]
 

Writes all matched files into a multipage tiff.


file  writetext_reg.c [code]
 

Regression test for writing a block of text in one of 4 locations relative to a pix. This tests writing on 8 different types of images.


file  xformbox_reg.c [code]
 

Tests ordered box transforms (rotation, scaling, translation). Also tests the various box hashing graphics operations.


file  xtractprotos.c [code]
file  xvdisp.c [code]
 

Display an image with xv.


file  yuvtest.c [code]
 

Tests the YUV to RGB conversion.



Detailed Description

and == NULL, or v.v.). (4) If both

genTempFilename()

Input: dir (directory name; use '.' for local dir; no trailing '/' and is invalid) tail (<optional> tailname, including extension if any; can be null or empty but can't contain '/') usetime (1 to include current time in microseconds in the filename; 0 to omit. usepid (1 to include pid in filename; 0 to omit. Return: temp filename, or null on error

Notes: (1) Use unix-style pathname separators ('/'). (2) Specifying the root directory (

) is invalid. (3) Specifying a containing '/' is invalid. (4) The most general form ( = = 1) is: <dir>/<usec>_<pid>_<tail> When = 1, = 0, the output filename is: <dir>/<usec>_<tail> When = 0, = 1, the output filename is: <dir>/<pid>_<tail> When = = 0, the output filename is: <dir>/<tail> Note: It is not valid to have = null or empty and have both = = 0. That is, there must be some non-empty tail name. (5) N.B. The caller is responsible for freeing the returned filename. For windows, to avoid C-runtime boundary crossing problems when using DLLs, you must use lept_free() to free the name. (6) For windows, if the caller requests the directory '/tmp', this uses GetTempPath() to select the actual directory, avoiding platform-conditional code in use. The directory selected is <Temp>/leptonica, where <Temp> is the Windows temp directory. (7) Set = = 1 when (a) more than one process is writing and reading temp files, or (b) multiple threads from a single process call this function, or (c) there is the possiblity of an attack where the intruder is logged onto the server and might try to guess filenames.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines