Raspberry Pi for IoT

Posted on Fri 14 December 2018 in Making, Python • Tagged with raspberry pi, making, python

I gave a presentation to the Buffalo Python meetup group in December. My talk centered around using the Raspberry Pi as a platform for IoT and embedded development. I want to share my presentation and the resources I mentioned here on my blog.

Update I presented an expanded version of …


Continue reading

Getting user input with OpenCV trackbars

Posted on Tue 16 October 2018 in OpenCV • Tagged with opencv, python

Trackbars, or sliders, are a simple way to get user input when working with OpenCV. In this post, I’ll show you how to add trackbars to an OpenCV window, read their values, and use those values in your Python scripts.

Trackbars (sliders) on an OpenCV window

To demonstrate a use for trackbars, we’ll read …


Continue reading

Multiple cameras with a single Raspberry Pi

Posted on Sun 02 September 2018 in Python • Tagged with python, raspberry pi, making

The Arducam Multi Camera Adapter board is a neat accessory for a Raspberry Pi. With it, you can connect multiple cameras to a single Pi. A single board supports up to four cameras. According to Arducam, you can stack up to four boards for a total of 16 cameras on …


Continue reading

Finding the dominant colors of an image

Posted on Tue 24 July 2018 in OpenCV • Tagged with opencv, python

The typical way to isolate or find an object in an image is to look for its color. You specify a range of colors, then use OpenCV to identify regions in an image that contain colors within that range. But, even if you know the exact color of your target …


Continue reading

Ad-hoc objects in Python

Posted on Fri 06 July 2018 in Python • Tagged with python

If you know one programming language, it's natural to look for parallels as you learn a new language. In my case, I've coded in JavaScript for many years while Python is much more recent for me. I regularly find myself thinking "in JavaScript, I'd do ..."

Take object handling. I really …


Continue reading

Path prediction with OpenCV

Posted on Sun 03 June 2018 in OpenCV • Tagged with opencv, python

Recently, I spotted an article on HackerNews, Self-driving RC car that uses AI to predict turning angles. The project looked interesting. They applied AI to predict the path a radio-controlled car should take to stay centered over a tape track on the floor. Using a Raspberry Pi and PiCam mounted …


Continue reading

Reading email with Python

Posted on Thu 10 May 2018 in Python • Tagged with python

For a recent project at work, I needed to read and parse email messages with a python script. I found the documentation confusing, and most of the samples on various blogs and StackOverflow posts to be old and not fully compatible with python 3.x. So, here is an adaptation …


Continue reading

Streaming birdcam with a Raspberry Pi and picamera

Posted on Fri 04 May 2018 in Making • Tagged with raspberry pi, making, python

My darling wife got me a Raspberry Pi 3B+ and a NOIR Pi camera for my birthday so that I could set up a streaming camera to monitor our nesting bluebirds. Here's how I did it.

My first attempt was to use the Motion program as described by Hackernoon. It …


Continue reading

Acquiring images with OpenCV

Posted on Mon 16 April 2018 in OpenCV • Tagged with opencv, python

To manipulate an image, the first thing you must do is open it. OpenCV lets you open images and videos from files and cameras, both locally attached and on the network. Let's check it out.

Still images

We'll start with the simple case of still images. This is probably best …


Continue reading

OpenCV Basics

Posted on Sun 15 April 2018 in OpenCV • Tagged with opencv, python

OpenCV is a library of computer vision functions available for C++, Java, Python, and more on Windows, Linux, OS X, Android, and iOS. The OpenCV project began way back in 1999 and has been continually expanded and improved since then.

This article and the others on this site focus on …


Continue reading