Updated: Feb 4, 2021
Those working within the image processing domain will be familiar with the OpenCV libraries which are at the heart of many image processing applications. The OpenCV AI camera kick starter was launched to celebrate the 20th anniversary of the OpenCV libraries and makes available two small camera modules.
OAK – Single 12 MP color image sensor capable of up to 60 FPS
OAK-D – Combines the single 12 MP sensor as per the OAK with dual synchronized stereo cameras to provide a depth perception.
These sensors are controlled and processed by a Movidius Myriad X processor which contains several 16 vector processors, 20 image processors and 2 AI processors.
Both cameras can be programmed using Python, OpenCV and the depthAI package provided to support the hardware. If additional AI algorithms are required the OpenVINO framework can be used for development.
Getting up and running with both the OAK and OAK-D camera can be achieved very quickly, with support available for MacOS, Ubuntu, Windows and Rpi OS. Complete instructions can be found in the OAK documentation.
To get started I decided to install my OAK cameras on my Windows 10 laptop. The steps take for the installation are
Use Windows powershell to download Chocolatey a package manager for Windows environments
Install Python 3 and Pycharm
Install the depthAI python package
Clone the DepthAI git Repository
Run the Installation requirements script
Run the example application using the OAK or OAK-D camera
The first step of course is to run the powershell and install Chocolatey, this can be performed by using the commands below.
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
Once the chocolatey is installed, the next step is to close the powershell and reopen the powershell to install python3 and pycharm.
This can be achieved using the command.
choco install cmake git python pycharm-community -y
Again once the installation completes, close the powershell and open a new command window.
Using this command window we are going to install the depthai package using python and PIP.
python3 -m pip install depthai
With Python installed the next step is to clone the depth AI git repository, once this has been cloned we can change directory to the cloned location and run the installation requirements script.
git clone https://github.com/luxonis/depthai.git cd depthai python3 install_requirements.py
Finally we can run the demonstration application which should be able to demonstrate the OAK camera identifying objects within the scene.
With a OAK or OAD-D camera connected (in this case I had a OAK connected) a screen will appear and pointing the camera at different scenes should result in the scene contents being correctly classified.
These cameras are impressive for the implementation of simple image-based AI applications, all interfacing is performed over a USB-C link.
I will experiment with them and write a few more blogs on there use looking at how they can be used for different image processing applications.