59static std::map<std::string, int> normal_map_blending_method_as_string = {
62 {
"Unreal Developer Network",
NMAP_UDN},
111 float exponent = 1.f);
135 float exponent = 1.f,
136 bool is_img_rgba =
false);
161 glm::ivec2 dither_seed);
186 const glm::vec3 &color,
187 float tolerance = 0.f);
210 bool reverse =
false,
211 const Array *p_noise =
nullptr);
234 const std::vector<float> &positions,
235 const std::vector<glm::vec3> &colormap_colors,
236 bool reverse =
false,
237 const Array *p_noise =
nullptr);
277 const glm::vec2 range1,
278 const glm::vec2 range2,
279 const std::vector<float> &positions1,
280 const std::vector<float> &positions2,
281 const std::vector<glm::vec3> &colormap_colors1,
282 const std::vector<glm::vec3> &colormap_colors2,
284 bool reverse1 =
false,
285 bool reverse2 =
false,
286 const Array *p_noise1 =
nullptr,
287 const Array *p_noise2 =
nullptr);
444Texture mix(
const std::vector<const Texture *> &texs,
464 float detail_scaling,
Declaration of the Array class for 2D floating-point arrays with various mathematical operations and ...
Array class, helper to manipulate 2D float array with "(i, j)" indexing.
Definition array.hpp:32
A class to represent a multi-channel texture using planar hmap::Array storage.
Definition texture.hpp:37
Definition algebra.hpp:23
Texture 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.
Definition colorize.cpp:243
Array color_match_mask(const Array &r, const Array &g, const Array &b, const glm::vec3 &color, float tolerance=0.f)
Create a mask of pixels matching a target color within a tolerance.
Definition color_match_mask.cpp:12
Texture 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.
Definition colorize.cpp:714
Texture colorize_vec2(const Array &array1, const Array &array2)
Combine two arrays into a colored image.
Definition colorize.cpp:497
void color_adjust(Array &r, Array &g, Array &b, ColorAdjust param, glm::ivec2 dither_seed)
Apply color correction and tonemapping to RGB arrays.
Definition color_adjust.cpp:31
void 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.
Definition colorize.cpp:27
Texture 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.
Definition colorize.cpp:108
Texture colorize_grayscale(const Array &array)
Convert an array to a grayscale image.
Definition colorize.cpp:405
void gain(Array &array, float factor, const Array *p_mask)
Apply a gain correction to the array elements.
Definition filters.cpp:198
NormalMapBlendingMethod
Definition colorize.hpp:51
@ NMAP_UDN
Definition colorize.hpp:54
@ NMAP_UNITY
Definition colorize.hpp:55
@ NMAP_WHITEOUT
Definition colorize.hpp:56
@ NMAP_DERIVATIVE
Definition colorize.hpp:53
@ NMAP_LINEAR
Definition colorize.hpp:52
Cmap
Enumeration for different colormap types.
Definition colormaps.hpp:83
MixMethod
Methods for mixing/blending texture colors.
Definition colorize.hpp:44
@ MM_MIXBOX
Physical pigment-based mixing (Mixbox).
Definition colorize.hpp:47
@ MM_SQRT_AVG
Square-root average mixing.
Definition colorize.hpp:46
@ MM_LINEAR
Linear RGB mixing.
Definition colorize.hpp:45
Texture mix(const Texture &tex1, const Texture &tex2, MixMethod method=MM_SQRT_AVG)
Mix two textures into an output texture.
Definition colorize.cpp:550
Texture colorize_slope_height_heatmap(const Array &array, int cmap)
Colorizes a slope height heatmap based on the gradient norms of a given array.
Definition colorize.cpp:450
Texture colorize_histogram(const Array &array)
Convert an array to a histogram-based grayscale image.
Definition colorize.cpp:413
Array luminance(const Texture &tex)
Compute luminance from a Texture.
Definition colorize.cpp:544
Definition colorize.hpp:68
float in_min
Definition colorize.hpp:69
float dither_amp
Definition colorize.hpp:76
float temperature
Definition colorize.hpp:74
float saturation
Definition colorize.hpp:73
bool agx_tonemap
Definition colorize.hpp:79
bool aces_tonemap
Definition colorize.hpp:78
float contrast
Definition colorize.hpp:72
bool filmic_tonemap
Definition colorize.hpp:77
float exposure
Definition colorize.hpp:71
float gamma
Definition colorize.hpp:75
float in_max
Definition colorize.hpp:70
Header file for the Texture class.