38void add_kernel(Array &array,
const Array &kernel,
int i,
int j);
99Array
hstack(
const Array &array1,
const Array &array2);
138std::vector<float>
linspace(
float start,
141 bool endpoint =
true);
166 bool endpoint =
true);
181std::vector<float>
random_vector(
float min,
float max,
int num,
int seed);
213 const Array *p_ctrl_param,
214 const Array *p_noise_x,
215 const Array *p_noise_y,
216 const Array *p_stretching,
217 std::function<
float(
float,
float,
float)> fct_xy);
253 const Array *p_ctrl_param,
254 const Array *p_noise_x,
255 const Array *p_noise_y,
256 const Array *p_stretching,
257 std::function<
float(
float,
float,
float)> fct_xy,
320 bool patch_flip =
false,
321 bool patch_rotate =
false,
322 bool patch_transpose =
false,
323 std::vector<Array *> *p_secondary_arrays =
nullptr,
324 std::vector<Array> *p_secondary_patches =
nullptr);
338Array
vstack(
const Array &array1,
const Array &array2);
Declaration of the Array class for 2D floating-point arrays with various mathematical operations and ...
Provides core mathematical utilities for procedural generation, including trigonometry,...
Definition algebra.hpp:28
Array detrend_reg(const Array &array)
Apply linear regression for detrending of a 2D array.
Definition detrend.cpp:11
std::vector< float > linspace_jitted(float start, float stop, int num, float ratio, int seed, bool endpoint=true)
Generate a vector of jittered (noised) numbers over a specified interval.
Definition vector.cpp:66
Array get_random_patch(const Array &array, hmap::Vec2< int > patch_shape, std::mt19937 &gen, bool patch_flip=false, bool patch_rotate=false, bool patch_transpose=false, std::vector< Array * > *p_secondary_arrays=nullptr, std::vector< Array > *p_secondary_patches=nullptr)
Extracts a random sub-array (patch) from the input array, with optional transformations.
Definition stitching_helpers.cpp:132
void add_kernel_maximum_smooth(Array &array, const Array &kernel, float k_smooth, int i, int j)
Adds a smoothed maximum value from a kernel to a specified position in a 2D array.
Definition operator.cpp:36
std::vector< float > linspace(float start, float stop, int num, bool endpoint=true)
Generate a vector of evenly spaced numbers over a specified interval.
Definition vector.cpp:46
std::vector< float > random_vector(float min, float max, int num, int seed)
Generate a vector filled with random values within a specified range.
Definition vector.cpp:92
Array vstack(const Array &array1, const Array &array2)
Vertically stack two arrays.
Definition operator.cpp:85
Array generate_mask(hmap::Vec2< int > shape, std::vector< int > cut_path_i, int ir)
Generate a smooth mask based on a cut path.
Definition stitching_helpers.cpp:74
Array inpainting_diffusion(const Array &array, const Array &mask, int iterations)
Perform diffusion-based inpainting to fill a specified region of an array.
Definition inpainting_gaussian.cpp:13
Array hstack(const Array &array1, const Array &array2)
Horizontally stack two arrays side by side.
Definition operator.cpp:69
void fill_array_using_xy_function(Array &array, Vec4< float > bbox, const Array *p_ctrl_param, const Array *p_noise_x, const Array *p_noise_y, const Array *p_stretching, std::function< float(float, float, float)> fct_xy)
Fill an array using a scalar function based on (x, y) coordinates.
Definition fill_array.cpp:12
void find_vertical_cut_path(const Array &error, std::vector< int > &path_i)
Find the vertical cut path with the minimum cost using Dijkstra's algorithm.
Definition stitching_helpers.cpp:21
void add_kernel(Array &array, const Array &kernel, int i, int j)
Add a kernel to a specified position in an array.
Definition operator.cpp:12
Vec2 class for basic manipulation of 2D vectors.
Definition algebra.hpp:40