background preloader

Raspberry Pi + OpenCV

Raspberry Pi + OpenCV
OpenCV is a suite of powerful computer vision tools. Here is a quick overview of how I installed OpenCV on my Raspberry Pi with debian6-19-04-2012. The guide is based on the official OpenCV Installation Guide on Debian and Ubuntu. Before you begin, make sure you have expanded your SD card to allow for the install of OpenCV. sudo apt-get -y install build-essential cmake cmake-qt-gui pkg-config libpng12-0 libpng12-dev libpng++-dev libpng3 libpnglite-dev zlib1g-dbg zlib1g zlib1g-dev pngtools libtiff4-dev libtiff4 libtiffxx0c2 libtiff-tools sudo apt-get -y install libjpeg8 libjpeg8-dev libjpeg8-dbg libjpeg-progs ffmpeg libavcodec-dev libavcodec53 libavformat53 libavformat-dev libgstreamer0.10-0-dbg libgstreamer0.10-0 libgstreamer0.10-dev libxine1-ffmpeg libxine-dev libxine1-bin libunicap2 libunicap2-dev libdc1394-22-dev libdc1394-22 libdc1394-utils swig libv4l-0 libv4l-dev python-numpy libpython2.6 python-dev python2.6-dev libgtk2.0-dev pkg-config cmake-gui .. makesudo make install python .

Webcam streaming with Raspberry Pi Details Details Last Updated on Wednesday, 06 March 2013 21:16 Here is a set of instructions for the installation and configuration of a Raspberry Pi to provide streaming video from a webcam. I set this up in preparation for my Nestcam project which hopefully appears on these pages in the following months. To capture video and snapshots from a webcam and stream them through a webserver I use Motion: "Motion is a program that monitors the video signal from cameras. [video4linux2 @ 0x8cb6c0] The v4l2 frame is 8316 bytes, but 153600 bytes are expected Motion can be setup in such a way that it only captures images and/or video when something moves in the camera's field of vision. To watch the stream in other browsers than Firefox you'll need to install a Java applet. Update below. Chrome (Windows) will display the first image, when using the IFRAME method, but it won't reload the stream. IE 9 can't deal with either method, apparently. disable unused services (e.g.

Using a webcam with the Raspberry Pi This is a detailed post on how to get your fridge to autonomously order fruit for you when you are low. An RPi takes a picture every day and detects if you have fruit or not using my Caffe web query code. If your fridge is low on fruit, it orders fruit using Instacart, which is then delivered to your house. Some of my posts are things I end up using every day and some are proof of concepts that I think are interesting. Hacking up an Instacart API The first thing we need is a service that picks out food and delivers it to you. Head over to instacart.com and set up an account and login. That string is what you need to access your instacart account. curl You should get back a response that looks like this: Now we just need to figure out what different items are. Now empty your cart and we will make sure we can add all those things to your cart with a curl request. Now, your cart should be full of fruit again. Places you can find me

Install OpenCV 2.3 with video support in Fedora 15 « Pratyush’s Weblog Much has changed since OpenCV 2.0.. android support, CUDA support, etc are up and running. So is the change in the method of installing OpenCV. So, i though to quickly jot down the steps to follow for a painless install. I must add, due to changes in gcc, removal of libv4l support from linux kernel, etc.. OpenCV 2.1 and 2.2 give loads of issues during install. 1. (i have tried copying the package names via OCR software and some editing as much as could be possible from the screenshot below) 2. And you are done !!! NOTE : due to requests for Ubuntu specific steps, i’ll put the changed steps in this post itself in a few days

Autonomous car | Jeff's Inventions I recently gave a talk at embedded systems night at a Chicago hackerspace called Pumping Station One (www.pumpingstationone.org). In it, I explained why I chose to go with embedded vision for obstacle avoidance in my autonomous car and discussed options for overcoming the performance issues with embedded systems. Continue reading In the DARPA grand challenge, full-size, un-manned vehicles were tasked with following a route in the desert described by GPS coordinates ( I thought it would be interesting to do the same thing, but with a radio-controlled car (in my case, a Traxxas Slash 5803). Here is the current version of the car: To make the car autonomous, I needed to have the PLC: Resources As part of my autonomous car project ( To take control of the car’s steering and acceleration, I needed to understand the signals currently used to control the car and figure out how to emulate them with a micro-controller.

OpenCV Fedora 15 Compile OpenCV-2.2.0 From Source Herman Oosthuysen, GPL, 2011 Fedora Linux 15 Scope This is a brief guide to compiling OpenCV on Fedora 15, since the package included with Fedora does not work with video, which makes it rather useless. The biggest problem is finding a combination of software versions that work together and then a few small bugs need to be fixed which arose due to changes in the Linux kernel video drivers. Read my other guides on X264 and FFmpeg and compile them first. Download It is important to use the correct old version of FFmpeg-0.6.3. Go to Source Forge and download the older version 2.2.0 of OpenCV: Unpack it: $ tar -jxvf OpenCV-2.2.0.tar.bz2 $ cd OpenCV-2.2.0 $ mkdir release $ cd release Configure In my case, ccmake didn’t crash, but it also didn’t work. Build and Bug Fixes Build OpenCV: $ make Bug fix for error: ‘ptrdiff_t’ does not name a type $ gedit .. Install La voila!

gpio - How can I control Lego motors? - Raspberry Pi Beta - Stack Exchange The standard Lego Mindstorms sensors are analogue (i.e. a voltage between 0-5?V), or digital (I²C or RS-485) (source). Analogue sensors: I don't think the Raspberry Pi has a broken out pin in the GPIO for an ADC (analogue to digital converter), so we can't interface with analogue sensors (without an extra microcontroller). Digital sensors: The Raspberry Pi does have two pins in the GPIO for I²C, which means that if you connect GND, +V, SDA and SCL to your sensors, you should be able to use an I²C library to talk to them. raspberrypi bootc # echo tmp102 0x48 > /sys/class/i2c-adapter/i2c-0/new_device raspberrypi bootc # sensors tmp102-i2c-0-48 Adapter: bcm2708_i2c.0 temp1: +21.6°C (high = +160.0°C, hyst = +150.0°C) Examples: There are a few articles on how to connect sensors and motors on this page, such as connecting a Mindstorm brick controller to an external microcontroller:

How to install FFmpeg & OpenCV under Fedora Linux - Wireless Video Sensor If you have FFmpeg already installed and is working fine together with ffplay, you can skip the FFmpeg Step.If you don't trust your current FFmpeg or OpenCV unstall them this way: A--- cd "The original folder you installed them from" e.g. for OpenCV cd OpenCV-2.1.0 or cd ffmpeg-0.5.1 B--- make uninstallC--- make clean allD--- cd ..E--- rm -rf OpenCV-2.1.0 or rm -rf ffmpeg-0.5.1 FFmpeg step: 1--- Download FFMpeg 2--- su 3--- tar xzf ffmpeg-0.5.1.tar.gz 4--- cd ffmpeg-0.5.1 5--- . 6--- make all 7--- make install all The –-enable-shared option during configuration ensures compatibility between LGPL licence of ffmpeg contents and BSD licence of OpenCV. ADDITIONAL IMPORTANT STEPS (before installing OpenCV)A few header files of ffmpeg may need to have a symbolic link created. Open the folder where library files of ffmpeg have got installed in your system. ln -s libavcodec/avcodec.h avcodec.h ln -s libavformat/avformat.h avformat.h ln -s libavformat/avio.h avio.h ln -s libavutil/avutil.h avutil.h 5--- .

Streaming Your Webcam w/ Raspberry Pi | Wolf Paulus [Last updated on Feb. 2. 2013 for (2012-12-16-wheezy-raspbian) Kernel Version 3.2.27+] Three years ago, we bought two small Webcams and since we wanted to use them on Linux and OS X, we went with the UVC and Mac compatible Creative LIVE! CAM Video IM Ultra. This Webcam (Model VF0415) has a high-resolution sensor that lets you take 5.0-megapixel pictures and record videos at up to 1.3-megapixel; supported resolutions include 640×480, 1290×720, and 1280×960. If you like, you can go back and read what I was thinking about the IM Ultra, back in 2009. With the USB Camera attached to the Raspi, lsusb returns something like this: Using the current Raspbian “wheezy” distribution (Kernel 3.2.27+), one can find the following related packages, ready for deployment: luvcview, a camera viewer for UVC based webcams, which includes an mjpeg decoder and is able to save the video stream as an AVI file.uvccapture, which can capture an image (JPEG) from a USB webcam at a specified interval MJPG-streamer

Install OpenCV in Linux with video (ffmpeg) support « Pratyush’s Weblog Faced with the task of running Computer Vision problems in Linux environment, i started googling for the methods.. Though i found the install steps at many places, but my install always failed, getting stuck while doing a make operation on the source files. Finally, i managed to install it from source.. I am listing the steps here, with a special thanks to all the people, their blogs and google for helping me succeed in installing OpenCV. Download ffmpegExtract contents to a folder. do a cd to the folder location in the terminal. su -c. The –enable-shared option during configuration ensures compatibility between LGPL licence of ffmpeg contents and BSD licence of OpenCV.ADDITIONAL IMPORTANT STEPS (before installing OpenCV)goto the folder where library files of ffmpeg have got installed in your system. you can do a “locate ffmpeg” to know that. for e.g, in my case, its /usr/include/ffmpeg/Now, type in the follwing (as root): Extract and build OpenCV as follows : . makemake install Like this:

List items Inspired by the amazing things the Boreatton Scouts group are doing with their Raspberry Pis, as well as a conversation with David Lamb and Andrew Attwood – two colleagues of mine at LJMU – I thought it was about time I actually tried to use my Pi for something other than recompiling existing software. I'm not a hardware person. Not at all. But I do have a Lego Mindstorms NXT robot which has always had far more potential than I've ever had the energy to extract from it. But after reading about how it's possible to control the NXT brick with Python using nxt-python, and with David pointing out how manifestly great it would be to get the first year undergraduates learning programming using it, I couldn't resist giving it a go. It turned out to be surprisingly easy. I'm not exactly sure why I bought such a huge lead given I knew it would all end up on top of the robot, but that's planning for you! The result really is as crazy and great as I'd hoped.

installation d'opencv linux ben je tente un article pour aider ceux qui aurait des problemes avec l'utilisation d'opencv sous linux. le fichier brouillons .odt fait 3 pages Que ce que opencv désole mais la question à déjà sa réponse sur un autre tuto du forum. Pourquoi cet article En apprenant à utiliser opencv j' ai souvent rencontré des erreurs non compilation. Comment lire ce document Ce document n'est pas prêt d'être complet car il sera écrit au fur et à mesure que je trouverai des solutions à de nouveau problèmes. Installation automatique: Il est possible d'installer opencv depuis la plus part des distributions respective en utilisant l'installateur par défaut. Code : a l'heure ou est écrit cet article, une telle installation aboutirait a l'installation de opencv-1.0. Installation Manuelle: Préférer ce type d'installation qui est indépendant de la distribution choisis. Installation 1: allez dans le repertoire ou a ete dearchive opencv: vous n'êtes pas obligé de respecter mes répertoires d'installation. .

ROS on RaspberryPi - JR 8-Mar-2014 - ROS Hydro with rosserial_arduino This install is based almost exactly on this ROS wiki page (~ Nov 2013) by JonStephan, with only a few details changed. This install starts with the Raspberry Pi Foundation NOOBS v1.3.4 zip file I downloaded 7 March 2014. Select the Raspian OS for installation. Shortcut! Building this installation from source took a good fraction of my weekend, but it doesn't have to take your weekend. I have made a gzipped copy (as described here) of the 16GB SD card I used for this exercise up through the Arduino test. sha1sum is 3fce7acb04f002fc93d88edeafa2d2d87b65de7a This image does not automatically source the ROS setup script from .bashrc, so if you want this feature, do echo "source ~/ros_catkin_ws/install_isolated/setup.bash" >> .bashrc source .bashrc That's the shortcut; here's the long way. Install dependencies sudo apt-get install python-rosdep python-rosinstall-generator build-essential ROS Hydro install wstool rm roslisp rm -rf roslisp Rosserial install

Setting everything up for OpenCV – Raspberry Pi | D's Lab Log Setting OpenCV up on the Raspberry Pi took me two attempts and about 20 hours. I’m writing this guide so others don’t have to go through all the problems. I will mainly use OpenCV with Python; I haven’t tested it with C/C++. You will need: A Raspberry PiA 3gb or more SD Card with the Raspbian imageA working Internet connectionA way to see Rapsi’s desktop environment (for testing)Patience Optional: Attempt #1 – Following other guides Googling about OpenCV and Raspberry Pi leads to a few guides how to set it up (this and this). First of all, you need to install all dependencies. And that’s about it from the other guides that we can use. Attempt #2 – Figuring it out by myself So.. what now? wget It’s quite heavy; it will take some time to download. tar -xvjpf download (or whatever name it has on your machine) We go inside the new directory that we got with unpacking, and make a new one within it.

Through the Interface: Creating a motion-detecting security cam with a Raspberry Pi Part 1 As mentioned in these previous posts, I’ve been spending some time developing a social media-enabled security cam using a Raspberry Pi and a standard webcam. The eventual idea is that the security cam will check visitors against a database of photos of a homeowners’ friends extracted from Facebook. I have a lot of the needed “social” components in place – more on those in a future post – but I did just want to document some of the steps needed to create a functional security cam that simply uploads captured videos to Google Drive and sends an email with both a link to the video and an attached image frame (to make quick identification of the visitor easier, especially when reading the email on a mobile device). Most of the components needed for this were in place – and have been used to good effect in several other comparable projects out there – but I thought I’d just gather some key links in one place (some of which are repeated from last time): ll it when running in daemon mode.

Related: