using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; //using OpenCVForUnity.ImgprocModule; //using OpenCVForUnity.CoreModule; //using OpenCVForUnity.UnityUtils; //using OpenCVForUnity.ImgcodecsModule; //using OpenCVForUnity.FaceModule; using System; using System.Linq; using o0.Geometry2D; using System.IO; using System.Threading.Tasks; using ZIM.Image; using o0; using o0.Project; using Color = UnityEngine.Color; //public class FindSquaresTest : MonoBehaviour //{ // public List Images; // // Start is called before the first frame update // void Awake() // { // /* // var v0 = new Vector(5, 0); // var v1 = new Vector(0, 5); // var dir = v1 - v0; // var edgeP = new Vector(dir.y, -dir.x); // Debug.Log(edgeP); // var p = new Vector(1, 0.5f); // var ep = p; // var dot = ep.x * edgeP.y - ep.y * edgeP.x; // Debug.Log(dot); // var line = new Line(v0, v1); // Debug.Log("distance: " + new Vector(0, 0).DistanceTo(line)); // //Debug.Log(new Vector(0, 0).VerticalLineIntersect(line)); // var line2 = new Line(new Vector(0,0), new Vector(1,1)); // var point = line.Intersect(line2, out float ta, out float tb, false); // { // Point p1 = new Point(0, 0); // Point p2 = new Point(3, 0); // Point p3 = new Point(3.1, 4); // Point p4 = new Point(3, 5); // Point p5 = new Point(0, 5); // Point p6 = new Point(0.1, 4); // var array = new Point[] { p1, p2, p3, p4, p5, p6 }; // var mat = new MatOfPoint2f(array); // mat = PointReduce(mat, 4); // foreach (var i in mat.toArray()) // Debug.Log(i); // } // /**/ // GetComponent