public class KernelUtil extends Object
| Constructor and Description |
|---|
KernelUtil() |
| Modifier and Type | Method and Description |
|---|---|
static String |
kernelToString(javax.media.jai.KernelJAI kernel,
boolean multiLine)
A utility function that returns a string representation of
a KernelJAI object's data.
|
static javax.media.jai.KernelJAI |
setElement(javax.media.jai.KernelJAI kernel,
int x,
int y,
float newValue)
Creates a new kernel by copying the one provided and setting the element
at
(x, y) to value. |
static javax.media.jai.KernelJAI |
standardize(javax.media.jai.KernelJAI kernel)
Create a copy of the input kernel with element values
standardized to sum to 1.0.
|
public static javax.media.jai.KernelJAI standardize(javax.media.jai.KernelJAI kernel)
kernel - the input kernelpublic static javax.media.jai.KernelJAI setElement(javax.media.jai.KernelJAI kernel,
int x,
int y,
float newValue)
(x, y) to value.kernel - the existing kernelx - element X ordinatey - element Y ordinatenewValue - new element valueIllegalArgumentException - if kernel is null or
x or y are out of boundspublic static String kernelToString(javax.media.jai.KernelJAI kernel, boolean multiLine)
kernel - the input kernelmultiLine - if true, each row of kernel data is followed by a newline;
if false, the string contains no newlinesCopyright © 2009–2020. All rights reserved.