Robovision on our 2019 FRC bot

Posted on Mon 15 April 2019 in OpenCV • Tagged with robotics, opencv, python

Now that our 2019 FRC season is over, I'd like to describe how Team 1518 implemented vision processing on our bot. We set some aggressive goals, which we aimed to achieve by using the the robovision library, OpenCV, and Python on a Jetson TX2. The primary goals of this post …


Continue reading

Introducing Robovision

Posted on Sun 10 March 2019 in OpenCV • Tagged with python, opencv, robotics

The FIRST robotics competition (FRC) challenges high school students to design and build a robot capable of performing multiple challenging tasks. These annual challenges typically involve computer vision components, such as identifying and using reflective markers to locate targets. High school computer science curriculum rarely covers software engineering topics, let …


Continue reading

Using OpenCV in an iOS app

Posted on Fri 01 February 2019 in OpenCV • Tagged with OpenCV, iOS, Swift

Computer vision is cool tech ... computer vision in an iOS app is even better! In this post, I'll describe how you can integrate and use OpenCV in your Swift-based iOS app. Before we dig in to the process, let's take a look at how the finished integration will work.

Integration diagram

As …


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

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

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

Handling mouse events in OpenCV

Posted on Mon 21 May 2018 in OpenCV • Tagged with opencv

For a project I'm working on, I need to select a region of interest in a video frame and extract info about that region. Fortunately, that's a pretty simple task to do in OpenCV. In this article, I'll show you how to detect and react to mouse actions, such as …


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

Build OpenCV and install from source

Posted on Tue 27 March 2018 in OpenCV • Tagged with python, opencv, anaconda

(Originally posted at skypanther.com)

I wanted to set up the latest OpenCV version on my Mac. I found various instructions, but few that applied specifically to my setup — Mac OS X High Sierra running Anaconda. What follows are my steps to compile and install the latest OpenCV version onto …


Continue reading