A simple object classifier with Bag-of-Words using OpenCV 2.3 [w/ code] Just wanted to share of some code I've been writing.
So I wanted to create a food classifier, for a cool project down in the Media Lab called FoodCam. It's basically a camera that people put free food under, and they can send an email alert to the entire building to come eat (by pushing a huge button marked "Dinner Bell"). Really a cool thing. OK let's get down to business. I followed a very simple technique described in this paper. Edit (6/5/2014): Another great read for selecting the best color-space and invariant features is this paper by van de Sande et al. The method is simple: - Extract features of choice from training set that contains all classes. - Create a vocabulary of features by clustering the features (kNN, etc). Turns out, those crafty guys in WillowGarage have done pretty much all the heavy lifting, so it's up for us to pick the fruit of their hard work.
That's pretty cool! But recognizing faces in images is not something terribly new and exciting. Wouldn't it be great if we could tell OpenCV to recognize something of our choice, something that is not a face? Let's say... a banana? That is totally possible! Here's the good news: we can generate our own cascade classifier for Haar features. But now for the best of news: keep on reading! The following instructions are heavily based on Naotoshi Seo's immensely helpful notes on OpenCV haartraining and make use of his scripts and resources he released under the MIT licencse. Let's get started The first thing you need to do is clone the repository on GitHub I made for this post. Git clone You'll also need OpenCV on your system. If you're on OS X and use homebrew it's as easy as this: Samples How many images do we need?
For more information about available editions please refer to the Editions section. Contact us If you have any questions or comments about our products, please use the form below to contact us: Message Adaptive Vision Future Processing Sp. z o. o.Bojkowska Str. 37A, 44-100 Gliwice, POLAND Phone: +48 32 461 2330, +48 607 788 281Fax: +48 32 376 23 18 Sales & Partnershipinfo@adaptive-vision.com.
Done! Install OpenCV and Python on your Raspberry Pi 2 and B+ My Raspberry Pi 2 just arrived in the mail yesterday, and man is this berry sweet.
This tiny little PC packs a real punch with a 900mhz quadcore processor and 1gb of RAM. To give some perspective, the Raspberry Pi 2 is faster than the majority of the desktops in my high school computer lab. Anyway, since the announcement of the Raspberry Pi 2 I’ve been getting a lot of requests to provide detailed installation instructions for OpenCV and Python. So if you’re looking to get OpenCV and Python up-and-running on your Raspberry Pi, look no further!
In the rest of this blog post I provide detailed installation instructions for both the Raspberry Pi 2 and the Raspberry Pi B+. I’ve also provided install timings for each step. Finally, it’s worth mentioning that we’ll be utilizing the Raspberry Pi inside the PyImageSearch Gurus computer vision course. Here’s a quick example of detecting motion and tracking myself as I walk around my apartment on the phone: