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

网站没有做301定向上海建设工程造价信息网

网站没有做301定向,上海建设工程造价信息网,做企业网站要怎么设计方案,网站开发工程师制作kpihttp://blog.csdn.net/xieqiaokang/article/details/60780608 1. 函数 用 OpenCV 标注 bounding box 主要用到下面两个工具——cv2.rectangle() 和 cv2.putText()。用法如下#xff1a; # cv2.rectangle() # 输入参数分别为图像、左上角坐标、右下角坐标、颜色数组、粗细 cv2…http://blog.csdn.net/xieqiaokang/article/details/60780608 1. 函数 用 OpenCV 标注 bounding box 主要用到下面两个工具——cv2.rectangle() 和 cv2.putText()。用法如下 # cv2.rectangle() # 输入参数分别为图像、左上角坐标、右下角坐标、颜色数组、粗细 cv2.rectangle(img, (x,y), (xw,yh), (B,G,R), Thickness)# cv2.putText() # 输入参数为图像、文本、位置、字体、大小、颜色数组、粗细 cv2.putText(img, text, (x,y), Font, Size, (B,G,R), Thickness)1234567 2. Example import cv2fname 001.jpg img cv2.imread(fname) # 画矩形框 cv2.rectangle(img, (212,317), (290,436), (0,255,0), 4) # 标注文本 font cv2.FONT_HERSHEY_SUPLEX text 001 cv2.putText(img, text, (212, 310), font, 2, (0,0,255), 1) cv2.imwrite(001_new.jpg, img) documents: https://docs.opencv.org/3.1.0/dc/da5/tutorial_py_drawing_functions.html Goal Learn to draw different geometric shapes with OpenCVYou will learn these functions : cv2.line(), cv2.circle() , cv2.rectangle(), cv2.ellipse(), cv2.putText() etc. Code In all the above functions, you will see some common arguments as given below: img : The image where you want to draw the shapescolor : Color of the shape. for BGR, pass it as a tuple, eg: (255,0,0) for blue. For grayscale, just pass the scalar value.thickness : Thickness of the line or circle etc. If **-1** is passed for closed figures like circles, it will fill the shape. default thickness 1lineType : Type of line, whether 8-connected, anti-aliased line etc. By default, it is 8-connected. cv2.LINE_AA gives anti-aliased line which looks great for curves. Drawing Line To draw a line, you need to pass starting and ending coordinates of line. We will create a black image and draw a blue line on it from top-left to bottom-right corners. 1 import numpy as np 2 import cv2 3  4 # Create a black image 5 img np.zeros((512,512,3), np.uint8) 6  7 # Draw a diagonal blue line with thickness of 5 px 8 cv2.line(img,(0,0),(511,511),(255,0,0),5) Drawing Rectangle To draw a rectangle, you need top-left corner and bottom-right corner of rectangle. This time we will draw a green rectangle at the top-right corner of image. 1 cv2.rectangle(img,(384,0),(510,128),(0,255,0),3) Drawing Circle To draw a circle, you need its center coordinates and radius. We will draw a circle inside the rectangle drawn above. 1 cv2.circle(img,(447,63), 63, (0,0,255), -1) Drawing Ellipse To draw the ellipse, we need to pass several arguments. One argument is the center location (x,y). Next argument is axes lengths (major axis length, minor axis length). angle is the angle of rotation of ellipse in anti-clockwise direction. startAngle and endAngle denotes the starting and ending of ellipse arc measured in clockwise direction from major axis. i.e. giving values 0 and 360 gives the full ellipse. For more details, check the documentation of cv2.ellipse(). Below example draws a half ellipse at the center of the image. 1 cv2.ellipse(img,(256,256),(100,50),0,0,180,255,-1) Drawing Polygon To draw a polygon, first you need coordinates of vertices. Make those points into an array of shape ROWSx1x2 where ROWS are number of vertices and it should be of type int32. Here we draw a small polygon of with four vertices in yellow color. 1 pts np.array([[10,5],[20,30],[70,20],[50,10]], np.int32) 2 pts pts.reshape((-1,1,2)) 3 cv2.polylines(img,[pts],True,(0,255,255)) NoteIf third argument is False, you will get a polylines joining all the points, not a closed shape.cv2.polylines() can be used to draw multiple lines. Just create a list of all the lines you want to draw and pass it to the function. All lines will be drawn individually. It is a much better and faster way to draw a group of lines than calling cv2.line() for each line. Adding Text to Images: To put texts in images, you need specify following things. Text data that you want to writePosition coordinates of where you want put it (i.e. bottom-left corner where data starts).Font type (Check cv2.putText() docs for supported fonts)Font Scale (specifies the size of font)regular things like color, thickness, lineType etc. For better look, lineType cv2.LINE_AA is recommended. We will write OpenCV on our image in white color. 1 font cv2.FONT_HERSHEY_SIMPLEX 2 cv2.putText(img,OpenCV,(10,500), font, 4,(255,255,255),2,cv2.LINE_AA) Result So it is time to see the final result of our drawing. As you studied in previous articles, display the image to see it. image Additional Resources The angles used in ellipse function is not our circular angles. For more details, visit this discussion. Exercises Try to create the logo of OpenCV using drawing functions available in OpenCV.
http://wiki.neutronadmin.com/news/347877/

相关文章:

  • 什么网站可以请人做软件下载巩义网站网站建设
  • 太原h5建站公司网站维护工作
  • 东莞免费企业网站模板推广手机app怎么开发的
  • 网站托管服务合同范本建立网站需要的技术
  • qq排名优化网站寮步镇网站建设公司
  • 虚拟主机和网站的关系山东网站制作软件
  • 手机微信官方网站成全视频免费观看在线看第6季动漫
  • 网站之间如何交换友情链接医疗产品网站建设
  • 成都建设网站专业公司推广产品最好的方式
  • 网站开发工程师简介河南网站建设哪家公司好
  • 网站开发公司的做得好的企业网站
  • 简单的企业小网站河南网站建设公司排名
  • 网站备案号 链接广告制作专业
  • 家纺公司网站模版中国建设银行江西分行网站首页
  • 手机网站设计公司可去亿企邦网站logo怎么修改
  • 网站关键词如何设置九江专业网站建设
  • 企业电子商务网站建设问题宁波百度seo点击软件
  • 鹰潭做网站wordpress密码无法重置密码
  • 延吉网站开发公司郑州区块链数字钱包网站开发公司
  • 郑州有哪些搞网站开发的公司百度公司简介介绍
  • html5怎末做意见反馈网站东莞网站推广及优化
  • 国内做贵金属返佣比较多的网站美容评测网站建设分析报告
  • 嘉兴市南湖区城乡规划建设局网站专门网页制作工具有
  • 总部基地网站建设公司seo优化技术培训中心
  • 接网站建设单子注意事项七牛怎么做网站服务器
  • 怎么制作网站网页免费设计app的网站建设
  • 建设银行网站注册不了一键生成app的方法
  • 网站开发所需经费杭州外贸建站公司
  • 做简历比较好的网站福田做网站联系电话
  • 做境外网站贵阳自助建站软件