HighMap library (C++)
Loading...
Searching...
No Matches
colorize.cpp File Reference

Namespaces

namespace  hmap
 

Functions

void hmap::apply_hillshade (Texture &img, const Array &array, float vmin=0.f, float vmax=1.f, float exponent=1.f)
 Apply hillshading to a Tensor image.
 
void hmap::apply_hillshade (std::vector< uint8_t > &img, const Array &array, float vmin=0.f, float vmax=1.f, float exponent=1.f, bool is_img_rgba=false)
 Apply hillshading to an 8-bit image.
 
Texture hmap::colorize (const Array &array, float vmin, float vmax, int cmap, bool hillshading, bool reverse=false, const Array *p_noise=nullptr)
 Apply colorization to an array.
 
Texture hmap::colorize (const Array &array, float vmin, float vmax, const std::vector< float > &positions, const std::vector< glm::vec3 > &colormap_colors, bool reverse=false, const Array *p_noise=nullptr)
 Colorize a scalar field into a Texture using a custom colormap.
 
Texture hmap::colorize_bivariate (const Array &a1, const Array &a2, const glm::vec2 range1, const glm::vec2 range2, const std::vector< float > &positions1, const std::vector< float > &positions2, const std::vector< glm::vec3 > &colormap_colors1, const std::vector< glm::vec3 > &colormap_colors2, MixMethod method=MM_SQRT_AVG, bool reverse1=false, bool reverse2=false, const Array *p_noise1=nullptr, const Array *p_noise2=nullptr)
 Colorize two scalar fields into a Texture using two custom colormaps and a color mixing method.
 
Texture hmap::colorize_grayscale (const Array &array)
 Convert an array to a grayscale image.
 
Texture hmap::colorize_histogram (const Array &array)
 Convert an array to a histogram-based grayscale image.
 
Texture hmap::colorize_slope_height_heatmap (const Array &array, int cmap)
 Colorizes a slope height heatmap based on the gradient norms of a given array.
 
Texture hmap::colorize_vec2 (const Array &array1, const Array &array2)
 Combine two arrays into a colored image.
 
Array hmap::luminance (const Texture &tex)
 Compute luminance from a Texture.
 
Texture hmap::mix (const Texture &tex1, const Texture &tex2, MixMethod method=MM_SQRT_AVG)
 Mix two textures into an output texture.
 
Texture hmap::mix (const Texture &tex1, const Texture &tex2, const Array &mask, MixMethod method=MM_SQRT_AVG, float gain=1.f)
 Mix two textures based on a transparency mask.
 
Texture hmap::mix (const std::vector< const Texture * > &texs, MixMethod method=MM_SQRT_AVG)
 Mix a list of textures sequentially.
 
Texture hmap::mix_normal_map (const Texture &nmap_base, const Texture &nmap_detail, float detail_scaling, NormalMapBlendingMethod blending_method)
 Blend two normal maps into a single output normal map.