Open() public method

public Open ( int opentype, float arsize ) : bool
opentype int
arsize float
return bool
Exemplo n.º 1
0
    // ------ Function ------

    // Use this for initialization
    void Awake()
    {
        //Open camera
        if (OvrPro.Open(cameraMode, ARsize))
        {
            if (overlaySettings)
            {
                OvrPro.SetExposure(conf_exposure);
                OvrPro.SetGain(conf_gain);
                OvrPro.SetBLC(conf_blc);
                OvrPro.SetWhiteBalanceAutoMode(conf_wb_auto);
                if (!conf_wb_auto)
                {
                    OvrPro.SetWhiteBalanceR(conf_wb_r);
                    OvrPro.SetWhiteBalanceG(conf_wb_g);
                    OvrPro.SetWhiteBalanceB(conf_wb_b);
                }
                Thread.Sleep(100);
            }
        }
        else
        {
            Debug.LogError("Ovrvision open error!!");
        }
    }
Exemplo n.º 2
0
    public void Init()
    {
        if (!ovrPro.Open((int)COvrvisionUnity.OVRResolution.OV_CAMVR_FULL))
        {
            return;
        }
        else
        {
            Thread.Sleep(200);
            if (false)
            {
                ovrPro.SetExposure(settings.conf_exposure);
                ovrPro.SetGain(settings.conf_gain);
                ovrPro.SetBLC(settings.conf_blc);
                ovrPro.SetWhiteBalanceR(settings.conf_wb_r);
                ovrPro.SetWhiteBalanceG(settings.conf_wb_g);
                ovrPro.SetWhiteBalanceB(settings.conf_wb_b);
                ovrPro.SetWhiteBalanceAutoMode(settings.conf_wb_auto);
            }
        }
        UpdateOvrvisionSetting();
        Thread.Sleep(200);

//		ovrPro.useOvrvisionTrack_Calib = true;
        ovrPro.useProcessingQuality = COvrvisionUnity.OV_CAMQT_DMSRMP;

        for (int i = 0; i < 2; ++i)
        {
            camTex [i]          = new Texture2D(ovrPro.imageSizeW, ovrPro.imageSizeH, TextureFormat.BGRA32, false);
            camTex [i].wrapMode = TextureWrapMode.Clamp;
            camTex [i].Apply();
            camPtr[i] = camTex [i].GetNativeTexturePtr();
        }

        _bufferID = 0;
    }