#include <rsCppStructs.h>
Public Member Functions | |
void | setOutput (sp< Allocation > aout) |
void | setDotCoefficients (float r, float g, float b, float a) |
void | forEach (sp< Allocation > ain) |
void | forEach_dot (sp< Allocation > ain) |
Static Public Member Functions | |
static sp < ScriptIntrinsicHistogram > | create (sp< RS > rs) |
Intrinsic for computing a histogram.
Definition at line 1699 of file rsCppStructs.h.
static sp<ScriptIntrinsicHistogram> android::RSC::ScriptIntrinsicHistogram::create | ( | sp< RS > | rs | ) | [static] |
Create an intrinsic for calculating the histogram of an uchar or uchar4 image.
Supported elements types are U8_4, U8_3, U8_2, and U8.
[in] | rs | The RenderScript context |
[in] | e | Element type for inputs |
void android::RSC::ScriptIntrinsicHistogram::forEach | ( | sp< Allocation > | ain | ) |
Process an input buffer and place the histogram into the output allocation. The output allocation may be a narrower vector size than the input. In this case the vector size of the output is used to determine how many of the input channels are used in the computation. This is useful if you have an RGBA input buffer but only want the histogram for RGB.
1D and 2D input allocations are supported.
[in] | ain | The input image |
void android::RSC::ScriptIntrinsicHistogram::forEach_dot | ( | sp< Allocation > | ain | ) |
Process an input buffer and place the histogram into the output allocation. The dot product of the input channel and the coefficients from 'setDotCoefficients' are used to calculate the output values.
1D and 2D input allocations are supported.
ain | The input image |
void android::RSC::ScriptIntrinsicHistogram::setDotCoefficients | ( | float | r, |
float | g, | ||
float | b, | ||
float | a | ||
) |
Set the coefficients used for the dot product calculation. The default is {0.299f, 0.587f, 0.114f, 0.f}.
Coefficients must be >= 0 and sum to 1.0 or less.
[in] | r | Red coefficient |
[in] | g | Green coefficient |
[in] | b | Blue coefficient |
[in] | a | Alpha coefficient |
void android::RSC::ScriptIntrinsicHistogram::setOutput | ( | sp< Allocation > | aout | ) |
Set the output of the histogram. 32 bit integer types are supported.
[in] | aout | The output allocation |