Giter VIP home page Giter VIP logo

wechat_zhaocha_game's Introduction

wechat_zhaocha_game

python 微信小程序 《大家来找茬腾讯版》 辅助

找茬游戏分为两种模式:一种是闯关模式,一种是对战模式。通过辅助脚本可以清晰显示两幅图片的不同之处。

Image1

致敬wechat_jump_game

受到wechat_jump_game启发,简单制作了一个找茬辅助工具,在这里感谢此项目,部分代码来自该项目。

原理说明

  1. 进入《大家来找茬》界面
  2. 使用ADB工具获取当前手机截图,并用ADB将截图pull上来
adb shell screencap -p /sdcard/autojump.png
adb pull /sdcard/autojump.png .
  1. 寻找两幅图片的差异
im, region_1, region_2 = read_image()
output = region_1 - region_2
img2gray = cv2.cvtColor(output, cv2.COLOR_BGR2GRAY)
eq = cv2.equalizeHist(img2gray)  # 灰度图像直方图均衡化
im_color = cv2.applyColorMap(eq, cv2.COLORMAP_JET)
  1. 用ADB工具点击屏幕,圈出差异位置
adb shell input swipe x y x y time(ms)

使用教程

  1. 下载ADB,要保证可以调用adb命令
  2. 模式选择:如果是挑战模式,则设置Challenge_Mode = True;如果是闯关模式,则设置Challenge_Mode = False
  3. 运行ZhaoCha_v1.0.py
  4. 注意:单击鼠标左键则选定标定位置,单击鼠标右键刷新图片
  5. 程序运行会显示如下图像,然后左键单击颜色高亮的位置,即可完成标注。该图片完成之后,用单击鼠标右键刷新图像

Image2

其他示例:

输入图像:

Image3

输出图像:

第一幅为直方图均衡化之后的伪彩色图像,第二幅为二值分割后的结果,第三幅图为截取的原图。

Image4

实际操作界面:

Image5

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.