File containing Project Tango C API. More...
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
Go to the source code of this file.
Classes | |
struct | TangoCameraIntrinsics |
struct | TangoCameraMetadata |
struct | TangoCoordinateFrameId |
struct | TangoCoordinateFramePair |
The TangoCoordinateFramePair struct contains a pair of coordinate frames of reference. More... | |
struct | TangoEvent |
The TangoEvent structure signals important sensor and tracking events. Each event comes with a timestamp, a type, and a key-value pair describing the event. The type is an enumeration which generally classifies the event type. The key is a text string describing the event. The description holds parameters specific to the event. More... | |
struct | TangoImage |
struct | TangoImageBuffer |
struct | TangoPointCloud |
TangoPointCloud contains information returned from the depth sensor. More... | |
struct | TangoPoseData |
struct | TangoTransformation |
struct | TangoXYZij |
Macros | |
#define | TANGO_COORDINATE_FRAME_ID_LEN 37 |
#define | TANGO_LEVEL_ID_BYTE_MAX_LEN 19 |
#define | TANGO_LEVEL_SHORT_NAME_BYTE_MAX_LEN 16 |
#define | TANGO_MAX_IMAGE_PLANES (4) |
#define | TANGO_UUID_LEN 37 |
Typedefs | |
typedef void * | TangoAreaDescriptionMetadata |
typedef int64_t | TangoBufferId |
typedef struct TangoCameraIntrinsics | TangoCameraIntrinsics |
typedef struct TangoCameraMetadata | TangoCameraMetadata |
typedef void * | TangoConfig |
typedef struct TangoCoordinateFrameId | TangoCoordinateFrameId |
typedef struct TangoEvent | TangoEvent |
The TangoEvent structure signals important sensor and tracking events. Each event comes with a timestamp, a type, and a key-value pair describing the event. The type is an enumeration which generally classifies the event type. The key is a text string describing the event. The description holds parameters specific to the event. More... | |
typedef struct TangoImage | TangoImage |
typedef struct TangoImageBuffer | TangoImageBuffer |
typedef struct TangoPointCloud | TangoPointCloud |
TangoPointCloud contains information returned from the depth sensor. More... | |
typedef struct TangoPoseData | TangoPoseData |
typedef void(* | TangoService_OnTextureAvailable) (void *, TangoCameraId) |
Callback for when a new camera texture is available. More... | |
typedef struct TangoTransformation | TangoTransformation |
typedef char | TangoUUID[TANGO_UUID_LEN] |
typedef struct TangoXYZij | TangoXYZij |
File containing Project Tango C API.
Definition in file tango_client_api.h.
#define TANGO_MAX_IMAGE_PLANES (4) |
The TangoImage contains information about a byte buffer holding image data. This version supplies a pointer to the start of each image plane, as there may be padding between the planes. It is meant to closely replicate the data available from the Android Image class, and as such camera specific metadata has been moved into a separate struct, TangoCameraMetadata.
Definition at line 382 of file tango_client_api.h.
typedef struct TangoCameraIntrinsics TangoCameraIntrinsics |
The TangoCameraIntrinsics struct contains intrinsic parameters for a camera.
Given a 3D point (X, Y, Z) in camera coordinates, the corresponding pixel coordinates (x, y) are:
The normalized radial distance ru is given by:
The distorted radial distance rd depends on the distortion model used.
TANGO_CALIBRATION_POLYNOMIAL_3_PARAMETERS
implements Brown's camera model, where rd
is a polynomial that depends on the three distortion coefficients k1
, k2
and k3:
TANGO_CALIBRATION_EQUIDISTANT
implements the FOV camera model, where rd
depends on the single distortion coefficient w:
For more information, see our page on Camera Intrinsics and Extrinsics.
typedef struct TangoCameraMetadata TangoCameraMetadata |
TangoCameraMetadata. This struct contains information specific to the camera capture. It is meant to replicate some of the information provided by the Android CameraMetadata class.
typedef struct TangoEvent TangoEvent |
The TangoEvent structure signals important sensor and tracking events. Each event comes with a timestamp, a type, and a key-value pair describing the event. The type is an enumeration which generally classifies the event type. The key is a text string describing the event. The description holds parameters specific to the event.
Possible descriptions (as "key:value") are:
typedef struct TangoImage TangoImage |
typedef struct TangoImageBuffer TangoImageBuffer |
The TangoImageBuffer contains information about a byte buffer holding image data. This data is populated by the service when it returns an image.
typedef struct TangoPointCloud TangoPointCloud |
TangoPointCloud contains information returned from the depth sensor.
typedef struct TangoPoseData TangoPoseData |
The TangoPoseData struct contains pose information returned from motion tracking. The device pose is given using Android conventions. See the Android Sensor Overview page for more information.
typedef struct TangoTransformation TangoTransformation |
The TangoTransformation struct contains an orientation and translation that can be applied to transform a point.
typedef struct TangoXYZij TangoXYZij |
TangoPointCloud
instead.The TangoXYZij struct contains information returned from the depth sensor.
TangoErrorType TangoService_Experimental_connectTextureIdUnity | ( | TangoCameraId | id, |
unsigned int | texture_y, | ||
unsigned int | texture_Cb, | ||
unsigned int | texture_Cr, | ||
void * | context, | ||
void(*)(void *, TangoCameraId) | callback | ||
) |
Experimental API only, subject to change. Connect a Texture IDs to a camera. The camera is selected via TangoCameraId. Currently only TANGO_CAMERA_COLOR is supported. The texture handles will be regenerated by the API on startup after which the application can use them, and will be packed RGBA8888 data containing bytes of the image (so a single RGBA8888 will pack 4 neighbouring pixels). If the config flag experimental_image_pixel_format is set to HAL_PIXEL_FORMAT_YCrCb_420_SP, texture_y will pack 1280x720 pixels into a 320x720 RGBA8888 texture. texture_Cb and texture_Cr will contain copies of the 2x2 downsampled interleaved UV planes packed similarly. If experimental_image_pixel_format is set to HAL_PIXEL_FORMAT_YV12 then texture_y will have a stride of 1536 containing 1280 columns of data, packed similarly in a RGBA8888 texture. texture_Cb and texture_Cr will be 2x2 downsampled versions of the same. See YV12 and NV21 formats for details.
id | The ID of the camera to connect this texture to. Only TANGO_CAMERA_COLOR and TANGO_CAMERA_FISHEYE are supported. |
context | The context returned during the onFrameAvailable callback. |
texture_y | The texture ID to use for the Y-plane. |
texture_Cb | The texture ID to use for a chroma plane. |
texture_Cr | The texture ID to use for a chroma plane. |
TANGO_INVALID
if the camera ID is not valid, or TANGO_ERROR
if an internal error occurred. TangoErrorType TangoService_Experimental_deleteDataset | ( | const TangoUUID | dataset_uuid | ) |
Experimental API only, subject to change. Deletes a dataset.
dataset_uuid | The ID of the dataset to be deleted. |
TANGO_SUCCESS
if the dataset was successfully deleted, TANGO_ERROR
if communication failed or the datasets could not be found, or TANGO_NO_DATASET_PERMISSION
if user has not given permissions to read and write datasets. TangoErrorType TangoService_Experimental_getCurrentDatasetUUID | ( | TangoUUID * | dataset_uuid | ) |
Experimental API only, subject to change. Gets the current dataset UUID.
dataset_uuid | The current dataset UUID. |
TANGO_SUCCESS
if the id was successfully retrieved, or TANGO_ERROR
if communication failed. TangoErrorType TangoService_Experimental_getDatasetUUIDs | ( | TangoUUID ** | dataset_uuids, |
int * | num_dataset_uuids | ||
) |
Experimental API only, subject to change. Returns a list of Tango dataset UUIDs, containing a UUID for each valid dataset recorded to the Tango Service application directory. Memory will be dynamically allocated by this call, and must be deallocated using TangoService_Experimental_ReleaseDatasetUUIDs. The service does not need to be connected in order to call this function.
dataset_uuids | a dynamic array of TangoUUIDs. Will be dynamically allocated by this call. |
num_dataset_uuids | An output parameter for the number of dataset UUIDs returned. |
TANGO_SUCCESS
if the dataset UUIDs were successfully retrieved, TANGO_ERROR
if communication failed or the datasets could not be enumerated, TANGO_NO_DATASET_PERMISSION
if user has not given permissions to read and write datasets, or TANGO_INVALID
if any of the arguments passed were NULL
. TangoErrorType TangoService_Experimental_releaseDatasetUUIDs | ( | TangoUUID ** | dataset_uuids | ) |
Experimental API only, subject to change Frees up memory allocated by TangoService_Experimental_GetDatasetUUIDs
dataset_uuids | a dynamic array of TangoUUIDs. Will be deallocated by this call. |
TANGO_INVALID
if any of the arguments passed were NULL; TANGO_SUCCESS
otherwise.