public class Kernel extends Object implements Cloneable
Kernel类定义了一个矩阵,描述了一个指定的像素与周围像素的影响在过滤操作的输出图像的像素位置的计算值。X和Y的起源表明,对应于一个输出值被计算的像素位置的内核矩阵元素。
ConvolveOp
| Constructor and Description |
|---|
Kernel(int width, int height, float[] data)
结构的数组对象
Kernel漂浮。
|
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
克隆这个对象。
|
int |
getHeight()
返回该
Kernel高度。
|
float[] |
getKernelData(float[] data)
返回行主序的核心数据。
|
int |
getWidth()
返回该
Kernel宽度。
|
int |
getXOrigin()
返回该
Kernel X起源。
|
int |
getYOrigin()
返回该
Kernel Y起源。
|
public Kernel(int width,
int height,
float[] data)
Kernel漂浮。第一
width *
height元素的
data阵列复制。如果
data数组的长度小于宽度*高度,一个
IllegalArgumentException抛出。X的起源是(width-1)/ 2和Y的起源是(height-1)/ 2。
width -核宽
height -内核的高度
data -行主要为了核心数据
IllegalArgumentException -如果
data长度小于
width产品和
height
public final int getXOrigin()
Kernel X起源。
public final int getYOrigin()
Kernel Y起源。
public final int getWidth()
Kernel宽度。
Kernel宽度。
public final int getHeight()
Kernel高度。
Kernel高度。
public final float[] getKernelData(float[] data)
data阵列。如果
data是
null,创建一个新数组。
data如果非空,包含返回的核心数据
data阵列的行顺序包含内核数据或,如果
data是
null,新分配的数组的行顺序包含核心数据
IllegalArgumentException -如果
data小于这个
Kernel大小
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.