Exemplo n.º 1
0
        //public override (ThingType thing, Point2f position, double size)? GetThing()
        //{


        //	Cv2.FindContours(mask,
        //					out Point[][] cnts,
        //					out HierarchyIndex[] hierarchyIndices,
        //					RetrievalModes.External,
        //					ContourApproximationModes.ApproxSimple);


        //	if (cnts.Any())
        //	{
        //		Point[] firstItem = cnts.OrderByDescending((points) => Cv2.ContourArea(points)).
        //				First();


        //		Mat color = mask.CvtColor(ColorConversionCodes.GRAY2BGR);
        //		Cv2.DrawContours(color, new[] { firstItem }, -1, Scalar.Red);
        //		Cv2.ImShow(nameof(SteelBallDetector), color);

        //		Cv2.MinEnclosingCircle(firstItem, out Point2f center, out float radius);

        //		return (ThingType.SteelBall, center, Cv2.ContourArea(firstItem));

        //	}

        //	else
        //	{
        //		return null;
        //	}


        ////Cv2.Circle(frame, center, (int)radius, Scalar.Black, 2);

        ////Cv2.ImShow("sou", frame);

        ////Mat edges = new Mat();

        ////Cv2.Canny(grayImage, edges, 300, 200);


        ////Cv2.ImShow("res", grayImage);

        ////Cv2.ImShow("dege", edges);

        //}


        public SteelBallDetector(FrameSource source) : base(source)
        {
        }
Exemplo n.º 2
0
        ////Cv2.Circle(frame, center, (int)radius, Scalar.Black, 2);

        ////Cv2.ImShow("sou", frame);

        ////Mat edges = new Mat();

        ////Cv2.Canny(grayImage, edges, 300, 200);


        ////Cv2.ImShow("res", grayImage);

        ////Cv2.ImShow("dege", edges);


        public AppleDetector(FrameSource source) : base(source)
        {
        }
Exemplo n.º 3
0
 public YellowCubeDetector(FrameSource source) : base(source)
 {
 }
Exemplo n.º 4
0
 public BlueCubeDetector(FrameSource source) : base(source)
 {
 }
Exemplo n.º 5
0
 protected ThingsDetector(FrameSource source)
 {
     Source = source;
 }
Exemplo n.º 6
0
        ////Cv2.Circle(frame, center, (int)radius, Scalar.Black, 2);

        ////Cv2.ImShow("sou", frame);

        ////Mat edges = new Mat();

        ////Cv2.Canny(grayImage, edges, 300, 200);


        ////Cv2.ImShow("res", grayImage);

        ////Cv2.ImShow("dege", edges);


        public BeerDetector(FrameSource source) : base(source)
        {
        }
Exemplo n.º 7
0
 public GreenCubeDetector(FrameSource source) : base(source)
 {
 }
Exemplo n.º 8
0
 public SpriteDetector(FrameSource source) : base(source)
 {
 }
Exemplo n.º 9
0
 public RedCubeDetector(FrameSource source) : base(source)
 {
 }
Exemplo n.º 10
0
        //public override (ThingType thing, Point2f position, double size)? GetThing()
        //{
        //	Cv2.FindContours(Mask,
        //						 out Point[][] cnts,
        //						 out HierarchyIndex[] hierarchyIndices,
        //						 RetrievalModes.External,
        //						 ContourApproximationModes.ApproxSimple);

        //	List<Point[]> couList = cnts.ToList();


        //	if (cnts.Any())
        //	{
        //		Point[] firstItem = cnts.OrderByDescending((points) => Cv2.ContourArea(points)).
        //									First();

        //		Mat color = Mask.CvtColor(ColorConversionCodes.GRAY2BGR);
        //		Cv2.DrawContours(color, new[] { firstItem }, -1, Scalar.Red);
        //		Cv2.ImShow(nameof(YakultDetector), color);


        //		Cv2.MinEnclosingCircle(firstItem, out Point2f center, out float radius);

        //		return (ThingType.Yakult, center, Cv2.ContourArea(firstItem));
        //	}
        //	else
        //	{
        //		return null;
        //	}


        //}


        public YakultDetector(FrameSource source) : base(source)
        {
        }
Exemplo n.º 11
0
 public PcmacgDetector(FrameSource source) : base(source)
 {
 }
Exemplo n.º 12
0
 public TennisDetector(FrameSource source) : base(source)
 {
 }