GithubHelp home page GithubHelp logo

Comments (7)

moneyDboat avatar moneyDboat commented on July 19, 2024

模板图片没读取出来

from wechat_jump_jump.

PEPSIYANG avatar PEPSIYANG commented on July 19, 2024

@moneyDboat 这个问题是我没把模板图片拷到play.py同级目录下,解决了。
但是现在问题是每次程序执行就跳一下,接着就game over ?

from wechat_jump_jump.

PEPSIYANG avatar PEPSIYANG commented on July 19, 2024

@moneyDboat

循环直到游戏失败结束

for i in range(10000):
get_screenshot(0)
img_rgb = cv2.imread('%s.png' % 0, 0)
最后一句什么意思?没看懂

from wechat_jump_jump.

moneyDboat avatar moneyDboat commented on July 19, 2024

cv2.imread()就是opencv加载图片的函数

from wechat_jump_jump.

ShiningRuby avatar ShiningRuby commented on July 19, 2024

你这个还是截屏没有获取到,我也出现过这个问题。这个程序是把截屏保存到手机SD卡然后传到电脑,如果手机没有SD卡就会这样。你可以直接把截屏保存到电脑,即把get_screenshot函数改成这样:
os.system('adb shell screencap -p | sed 's/\r$//'>%s.png'%str(id))

from wechat_jump_jump.

PEPSIYANG avatar PEPSIYANG commented on July 19, 2024

@ShiningRuby 代码能解释一下吗?
image

from wechat_jump_jump.

ShiningRuby avatar ShiningRuby commented on July 19, 2024

就是用adb获取截屏保存到某个路径,命名为%s.png ,保存时这里的%s用字符串id代替

from wechat_jump_jump.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.