![]() |
ARX
1.0
The next-generation open source augmented reality toolkit.
|
artoolkitX functions for 2D luminance image processing. More...
Go to the source code of this file.
Classes | |
struct | _ARImageProcInfo |
Structure holding settings for an instance of the image-processing pipeline. More... | |
Macros | |
#define | TRUE 1 |
#define | FALSE 0 |
Typedefs | |
typedef struct _ARImageProcInfo | ARImageProcInfo |
Functions | |
ARImageProcInfo * | arImageProcInit (const int xsize, const int ysize) |
Initialise image processing. More... | |
void | arImageProcFinal (ARImageProcInfo *ipi) |
Finish image processing and free memory. More... | |
int | arImageProcLumaHist (ARImageProcInfo *ipi, const ARUint8 *__restrict dataPtr) |
Calculate luminance histogram. More... | |
unsigned char * | arImageProcGetHistImage (ARImageProcInfo *ipi) |
Get luminance histogram as an image. More... | |
int | arImageProcLumaHistAndCDF (ARImageProcInfo *ipi, const ARUint8 *__restrict dataPtr) |
Calculate image histogram and cumulative density function. More... | |
int | arImageProcLumaHistAndCDFAndPercentile (ARImageProcInfo *ipi, const ARUint8 *__restrict dataPtr, const float percentile, unsigned char *value_p) |
Calculate image histogram, cumulative density function, and luminance value at a given histogram percentile. More... | |
int | arImageProcLumaHistAndCDFAndMedian (ARImageProcInfo *ipi, const ARUint8 *__restrict dataPtr, unsigned char *value_p) |
Calculate image histogram, cumulative density function, and median luminance value. More... | |
int | arImageProcLumaHistAndOtsu (ARImageProcInfo *ipi, const ARUint8 *__restrict dataPtr, unsigned char *value_p) |
Calculate image histogram, and binarize image using Otsu's method for foreground/background separation. More... | |
int | arImageProcLumaHistAndBoxFilterWithBias (ARImageProcInfo *ipi, const ARUint8 *__restrict dataPtr, const int boxSize, const int bias) |
Calculate image histogram, and box filter image. More... | |
int | arImageProcLumaHistAndCDFAndLevels (ARImageProcInfo *ipi, const ARUint8 *__restrict dataPtr) |
Calculate image histogram, cumulative density function, and minimum and maximum luminance values. More... | |
artoolkitX functions for 2D luminance image processing.
#define FALSE 0 |
#define TRUE 1 |
typedef struct _ARImageProcInfo ARImageProcInfo |
void arImageProcFinal | ( | ARImageProcInfo * | ipi | ) |
Finish image processing and free memory.
When processing is complete, the ARImageProcInfo structure should be disposed of by calling this function.
ipi | ARImageProcInfo structure to be disposed of, as created by arImageProcInit. |
unsigned char * arImageProcGetHistImage | ( | ARImageProcInfo * | ipi | ) |
Get luminance histogram as an image.
Returns a pointer to a buffer containing a 256x256 8-bit grayscale texture. The texture can be uploaded to an OpenGL texture with the calls:
After uploading, the texture can be drawn as with any other OpenGL texture.
ipi | ARImageProcInfo structure holding the most recently processed histogram, as generated by arImageProcLumaHist etc. |
ARImageProcInfo * arImageProcInit | ( | const int | xsize, |
const int | ysize | ||
) |
Initialise image processing.
This function creates the ARImageProcInfo structure required for other image processing functions. The size of the image that will be processed is fixed by this call.
xsize | Width of the images that will be processed, in pixels. |
ysize | Height of the images that will be processed, in pixels. |
int arImageProcLumaHist | ( | ARImageProcInfo * | ipi, |
const ARUint8 *__restrict | dataPtr | ||
) |
Calculate luminance histogram.
ipi | ARImageProcInfo structure describing the format of the image to be processed, as created by arImageProcInit. |
On macOS and iOS, the calculation is accelerated using the Accelerate framework.
int arImageProcLumaHistAndBoxFilterWithBias | ( | ARImageProcInfo * | ipi, |
const ARUint8 *__restrict | dataPtr, | ||
const int | boxSize, | ||
const int | bias | ||
) |
Calculate image histogram, and box filter image.
See https://developer.apple.com/library/ios/documentation/Performance/Reference/vImage_convolution/ On macOS and iOS, the calculation is accelerated using the Accelerate framework.
ipi | ARImageProcInfo structure describing the format of the image to be processed, as created by arImageProcInit. |
int arImageProcLumaHistAndCDF | ( | ARImageProcInfo * | ipi, |
const ARUint8 *__restrict | dataPtr | ||
) |
Calculate image histogram and cumulative density function.
ipi | ARImageProcInfo structure describing the format of the image to be processed, as created by arImageProcInit. |
int arImageProcLumaHistAndCDFAndLevels | ( | ARImageProcInfo * | ipi, |
const ARUint8 *__restrict | dataPtr | ||
) |
Calculate image histogram, cumulative density function, and minimum and maximum luminance values.
ipi | ARImageProcInfo structure describing the format of the image to be processed, as created by arImageProcInit. |
int arImageProcLumaHistAndCDFAndMedian | ( | ARImageProcInfo * | ipi, |
const ARUint8 *__restrict | dataPtr, | ||
unsigned char * | value_p | ||
) |
Calculate image histogram, cumulative density function, and median luminance value.
ipi | ARImageProcInfo structure describing the format of the image to be processed, as created by arImageProcInit. |
int arImageProcLumaHistAndCDFAndPercentile | ( | ARImageProcInfo * | ipi, |
const ARUint8 *__restrict | dataPtr, | ||
const float | percentile, | ||
unsigned char * | value_p | ||
) |
Calculate image histogram, cumulative density function, and luminance value at a given histogram percentile.
ipi | ARImageProcInfo structure describing the format of the image to be processed, as created by arImageProcInit. |
int arImageProcLumaHistAndOtsu | ( | ARImageProcInfo * | ipi, |
const ARUint8 *__restrict | dataPtr, | ||
unsigned char * | value_p | ||
) |
Calculate image histogram, and binarize image using Otsu's method for foreground/background separation.
See http://en.wikipedia.org/wiki/Otsu's_method fore more information.
ipi | ARImageProcInfo structure describing the format of the image to be processed, as created by arImageProcInit. |