Skip to content

Repository files navigation

Windows-RPI-Vision-Framework

This project was created to aid remote vision development on processors such as the Raspberry PI or the Odroid. The system works by using threading to simultaneously process and send an image to a mjpeg http stream over the Internet. On one's computer, a GUI will grab an image based on the encoded url and display the image in a Tkinter Python GUI.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Installing Dependencies

  1. OpenCV on Deployed System (Raspberry PI)
The command is: make
Not: make-j4
  1. OpenCV on Computer
  • As I am a Python 3 advocate, you will need to install OpenCV3 on your desktop. Not sure about MAC Users, but for Ubuntu and Windows users you need to download the wheel file from this link: http://www.lfd.uci.edu/~gohlke/pythonlibs/. Control-F on the webpage for the OpenCV package and download the right version based on the bit number for PYTHON not Windows. IF you have 32 bit python on 64 bit windows, still download the 32 bit version. You can get the contrib version if you want, I think I have that, but it shouldn't matter for this application. Once downloaded, open Command Prompt from wherever you have stored your wheel (probably in downloads) and type in:
pip install opencv_python_........ <--- Thats the rest of your wheel
  1. Download Numpy
  • On the RPI, you will want to go into the virtual environment you created in Step 1 by typing:
source ~/.profile
workon cv

Then typing:

sudo pip install numpy
  1. Download Putty on Control computer

How to Use

Once all dependencies are installed, plug a webcam into the raspberry pi. Then type into the raspberry pi terminal: hostname -I. Copy down this address then run the visionServer.py. On your viewing computer, open imageGrabTkinter.py and replace the ip string with the one you copied from the raspberry pi. Run this program and when you click start stream a live video feed of the raspberry pi should pop up. If you would to do things like blurring or canny-edge detection this can be easily modified by going into the visionServer.py file on the rpi and manipulating the image with opencv before the declaration frame = img. Samples of more complex image operations are found in Combined with visionServer2.py and its guibrother, imageGrabTkinterUDP.py in the gui folder. These two commence complex image operations and even operate on two cameras.

For two Camera operation a UDP button the gui was created which when clicked will switch webcam feeds in visionServer2.py.

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

  • Project was inspired by vision processing in the First Robotics Competition, but has promising applications for general computer vision testing.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages