OpenCV (Open Source Computer Vision Library) is an open source computer vision and machine learning software library. OpenCV was built to provide a common infrastructure for computer vision applications and to accelerate the use of machine perception in the commercial products. Being a BSD-licensed product, OpenCV makes it easy for businesses to utilize and modify the code.
tldr; It helps your computer “see” and “infer”
The Robotic Arm
For the Robotic Arm Project, OpenCV will be used to detect the shape and color of the object, position of the object relative to the claw and that data will then be used to pick and/or place said object.
OpenCV on RB3
The entire 96Boards DragonBoard line up have very straightforward and a generic userspace experience, with Open-source graphics based on Mesa and running close-to mainline linux kernel on Debian Buster, there aren’t (m)any kinks to be worked out.
OpenCV installation is very straight-forward, any instructions form the inter-webs just works without any modification, so let’s take a look at a few of them.
Don Harbin’s M&M Counting Demo:
This demo was originally created for the DragonBoard 820c but in reality can run on any device with a webcam.
The original purpose of this demo was to count M&M rolling down a shoot, but this demo also serves very well just to test opencv and color+object detection and counting. Definitely an excellent starting point.
Running On the RB3:
pyimagesearch’s Ball Tracking with OpenCV
This is a generic demo for OpenCV beginners and also has been used a lot to show the capabilities of the DragonBoard410c on many occasions.
This demo tracks a green colored ball across the screen and draws a red trace line as it moves.
Running on the RB3:
Object Tracking + Color Detection + Shape Detection
This is the frankenstein code that, in a much more sophisticated form, will drive the robotic arm. So you could just say “Pick up the red ball” and this is how the arm knows what to pick up.
Running on the RB3:
RB3 doesn’t break a sweat ;)
This article is Part 2 in a 5-Part Series.
- Part 1 - Qualcomm RB3 Robotic Arm Project | Introduction
- Part 2 - OpenCV on RB3 Pt. 1 | Qualcomm RB3 Robotic Arm Project
- Part 3 - Threads got complicated | OpenCV on RB3 Pt. 2 | Qualcomm RB3 Robotic Arm Project
- Part 4 - Gimme Code | OpenCV on RB3 Pt. 3 | Qualcomm RB3 Robotic Arm Project
- Part 5 - My experiments with 1080p | OpenCV on RB3 Pt. 4 | Qualcomm RB3 Robotic Arm Project