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

论坛类网站建设网页传奇打金

论坛类网站建设,网页传奇打金,网页设计项目案例网站,新手学网站建设解疑与技巧1200例您可以使用 Ramer-Douglas-Peucker (RDP) algorithm来简化路径。然后#xff0c;您可以计算简化路径每段的方向变化。对应于方向最大变化的点可以称为转折点#xff1a; RDP算法的Python实现可以在on github中找到。 import matplotlib.pyplot as plt import numpy as np imp…您可以使用 Ramer-Douglas-Peucker (RDP) algorithm来简化路径。然后您可以计算简化路径每段的方向变化。对应于方向最大变化的点可以称为转折点 RDP算法的Python实现可以在on github中找到。 import matplotlib.pyplot as plt import numpy as np import os import rdp def angle(dir):Returns the angles between vectors. Parameters: dir is a 2D-array of shape (N,M) representing N vectors in M-dimensional space. The return value is a 1D-array of values of shape (N-1,), with each value between 0 and pi. 0 implies the vectors point in the same direction pi/2 implies the vectors are orthogonal pi implies the vectors point in opposite directionsdir2 dir[1:] dir1 dir[:-1] return np.arccos((dir1*dir2).sum(axis1)/( np.sqrt((dir1**2).sum(axis1)*(dir2**2).sum(axis1)))) tolerance 70 min_angle np.pi*0.22 filename os.path.expanduser(~/tmp/bla.data) points np.genfromtxt(filename).T print(len(points)) x, y points.T # Use the Ramer-Douglas-Peucker algorithm to simplify the path # http://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm # Python implementation: https://github.com/sebleier/RDP/ simplified np.array(rdp.rdp(points.tolist(), tolerance)) print(len(simplified)) sx, sy simplified.T # compute the direction vectors on the simplified curve directions np.diff(simplified, axis0) theta angle(directions) # Select the index of the points with the greatest theta # Large theta is associated with greatest change in direction. idx np.where(thetamin_angle)[0]1 fig plt.figure() ax fig.add_subplot(111) ax.plot(x, y, b-, labeloriginal path) ax.plot(sx, sy, g--, labelsimplified path) ax.plot(sx[idx], sy[idx], ro, markersize 10, labelturning points) ax.invert_yaxis() plt.legend(locbest) plt.show() 以上使用两个参数RDP算法采用一个参数公差其中代表简化路径的最大距离可能偏离原来的路径。公差越大粗鲁的路径就越简单。另一个参数是min_angle它定义了被认为是一个转折点。 (我正在转弯点是原始路径上的任何一点简化路径上的进入和退出向量之间的角度大于min_angle)。
http://www.zqtcl.cn/news/965026/

相关文章:

  • 权重的网站所有网站302跳转百度
  • 做个淘宝客网站怎么做济南网络推广公司排名
  • 西宁网站建设优化东莞建网站公司案例
  • 建设网站iss手工活接单在家做有正规网站吗
  • 六安做网站的公司专门建立网站的公司吗
  • 西昌市建设工程管理局网站wordpress主题知更
  • 企业网站如何上存青岛做外贸网站哪家好
  • 保定网站建设冀icp备织梦设置中英文网站
  • 烟台市建设工程检测站网站妖姬直播
  • 式网站西安网页搭建
  • 百度云虚拟主机如何建设网站四川建设人员信息查询
  • 浅谈学校网站建设html5网页制作代码成品
  • 网站在当地做宣传郑州高端设计公司
  • 一级a做爰网站微网站建设平台
  • 网站建设 中广州网站建设+致茂
  • 常德车管所网站工作微信管理系统
  • 什么软件可以做dj视频网站做的好的装修公司网站
  • 网站维护的内容和步骤如何建设像艺龙一样网站
  • 外国人做的学汉字网站公司网页需要哪些内容
  • 网站做缓存企业营销型网站的内容
  • 免费带后台的网站模板wordpress vr主题公园
  • 美丽乡村 网站建设wordpress分页工具栏
  • 卡盟网站是怎么建设的产品开发设计
  • 第一免费营销型网站一起做网店17
  • 高端学校网站建设做网站是怎么赚钱的
  • 哪里可以找人做网站在服务器上中的asp网站后台能输入帐号无法进入
  • 怎么网站关键词语有哪些
  • 网站建设 维护费用环球易购招聘网站建设
  • 怎么做网站官方电话手机应用开发平台
  • 济南企业免费建站剪辑视频怎么学