Module image::imageops::sample

source ยท
Expand description

Functions and filters for the sampling of pixels.

Structsยง

  • Filter ๐Ÿ”’
    A Representation of a separable filter.
  • FloatNearest ๐Ÿ”’
  • ThumbnailSum ๐Ÿ”’
    Local struct for keeping track of pixel sums for fast thumbnail averaging

Enumsยง

Functionsยง

  • bc_cubic_spline ๐Ÿ”’
  • Performs a Gaussian blur on the supplied image. sigma is a measure of how much to blur by.
  • box_kernel ๐Ÿ”’
    Calculate the box kernel. Only pixels inside the box should be considered, and those contribute equally. So this method simply returns 1.
  • catmullrom_kernel ๐Ÿ”’
    Calculate the Catmull-Rom cubic spline. Also known as a form of BiCubic sampling in two dimensions.
  • Perform a 3x3 box filter on the supplied image. kernel is an array of the filter weights of length 9.
  • gaussian ๐Ÿ”’
    The Gaussian Function. r is the standard deviation.
  • gaussian_kernel ๐Ÿ”’
    Calculate the gaussian function with a standard deviation of 0.5
  • horizontal_sample ๐Ÿ”’
  • Linearly sample from an image using coordinates in [0, w-1] and [0, h-1].
  • Sample from an image using coordinates in [0, w-1] and [0, h-1], taking the nearest pixel.
  • lanczos ๐Ÿ”’
  • lanczos3_kernel ๐Ÿ”’
    Calculate the lanczos kernel with a window of 3
  • Resize the supplied image to the specified dimensions. nwidth and nheight are the new dimensions. filter is the sampling filter to use.
  • Linearly sample from an image using coordinates in [0, 1].
  • Sample from an image using coordinates in [0, 1], taking the nearest coordinate.
  • sinc ๐Ÿ”’
  • Resize the supplied image to the specific dimensions.
  • Get a pixel for a thumbnail where the input window encloses at least a full pixel.
  • Get a single pixel for a thumbnail where the input window does not enclose any full pixel.
  • Get a thumbnail pixel where the input window encloses at least a vertical pixel.
  • Get a thumbnail pixel where the input window encloses at least a horizontal pixel.
  • triangle_kernel ๐Ÿ”’
    Calculate the triangle function. Also known as BiLinear sampling in two dimensions.
  • Performs an unsharpen mask on the supplied image. sigma is the amount to blur the image by. threshold is the threshold for minimal brightness change that will be sharpened.
  • vertical_sample ๐Ÿ”’