public final class ConvolutionKernel
extends com.amd.aparapi.Kernel
ConvolutionKernel
is a Kernel
that updates an image with convolution-based image effects.
The effects that are supported are Blur, Detect Edges, Emboss, Gradient (both Horizontal and Vertical) and Sharpen.
com.amd.aparapi.Kernel.Constant, com.amd.aparapi.Kernel.Entry, com.amd.aparapi.Kernel.EXECUTION_MODE, com.amd.aparapi.Kernel.KernelState, com.amd.aparapi.Kernel.Local, com.amd.aparapi.Kernel.NoCL, com.amd.aparapi.Kernel.OpenCLDelegate, com.amd.aparapi.Kernel.OpenCLMapping, com.amd.aparapi.Kernel.PrivateMemorySpace
Constructor and Description |
---|
ConvolutionKernel(byte[] image,
int width,
int height)
Constructs a new
ConvolutionKernel instance. |
Modifier and Type | Method and Description |
---|---|
void |
enableBlur()
Enables the Blur effect.
|
void |
enableDetectEdges()
Enables the Detect Edges effect.
|
void |
enableEmboss()
Enables the Emboss effect.
|
void |
enableGradientHorizontal()
Enables the Horizontal Gradient effect.
|
void |
enableGradientVertical()
Enables the Vertical Gradient effect.
|
void |
enableSharpen()
Enables the Sharpen effect.
|
void |
get()
Returns the image array from the GPU.
|
void |
run()
Runs this
ConvolutionKernel instance. |
void |
update()
Updates the arrays.
|
abs, abs, abs, abs, acos, acos, acospi, acospi, addExecutionModes, asin, asin, asinpi, asinpi, atan, atan, atan2, atan2, atan2pi, atan2pi, atanpi, atanpi, atomicAdd, cancelMultiPass, cbrt, cbrt, ceil, ceil, cleanUpArrays, clone, cos, cos, cosh, cosh, cospi, cospi, createRange, dispose, execute, execute, execute, execute, execute, execute, executeFallbackAlgorithm, exp, exp, exp10, exp10, exp2, exp2, expm1, expm1, floor, floor, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, getAccumulatedExecutionTime, getCancelState, getConversionTime, getCurrentPass, getExecutionMode, getExecutionTime, getGlobalId, getGlobalId, getGlobalSize, getGlobalSize, getGroupId, getGroupId, getKernelState, getLocalId, getLocalId, getLocalSize, getLocalSize, getMappedMethodName, getNumGroups, getNumGroups, getPassId, getProfileInfo, getTargetDevice, globalBarrier, hasFallbackAlgorithm, hasNextExecutionMode, hypot, hypot, IEEEremainder, IEEEremainder, invalidateCaches, isAllowDevice, isAutoCleanUpArrays, isExecuting, isExplicit, isMappedMethod, isOpenCLDelegateMethod, isRunningCL, localBarrier, log, log, log10, log10, log1p, log1p, log2, log2, mad, mad, max, max, max, max, min, min, min, min, nextAfter, nextAfter, pow, pow, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, rint, rint, round, round, rsqrt, rsqrt, setAutoCleanUpArrays, setExecutionMode, setExplicit, setFallbackExecutionMode, sin, sin, sinh, sinh, sinpi, sinpi, sqrt, sqrt, tan, tan, tanh, tanh, tanpi, tanpi, toDegrees, toDegrees, toRadians, toRadians, toString, tryNextExecutionMode, usesAtomic32, usesAtomic64
public ConvolutionKernel(byte[] image, int width, int height)
ConvolutionKernel
instance.
If pixels
is null
, a NullPointerException
will be thrown.
image
- the image arraywidth
- the width of the imageheight
- the height of the imagejava.lang.NullPointerException
- thrown if, and only if, pixels
is null
public void enableBlur()
public void enableDetectEdges()
public void enableEmboss()
public void enableGradientHorizontal()
public void enableGradientVertical()
public void enableSharpen()
public void get()
public void run()
ConvolutionKernel
instance.run
in class com.amd.aparapi.Kernel
public void update()