Learning OpenCV book review

Learning OpenCV book coverA few days ago, I received my copy of a new book focused on implementing computer vision systems using the OpenCV library. OpenCV is the most comprehensive open source, cross-platform, computer vision library that have been available and under development for many years; however, only recently a book on learning to program with it finally became available. The Learning OpenCV: Computer Vision with the OpenCV Library book is published by O'Reilly and written by Gary Bradski and Adrian Kaehler both veterans in machine vision with lots of academic and industry experience.

The origins of the OpenCV library go back many years. Intel first introduced the image processing library in 1999. At the time, the library was being developed for real-time image processing on Intel CPUs; in fact, having a copy of Intel's Integrated Performance Primitives(IPP)library installed on your computer can provide huge speed ups in processing images even today. As an open source project, several Beta versions of OpenCV were published on a yearly schedule with the official version 1.0 released in 2006. Since then, the project remained dormant until a year ago when robotics startup Willow Garage decided to take over continuing its development as an open source computer vision library that would be of use to scientists, industry developers, and hobbyists alike. Version 1.1 was released in October 2008 to coincide with the publication of the Learning OpenCV book.

I have used OpenCV over the years and I am glad that finally someone wrote a book describing how to program with it. The online documentation is not the best to get people started and it is only useful to those with knowledge of computer vision who just want to know how to use the API. The new book is here to fix the documentation problem helping experts and amateurs alike to get started with programming basic and advanced image processing algorithms with ease. I have spent a couple of days reading parts of the book and so far I find it to be very well written and more useful than the online documentation. The book does a great job describing both the API and the mathematics behind the implemented algorithms. Although some sections tend to be a bit heavy on the math, the authors often suggest that readers can skip over these descriptions and jump straight to the section that describes the API. I would encourage anyone who wants to take full advantage of the library to read through the entire book including the mathematical descriptions; you don't need to know how an internal combustion engine works to drive a car but if you want to build a better car then you do.

The book starts by discussing basic image processing (image smoothing, resizing, thresholding, etc.) and eventually moves on to talk about gradients, transforms (Hough, Discrete Fourier, and Discrete Cosine Transforms,) integral images and histograms. These basic tools can be used to implement advanced algorithms for contour extraction and matching as well as image segmentation and tracking. In the latter chapters, the focus changes to camera calibration and 3D vision. There is also a brief introduction to Machine Learning for classification and clustering (K-means, naïve Bayes classifier, binary decision trees, and boosting.) The authors conclude the book with their overview of where they hope to take OpenCV over the next few years implementing many state of the art algorithms and providing better documentation. Since this is an open source project, everyone is encouraged to make a contribution either by implementing new algorithms, fixing bugs, or optimizing the current implementation.

Learning OpenCV is a must have book for everyone working on computer vision.

Enhancing low resolution video using high resolution still images

Researchers at the University of Washington have devised a method for enhancing low resolution video using high resolution still images of the same scene. Their technology is aimed at the new hybrid cameras such as the Sony HDR-HC7 and Canon HV10 that are capable of capturing both video and still images at the same time. The researchers presented in a paper they published at the International Conference on Computational Photography (ICCP) a method that combines an optical flow and an image-based rendering algorithm to greatly improve the resolution of the video. The results are very good even for very demanding scenes with low texture making difficult to estimate optical flow accurately. The only downside to the method is that it is slow to compute. According to the number published in the paper, it takes 12 minutes per 640x480 pixels frame to estimate the optical flow and an additional 1 minute for the all other necessary computations. The researchers suggest that a GPU-based implementation would greatly reduce the processing time; it may be time for them to invest in a TESLA personal supercomputer.

For more details on the method and lots of examples of it working watch the 9-minute video below.


Power Pedal: The man-machine synergy effector

In 2008, exoskeleton technology was demonstrated by a few groups and technology companies as one advancement that will soon be used to enhance our lives. These exoskeletons are very powerful machines but must be controlled by weak human beings without hurting them. Finding the right balance or synergy between man and machine is no easy task. The man-machine synergy effector is a proposed theoretical system for regulating the power flow from man to machine and vice versa in order for the two-body system to complete tasks impossible tp be performed by only one of the two members.

Japanese researchers recently published the man-machine synergy effector at the International Conference on Robotics and Automation (ICRA.) The same group also set out to demonstrate a realization of the concept via the construction of the Power Pedal exoskeleton. The exoskeleton can potentially increase a person's power by a factor between 7 and 40 while being safe and intuitive to use.

Although the concept of man-machine synergy makes a lot of sense, the actual implementation of Power Pedal leaves much to be desired. As you can see from the video below, it is very difficult to control the machine. It truly fails to demonstrate how this exoskeleton is intuitive to use as the operator seems to make an enormous amount of effort to control it; other than the fact that the machine does not crash the operator, there is hardly any man-machine synergy demonstrated. I guess this is the pre-Alpha prototype and the next version will be vastly improved.

iRobot Looj 2, ConnectR and iTube

The past few days have been busy for the number one manufacturer of consumer robots, the very well known Roomba maker iRobot. Taking advantage of the Consumer Electronics Show taking place in Las Vegas, iRobot announced the second generation Looj gutter cleaning remote-controlled robot and announced the cancellation of the ConnectR telepresence robot and the introduction of a new iRobot YouTube channel.

The new Looj is a small upgrade to the one introduced last year. The new model includes an internal antenna, easier access to the rechargeable battery, and a new anti-flipping auger. I'd say this is a better product than the current version but nothing to write home about. Look for Looj 2 in a store near you this Spring for a mere $130.

On another note, iRobot also decided to discontinue the ConnectR program. This program was an effort to create a telepresence or virtual visiting (as the call it) robot. Testing with users revealed that the product was not ready for the consumer market and as such iRobot decided to cancel it at the beta stage and go back to the drawing board. As the company says, this is not their last effort to creating such a robot for the consumer market. Let me remind you that WowWee has two telepresence robots available today including the Rovio and the recently announced Spyball robot.

Finally, iRobot also announced this past week a new YouTube channel. The new video channel is an effort to showcase the company's many robots along with the creations of their faithful owners and fans. More specifically,

This channel is part of the company’s commitment to support science, technology, engineering and math education through the celebration of achievement in robotics. Videos of iRobot products, fans and their pets have enjoyed widespread popularity on the Internet. The new iRobot iTube online video channel gives these creative expressions a home on the Web and opens up a new form of communication with iRobot for students, inventors and robot enthusiasts.

Enjoy the new iRobot YouTube channel here. And just so that you don't think that the channel is all about serious technology, enjoy the video below of a toddler riding on a Scooba!

WowWee JoeBot, Roborover, Spyball and more at CES 2009

Joebot and Roborover toy robotsIt looks like WowWee is determined to make my 2009 robotics predictions true as soon as they can less than one week from me posting them online. The company that since 2004 has produced a large number of entertainment, toy, and remote controlled robots continued to pleasantly surprise everyone with a few more excellent offerings announced at the Consumer Electronics Show happening right now in Las Vegas. Let me remind you that at CES 2008, WowWee introduced more than 20 new robotic technologies so one wonders how much more could they accomplish in one more year. It turns out that it is alot!

WowWee is showing off 3 very nice, capable, and affordable robots. These are the JoeBot, Roborover, and Spyball.

The first two can be seen in the photo to the left while the last can be seen in the photo at the end of this post. JoeBot looks like an upgraded version of Robosapien with some new sleek looks reminiscent of last year's Femisapien and interactivity software similar to that introduced last year with the Mr. Personality robot. JoeBot, however, has some totally new features including the ability to “beatbox and dance – just tap out a beat and he will repeat it perfectly while grooving along.” Joebot also has a Battle Mode which allows him to “wander freely while tracking and blasting objects with its hand LEDs; you can even challenge him to a “duel” using any TV (IR) remote controller.” For the expected price of $100-150, this is one cool robot toy.

Roborover is a thread-based, exploring robot with a humanoid upper body. Infrared sensors allow it to avoid obstacles and play a hide-and-seek game with children. The robot is supposed to also be capable of learning but it is not clear to me how advanced these algorithms are considering that from my experience any half decent machine learning algorithm would require lots of compute power to be effective. Regardless, for just $69, Roborover has lots of great features.

Spyball is the last of WowWee's 3 new robots for 2009. This is a remote-controlled, Wi-FI-enabled, spy robot similar to last year's Rovio. The biggest difference compared to Rovio is its spherical shape that makes for an interesting locomotion method. When the robot is used to take digital photos or video, it opens up to expose its camera. It looks like this $100-170 telepresence robot is a much cheaper alternative to the company's flagship Rovio product that can navigate autonomously using the TrueTrack beacons.

The FlyTech product line is also growing with the introduction of new flying robots adding more offerings to the very successful DragonFly. The 2 new robots are the UFO look alike Lightstar flyer and the Hoverpod racer. Both of these are designed using durable material and can continue flying for up to 10 minutes per charge.

WowWee Spyball telepresence robot

You can read the company's Press Release with a bit more information about these new robots by clicking here.

Robotics in 2008 and 2009: What happened in 2008 and what might happen in 2009

First, I want to wish all of you a happy and prosperous new year! This blog continued to grow in 2008 and we now receive 50% more traffic than the year before. On December 31st, the last day of 2008, Feedburner stats also reported that we finally reached 2000 subscribers in combined RSS and email. Thank you all for continuing to read this blog.

This past year has been an exciting one as far as new developments in robotics are concerned. A number of new robots were commercial introduced (most of them toy robots) while scientists continued to develop new algorithms advancing our ability to construct intelligent robots and better understand human intelligence. Don't forget that we can now have autonomous cars driving for hours in city traffic (c. 2007), legged robots traversing rough terrain, and unmanned aerial vehicles performing complex maneuvers. New exoskeletons such as the ones from Sarcos (c. 2007), Cyberdyne, and Honda have, for the first time, been demonstrated as valuable tools capable of extending human abilities past the limits imposed upon us by nature.

Robots have also continued to decrease in size and price. There a large variety of robotic kits available for sale today at affordable prices. Compare that to when I started graduate school in 1999 when as far as I can recall there were 0 such kits available in the market. Robocup has also continued to flourish in 2008 with the legged robot league continuing forward even after Sony's AIBO was discontinued years ago.

Faster computers with more memory and lots of bandwidth have continued to place state-of-the-art robotics and artificial intelligence algorithms within reach of hobbyists. Anyone can download the latest copy of Microsoft's Robotics Studio, purchase iRobot's cheap but very capable Create robot and go on to do amazing things at home using only a computer worth a few hundred dollars; I am talking about robotics work that 10 years ago could only be found in advanced robotics laboratories requiring hundreds if not millions of dollars in funding to operate. Even today, however, those with a bit of extra money to spend, an NVIDIA Tesla desktop supercomputer is now available and very capable for doing some serious number crunching at the laboratory or even at home.

So, where are robotics and artificial intelligence heading in 2009? This question is very hard to answer as any predictions about future technology in the long and short terms are bound to be proven wrong in due time. I'll make a couple of predictions but don't quote me on them.

I believe that the trend of cheaper and better (as in more capable) robotic kits will continue in the new year. Most of these robots will be targeted to the hobbyist and toy markets. Robotics research around the world will continue at more or less full speed even though the current economic crisis might make it difficult for scientists to get funding at the level of previous years. I believe that robotics is the next big industry that will move the world economy forward and past the current crisis just the way that the Internet did in the nineties and the computer industry before that in the eighties.

In 2009, we are also going to see the first few robotic systems designed to tackle Google's Lunar X-Prize. I don't think that any robots will make it to the Moon this year but we are going to start seeing more activity that has to do with this challenge. The Moon is a very exciting destination once more and 2009 will be a pivotal year to our return to its surface especially for private enterprises which have never been there before.

Once more, it is very difficult to make accurate predictions about future technology so I could be entirely wrong. Time will tell if I am right or wrong. Keep reading this blog to find out. Our robotics adventure has only begun and the voyage will be a long but exciting one. Stay tuned!