techwingslab / yolov5-net

YOLOv5 object detection with C#, ML.NET, ONNX
MIT License
351 stars 104 forks source link

Unable to instantiate "Pen" #81

Open javaCR7 opened 1 year ago

javaCR7 commented 1 year ago

image

chenzanyu commented 1 year ago

can Use

var pen =Pens.DashDot(prediction.Label.Color, 1);
image.Mutate(a => a.DrawPolygon(pen,
        new PointF(prediction.Rectangle.Left, prediction.Rectangle.Top),
        new PointF(prediction.Rectangle.Right, prediction.Rectangle.Top),
        new PointF(prediction.Rectangle.Right, prediction.Rectangle.Bottom),
        new PointF(prediction.Rectangle.Left, prediction.Rectangle.Bottom)
    ));