14#include <lagrange/common.h>
15#include <lagrange/image/ImageView.h>
16#include <lagrange/image/api.h>
33 const image::ImageView<float>& density_map,
35 lagrange::Vertices2Df& samples);
62 lagrange::Vertices2Df& samples,
77 lagrange::Vertices2Df& samples);
93 lagrange::Vertices2Df& samples);
Definition: ImageView.h:56
LA_IMAGE_API void density_sample_borders(const image::ImageView< float > &density_map, size_t n_samples, lagrange::Vertices2Df &samples)
Populates a list of n_samples sample according to the density of the border pixeslin density_map.
Definition: image_sampling.cpp:116
LA_IMAGE_API float bilinear_interpolation(const image::ImageView< float > &image, float x, float y)
Samples a single point from the input image using bilinear interpolation.
Definition: image_sampling.cpp:209
LA_IMAGE_API float nearest_neighbor_interpolation(const image::ImageView< float > &image, float x, float y)
Performs nearest neighbor interpolation on an image.
Definition: image_sampling.cpp:229
LA_IMAGE_API float percentile(const image::ImageView< float > &image, const float x, const int num_bins=1000)
Calculate an approximation of the x-th percentile of an image using a histogram.
Definition: image_sampling.cpp:245
LA_IMAGE_API void regular_sample_borders(const image::ImageView< float > &density_map, size_t n_samples, lagrange::Vertices2Df &samples)
Populates a list of approximately n_samples sample points with integer coordinates,...
Definition: image_sampling.cpp:84
SampleType
Type of sampling to use.
Definition: image_sampling.h:41
@ Density
sample according to density map
@ Regular
sample regularly (ignores density)
LA_IMAGE_API void sample_from_density_map(const image::ImageView< float > &density_map, size_t n_samples, lagrange::Vertices2Df &samples)
Populates a list of approximately n_samples sample points with integer coordinates ranging from (0,...
Definition: image_sampling.cpp:23
LA_IMAGE_API void sample_borders(const image::ImageView< float > &density_map, size_t n_samples, lagrange::Vertices2Df &samples, SampleType type=SampleType::Regular)
Populates a list of n_samples samples with samples along the image borders.
Definition: image_sampling.cpp:70
Main namespace for Lagrange.
Definition: AABBIGL.h:30