Most visited

Recently visited

Added in API level 21

LensShadingMap

public final class LensShadingMap
extends Object

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


用于描述漂浮物的 4 x N x M镜头着色图的不可变类。

也可以看看:

Summary

Constants

float MINIMUM_GAIN_FACTOR

这张地图中最小的增益因子。

Public methods

void copyGainFactors(float[] destination, int offset)

将所有增益因子从镜头阴影贴图中按行主要顺序复制到目标中。

boolean equals(Object obj)

检查这个LensShadingMap是否等于另一个LensShadingMap。

int getColumnCount()

获取此地图中的列数。

float getGainFactor(int colorChannel, int column, int row)

从该镜头着色贴图的行和列中获取单个颜色通道增益因子。

int getGainFactorCount()

获取此地图中增益因子的总数。

RggbChannelVector getGainFactorVector(int column, int row)

从该镜头着色贴图的行和列中获取增益因子矢量。

int getRowCount()

获取此地图中的行数。

int hashCode()

返回对象的哈希码值。

String toString()

返回LensShadingMap作为字符串表示。

Inherited methods

From class java.lang.Object

Constants

MINIMUM_GAIN_FACTOR

Added in API level 21
float MINIMUM_GAIN_FACTOR

这张地图中最小的增益因子。

该地图中的所有值至少会是这么大。

常数值:1.0

Public methods

copyGainFactors

Added in API level 21
void copyGainFactors (float[] destination, 
                int offset)

将所有增益因子从镜头阴影贴图中按行主要顺序复制到目标中。

每个增益因子将大于 MINIMUM_GAIN_FACTOR

Parameters
destination float: an array big enough to hold at least COUNT elements after the offset
offset int: a non-negative offset into the array
Throws
NullPointerException If destination was null
IllegalArgumentException If offset was negative
ArrayIndexOutOfBoundsException If there's not enough room to write the elements at the specified destination and offset.

也可以看看:

equals

Added in API level 21
boolean equals (Object obj)

检查这个LensShadingMap是否等于另一个LensShadingMap。

两个镜头阴影贴图当且仅当它们具有相同的行/列并且它们的所有元素都是 equalequal

Parameters
obj Object: the reference object with which to compare.
Returns
boolean true if the objects were equal, false otherwise

getColumnCount

Added in API level 21
int getColumnCount ()

获取此地图中的列数。

Returns
int

getGainFactor

Added in API level 21
float getGainFactor (int colorChannel, 
                int column, 
                int row)

从该镜头着色贴图的行和列中获取单个颜色通道增益因子。

行必须在[ getRowCount() ]范围内,列必须在[ getColumnCount() ]范围内,并且颜色通道必须在[ RggbChannelVector.COUNT ]范围内。

通道顺序为 [R, Geven, Godd, B] ,其中 Geven是拜耳模式偶数行的绿色通道, Godd是奇数行。

Parameters
colorChannel int: color channel from [R, Geven, Godd, B]
column int: within the range [0, getColumnCount())
row int: within the range [0, getRowCount())
Returns
float a gain factor >= .MINIMUM_GAIN_FACTOR
Throws
IllegalArgumentException if any of the parameters was out of range

也可以看看:

getGainFactorCount

Added in API level 21
int getGainFactorCount ()

获取此地图中增益因子的总数。

单个增益因子恰好包含一个颜色通道。 copyGainFactors(float[], int)一起使用来分配足够大的数组。

Returns
int

getGainFactorVector

Added in API level 21
RggbChannelVector getGainFactorVector (int column, 
                int row)

从该镜头着色贴图的行和列中获取增益因子矢量。

行必须在[ getRowCount() ]范围内,列必须在[ getColumnCount() ]范围内。

Parameters
column int: within the range [0, getColumnCount())
row int: within the range [0, getRowCount())
Returns
RggbChannelVector an RggbChannelVector where each gain factor >= .MINIMUM_GAIN_FACTOR
Throws
IllegalArgumentException if any of the parameters was out of range

也可以看看:

getRowCount

Added in API level 21
int getRowCount ()

获取此地图中的行数。

Returns
int

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 ()

返回LensShadingMap作为字符串表示。

"LensShadingMap{R:([%f, %f, ... %f], ... [%f, %f, ... %f]), G_even:([%f, %f, ... %f], ... [%f, %f, ... %f]), G_odd:([%f, %f, ... %f], ... [%f, %f, ... %f]), B:([%f, %f, ... %f], ... [%f, %f, ... %f])}" ,其中每个 %f表示一个增益因子,并且每个 [%f, %f, ... %f]表示一行镜头着色图

Returns
String string representation of LensShadingMap

Hooray!