62void threshold_image(uint8_t* ptr,
const int width,
const int height,
const int num_thresholds);
66 uint8_t* ptr,
const int width,
const int height,
const int num_thresholds
71 const uint8_t* data, uint8_t* out_data, int32_t* out_labels,
const int32_t width,
72 const int32_t height,
const int32_t k,
const int32_t max_iter,
const uint8_t color_space
77 uint8_t* image,
size_t width,
size_t height,
double sigma_spatial,
double sigma_range,
83 const uint8_t* data,
const int32_t* labels,
const int width,
const int height,
84 const int min_area,
const int min_thickness
89 const uint8_t* data,
const int width,
const int height,
const ImageToSvgConfig& config
void black_threshold_image(uint8_t *ptr, const int width, const int height, const int num_thresholds)
Apply black-thresholding to an image.
void gaussian_blur_fft(uint8_t *image, size_t width, size_t height, double sigma)
Apply a Gaussian blur to an image using FFT.
void bilateral_filter(uint8_t *image, size_t width, size_t height, double sigma_spatial, double sigma_range, uint8_t color_space)
Apply bilateral filtering to an image.
std::string image_to_svg(const uint8_t *data, const int width, const int height, const ImageToSvgConfig &config)
Convert labeled regions of an image into an SVG string.
std::string labels_to_svg(const uint8_t *data, const int32_t *labels, const int width, const int height, const int min_area, const int min_thickness)
Convert labeled regions of an image into an SVG string.
void threshold_image(uint8_t *ptr, const int width, const int height, const int num_thresholds)
Apply a thresholding operation to an image.
void invert_image(uint8_t *ptr, int width, int height)
Invert the pixel values of an image.
void kmeans(const uint8_t *data, uint8_t *out_data, int32_t *out_labels, const int32_t width, const int32_t height, const int32_t k, const int32_t max_iter, const uint8_t color_space)
Perform k-means clustering on image data.
Configuration settings for the bilateral filter in image_to_svg.
Configuration settings for K-Means in image_to_svg.
Configuration options for image_to_svg.
int min_cluster_area
Minimum area (in pixels) for a region to be included in the SVG.