Comments (7)
模板图片没读取出来
from wechat_jump_jump.
@moneyDboat 这个问题是我没把模板图片拷到play.py同级目录下,解决了。
但是现在问题是每次程序执行就跳一下,接着就game over ?
from wechat_jump_jump.
循环直到游戏失败结束
for i in range(10000):
get_screenshot(0)
img_rgb = cv2.imread('%s.png' % 0, 0)
最后一句什么意思?没看懂
from wechat_jump_jump.
cv2.imread()就是opencv加载图片的函数
from wechat_jump_jump.
你这个还是截屏没有获取到,我也出现过这个问题。这个程序是把截屏保存到手机SD卡然后传到电脑,如果手机没有SD卡就会这样。你可以直接把截屏保存到电脑,即把get_screenshot函数改成这样:
os.system('adb shell screencap -p | sed 's/\r$//'>%s.png'%str(id))
from wechat_jump_jump.
@ShiningRuby 代码能解释一下吗?
from wechat_jump_jump.
就是用adb获取截屏保存到某个路径,命名为%s.png ,保存时这里的%s用字符串id代替
from wechat_jump_jump.
Related Issues (13)
- adb命令的一个问题 HOT 3
- 边缘检测不准,是否考虑预先清除背景色来提高边缘准确度? HOT 1
- 为什么要画圆? HOT 2
- 关于get_control HOT 2
- 目标落子像素估计 HOT 2
- window下pycharm中安装opencv-python后无法使用 HOT 4
- “使用边缘检测匹配物块上沿”时计算错误 HOT 3
- 进去就闪屏,然后显示game over!怎么回事? HOT 1
- win10+iphone6s可以玩吗 HOT 1
- 相关库安装 HOT 3
- adb issue HOT 2
- 参数设置 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wechat_jump_jump.