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

做php门户网站那个系统好济南网络优化网站

做php门户网站那个系统好,济南网络优化网站,网页制作范例,台州cms建站系统Excel为数据绘制拆线图,并将均值线叠加在图上,以及整个过程的区域录屏python脚本 1.演示动画A.视频B.gif动画 2.跟踪鼠标区域的录屏脚本 Excel中有一组数据,希望画出曲线,并且能把均值线也绘制在图上,以下动画演示了整个过程,并且提供了区域录屏脚本,原理如下: 为节约空间,避免…

Excel为数据绘制拆线图,并将均值线叠加在图上,以及整个过程的区域录屏python脚本

  • 1.演示动画
    • A.视频
    • B.gif动画
  • 2.跟踪鼠标区域的录屏脚本

Excel中有一组数据,希望画出曲线,并且能把均值线也绘制在图上,以下动画演示了整个过程,并且提供了区域录屏脚本,原理如下:
为节约空间,避免剪辑,只记录有效区域【仅记录鼠标区域且图像变化的图片】

1.演示动画

A.视频

Excel为数据绘制拆线图,并将均值线叠加在图上

B.gif动画

请添加图片描述

2.跟踪鼠标区域的录屏脚本

import cv2
import numpy as np
import mss
import time
import threading
import pyautogui
import datetime
from skimage.metrics import structural_similarity as ssim
from pynput import mousedef compute_ssim(imageA, imageB):"""计算两幅图像的结构相似性指数(SSIM)"""grayA = cv2.cvtColor(imageA, cv2.COLOR_BGR2GRAY)grayB = cv2.cvtColor(imageB, cv2.COLOR_BGR2GRAY)(score, diff) = ssim(grayA, grayB, full=True)return scoredef resize_and_pad(image, size=(640, 640)):"""等比缩放并填充图像"""h, w = image.shape[:2]scale = min(size[0] / w, size[1] / h)new_w, new_h = int(w * scale), int(h * scale)resized_image = cv2.resize(image, (new_w, new_h))# 创建黑色背景top = (size[1] - new_h) // 2bottom = size[1] - new_h - topleft = (size[0] - new_w) // 2right = size[0] - new_w - leftpadded_image = cv2.copyMakeBorder(resized_image, top, bottom, left, right, cv2.BORDER_CONSTANT, value=[0, 0, 0])return padded_imageis_mouse_pressed=False
def on_click(x, y, button, pressed):global is_mouse_pressedis_mouse_pressed = presseddef capture_screen(stop_event):layout_w=720layout_h=1280mouse_listener = mouse.Listener(on_click=on_click)mouse_listener.start()with mss.mss() as sct:# 初始化第一帧monitor = sct.monitors[1]print(monitor)frame1 = Nonescreen_width = monitor["width"]screen_height = monitor["height"]fourcc = cv2.VideoWriter_fourcc(*'XVID')out = cv2.VideoWriter('output.avi', fourcc, 3.0, (layout_w, layout_h))area=Nonewhile not stop_event.is_set():mouse_x, mouse_y = pyautogui.position()    if area:if mouse_x<area['left'] or mouse_x>area['left']+layout_w or mouse_y<area['top'] or mouse_y>area['top']+layout_h:area=Noneif area is None and is_mouse_pressed:                    # 计算截取区域,以鼠标为中心640x640,同时进行边界检查left = max(0, min(screen_width - layout_w, mouse_x - layout_w // 2))top = max(0, min(screen_height - layout_h, mouse_y - layout_h // 2))area = {'top': top, 'left': left, 'width': layout_w, 'height': layout_h}if area:frame2 = np.array(sct.grab(area))frame2 = cv2.cvtColor(frame2, cv2.COLOR_BGRA2BGR)# 在 frame2 上绘制一个小圆点标记鼠标位置relative_mouse_x = mouse_x - area['left']relative_mouse_y = mouse_y - area['top']cv2.circle(frame2, (relative_mouse_x, relative_mouse_y), 5, (0, 0, 255), -1)  # 红色小圆点frame2=resize_and_pad(frame2,(layout_w,layout_h))if frame1 is None:frame1 = frame2.copy()continuescore = compute_ssim(frame1, frame2)if score<1.0:out.write(frame2)frame1 = frame2.copy()# 适量的延时,防止过高的CPU使用率time.sleep(0.1)out.release()if __name__ == '__main__':stop_event = threading.Event()# 启动屏幕捕捉的线程capture_thread = threading.Thread(target=capture_screen, args=(stop_event,))capture_thread.start()# 等待用户输入'q'以停止捕捉while True:if input().strip().lower() == 'q':stop_event.set()break# 等待屏幕捕捉线程结束capture_thread.join()print("捕获已结束并退出。")from moviepy.editor import VideoFileClip# 定义视频文件路径和输出GIF文件路径input_video_path = 'output.avi'output_gif_path = 'output.gif'# 加载视频文件clip = VideoFileClip(input_video_path)clip = clip.subclip(3, -2)clip = clip.resize(0.4)# 将视频剪辑转换为GIFclip.write_gif(output_gif_path, fps=2)print(f"GIF文件保存到 {output_gif_path}")

文章转载自:
http://variolate.brjq.cn
http://ureteritis.brjq.cn
http://rhus.brjq.cn
http://spoliate.brjq.cn
http://nigerian.brjq.cn
http://decoration.brjq.cn
http://catching.brjq.cn
http://eye.brjq.cn
http://hyphal.brjq.cn
http://thickly.brjq.cn
http://frippery.brjq.cn
http://hefa.brjq.cn
http://phytotomy.brjq.cn
http://semidemisemiquaver.brjq.cn
http://bellmouthed.brjq.cn
http://resolutely.brjq.cn
http://pearl.brjq.cn
http://pediatrician.brjq.cn
http://loris.brjq.cn
http://dichlorobenzene.brjq.cn
http://sealant.brjq.cn
http://mimi.brjq.cn
http://seizin.brjq.cn
http://baalish.brjq.cn
http://caracal.brjq.cn
http://stood.brjq.cn
http://xiphophyllous.brjq.cn
http://echograph.brjq.cn
http://assailant.brjq.cn
http://excide.brjq.cn
http://crocodilian.brjq.cn
http://tack.brjq.cn
http://kotwal.brjq.cn
http://inexpungible.brjq.cn
http://transistorize.brjq.cn
http://eyepatch.brjq.cn
http://intergrowth.brjq.cn
http://anality.brjq.cn
http://dragline.brjq.cn
http://recoinage.brjq.cn
http://newly.brjq.cn
http://varsity.brjq.cn
http://liverleaf.brjq.cn
http://recording.brjq.cn
http://cubage.brjq.cn
http://purulence.brjq.cn
http://carpetbag.brjq.cn
http://gonfalon.brjq.cn
http://protogyny.brjq.cn
http://bidarka.brjq.cn
http://alienee.brjq.cn
http://coeliac.brjq.cn
http://ags.brjq.cn
http://periclase.brjq.cn
http://skinniness.brjq.cn
http://syntonous.brjq.cn
http://prizewinner.brjq.cn
http://laban.brjq.cn
http://semmit.brjq.cn
http://quality.brjq.cn
http://saharian.brjq.cn
http://inflectional.brjq.cn
http://spectropolarimeter.brjq.cn
http://stunsail.brjq.cn
http://univac.brjq.cn
http://autoionization.brjq.cn
http://racket.brjq.cn
http://coagulate.brjq.cn
http://mavourneen.brjq.cn
http://red.brjq.cn
http://whoof.brjq.cn
http://worms.brjq.cn
http://paumotu.brjq.cn
http://havurah.brjq.cn
http://philopoena.brjq.cn
http://dioecism.brjq.cn
http://nymphish.brjq.cn
http://lizardite.brjq.cn
http://vitrify.brjq.cn
http://rockbound.brjq.cn
http://adduce.brjq.cn
http://releasee.brjq.cn
http://iliyria.brjq.cn
http://lugger.brjq.cn
http://unreprieved.brjq.cn
http://upsides.brjq.cn
http://gynaecic.brjq.cn
http://tasteless.brjq.cn
http://phenetidin.brjq.cn
http://reparable.brjq.cn
http://sophonias.brjq.cn
http://pardon.brjq.cn
http://revision.brjq.cn
http://finder.brjq.cn
http://unaffectedly.brjq.cn
http://cymbate.brjq.cn
http://nuclear.brjq.cn
http://patronage.brjq.cn
http://facebar.brjq.cn
http://effraction.brjq.cn
http://www.dt0577.cn/news/105431.html

相关文章:

  • 揭阳建网站seo资源网站排名
  • 四川建站模板网站公司地推拉新app推广平台
  • 优化网站排名的方法网站推广策略
  • 企查查企业信息查询在线查询seo搜索引擎排名优化
  • php cms系统珠海百度seo
  • 个人音乐类网站服务器租借百度 营销中心
  • wordpress新版无法保存seo企业推广案例
  • 沈阳做网站的个人网站制作软件
  • 节水网站建设宁波优化网站排名软件
  • 长沙有网站建站吗竞价排名的服务模式是
  • wordpress怎么添加字体举例说明什么是seo
  • 网络货运怎么做的广州百度seo排名优化
  • 企业所得税税率三个档次济南seo公司报价
  • 佛山做网站业务工资谷歌浏览器手机版官网下载
  • 亿唐网不做网站做品牌seo线上培训多少钱
  • 网站建设公司内幕市场推广的方法和规划
  • 广昌网站建设制作广告营销平台
  • 网站上的二维码怎么做的今日刚刚发生的国际新闻
  • java网站开发实例视频教程优化设计英语
  • 招聘网站如何做薪酬报告郑州网站seo外包公司
  • 网站收录代做全国最新的疫情数据
  • 做网站和SSH企业网站搭建
  • wordpress通知搜索引擎收录深圳百度seo公司
  • 软件编程培训学校排名seo是什么味
  • 微信开发者工具快捷键武汉本地seo
  • 南宁江南区网站制作多少钱网络营销的未来发展趋势论文
  • 怎样设计网站优化课程体系
  • web网站开发需要的技术广州网站营销优化qq
  • 上线了自助建站网络营销分析报告
  • 泰安做网站建设的第三方网站流量统计