From 851f8a113827e42ae618423fdab09cb0a67dc4e4 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Thu, 7 Sep 2023 16:26:28 +0000 Subject: miscellaneous update git-svn-id: http://svn.code.sf.net/p/netpbm/code/userguide@4637 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- pamaddnoise.html | 99 ++++++++++++++++++++++++++++++++++++++------------------ pbmmake.html | 9 +++--- ppmrough.html | 86 +++++++++++++++++++++--------------------------- 3 files changed, 108 insertions(+), 86 deletions(-) diff --git a/pamaddnoise.html b/pamaddnoise.html index 3a0f3903..0d1609bd 100644 --- a/pamaddnoise.html +++ b/pamaddnoise.html @@ -2,7 +2,7 @@ Pamaddnoise User Manual

pamaddnoise

-Updated: 12 December 2020 +Updated: 21 August 2023
Table Of Contents @@ -81,60 +81,97 @@ Common Options), pamaddnoise recognizes the following command line options:
-
-lambda value +
-type noise_type + +
+Select type of noise by name. The following noise types are +available: gaussian, multiplicative_gaussian, impulse, laplacian, +poisson. Only enough letters to be unique are required for the noise +type option. The default noise type is gaussian. + +
+
gaussian +
To each sample value is added the value of a two Gaussian random variables. + The variance of one is independent of the sample value, while the variance + of the other is proportional to the sample value. You control these + variances with options -sigma1 and -sigma2 (and can eliminate + either by setting the variance to 0). The mean of the Gaussian + distributions is 0. + +
multiplicative_gaussian +
impulse +
This is "salt and pepper" noise. Samples are changed randomly + to zero or full brightness or left alone. This is also know as salt and + pepper noise, as in a grayscale picture, it adds white pixels and black + pixels, which look like salt and pepper, respectively. Control this with + options -tolerance and -salt. + +
laplacian + +
poisson +
-
This is the expected value of the Poisson distribution for a sample value - of mximum intensity. The expected value for other intensities is - proportional; e.g. for half intensity, it is half this value. +
-lambda value -

This is meaningful only with -type=poisson. +

+This is valid only with -type=poisson. It is the expected value +of the Poisson distribution for a sample value of mximum intensity. The +expected value for other intensities is proportional; e.g. for half intensity, +it is half this value.

The default value is 12.

-lsigma value -
Used for laplacian noise only. The default value is 10.0. +
This is menaingful only for laplacian noise. + +

The default value is 10.0.

-mgsigma value -
Used for multiplicative gaussian noise only. The default value is -0.5. +
This is valid only for multiplicative gaussian noise. + +

The default value is 0.5.

-seed int -
Used for all noise types. Set the initial random number generator -seed value. +
This is the random number generator seed value. Use this to get + repeatable results.
-sigma1 value -
Used for gaussian noise only. The default value is 4.0. +
This is valid only for gaussian noise. It is the standard deviation + of the Gaussian random variable that is multiplied by the square root of + each sample value and added to that sample value. +

+ The default value is 4.0.

-sigma2 value -
Used for gaussian noise only. The default value is 20.0. +
This is valid only for gaussian noise. + It is the standard deviation of the Gaussian random variable that is + added directly to each sample value. +

+The default value is 20.0. -

-tolerance ratio +
-tolerance fraction -
-Used for impulse noise only. The default value is 0.10. This means -that 5% of all pixel values will be set to 0 and 5% will be set to -the maxval +
This is valid only for impulse noise. + fraction is the fraction of samples that are changed + in the output. Whether each is changed to salt or pepper is controlled by + -salt. -
-type noise_type +

The default value is 0.10. -

-Select type of noise by name. The following noise types are -available: gaussian, multiplicative_gaussian, impulse, laplacian, -poisson. Only enough letters to be unique are required for the noise -type option. The default noise type is gaussian. +
-salt=fraction +
This is valid only for impulse noise. fraction is the + fraction of the pixels that are changed that are changed to salt (maxval); + the rest are changed to pepper (0). -
    -
  • gaussian -
  • multiplicative_gaussian -
  • impulse -
  • laplacian -
  • poisson -
+

The default is 0.5 (half salt, half pepper). + +

This option was new in Netpbm 11.04 (September 2023). Before that, the + noise is always half salt and half pepper.

diff --git a/pbmmake.html b/pbmmake.html index 06afbb73..4ed8358b 100644 --- a/pbmmake.html +++ b/pbmmake.html @@ -40,12 +40,11 @@ command line options:
-black
-gray -

In addition to the usual -white and -black, this -program implements -gray. This gives a simple 50% gray pattern -with 1's and 0's alternating. +

These options specify the color of the output. -white means +all pixels are white. -black means all pixels are black. +-gray means black and white pixels alternate. -

With none of the above specified, the output image will be entirely -white. +

You may specify only one of these. The default is all white. diff --git a/ppmrough.html b/ppmrough.html index 7ecc343d..e31c4221 100644 --- a/ppmrough.html +++ b/ppmrough.html @@ -2,12 +2,13 @@ Ppmrough User Manual

ppmrough

-Updated: 28 January 2022 +Updated: 20 August 2023
Table Of Contents

NAME

-ppmrough - create PPM image of two colors with a ragged border between them +ppmrough - create PPM image of a single color rectangle with ragged edges on a +different color background

SYNOPSIS

@@ -43,37 +44,27 @@ name and its value with white space instead of an equals sign.

This program is part of Netpbm. -

ppmrough generates a PPM image of the specified width, height, and -colors. ppmrough tiles the image into semi-rectangular regions with a -ragged borders between them. It calculates the fluctuations with -pseudo-random numbers. +

ppmrough generates a PPM image of the specified width and height. + The image consists of a rectangle of the specified foreground color + surrounded by borders of the specified size and background color, except + that the boundary between the foreground rectangle and the borders is + ragged. The ragged effect is random.

ppmrough writes the PPM image to Standard Output.

The maxval of the output image is 255 (You can change this with pamdepth). -

Use the options -left or -right, respectively, to -make vertical borders, and -top or -bottom, -respectively, to generate horizontal borders inside the image. Each of -these options needs an integer value pixels that determines the -average distance of the interior border to the related edge of the -image. You may combine the -left, -right, -top, -and -bottom options to generate an image with more than one -border. The algorithm ensures that you can concatenate two images -produced with the same (i.e. -left) value without dislocations. - -

You specify the dimensions of the generated image with the --width and -height options. - -

Use the -bg and -fg options to set the background -(margin) color and the foreground (interior) color, respectively. If -you don't specify any of the -left, -right, -top, -and -bottom options, all pixels are set to foreground color. -The defaults are white foreground and black background. +

Use the options -left or -right, respectively, to make +vertical borders, and -top or -bottom, respectively, to generate +horizontal borders inside the image. The value of each of these options is +the minimum width of the border on that edge. Beyond that minimum, the width +at any given location on that edge is random, varying along the edge in a +fractal kind of way. +

Use the -var option to control the "raggedness" of -the border. The less its value is the smoother the border is. You +the border. The lower its value, the smoother the border is. You can initialize the pseudo-random generator with the -init option. @@ -88,51 +79,46 @@ Common Options), ppmrough recognizes the following command line options:

-
-left=pixels - -
Specifies the mean distance of the border from the left margin -(default: no border). -
-right=pixels +
-width=pixels -
Specifies the mean distance of the border from the right margin -(default: no border). +
This specifies the width of the image in pixels (default: 100). -
-top=pixels +
-height=pixels -
Specifies the mean distance of the border from the top margin -(default: no border). +
This specifies the height of the image in pixels (default: 100). +
-left=pixels +
-right=pixels +
-top=pixels
-bottom=pixels -
Specifies the mean distance of the border from the bottom margin -(default: no border). - -
-width=pixels - -
Specifies the width of the image (default: 100). - -
-height=pixels - -
Specifies the height of the image (default: 100). +
This option causes the program to create a left, right, top, or bottom +border, respectively, at least pixels pixels wide, varying randomly +beyond that. You may specify any combination of these.
-bg=colorspec -
Background color. colorspec is as described for the +
This is the background color, i.e. the color of the +borders. colorspec is as described for the argument of the pnm_parsecolor() library routine. Default is black.
-fg=color -
Foreground color. colorspec is as described for the +
This specifies the foreground color, i.e. the color of the center of the +mage -- everything but the borders. colorspec is as described for the argument of the pnm_parsecolor() library routine. Default is white.
-var=pixels -
Specifies the variance of the ragged border (default: 10). Must -be a positive integer. Set pixels to 1 to get a straight -border. +
This specifies how ragged the borders are -- how much and how quickly its +width varies along the image edge. Its specific meaning is complex, but the +larger it is, the more the border varies. Zero means it does not vary at all +-- the edge of the foreground is straight. + +

This must be a nonnegative integer. The default is 10.

-randomseed=seed -- cgit 1.4.1