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

做家教网站赚钱么北京网站高端建设

做家教网站赚钱么,北京网站高端建设,帮别人做网站怎么接单,六安城市网招聘import cv2 as cv import os import numpy as np# 遍历文件夹函数 def getFileList(dir, Filelist, extNone):获取文件夹及其子文件夹中文件列表输入 dir#xff1a;文件夹根目录输入 ext: 扩展名返回#xff1a; 文件路径列表newDir d… import cv2 as cv import os import numpy as np# 遍历文件夹函数 def getFileList(dir, Filelist, extNone):获取文件夹及其子文件夹中文件列表输入 dir文件夹根目录输入 ext: 扩展名返回 文件路径列表newDir dirif os.path.isfile(dir):if ext is None:Filelist.append(dir)else:if ext in dir[-3:]:Filelist.append(dir)elif os.path.isdir(dir):for s in os.listdir(dir):newDir os.path.join(dir, s)getFileList(newDir, Filelist, ext)return Filelistdef mid(follow, mask):half follow.shape[1] // 2 # 从下往上扫描赛道,最下端取图片中线为分割线for y in range(follow.shape[0] - 1, -1, -1):if (mask[y][0:half] np.zeros_like(mask[y][0:half])).all(): # 分割线左端无赛道left 0 # 取图片左边界为赛道左边界else:left np.average(np.where(mask[y][0:half] 255)) # 计算分割线左端平均位置if (mask[y][half:follow.shape[1]] np.zeros_like(mask[y][half:follow.shape[1]])).all(): # 分割线右端无赛道right follow.shape[1] # 取图片右边界为赛道右边界else:right np.average(np.where(mask[y][half:follow.shape[1]] 255)) half # 计算分割线右端平均位置mid (left right) // 2 # 计算拟合中点half int(mid) # 递归,从下往上确定分割线follow[y, int(mid)] 255 # 画出拟合中线if y 360: # 设置指定提取中点的纵轴位置mid_output int(mid)cv.circle(follow, (mid_output, 360), 5, 255, -1) # opencv为(x,y),画出指定提取中点error follow.shape[1] // 2 - mid_output # 计算图片中点与指定提取中点的误差return follow, error # error为正数右转,为负数左转n -1 # 存放图片的文件夹路径 path ./B imglist getFileList(path, []) for imgpath in imglist:n 1if n 63:continueimg cv.imread(imgpath)# HSV阈值分割img_hsv cv.cvtColor(img, cv.COLOR_BGR2HSV)mask cv.inRange(img_hsv, np.array([43, 60, 90]), np.array([62, 255, 255]))follow mask.copy()follow, error mid(follow, mask)print(n, ferror:{error})cv.imshow(img, img)cv.imshow(mask, mask)cv.imshow(follow, follow)cv.waitKey(0)cv.destroyAllWindows()
http://www.hkea.cn/news/14347498/

相关文章:

  • 做网站的工资辽阳网站网站建设
  • 公司网站建设教程综合性门户网站是什么意思
  • 天津智能网站建设哪里有现在哪个公司家庭网络好用
  • 宁波网站推广优化公司怎么样海淀商城网站建设
  • 网站片头怎么做济宁住房和城乡建设厅网站
  • asp企业网站源码下载mugeda做网站
  • dedecms教育h5网站模板优质龙岗网站建设
  • 网站后台无法上传本地图片专门做家具的网站
  • 安徽建筑大学城市建设学院网站电商网络推广怎么做
  • 整站seo哪家服务好龙华网站建设的软件
  • seo批量建站大连网站建设方案
  • 唐山做网站汉狮网络网站弹出式链接后台怎么做
  • 硅藻泥网站怎么做上海公司注册名字查询网
  • 胶州网站建设dch100小程序订单管理系统
  • 浙江网站做网站都有备案吗
  • 网站内链结构是什么意思产品怎么做推广和宣传
  • 手机如何制作网站源码如何做全网营销推广
  • 做catalog的免费网站中国铁路建设行业协会网站
  • 网站建设基础流程为什么检测行业不能用网站做
  • 个人网站建设一般流程桂林网站推广
  • 哪里做网站优化软件开发公司账务处理
  • 网站建站的基本步骤如何做html网站
  • 企业门户网站模式平面广告设计专业
  • 网站开发不足之处uniapp开发者中心
  • jsp网站开发步骤dz论坛如何seo
  • 公司手机网站开发深圳航空公司官方网站
  • 免费python在线正常网站关键词指数
  • 甘肃住房与城乡建设厅网站品牌网站策划书
  • 程序员创业做网站做公众号注册公司要多少资金起步
  • 手机html网站开发视频游戏开发需要学多久