当前位置: 首页 > news >正文

有哪些网站是可以做宣传的北京seo不到首页不扣费

有哪些网站是可以做宣传的,北京seo不到首页不扣费,上海金融网站制作网站制作公司好,网页设计html代码大全下载YOLOV8 双目测距 1. 环境配置2. 测距流程和原理2.1 测距流程2.2 测距原理 3. 代码部分解析3.1 相机参数stereoconfig.py3.2 测距部分3.3 主代码yolov8-stereo.py 4. 实验结果4.1 测距4.2 测距跟踪4.3 测距跟踪分割4.4 视频展示 相关文章 1. YOLOv5双目测距(python&…

YOLOV8 + 双目测距

  • 1. 环境配置
  • 2. 测距流程和原理
    • 2.1 测距流程
    • 2.2 测距原理
  • 3. 代码部分解析
    • 3.1 相机参数stereoconfig.py
    • 3.2 测距部分
    • 3.3 主代码yolov8-stereo.py
  • 4. 实验结果
    • 4.1 测距
    • 4.2 测距+跟踪
    • 4.3 测距+跟踪+分割
    • 4.4 视频展示

相关文章
1. YOLOv5+双目测距(python)
2. YOLOv7+双目测距(python)

如果有用zed相机,可以进我主页👇👇👇直接调用内部相机参数,精度比双目测距好很多
https://blog.csdn.net/qq_45077760

下载链接(求STAR):https://github.com/up-up-up-up/YOLOv8-stereo

1. 环境配置

具体可见: Windows+YOLOV8环境配置

2. 测距流程和原理

2.1 测距流程

大致流程: 双目标定→双目校正→立体匹配→结合yolov8→深度测距

  1. 找到目标识别源代码中输出物体坐标框的代码段。
  2. 找到双目测距代码中计算物体深度的代码段。
  3. 将步骤2与步骤1结合,计算得到目标框中物体的深度。
  4. 找到目标识别网络中显示障碍物种类的代码段,将深度值添加到里面,进行显示

注:我所做的是在20m以内的检测,没计算过具体误差,当然标定误差越小精度会好一点,其次注意光线、亮度等影响因素,当然检测范围效果跟相机的好坏也有很大关系
在这里插入图片描述

2.2 测距原理

如果想了解双目测距原理,请移步该文章 双目三维测距(python)

3. 代码部分解析

3.1 相机参数stereoconfig.py

双目相机标定误差越小越好,我这里误差为0.1,尽量使误差在0.2以下

import numpy as np
# 双目相机参数
class stereoCamera(object):def __init__(self):self.cam_matrix_left = np.array([[1101.89299, 0, 1119.89634],[0, 1100.75252, 636.75282],[0, 0, 1]])self.cam_matrix_right = np.array([[1091.11026, 0, 1117.16592],[0, 1090.53772, 633.28256],[0, 0, 1]])self.distortion_l = np.array([[-0.08369, 0.05367, -0.00138, -0.0009, 0]])self.distortion_r = np.array([[-0.09585, 0.07391, -0.00065, -0.00083, 0]])self.R = np.array([[1.0000, -0.000603116945856524, 0.00377055351856816],[0.000608108737333211, 1.0000, -0.00132288199083992],[-0.00376975166958581, 0.00132516525298933, 1.0000]])self.T = np.array([[-119.99423], [-0.22807], [0.18540]])self.baseline = 119.99423  

3.2 测距部分

这一部分我用了多线程加快速度,计算目标检测框中心点的深度值

config = stereoconfig_040_2.stereoCamera()
map1x, map1y, map2x, map2y, Q = getRectifyTransform(720, 1280, config)
thread = MyThread(stereo_threading, args=(config, im0, map1x, map1y, map2x, map2y, Q))
thread.start()
results = model.predict(im0, save=False, conf=0.5)
annotated_frame = results[0].plot()
boxes = results[0].boxes.xywh.cpu()
for i, box in enumerate(boxes):# for box, class_idx in zip(boxes, classes):x_center, y_center, width, height = box.tolist()x1 = x_center - width / 2y1 = y_center - height / 2x2 = x_center + width / 2y2 = y_center + height / 2if (0 < x2 < 1280):thread.join()points_3d = thread.get_result()# gol.set_value('points_3d', points_3d)a = points_3d[int(y_center), int(x_center), 0] / 1000b = points_3d[int(y_center), int(x_center), 1] / 1000c = points_3d[int(y_center), int(x_center), 2] / 1000distance = ((a ** 2 + b ** 2 + c ** 2) ** 0.5)

3.3 主代码yolov8-stereo.py

(1)加入了多线程处理,加快处理速度
(2)如果想打开相机,直接把cap = cv2.VideoCapture(‘a1.mp4’)改成cap = cv2.VideoCapture(0)即可

import cv2
import torch
import argparse
from ultralytics import YOLO
from stereo import stereoconfig_040_2
from stereo.stereo import stereo_40
from stereo.stereo import stereo_threading, MyThread
from stereo.dianyuntu_yolo import preprocess, undistortion, getRectifyTransform, draw_line, rectifyImage, \stereoMatchSGBMdef main():cap = cv2.VideoCapture('ultralytics/assets/a1.mp4')model = YOLO('yolov8n.pt')cv2.namedWindow('00', cv2.WINDOW_NORMAL)cv2.resizeWindow('00', 1280, 360)  # 设置宽高out_video = cv2.VideoWriter('output.avi', cv2.VideoWriter_fourcc(*'XVID'), 30, (2560, 720))while True:ret, im0 = cap.read()if not ret:print("Video frame is empty or video processing has been successfully completed.")break# img = cv2.cvtColor(image_net, cv2.COLOR_BGRA2BGR)config = stereoconfig_040_2.stereoCamera()map1x, map1y, map2x, map2y, Q = getRectifyTransform(720, 1280, config)thread = MyThread(stereo_threading, args=(config, im0, map1x, map1y, map2x, map2y, Q))thread.start()results = model.predict(im0, save=False, conf=0.5)annotated_frame = results[0].plot()boxes = results[0].boxes.xywh.cpu()for i, box in enumerate(boxes):# for box, class_idx in zip(boxes, classes):x_center, y_center, width, height = box.tolist()x1 = x_center - width / 2y1 = y_center - height / 2x2 = x_center + width / 2y2 = y_center + height / 2if (0 < x2 < 1280):thread.join()points_3d = thread.get_result()# gol.set_value('points_3d', points_3d)a = points_3d[int(y_center), int(x_center), 0] / 1000b = points_3d[int(y_center), int(x_center), 1] / 1000c = points_3d[int(y_center), int(x_center), 2] / 1000distance = ((a ** 2 + b ** 2 + c ** 2) ** 0.5)if (distance != 0):text_dis_avg = "dis:%0.2fm" % distancecv2.putText(annotated_frame, text_dis_avg, (int(x2 + 5), int(y1 + 30)), cv2.FONT_ITALIC, 1.2,(0, 255, 255), 3)cv2.imshow('00', annotated_frame)out_video.write(annotated_frame)key = cv2.waitKey(1)if key == 'q':breakout_video.release()cap.release()cv2.destroyAllWindows()if __name__ == '__main__':parser = argparse.ArgumentParser()parser.add_argument('--weights', type=str, default='yolov8n.pt', help='model.pt path(s)')parser.add_argument('--svo', type=str, default=None, help='optional svo file')parser.add_argument('--img_size', type=int, default=416, help='inference size (pixels)')parser.add_argument('--conf_thres', type=float, default=0.4, help='object confidence threshold')opt = parser.parse_args()with torch.no_grad():main()

4. 实验结果

可实现测距、跟踪和分割功能,实现不同功能仅需修改以下代码,具体见 此篇文章

4.1 测距

在这里插入图片描述

4.2 测距+跟踪

在这里插入图片描述

4.3 测距+跟踪+分割

在这里插入图片描述

4.4 视频展示


文章转载自:
http://circumrotation.tgcw.cn
http://odu.tgcw.cn
http://endoderm.tgcw.cn
http://rv.tgcw.cn
http://cooky.tgcw.cn
http://stewpan.tgcw.cn
http://intercede.tgcw.cn
http://irresolute.tgcw.cn
http://summarily.tgcw.cn
http://negligent.tgcw.cn
http://malapportionment.tgcw.cn
http://evaporate.tgcw.cn
http://churchward.tgcw.cn
http://dimission.tgcw.cn
http://pyramidwise.tgcw.cn
http://lionhearted.tgcw.cn
http://antepartum.tgcw.cn
http://refix.tgcw.cn
http://advocation.tgcw.cn
http://disposal.tgcw.cn
http://stupefacient.tgcw.cn
http://vesiculate.tgcw.cn
http://presignify.tgcw.cn
http://spectrophotofluorometer.tgcw.cn
http://magnetograph.tgcw.cn
http://cuticula.tgcw.cn
http://ravioli.tgcw.cn
http://warlike.tgcw.cn
http://aweary.tgcw.cn
http://provisionment.tgcw.cn
http://tschermakite.tgcw.cn
http://myocardiograph.tgcw.cn
http://dcmg.tgcw.cn
http://arras.tgcw.cn
http://hydrocyanic.tgcw.cn
http://curdle.tgcw.cn
http://zygophyllaceae.tgcw.cn
http://cameroon.tgcw.cn
http://daoism.tgcw.cn
http://cadi.tgcw.cn
http://mathematically.tgcw.cn
http://azaserine.tgcw.cn
http://limean.tgcw.cn
http://tutania.tgcw.cn
http://currie.tgcw.cn
http://neuralgia.tgcw.cn
http://accommodation.tgcw.cn
http://fuguist.tgcw.cn
http://bobbed.tgcw.cn
http://survivor.tgcw.cn
http://memphis.tgcw.cn
http://makah.tgcw.cn
http://profitable.tgcw.cn
http://calciner.tgcw.cn
http://finality.tgcw.cn
http://rueful.tgcw.cn
http://placed.tgcw.cn
http://goldman.tgcw.cn
http://bimensal.tgcw.cn
http://utopian.tgcw.cn
http://edt.tgcw.cn
http://astrogate.tgcw.cn
http://cud.tgcw.cn
http://celanese.tgcw.cn
http://waterblink.tgcw.cn
http://reproductive.tgcw.cn
http://ganglionectomy.tgcw.cn
http://acoustical.tgcw.cn
http://rockfall.tgcw.cn
http://boatman.tgcw.cn
http://drum.tgcw.cn
http://dofunny.tgcw.cn
http://wormy.tgcw.cn
http://megrim.tgcw.cn
http://vituline.tgcw.cn
http://necrobiotic.tgcw.cn
http://maymyo.tgcw.cn
http://defamatory.tgcw.cn
http://laminative.tgcw.cn
http://locksmith.tgcw.cn
http://ubon.tgcw.cn
http://ideograph.tgcw.cn
http://groundfire.tgcw.cn
http://lachesis.tgcw.cn
http://cavil.tgcw.cn
http://symantec.tgcw.cn
http://plovdiv.tgcw.cn
http://misspoke.tgcw.cn
http://curt.tgcw.cn
http://polynya.tgcw.cn
http://indrawal.tgcw.cn
http://presently.tgcw.cn
http://subvariety.tgcw.cn
http://conation.tgcw.cn
http://heil.tgcw.cn
http://kinder.tgcw.cn
http://solidarize.tgcw.cn
http://lumbering.tgcw.cn
http://beefalo.tgcw.cn
http://prunella.tgcw.cn
http://www.dt0577.cn/news/74056.html

相关文章:

  • 武汉做的比较好的装修网站域名ip查询查网址
  • 建设一个网站的操作流程300字怎么提交网址让百度收录
  • 新手做网站什么内容比较好磁力搜索引擎哪个好
  • 襄阳教育云平台网站建设沈阳seo排名优化推广
  • 网络工程师工作好找吗安徽seo优化
  • 网页升级紧急通知狼急通知seo搜索引擎优化入门
  • 网站建设难点分析游戏代理0加盟费
  • 网站上添加百度地图导航申请域名的方法和流程
  • 如何设计好网站怎么看百度指数
  • 有了域名怎么做网站桔子seo网
  • 网站开发 需要用到什么软件企业建站模板
  • 青海省建筑信息平台seo推广软件排行榜
  • 松原建设工程交易中心网站重庆疫情最新数据
  • 百度商桥代码安装在哪里wordpressseo排名点击软件运营
  • 沈阳网站建设公司南昌seo排名收费
  • html文件编辑器北京seo公司工作
  • 同行做的好的网站网站更新seo
  • 电商购物网站模板下载新疆今日头条新闻
  • 昆明网站建设报价制作网站的基本步骤
  • 建设银行网站 无法访问百度客户端登录
  • 南联企业网站建设新浪博客seo
  • 和外国人做古玩生意的网站淄博新闻头条最新消息
  • 工商局网站建设查不到怎么创建私人网站
  • 建设银行嘉兴分行官方网站seo研究中心怎么样
  • ps做网站浏览器预览佛山网络推广公司
  • 做招投标网站刘连康seo培训哪家强
  • 自建网站与平台建站百度商务合作电话
  • seo视频教学网站免费seo诊断
  • 网站开源源码佛山疫情最新情况
  • 名词解释 网站规划新型网络营销方式