Img2Num C
API Documentation
cimg2num.h
Go to the documentation of this file.
1 
8 #ifndef CIMG2NUM_H
9 #define CIMG2NUM_H
10 
11 #include <stdbool.h>
12 #include <stddef.h>
13 #include <stdint.h>
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
20 void img2num_gaussian_blur_fft(uint8_t *image, size_t width, size_t height, double sigma);
21 
23 void img2num_invert_image(uint8_t *ptr, int width, int height);
24 
26 void img2num_threshold_image(uint8_t *ptr, const int width, const int height,
27  const int num_thresholds);
28 
30 void img2num_black_threshold_image(uint8_t *ptr, const int width, const int height,
31  const int num_thresholds);
32 
34 void img2num_kmeans(const uint8_t *data, uint8_t *out_data, int32_t *out_labels,
35  const int32_t width, const int32_t height, const int32_t k,
36  const int32_t max_iter, const uint8_t color_space);
37 
39 void img2num_bilateral_filter(uint8_t *image, size_t width, size_t height, double sigma_spatial,
40  double sigma_range, uint8_t color_space);
41 
43 char *img2num_labels_to_svg(uint8_t *data, int32_t *labels, const int width, const int height,
44  const int min_area, const bool draw_contour_borders);
45 
46 #ifdef __cplusplus
47 }
48 #endif
49 
50 #endif // CIMG2NUM_H
void img2num_invert_image(uint8_t *ptr, int width, int height)
Invert the pixel values of an image.
Definition: cimg2num.cpp:12
char * img2num_labels_to_svg(uint8_t *data, int32_t *labels, const int width, const int height, const int min_area, const bool draw_contour_borders)
Convert labeled regions of an image into an SVG string.
Definition: cimg2num.cpp:41
void img2num_threshold_image(uint8_t *ptr, const int width, const int height, const int num_thresholds)
Apply a thresholding operation to an image.
Definition: cimg2num.cpp:16
void img2num_gaussian_blur_fft(uint8_t *image, size_t width, size_t height, double sigma)
Apply a Gaussian blur to an image using FFT.
Definition: cimg2num.cpp:8
void img2num_black_threshold_image(uint8_t *ptr, const int width, const int height, const int num_thresholds)
Apply black-thresholding to an image.
Definition: cimg2num.cpp:22
void img2num_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.
Definition: cimg2num.cpp:28
void img2num_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.
Definition: cimg2num.cpp:35