[PYTHON] OpenCV AI Kit (OAK-D) I tried @ windows10

This is the first post.

This is a report of the AI ​​stereo camera that was cloud-founded by the kickstarter OpenCV AI Kit in August 2020.

Until acquisition

In August 2020, I pledged with kickstarter OpenCV AI Kit for $ 149 + 20 (shipping cost). After the establishment, the additional shipping fee is $ 16 and the tax is $ 14.9, and the final price is $ 199.9. Now it seems that you can buy it at https://store.opencv.ai/.

image.png

Composition

As shown in the photo. The power supply is 5.0V-3.0A and has connectors for all over the world. At least at the demo level of the tutorial, it runs on unpowered USB bus power.

image.png

Installation work

Basically, just follow the tutorial on the site written in URL of the included card. Below is the case for windows10. python3.9 installed.

Depth AI Python API

--Open PowerShell in administrator mode

--Set execution policy

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'))

--Install all at once with choco

choco install cmake git python pycharm-community -y

--Pip depthai

python -m pip install depthai

depthAI demo preparation

--clone depthai to a suitable folder

git clone https://github.com/luxonis/depthai.git
cd depthai

--Execute the script for checking the required libraries * Officially recommended to execute in a virtual environment

python install_requirements.py

DepthAI demo run result

--Execute demo script (camera connection required)

python depthai_demo.py

image.png

The distance to the object detected by the mobilenet 20class classification is displayed. Is Z the depth direction?

The image was taken from about 50 cm in front. The distance to the doll (person) is ok, but the distance to the bike on the screen is inaccurate. Maybe it's too close to get parallax.

DEPTH image

You can also output a depth image by adding an option to the previous depthai_demo.py.

python .\depthai_demo.py -s metaout depth_raw -bb

image.png

--Visible image with the same angle of view

image.png

The parallax looks like you often see it in a general stereo, and it seems to be fairly clear.

The accuracy of object detection is rather delicate as if the speaker was mistaken for a TV monitor. There is also a Tutorial for using other models of OpenVINO, so I think it will be easier to replace it.

Summary

I could easily check the movement.

There are various possible causes of distance measurement error, such as passive stereo characteristics, algorithmic ones, and insufficient calibration. In the future, while proceeding with the tutorial, we will read the contents of the sample code so that we can bring out the performance.

References

https://docs.luxonis.com/en/latest/pages/api/ https://docs.luxonis.com/en/latest/pages/tutorials/pretrained_openvino/

Recommended Posts

OpenCV AI Kit (OAK-D) I tried @ windows10
I tried trimming efficiently with OpenCV
I tried using GrabCut of OpenCV
I tried face recognition with OpenCV
I tried non-photorealistic rendering with Python + opencv
I tried to predict next year with AI
I tried "smoothing" the image with Python + OpenCV
I tried'Beauty'with OpenCV
I tried "differentiating" the image with Python + OpenCV
I tried scraping
I tried object detection using Python and OpenCV
I tried PyQ
I tried to detect motion quickly with OpenCV
I tried FX technical analysis by AI "scikit-learn"
I tried AutoKeras
I tried "binarizing" the image with Python + OpenCV
I tried to make AI for Smash Bros.
I tried papermill
I tried django-slack
I tried Django
I tried using the image filter of OpenCV
I tried spleeter
I tried cgo
I tried to extract features with SIFT of OpenCV
[OpenCV / Python] I tried image analysis of cells with OpenCV
I tried to become an Ann Man using OpenCV
[TensorFlow] I tried to introduce AI to rolling stock iron
AI Gaming I tried it for the first time
I tried "morphology conversion" of images with Python + OpenCV
I tried using parameterized
I tried using argparse
I tried using mimesis
I tried using anytree
I tried competitive programming
I tried running pymc
I tried ARP spoofing
I tried using aiomysql
I tried using Summpy
I tried Python> autopep8
I tried using coturn
I tried using Pipenv
I tried using matplotlib
I tried using "Anvil".
I tried using Hubot
I tried using ESPCN
I tried PyCaret2.0 (pycaret-nightly)
I tried using openpyxl
I tried deep learning
I tried AWS CDK!
I tried using Ipython
I tried to debug.
I tried using PyCaret
I tried using cron
I tried Kivy's mapview
I tried using ngrok
I tried using face_recognition
I tried to paste
I tried using Jupyter
I tried using PyCaret
I tried moving EfficientDet
I tried shell programming