Skip to main content

Module sample

Module sample 

Source
Expand description

Functions and filters for the sampling of pixels.

Structsยง

Filter ๐Ÿ”’
A Representation of a separable filter.
FloatNearest ๐Ÿ”’
GaussianBlurParameters
Holds analytical gaussian blur representation
ThumbnailSum ๐Ÿ”’
Local struct for keeping track of pixel sums for fast thumbnail averaging

Enumsยง

FilterType
Available Sampling Filters.

Functionsยง

bc_cubic_spline ๐Ÿ”’
blur
Performs a Gaussian blur on the supplied image.
blur_advanced
Performs a Gaussian blur on the supplied image.
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.
filter3x3
Perform a 3x3 box filter on the supplied image.
gaussian ๐Ÿ”’
The Gaussian Function. r is the standard deviation.
gaussian_blur_dyn_image ๐Ÿ”’
gaussian_blur_indirect ๐Ÿ”’
gaussian_blur_indirect_impl ๐Ÿ”’
gaussian_kernel ๐Ÿ”’
Calculate the gaussian function with a standard deviation of 0.5
get_gaussian_kernel_1d ๐Ÿ”’
horizontal_sample ๐Ÿ”’
interpolate_bilinear
Linearly sample from an image using coordinates in [0, w-1] and [0, h-1].
interpolate_nearest
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
Resize the supplied image to the specified dimensions.
sample_bilinear
Linearly sample from an image using coordinates in [0, 1].
sample_nearest
Sample from an image using coordinates in [0, 1], taking the nearest coordinate.
sinc ๐Ÿ”’
thumbnail
Resize the supplied image to the specific dimensions.
thumbnail_sample_block ๐Ÿ”’
Get a pixel for a thumbnail where the input window encloses at least a full pixel.
thumbnail_sample_fraction_both ๐Ÿ”’
Get a single pixel for a thumbnail where the input window does not enclose any full pixel.
thumbnail_sample_fraction_horizontal ๐Ÿ”’
Get a thumbnail pixel where the input window encloses at least a vertical pixel.
thumbnail_sample_fraction_vertical ๐Ÿ”’
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.
unsharpen
Performs an unsharpen mask on the supplied image.
vertical_sample ๐Ÿ”’