Localization v1: OpenCV/MATLAB Implementation

Post date: Dec 15, 2013 4:58:15 AM

The video above is a demonstration of the current autonomous operation and robotic localization of the project's remote control car. In summary, the remote control car travels to a new location specified by clicking on the desired location from a live video feed. The live video feed is acquired with a connected web camera and is displayed through a GUI-window on the laptop.

MATLAB. In order to even make enough time for the ALP project, a significant portion of the project was completed as the final project for a college course. A fellow graduate student, Ahmed I Mofadal, and I worked together to develop the localization, taking advantage of OpenCV and MATLAB. Initially, the plan was to develop the software entirely in C++, however one of the constraints of the project was to develop the software related to the image processing with Kota Yamaguchi's "mexopencv" library. Because the majority of the software was already developed in C++, the MATLAB-related software is compiled with Compiler Toolbox and called within the original program.

Localization Method. In essence, the remote control car in the video is tracked using back projected images created from the target object's color and frames from the camera. The back projections and an assumed area where the remote control car may be located are inputted into Gary Bradsky's Continuously Adaptive Mean-Shift (i.e. CAMShift algorithm) and the output is the current location of the remote control car. Please note, this explanation is an extreme simplification. More details on the algorithms, hardware, and software will be uploaded in a future post. For now, details on back projections and the CAMShift algorithm can be found on here.

Downloads. A small program that demonstrates the localization method described above can be downloaded from one of the links, below. The first of the three links is the executable. The second is executable and an installation for the MATLAB Compiler Runtime (MCR), which is necessary if MATLAB R2013b is not already installed. The third link is the source code itself. Please note, the compiled application and the MCR are very large, with the application being ~50mb and the MCR being ~450mb. The next version of the software aims to dramatically reduce the size of the application.

CamShift Executable (requires either MATLAB R2013b or MCR Version 8.2)

CamShift Executable with MCR (includes MCR Version 8.2)

CamShift Source (requires MATLAB and Yamaguchi's "mexopencv" library)