002、游戏画面捕获与预处理:屏幕抓取、图像增强与目标区域锁定

微信机器人告别Hook:基于Vision模型的合规UI自动化方案 微信自动化本质上是UI层人机交互的程序化复现,其核心挑战在于如何在不违反平台规范的前提下实现稳定感知与操作。传统Hook技术因行为指纹异常、版本强耦合及高危权限依赖,已无法满足长期运营需求;而多模态Vision模型通过截图识别+图文理解,将操作依据从内存指令转向可见界面元素,天然符合‘用户主动操作’的合规定义。该方案融合目标检测(如发送按钮精确定位)与视觉语言联合推理(如消息意图识别),在电商客服、私域运营等场景中实现零封号、117天无干预稳定运行,为中小团队提供低门槛、可演进、易集成的下一代微信自动化基础 阅读详情

#

## 一、深夜调试:为什么我的YOLO总是漏掉BOSS?

上周三凌晨两点,我盯着屏幕上的暗黑风格游戏画面,第37次跑通了训练好的YOLOv5模型。结果让人沮丧——在快速移动的战斗场景中,模型对BOSS的识别率不到60%。不是模型不行,而是喂给模型的图像质量太差:屏幕截图模糊、颜色失真、动态模糊严重。这才意识到,游戏AI的第一道坎根本不是模型调参,而是**如何从屏幕上拿到干净、可用的画面**。

## 二、屏幕抓取:别用PIL.ImageGrab了

很多人第一反应是用PIL的ImageGrab,简单几行代码就能截屏:

```python
from PIL import ImageGrab
img = ImageGrab.grab()  # 看起来很美,但问题大了
```

实际跑起来你会发现,这玩意儿在游戏全屏模式下帧率不到10fps,而且截取的是整个桌面。游戏窗口稍微被遮挡,或者你切屏回个微信,数据就废了。

后来我换成了DXGI方案,Windows下直接抓显卡输出缓冲区:

```python
import dxcam

# 初始化时指定区域,这里我锁定了1920x1080分辨率的游戏窗口区域
camera = dxcam.create(region=(0, 0, 1920, 1080))

# 获取一帧,实测能到240fps,够用了
frame = camera.grab()

# 重要:DXGI返回的是numpy数组,通道顺序是BGRA
# YOLO要的是RGB,记得转换
if frame is not None:
    rgb_frame = frame[:, :, [2, 1, 0]]  # BGR转RGB
```

这里踩过坑:DXGI默认输出BGRA格式,直接扔给YOLO会识别异常。另外注意,多显示器环境下要指定显示器索引,不然可能抓到副屏。

## 三、图像增强:不是所有增强都有用

拿到原始帧只是开始。游戏画面通常有几种“脏数据”:
1. 动态模糊(快速转身时)
2. 粒子特效遮挡
3. 界面UI覆盖(血条、技能栏)
4. 低光照场景(地下城环境)

我试过一堆增强方法,最后发现下面这个组合最实用:

```python
def preprocess_frame(frame):
    # 1. 降噪:中值滤波比高斯滤波更适合游戏画面
    # 别用太大的kernel,3x3足够,大了细节就没了
    denoised = cv2.medianBlur(frame, 3)
    
    # 2. 对比度增强:CLAHE比直方图均衡化更自然
    # 特别是暗黑类游戏,阴影细节很重要
&n

Pandas入门教程(二十二):股票数据分析实战——yfinance 获取数据、技术指标与收益率分析 把 Pandas 用在真实场景,才能体会它的价值。本文以茅台股票为例,用 yfinance 获取历史行情,完成缺失值处理与列筛选,绘制收盘价曲线,计算 SMA 移动平均线与 RSI 相对强弱指数,并通过日收益率、累计收益率和波动率完成完整的量化分析流程。 阅读详情

相关推荐

Python实现游戏图像识别与处理

在实际应用中,需要根据具体的需求选择合适的图像处理和识别算法,并对算法进行优化以提高算法的效率和准确率。要对游戏进行图像识别和处理,首先需要采集游戏中需要处理的图像。(2)SURF算法:SURF(Speeded Up Robust Features)算法是一种对SIFT算法的改进,它在计算局部特征的过程中使用了更快的方法,从而提高了算法的效率。(2)KNN算法:K近邻算法是一种基于距离度量的分类算法,它的基本思路是寻找与待分类样本距离最近的K个近邻,然后将这些近邻的类别使用投票的方式进行分类。

吃不胖. 1793

2025年有道翻译网页版JS逆向实战:从抓包到AES解密,手把手教你搞定sign签名

本文详细解析2025年有道翻译网页版的JS逆向实战,从抓包分析到AES解密全流程。通过实战演示签名生成机制和AES-CBC解密技术,帮助开发者破解有道翻译的反爬系统,实现高效数据获取。重点涵盖动态密钥处理、错误重试机制及反反爬策略,为开发者提供完整的技术解决方案。

weixin_30379531的博客 505

DMTF相关协议(一):Redfish和SMBIOS

Redfish 是一种管理标准,使用超媒体 RESTful 接口中的数据模型表示。该模型以标准的、机器可读的模式表示,消息的有效负载以 JSON 表示。该协议本身利用了 OData v4。由于它是一个超媒体 API,因此能够通过一致的接口表示各种实现。它具有管理数据中心资源、处理事件、长时间任务和发现的机制。

weixin_44032634的博客 2263

PCIe学习笔记(一)-------1.3 PCIe数据包(TLP,DLLP,PLP)

1,PCIe的层次结构 PICe设备在硬件电路上可以分为三个层次结构:事务层(Transaction Layer)、数据链路层(Data Link Layer)、物理层(Physical)。每一个层次又可以分为两个部分,分别为处理发送和处理接收的部分。 也可以分为四个层次,将事务层以上的层次称为软件层(Software Layer)。 2,PCIe数据包 前面已经说过PCIe之间是以数据包的形式来传输数据的,协议共定义了3类数据包。与处理层相关的是处理层数据包(TLP),与数据链路层相关的是数据

llxxyy507的博客 2万+

开源 AHB不对称半桥反激电路设计(六)死区时间,谐振腔电流,谐振电感函数表达式

电流跌落可以使副边电流峰值和有效值降低,减小损耗,但如果开关管 S2 导通期间,谐振电流谐等于励磁电流,即副边电流A 点降至 0,会在原边变压器内形成环流,产生损耗,同时也不利于副边同步整流管驱动的正常工作,为了保证开关管 S2 导通期。在开关管 S1 和开关管 S2 均关断的死区时间内,谐振电流给原边开关管结电容和副边整流管结电容充放电,因此会引起开关 S1 关断瞬间电流跌落与开关 S2 关断瞬间电流震荡现象,受寄生参数影响原边谐振电流波形和副边电流波形如图。降到最低,变压器以最高效率向副边传递能量。

【Simon】的博客 1227

解决UE5像素流三大痛点:鼠标锁定/双光标/自动播放(附app.js魔改指南)

本文针对UE5像素流服务在实际应用中常见的鼠标锁定、双光标和自动播放三大交互痛点,提供了深入的技术分析和解决方案。通过详细解析app.js源码,指导开发者如何修改控制方案、修复光标显示以及实现静音自动播放,旨在提升Pixel Streaming应用的用户体验与专业度。

weixin_28025327的博客 381

红外通信不止遥控器:手把手教你用2ASK调制实现语音+温度数据同传

本文详细介绍了如何利用2ASK调制技术实现红外通信系统,同时传输语音和温度数据。通过STM32F103C8T6微控制器和DS18B20温度传感器的硬件设计,结合2ASK调制原理,展示了系统的完整实现方案。文章还提供了调试优化建议,适合电子爱好者和通信工程学生实践学习。

weixin_42531588的博客 388

电容式麦克风:从原理到实际电路波形解析

本文深入解析电容式麦克风的工作原理,从核心的振膜与背板结构、电荷锁定机制到场效应管放大器的作用。通过实物拆解与等效电路分析,阐明声音振动如何转换为电压信号,并指导如何用示波器实测波形,直观展现声电转换过程,适合电子爱好者和音频技术学习者。

Black的专栏 1079

T型三电平逆变器中点电位平衡详解

T型三电平逆变器(T-type Three-Level Inverter)是一种高效的多电平拓扑,相比传统NPC(Neutral Point Clamped)三电平逆变器,具有更低的开关损耗、更高效率和更简单的结构,尤其适用于中功率应用(如光伏逆变器、风电变换器和工业驱动)。(T-type Three-Level Inverter)中的应用已成为当前中高压功率变换领域(如光伏逆变器、储能PCS、电动汽车充电桩、风电并网和工业驱动)的热门方案。针对 T型逆变器,类似 NPC 的零序注入法适用。

专注于前沿技术的探索与实践,热衷于从代码逻辑、架构设计到行业应用等多维度深挖技术本质。期待在技术之路上与你共同成长~ 544

SIMATIC S7-1200, S7-1500 PID 控制[手册]

SIMATIC S7-1200, S7-1500 PID 控制[手册]

计算机控制技术及应用

《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

上一篇: # 001、环境搭建与YOLO初探:Python环境、OpenCV与YOLOv8部署
下一篇: # 003、YOLO模型训练与优化:自定义数据集制作、模型微调与性能评估
sql070
博客等级 码龄6年 1粉丝 24原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

sql070

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值