Monday, November 20, 2017

How to integrate essential scikit-learn functions with OpenCV

OpenCV's machine learning module provides a lot of important estimators such as support vector machines (SVMs) or random forest classifiers, but it lacks scikit-learn-style utility functions for interacting with data, scoring a classifier, or performing grid search with cross-validation. In this post I will show you how to wrap an OpenCV classifier as a scikit-learn estimator in five simple steps so that you can still make use of scikit-learn utility functions when working with OpenCV.

Thursday, October 19, 2017

OpenCV with Python Blueprints: 2nd Anniversary Giveaway

Two years ago today, Packt Publishing Ltd. released OpenCV with Python Blueprints, my first technical book on computer vision and machine learning using the OpenCV library. To celebrate this anniversary, I'm giving away a free copy of the book via Amazon Giveaways! Read on to find out how you can participate.


Michael Beyeler
OpenCV with Python Blueprints
Design and develop advanced computer vision projects using OpenCV with Python


Packt Publishing Ltd., London, England
Paperback: 230 pages
ISBN 978-178528269-0
[GitHub] [Discussion Group] [Free Sample]

Monday, September 11, 2017

Back to School Sale

Machine Learning for OpenCV is one of 5,000 titles you can currently get for only $10 at www.packtpub.com as part of their big Back to School sale. Grab a copy before it's too late!

Friday, August 4, 2017

Win a free copy of Machine Learning for OpenCV

To celebrate the release of my new book, I am giving away a free copy of Machine Learning for OpenCV (Paperback, a $44 value).

You can enter the Amazon Giveaway here. Sweepstakes ends 10 August, after which the winner will be drawn randomly from all participants (18y+, must reside in US).

The book is currently trending as #1 New Release in Amazon's Computer Vision category, and initial feedback has been very favorable. Get it while it's hot!


Edit: Fixed the link to the Giveaway ^^.

Saturday, July 29, 2017

How to compress color spaces using k-means clustering

One exciting application of k-means clustering is the compression of image color spaces. Although True-color images come with a 24-bit color depth (allowing 16,777,216 color variations), a large number of colors within any particular image will typically be unused—and many of the pixels in the image will have similar or identical colors. In this post I am going to show you how you can use k-means clustering via OpenCV and Python to reduce the color palette of an image to a total of 16 colors.