Most visited

Recently visited

Added in API level 21

BlackLevelPattern

public final class BlackLevelPattern
extends Object

java.lang.Object
   ↳ android.hardware.camera2.params.BlackLevelPattern


不可变类用于存储与用于每个颜色通道的黑色电平偏移的2x2模式的颜色通道偏移相对应的4元素整数向量。

Summary

Constants

int COUNT

此矢量中的偏移数。

Public methods

void copyTo(int[] destination, int offset)

将ColorChannel偏移量复制到目标矢量中。

boolean equals(Object obj)

检查这 BlackLevelPattern是否等于另一个 BlackLevelPattern

int getOffsetForIndex(int column, int row)

将给定索引的颜色通道偏移量返回到原始像素值数组中。

int hashCode()

返回对象的哈希码值。

String toString()

以字符串表示形式返回此 BlackLevelPattern

Inherited methods

From class java.lang.Object

Constants

COUNT

Added in API level 21
int COUNT

此矢量中的偏移数。

常量值:4(0x00000004)

Public methods

copyTo

Added in API level 21
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.

equals

Added in API level 21
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

getOffsetForIndex

Added in API level 21
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.

hashCode

Added in API level 21
int hashCode ()

返回对象的哈希码值。 为了散列表的好处而支持此方法,例如由HashMap提供的HashMap

hashCode的总合同是:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the 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.
  • If two objects are equal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the 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.

toString

Added in API level 21
String toString ()

以字符串表示形式返回此 BlackLevelPattern

"BlackLevelPattern([%d, %d], [%d, %d])" ,其中每个%d表示一个颜色通道的一个黑色电平偏移量。 值与CFA布局键所列的通道顺序相同(请参阅SENSOR_INFO_COLOR_FILTER_ARRANGEMENT )。

Returns
String string representation of BlackLevelPattern

也可以看看:

Hooray!