java.lang.Object | |
↳ | android.hardware.camera2.params.RggbChannelVector |
Immutable class to store a 4-element vector of floats indexable by a bayer RAW 2x2 pixel block.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | BLUE | Blue color channel in a bayer Raw pattern. | |||||||||
int | COUNT | The number of color channels in this vector. | |||||||||
int | GREEN_EVEN | Green color channel in a bayer Raw pattern used by the even rows. | |||||||||
int | GREEN_ODD | Green color channel in a bayer Raw pattern used by the odd rows. | |||||||||
int | RED | Red color channel in a bayer Raw pattern. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a new
RggbChannelVector from an RGGB 2x2 pixel.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Copy the vector into the destination in the order
[R, Geven, Godd, B] .
| |||||||||||
Check if this
RggbChannelVector is equal to another RggbChannelVector .
| |||||||||||
Get the blue component.
| |||||||||||
Get the component by the color channel index.
| |||||||||||
Get the green (even rows) component.
| |||||||||||
Get the green (odd rows) component.
| |||||||||||
Get the red component.
| |||||||||||
Returns an integer hash code for this object.
| |||||||||||
Return the RggbChannelVector as a string representation.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Blue color channel in a bayer Raw pattern.
The number of color channels in this vector.
Green color channel in a bayer Raw pattern used by the even rows.
Green color channel in a bayer Raw pattern used by the odd rows.
Red color channel in a bayer Raw pattern.
Create a new RggbChannelVector
from an RGGB 2x2 pixel.
All pixel values are considered normalized within [0.0f, 1.0f]
(i.e. 1.0f
could be linearized to 255
if converting to a
non-floating point pixel representation).
All arguments must be finite; NaN and infinity is not allowed.
red | red pixel |
---|---|
greenEven | green pixel (even row) |
greenOdd | green pixel (odd row) |
blue | blue pixel |
IllegalArgumentException | if any of the arguments were not finite |
---|
Copy the vector into the destination in the order [R, Geven, Godd, B]
.
destination | an array big enough to hold at least .COUNT elements after the
offset |
---|---|
offset | a non-negative offset into the array |
NullPointerException | If destination was null |
---|---|
ArrayIndexOutOfBoundsException | If there's not enough room to write the elements at the specified destination and offset. |
Check if this RggbChannelVector
is equal to another RggbChannelVector
.
Two vectors are only equal if and only if each of the respective elements is equal.
obj | the object to compare this instance with. |
---|
true
if the objects were equal, false
otherwise
Get the blue component.
Get the component by the color channel index.
colorChannel
must be one of RED
, GREEN_EVEN
, GREEN_ODD
,
BLUE
.
colorChannel | greater or equal to 0 and less than COUNT |
---|
IllegalArgumentException | if colorChannel was out of range
|
---|
Get the green (even rows) component.
Get the green (odd rows) component.
Get the red component.
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.
Return the RggbChannelVector as a string representation.
"RggbChannelVector{R:%f, G_even:%f, G_odd:%f, B:%f
"}, where each
%f
respectively represents one of the the four color channels.
RggbChannelVector