Documentation
|
|
The C interface for histogram. More...
| afError | af_histogram_S (float *d_hist, unsigned length, const float *d_data, unsigned nbins, const float *h_bins, unsigned nsets, unsigned ngfor) |
| Form a non-normalized histogram from input matrix. More... | |
| afError | af_histminmax_S (float *d_hist, unsigned len, const float *d_data, unsigned bins, const float *h_data, unsigned nsets, unsigned ngfor, float min, float max) |
| Form a non-normalized histogram from input matrix, using the specified minimum and maximum range for binning. More... | |
The C interface for histogram.
A histogram is a representation of the distribution of data in an image. This representation is essentially a graph consisting of the data range or domain on one axis and frequency of occurence on the other axis. All the data in the domain is counted in the appropriate bin. The total number of elements belonging to each bin is known as the bin's frequency.
The regular histogram function creates bins of equal size between the minimum and maximum of the input data (calculated internally). The histogram min-max function takes input parameters minimum and maximum, and divides the bins into equal sizes within the range specified by min and max parameters. All values less than min in the data range are placed in the first (min) bin and all values greater than max will be placed in the last (max) bin.
Data normalization via histogram equalization
| afError af_histogram_S | ( | float * | d_hist, |
| unsigned | length, | ||
| const float * | d_data, | ||
| unsigned | nbins, | ||
| const float * | h_bins, | ||
| unsigned | nsets, | ||
| unsigned | ngfor | ||
| ) |
Form a non-normalized histogram from input matrix.
| [out] | d_hist | Count of occurrences - PxN matrix |
| [in] | length | Length of input matrix d_data - N |
| [in] | d_data | Device-side vector or matrix - MxN |
| [in] | nbins | Number of bins in h_bins - P |
| [in] | h_bins | Host-side vector indicating center of each bin (can be NULL) |
| [in] | nsets | Number of rows in input data - M |
| [in] | ngfor | Number of gfor passes |
d_hist is: a 1xP vector hist for vector inputs, or a PxN matrix hist for MxN matrix inputsSingle-precision histogram calculation | afError af_histminmax_S | ( | float * | d_hist, |
| unsigned | len, | ||
| const float * | d_data, | ||
| unsigned | bins, | ||
| const float * | h_data, | ||
| unsigned | nsets, | ||
| unsigned | ngfor, | ||
| float | min, | ||
| float | max | ||
| ) |
Form a non-normalized histogram from input matrix, using the specified minimum and maximum range for binning.
| [out] | d_hist | Count of occurrences - PxN matrix |
| [in] | len | Length of input matrix d_data - N |
| [in] | d_data | Device-side vector or matrix - MxN |
| [in] | bins | Number of bins in h_bins - P |
| [in] | h_data | Host-side vector indicating center of each bin (can be NULL) |
| [in] | nsets | Number of rows in input data - M |
| [in] | ngfor | Number of gfor passes |
| [in] | min | Minimum binned value (eg. 0) |
| [in] | max | Maximum binned value (eg. 255) |
d_hist is: a 1xP vector hist for vector inputs, or a PxN matrix hist for MxN matrix inputsSingle-precision histogram calculation