Added in API level 35

LensIntrinsicsSample


class LensIntrinsicsSample
kotlin.Any
   ↳ android.hardware.camera2.params.LensIntrinsicsSample

Immutable class to store an lens intrinsics intra-frame sample.

Summary

Public constructors
LensIntrinsicsSample(timestampNs: Long, lensIntrinsics: FloatArray)

Create a new LensIntrinsicsSample.

Public methods
Boolean
equals(other: Any?)

Check if this LensIntrinsicsSample is equal to another LensIntrinsicsSample.

FloatArray

Get the lens intrinsics calibration

Long

Get the timestamp in nanoseconds.

Int

Returns a hash code value for the object.

String

Return the LensIntrinsicsSample as a string representation.

Public constructors

LensIntrinsicsSample

Added in API level 35
LensIntrinsicsSample(
    timestampNs: Long,
    lensIntrinsics: FloatArray)

Create a new LensIntrinsicsSample.

LensIntrinsicsSample contains the timestamp and the CaptureResult.LENS_INTRINSIC_CALIBRATION sample.

Parameters
timestampNs Long: timestamp in nanoseconds of the lens intrinsics sample. This uses the same time basis as CaptureResult.SENSOR_TIMESTAMP.
lensIntrinsics FloatArray: the lens intrinsic calibration for the sample. This value cannot be null.
Exceptions
java.lang.IllegalArgumentException if lensIntrinsics length is different from 5

Public methods

equals

Added in API level 35
fun equals(other: Any?): Boolean

Check if this LensIntrinsicsSample is equal to another LensIntrinsicsSample.

Two samples are only equal if and only if each of the lens intrinsics are equal.

Parameters
obj the reference object with which to compare.
Return
Boolean true if the objects were equal, false otherwise

getLensIntrinsics

Added in API level 35
fun getLensIntrinsics(): FloatArray

Get the lens intrinsics calibration

Return
FloatArray a floating point value (guaranteed to be finite) This value cannot be null.

getTimestampNanos

Added in API level 35
fun getTimestampNanos(): Long

Get the timestamp in nanoseconds.

The timestamps are in the same time basis as and comparable to android.sensor.timestamp.

Return
Long a long value (guaranteed to be finite)

hashCode

Added in API level 35
fun hashCode(): Int

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • 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 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 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.
Return
Int a hash code value for this object.

toString

Added in API level 35
fun toString(): String

Return the LensIntrinsicsSample as a string representation.

"LensIntrinsicsSample{timestamp:%l, sample:%s}" represents the LensIntrinsics sample's timestamp, and calibration data.

Return
String string representation of LensIntrinsicsSample