matanabc / FRC-OpenCV-Android-Vision

FRC vision application on android device using openCV-android-sdk and camera2 API (openCV JavaCamera2View)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FRC-OpenCV-Android-Vision

FRC vision application on android device using openCV and camera2 API (openCV JavaCamera2View)

General

  • This app trying to change camera exposure to low (image will be dark), it may not work in your device. camera sittings can be found in here
  • Need to give camera permissions for the app to work
  • If you changing openCV version add all the folders in sdk\native\libs from your new openCV version to jniLibs folder
  • Tested on samsung galaxy A5 2017, you can see here the performance when running it in 30FPS and 320X240

View should look like for FRC teams after configuration

App view you can also see here 2020 field target images

Draws on screen

  • phone battery level
  • FPS
  • Don't have connection (no one is reading vision data)
  • Counters, Target and target error

Servers

The servers will send value and responds only when the app is open and running on your phone!

  • MjpgServer stream final mat (app view) to port 5800 in 15 FPS
  • VisionConstantServer get request to change vision values to port 5801, to view web vision value config send a request from your browser to <Phone-IP>:5801 (you can see images of web vision config here)
  • VisionDataServer send string with vision data (isTargetValid;x;y => true;-0.711;-0.417) to port 5802 (you can use client.py to read vision data value but change the host)

Contact

If you have any question you can send me email: matanabc@gamil.com

About

FRC vision application on android device using openCV-android-sdk and camera2 API (openCV JavaCamera2View)


Languages

Language:Java 99.4%Language:HTML 0.5%Language:Python 0.1%