java.lang.Object | |
↳ | android.hardware.camera2.params.TonemapCurve |
Immutable class for describing a 2 x M x 3
tonemap curve of floats.
This defines red, green, and blue curves that the CameraDevice
will
use as the tonemapping/contrast/gamma curve when TONEMAP_MODE
is
set to TONEMAP_MODE_CONTRAST_CURVE
.
The total number of points (Pin, Pout)
for each color channel can be no more than
TONEMAP_MAX_CURVE_POINTS
.
The coordinate system for each point is within the inclusive range
[.LEVEL_BLACK
, .LEVEL_WHITE
].
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | CHANNEL_BLUE | Index of the blue color channel curve. | |||||||||
int | CHANNEL_GREEN | Index of the green color channel curve. | |||||||||
int | CHANNEL_RED | Index of the red color channel curve. | |||||||||
float | LEVEL_BLACK | Lower bound tonemap value corresponding to pure black for a single color channel. | |||||||||
float | LEVEL_WHITE | Upper bound tonemap value corresponding to a pure white for a single color channel. | |||||||||
int | POINT_SIZE | Number of elements in a (Pin, Pout) point;
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a new immutable TonemapCurve instance.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Copy the color curve for a single color channel from this tonemap curve into the destination.
| |||||||||||
Check if this TonemapCurve is equal to another TonemapCurve.
| |||||||||||
Get the point for a color channel at a specified index.
| |||||||||||
Get the number of points stored in this tonemap curve for the specified color channel.
| |||||||||||
Returns an integer hash code for this object.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Index of the blue color channel curve.
Index of the green color channel curve.
Index of the red color channel curve.
Lower bound tonemap value corresponding to pure black for a single color channel.
Upper bound tonemap value corresponding to a pure white for a single color channel.
Number of elements in a (Pin, Pout)
point;
Create a new immutable TonemapCurve instance.
Values are stored as a contiguous array of (Pin, Pout)
points.
All parameters may have independent length but should have at most
TONEMAP_MAX_CURVE_POINTS
* .POINT_SIZE
elements.
All sub-elements must be in the inclusive range of
[.LEVEL_BLACK
, .LEVEL_WHITE
].
This constructor copies the array contents and does not retain ownership of the array.
red | An array of elements whose length is divisible by .POINT_SIZE |
---|---|
green | An array of elements whose length is divisible by .POINT_SIZE |
blue | An array of elements whose length is divisible by .POINT_SIZE |
IllegalArgumentException | if any of input array length is invalid,
or if any of the elements in the array are not in the range of
[.LEVEL_BLACK , .LEVEL_WHITE ] |
---|---|
NullPointerException | if any of the parameters are null
|
Copy the color curve for a single color channel from this tonemap curve into the destination.
Values are stored as packed (Pin, Pout
) points, and there are a total of
getPointCount(int)
points for that respective channel.
All returned coordinates are between the range of
[.LEVEL_BLACK
, .LEVEL_WHITE
].
destination | an array big enough to hold at least getPointCount(int) *
POINT_SIZE elements after the offset |
---|---|
offset | a non-negative offset into the array |
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. |
Check if this TonemapCurve is equal to another TonemapCurve.
Two matrices are equal if and only if all of their elements are
equal
.
obj | the object to compare this instance with. |
---|
true
if the objects were equal, false
otherwise
Get the point for a color channel at a specified index.
The index must be at least 0 but no greater than getPointCount(int)
for
that colorChannel
.
All returned coordinates in the point are between the range of
[.LEVEL_BLACK
, .LEVEL_WHITE
].
colorChannel | CHANNEL_RED , CHANNEL_GREEN , or CHANNEL_BLUE |
---|---|
index | at least 0 but no greater than getPointCount(colorChannel) |
(Pin, Pout)
pair mapping the tone for that indexIllegalArgumentException | if colorChannel or index was out of range |
---|
Get the number of points stored in this tonemap curve for the specified color channel.
colorChannel | one of CHANNEL_RED , CHANNEL_GREEN , CHANNEL_BLUE |
---|
IllegalArgumentException | if colorChannel was out of range
|
---|
Returns an integer hash code for this object. By contract, any two
objects for which equals(Object)
returns true
must return
the same hash code value. This means that subclasses of Object
usually override both methods or neither method.
Note that hash values must not change over time unless information used in equals comparisons also changes.
See Writing a correct
hashCode
method
if you intend implementing your own hashCode
method.