GithubHelp home page GithubHelp logo

glennxu3536 / robomasters_suduku Goto Github PK

View Code? Open in Web Editor NEW

This project forked from obitolee/robomasters_suduku

0.0 1.0 0.0 57.71 MB

open source of Suduku Recognition by CUMT

CMake 3.42% Shell 0.23% C++ 96.35%

robomasters_suduku's Introduction

九宫格任务:比赛规则中大神符系统,只有在九宫格前连续击中5次九个图案中不同的那一个,才能激活buff,获得有利条件。

下面是ubuntu 下的运行过程(windows下利用cmake的GUI生成vs的工程)

编译:

mkdir build
cd build
cmake ..
make

运行:

在/bin目录下执行(调用摄像头或测试视频):

./main 0
./main test1.avi

九宫格程序流程:

  • 1.识别出九宫格(九个矩形轮廓)。对视频预处理后,拟合轮廓。在识别出矩形轮廓的前提下,筛选出符合条件的矩形,在筛选的过程中修正可以参考前一帧的值修正当前帧的错误值;当检测出九个符合条件的矩形后,对九个矩形轮廓按冒泡法进行排序,至此识别九宫格(九个矩形轮廓)的部分完成。
  • 2.识别出击打的目标。对九个已经排序好的九宫格进行击打目标的识别,采用图案包含像素点的多少作为判别的依据。找出像素点数量不同于其他图案的格子。当设定次数内,该图案的像素点数量都不同于其他的图案时,确定该图案就是要找的目标。
  • 3.返回击打目标的位置。在第2步中,当连续在设定的次数内检测结果都为同一值时,向串口发送信号。

有待改善:

目前仅向下位机发送序号,具体哪个序号打击那个点需要在比赛时临时标定,可能只需要一两秒,但这一两秒也许是制胜关键,可以改成下位机只点击一个键就能根据上位机发送的数据自动完成射击

robomasters_suduku's People

Contributors

obitolee avatar

Watchers

 avatar

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.