|
Img2Num C
API Documentation
|
Core image processing functions for img2num project. More...
#include <stdbool.h>#include <stddef.h>#include <stdint.h>
Include dependency graph for cimg2num.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Functions | |
| 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. More... | |
| void | img2num_invert_image (uint8_t *ptr, int width, int height) |
| Invert the pixel values of an image. More... | |
| void | img2num_threshold_image (uint8_t *ptr, const int width, const int height, const int num_thresholds) |
| Apply a thresholding operation to an image. More... | |
| void | img2num_black_threshold_image (uint8_t *ptr, const int width, const int height, const int num_thresholds) |
| Apply black-thresholding to an image. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
Core image processing functions for img2num project.
This file declares functions for image manipulation, clustering, filtering, and conversion to SVG. Functions operate on raw image buffers (uint8_t*).
Definition in file cimg2num.h.
| 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.
| image | Pointer to RGBA pixel buffer. |
| width | Width of the image in pixels. |
| height | Height of the image in pixels. |
| sigma_spatial | Standard deviation for spatial Gaussian (proximity weight). |
| sigma_range | Standard deviation for range Gaussian (intensity similarity weight). |
| color_space | Color space flag (0 = CIE LAB, 1 = RGB). |
doxygen/img2num.h.dox Definition at line 35 of file cimg2num.cpp.
| void img2num_black_threshold_image | ( | uint8_t * | ptr, |
| const int | width, | ||
| const int | height, | ||
| const int | num_thresholds | ||
| ) |
Apply black-thresholding to an image.
| ptr | Pointer to the image buffer. |
| width | Width of the image in pixels. |
| height | Height of the image in pixels. |
| num_thresholds | Number of thresholds to apply. |
doxygen/img2num.h.dox Definition at line 22 of file cimg2num.cpp.
| 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.
| image | Pointer to the image buffer (RGBA). |
| width | Width of the image in pixels. |
| height | Height of the image in pixels. |
| sigma | Standard deviation for Gaussian kernel. |
doxygen/img2num.h.dox Definition at line 8 of file cimg2num.cpp.
| void img2num_invert_image | ( | uint8_t * | ptr, |
| int | width, | ||
| int | height | ||
| ) |
Invert the pixel values of an image.
| ptr | Pointer to the image buffer. |
| width | Width of the image in pixels. |
| height | Height of the image in pixels. |
doxygen/img2num.h.dox Definition at line 12 of file cimg2num.cpp.
| 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.
| data | Pointer to input image data buffer. |
| out_data | Pointer to output buffer where clustered pixel values are stored. |
| out_labels | Pointer to output buffer for cluster labels per pixel. |
| width | Width of the image in pixels. |
| height | Height of the image in pixels. |
| k | Number of clusters to compute. |
| max_iter | Maximum number of iterations for the algorithm. |
| color_space | Color space flag (0 = CIE LAB, 1 = RGB). |
doxygen/img2num.h.dox Definition at line 28 of file cimg2num.cpp.
| 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.
| data | Pointer to image data buffer. |
| labels | Pointer to label buffer, indicating region for each pixel. |
| width | Width of the image in pixels. |
| height | Height of the image in pixels. |
| min_area | Minimum area (in pixels) for a region to be included in the SVG. |
| draw_contour_borders | If true, contours of labeled regions will be drawn. |
doxygen/img2num.h.dox Definition at line 41 of file cimg2num.cpp.
| void img2num_threshold_image | ( | uint8_t * | ptr, |
| const int | width, | ||
| const int | height, | ||
| const int | num_thresholds | ||
| ) |
Apply a thresholding operation to an image.
| ptr | Pointer to the image buffer. |
| width | Width of the image in pixels. |
| height | Height of the image in pixels. |
| num_thresholds | Number of thresholds to apply. |
doxygen/img2num.h.dox Definition at line 16 of file cimg2num.cpp.