public final class BlackLevelPattern
extends Object
java.lang.Object | |
↳ | android.hardware.camera2.params.BlackLevelPattern |
不可变类用于存储与用于每个颜色通道的黑色电平偏移的2x2模式的颜色通道偏移相对应的4元素整数向量。
Constants |
|
---|---|
int |
COUNT 此矢量中的偏移数。 |
Public methods |
|
---|---|
void |
copyTo(int[] destination, int offset) 将ColorChannel偏移量复制到目标矢量中。 |
boolean |
equals(Object obj) 检查这 |
int |
getOffsetForIndex(int column, int row) 将给定索引的颜色通道偏移量返回到原始像素值数组中。 |
int |
hashCode() 返回对象的哈希码值。 |
String |
toString() 以字符串表示形式返回此 |
Inherited methods |
|
---|---|
From class java.lang.Object
|
void copyTo (int[] destination, int offset)
将ColorChannel偏移量复制到目标矢量中。
对于给定的2×2颜色模式,按行列扫描顺序给出偏移。
Parameters | |
---|---|
destination |
int : an array big enough to hold at least .COUNT elements after the offset |
offset |
int : a non-negative offset into the array |
Throws | |
---|---|
IllegalArgumentException |
if the offset is invalid. |
ArrayIndexOutOfBoundsException |
if the destination vector is too small. |
NullPointerException |
if the destination is null. |
boolean equals (Object obj)
检查这个 BlackLevelPattern
是否等于另一个 BlackLevelPattern
。
两个向量只有当且仅当每个相应元素相等时才相等。
Parameters | |
---|---|
obj |
Object : the reference object with which to compare. |
Returns | |
---|---|
boolean |
true if the objects were equal, false otherwise |
int getOffsetForIndex (int column, int row)
将给定索引的颜色通道偏移量返回到原始像素值数组中。
Parameters | |
---|---|
column |
int : the column index in the the raw pixel array. |
row |
int : the row index in the raw pixel array. |
Returns | |
---|---|
int |
a color channel offset. |
Throws | |
---|---|
IllegalArgumentException |
if a column or row given is negative. |
int hashCode ()
返回对象的哈希码值。 为了散列表的好处而支持此方法,例如由HashMap
提供的HashMap
。
hashCode
的总合同是:
hashCode
method must consistently return the same integer, provided no information used in equals
comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application. equals(Object)
method, then calling the hashCode
method on each of the two objects must produce the same integer result. equals(java.lang.Object)
method, then calling the hashCode
method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables. 尽可能合理实用,类Object
定义的hashCode方法确实为不同的对象返回不同的整数。 (这通常通过将对象的内部地址转换为整数来实现,但Java TM编程语言不需要此实现技术。)
Returns | |
---|---|
int |
a hash code value for this object. |
String toString ()
以字符串表示形式返回此 BlackLevelPattern
。
"BlackLevelPattern([%d, %d], [%d, %d])"
,其中每个%d
表示一个颜色通道的一个黑色电平偏移量。 值与CFA布局键所列的通道顺序相同(请参阅SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
)。
Returns | |
---|---|
String |
string representation of BlackLevelPattern |