Pamfind User Manual(1)

NAME
pamfind - Print the locations of all tuples of a certain value in an image

SYNOPSIS
pamfind { -target=sample0,sample1, ... | -color=color } [-machine] [imagefile]

All options can be abbreviated to their shortest unique prefix. You may use two hyphens instead of one. You may separate an option name and its value with white space instead of an equals sign.

DESCRIPTION

This program is part of Netpbm(1) .

pamfind reads a Netpbm image (PNM or PAM) and prints a list of all the locations (row and column) of the tuples that have a value you specify. For example, you can list all the places that a visual image is red.

You can specify the value in actual decimal sample values with a -target option or as a color with -color. If you specify -color, the program fails if the input image does not have depth 3. If it has depth 3 but the tuples aren't actually colors, you get results as if they are.

To do the opposite, see what tuple is at a given location, use pamcut and pamtable:

      $ pamcut -left=5 -top=7 -width=1 -height=1 | pamtable

ppmcolormask also finds all the tuples of a certain value, at least in visual images, but instead of printing their coordinates, it generates a mask image, which you can use to visualize where those tuples are or as input to another program.

OPTIONS

In addition to the options common to all programs based on libnetpbm (most notably -quiet, see
 Common Options index.html#commonoptions ), pamfind recognizes the following command line options:

-target=sample0,sample1, ... |
    This specifies the tuple value to find. You specify the sample values in order, and must specify the proper number of sample values for the depth of the image (e.g. 3 if it is a color image).

    You must specify exactly one of -target and -color.

-color=color
    This is the color to find, assuming the image is a color visual image.

    color is as described for the argument of the pnm_parsecolor() library routine (libnetpbm_image.html#colorname) .

    You must specify exactly one of -target and -color.

-machine
    This makes the output more convenient for a machine to use, while
      less convenient for a human. pamfind reports the same information
      as with no options.

    This option was new in Netpbm 10.87 (March 2020).

SEE ALSO
pamdepth(1) , pamgetcolor(1) , ppmhist(1) , ppmcolormask(1) , pamcut(1) , pamtable(1) , pam(1)

HISTORY

pamfind was added to Netpbm in Release 10.86 (March 2019).

DOCUMENT SOURCE
This manual page was generated by the Netpbm tool 'makeman' from HTML source. The master documentation is at

    http://netpbm.sourceforge.net/doc/pamfind.html