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

长沙做网站备案视频网站软件有哪些

长沙做网站备案,视频网站软件有哪些,怎么做好网站营销,手机2345网址大全TL;DR: 无论如何我可以摆脱我的第二个 for -loop#xff1f;我在2D网格上有一系列时间点 . 为了消除它们位置的快速波动#xff0c;我在一个帧窗口上平均坐标 . 现在在我的情况下#xff0c;它想要包含特定点的帧#xff0c;如果它的行程比 cut_off 值更远 .在第一个 for -…TL;DR: 无论如何我可以摆脱我的第二个 for -loop我在2D网格上有一系列时间点 . 为了消除它们位置的快速波动我在一个帧窗口上平均坐标 . 现在在我的情况下它想要包含特定点的帧如果它的行程比 cut_off 值更远 .在第一个 for -loop中我遍历所有帧并定义移动窗口 . 然后我计算当前帧与移动窗口中每个帧之间的距离 . 在我从所有帧中仅抓取那些位置后 x 和 y 组件的行程都没有超过 cut_off . 现在我想计算移动窗口所有这些选定帧中每个点的平均位置( note: 所选帧的数量可以小于 n_window ) . 这导致我第二个 for -loop . 在这里我迭代所有点并实际 grab 帧中的位置其中当前点没有比 cut_off 传播更远 . 从这些选定的帧中我计算坐标的平均值并将其用作当前帧的新值 .这最后 for -loop减慢了整个处理过程 . 我无法想出一个更好的方法来完成这个计算 . 有什么建议MWE提出评论以澄清 .import numpy as np# Generate a timeseries with 1000 frames, each# containing 50 individual points defined by their# x and y coordinatesn_frames 1000n_points 50n_coordinates 2timeseries np.random.randint(-100, 100, [n_frames, n_points, n_coordinates])# Set window size to 20 framesn_window 20# Distance cut offcut_off 60# Set up empty array to hold resultsavg_data_store np.zeros([n_frames, timeseries.shape[1], 2])# Iterate over all framesfor frame in np.arange(0, n_frames):# Set the frame according to the window size that were looking att_before int(frame - (n_window / 2))t_after int(frame (n_window / 2))# If were trying to access frames below 0, set the lowest one to 0if t_before 0:t_before 0# Trying to access frames that are not in the trajectory, set to last frameif t_after n_frames - 1:t_after n_frames - 1# Grab x and y coordinates for all points in the corresponding windowpos_before timeseries[t_before:frame]pos_after timeseries[frame 1:t_after 1]pos_now timeseries[frame]# Calculate the distance between the current frame and the windows before/afterd_before np.abs(pos_before - pos_now)d_after np.abs(pos_after - pos_now)# Grab indices of framespoints, that are below the cut offarg_before np.argwhere(np.all(d_before cut_off, axis2))arg_after np.argwhere(np.all(d_after cut_off, axis2))# Iterate over all pointsfor i in range(0, timeseries.shape[1]):# Create temp arraytemp_stack pos_now[i]# Grab all frames in which the current point did _not_# travel farther than cut_offall_before arg_before[arg_before[:, 1] i][:, 0]all_after arg_after[arg_after[:, 1] i][:, 0]# Grab the corresponding positions for this points in these framesall_pos_before pos_before[all_before, i]all_pos_after pos_after[all_after, i]# If we have any frames for that point before / after# stack them into the temp arrayif all_pos_before.size 0:temp_stack np.vstack([all_pos_before, temp_stack])if all_pos_after.size 0:temp_stack np.vstack([temp_stack, all_pos_after])# Calculate the moving window average for the selection of framesavg_data_store[frame, i] temp_stack.mean(axis0)
http://www.sadfv.cn/news/94004/

相关文章:

  • 专门做广东11选5的网站淘宝客seo推广教程
  • 网站怎样续费wordpress主机主题
  • 郑州建设网站设计网站建设的税收编码
  • 少部分网站ie打不开这些网站域名ping不通西安烽盈网站建设推广
  • 电子商务网站建设计划东莞十大保安公司
  • 网站转换率哈尔滨建筑工程招聘信息
  • 网站建设方案交换认苏州久远网络广州天河区租房哪里便宜
  • 搭建网站 在线浏览功能网站改版什么意思
  • 推荐成都网站建设中国建设银行官方网站纪念钞预约
  • 肥东建设网站兰州网络公司有哪些
  • google网站搜索深圳十大设计事务所
  • 网站seo外链建设营销案例网站
  • 专业制作网站 地摊做钢材的做什么网站效果好
  • 河源市网站建设公司安康创宇网站建设
  • 什么是网站建设从哪些方面建设网站大连网站网站建设
  • 凡科网做网站视频wordpress 微博时间
  • 在线音乐网站开发教程西安网站建设制作 熊掌号
  • 最新的高端网站建设上海小程序定制开发公司
  • 小公司要不要建设网站怀仁建设局网站
  • 东莞网站排名自己做网站并让别人访问
  • 学生网站建设实训总结九州建网站
  • 北京制作网站多少钱鸽WordPress主题
  • 湛江建站费用电商设计和ui设计哪个前景比较好
  • 如何通过html做网站建筑网页
  • 伦教网站开发竞价推广代运营服务
  • 郑州优化网站关键词wordpress输入html代码
  • 汽车网站有哪些上海网站建设官方网站
  • 网站后台管理系统php滴滴出行的网站是哪家公司做的
  • 在线支付 网站模板大连flash网站
  • 怎么样做好网站运营肥城网站建设哪家好