Level of indirection for the depth image, provides: -a frames of depth image (no player information), -an array representing which players are detected, -a segmentation image for each player, -bounds for the segmentation of each player.
Inheritance: MonoBehaviour
    // Use this for initialization
    void Start()
    {
        dw = (Component.FindObjectOfType(typeof(DeviceOrEmulator)) as DeviceOrEmulator).GetComponent<DepthWrapper>();

        tex = new Texture2D(320,240,TextureFormat.ARGB32,false);
        renderer.material.mainTexture = tex;
    }
Exemple #2
0
    private void Start()
    {
        kinectSensor = GetComponent <DepthWrapper>();

        if (kinectSensor == null)
        {
            Debug.LogError("Kinect V1 Depth Wrapper not found!");
        }
    }
    // Use this for initialization
    void Start()
    {
        numObjectsRendered = 0;
        someoneStanding    = true;
//		tex = new Texture2D(160,120,TextureFormat.ARGB32,false);
//		tex = new Texture2D(320,240,TextureFormat.ARGB32, false);
        tex = new Texture2D(80, 60, TextureFormat.ARGB32, false);
//		renderer.material.mainTexture = tex;
        min = 1000000;
        max = 0;
        dw  = GameObject.Find("KinectPrefab(Clone)").GetComponent <DepthWrapper>();
    }
    // Use this for initialization
    void Start()
    {
        sw = GameObject.Find("/KinectPrefab").GetComponent <SkeletonWrapper>();
        dw = GameObject.Find("/KinectPrefab").GetComponent <DepthWrapper>();

        // Initialize depth map
        depthMapTex  = new Texture2D(DepthWidth, DepthHeight);       //depthMapTex = new Texture2D(DepthWidth, DepthHeight, TextureFormat.ARGB32, false);
        depthMapRect = new Rect((Screen.width + DisplayWidth) / 2,
                                (Screen.height - DisplayHeight) / 2, //10, //
                                -DisplayWidth,
                                DisplayHeight);
    }