#include <rsCppStructs.h>
Public Member Functions | |
void | forEach (sp< Allocation > in, sp< Allocation > out) |
void | setAdd (float *add) |
void | setColorMatrix3 (float *m) |
void | setColorMatrix4 (float *m) |
void | setGreyscale () |
void | setRGBtoYUV () |
void | setYUVtoRGB () |
Static Public Member Functions | |
static sp < ScriptIntrinsicColorMatrix > | create (sp< RS > rs) |
Intrinsic for applying a color matrix to allocations. This has the same effect as loading each element and converting it to a F32_N, multiplying the result by the 4x4 color matrix as performed by rsMatrixMultiply() and writing it to the output after conversion back to U8_N or F32_N.
Definition at line 1577 of file rsCppStructs.h.
static sp<ScriptIntrinsicColorMatrix> android::RSC::ScriptIntrinsicColorMatrix::create | ( | sp< RS > | rs | ) | [static] |
Creates a new intrinsic.
[in] | rs | RenderScript context |
void android::RSC::ScriptIntrinsicColorMatrix::forEach | ( | sp< Allocation > | in, |
sp< Allocation > | out | ||
) |
Applies the color matrix. Supported types are U8 and F32 with vector lengths between 1 and 4.
[in] | in | input Allocation |
[out] | out | output Allocation |
void android::RSC::ScriptIntrinsicColorMatrix::setAdd | ( | float * | add | ) |
Set the value to be added after the color matrix has been applied. The default value is {0, 0, 0, 0}.
[in] | add | float[4] of values |
void android::RSC::ScriptIntrinsicColorMatrix::setColorMatrix3 | ( | float * | m | ) |
Set the color matrix which will be applied to each cell of the image. The alpha channel will be copied.
[in] | m | float[9] of values |
void android::RSC::ScriptIntrinsicColorMatrix::setColorMatrix4 | ( | float * | m | ) |
Set the color matrix which will be applied to each cell of the image.
[in] | m | float[16] of values |
void android::RSC::ScriptIntrinsicColorMatrix::setGreyscale | ( | ) |
Set a color matrix to convert from RGB to luminance. The alpha channel will be a copy.
void android::RSC::ScriptIntrinsicColorMatrix::setRGBtoYUV | ( | ) |
Set the matrix to convert from RGB to YUV with a direct copy of the 4th channel.
void android::RSC::ScriptIntrinsicColorMatrix::setYUVtoRGB | ( | ) |
Set the matrix to convert from YUV to RGB with a direct copy of the 4th channel.