This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################### | |
# File: lightweight_camera_motion.py | |
# Description: Connect to an MJPG stream and compute the | |
# general direction of motion. | |
# The script first crops and downsamples the | |
# JPEG frames using the JPEGtran library, | |
# to allow processing in low power platforms | |
# like the Raspberry Pi. | |
# | |
# Author: Carlos Garcia-Saura (@CarlosGS) - 2018 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fast reading from the raspberry camera with Python, Numpy, and OpenCV | |
# Allows to process grayscale video up to 124 FPS (tested in Raspberry Zero Wifi with V2.1 camera) | |
# | |
# Made by @CarlosGS in May 2017 | |
# Club de Robotica - Universidad Autonoma de Madrid | |
# http://crm.ii.uam.es/ | |
# License: Public Domain, attribution appreciated | |
import cv2 | |
import numpy as np |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# Generates and sets a random background representing a simulated Levy flight (https://en.wikipedia.org/wiki/Levy_flight) | |
# of 5 robots (starting at the center of the display) | |
# You can add the following lines to .bashrc so the wallpaper is updated everytime a terminal is opened | |
# python /home/carlosgs/wallpaper/generate_background.py & # Refresh the wallpaper in a background process | |
# BG_WP_PID=$! | |
# disown $BG_WP_PID # Hide stdout output from the previous command |