YOLOV计数检测源码下载

2022年10月5日09:05:05YOLOV计数检测源码下载已关闭评论 980字阅读3分16秒
YOLOV计数检测源码下载
所属分类:福利资料下载 最后更新:2022年10月5日 09:00


1.打开视觉计数包装机图像
OpenFileDialog openFile = new OpenFileDialog();
openFile.Filter = "jpg图片|*.JPG|png图片|*.PNG|jpeg图片|*.JPEG";
openFile.Title = "打开图像文件";
if (openFile.ShowDialog() == DialogResult.OK)
{
sw.Restart();
string mage = openFile.FileName;
imagein = Cv2.ImRead(mage);
imageout = yolov3_model(imagein);
pictureBox1.Image = imageout.ToBitmap();
label2.Text = "取图" + sw.ElapsedMilliseconds.ToString("f2") + "ms";
}
}2.识别数量处理图像
private Mat yo_model(Mat imgSrc)
{
Mat org = new Mat();
org = imgSrc;
const float threshold = 0.5f;
const float nmsThreshold = 0.3f;
var cfg = Path.Combine(Location1, Cfg);
var model = Path.Combine(Location1, Weight);
var net = CvDnn.ReadNetFromDarknet(cfg, model);
var blob = CvDnn.BlobFromImage(org, 1.0 / 255, new OpenCvSharp.Size(416, 416), new Scalar(), true, false);
net.SetInput(blob);
var outNames = net.GetUnconnectedOutLayersNames();
var outs = outNames.Select(_ => new Mat()).ToArray();
net.Forward(outs, outNames);
org = GetResult(outs, org, threshold, nmsThreshold);
GC.Collect();
return org;

 

 

继续阅读
  • 我的微信
  • 这是我的微信扫一扫
  • weinxin
  • 我的微信公众号
  • 我的微信公众号扫一扫
  • weinxin
视觉计数软件福利 福利资料下载

视觉计数软件福利

视觉计数软件下载 安装方式: 1.解压文件。 2.点击Debug文件夹。 3.双击setup文件。 4.选择安装的路径。 5.打开图片。 6.自动识别数量。 7.支持海康相机 8.QQ群7105850...
三菱plc编程软件下载 福利资料下载

三菱plc编程软件下载

软件来自三菱官方网站,安装过程如果提示需要序列号,请输入下列其中一个: 570-986818410 804-999559933 998-598638072