Img2Num C
API Documentation
/__w/Img2Num/Img2Num/doxygen/img2num.h.dox File Reference

Macros

#define IMG2NUM_H_GAUSSIAN_BLUR_DOC
 Apply a Gaussian blur to an image using FFT. More...
 
#define IMG2NUM_H_INVERT_IMAGE_DOC
 Invert the pixel values of an image. More...
 
#define IMG2NUM_H_THRESHOLD_IMAGE_DOC
 Apply a thresholding operation to an image. More...
 
#define IMG2NUM_H_BLACK_THRESHOLD_IMAGE_DOC
 Apply black-thresholding to an image. More...
 
#define IMG2NUM_H_KMEANS_DOC
 Perform k-means clustering on image data. More...
 
#define IMG2NUM_H_BILATERAL_FILTER_DOC
 Apply bilateral filtering to an image. More...
 
#define IMG2NUM_H_LABELS_TO_SVG_DOC
 Convert labeled regions of an image into an SVG string. More...
 

Macro Definition Documentation

◆ IMG2NUM_H_BILATERAL_FILTER_DOC

#define IMG2NUM_H_BILATERAL_FILTER_DOC

Apply bilateral filtering to an image.

Parameters
imagePointer to RGBA pixel buffer.
widthWidth of the image in pixels.
heightHeight of the image in pixels.
sigma_spatialStandard deviation for spatial Gaussian (proximity weight).
sigma_rangeStandard deviation for range Gaussian (intensity similarity weight).
color_spaceColor space flag (0 = CIE LAB, 1 = RGB).
Note
The filter modifies the image buffer in-place.
Dox File: doxygen/img2num.h.dox

◆ IMG2NUM_H_BLACK_THRESHOLD_IMAGE_DOC

#define IMG2NUM_H_BLACK_THRESHOLD_IMAGE_DOC

Apply black-thresholding to an image.

Parameters
ptrPointer to the image buffer.
widthWidth of the image in pixels.
heightHeight of the image in pixels.
num_thresholdsNumber of thresholds to apply.
Note
Similar to threshold_image but prioritizes darker pixels.
Dox File: doxygen/img2num.h.dox

◆ IMG2NUM_H_GAUSSIAN_BLUR_DOC

#define IMG2NUM_H_GAUSSIAN_BLUR_DOC

Apply a Gaussian blur to an image using FFT.

Parameters
imagePointer to the image buffer (RGBA).
widthWidth of the image in pixels.
heightHeight of the image in pixels.
sigmaStandard deviation for Gaussian kernel.
Note
The operation modifies the image buffer in-place.
Dox File: doxygen/img2num.h.dox

◆ IMG2NUM_H_INVERT_IMAGE_DOC

#define IMG2NUM_H_INVERT_IMAGE_DOC

Invert the pixel values of an image.

Parameters
ptrPointer to the image buffer.
widthWidth of the image in pixels.
heightHeight of the image in pixels.
Note
Each pixel value is replaced by 255 - original_value.
Dox File: doxygen/img2num.h.dox

◆ IMG2NUM_H_KMEANS_DOC

#define IMG2NUM_H_KMEANS_DOC

Perform k-means clustering on image data.

Parameters
dataPointer to input image data buffer.
out_dataPointer to output buffer where clustered pixel values are stored.
out_labelsPointer to output buffer for cluster labels per pixel.
widthWidth of the image in pixels.
heightHeight of the image in pixels.
kNumber of clusters to compute.
max_iterMaximum number of iterations for the algorithm.
color_spaceColor space flag (0 = CIE LAB, 1 = RGB).
Note
The function does not modify the input buffer.
Dox File: doxygen/img2num.h.dox

◆ IMG2NUM_H_LABELS_TO_SVG_DOC

#define IMG2NUM_H_LABELS_TO_SVG_DOC

Convert labeled regions of an image into an SVG string.

Parameters
dataPointer to image data buffer.
labelsPointer to label buffer, indicating region for each pixel.
widthWidth of the image in pixels.
heightHeight of the image in pixels.
min_areaMinimum area (in pixels) for a region to be included in the SVG.
draw_contour_bordersIf true, contours of labeled regions will be drawn.
Returns
Pointer to a dynamically allocated C-string containing the SVG data.
Note
Caller is responsible for freeing the returned string.
Dox File: doxygen/img2num.h.dox

◆ IMG2NUM_H_THRESHOLD_IMAGE_DOC

#define IMG2NUM_H_THRESHOLD_IMAGE_DOC

Apply a thresholding operation to an image.

Parameters
ptrPointer to the image buffer.
widthWidth of the image in pixels.
heightHeight of the image in pixels.
num_thresholdsNumber of thresholds to apply.
Note
Thresholds split pixel intensity ranges into discrete levels.
Dox File: doxygen/img2num.h.dox