48 #define VXLIB_HISTOGRAM_NUMERIC_MIN(x) std::numeric_limits<x>::min()
49 #define VXLIB_HISTOGRAM_NUMERIC_MAX(x) std::numeric_limits<x>::max()
57 template <
typename dTypeIn,
typename dTypeOut>
67 size_t width = pKerPrivArgs->
width;
68 size_t height = pKerPrivArgs->
height;
75 printf(
"Enter VXLIB_histogram_exec_cn\n");
79 dTypeIn *restrict pInLocal = (dTypeIn *) pIn;
80 dTypeOut *restrict pOutLocal = (dTypeOut *) pOut;
83 printf(
"In VXLIB_histogram_exec_cn, width: %d, height: %d\n", width, height);
86 for (x = 0; x < numBins; x++) {
90 for (y = 0; y < height; y++) {
92 for (x = 0; x < width; x++) {
94 uint8_t pixel = pInLocal[y * strideInElements + x];
95 if ((offset <= (
size_t) pixel) && ((
size_t) pixel < (offset + range))) {
96 size_t index = (pixel - (uint16_t) offset) * numBins / range;
113 void *restrict pOut);
template VXLIB_STATUS VXLIB_histogram_exec_cn< VXLIB_HISTOGRAM_TYPENAME_I8U_O32U >(VXLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut)
VXLIB_STATUS VXLIB_histogram_exec_cn(VXLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut)
This function is the main execution function for the natural C implementation of the kernel....
Header file for kernel's internal use. For the kernel's interface, please see VXLIB_histogram.
void * VXLIB_kernelHandle
Handle type for VXLIB operations.
VXLIB_STATUS_NAME
The enumeration of all status codes.
uint16_t numBins
Parameter indicating distribution number of bins (<= 256)
uint8_t offset
Parameter indicating distribution offset.
uint16_t range
Parameter indicating distribution range (<= 256)
Structure that is reserved for internal use by the kernel.
VXLIB_histogram_InitArgs pKerInitArgs
Initargs of the kernel.
size_t height
Height of image
size_t strideInElements
Stride of input0 in elements.
size_t width
Width of image