camera_get_physical_property()

Updated: April 19, 2023

Retrieve one or more physical properties of the camera

Synopsis:

#include <camera/camera_api.h>
#define camera_get_physical_property(handle,
                                     args...)

Arguments:

handle
The handle returned by a call to the camera_open() function.
args
A series of comma-delimited property-value pairs where each value must be a pointer to a variable of the expected type. For details on how to specify multiple property-value pairs, see the function description.

Library:

libcamapi

Description:

For the args argument, you can provide one or more property-value pairs using a camera_physprop_t value as the name of each property and a pointer to the correct type, such as int or double, for the value.

Note:

There is no type-checking performed by the compiler. Therefore, you must ensure that the value you provide for each property matches the expected data type. Data type mismatches can result in undefined behavior and cause your application to crash.

You can specify multiple property-value pairs by delimiting them with a comma as follows:
 camera_get_physical_property( camera_handle,
                               CAMERA_PHYSPROP_FOCALLENGTH, &focalLength,
                               CAMERA_PHYSPROP_HORIZONTALFOV, &horizFov );

Returns:

CAMERA_EOK when the function successfully completes, otherwise another camera_error_t value that provides the reason that the call failed.