video3d_stream_open video3d_start_streaming navigation bar

Table of Contents

video3d_stream_set_properties

Sets properties of a video stream.

Description

The video3d_stream_set_properties function sets properties of a video stream. For boolean options use a value of 0.0 or 1.0. All other options should have a range of 0.0 to 1.0 inclusive. The function will do the appropriate scaling for the internal camera settings. Any values outside the range will be saturated to lie within the range.

Prototype

t_error
video3d_stream_set_properties(t_video3d_stream stream, t_video3d_property * properties, size_t num_properties, t_double * values);
    

Parameters

t_video3d_stream stream

The handle to the video stream returned by video3d_stream_open.

t_video3d_property * properties

An array of property codes of the properties to set. Valid property codes are:

Property Code

Description

VIDEO3D_PROPERTY_BACKLIGHT_COMPENSATION

The backlight compensation for the video stream.

VIDEO3D_PROPERTY_BRIGHTNESS

The brightness of the video stream.

VIDEO3D_PROPERTY_CONTRAST

The contrast of the video stream.

VIDEO3D_PROPERTY_EXPOSURE

The exposure time of the video stream.

VIDEO3D_PROPERTY_GAIN

The gain to apply to the video stream.

VIDEO3D_PROPERTY_GAMMA

The gamma correction to apply to the video stream.

VIDEO3D_PROPERTY_HUE

The hue adjustment to apply to the video stream.

VIDEO3D_PROPERTY_SATURATION

The saturation adjustment to apply to the video stream. A saturation of 0.0 will make the stream grayscale.

VIDEO3D_PROPERTY_SHARPNESS

The sharpness to apply to the video stream.

VIDEO3D_PROPERTY_WHITE_BALANCE

The manual white balance to apply to the video stream.

VIDEO3D_PROPERTY_ENABLE_AUTO_EXPOSURE

Whether to enable auto-exposure of the video stream.

VIDEO3D_PROPERTY_ENABLE_AUTO_WHITE_BALANCE

Whether to enable automatic white balancing of the video stream.

VIDEO3D_PROPERTY_ENABLE_EMITTER

Whether to enable the laser emitter used by depth cameras to facilitate better depth determination.

VIDEO3D_PROPERTY_VISUAL_PRESET

The visual preset setting to apply to the video stream. The value must be chosen from the t_video3d_visual_preset enumeration.

t_uint num_properties

The number of properties being set. This number indicates the size of the properties argument and the values argument.

t_double * values

An array of values where each element corresponds to the property code at the same index in the properties argument. For boolean options use a value of 0.0 or 1.0. All other options should have a range of 0.0 to 1.0 inclusive. The function will do the appropriate scaling for the internal camera settings. Any values outside the range will be saturated to lie within the range.

Return value

The return value is 0 if the properties were set successfully. Otherwise a negative error code is returned. Error codes are defined in quanser_errors.h. A suitable error message may be retrieved using msg_get_error_message.

Error codes

QERR_EMITTER_CANNOT_BE_DISABLED

The laser emitter on the depth camera cannot be disabled.

QERR_INVALID_ARGUMENT

One of the arguments is invalid.

QERR_INVALID_CAMERA_PROPERTY_VALUE

The property value specified is not supported by the camera. Check that the value corresponds with the camera selected.

QERR_PROPERTY_IS_READ_ONLY

The property is read-only. It cannot be set.

QERR_PROPERTY_NOT_RECOGNIZED

One or more of the specified properties were not recognized by the board-specific driver.

QERR_PROPERTY_NOT_SUPPORTED

The specified property is not supported.

Requirements

Include Files

Libraries

quanser_video3d.h

quanser_media.lib;quanser_communications.lib;quanser_runtime.lib;quanser_common.lib

Examples

t_video3d_property properties[] = { VIDEO3D_PROPERTY_BRIGHTNESS, VIDEO3D_PROPERTY_CONTRAST };
t_double values[] = { 0.5, 0.7 };
t_error result;

result = video3d_stream_set_property(stream, properties, ARRAY_LENGTH(properties), values);
    

See Also

 

navigation bar