ScriptIntrinsicHistogram
classScriptIntrinsicHistogram: ScriptIntrinsic
kotlin.Any | ||||
↳ | android.renderscript.BaseObj | |||
↳ | android.renderscript.Script | |||
↳ | android.renderscript.ScriptIntrinsic | |||
↳ | android.renderscript.ScriptIntrinsicHistogram |
Intrinsic Histogram filter.
Summary
Public methods | |
---|---|
static ScriptIntrinsicHistogram! |
create(rs: RenderScript!, e: Element!) Create an intrinsic for calculating the histogram of an uchar or uchar4 image. |
Unit |
forEach(ain: Allocation!) Process an input buffer and place the histogram into the output allocation. |
Unit |
forEach(ain: Allocation!, opt: Script.LaunchOptions!) Process an input buffer and place the histogram into the output allocation. |
Unit |
forEach_Dot(ain: Allocation!) Process an input buffer and place the histogram into the output allocation. |
Unit |
forEach_Dot(ain: Allocation!, opt: Script.LaunchOptions!) Process an input buffer and place the histogram into the output allocation. |
Script.FieldID! |
Get a FieldID for the input field of this intrinsic. |
Script.KernelID! |
Get a KernelID for this intrinsic kernel. |
Unit |
setDotCoefficients(r: Float, g: Float, b: Float, a: Float) Set the coefficients used for the RGBA to Luminocity calculation. |
Unit |
setOutput(aout: Allocation!) Set the output of the histogram. |
Public methods
create
static funcreate(
rs: RenderScript!,
e: Element!
): ScriptIntrinsicHistogram!
Deprecated: Deprecated in Java.
Create an intrinsic for calculating the histogram of an uchar or uchar4 image. Supported elements types are Element.U8_4
, Element.U8_3
, Element.U8_2
, Element.U8
Parameters | |
---|---|
rs |
RenderScript!: The RenderScript context |
e |
Element!: Element type for inputs |
Return | |
---|---|
ScriptIntrinsicHistogram! |
ScriptIntrinsicHistogram |
forEach
funforEach(ain: Allocation!): Unit
Deprecated: Deprecated in Java.
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.
Parameters | |
---|---|
ain |
Allocation!: The input image |
forEach
funforEach(
ain: Allocation!,
opt: Script.LaunchOptions!
): Unit
Deprecated: Deprecated in Java.
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.
Parameters | |
---|---|
ain |
Allocation!: The input image |
opt |
Script.LaunchOptions!: LaunchOptions for clipping |
forEach_Dot
funforEach_Dot(ain: Allocation!): Unit
Deprecated: Deprecated in Java.
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.
Parameters | |
---|---|
ain |
Allocation!: The input image |
forEach_Dot
funforEach_Dot(
ain: Allocation!,
opt: Script.LaunchOptions!
): Unit
Deprecated: Deprecated in Java.
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.
Parameters | |
---|---|
ain |
Allocation!: The input image |
opt |
Script.LaunchOptions!: LaunchOptions for clipping |
getFieldID_Input
fungetFieldID_Input(): Script.FieldID!
Deprecated: Deprecated in Java.
Get a FieldID for the input field of this intrinsic.
Return | |
---|---|
Script.FieldID! |
Script.FieldID The FieldID object. |
getKernelID_Separate
fungetKernelID_Separate(): Script.KernelID!
Deprecated: Deprecated in Java.
Get a KernelID for this intrinsic kernel.
Return | |
---|---|
Script.KernelID! |
Script.KernelID The KernelID object. |
setDotCoefficients
funsetDotCoefficients(
r: Float,
g: Float,
b: Float,
a: Float
): Unit
Deprecated: Deprecated in Java.
Set the coefficients used for the RGBA to Luminocity calculation. The default is {0.299f, 0.587f, 0.114f, 0.f}. Coefficients must be >= 0 and sum to 1.0 or less.
Parameters | |
---|---|
r |
Float: Red coefficient |
g |
Float: Green coefficient |
b |
Float: Blue coefficient |
a |
Float: Alpha coefficient |
setOutput
funsetOutput(aout: Allocation!): Unit
Deprecated: Deprecated in Java.
Set the output of the histogram. 32 bit integer types are supported.
Parameters | |
---|---|
aout |
Allocation!: The output allocation |