QueryLabelMapSize() public method

public QueryLabelMapSize ( int size ) : bool
size int
return bool
Ejemplo n.º 1
0
    void Start()
    {
        pp = new PXCUPipeline();

        int[] size = new int[2] {
            320, 240
        };
        if (pp.Init(PXCUPipeline.Mode.GESTURE))
        {
            pp.QueryLabelMapSize(size);
            print("LabelMap: width=" + size[0] + ", height=" + size[1]);
            labelmap = new byte[size[0] * size[1]];
        }
        else
        {
            options.SetMessage("Failed to detect the Creative* camera. Please plugin the camera and click restart.");
        }
        handImage = new Texture2D(size[0], size[1], TextureFormat.ARGB32, false);
        ZeroImage(handImage);
        handData    = new PXCMGesture.GeoNode[2][];
        handData[0] = new PXCMGesture.GeoNode[6];
        handData[1] = new PXCMGesture.GeoNode[6];

        mouse_nodes = new PXCMGesture.GeoNode[1][] { new PXCMGesture.GeoNode[12] };
    }
Ejemplo n.º 2
0
 void Start()
 {
     pp=new PXCUPipeline();
     pp.Init(mode);
     int width, height;
     pp.QueryLabelMapSize(out width, out height);
     texture=new Texture2D(width,height,TextureFormat.ARGB32,false);
     renderer.material.mainTexture = texture;
 }
Ejemplo n.º 3
0
    void Start()
    {
        pp=new PXCUPipeline();
        //shm=GetComponent<ShadowHandMod>();
        int width, height;
        if (!pp.Init(mode)) {
        print("Unable to initialize the PXCUPipeline");
        cameraFound=false;
        return;
        }
        cameraFound=true;

        if (pp.QueryLabelMapSize(out width, out height))
        print("LabelMap: width=" + width + ", height=" + height);

        if (width>0) {
        m_Texture = new Texture2D (width, height, TextureFormat.ARGB32,false);
        renderer.material.mainTexture = m_Texture;

        labelmap=new byte[width*height];

        //shm.ZeroImage(m_Texture);
        }
    }