Propeller and OpenCV
Jeff_Birt
Posts: 25
I saw an add in Circuit Cellar about the Propeller and OpenCV. I got excited and have been tyring to find out what sort of OpenCV support there really is. I 'thought' that maybe there was an OpenCV port for the Propeller but it looks like the OpenCV is limited to the ViewPort application.
So color me confused. What is this OpenCV support for? If I could use OpenCV on the Propeller I would be super excited. It would be great to move my current OpenCV app from the PC to the Propeller.
So color me confused. What is this OpenCV support for? If I could use OpenCV on the Propeller I would be super excited. It would be great to move my current OpenCV app from the PC to the Propeller.
Comments
I'm the author of ViewPort and a big proponent for building cool things with the Propeller.
OpenCV is a full-featured computer vision package, initially started by Intel and now, a decade later, maintained by Willow Garage- which is funded by a Google billionare. Stanford won the last Darpa challenge using OpenCV to do their vision processing. As you probably know, sophisticated vision processing takes quite a bit of memory and processing power. In the March edition of Circuit Cellar I published an article explaining how to do simple vision processing purely on the Propeller.
The OpenCV plugin (which you can try for free in the 30-day trial of ViewPort: mydancebot.com) makes it easy for people to get started with computer vision. You don't have to compile anything, you don't need any libraries- you just need the 3MB ViewPort download and a USB camera. One of the samples that comes with ViewPort tells you more about OpenCV, and also shows how to integrate OpenCV with programs running on the Propeller. The sample program uses 1 line of spin to configure OpenCV to find human faces. The x,y location of that face is sent through ViewPort to a Propeller program where you could do all sorts of things- move servos, control robot motors, etc.
A simple but compelling demo is to mount a doll's head to a hobby servo and have it track you. A couple months back I posted something similar- to guide a camera to videotape a wedding: use the white blob finder to track the bride, black blob to find the groom, and highly colored to find the mother of the bride!
Feel free to ask more.... Last Friday I demoed ViewPort with great success to the people at Willow Garage, next week I'll do a Google Talk which should be available on YouTube afterwards.
Enjoy!
Hanno
Thanks!
Yes, your understanding is correct: ViewPort makes it easy to integrate the Propeller with OpenCV. The input video for OpenCV can be either a Webcam- or other device that OpenCV supports, a video file/picture, or grayscale video grabbed on the Propeller. This should open all sorts of computer vision applications for Propeller based systems.
Hanno
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Download a free trial of ViewPort- the premier visual debugger for the Propeller
Includes full debugger, simulated instruments, fuzzy logic, and OpenCV for computer vision. Now a Parallax Product!
Thanks in advance.
Shane
You cannot hook up a USB camera directly to the Propeller. You can hook up some lower resolution image sensors to a Propeller and do basic image processing on the smaller images as Hanno has described. The Propeller just doesn't have the memory and speed to handle full resolution video.
Post Edited (Mike Green) : 6/30/2009 3:43:04 AM GMT
ViewPort supports two ways of working with video.
Option 1: NTSC Signal->ADC->Propeller
This does NOT require a PC. The frame grabbing and filtering is done on the Propeller. Due to the limited processing power and memory, only 200x240x16 shades are grabbed and filtered in real time. However, this let's you control robots with vision!
Option 2: Webcam->PC with ViewPort->Propeller
This requires a PC, but provides you with state-of-the-art vision functions, like finding human faces. The object's location and size is continually sent to the Propeller, where your spin code can do cool things with it.
Hanno
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Download a free trial of ViewPort- the premier visual debugger for the Propeller
Includes full debugger, simulated instruments, fuzzy logic, and OpenCV for computer vision. Now a Parallax Product!
it would be cool to set up a bride stocking robot.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
propmod_us and propmod_1x1 are in stock. Only $30. PCB available for $5
Want to make projects and have Gadget Gangster sell them for you? propmod-us_ps_sd and propmod-1x1 are now available for use in your Gadget Gangster Projects.
Need to upload large images or movies for use in the forum. you can do so at uploader.propmodule.com for free.
I use option 1 for my fully autonomous DanceBot. There's a video on my site mydancebot.com/viewport/videos where I show how I use the camera to do line following from a distance. I also use PropCV to sense where a person is, by first grabbing a new frame, then filtering the image to look for vertical edges, then looking for multiple strong edges close together, then finding the maximum of that- in effect getting me a bar-code finder. I use the position of the barcode to control the rotation and position of my dancebot. This makes it dance with people. See also the Circuit Cellar article I wrote in March, there's a link on my site.
Hanno
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Download a free trial of ViewPort- the premier visual debugger for the Propeller
Includes full debugger, simulated instruments, fuzzy logic, and OpenCV for computer vision. Now a Parallax Product!
If on the standard I might buy it and have some interesting projets comeing up soon.....
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Toys are microcontroled.
Robots are microcontroled.
I am microcontroled.
If it's not Parallax then don't even bother. :-)
·
Mini-Din/PS2 connectors are for sale! 5 for $1! PM me if you wish to make an order.
Cheap·shipping unless specified!· ···· Order 100 get 25 FREE!····· About 300 left!!··
Hanno
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Download a free trial of ViewPort- the premier visual debugger for the Propeller
Includes full debugger, simulated instruments, fuzzy logic, and OpenCV for computer vision. Now a Parallax Product!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
propmod_us and propmod_1x1 are in stock. Only $30. PCB available for $5
Want to make projects and have Gadget Gangster sell them for you? propmod-us_ps_sd and propmod-1x1 are now available for use in your Gadget Gangster Projects.
Need to upload large images or movies for use in the forum. you can do so at uploader.propmodule.com for free.
Is the version on your website the standard or Ultimate?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Toys are microcontroled.
Robots are microcontroled.
I am microcontroled.
If it's not Parallax then don't even bother. :-)
·
Mini-Din/PS2 connectors are for sale! 5 for $1! PM me if you wish to make an order.
Cheap·shipping unless specified!· ···· Order 100 get 25 FREE!····· About 300 left!!··
$29 - Lite (Low-speed transfer, small data buffer)
$59 - Standard (Low-speed, spin debugger)
$89 - High Speed (High-speed, spin debugger)
$149 - Ultimate (Includes High-speed, Debugger, OpenCV, development kit and designer)
The Standard and Ultimate versions are being distributed by Parallax for the same price as on my website.
The $29 version you're referring to doesn't have the spin debugger.
Hanno
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Download a free trial of ViewPort- the premier visual debugger for the Propeller
Includes full debugger, simulated instruments, fuzzy logic, and OpenCV for computer vision. Now a Parallax Product!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Toys are microcontroled.
Robots are microcontroled.
I am microcontroled.
If it's not Parallax then don't even bother. :-)
·
Mini-Din/PS2 connectors are for sale! 5 for $1! PM me if you wish to make an order.
Cheap·shipping unless specified!· ···· Order 100 get 25 FREE!····· 200 left!!··
ViewPort comes with a 30 day free trial, included is a manual, ~18 tutorials, a link to Andy's excellent PE Lab, and a link to lots of videos on my site. You can also upgrade your license at any point, in any combination- all on my site. mydancebot.com
In short, the debugger is a tool that makes it easier for you to write more sophisticated programs.
Hanno
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Download a free trial of ViewPort- the premier visual debugger for the Propeller
Includes full debugger, simulated instruments, fuzzy logic, and OpenCV for computer vision. Now a Parallax Product!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
propmod_us and propmod_1x1 are in stock. Only $30. PCB available for $5
Want to make projects and have Gadget Gangster sell them for you? propmod-us_ps_sd and propmod-1x1 are now available for use in your Gadget Gangster Projects.
Need to upload large images or movies for use in the forum. you can do so at uploader.propmodule.com for free.
I've installed the trial version of ViewPort, and am generally pleased with the tool. One thing I don't quite understand, though, is the need to "pre-load" one's program using the Prop Tool before running it in ViewPort. You've taken ViewPort so far, why not make it a completely independent development environment.
Back to the topic at hand...
... then...
Rather than trying to make an "educated" guess I'll just ask, what is the difference?
Ned
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"They may have computers, and other weapons of mass destruction." - Janet Reno
Compiling and loading files from ViewPort to the Propeller has been supported for a long time. Just select a file on the welcome view (you can browse to your own directory if you like or choose from one of the tutorials) and then click the "run" button. This will compile and load the file. If you want to edit your code, just click the "code" view to get a syntax highlighting editor that looks and feels almost like the Propeller Tool.
The Ultimate package includes the High speed option, OpenCV, Designer, and development kit. OpenCV let's you use the state-of-the-art vision engine that was used by Stanford to win the DARPA challenge with your spin program- for example, to track faces- your spin program gets the x,y position of the found face.
Hanno
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Download a free trial of ViewPort- the premier visual debugger for the Propeller
Includes full debugger, simulated instruments, fuzzy logic, and OpenCV for computer vision. Now a Parallax Product!