C++ Java Unity
Java Reference
EyewearUserCalibrator Class Reference

Detailed Description

A class for creating custom user calibration procedures for see-through eyewear.

(DEPRECATED)

Deprecated:
This class has been deprecated. It will be removed in an upcoming Vuforia release.

Users of optical see-through eyewear devices need to perform a calibration to determine how to project an augmentation such that it will appear registered with the real world. Such calibration is user- and device-specific.

Vuforia provides a default calibration, but for the best possible AR experience, it is recommended that the user calibrate Vuforia for their own eyes and device.

If the eyewear device supports stereo output, the calibration needs to be carried out on each eye.

The units of measurement throughout calibration is meters. The calibration image target used should have its size specified in meters when initializing this object. The size passed to init() must match both the size specified in the dataset for the target and the printed size of the target.

Classes

class  CONSISTENCY
 A measure of the consistency of the data supplied by the user to the calibrator. More...
 

Public Member Functions

boolean getProjectionMatrix (EyewearCalibrationReading[] reading, Matrix34F cameraToEyePose, Matrix34F eyeProjection)
 
int getProjectionMatrices (EyewearCalibrationReading[] leftReading, EyewearCalibrationReading[] rightReading, Matrix34F leftCameraToEyePose, Matrix34F leftEyeProjection, Matrix34F rightCameraToEyePose, Matrix34F rightEyeProjection)
 
boolean init (long surfaceWidth, long surfaceHeight, float targetWidth, float targetHeight)
 Initialize the eyewear calibrator. More...
 
float getMinScaleHint ()
 Get a hint as to the minimum size to render a calibration shape. More...
 
float getMaxScaleHint ()
 Get a hint as to the maximum size to render a calibration shape. More...
 
float getDrawingAspectRatio (long surfaceWidth, long surfaceHeight)
 Get the aspect ratio that should be used to draw a calibration shape. More...
 
boolean isStereoStretched ()
 Check whether this device stretches the display to create a stereoscopic effect. More...
 

Member Function Documentation

boolean getProjectionMatrix ( EyewearCalibrationReading[]  reading,
Matrix34F  cameraToEyePose,
Matrix34F  eyeProjection 
)
int getProjectionMatrices ( EyewearCalibrationReading[]  leftReading,
EyewearCalibrationReading[]  rightReading,
Matrix34F  leftCameraToEyePose,
Matrix34F  leftEyeProjection,
Matrix34F  rightCameraToEyePose,
Matrix34F  rightEyeProjection 
)
boolean init ( long  surfaceWidth,
long  surfaceHeight,
float  targetWidth,
float  targetHeight 
)

Initialize the eyewear calibrator.

This method must be called before any other members of this class.

Parameters
surfaceWidthThe width (in pixels) of the rendering surface that the calibration is running in.
surfaceHeightThe height (in pixels) of the rendering surface that the calibration is running in.
targetWidthThe width (in meters) of the image target being used.
targetHeightThe height (in meters) of the image target being used.
Returns
true if initialization is successful, false otherwise (check application logs for failure details).
float getMinScaleHint ( )

Get a hint as to the minimum size to render a calibration shape.

The smaller a calibration shape is drawn, the further the user needs to stand away from a target during calibration. The minimum size is device specific and this method provides a hint as to the minimum practical scale.

Returns
the minimum scale to use for the calibration shape, in the range 0.0 - 1.0
float getMaxScaleHint ( )

Get a hint as to the maximum size to render a calibration shape.

The larger a calibration shape is drawn, the closer the shape will be to the sides of the display. Some eyewear devices have distortion towards the edges of the display.

The maximum size is device specific and this method provides a hint as to the maximum practical scale.

Returns
the maximum scale to use for the calibration shape, in the range 0.0 - 1.0
float getDrawingAspectRatio ( long  surfaceWidth,
long  surfaceHeight 
)

Get the aspect ratio that should be used to draw a calibration shape.

Some eyewear devices introduce rendering distortion, for example horizontal or vertical stretching. The value returned by this method should be used to draw calibration shapes that closely match the aspect ratio of the real-world calibration target.

Parameters
surfaceWidthThe width (in pixels) of the rendering surface.
surfaceHeightThe height (in pixels) of the rendering surface.
Returns
the corrected aspect ratio for calibration shapes.
boolean isStereoStretched ( )

Check whether this device stretches the display to create a stereoscopic effect.

When a device enters 3D it may join the displays together to create one big display. On some devices, the reported resolution is unchanged - and the display is effectively stretched. This flag allows the app to identify this situation in order to compensate when rendering.

Returns
true if the display is stretched, otherwise false.