![]() |
ARX
1.0
The next-generation open source augmented reality toolkit.
|
#include <ARX/AR/ar.h>
#include <ARX/ARVideo/videoConfig.h>
#include <limits.h>
#include <ARX/ARVideo/videoLuma.h>
Go to the source code of this file.
Classes | |
struct | ARVideoSourceInfoT |
Values describing a video source. More... | |
struct | ARVideoSourceInfoListT |
Values describing a list of video sources. More... | |
struct | AR2VideoParamT |
Macros | |
#define | AR_VIDEO_1394_BRIGHTNESS 65 |
#define | AR_VIDEO_1394_BRIGHTNESS_FEATURE_ON 66 |
#define | AR_VIDEO_1394_BRIGHTNESS_AUTO_ON 67 |
#define | AR_VIDEO_1394_BRIGHTNESS_MAX_VAL 68 |
#define | AR_VIDEO_1394_BRIGHTNESS_MIN_VAL 69 |
#define | AR_VIDEO_1394_EXPOSURE 70 |
#define | AR_VIDEO_1394_EXPOSURE_FEATURE_ON 71 |
#define | AR_VIDEO_1394_EXPOSURE_AUTO_ON 72 |
#define | AR_VIDEO_1394_EXPOSURE_MAX_VAL 73 |
#define | AR_VIDEO_1394_EXPOSURE_MIN_VAL 74 |
#define | AR_VIDEO_1394_WHITE_BALANCE 75 |
#define | AR_VIDEO_1394_WHITE_BALANCE_UB 76 |
#define | AR_VIDEO_1394_WHITE_BALANCE_VR 77 |
#define | AR_VIDEO_1394_WHITE_BALANCE_FEATURE_ON 78 |
#define | AR_VIDEO_1394_WHITE_BALANCE_AUTO_ON 79 |
#define | AR_VIDEO_1394_WHITE_BALANCE_MAX_VAL 80 |
#define | AR_VIDEO_1394_WHITE_BALANCE_MIN_VAL 81 |
#define | AR_VIDEO_1394_SHUTTER_SPEED 82 |
#define | AR_VIDEO_1394_SHUTTER_SPEED_FEATURE_ON 83 |
#define | AR_VIDEO_1394_SHUTTER_SPEED_AUTO_ON 84 |
#define | AR_VIDEO_1394_SHUTTER_SPEED_MAX_VAL 85 |
#define | AR_VIDEO_1394_SHUTTER_SPEED_MIN_VAL 86 |
#define | AR_VIDEO_1394_GAIN 87 |
#define | AR_VIDEO_1394_GAIN_FEATURE_ON 88 |
#define | AR_VIDEO_1394_GAIN_AUTO_ON 89 |
#define | AR_VIDEO_1394_GAIN_MAX_VAL 90 |
#define | AR_VIDEO_1394_GAIN_MIN_VAL 91 |
#define | AR_VIDEO_1394_FOCUS 92 |
#define | AR_VIDEO_1394_FOCUS_FEATURE_ON 93 |
#define | AR_VIDEO_1394_FOCUS_AUTO_ON 94 |
#define | AR_VIDEO_1394_FOCUS_MAX_VAL 95 |
#define | AR_VIDEO_1394_FOCUS_MIN_VAL 96 |
#define | AR_VIDEO_1394_GAMMA 97 |
#define | AR_VIDEO_1394_GAMMA_FEATURE_ON 98 |
#define | AR_VIDEO_1394_GAMMA_AUTO_ON 99 |
#define | AR_VIDEO_1394_GAMMA_MAX_VAL 100 |
#define | AR_VIDEO_1394_GAMMA_MIN_VAL 101 |
#define | AR_VIDEO_PARAM_GET_IMAGE_ASYNC 200 |
int More... | |
#define | AR_VIDEO_PARAM_DEVICEID 201 |
string, readonly. Optional. Unique name for this exact model of video device, consisting of vendor, model and board identifiers separated by '/' characters. More... | |
#define | AR_VIDEO_PARAM_NAME 202 |
string, readonly. Optional. Human-readable name for this model of video device. More... | |
#define | AR_VIDEO_FOCUS_MODE 301 |
int More... | |
#define | AR_VIDEO_FOCUS_MANUAL_DISTANCE 302 |
double More... | |
#define | AR_VIDEO_FOCUS_POINT_OF_INTEREST_X 303 |
double More... | |
#define | AR_VIDEO_FOCUS_POINT_OF_INTEREST_Y 304 |
double More... | |
#define | AR_VIDEO_PARAM_AVFOUNDATION_IOS_DEVICE 400 |
int, values from enumeration AR_VIDEO_AVFOUNDATION_IOS_DEVICE. More... | |
#define | AR_VIDEO_PARAM_AVFOUNDATION_FOCUS_PRESET 401 |
int, values from enumeration AR_VIDEO_AVFOUNDATION_FOCUS_PRESET. More... | |
#define | AR_VIDEO_PARAM_AVFOUNDATION_CAMERA_POSITION 402 |
int, values from enumeration AR_VIDEO_AVFOUNDATION_CAMERA_POSITION. More... | |
#define | AR_VIDEO_PARAM_AVFOUNDATION_WILL_CAPTURE_NEXT_FRAME 403 |
int (0=false, 1=true). If true, next incoming frame will also be captured to system's camera roll. More... | |
#define | AR_VIDEO_PARAM_ANDROID_CAMERA_INDEX 500 |
int More... | |
#define | AR_VIDEO_PARAM_ANDROID_CAMERA_FACE 501 |
int More... | |
#define | AR_VIDEO_PARAM_ANDROID_INTERNET_STATE 502 |
int More... | |
#define | AR_VIDEO_PARAM_ANDROID_FOCAL_LENGTH 503 |
double More... | |
#define | AR_VIDEO_GET_VERSION INT_MAX |
#define | AR_VIDEO_FOCUS_MODE_FIXED 0 |
#define | AR_VIDEO_FOCUS_MODE_AUTO 1 |
#define | AR_VIDEO_FOCUS_MODE_POINT_OF_INTEREST 2 |
#define | AR_VIDEO_FOCUS_MODE_MANUAL 3 |
#define | AR_VIDEO_POSITION_UNKNOWN 0x0000 |
Values for device position, as encoded in ARVideoSourceInfoT.flags & AR_VIDEO_SOURCE_INFO_POSITION_MASK. More... | |
#define | AR_VIDEO_POSITION_FRONT 0x0008 |
Camera is on front of device pointing towards user. More... | |
#define | AR_VIDEO_POSITION_BACK 0x0010 |
Camera is on back of device pointing away from user. More... | |
#define | AR_VIDEO_POSITION_LEFT 0x0018 |
Camera is on left of device pointing to user's left. More... | |
#define | AR_VIDEO_POSITION_RIGHT 0x0020 |
Camera is on right of device pointing to user's right. More... | |
#define | AR_VIDEO_POSITION_TOP 0x0028 |
Camera is on top of device pointing toward ceiling when device is held upright. More... | |
#define | AR_VIDEO_POSITION_BOTTOM 0x0030 |
Camera is on bottom of device pointing towards floor when device is held upright. More... | |
#define | AR_VIDEO_POSITION_OTHER 0x0038 |
Camera physical position on device is known but none of the above. More... | |
#define | AR_VIDEO_STEREO_MODE_MONO 0x0000 |
Values for device stereo mode, as encoded in ARVideoSourceInfoT.flags & AR_VIDEO_SOURCE_INFO_STEREO_MODE_MASK. More... | |
#define | AR_VIDEO_STEREO_MODE_LEFT 0x0040 |
Device is left eye of a stereoscopic pair. More... | |
#define | AR_VIDEO_STEREO_MODE_RIGHT 0x0080 |
Device is right eye of a stereoscopic pair. More... | |
#define | AR_VIDEO_STEREO_MODE_FRAME_SEQUENTIAL 0x00C0 |
Device is left and right stereo images in sequential frames. More... | |
#define | AR_VIDEO_STEREO_MODE_SIDE_BY_SIDE 0x0100 |
Device is left and right stereo images in a single frame, arranged horizontally with left eye on left. More... | |
#define | AR_VIDEO_STEREO_MODE_OVER_UNDER 0x0140 |
Device is left and right stereo images in a single frame, arranged vertically with left eye on top. More... | |
#define | AR_VIDEO_STEREO_MODE_HALF_SIDE_BY_SIDE 0x0180 |
Device is left and right stereo images in a single frame with the frames scaled to half-width, arranged horizontally with left eye on left. More... | |
#define | AR_VIDEO_STEREO_MODE_OVER_UNDER_HALF_HEIGHT 0x01C0 |
Device is left and right stereo images in a single frame with the frames scaled to half-height, arranged vertically with left eye on top. More... | |
#define | AR_VIDEO_STEREO_MODE_ROW_INTERLACED 0x0200 |
Device is left and right stereo images in a single frame with row interleaving, where pixels in even-numbered rows are sampled from the left eye, and pixels in odd-number rows from the right eye. More... | |
#define | AR_VIDEO_STEREO_MODE_COLUMN_INTERLACED 0x0240 |
Device is left and right stereo images in a single frame with column interleaving, where pixels in even-numbered columns are sampled from the left eye, and pixels in odd-number columns from the right eye. More... | |
#define | AR_VIDEO_STEREO_MODE_ROW_AND_COLUMN_INTERLACED 0x0280 |
Device is left and right stereo images in a single frame with row and column interleaving, where pixels where the evenness/oddness of the row is the same as the column are sampled from the left eye, and the remaining pixels from the right eye. More... | |
#define | AR_VIDEO_STEREO_MODE_ANAGLYPH_RG 0x02C0 |
Device is left and right stereo images in a single frame, where both eyes are converted to mono and the left eye is carried in the red channel and the right eye in the green channel. More... | |
#define | AR_VIDEO_STEREO_MODE_ANAGLYPH_RB 0x0300 |
Device is left and right stereo images in a single frame, where both eyes are converted to mono and the left eye is carried in the red channel and the right eye in the blue channel. More... | |
#define | AR_VIDEO_STEREO_MODE_RESERVED0 0x0340 |
Reserved for future use. More... | |
#define | AR_VIDEO_STEREO_MODE_RESERVED1 0x0380 |
Reserved for future use. More... | |
#define | AR_VIDEO_STEREO_MODE_RESERVED2 0x03C0 |
Reserved for future use. More... | |
#define | AR_VIDEO_SOURCE_INFO_FLAG_OFFLINE 0x0001 |
Values for ARVideoSourceInfoT.flags. More... | |
#define | AR_VIDEO_SOURCE_INFO_FLAG_IN_USE 0x0002 |
0 = unknown or not in use, 1 = in use. More... | |
#define | AR_VIDEO_SOURCE_INFO_FLAG_OPEN_ASYNC 0x0004 |
0 = open normally, 1 = open async. More... | |
#define | AR_VIDEO_SOURCE_INFO_POSITION_MASK 0x0038 |
compare (value & AR_VIDEO_SOURCE_INFO_POSITION_MASK) against enums. More... | |
#define | AR_VIDEO_SOURCE_INFO_STEREO_MODE_MASK 0x03C0 |
compare (value & AR_VIDEO_SOURCE_INFO_STEREO_MODE_MASK) against enums. More... | |
#define | ARVIDEO_EXTERN |
#define | arVideoGetVersion() arVideoGetParami(AR_VIDEO_GET_VERSION, NULL) |
Get the version of artoolkitX with which the arVideo library was built. More... | |
Typedefs | |
typedef void(* | AR_VIDEO_FRAME_READY_CALLBACK) (void *) |
Functions | |
ARVIDEO_EXTERN AR_VIDEO_MODULE | arVideoGetDefaultModule (void) |
ARVIDEO_EXTERN int | arVideoOpen (const char *config) |
Open a video input module. More... | |
ARVIDEO_EXTERN int | arVideoOpenAsync (const char *config, void(*callback)(void *), void *userdata) |
Open a video input module, invoking a callback once opening is complete. More... | |
ARVIDEO_EXTERN int | arVideoClose (void) |
ARVIDEO_EXTERN int | arVideoDispOption (void) |
ARVIDEO_EXTERN AR_VIDEO_MODULE | arVideoGetModule (void) |
ARVIDEO_EXTERN int | arVideoGetId (ARUint32 *id0, ARUint32 *id1) |
ARVIDEO_EXTERN int | arVideoGetSize (int *x, int *y) |
ARVIDEO_EXTERN int | arVideoGetPixelSize (void) |
ARVIDEO_EXTERN AR_PIXEL_FORMAT | arVideoGetPixelFormat (void) |
ARVIDEO_EXTERN AR2VideoBufferT * | arVideoGetImage (void) |
Get a frame image from the video module. More... | |
ARVIDEO_EXTERN int | arVideoCapStart (void) |
Start video capture. More... | |
ARVIDEO_EXTERN int | arVideoCapStartAsync (AR_VIDEO_FRAME_READY_CALLBACK callback, void *userdata) |
Start video capture with asynchronous notification of new frame arrival. More... | |
ARVIDEO_EXTERN int | arVideoCapStop (void) |
Stop video capture. More... | |
ARVIDEO_EXTERN int | arVideoGetParami (int paramName, int *value) |
Get value of an integer parameter from active video module. More... | |
ARVIDEO_EXTERN int | arVideoSetParami (int paramName, int value) |
Set value of an integer parameter in active video module. More... | |
ARVIDEO_EXTERN int | arVideoGetParamd (int paramName, double *value) |
Get value of a double-precision floating-point parameter from active video module. More... | |
ARVIDEO_EXTERN int | arVideoSetParamd (int paramName, double value) |
Set value of a double-precision floating-point parameter in active video module. More... | |
ARVIDEO_EXTERN int | arVideoGetParams (const int paramName, char **value) |
Get value of a string parameter from active video module. More... | |
ARVIDEO_EXTERN int | arVideoSetParams (const int paramName, const char *value) |
Get value of a string parameter in active video module. More... | |
ARVIDEO_EXTERN int | arVideoSaveParam (char *filename) |
ARVIDEO_EXTERN int | arVideoLoadParam (char *filename) |
ARVIDEO_EXTERN int | arVideoSetBufferSize (const int width, const int height) |
ARVIDEO_EXTERN int | arVideoGetBufferSize (int *width, int *height) |
ARVIDEO_EXTERN int | arVideoGetCParam (ARParam *cparam) |
ARVIDEO_EXTERN int | arVideoGetCParamAsync (void(*callback)(const ARParam *, void *), void *userdata) |
ARVIDEO_EXTERN int | arVideoUtilGetPixelSize (const AR_PIXEL_FORMAT arPixelFormat) |
ARVIDEO_EXTERN const char * | arVideoUtilGetPixelFormatName (const AR_PIXEL_FORMAT arPixelFormat) |
ARVIDEO_EXTERN int | arVideoSaveImageJPEG (int w, int h, AR_PIXEL_FORMAT pixFormat, ARUint8 *pixels, const char *filename, const int quality, const int flipV) |
AR_VIDEO_ASPECT_RATIO | arVideoUtilFindAspectRatio (int w, int h) |
Determine the approximate aspect ratio for a given image resolution. More... | |
char * | arVideoUtilFindAspectRatioName (int w, int h) |
Determine the approximate aspect ratio for a given image resolution. More... | |
ARVIDEO_EXTERN ARVideoSourceInfoListT * | ar2VideoCreateSourceInfoList (const char *config) |
ARVIDEO_EXTERN void | ar2VideoDeleteSourceInfoList (ARVideoSourceInfoListT **p) |
ARVIDEO_EXTERN AR2VideoParamT * | ar2VideoOpen (const char *config) |
Open a video input module and return control object. More... | |
ARVIDEO_EXTERN AR2VideoParamT * | ar2VideoOpenAsync (const char *config, void(*callback)(void *), void *userdata) |
Open a video input module, and return control object, invoking a callback once opening is complete. More... | |
ARVIDEO_EXTERN int | ar2VideoClose (AR2VideoParamT *vid) |
ARVIDEO_EXTERN int | ar2VideoDispOption (AR2VideoParamT *vid) |
ARVIDEO_EXTERN AR_VIDEO_MODULE | ar2VideoGetModule (AR2VideoParamT *vid) |
ARVIDEO_EXTERN int | ar2VideoGetId (AR2VideoParamT *vid, ARUint32 *id0, ARUint32 *id1) |
ARVIDEO_EXTERN int | ar2VideoGetSize (AR2VideoParamT *vid, int *x, int *y) |
ARVIDEO_EXTERN int | ar2VideoGetPixelSize (AR2VideoParamT *vid) |
ARVIDEO_EXTERN AR_PIXEL_FORMAT | ar2VideoGetPixelFormat (AR2VideoParamT *vid) |
ARVIDEO_EXTERN AR2VideoBufferT * | ar2VideoGetImage (AR2VideoParamT *vid) |
ARVIDEO_EXTERN int | ar2VideoCapStart (AR2VideoParamT *vid) |
ARVIDEO_EXTERN int | ar2VideoCapStartAsync (AR2VideoParamT *vid, AR_VIDEO_FRAME_READY_CALLBACK callback, void *userdata) |
ARVIDEO_EXTERN int | ar2VideoCapStop (AR2VideoParamT *vid) |
ARVIDEO_EXTERN int | ar2VideoGetParami (AR2VideoParamT *vid, int paramName, int *value) |
ARVIDEO_EXTERN int | ar2VideoSetParami (AR2VideoParamT *vid, int paramName, int value) |
ARVIDEO_EXTERN int | ar2VideoGetParamd (AR2VideoParamT *vid, int paramName, double *value) |
ARVIDEO_EXTERN int | ar2VideoSetParamd (AR2VideoParamT *vid, int paramName, double value) |
ARVIDEO_EXTERN int | ar2VideoGetParams (AR2VideoParamT *vid, const int paramName, char **value) |
ARVIDEO_EXTERN int | ar2VideoSetParams (AR2VideoParamT *vid, const int paramName, const char *value) |
ARVIDEO_EXTERN int | ar2VideoSaveParam (AR2VideoParamT *vid, char *filename) |
ARVIDEO_EXTERN int | ar2VideoLoadParam (AR2VideoParamT *vid, char *filename) |
ARVIDEO_EXTERN int | ar2VideoSetBufferSize (AR2VideoParamT *vid, const int width, const int height) |
ARVIDEO_EXTERN int | ar2VideoGetBufferSize (AR2VideoParamT *vid, int *width, int *height) |
ARVIDEO_EXTERN int | ar2VideoGetCParam (AR2VideoParamT *vid, ARParam *cparam) |
ARVIDEO_EXTERN int | ar2VideoGetCParamAsync (AR2VideoParamT *vid, void(*callback)(const ARParam *, void *), void *userdata) |
#define AR_VIDEO_1394_BRIGHTNESS 65 |
#define AR_VIDEO_1394_BRIGHTNESS_AUTO_ON 67 |
#define AR_VIDEO_1394_BRIGHTNESS_FEATURE_ON 66 |
#define AR_VIDEO_1394_BRIGHTNESS_MAX_VAL 68 |
#define AR_VIDEO_1394_BRIGHTNESS_MIN_VAL 69 |
#define AR_VIDEO_1394_EXPOSURE 70 |
#define AR_VIDEO_1394_EXPOSURE_AUTO_ON 72 |
#define AR_VIDEO_1394_EXPOSURE_FEATURE_ON 71 |
#define AR_VIDEO_1394_EXPOSURE_MAX_VAL 73 |
#define AR_VIDEO_1394_EXPOSURE_MIN_VAL 74 |
#define AR_VIDEO_1394_FOCUS 92 |
#define AR_VIDEO_1394_FOCUS_AUTO_ON 94 |
#define AR_VIDEO_1394_FOCUS_FEATURE_ON 93 |
#define AR_VIDEO_1394_FOCUS_MAX_VAL 95 |
#define AR_VIDEO_1394_FOCUS_MIN_VAL 96 |
#define AR_VIDEO_1394_GAIN 87 |
#define AR_VIDEO_1394_GAIN_AUTO_ON 89 |
#define AR_VIDEO_1394_GAIN_FEATURE_ON 88 |
#define AR_VIDEO_1394_GAIN_MAX_VAL 90 |
#define AR_VIDEO_1394_GAIN_MIN_VAL 91 |
#define AR_VIDEO_1394_GAMMA 97 |
#define AR_VIDEO_1394_GAMMA_AUTO_ON 99 |
#define AR_VIDEO_1394_GAMMA_FEATURE_ON 98 |
#define AR_VIDEO_1394_GAMMA_MAX_VAL 100 |
#define AR_VIDEO_1394_GAMMA_MIN_VAL 101 |
#define AR_VIDEO_1394_SHUTTER_SPEED 82 |
#define AR_VIDEO_1394_SHUTTER_SPEED_AUTO_ON 84 |
#define AR_VIDEO_1394_SHUTTER_SPEED_FEATURE_ON 83 |
#define AR_VIDEO_1394_SHUTTER_SPEED_MAX_VAL 85 |
#define AR_VIDEO_1394_SHUTTER_SPEED_MIN_VAL 86 |
#define AR_VIDEO_1394_WHITE_BALANCE 75 |
#define AR_VIDEO_1394_WHITE_BALANCE_AUTO_ON 79 |
#define AR_VIDEO_1394_WHITE_BALANCE_FEATURE_ON 78 |
#define AR_VIDEO_1394_WHITE_BALANCE_MAX_VAL 80 |
#define AR_VIDEO_1394_WHITE_BALANCE_MIN_VAL 81 |
#define AR_VIDEO_1394_WHITE_BALANCE_UB 76 |
#define AR_VIDEO_1394_WHITE_BALANCE_VR 77 |
#define AR_VIDEO_FOCUS_MANUAL_DISTANCE 302 |
double
#define AR_VIDEO_FOCUS_MODE 301 |
int
#define AR_VIDEO_FOCUS_MODE_AUTO 1 |
#define AR_VIDEO_FOCUS_MODE_FIXED 0 |
#define AR_VIDEO_FOCUS_MODE_MANUAL 3 |
#define AR_VIDEO_FOCUS_MODE_POINT_OF_INTEREST 2 |
#define AR_VIDEO_FOCUS_POINT_OF_INTEREST_X 303 |
double
#define AR_VIDEO_FOCUS_POINT_OF_INTEREST_Y 304 |
double
#define AR_VIDEO_GET_VERSION INT_MAX |
#define AR_VIDEO_PARAM_ANDROID_CAMERA_FACE 501 |
int
#define AR_VIDEO_PARAM_ANDROID_CAMERA_INDEX 500 |
int
#define AR_VIDEO_PARAM_ANDROID_FOCAL_LENGTH 503 |
double
#define AR_VIDEO_PARAM_ANDROID_INTERNET_STATE 502 |
int
#define AR_VIDEO_PARAM_AVFOUNDATION_CAMERA_POSITION 402 |
int, values from enumeration AR_VIDEO_AVFOUNDATION_CAMERA_POSITION.
#define AR_VIDEO_PARAM_AVFOUNDATION_FOCUS_PRESET 401 |
int, values from enumeration AR_VIDEO_AVFOUNDATION_FOCUS_PRESET.
#define AR_VIDEO_PARAM_AVFOUNDATION_IOS_DEVICE 400 |
int, values from enumeration AR_VIDEO_AVFOUNDATION_IOS_DEVICE.
#define AR_VIDEO_PARAM_AVFOUNDATION_WILL_CAPTURE_NEXT_FRAME 403 |
int (0=false, 1=true). If true, next incoming frame will also be captured to system's camera roll.
#define AR_VIDEO_PARAM_DEVICEID 201 |
string, readonly. Optional. Unique name for this exact model of video device, consisting of vendor, model and board identifiers separated by '/' characters.
#define AR_VIDEO_PARAM_GET_IMAGE_ASYNC 200 |
int
#define AR_VIDEO_PARAM_NAME 202 |
string, readonly. Optional. Human-readable name for this model of video device.
#define AR_VIDEO_POSITION_BACK 0x0010 |
Camera is on back of device pointing away from user.
#define AR_VIDEO_POSITION_BOTTOM 0x0030 |
Camera is on bottom of device pointing towards floor when device is held upright.
#define AR_VIDEO_POSITION_FRONT 0x0008 |
Camera is on front of device pointing towards user.
#define AR_VIDEO_POSITION_LEFT 0x0018 |
Camera is on left of device pointing to user's left.
#define AR_VIDEO_POSITION_OTHER 0x0038 |
Camera physical position on device is known but none of the above.
#define AR_VIDEO_POSITION_RIGHT 0x0020 |
Camera is on right of device pointing to user's right.
#define AR_VIDEO_POSITION_TOP 0x0028 |
Camera is on top of device pointing toward ceiling when device is held upright.
#define AR_VIDEO_POSITION_UNKNOWN 0x0000 |
Values for device position, as encoded in ARVideoSourceInfoT.flags & AR_VIDEO_SOURCE_INFO_POSITION_MASK.
Camera physical position on device unknown.
#define AR_VIDEO_SOURCE_INFO_FLAG_IN_USE 0x0002 |
0 = unknown or not in use, 1 = in use.
#define AR_VIDEO_SOURCE_INFO_FLAG_OFFLINE 0x0001 |
Values for ARVideoSourceInfoT.flags.
0 = unknown or not offline, 1 = offline.
#define AR_VIDEO_SOURCE_INFO_FLAG_OPEN_ASYNC 0x0004 |
0 = open normally, 1 = open async.
#define AR_VIDEO_SOURCE_INFO_POSITION_MASK 0x0038 |
compare (value & AR_VIDEO_SOURCE_INFO_POSITION_MASK) against enums.
#define AR_VIDEO_SOURCE_INFO_STEREO_MODE_MASK 0x03C0 |
compare (value & AR_VIDEO_SOURCE_INFO_STEREO_MODE_MASK) against enums.
#define AR_VIDEO_STEREO_MODE_ANAGLYPH_RB 0x0300 |
Device is left and right stereo images in a single frame, where both eyes are converted to mono and the left eye is carried in the red channel and the right eye in the blue channel.
#define AR_VIDEO_STEREO_MODE_ANAGLYPH_RG 0x02C0 |
Device is left and right stereo images in a single frame, where both eyes are converted to mono and the left eye is carried in the red channel and the right eye in the green channel.
#define AR_VIDEO_STEREO_MODE_COLUMN_INTERLACED 0x0240 |
Device is left and right stereo images in a single frame with column interleaving, where pixels in even-numbered columns are sampled from the left eye, and pixels in odd-number columns from the right eye.
#define AR_VIDEO_STEREO_MODE_FRAME_SEQUENTIAL 0x00C0 |
Device is left and right stereo images in sequential frames.
#define AR_VIDEO_STEREO_MODE_HALF_SIDE_BY_SIDE 0x0180 |
Device is left and right stereo images in a single frame with the frames scaled to half-width, arranged horizontally with left eye on left.
#define AR_VIDEO_STEREO_MODE_LEFT 0x0040 |
Device is left eye of a stereoscopic pair.
#define AR_VIDEO_STEREO_MODE_MONO 0x0000 |
Values for device stereo mode, as encoded in ARVideoSourceInfoT.flags & AR_VIDEO_SOURCE_INFO_STEREO_MODE_MASK.
Device is monoscopic.
#define AR_VIDEO_STEREO_MODE_OVER_UNDER 0x0140 |
Device is left and right stereo images in a single frame, arranged vertically with left eye on top.
#define AR_VIDEO_STEREO_MODE_OVER_UNDER_HALF_HEIGHT 0x01C0 |
Device is left and right stereo images in a single frame with the frames scaled to half-height, arranged vertically with left eye on top.
#define AR_VIDEO_STEREO_MODE_RESERVED0 0x0340 |
Reserved for future use.
#define AR_VIDEO_STEREO_MODE_RESERVED1 0x0380 |
Reserved for future use.
#define AR_VIDEO_STEREO_MODE_RESERVED2 0x03C0 |
Reserved for future use.
#define AR_VIDEO_STEREO_MODE_RIGHT 0x0080 |
Device is right eye of a stereoscopic pair.
#define AR_VIDEO_STEREO_MODE_ROW_AND_COLUMN_INTERLACED 0x0280 |
Device is left and right stereo images in a single frame with row and column interleaving, where pixels where the evenness/oddness of the row is the same as the column are sampled from the left eye, and the remaining pixels from the right eye.
#define AR_VIDEO_STEREO_MODE_ROW_INTERLACED 0x0200 |
Device is left and right stereo images in a single frame with row interleaving, where pixels in even-numbered rows are sampled from the left eye, and pixels in odd-number rows from the right eye.
#define AR_VIDEO_STEREO_MODE_SIDE_BY_SIDE 0x0100 |
Device is left and right stereo images in a single frame, arranged horizontally with left eye on left.
#define ARVIDEO_EXTERN |
#define arVideoGetVersion | ( | ) | arVideoGetParami(AR_VIDEO_GET_VERSION, NULL) |
Get the version of artoolkitX with which the arVideo library was built.
It is highly recommended that any calling program that depends on features in a certain artoolkitX version, check at runtime that it is linked to a version of artoolkitX that can supply those features. It is NOT sufficient to check the artoolkitX SDK header versions, since with artoolkitX implemented in dynamically-loaded libraries, there is no guarantee that the version of artoolkitX installed on the machine at run-time will be as recent as the version of the artoolkitX SDK which the host program was compiled against.
BCD format allows simple tests of version number in the caller e.g. if ((arGetVersion(NULL) >> 16) > 0x0272) printf("This release is later than 2.72\n");
The major version number is encoded in the most-significant byte (bits 31-24), the minor version number in the second-most-significant byte (bits 23-16), the tiny version number in the third-most-significant byte (bits 15-8), and the build version number in the least-significant byte (bits 7-0).
If the returned value is equal to -1, it can be assumed that the actual version is in the range 0x04000000 to 0x04040100.
typedef void(* AR_VIDEO_FRAME_READY_CALLBACK) (void *) |
Values returned by arVideoParamGeti(AR_VIDEO_PARAM_AVFOUNDATION_CAMERA_POSITION, ...)
Values returned by arVideoParamGeti/arVideoParamSeti(AR_VIDEO_PARAM_AVFOUNDATION_FOCUS_PRESET, ...)
Values returned by arVideoParamGeti(AR_VIDEO_PARAM_AVFOUNDATION_IOS_DEVICE, ...)
enum AR_VIDEO_MODULE |
ARVIDEO_EXTERN int ar2VideoCapStart | ( | AR2VideoParamT * | vid | ) |
ARVIDEO_EXTERN int ar2VideoCapStartAsync | ( | AR2VideoParamT * | vid, |
AR_VIDEO_FRAME_READY_CALLBACK | callback, | ||
void * | userdata | ||
) |
ARVIDEO_EXTERN int ar2VideoCapStop | ( | AR2VideoParamT * | vid | ) |
ARVIDEO_EXTERN int ar2VideoClose | ( | AR2VideoParamT * | vid | ) |
ARVIDEO_EXTERN ARVideoSourceInfoListT * ar2VideoCreateSourceInfoList | ( | const char * | config | ) |
ARVIDEO_EXTERN void ar2VideoDeleteSourceInfoList | ( | ARVideoSourceInfoListT ** | p | ) |
ARVIDEO_EXTERN int ar2VideoDispOption | ( | AR2VideoParamT * | vid | ) |
ARVIDEO_EXTERN int ar2VideoGetBufferSize | ( | AR2VideoParamT * | vid, |
int * | width, | ||
int * | height | ||
) |
ARVIDEO_EXTERN int ar2VideoGetCParam | ( | AR2VideoParamT * | vid, |
ARParam * | cparam | ||
) |
ARVIDEO_EXTERN int ar2VideoGetCParamAsync | ( | AR2VideoParamT * | vid, |
void(*)(const ARParam *, void *) | callback, | ||
void * | userdata | ||
) |
ARVIDEO_EXTERN int ar2VideoGetId | ( | AR2VideoParamT * | vid, |
ARUint32 * | id0, | ||
ARUint32 * | id1 | ||
) |
ARVIDEO_EXTERN AR2VideoBufferT * ar2VideoGetImage | ( | AR2VideoParamT * | vid | ) |
ARVIDEO_EXTERN AR_VIDEO_MODULE ar2VideoGetModule | ( | AR2VideoParamT * | vid | ) |
ARVIDEO_EXTERN int ar2VideoGetParamd | ( | AR2VideoParamT * | vid, |
int | paramName, | ||
double * | value | ||
) |
ARVIDEO_EXTERN int ar2VideoGetParami | ( | AR2VideoParamT * | vid, |
int | paramName, | ||
int * | value | ||
) |
ARVIDEO_EXTERN int ar2VideoGetParams | ( | AR2VideoParamT * | vid, |
const int | paramName, | ||
char ** | value | ||
) |
ARVIDEO_EXTERN AR_PIXEL_FORMAT ar2VideoGetPixelFormat | ( | AR2VideoParamT * | vid | ) |
ARVIDEO_EXTERN int ar2VideoGetPixelSize | ( | AR2VideoParamT * | vid | ) |
ARVIDEO_EXTERN int ar2VideoGetSize | ( | AR2VideoParamT * | vid, |
int * | x, | ||
int * | y | ||
) |
ARVIDEO_EXTERN int ar2VideoLoadParam | ( | AR2VideoParamT * | vid, |
char * | filename | ||
) |
ARVIDEO_EXTERN AR2VideoParamT * ar2VideoOpen | ( | const char * | config | ) |
Open a video input module and return control object.
Opening a video input module selects, connects to, and configures a video source for other video operations. Once this call has returned, other APIs can be invoked. @oaram config A configuration string, consisting of a series of space-separated configuration tokens. While the configuration string options are largely platform- and system-dependent, the token "-module=X" where X is a video input module name is always accepted. For information on configuration options, see https://github.com/artoolkitx/artoolkitx/wiki/artoolkitX-video-module-configuration-reference
ARVIDEO_EXTERN AR2VideoParamT * ar2VideoOpenAsync | ( | const char * | config, |
void(*)(void *) | callback, | ||
void * | userdata | ||
) |
Open a video input module, and return control object, invoking a callback once opening is complete.
Opening a video input module selects, connects to, and configures a video source for other video operations. This variant returns immediately while continuing the opening operation asynchronously, invoking a user-supplied callback once opening has completed. The only API permissible to call between this function and the invocation of the callback is ar2VideoGetModule. @oaram config A configuration string, consisting of a series of space-separated configuration tokens. While the configuration string options are largely platform- and system-dependent, the token "-module=X" where X is a video input module name is always accepted. For information on configuration options, see https://github.com/artoolkitx/artoolkitx/wiki/artoolkitX-video-module-configuration-reference
callback | The callback to invoke once opening is complete. In most cases, the callback will be invoked on a different thread, so care must be taken if the caller is sensitive to this. |
userdata | An arbitrary pointer which will be passed to the callback. |
ARVIDEO_EXTERN int ar2VideoSaveParam | ( | AR2VideoParamT * | vid, |
char * | filename | ||
) |
ARVIDEO_EXTERN int ar2VideoSetBufferSize | ( | AR2VideoParamT * | vid, |
const int | width, | ||
const int | height | ||
) |
ARVIDEO_EXTERN int ar2VideoSetParamd | ( | AR2VideoParamT * | vid, |
int | paramName, | ||
double | value | ||
) |
ARVIDEO_EXTERN int ar2VideoSetParami | ( | AR2VideoParamT * | vid, |
int | paramName, | ||
int | value | ||
) |
ARVIDEO_EXTERN int ar2VideoSetParams | ( | AR2VideoParamT * | vid, |
const int | paramName, | ||
const char * | value | ||
) |
ARVIDEO_EXTERN int arVideoCapStart | ( | void | ) |
Start video capture.
Each call to arVideoCapStart must be balanced with a call to arVideoCapStop.
ARVIDEO_EXTERN int arVideoCapStartAsync | ( | AR_VIDEO_FRAME_READY_CALLBACK | callback, |
void * | userdata | ||
) |
Start video capture with asynchronous notification of new frame arrival.
callback | A function to call when a new frame arrives. This function may be called anytime until the function arVideoCapStop has been called successfully. The callback may occur on a different thread to the calling thread and it is up to the user to synchronise the callback with any procedures that must run on the main thread, a rendering thread, or other arbitrary thread. |
userdata | Optional user data pointer which will be passed to the callback as a parameter. May be NULL. |
ARVIDEO_EXTERN int arVideoCapStop | ( | void | ) |
Stop video capture.
Each call to arVideoCapStop must match a call to arVideoCapStart.
ARVIDEO_EXTERN int arVideoClose | ( | void | ) |
ARVIDEO_EXTERN int arVideoDispOption | ( | void | ) |
ARVIDEO_EXTERN int arVideoGetBufferSize | ( | int * | width, |
int * | height | ||
) |
ARVIDEO_EXTERN int arVideoGetCParam | ( | ARParam * | cparam | ) |
ARVIDEO_EXTERN int arVideoGetCParamAsync | ( | void(*)(const ARParam *, void *) | callback, |
void * | userdata | ||
) |
ARVIDEO_EXTERN AR_VIDEO_MODULE arVideoGetDefaultModule | ( | void | ) |
ARVIDEO_EXTERN int arVideoGetId | ( | ARUint32 * | id0, |
ARUint32 * | id1 | ||
) |
ARVIDEO_EXTERN AR2VideoBufferT * arVideoGetImage | ( | void | ) |
Get a frame image from the video module.
ARVIDEO_EXTERN AR_VIDEO_MODULE arVideoGetModule | ( | void | ) |
ARVIDEO_EXTERN int arVideoGetParamd | ( | int | paramName, |
double * | value | ||
) |
Get value of a double-precision floating-point parameter from active video module.
paramName | Name of parameter to get, as defined in <ARX/ARVideo/video.h> |
value | Pointer to double, which will be filled with the value of the parameter. |
ARVIDEO_EXTERN int arVideoGetParami | ( | int | paramName, |
int * | value | ||
) |
Get value of an integer parameter from active video module.
paramName | Name of parameter to get, as defined in <ARX/ARVideo/video.h> |
value | Pointer to integer, which will be filled with the value of the parameter. |
ARVIDEO_EXTERN int arVideoGetParams | ( | const int | paramName, |
char ** | value | ||
) |
Get value of a string parameter from active video module.
paramName | Name of parameter to get, as defined in <ARX/ARVideo/video.h> |
value | Pointer to pointer, which will be filled with a pointer to a C-string (nul-terminated, UTF-8) containing the value of the parameter. The string returned is allocated internally, and it is the responsibility of the caller to call free() on the returned value. |
ARVIDEO_EXTERN AR_PIXEL_FORMAT arVideoGetPixelFormat | ( | void | ) |
ARVIDEO_EXTERN int arVideoGetPixelSize | ( | void | ) |
ARVIDEO_EXTERN int arVideoGetSize | ( | int * | x, |
int * | y | ||
) |
ARVIDEO_EXTERN int arVideoLoadParam | ( | char * | filename | ) |
ARVIDEO_EXTERN int arVideoOpen | ( | const char * | config | ) |
Open a video input module.
Opening a video input module selects, connects to, and configures a video source for other video operations. Once this call has returned, other APIs can be invoked. @oaram config A configuration string, consisting of a series of space-separated configuration tokens. While the configuration string options are largely platform- and system-dependent, the token "-module=X" where X is a video input module name is always accepted. For information on configuration options, see https://github.com/artoolkitx/artoolkitx/wiki/artoolkitX-video-module-configuration-reference
ARVIDEO_EXTERN int arVideoOpenAsync | ( | const char * | config, |
void(*)(void *) | callback, | ||
void * | userdata | ||
) |
Open a video input module, invoking a callback once opening is complete.
Opening a video input module selects, connects to, and configures a video source for other video operations. This variant returns immediately while continuing the opening operation asynchronously, invoking a user-supplied callback once opening has completed. The only API permissible to call between this function and the invocation of the callback is arVideoGetModule. @oaram config A configuration string, consisting of a series of space-separated configuration tokens. While the configuration string options are largely platform- and system-dependent, the token "-module=X" where X is a video input module name is always accepted. For information on configuration options, see https://github.com/artoolkitx/artoolkitx/wiki/artoolkitX-video-module-configuration-reference
callback | The callback to invoke once opening is complete. In most cases, the callback will be invoked on a different thread, so care must be taken if the caller is sensitive to this. |
userdata | An arbitrary pointer which will be passed to the callback. |
ARVIDEO_EXTERN int arVideoSaveImageJPEG | ( | int | w, |
int | h, | ||
AR_PIXEL_FORMAT | pixFormat, | ||
ARUint8 * | pixels, | ||
const char * | filename, | ||
const int | quality, | ||
const int | flipV | ||
) |
ARVIDEO_EXTERN int arVideoSaveParam | ( | char * | filename | ) |
ARVIDEO_EXTERN int arVideoSetBufferSize | ( | const int | width, |
const int | height | ||
) |
ARVIDEO_EXTERN int arVideoSetParamd | ( | int | paramName, |
double | value | ||
) |
Set value of a double-precision floating-point parameter in active video module.
paramName | Name of parameter to set, as defined in <ARX/ARVideo/video.h> |
value | Double value to set the parameter to. |
ARVIDEO_EXTERN int arVideoSetParami | ( | int | paramName, |
int | value | ||
) |
Set value of an integer parameter in active video module.
paramName | Name of parameter to set, as defined in <ARX/ARVideo/video.h> |
value | Integer value to set the parameter to. |
ARVIDEO_EXTERN int arVideoSetParams | ( | const int | paramName, |
const char * | value | ||
) |
Get value of a string parameter in active video module.
paramName | Name of parameter to set, as defined in <ARX/ARVideo/video.h> |
value | Pointer to C-string (nul-terminated, UTF-8) containing the value to set the parameter to. |
AR_VIDEO_ASPECT_RATIO arVideoUtilFindAspectRatio | ( | int | w, |
int | h | ||
) |
Determine the approximate aspect ratio for a given image resolution.
A convenience method which makes it easy to determine the approximate aspect ratio of an image with the given resolution (expressed in pixel width and height). Returns a symbolic constant for the aspect ratio, which makes it easy to determine whether two different resolutions have the same aspect ratio. Assumes square pixels.
w | Width in pixels |
h | Height in pixels |
char * arVideoUtilFindAspectRatioName | ( | int | w, |
int | h | ||
) |
Determine the approximate aspect ratio for a given image resolution.
A convenience method which makes it easy to determine the approximate aspect ratio of an image with the given resolution (expressed in pixel width and height). Returns a string for the aspect ratio. Assumes square pixels.
w | Width in pixels |
h | Height in pixels |
ARVIDEO_EXTERN const char * arVideoUtilGetPixelFormatName | ( | const AR_PIXEL_FORMAT | arPixelFormat | ) |
ARVIDEO_EXTERN int arVideoUtilGetPixelSize | ( | const AR_PIXEL_FORMAT | arPixelFormat | ) |