GaussianBlurWithFrameOverlaid
@UnstableApi
class GaussianBlurWithFrameOverlaid : SeparableConvolution
| kotlin.Any | ||
| ↳ | androidx.media3.effect.SeparableConvolution | |
| ↳ | androidx.media3.effect.GaussianBlurWithFrameOverlaid |
A SeparableConvolution to apply a Gaussian blur on image data.
The width of the blur is specified in pixels and applied symmetrically.
Summary
Public constructors |
|---|
GaussianBlurWithFrameOverlaid(Creates an instance with |
GaussianBlurWithFrameOverlaid(Creates an instance. |
Public functions |
|
|---|---|
ConvolutionFunction1D! |
getConvolution(presentationTimeUs: Long)Returns a |
GlShaderProgram! |
toGlShaderProgram(context: Context!, useHdr: Boolean)Returns a |
Inherited functions |
||
|---|---|---|
|
||
Public constructors
GaussianBlurWithFrameOverlaid
GaussianBlurWithFrameOverlaid(
sigma: Float,
scaleSharpX: Float,
scaleSharpY: Float
)
Creates an instance with numStandardDeviations set to 2.0f.
| Parameters | |
|---|---|
sigma: Float |
The half-width of 1 standard deviation, in pixels. |
scaleSharpX: Float |
The scaling factor used to determine the size of the sharp image in the output frame relative to the whole output frame in the horizontal direction. |
scaleSharpY: Float |
The scaling factor used to determine the size of the sharp image in the output frame relative to the whole output frame in the vertical direction. |
GaussianBlurWithFrameOverlaid
GaussianBlurWithFrameOverlaid(
sigma: @FloatRange(from = 0.0, fromInclusive = false) Float,
numStandardDeviations: @FloatRange(from = 0.0, fromInclusive = false) Float,
scaleSharpX: Float,
scaleSharpY: Float
)
Creates an instance.
| Parameters | |
|---|---|
sigma: @FloatRange(from = 0.0, fromInclusive = false) Float |
The half-width of 1 standard deviation, in pixels. |
numStandardDeviations: @FloatRange(from = 0.0, fromInclusive = false) Float |
The size of function domain, measured in the number of standard deviations. |
scaleSharpX: Float |
The scaling factor used to determine the size of the sharp image in the output frame relative to the whole output frame in the horizontal direction. |
scaleSharpY: Float |
The scaling factor used to determine the size of the sharp image in the output frame relative to the whole output frame in the vertical direction. |
Public functions
getConvolution
fun getConvolution(presentationTimeUs: Long): ConvolutionFunction1D!
Returns a 1D convolution function.
| Parameters | |
|---|---|
presentationTimeUs: Long |
The presentation timestamp of the input frame, in microseconds. |
toGlShaderProgram
fun toGlShaderProgram(context: Context!, useHdr: Boolean): GlShaderProgram!
Returns a GlShaderProgram that applies the effect.
| Parameters | |
|---|---|
context: Context! |
A |
useHdr: Boolean |
Whether input textures come from an HDR source. If |
| Throws | |
|---|---|
androidx.media3.common.VideoFrameProcessingException |
If an error occurs while creating the |