Basic manipulation |
|||||||||||||||||||||||||||||
thresh | Thresholds a gray scale PGM image to a binary PGM image.
Use as: If "-" (a single hyphen) is given as inputfile, input is read from stdin. This program produces a new image (on stdout) of the same size as the input image. Every gray pixel between lo and hi (inclusive) becomes white (255); all others become black (0). thresh 100 150 blocks.pgm > blocks_thresh.pgm |
||||||||||||||||||||||||||||
conrgn | Labels 4-connected components in a binary PGM image.
Use as: If "-" (a single hyphen) is given as inputfile, input is read from stdin. The output image (on stdout) will be black where the input image is black. Each nonblack pixel in the input image will be given a new grayscale output value that labels its connected component. If the image has fewer than 256 connected components, the program will output a grayscale PGM image, with each gray level (except 0) representing a component. If there are more than 255 connected components, the program will output a color PPM image, with each unique color representing a component. Giving a "g" or "c" argument before the input filename forces the output to be either grayscale or color. Forcing grayscale output when there are more than 255 regions will cause some labels to be reused. conrgn c blocks_thresh.pgm > blocks_reg.ppm |
||||||||||||||||||||||||||||
autocolor | Recolors a grayscale PGM image to make a color PPM image.
Use as: If "-" (a single hyphen) is given as inputfile, input is read from stdin. This program takes a grayscale image as input and produces on stdout a color PPM image of the same size as output. Each unique gray level in the input (except black) is mapped into a unique color. Black pixels are left alone. This program is most useful for viewing the output of conrgn. autocolor blocks_reg.pgm > blocks_reg.ppm |
||||||||||||||||||||||||||||
makeelement | Creates various simple binary PGM images.
Use as: This produces (on stdout) various simple binary PGMs of various shapes. You may find these useful as structuring elements for binary morphology operations (which you'll have to code for assignment 1). makeelement disk 9 > disk9.pgm |
||||||||||||||||||||||||||||
Edge detection |
|||||||||||||||||||||||||||||
canny_edge | Produces an edge image in PGM format where graylevel 0
represents
edge pixels and graylevel 255 represents background. Note that there
is no default setting for the parameters and also the name of the
output file is determined automatically (see the example below).
Implements the following Canny edge detector steps: canny blocks.pgm 0.60 0.50 0.90 |
||||||||||||||||||||||||||||
Object Recognition Toolkit |
|||||||||||||||||||||||||||||
chainpix | Produces a chained pixel list from a PGM binary image.
Takes input from stdin and writes output to stdout. See the output format here. chainpix < blocks.canny.pgm > blocks.cpx |
||||||||||||||||||||||||||||
fex | Segments chained pixel lists produced by chainpix into
straight-line segments and circular arcs.
Takes input from stdin and writes output to stdout. See the output format here. fex < blocks.cpx > blocks.fex |
||||||||||||||||||||||||||||
lpeg | Low-level straight-line grouping. Groups straight-line
segments
produced by fex into parallel line pairs and various kinds of line
junctions.
Takes input from stdin and writes output to stdout. See the output format here.
lpeg < blocks.fex > blocks.lpg |
||||||||||||||||||||||||||||
ipeg | Intermediate-level grouping. Groups the sets produced by lpeg
into triplets, corners, and polygons.
Takes input from stdin and writes output to stdout. See the output format here.
ipeg < blocks.lpg > blocks.ipg |
||||||||||||||||||||||||||||
ort2image | Takes the output of fex, lpeg, or ipeg, and draws the
straight-line and circular arc segments, producing a PGM image.
Takes input from stdin and writes output to stdout.
ort2image < blocks.ipg > blocks_drawn.pgm |