Giter Club home page Giter Club logo

vision-2021's Introduction

Scorpions Robotics #7672

FRC Infinite Recharge Vision Processing

GitHub PyPI - Python Version Code Style: Black OpenCV

CodeFactor Language grade: Python Codacy Badge CodeQL  wakatime

Runs on:

NVIDIA Jetson Nano 4Gb

How do we process the vision?

We use the Open Source Computer Vision Library OpenCV with Cascade Classifier features to detect and track the target.

Details:

  1. Detect the host computer's OS, hostname and IP address.

  2. Initialize NetworkTables client and stream server, then connect to the "vision" table.

  3. Define the camera according to the OS and parameters.

  4. Define the cascade classifier path. (The classifier we used is trained to detect FRC Power Ports, and can be downloaded from here)

  5. while True:

    • Read the image from the camera.
    • Detect the target using the cascade_classifier.detectMultiScale() method.
    • If the target is detected, draw a rectangle around it.
    • Display the image.
    • Send the target's position to the NetworkTables.
    • Wait for the next frame.

 

Compatible Operating Systems:

  • Windows   Windows 7 or newer

  • macOS   macOS 10.6 or newer

  • Linux   Most linux distros

 

Installation:

  1. Clone the repository. git clone https://github.com/Scorpions-Robotics/vision-2021.git

  2. Install the required dependencies. pip install --upgrade -r requirements.txt

  3. On Linux you have to install extra dependencies.

    • cd misc/bash/
    • chmod +x *
    • ./install_os_dependencies.sh

 

Usage:

  1. Copy settings.ini.template and rename it to settings.ini. Then edit it to your needs.

  2. Run the vision.py file to start the vision processing.

 

Important Note:

  • Always make sure to run the file from the root directory of the project.

  • Always keep the dependencies up to date.

  • Always use the latest stable version of this project.

 

Our Social Media Accounts and Discord Server

Instagram YouTube Discord

 

Contact

 

Contributing:

  1. If you have any suggestions, or found any bugs, please open an issue or create a pull request.

  2. Don't hesitate to open an issue if you have any questions about the code.

 

Authors

 

License

This project is licensed under the Apache-2.0 license. All rights reserved.

vision-2021's People

Contributors

ardasak avatar egeakman avatar renovate-bot avatar

Stargazers

 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.