Pamfind User Manual(1) | General Commands Manual | Pamfind User Manual(1) |
pamfind - Print the locations of all tuples of a certain value in an image
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.
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.
In addition to the options common to all programs based on
libnetpbm (most notably -quiet, see
Common Options ), pamfind recognizes the following command line
options:
You must specify exactly one of -target and -color.
color is as described for the argument of the pnm_parsecolor() library routine .
You must specify exactly one of -target and -color.
This option was new in Netpbm 10.87 (March 2020).
pamdepth(1), pamgetcolor(1), ppmhist(1), ppmcolormask(1), pamcut(1), pamtable(1), pam(1)
pamfind was added to Netpbm in Release 10.86 (March 2019).
This manual page was generated by the Netpbm tool 'makeman' from HTML source. The master documentation is at
13 March 2019 | netpbm documentation |