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

网站做支付宝支付需要哪些资料华强北附近网站建设

网站做支付宝支付需要哪些资料,华强北附近网站建设,flash网站开发用什么语言,吉林省城乡建设厅网站6语义分割的标签#xff08;目标处为255#xff0c;其余处为0#xff09; 实例分割的标签#xff08;yolo.txt#xff09;,描述边界的多边形顶点的归一化位置 绘制在原图类似蓝色的边框所示。 废话不多说#xff0c;直接贴代码#xff1b; import os import cv2 imp…语义分割的标签目标处为255其余处为0 实例分割的标签yolo.txt,描述边界的多边形顶点的归一化位置 绘制在原图类似蓝色的边框所示。 废话不多说直接贴代码 import os import cv2 import numpy as np import shutildef img2label(imgPath, labelPath, imgbjPath, seletName):# 检查labelPath文件夹是否存在if not os.path.exists(labelPath):os.makedirs(labelPath)if not os.path.exists(imgbjPath):os.makedirs(imgbjPath)imgList os.listdir(imgPath)for imgName in imgList:# 筛选if imgName.split(_)[0] ! seletName and seletName ! :continueprint(imgName)img cv2.imread(imgPath imgName, cv2.IMREAD_COLOR)h, w, _ img.shape# print(h, w)GrayImagecv2.cvtColor(img,cv2.COLOR_BGR2GRAY) #图片灰度化处理ret, binary cv2.threshold(GrayImage,40,255,cv2.THRESH_BINARY) #图片二值化,灰度值大于40赋值255反之0# ret, binary cv2.threshold(binary, 80, 255, cv2.THRESH_BINARY_INV) # 黑白二值反转cv2.imwrite(rdenoisedfz.png, binary) #保存图片# 腐蚀# kernel np.ones((3,3),np.uint8) # binary cv2.erode(binary,kernel,iterations 3)thresholdL h/100 * w/100 #设定阈值thresholdH h/1 * w/1 #设定阈值#cv2.fingContours寻找图片轮廓信息提取二值化后图片中的轮廓信息 返回值contours存储的即是图片中的轮廓信息是一个向量内每个元素保存了一组由连续的Point点构成的点的集合的向量每一组Point点集就是一个轮廓有多少轮廓向量contours就有多少元素contours,hierarchcv2.findContours(binary,cv2.RETR_EXTERNAL,cv2.CHAIN_APPROX_TC89_L1)contoursNorm []objs []# print(contours)for i in range(len(contours)):area cv2.contourArea(contours[i]) #计算轮廓所占面积# print(area)if area thresholdL and area thresholdH:obj [0]for point in contours[i]:obj.append(str(point[0][0] * 1.0 / w)) # 获取xobj.append(str(point[0][1] * 1.0 / h)) # 获取ycontoursNorm.append(contours[i])objs.append(obj)# print(objs[10])# 查看效果cv2.drawContours(img, contoursNorm, -1,(255,0,0),2)cv2.imwrite(imgbjPathimgName, img) #保存图片if len(objs) 0:print(不保存标签跳过)continue# 写入txtrealName imgName.split(-l)[0]fopen(labelPath realName .txt,w)for obj in objs:f.writelines( .join(obj))f.writelines(\n)f.close()# break# oridata 保存着原图像 # maskdata 保存着标签图像 # lab 保存这yolo格式的标签文件 # bj 保存着标记好边界的图像def OrganizeImages(path):imgs os.listdir(path)for im in imgs:imPath os.path.join(path, im)if im.split(.)[-1] jpg:# 原图像# 移动到oridatasource_path imPathdestination_path data\\oridata\\ imshutil.copy(source_path, destination_path)if im.split(.)[-1] png:# mask label# 移动到maskdatasource_path imPathdestination_path data\\maskdata\\ imshutil.copy(source_path, destination_path)if __name__ __main__:img2label(imgPathdata\\maskdata\\, # maskdata 保存着标签图像labelPathdata\\lab\\, # lab 保存这yolo格式的标签文件imgbjPath data\\bj\\, # bj 保存着标记好边界的图像seletName)
http://www.w-s-a.com/news/83813/

相关文章:

  • 东莞公司建站哪个更便宜wordpress宝塔伪静态
  • 六安网站建设价格做网站好吗
  • 中小企业网站建设咨询湖南省邵阳建设局网站
  • 分类网站一天做几条合适南安网络推广
  • 案例学 网页设计与网站建设百度竞价关键词出价技巧
  • 做公司网站要那些资料南雄网站建设
  • 自己做的网站发布到网上视频播放不了网页游戏奥奇传说
  • 网站效果用什么软件做品牌网站建设等高端服务
  • 四川省成华区建设局网站网站专业制作
  • 网站建设如何开票网站后台怎么做超链接
  • 教育网站设计方案建设网站技术公司电话号码
  • 建网站要定制还是第三方系统传奇网站模板psd
  • 免费搭建企业网站什么叫网站定位
  • 网站建设cms程序员培训班
  • 网站seo技术wordpress editor ios
  • 红酒网站设计成立公司需要哪些手续
  • 广州做网站哪个好网站建网站建设网站站网站
  • 如何快速提升网站pr短剧个人主页简介模板
  • 上海网站建设 永灿百度权重3的网站值多少
  • 公司展示网站模板模板工
  • 网站建设收费详情舟山公司做网站
  • 深圳宝安区住房和建设局网站html模板大全
  • 和田哪里有做网站的地方wordpress地址更改
  • 恒通建设集团有限公司网站企业网站百度指数多少算竞争大
  • 雅虎网站收录提交入口如何使用wordpress搭建网站
  • 微商城网站建设怎么样发稿是什么意思
  • dz建站与wordpress群晖做网站服务器速度快吗
  • 做手机网站的公司网站建设 app开发 图片
  • 网站开发技术背景介绍wordpress数据库重置密码
  • 开发建设网站的实施过程是一个logo设计品牌