Class LensShadingMap¶
- java.lang.Object
-
- com.iristick.smartglass.support.camera2.params.LensShadingMap
com.iristick.smartglass.core.camera
package instead.@Deprecated public abstract class LensShadingMap extends Object
4 x N x M
lens shading map of floats.- Since:
- Android API level 21
- See Also:
CaptureResult.STATISTICS_LENS_SHADING_CORRECTION_MAP
Field Summary¶
Modifier and Type | Field and Description |
---|---|
static float |
MINIMUM_GAIN_FACTOR
Deprecated.
The smallest gain factor in this map.
|
Constructor Summary¶
Constructor and Description |
---|
LensShadingMap()
Deprecated.
|
Method Summary¶
Modifier and Type | Method and Description |
---|---|
abstract void |
copyGainFactors(float[] destination,
int offset)
Deprecated.
Copy all gain factors in row-major order from this lens shading map into the destination.
|
abstract boolean |
equals(Object obj)
Deprecated.
Check if this LensShadingMap is equal to another LensShadingMap.
|
abstract int |
getColumnCount()
Deprecated.
Get the number of columns in this map.
|
abstract float |
getGainFactor(int colorChannel,
int column,
int row)
Deprecated.
Get a single color channel gain factor from this lens shading map by its row and column.
|
abstract int |
getGainFactorCount()
Deprecated.
Get the total number of gain factors in this map.
|
abstract RggbChannelVector |
getGainFactorVector(int column,
int row)
Deprecated.
Get a gain factor vector from this lens shading map by its row and column.
|
abstract int |
getRowCount()
Deprecated.
Get the number of rows in this map.
|
abstract int |
hashCode()
Deprecated.
|
abstract String |
toString()
Deprecated.
Return the LensShadingMap as a string representation.
|
Methods inherited from class java.lang.Object¶
getClass, notify, notifyAll, wait, wait, wait
Field Detail¶
MINIMUM_GAIN_FACTOR¶
public static final float MINIMUM_GAIN_FACTOR
All values in this map will be at least this large.
Constructor Detail¶
LensShadingMap¶
public LensShadingMap()
Method Detail¶
getRowCount¶
public abstract int getRowCount()
- Returns:
- The number of rows.
getColumnCount¶
public abstract int getColumnCount()
- Returns:
- The number of columns.
getGainFactorCount¶
public abstract int getGainFactorCount()
A single gain factor contains exactly one color channel.
Use with copyGainFactors(float[], int)
to allocate a large-enough array.
- Returns:
- The total number of gain factors.
getGainFactor¶
public abstract float getGainFactor(int colorChannel, int column, int row)
The rows must be within the range [0, getRowCount()
),
the column must be within the range [0, getColumnCount()
),
and the color channel must be within the range [0, ).
The channel order is [R, Geven, Godd, B]
, where
Geven
is the green channel for the even rows of a Bayer pattern, and
Godd
is the odd rows.
- Parameters:
colorChannel
- color channel from[R, Geven, Godd, B]
column
- within the range [0,getColumnCount()
)row
- within the range [0,getRowCount()
)- Returns:
- a gain factor ≥ 1.0f
- Throws:
IllegalArgumentException
- if any of the parameters was out of range- See Also:
RggbChannelVector.RED
,RggbChannelVector.GREEN_EVEN
,RggbChannelVector.GREEN_ODD
,RggbChannelVector.BLUE
,getRowCount()
,getColumnCount()
getGainFactorVector¶
public abstract RggbChannelVector getGainFactorVector(int column, int row)
The rows must be within the range [0, getRowCount()
),
the column must be within the range [0, getColumnCount()
).
- Parameters:
column
- within the range [0,getColumnCount()
)row
- within the range [0,getRowCount()
)- Returns:
- an
RggbChannelVector
where each gain factor ≥ 1.0f - Throws:
IllegalArgumentException
- if any of the parameters was out of range- See Also:
getRowCount()
,getColumnCount()
copyGainFactors¶
public abstract void copyGainFactors(float[] destination, int offset)
Each gain factor will be ≥ MINIMUM_GAIN_FACTOR
.
- Parameters:
destination
- an array big enough to hold at leastRggbChannelVector.COUNT
elements after theoffset
offset
- a non-negative offset into the array- Throws:
NullPointerException
- Ifdestination
wasnull
IllegalArgumentException
- If offset was negativeArrayIndexOutOfBoundsException
- If there's not enough room to write the elements at the specified destination and offset.- See Also:
CaptureResult.STATISTICS_LENS_SHADING_CORRECTION_MAP
equals¶
public abstract boolean equals(Object obj)
Two lens shading maps are equal if and only if they have the same rows/columns,
and all of their elements are equal
.
hashCode¶
public abstract int hashCode()
toString¶
public abstract String toString()
"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])}"
,
where each %f
represents one gain factor and each [%f, %f, ... %f]
represents
a row of the lens shading map
- Overrides:
toString
in classObject
- Returns:
- string representation of
LensShadingMap