![]() |
KudanCV
|
#include <KudanCV.h>
Static Public Member Functions | |
static KudanVector3 | getAverageImageColour (const unsigned char *imageData, int width, int height, int channels, int padding, int targetWidth, int targetHeight) |
Contains various utility functions which the Kudan interface also provides. These are various computer vision and image processing routines not specifically linked to any of the core features (tracking, mapping etc) but which could be useful for related tasks
|
static |
Get the average colour from a BGR image. Given an image represented by a pointer to unsigned char data, with specified dimensions and channels, this computes the average BGR colour (after down-sampling to a given size for efficienty)
imageData | Pointer to the data expressed as a contiguous array of unsigned chars |
width,height | Size of the image data |
channels | The number of channels in the data |
padding | Padding of the data at the end of each row (?) |
targetWidth,targetHeight | Size to which the image is resized in order to accelerate computation of the mean |
KudanException | is thrown if the data pointer is null or if the number of channels is not valid |