public class Camera
Class that represents state of camera device.
The precision of the camera properties depends on its calibration, so it's recommended to use them when the Camera.isCalibrated
value becomes true
.
Constructor and Description |
---|
Camera(int frameWidth,
int frameHeight,
float fieldOfView,
float aspectRatio,
float roll,
float pitch,
float yaw,
float height,
boolean isCalibrated,
float calibrationProgress)
Class that represents state of camera device.
The precision of the camera properties depends on its calibration, so it's recommended to use them when the
Camera.isCalibrated value becomes true . |
Modifier and Type | Method and Description |
---|---|
float |
getAspectRatio()
The ratio of width to height of the camera frame.
|
float |
getCalibrationProgress()
Calibration progress.
|
float |
getFieldOfView()
Vertical field of view expressed in radians.
|
int |
getFrameHeight()
Camera frame height.
|
int |
getFrameWidth()
Camera frame width.
|
float |
getHeight()
Height above the road surface in meters.
|
float |
getPitch()
Pitch of the camera in radians.
|
float |
getRoll()
Roll of the camera in radians.
|
float |
getYaw()
Yaw of the camera in radians.
|
boolean |
isCalibrated()
Returns
|
public Camera(int frameWidth, int frameHeight, float fieldOfView, float aspectRatio, float roll, float pitch, float yaw, float height, boolean isCalibrated, float calibrationProgress)
Class that represents state of camera device.
The precision of the camera properties depends on its calibration, so it's recommended to use them when the Camera.isCalibrated
value becomes true
.
frameWidth
- Camera frame width.frameHeight
- Camera frame height.fieldOfView
- Vertical field of view expressed in radians.aspectRatio
- The ratio of width to height of the camera frame. Aspect ratio is 0 when frame height is 0.roll
- Roll of the camera in radians.Expresses rotation around Y axis (goes from the right to the left of the vehicle).Camera pointing straight to the road will have roll = pi/2 radians (90 degrees).pitch
- Pitch of the camera in radians.Expresses rotation around Z axis (goes from the bottom to the top of the vehicle).Camera pointing straight to the road will have pitch = 0 radians.yaw
- Yaw of the camera in radians.Expresses rotation around X axis (goes from the rear to the front of the vehicle).Camera pointing straight to the road will have yaw = 0 radians.height
- Height above the road surface in meters.isCalibrated
- Returns true
when calibrationProgress
reaches 1, otherwise - false
.calibrationProgress
- Calibration progress. Value in range 0;1 where 1 stands for finished calibration.frameWidth
- Camera frame width.frameHeight
- Camera frame height.fieldOfView
- Vertical field of view expressed in radians.aspectRatio
- The ratio of width to height of the camera frame. Aspect ratio is 0 when frame height is 0.roll
- Roll of the camera in radians.
Expresses rotation around Y axis (goes from the right to the left of the vehicle).
Camera pointing straight to the road will have roll = pi/2 radians (90 degrees).pitch
- Pitch of the camera in radians.
Expresses rotation around Z axis (goes from the bottom to the top of the vehicle).
Camera pointing straight to the road will have pitch = 0 radians.yaw
- Yaw of the camera in radians.
Expresses rotation around X axis (goes from the rear to the front of the vehicle).
Camera pointing straight to the road will have yaw = 0 radians.height
- Height above the road surface in meters.isCalibrated
- Returns true
when calibrationProgress
reaches 1, otherwise - false
.calibrationProgress
- Calibration progress. Value in range 0;1 where 1 stands for finished calibration.public int getFrameWidth()
Camera frame width.
public int getFrameHeight()
Camera frame height.
public float getFieldOfView()
Vertical field of view expressed in radians.
public float getAspectRatio()
The ratio of width to height of the camera frame.
Aspect ratio is 0 when frame height is 0.
public float getRoll()
Roll of the camera in radians.
Expresses rotation around Y axis (goes from the right to the left of the vehicle).Camera pointing straight to the road will have roll = pi/2 radians (90 degrees).
public float getPitch()
Pitch of the camera in radians.
Expresses rotation around Z axis (goes from the bottom to the top of the vehicle).Camera pointing straight to the road will have pitch = 0 radians.
public float getYaw()
Yaw of the camera in radians.
Expresses rotation around X axis (goes from the rear to the front of the vehicle).Camera pointing straight to the road will have yaw = 0 radians.
public float getHeight()
Height above the road surface in meters.
public boolean isCalibrated()
Returns
true
when calibrationProgress
reaches 1, otherwise - false
.