Exemplo n.º 1
0
 public void Edit()
 {
     RawTexture2D rawTexture = new RawTexture2D (image);
     rawTexture.Grayscale ();
     rawTexture.OtsuThreshold();
     rawTexture.ZhangSuenThinning ();
     this.GetComponent<RawImage> ().texture = rawTexture.ToTexture2D ();
 }
Exemplo n.º 2
0
    public void Edit()
    {
        RawTexture2D rawTexture = new RawTexture2D (image);
        //rawTexture.Grayscale ();
        rawTexture.Equalize ();

        this.GetComponent<RawImage> ().texture = rawTexture.ToTexture2D ();
    }
Exemplo n.º 3
0
 public void ProcessTexture()
 {
     RawTexture2D rawTexture = new RawTexture2D (texture);
     List<RawTexture2D> blobs = rawTexture.BlobDetection ();
     bool[,] matrix = this.GetComponent<Classifier> ().ConvertToMatrix (blobs [0]);
     RawTexture2D resultRawTexture = new RawTexture2D (matrix);
     Texture2D resultTexture = resultRawTexture.ToTexture2D ();
     resultView.transform.GetChild(0).GetComponent<RawImage> ().texture = resultTexture;
     string resultClass = this.GetComponent<Classifier> ().ClassifyTurnCode (resultRawTexture);
     resultView.transform.GetChild (1).GetComponent<Text> ().text = "Angka : " + resultClass;
     resultView.SetActive (true);
 }