Example #1
0
        private void InitializePlayers()
        {
            Face1.Avatar = Configuration.DefaultAvatar;
            Face1.Color  = Configuration.DefaultColorGroup;
            Face1.SetPlayerName("Jorge");

            Face2.Avatar = Avatars.GetRandomAvatar();
            Face2.Color  = ColorFactory.GetRandomColor(Face1.Color);

            FaceSelector3.Avatar = Avatars.GetRandomAvatar();
            FaceSelector3.Color  = ColorFactory.GetRandomColor(Face1.Color, Face2.Color);

            FaceSelector4.Avatar = Avatars.GetRandomAvatar();
            FaceSelector4.Color  = ColorFactory.GetRandomColor(Face1.Color, Face2.Color, FaceSelector3.Color);
        }
Example #2
0
    /* Used to out put a few faces
     * int frameCounter=0;
     * int fileCounter =0;
     */

    // Use this for initialization
    void Start()
    {
        //Setting up my class that uses opencv
        myDetector = new Face1();

        //Setting Up Webcam
        Debug.Log(WebCamTexture.devices);
        inputDevice = WebCamTexture.devices [0];
        Debug.Log(inputDevice.name);
        myCameraTest = new WebCamTexture(inputDevice.name, 640, 480);
        gameObject.transform.localScale = new Vector3(640, 480, 1);
        data          = new Color32[640 * 480];
        myTexture     = new Texture2D(640, 480, TextureFormat.RGBA32, false);
        myMatt        = new Mat(new Size(640, 480), CvType.CV_8UC4);
        equalizedMatt = new Mat(new Size(640, 480), CvType.CV_8UC4);
        channels      = new List <Mat>();
        //Setting up render and telling camera to start playing.
        //gameObject.GetComponent<Renderer> ().material.mainTexture = myCameraTest;
        //GameObject.Find ("other").GetComponent<Renderer> ().material.mainTexture = myTexture;
        gameObject.GetComponent <Renderer> ().material.mainTexture = myTexture;
        myCameraTest.Play();
        //frameCounter = 0;
    }
 public double CalculateAreaOfTopPyramid()
 {
     Console.WriteLine("I am inside Area of CalculateAreaOfPyramid Calculation");
     return(Face1.AreaOfTriangle() + Face2.AreaOfTriangle() + Face3.AreaOfTriangle() + Face4.AreaOfTriangle());
 }