SDK Function Reference:C# Language

Ovrvision Functions

int ovOpen(int locationID, float ar_meter, int hmdType)

Parameters
int locationIDConnection number
float ar_meterThe size of the marker (Meters specified)
int hmdType0:OTHER, 1:RiftDK1, 2:RiftDK2
Returns
intIf successful, the return value is OV_RESULT_OK(0)
Description
Open the Ovrvision of specified number by locationID.
If two or more Ovrvision are connected to the computer, the locationID is need to specify.
Camera property sets how to start the camera.

int ovClose()

Returns
intIf successful, the return value is OV_RESULT_OK(0)
Description
Close the Ovrvision of camera. Please close always at the application end.

void ovPreStoreCamData()

Description
This method takes the same time the image from both Ovrvision of camera.

void ovGetCamImage(unsigned char* pImage, int eye, int qt)

Parameters
unsigned char* pImageBufDestination pointer of image
int eyeCamera specification
0:The left-eye camera
1:The right-eye camera
int qtSet an image processing method.
0:Unedited
1:Rough processing(high
2:Beautiful processing(slow)
3:The process of only reversal for DK2
Description
Get the image from the camera, and returns a pointer to the data with the internal class that image has entered.
Image has the number of pixels in the RGB data composed of 8 bits. e.g.) 640x480x3(RGB)=921,600 bytes
[int qt] set what happens to the image processing such as distortion correction.

void ovGetCamImageBGR(unsigned char* pImage, int eye, int qt)

Parameters
unsigned char* pImageBufDestination pointer of image
int eyeCamera specification
0:The left-eye camera
1:The right-eye camera
int qtSet an image processing method.
0:Unedited
1:Rough processing(high
2:Beautiful processing(slow)
3:The process of only reversal for DK2
Description
Get the image from the camera, and returns a pointer to the data with the internal class that image has entered.
Image has the number of pixels in the BGR data(Reversal) composed of 8 bits. e.g.) 640x480x3(RGB)=921,600 bytes
[int qt] set what happens to the image processing such as distortion correction.

void ovGetCamImageWithAR(unsigned char* pImage, int eye, int qt)

Parameters
unsigned char* pImageBufDestination pointer of image
int eyeCamera specification
0:The left-eye camera
1:The right-eye camera
int qtSet an image processing method.
0:Unedited
1:Rough processing(high
2:Beautiful processing(slow)
3:The process of only reversal for DK2
Description
Get the image from the camera, and returns a pointer to the data with the internal class that image has entered.
Image has the number of pixels in the RGB data composed of 8 bits. e.g.) 640x480x3(RGB)=921,600 bytes
[int qt] set what happens to the image processing such as distortion correction.
This method is also at the same time marker detection of AR.

void ovGetCamImageBGRWithAR(unsigned char* pImage, int eye, int qt)

Parameters
unsigned char* pImageBufDestination pointer of image
int eyeCamera specification
0:The left-eye camera
1:The right-eye camera
int qtSet an image processing method.
0:Unedited
1:Rough processing(high
2:Beautiful processing(slow)
3:The process of only reversal for DK2
Description
Get the image from the camera, and returns a pointer to the data with the internal class that image has entered.
Image has the number of pixels in the BGR data(Reversal) composed of 8 bits. e.g.) 640x480x3(RGB)=921,600 bytes
[int qt] set what happens to the image processing such as distortion correction.
This method is also at the same time marker detection of AR.

int ovSetParamXMLfromFile(char* filename)

Parameters
char* filenameRead destination full path
When you set a NULL, it is the default fixed path.
Returns
boolTrue is returned on success .
Description
Reads the config file from the XML file, and set to Ovrvision.

int ovSaveParamXMLtoFile(char* savefilename)

Parameters
char* savefilenameDestination full path
When you set a NULL, it is the default fixed path.
Returns
boolTrue is returned on success .
Description
Config of the Ovrvision, and then saved in XML format to the specified file path.

void ovSetExposure(int value)

Parameters
int valueValue
OV_SET_AUTOMODE:Automatic(Default)
Range of 0 - 5 value:The lower the value, the exposure is large.
Description
Set exposure of the Ovrvision.

void ovSetWhiteBalance(int value)

Parameters
int valueValue
OV_SET_AUTOMODE:Automatic(Default)
Range of 2800 - 6500 value:Specified in the color temperature.
Description
Set color temperature of the Ovrvision.

void ovSetContrast(int value)

Parameters
int valueValue
Range of 0 - 127 value:The lower the value, the contrast is weak.(Default:32)
Description
Set contrast of the Ovrvision.

void ovSetSaturation(int value)

Parameters
int valueValue
Range of 0 - 127 value:The lower the value, the saturation is weak.(Default:40)
Description
Set saturation of the Ovrvision.

void ovSetBrightness(int value)

Parameters
int valueValue
Range of 0 - 255 value:The lower the value, the color becomes dark(Default:100)
Description
Set brightness of the Ovrvision.

void ovSetSharpness(int value)

Parameters
int valueValue
Range of 0 - 15 value:The lower the value, the sharp is weak.(Default:2)
Description
Set image edge of the Ovrvision.

void ovSetGamma(int value)

Parameters
int valueValue
Range of 0 - 15 value:The lower the value, the gamma is weak(Default:7)
Description
Set gamma of the Ovrvision.

int ovGetExposure()

Returns
intValue
Description
Get exposure value of the Ovrvision.

int ovGetWhiteBalance()

Returns
intValue
Description
Get color temperature value of the Ovrvision.

int ovGetContrast()

Returns
intValue
Description
Get contrast value of the Ovrvision.

int ovGetSaturation()

Returns
intValue
Description
Get saturation value of the Ovrvision.

int ovGetBrightness()

Returns
intValue
Description
Get brightness value of the Ovrvision.

int ovGetSharpness()

Returns
intValue
Description
Get image edge value of the Ovrvision.

int ovGetGamma()

Returns
intValue
Description
Get gamma value of the Ovrvision.

float ovGetFocalPoint()

Returns
floatfocalpoint
Description
Get focalpoint value of the Ovrvision.
This is necessary in the AR config.

int ovGetImageWidth()

Returns
intWidth resolution of the camera
Description
Returns the width resolution of the Ovrvision.

int ovGetImageHeight()

Returns
intHeight resolution of the camera
Description
Returns the height resolution of the Ovrvision.

int ovGetImageRate()

Returns
intFramerate of the camera
Description
Returns the framerate of the Ovrvision.

int ovGetBufferSize()

Returns
intBuffer size
Description
Returns the buffer size of the Ovrvision.
e.g.) 640x480x3 = [921,600] byte

int ovGetOculusRightGap()

Returns
intGap value
Description
Get gap value of the right eye in order to set in the Oculus Rift SDK side.
This is necessary in the AR config.

void ovARSetImage(unsigned char* pImgSrc)

Parameters
unsigned char* pImageImage data already stored pointer
Description
Set the pointer of the RGB image buffer.

void ovARRender()

Description
Referring to set images to detect the AR marker. If you have set a new image, it is always necessary before you call the GetMarkerData.
Examples
g_pOvrvisionAR->SetImageRGB(pImage);
g_pOvrvisionAR->Render();
OVR::OvMarkerData* dt = g_pOvrvisionAR->GetMarkerData();
for(int i=0; i < g_pOvrvisionAR->GetMarkerDataSize(); i++){/*Process*/}

int ovARGetData(float* mdata, int datasize)

Parameters
float* mdataDestination pointer to the data
int datasizeData size
Returns
intIf successful, the return value is 1
Description
Get the data of the detected marker by using the ovARRender() method.
It is 10 elements at a time output in float format.
mdata[0] = Marker ID (Truncation point below)
mdata[1] = Position X
mdata[2] = Position Y
mdata[3] = Position Z
mdata[4] = Quaternion X
mdata[5] = Quaternion Y
mdata[6] = Quaternion Z
mdata[7] = Quaternion W
mdata[8] = Center of the marker X (pixel pos)
mdata[9] = Center of the marker Y (pixel pos)

void ovARSetMarkerSize(float value)

Parameters
float valueThe size of the marker (Meters specified)
Description
Set the marker size in metric.

float ovARGetMarkerSize()

Returns
floatThe size of the marker (Meters specified)
Description
Get the marker size.

Front page   Edit Freeze Diff Backup Upload Copy Rename Reload   New List of pages Search Recent changes   Help   RSS of recent changes
Last-modified: 2015-03-06 (Fri) 00:29:10 (1573d)