Extract textural features from a PGM image. More information: https://netpbm.sourceforge.net/doc/pgmtexture.html.
pgmtexture path/to/image.pgm > path/to/output.pgm
pgmtexture -d distance path/to/image.pgm > path/to/output.pgm