Image Processing on the Pi using openFrameworks. Setup Before beginning: – Install openFrameworks per these instructionsinstructions Run dependency scripts.

Slides:



Advertisements
Similar presentations
MINECRAFT MOD PROGRAMMING Part III of Minecraft: Pi Edition October 31, 2015.
Advertisements

Lecture 3 Getting Started with ITK!. Goals for this lecture Learn how to use Cmake Build ITK Example programs that use ITK.
Programming with Android: SDK install and initial setup Luca Bedogni Marco Di Felice Dipartimento di Informatica: Scienza e Ingegneria Università di Bologna.
Implementation of an Android Phone Based Video Streamer 2010 IEEE/ACM International Conference on Green Computing and Communications 2010 IEEE/ACM International.
CROSS PLATFORM DEVELOPMENT WITH MVVM CROSS By Ken Tucker.
David Notkin Autumn 2009 CSE303 Lecture 22 Subversion is an open source version control system. Social Implications Friday version control system.
Wireless Ad Hoc and Sensor Networks Lab1. 2 Objective Comprehend how to setup and use the wireless communication devices, Jennic Evaluation System. You.
CS0007: Introduction to Computer Programming Setting Up Java.
© 2010 IBM Corporation IBM Experience Modeler - Theme Editor Installing Python Image Library Presenter’s Name - Presenter’s Title DD Month Year.
INDEX ∞ Image Processing ∞ OpenCV ∞ Download & Setup ∞ Make Project ∞ Show Result ∞ Q & A Setup OpenCV & Tutorial.
Will Smythe Senior Program Manager Developing Java projects on Visual Studio Online with Team Explorer Everywhere.
UFCFX5-15-3Mobile Device Development UFCFX Mobile Device Development An Introduction to the Module.
CprE 288 – Quick intro for compiling C in Linux
Moving & Copying Web Applications 1. 2 Why Do We Need to Copy or Move a Web Application?  So you can run someone else’s sample code.  So you can backup.
Introduction to Mobile Programming. Slide 2 Overview Fundamentally, it all works the same way You get the SDK for the device (Droid, Windows, Apple) You.
Java Mobile Apps with GWT & PhoneGap Josh Marinacci, webOS Developer Advocate.
Android. The Eclipse IDE Installation Requirements: Eclipse Java Windows All must match (32-bit OR 64-bit) If you have a 64-bit OS & 32-bit browser,
Ali Shahrokni Application Components Activities Services Content providers Broadcast receivers.
IT 211 Project Integration and Deployment Lab #11.
WaveMaker Visual AJAX Studio 4.0 Training Installation.
C O M P U T E R G R A P H I C S Jie chen Computer graphic -- OpenGL Howto.
ABAQUS Installation on LINUX Platform D. Hanumanthappa, A. Jérusalem May 5th, 2010.
Presented By: Muhammad Tariq Software Engineer Android Training course.
CIS 90 - Lesson 15 Lesson Module Status Slides – Properties - Flash cards – No-stress quiz – Web calendar summary – Web book pages – Commands – Lab – done.
Introduction to Processing CS 4390/5390 Fall 2014 Shirley Moore, Instructor September 3,
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Introduction to Android (Part.
Android Development Environment Environment/tools Windows Eclipse IDE for Java Developers (v3.5 Galileo) Java Platform (JDK 6 Update 18) Android.
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS Jan Control System Studio Training - Development Setup.
Social Media Apps Programming Min-Yuh Day, Ph.D. Assistant Professor Department of Information Management Tamkang University
HOW TO INSTALL & USE OPENCV. I - CHOOSE YOUR FAVORITE IDE Microsoft Visual Studio Express 2013 for Window Desktop (Free) can be downloaded from
1 Getting Started with C++. 2 Objective You will be able to create, compile, and run a very simple C++ program on Windows, using Visual Studio 2008.
Paris package: practical aspects Installation / presentation To run a simulation Analysis To add a new module to Paris Installation / presentation To run.
Managed by UT-Battelle for the Department of Energy Kay Kasemir, Xihui Chen ORNL/SNS April Control System Studio Training - Development.
Computer Science I Programming in Java (programming using Processing IN Java, using IntelliJ IDE) Classwork/Homework: copy your Processing projects over.
Intro to Raspberry Pi A Southwest Florida Hackerspace Workshop Presented by: Russell Benzing & Eric Schiffli.
1 Getting Started with C++ Part 1 Windows. 2 Objective You will be able to create, compile, and run a very simple C++ program on Windows, using Microsoft.
Exploring Spyder: An IDE for scientific computing
Open the index.html Open this PowerPoint from the S Drive IDT folder Chapman Images.ppt.
® IBM Software Group © 2006 IBM Corporation Rational Asset Manager v7.2 Using Scripting Tutorial for using command line and scripting using Ant Tasks Carlos.
Learn R Toolkit D Kelly O'DayInstall & SetupMod 1 - Setup: 1 Module 1 Installing & Setting Up R Do See & HearRead Learn PowerPoint must be in View Show.
Intoduction to Andriod studio Environment With a hello world program.
1 CSE 303 Lecture 19 Version control and Subversion ( svn ) slides created by Marty Stepp
Sage Franch | Technical Evangelist Susan Ibach | Technical Evangelist.
Embedded Software Design Week II Linux Intro Linux Kernel.
Optical Flow walk through Aidean Sharghi Spring 14.
APP DESIGN AND DEVELOPMENT WITH THE IONIC FRAMEWORK Chuck Leone
Installing git In Linux: sudo apt-get install git In Windows: download it from run the setuphttp://git-scm.com/download/win.
Ns2 Installations and Basics Abdul Razaque. How to install Ubuntu on windows-7 & 8 Download the Ubuntu ISO file. You can get the ISO file from the Ubuntu.
OpenCV C++ Image Processing
Guide To Develop Mobile Apps With Titanium. Agenda Overview Installation of Platform SDKs Pros of Appcelerator Titanium Cons of Appcelerator Titanium.
IBM Worklight environment setup 1. Eclipse IDE Multi-purpose integrated development environment (IDE) Open source Supported for Windows, Mac OS X, Linux.
Introduction to Android Programming
Version Control Systems
Source Control Systems
Computer System Laboratory
SEEM4570 Tutorial 1:Software Installation
How to change the LOGO on PecStarWeb V3.6
CaRT eCapacity Initiative Ghana Productivity Apps
Introduction to .NET Core
Version Control Systems
Some Tips for Using Eclipse
.NET and .NET Core Foot View of .NET Pan Wuming 2017.
Hosted Web Apps with Windows App Studio
SEEM4570 Tutorial 1 Android SDK + XCode SDK +
Header files.
Download and Installation of code::blocks
Introduction to Git and GitHub
Hayley Gilson, Antony Sanchez, Cris Koutsougeras ET 493 Fall 2018
Development Environment Setup
Presentation transcript:

Image Processing on the Pi using openFrameworks

Setup Before beginning: – Install openFrameworks per these instructionsinstructions Run dependency scripts and compile openFrameworks – Install g sudo apt-get install g – Install and test Raspberry Pi camera Install and test Use the raspistill command to test Beware: The Pi camera connection is somewhat fragile. Repeated connecting and disconnecting is not advised.

openFrameworks An opensource C++ toolkit that includes many libraries including openCV for computer visionmany libraries Massively cross-compatible – Windows, OSX, Linux, iOS, Android, Raspberry Pi – Four IDEs: XCode, Code::Blocks, and Visual Studio and Eclipse All code is on GitHub Reminiscent of Processing

Structure

Resources In Ramsey library: – Programming Interactivity by Joshua Noble Web excerpt On-line – OF website OF website – A very good workshop A very good workshop

Working with the Pi Camera Take from the Creepy Face Tracking Portrait by Tony DiColaCreepy Face Tracking Portrait Uses ofxRPICameraVideoGrabber by Jason Van CleaveofxRPICameraVideoGrabber Use the program structure created by DiCola to write other openFrameworks programs that work with the Pi camera

Demo Program: ColorTracker Download colorTracker.tgzcolorTracker.tgz Uncompress it in openFrameworks/apps/myApps tar -xvzf colorTracker.tgz Compile cd colorTracker make Run and notice how it tracks a red colored object bin/colorTracker pi

Use ColorTracker as a Template Copy the colorTracker directory into the openFrameworks/apps/myApps directory with a new name: cp –r colorTracker Keep the portions of main.cpp and the app.h and.cpp files in the src directory as described in the next three slides Rename the app files, replace ColorTracker with the new app name, and add new code to create the desired functionality

Keep the following from ColorTracker.h #include #include "ofMain.h" #include "VideoSource.h" #include "ofxOpenCv.h" class ColorTracker: public ofBaseApp { //  remember to change the class name throughout public: ColorTracker() {} ~ColorTracker() {} void setup(); void update(); void draw();.. // method prototypes in all openFrameworks apps. void gotMessage(ofMessage msg); ofVec2f updateAngle(const ofVec2f& point); // Distance camera is back on the Z axis from the origin. float cameraDistance = 650.0; // Reference to a video source. std::shared_ptr video; float videoFOV; ofVec2f videoOffset = ofVec2f(0,0); private: ofEasyCam camera; float pixelFocalLength; };

Keep the following from ColorTracker.cpp void ColorTracker::setup() { //  remember to change the class name throughout ofSetVerticalSync(true); pixelFocalLength = sqrt(pow(video->getWidth()/2.0, 2) + pow(video->getHeight()/2.0,2))/sin(ofDegToRad(videoFOV/2.0)); // Set up camera camera.setDistance(cameraDistance); camera.setTarget(ofVec3f(0, 0, 0)); camera.disableMouseInput(); … } void ColorTracker::update() { video->update(); } void ColorTracker::draw(){ camera.begin(); camera.end(); if (video->isFrameNew()) { rgb.setFromPixels(video->getPixels()); … } … }

main.cpp Use main.cpp as provided here replacing ColorTracker with the new app (i.e., class) name.main.cpp as provided here – Allows program to use Pi camera on the Raspberry Pi or run alternative video device on another platform Performance on alternative platform is untested

Try this with an openFrameworks example Modify openFrameworks/examples/addons/opencvExample to work with the Pi camera using colorTracker as a template: 1.Copy the colorTracker folder to openFrameworks/apps/myApps/ giving it the new name opencvExample. 2.Rename opencvExample/src/ColorTracker.h to be opencvExample/src/OpencvExample.h 3.Rename opencvExample/src/ColorTracker.cpp to be opencvExample/src/OpencvExample.cpp 4.Change all occurences of ColorTracker to be OpencvExample throughout OpencvExample.h, OpencvExample.cpp, & main.cpp 5.Add the relevant content of openFrameworks/examples/addons/opencvExample/src/testAp p.h to OpencvExample.h 6.Add the relevant content of openFrameworks/examples/addons/opencvExample/src/testAp p.cpp to OpencvExample.cpp 7.Compile and run