From 5bdf79a65d0711ed35782b7bfe2a051118e93457 Mon Sep 17 00:00:00 2001 From: Juri Dispan Date: Tue, 6 Feb 2024 15:15:34 +0100 Subject: [PATCH] pbmnoise, pgmhist, pgmkernel, pgmnoise, pgmramp, pgmtexture: add pages; ppmhist: modify page (#12202) --- pages/common/pbmnoise.md | 16 ++++++++++++++++ pages/common/pgmhist.md | 25 +++++++++++++++++++++++++ pages/common/pgmkernel.md | 17 +++++++++++++++++ pages/common/pgmnoise.md | 12 ++++++++++++ pages/common/pgmramp.md | 24 ++++++++++++++++++++++++ pages/common/pgmtexture.md | 12 ++++++++++++ pages/common/ppmhist.md | 5 +++-- 7 files changed, 109 insertions(+), 2 deletions(-) create mode 100644 pages/common/pbmnoise.md create mode 100644 pages/common/pgmhist.md create mode 100644 pages/common/pgmkernel.md create mode 100644 pages/common/pgmnoise.md create mode 100644 pages/common/pgmramp.md create mode 100644 pages/common/pgmtexture.md diff --git a/pages/common/pbmnoise.md b/pages/common/pbmnoise.md new file mode 100644 index 000000000..d60e5b69a --- /dev/null +++ b/pages/common/pbmnoise.md @@ -0,0 +1,16 @@ +# pbmnoise + +> Generate white noise. +> More information: . + +- Generate a PGM image containing white noise: + +`pbmnoise {{width}} {{height}} > {{path/to/output.pbm}}` + +- Specify the seed for the pseudo-random number generator: + +`pbmnoise {{width}} {{height}} -randomseed {{value}} > {{path/to/output.pbm}}` + +- Specify the desired rate of white to black pixels: + +`pbmnoise {{width}} {{height}} -ratio {{1/3}} > {{path/to/output.pbm}}` diff --git a/pages/common/pgmhist.md b/pages/common/pgmhist.md new file mode 100644 index 000000000..03259b17c --- /dev/null +++ b/pages/common/pgmhist.md @@ -0,0 +1,25 @@ +# pgmhist + +> Print a histogram of the values present in a PGM image. +> See also: `ppmhist`. +> More information: . + +- Display the histogram for human reading: + +`pgmhist {{path/to/image.pgm}}` + +- Display the median grey value: + +`pgmhist -median {{path/to/image.pgm}}` + +- Display four quartile grey value: + +`pgmhist -quartile {{path/to/image.pgm}}` + +- Report the existence of invalid grey values: + +`pgmhist -forensic {{path/to/image.pgm}}` + +- Display machine-readable output: + +`pgmhist -machine {{path/to/image.pgm}}` diff --git a/pages/common/pgmkernel.md b/pages/common/pgmkernel.md new file mode 100644 index 000000000..4d96f35cb --- /dev/null +++ b/pages/common/pgmkernel.md @@ -0,0 +1,17 @@ +# pgmkernel + +> Generate a convolution kernel to be used with `pnmconvol`. +> See also: `pnmconvol`. +> More information: . + +- Generate a convolution kernel: + +`pgmkernel {{width}} {{height}} > {{path/to/output.pgm}}` + +- Generate a quadratic convolution kernel: + +`pgmkernel {{size}} > {{path/to/output.pgm}}` + +- Specify the weight of the center in the generated kernel: + +`pgmkernel -weight {{value}} {{width}} {{height}} > {{path/to/output.pgm}}` diff --git a/pages/common/pgmnoise.md b/pages/common/pgmnoise.md new file mode 100644 index 000000000..a110cac3e --- /dev/null +++ b/pages/common/pgmnoise.md @@ -0,0 +1,12 @@ +# pgmnoise + +> Generate white noise. +> More information: . + +- Generate a PGM image containing white noise: + +`pgmnoise {{width}} {{height}} > {{path/to/output.pgm}}` + +- Specify the seed for the pseudo-random number generator: + +`pgmnoise {{width}} {{height}} -randomseed {{value}} > {{path/to/output.pgm}}` diff --git a/pages/common/pgmramp.md b/pages/common/pgmramp.md new file mode 100644 index 000000000..ab4b937c9 --- /dev/null +++ b/pages/common/pgmramp.md @@ -0,0 +1,24 @@ +# pgmramp + +> Generate a greyscale map. +> More information: . + +- Generate a left-to-right greyscale map: + +`pgmtexture -lr > {{path/to/output.pgm}}` + +- Generate a top-to-bottom greyscale map: + +`pgmtexture -tb > {{path/to/output.pgm}}` + +- Generate a rectangular greyscale map: + +`pgmtexture -rectangle > {{path/to/output.pgm}}` + +- Generate a elliptical greyscale map: + +`pgmtexture -ellipse {{path/to/image.pgm}} > {{path/to/output.pgm}}` + +- Generate a greyscale map from the top-left corner to the bottom-right corner: + +`pgmtexture -diagonal {{path/to/image.pgm}} > {{path/to/output.pgm}}` diff --git a/pages/common/pgmtexture.md b/pages/common/pgmtexture.md new file mode 100644 index 000000000..1959bf258 --- /dev/null +++ b/pages/common/pgmtexture.md @@ -0,0 +1,12 @@ +# pgmtexture + +> Extract textural features from a PGM image. +> More information: . + +- Extract textural features from a PGM image: + +`pgmtexture {{path/to/image.pgm}} > {{path/to/output.pgm}}` + +- Specify the distance parameter for the feature extraction algorithm: + +`pgmtexture -d {{distance}} {{path/to/image.pgm}} > {{path/to/output.pgm}}` diff --git a/pages/common/ppmhist.md b/pages/common/ppmhist.md index 461b29107..4d26a8389 100644 --- a/pages/common/ppmhist.md +++ b/pages/common/ppmhist.md @@ -1,15 +1,16 @@ # ppmhist > Print a histogram of the colors present in a PPM image. +> See also: `pgmhist`. > More information: . - Generate the histogram for human reading: -`ppmhist -nomap {{path/to/image_file.ppm}}` +`ppmhist -nomap {{path/to/image.ppm}}` - Generate a PPM file of the colormap for the image, with the color histogram as comments: -`ppmhist -map {{path/to/image_file.ppm}}` +`ppmhist -map {{path/to/image.ppm}}` - Display version: