HighMap library (C++)
Loading...
Searching...
No Matches
filters.hpp File Reference

Header file for filter-related functions and classes. More...

Go to the source code of this file.

Namespaces

namespace  hmap
namespace  hmap::gpu

Enumerations

enum class  hmap::DistanceMode : int { hmap::ASTERISK = 0 , hmap::PYRAMID = 1 }
 Directional pattern mode for distance shaper. More...
enum class  hmap::DistanceMethod : int { hmap::RT = 0 , hmap::CLASSIC = 1 }
 Method used to calculate distance. More...

Functions

Array hmap::bulkify (const Array &z, const PrimitiveType &primitive_type, float amp=1.f, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, glm::vec2 center={0.5f, 0.5f}, const UvRect &uv_rect=UvRect::unit())
 Applies a primitive-based displacement to an array.
void hmap::canyonize (Array &array, std::uint32_t seed=0, int nlevels=6, float convex_ratio=3.0f, float gamma_convex=3.0f, float gamma_concave=0.3f, float clamp_min_val=-std::numeric_limits< float >::infinity(), float k_smooth=0.1f, float noise_ratio=0.2f, const Array *p_noise=nullptr, float vmin=1.f, float vmax=0.f)
 Applies a canyonize filter to a heightmap.
void hmap::canyonize (Array &array, std::uint32_t seed, int nlevels, const Array *p_mask, float convex_ratio=3.0f, float gamma_convex=3.0f, float gamma_concave=0.3f, float clamp_min_val=-std::numeric_limits< float >::infinity(), float k_smooth=0.1f, float noise_ratio=0.2f, const Array *p_noise=nullptr, float vmin=1.f, float vmax=0.f)
 Applies a masked canyonize filter to a heightmap.
Array hmap::dequantize (const Array &array, std::uint32_t seed, float dither_amplitude=0.01f, int filtering_iterations=1)
 Reduce quantization artifacts using dithering and smoothing.
Array hmap::distance_shaper (const Array &array, float falloff=0.05f, int directions=8, float skew=0.f, float angle=0.f, DistanceMode mode=DistanceMode::PYRAMID, DistanceMethod method=DistanceMethod::RT, float angular_jitter=0.f, float falloff_jitter=0.f, float threshold=0.f, bool invert_input=false, bool invert_output=false, float mix_ratio=1.f, std::uint32_t seed=0, const Array *p_mask=nullptr, const Array *p_dx=nullptr, const Array *p_dy=nullptr)
 Generates sloped, stratified terrain profiles from shapes and masks using directional distance fields.
void hmap::equalize (Array &array)
 Apply histogram equalization to the array values.
void hmap::equalize (Array &array, const Array *p_mask)
 Apply histogram equalization to the array values with a mask.
void hmap::expand (Array &array, int ir, const Array *p_mask, int iterations=1)
 Apply expansion, or "inflation", to emphasize the bulk of the terrain.
void hmap::expand (Array &array, int ir, int iterations=1)
 Apply expansion to emphasize the bulk of the terrain using a filter radius.
void hmap::expand (Array &array, const Array &kernel, int iterations=1)
 Apply expansion using a custom kernel.
void hmap::expand (Array &array, const Array &kernel, const Array *p_mask, int iterations=1)
 Apply expansion using a custom kernel with an optional mask.
void hmap::expand_directional (Array &array, int ir, float angle, float aspect_ratio, float anisotropy=1.f, const Array *p_mask=nullptr)
 Apply expansion, or "inflation", to emphasize the bulk of the terrain, using a directional kernel.
void hmap::expand_talus (Array &z, const Array &mask, float talus, std::uint32_t seed, int ir=1, float noise_ratio=0.2f)
 Expand heights outward from a masked region with a talus slope limit.
void hmap::fill_talus (Array &z, float talus, std::uint32_t seed, int ir=1, float noise_ratio=0.2f, const Array *p_seed_mask=nullptr)
 Enforce a talus slope constraint on a height field.
void hmap::fill_talus (Array &z, const Array &talus, std::uint32_t seed, int ir=1, float noise_ratio=0.2f, const Array *p_seed_mask=nullptr)
void hmap::fold (Array &array, float vmin, float vmax, int iterations=3, float k=0.05f)
 Apply a "folding" filter (successive absolute values) to the array elements.
void hmap::fold (Array &array, int iterations=3, float k=0.05f)
 Apply a "folding" filter with default reference values and parameters.
void hmap::fold_periodic (Array &array, PhasorProfile phasor_profile, float vmin, float vmax, int iterations=3, float delta=0.f)
 Apply a periodic "folding" filter to the array elements using a periodic phasor profile.
void hmap::fold_periodic (Array &array, PhasorProfile phasor_profile=PhasorProfile::PP_COSINE_STD, int iterations=3, float delta=0.f)
 Apply a periodic "folding" filter with default reference values.
void hmap::gain (Array &array, float factor, const Array *p_mask)
 Apply a gain correction to the array elements.
void hmap::gain (Array &array, float factor)
 Apply a gain correction to the array elements without a mask.
void hmap::gamma_correction (Array &array, float gamma, const Array *p_mask)
 Apply gamma correction to the input array.
void hmap::gamma_correction (Array &array, float gamma)
 Apply gamma correction to the input array without a mask.
void hmap::gamma_correction_local (Array &array, float gamma, int ir, float k=0.1f)
 Apply a "local" gamma correction to the input array.
void hmap::gamma_correction_local (Array &array, float gamma, int ir, const Array *p_mask, float k=0.1f)
 Apply a "local" gamma correction with a mask to the input array.
void hmap::kuwahara (Array &array, int ir, float mix_ratio=1.f)
 Applies the Kuwahara filter to an array with optional per-pixel masking.
void hmap::kuwahara (Array &array, int ir, const Array *p_mask, float mix_ratio=1.f)
 Applies the Kuwahara filter to an array with optional per-pixel masking.
void hmap::laplace (Array &array, float sigma=0.125f, int iterations=3)
 Applies an iterative 8-neighbor Laplacian smoothing filter on an array.
void hmap::laplace (Array &array, const Array *p_mask, float sigma=0.125f, int iterations=3)
 Apply a low-pass Laplace filter with a mask.
void hmap::laplace1d (std::vector< float > &v, float sigma=0.5f, int iterations=1)
 Apply a low-pass Laplace filter to a vector.
void hmap::laplace_edge_preserving (Array &array, float talus, float sigma=0.2f, int iterations=3)
 Apply a low-pass anisotropic Laplace filter to the input array.
void hmap::laplace_edge_preserving (Array &array, float talus, const Array *p_mask, float sigma=0.2f, int iterations=3)
 Apply a low-pass anisotropic Laplace filter with a mask.
void hmap::low_pass_high_order (Array &array, int order=9, float sigma=1.f)
 Apply a low-pass high-order filter to the input array.
void hmap::make_binary (Array &array, float threshold=0.f)
 Convert array values to binary using a threshold.
void hmap::match_histogram (Array &array, const Array &array_reference)
 Transform the input array elevation to match the histogram of a reference array.
Array hmap::mean_shift (const Array &array, int ir, float talus, int iterations=1, bool talus_weighted=true)
 Applies the mean shift algorithm to the input array.
Array hmap::mean_shift (const Array &array, int ir, float talus, const Array *p_mask, int iterations=1, bool talus_weighted=true)
void hmap::median_3x3 (Array &array, const Array *p_mask)
 Apply a 3x3 median filter to the input array.
void hmap::median_3x3 (Array &array)
 Apply a 3x3 median filter to the input array without a mask.
Array hmap::median_pseudo (const Array &array, int ir)
 Computes a fast pseudo-median approximation of a local neighborhood in an array.
void hmap::normal_displacement (Array &array, float amount=0.1f, int ir=0, bool reverse=false)
 Apply a displacement to the terrain along the normal direction.
void hmap::normal_displacement (Array &array, const Array *p_mask, float amount=0.1f, int ir=0, bool reverse=false)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::plateau (Array &array, const Array *p_mask, int ir, float factor)
 Apply a plateau-shape filter to the input array.
void hmap::plateau (Array &array, int ir, float factor)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Array hmap::quantize (const Array &array, int nlevels, float vmin, float vmax)
 Quantize array values into discrete levels.
Array hmap::quantize (const Array &array, int nlevels)
 Quantize array values using the array min/max range.
void hmap::recast_billow (Array &array, float vref, float k)
 Transform heightmap to give a "billow" like appearance.
void hmap::recast_canyon (Array &array, const Array &vcut, float gamma=4.f)
 Transform heightmap to give a "canyon" like appearance.
void hmap::recast_canyon (Array &array, const Array &vcut, const Array *p_mask, float gamma=4.f)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::recast_canyon (Array &array, float vcut, const Array *p_mask, float gamma=4.f, const Array *p_noise=nullptr)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::recast_canyon (Array &array, float vcut, float gamma=4.f, const Array *p_noise=nullptr)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::recast_cracks (Array &array, float cut_min=0.05f, float cut_max=0.5f, float k_smoothing=0.01f, float vmin=0.f, float vmax=-1.f)
void hmap::recast_escarpment (Array &array, int ir=16, float ratio=0.1f, float scale=1.f, bool reverse=false, bool transpose_effect=false, float global_scaling=0.f)
 Applies an escarpment effect to the given 2D array, modifying its values based on cumulative displacement with optional directional and transpositional transformations.
void hmap::recast_escarpment (Array &array, const Array *p_mask, int ir=16, float ratio=0.1f, float scale=1.f, bool reverse=false, bool transpose_effect=false, float global_scaling=0.f)
 Applies an escarpment effect to the given 2D array, with an optional mask to blend the effect.
void hmap::recast_peak (Array &array, int ir, float gamma=2.f, float k=0.1f)
 Transform heightmap to give a "peak" like appearance.
void hmap::recast_peak (Array &array, int ir, const Array *p_mask, float gamma=2.f, float k=0.1f)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::recast_rocky_slopes (Array &array, float talus, int ir, float amplitude, std::uint32_t seed, float kw, float gamma=0.5f, const Array *p_noise=nullptr, const UvRect &uv_rect=UvRect::unit())
 Transform heightmap by adding "rock-like" features at higher slopes.
void hmap::recast_rocky_slopes (Array &array, float talus, int ir, float amplitude, std::uint32_t seed, float kw, const Array *p_mask, float gamma=0.5f, const Array *p_noise=nullptr, const UvRect &uv_rect=UvRect::unit())
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::recast_sag (Array &array, float vref, float k)
 Transform heightmap to give a "cliff" like appearance.
void hmap::recast_sag (Array &array, float vref, float k, const Array *p_mask)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::recurve (Array &array, const std::vector< float > &t, const std::vector< float > &v)
 Apply a curve adjustment filter to the array.
void hmap::recurve (Array &array, const std::vector< float > &t, const std::vector< float > &v, const Array *p_mask)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::recurve_bexp (Array &array, float tau=0.5f)
 Apply a curve adjustment filter using a "bumpy exponential-shape" curve.
void hmap::recurve_bexp (Array &array, const Array *p_mask, float tau=0.5f)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::recurve_exp (Array &array, float tau=0.5f)
 Apply a curve adjustment filter using a "sharp exponential-shape" curve.
void hmap::recurve_exp (Array &array, const Array *p_mask, float tau=0.5f)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::recurve_kura (Array &array, float a, float b)
 Apply a curve adjustment filter using Kumaraswamy's cumulative distribution function (CDF).
void hmap::recurve_kura (Array &array, float a, float b, const Array *p_mask)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::recurve_s (Array &array)
 Apply a curve adjustment filter using a smooth "S-shape" curve.
void hmap::recurve_s (Array &array, const Array *p_mask)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::recurve_smoothstep_rational (Array &array, float n)
 Apply a curve adjustment filter using an nth-order smoothstep curve.
void hmap::recurve_smoothstep_rational (Array &array, float n, const Array *p_mask)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::reverse_above_theshold (Array &array, const Array &threshold, float scaling=1.f, float transition_extent=0.f)
 Applies a smooth reversal of values above a given threshold.
void hmap::reverse_above_theshold (Array &array, float threshold, float scaling=1.f, float transition_extent=0.f)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::reverse_above_theshold (Array &array, const Array &threshold, const Array *p_mask, float scaling=1.f, float transition_extent=0.f)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::reverse_above_theshold (Array &array, float threshold, const Array *p_mask, float scaling=1.f, float transition_extent=0.f)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::ridge_accentuate (Array &array, float strength=0.1f, int ir=0, bool reverse=false)
 Accentuate ridges by gradient-directed resampling along the normal direction.
void hmap::ridge_accentuate (Array &array, const Array *p_mask, float strength=0.1f, int ir=0, bool reverse=false)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::saturate (Array &array, float vmin, float vmax, float from_min, float from_max, float k=0.f)
 Saturate the array values based on the input interval [vmin, vmax] (the output amplitude is not modified).
void hmap::saturate (Array &array, float vmin, float vmax, float k=0.f)
void hmap::saturate_percentile (Array &array, float percentile_low, float percentile_high, float k=0.f)
 Saturate values based on percentile range.
void hmap::sharpen (Array &array, float ratio=1.f)
 Apply a sharpening filter based on the Laplace operator.
void hmap::sharpen (Array &array, const Array *p_mask, float ratio=1.f)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::sharpen_cone (Array &array, int ir, float intensity=0.5f)
 Apply a sharpening filter based on a smooth cone filter.
void hmap::sharpen_cone (Array &array, const Array *p_mask, int ir, float scale=0.5f)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::shrink (Array &array, int ir, int iterations=1)
 Apply shrinking, or "deflating", to emphasize the ridges in the heightmap.
void hmap::shrink (Array &array, int ir, const Array *p_mask, int iterations=1)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::shrink (Array &array, const Array &kernel, int iterations=1)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::shrink (Array &array, const Array &kernel, const Array *p_mask, int iterations=1)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::shrink_directional (Array &array, int ir, float angle, float aspect_ratio, float anisotropy=1.f, const Array *p_mask=nullptr)
 Apply directional shrinking, or "deflating", to emphasize the ridges in the terrain.
void hmap::smooth_cone (Array &array, int ir)
 Apply a convolution filter with a cone kernel to smooth the array.
void hmap::smooth_cone (Array &array, int ir, const Array *p_mask)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::smooth_cpulse (Array &array, int ir, const Array *p_mask=nullptr, const UvTile &region=UvTile::dummy(), ICommunicator &comm=SingleArrayComm::instance())
 Apply filtering to the array using convolution with a cubic pulse kernel.
void hmap::smooth_cpulse_edge_removing (Array &array, float talus, float talus_width, int ir)
 Smooths an array while attenuating edges using a gradient-based pulse.
void hmap::smooth_flat (Array &array, int ir)
 Applies a smoothing average filter to the given 2D array in both dimensions.
void hmap::smooth_gaussian (Array &array, int ir)
 Apply Gaussian filtering to the array.
void hmap::smooth_gaussian (Array &array, int ir, const Array *p_mask)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::smooth_fill (Array &array, int ir, float k=0.1f, Array *p_deposition_map=nullptr)
 Apply cubic pulse smoothing to fill lower flat regions while preserving some sharpness.
void hmap::smooth_fill (Array &array, int ir, const Array *p_mask, float k=0.1f, Array *p_deposition_map=nullptr)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::smooth_fill_holes (Array &array, int ir)
 Apply smoothing to fill holes (elliptic concave surfaces).
void hmap::smooth_fill_holes (Array &array, int ir, const Array *p_mask)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::smooth_fill_smear_peaks (Array &array, int ir)
 Apply smoothing to smear peaks (elliptic convex surfaces).
void hmap::smooth_fill_smear_peaks (Array &array, int ir, const Array *p_mask)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::smoothstep_local (Array &array, int ir)
 Applies a localized smoothstep operation to the provided array.
void hmap::smoothstep_local (Array &array, int ir, const Array *p_mask)
 Applies a localized smoothstep operation to the provided array with an optional mask.
void hmap::steepen (Array &array, float scale, int ir=8)
 Steepen (or flatten) the array map.
void hmap::steepen (Array &array, float scale, const Array *p_mask, int ir=8)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::steepen_convective (Array &array, float angle, int iterations=1, int ir=0, float dt=0.1f)
 Steepen array values by applying a nonlinear convection operator in a given direction.
void hmap::steepen_convective (Array &array, float angle, const Array *p_mask, int iterations=1, int ir=0, float dt=0.1f)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::terrace (Array &array, std::uint32_t seed, int nlevels, float gain=0.9f, float noise_ratio=0.f, const Array *p_noise=nullptr, float vmin=0.f, float vmax=-1.f)
 Applies a terrace effect to the values in an array.
void hmap::terrace (Array &array, std::uint32_t seed, int nlevels, const Array *p_mask, float gain=0.9f, float noise_ratio=0.f, const Array *p_noise=nullptr, float vmin=0.f, float vmax=-1.f)
 Applies a terrace effect to an array with optional masking.
Array hmap::gpu::bilateral_filter (const Array &array, const Array &kernel2d, const Array &kernel1d, float kernel1d_value_scaling)
 Apply a bilateral filter to an array.
Array hmap::gpu::bilateral_filter (const Array &array, int ir, float kernel1d_value_scaling)
 Apply a bilateral filter to an array using a radius-based Gaussian kernel.
void hmap::gpu::directional_blur (Array &array, float radius, const Array &angle, int steps=32)
 Applies a directional blur to the input array.
void hmap::gpu::directional_blur (Array &array, float radius, const Array &angle, const Array *p_mask, int steps=32)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Array hmap::gpu::distance_shaper (const Array &array, float falloff=0.05f, int directions=8, float skew=0.f, float angle=0.f, DistanceMode mode=DistanceMode::PYRAMID, DistanceMethod method=DistanceMethod::RT, float angular_jitter=0.f, float falloff_jitter=0.f, float threshold=0.f, bool invert_input=false, bool invert_output=false, float mix_ratio=1.f, std::uint32_t seed=0, const Array *p_mask=nullptr, const Array *p_dx=nullptr, const Array *p_dy=nullptr)
 See hmap::distance_shaper.
void hmap::gpu::expand (Array &array, int ir, int iterations=1)
 See hmap::expand.
void hmap::gpu::expand (Array &array, int ir, const Array *p_mask, int iterations=1)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::gpu::expand (Array &array, const Array &kernel, int iterations=1)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::gpu::expand (Array &array, const Array &kernel, const Array *p_mask, int iterations=1)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::gpu::gamma_correction_local (Array &array, float gamma, int ir, float k=0.1f, MinMaxKernel kernel_type=MinMaxKernel::DISK)
 See hmap::gamma_correction_local.
void hmap::gpu::gamma_correction_local (Array &array, float gamma, int ir, const Array *p_mask, float k=0.1f, MinMaxKernel kernel_type=MinMaxKernel::DISK)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Array hmap::gpu::jagged (const Array &array, glm::vec2 kw, float amp=0.1f, std::uint32_t seed=0, glm::vec2 jitter={0.5f, 0.5f}, float gamma=1.f, float angle=0.f, const Array *p_mask=nullptr, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, const UvRect &uv_rect=UvRect::unit())
 Apply a Voronoi-based jagged bubble dome filter to an array.
Array hmap::gpu::jagged (const Array &array, float kw, float amp=0.1f, std::uint32_t seed=0, glm::vec2 jitter={0.5f, 0.5f}, float gamma=1.f, float angle=0.f, const Array *p_mask=nullptr, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, const UvRect &uv_rect=UvRect::unit())
 Apply a Voronoi-based jagged bubble dome filter using an isotropic frequency.
Array hmap::gpu::jagged_fbm (const Array &array, glm::vec2 kw, float amp=0.1f, std::uint32_t seed=0, int octaves=8, float persistence=0.5f, float lacunarity=2.f, bool switch_kx_ky=false, glm::vec2 jitter={0.5f, 0.5f}, float gamma=1.f, float angle=0.f, const Array *p_mask=nullptr, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, const UvRect &uv_rect=UvRect::unit())
 Apply a fractal Brownian motion (fBm) version of the Voronoi-based jagged bubble dome filter to an array.
Array hmap::gpu::jagged_fbm (const Array &array, float kw, float amp=0.1f, std::uint32_t seed=0, int octaves=8, float persistence=0.5f, float lacunarity=2.f, bool switch_kx_ky=false, glm::vec2 jitter={0.5f, 0.5f}, float gamma=1.f, float angle=0.f, const Array *p_mask=nullptr, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, const UvRect &uv_rect=UvRect::unit())
 Apply a fractal Brownian motion (fBm) version of the Voronoi-based jagged bubble dome filter using an isotropic frequency.
void hmap::gpu::laplace (Array &array, float sigma=0.2f, int iterations=3)
 See hmap::laplace.
void hmap::gpu::laplace (Array &array, const Array *p_mask, float sigma=0.2f, int iterations=3)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Array hmap::gpu::mean_shift (const Array &array, int ir, float talus, int iterations=1, bool talus_weighted=true)
 See hmap::mean_shift.
Array hmap::gpu::mean_shift (const Array &array, int ir, float talus, const Array *p_mask, int iterations=1, bool talus_weighted=true)
void hmap::gpu::median_3x3 (Array &array)
 See hmap::median_3x3.
void hmap::gpu::median_3x3 (Array &array, const Array *p_mask)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Array hmap::gpu::median_pseudo (const Array &array, int ir, MinMaxKernel kernel_type=MinMaxKernel::DISK)
 See hmap::median_pseudo.
void hmap::gpu::normal_displacement (Array &array, float amount=0.1f, int ir=0, bool reverse=false)
 See hmap::normal_displacement.
void hmap::gpu::normal_displacement (Array &array, const Array *p_mask, float amount=0.1f, int ir=0, bool reverse=false)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::gpu::plateau (Array &array, const Array *p_mask, int ir, float factor, MinMaxKernel kernel_type=MinMaxKernel::DISK)
 See hmap::plateau.
void hmap::gpu::plateau (Array &array, int ir, float factor, MinMaxKernel kernel_type=MinMaxKernel::DISK)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Array hmap::gpu::project_talus_along_direction (const Array &array, const Array &talus, int direction=0, float vmin=-FLT_MAX)
 Projects array values along a given direction using talus attenuation.
Array hmap::gpu::project_talus_along_direction (const Array &array, const Array &talus, const Array *p_mask, int direction=0, float vmin=-FLT_MAX)
void hmap::gpu::recast_cliff (Array &array, float talus, int ir, float amplitude, float gain=2.f, int iterations=500, Array *p_cliff_mask=nullptr, int sync_interval=0, const UvTile &region=UvTile::dummy(), ICommunicator &comm=SingleArrayComm::instance())
 Transform heightmap to add cliffs where gradients are steep enough using Poisson gradient amplification.
void hmap::gpu::recast_cliff (Array &array, float talus, int ir, float amplitude, const Array *p_mask, float gain=2.f, int iterations=500, Array *p_cliff_mask=nullptr, int sync_interval=0, const UvTile &region=UvTile::dummy(), ICommunicator &comm=SingleArrayComm::instance())
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::gpu::recast_cliff_directional (Array &array, float talus, int ir, float amplitude, float angle, float gain=2.f, int iterations=500, Array *p_cliff_mask=nullptr, int sync_interval=0, const UvTile &region=UvTile::dummy(), ICommunicator &comm=SingleArrayComm::instance())
 Transform heightmap to add directional cliffs where gradients are steep enough using Poisson gradient amplification.
void hmap::gpu::recast_cliff_directional (Array &array, float talus, int ir, float amplitude, float angle, const Array *p_mask, float gain=2.f, int iterations=500, Array *p_cliff_mask=nullptr, int sync_interval=0, const UvTile &region=UvTile::dummy(), ICommunicator &comm=SingleArrayComm::instance())
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::gpu::recast_cliff_directional (Array &array, float talus, int ir, float amplitude, const Array &angle, float gain=2.f, int iterations=500, Array *p_cliff_mask=nullptr, int sync_interval=0, const UvTile &region=UvTile::dummy(), ICommunicator &comm=SingleArrayComm::instance())
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::gpu::recast_cliff_directional (Array &array, float talus, int ir, float amplitude, const Array &angle, const Array *p_mask, float gain=2.f, int iterations=500, Array *p_cliff_mask=nullptr, int sync_interval=0, const UvTile &region=UvTile::dummy(), ICommunicator &comm=SingleArrayComm::instance())
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::gpu::ridge_accentuate (Array &array, float strength=0.1f, int ir=0, bool reverse=false)
 See hmap::ridge_accentuate.
void hmap::gpu::ridge_accentuate (Array &array, const Array *p_mask, float strength=0.1f, int ir=0, bool reverse=false)
 See hmap::ridge_accentuate.
void hmap::gpu::shrink (Array &array, int ir, int iterations=1)
 See hmap::shrink.
void hmap::gpu::shrink (Array &array, int ir, const Array *p_mask, int iterations=1)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::gpu::shrink (Array &array, const Array &kernel, int iterations=1)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::gpu::shrink (Array &array, const Array &kernel, const Array *p_mask, int iterations=1)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::gpu::smooth_cpulse (Array &array, int ir, const Array *p_mask=nullptr, const UvTile &region=UvTile::dummy(), ICommunicator &comm=SingleArrayComm::instance())
 See hmap::smooth_cpulse.
void hmap::gpu::smooth_cpulse_edge_removing (Array &array, float talus, float talus_width, int ir)
 See hmap::smooth_cpulse_edge_removing.
void hmap::gpu::smooth_fill (Array &array, int ir, float k=0.1f, Array *p_deposition_map=nullptr)
 See hmap::smooth_fill.
void hmap::gpu::smooth_fill (Array &array, int ir, const Array *p_mask, float k=0.1f, Array *p_deposition_map=nullptr)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::gpu::smooth_fill_holes (Array &array, int ir)
 See hmap::smooth_fill_holes.
void hmap::gpu::smooth_fill_holes (Array &array, int ir, const Array *p_mask)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void hmap::gpu::smooth_fill_smear_peaks (Array &array, int ir)
 See hmap::smooth_fill_smear_peaks.
void hmap::gpu::smooth_fill_smear_peaks (Array &array, int ir, const Array *p_mask)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Array hmap::gpu::spectral_equalizer (const Array &array, const std::vector< float > &weights, int ir_min, int ir_max)
 Spectral equalizer for 2D fields using a multiscale Gaussian pyramid.
Array hmap::gpu::spectral_equalizer (const Array &array, const std::vector< float > &weights, int ir_min, int ir_max, const Array *p_mask)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Array hmap::gpu::voronoi_shrink (const Array &array, glm::vec2 kw, float shrink_factor=0.8f, float fill_value=0.f, std::uint32_t seed=0, glm::vec2 jitter={0.5f, 0.5f}, float angle=0.f, const Array *p_mask=nullptr, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, const UvRect &uv_rect=UvRect::unit())
 Apply a Voronoi shrinker filter to an input heightmap.
Array hmap::gpu::voronoi_shrink (const Array &array, float kw, float shrink_factor=0.8f, float fill_value=0.f, std::uint32_t seed=0, glm::vec2 jitter={0.5f, 0.5f}, float angle=0.f, const Array *p_mask=nullptr, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, const UvRect &uv_rect=UvRect::unit())
 Apply a Voronoi shrinker filter using an isotropic frequency.
Array hmap::gpu::voronoi_shrink (const Array &array, const Cloud &cloud, float shrink_factor=0.8f, float fill_value=0.f, const Array *p_mask=nullptr, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, const UvRect &uv_rect=UvRect::unit())
 Apply a Voronoi shrinker filter using a custom cloud of points.
Array hmap::gpu::voronoi_shrink (const Array &array, const std::vector< Point > &points, float shrink_factor=0.8f, float fill_value=0.f, const Array *p_mask=nullptr, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, const UvRect &uv_rect=UvRect::unit())
 Apply a Voronoi shrinker filter using a list of Point objects.
Array hmap::gpu::voronoi_shrink (const Array &array, const std::vector< glm::vec2 > &points, float shrink_factor=0.8f, float fill_value=0.f, const Array *p_mask=nullptr, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, const UvRect &uv_rect=UvRect::unit())
 Apply a Voronoi shrinker filter using a list of glm::vec2 coordinates.

Detailed Description

Header file for filter-related functions and classes.

Author
Otto Link (otto..nosp@m.link.nosp@m..bv@g.nosp@m.mail.nosp@m..com)

This header file contains declarations for various filter functions and classes used within the project. These filters are typically used for processing data streams or collections according to specific criteria.