250x250
Notice
Recent Posts
«   2024/09   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
관리 메뉴

일상 코딩

[OAK-D Camera] 라즈베리파이 4B - Oak D 카메라 개발환경 세팅 RaspberryPi 4B and Oak-D setting 본문

Raspberry Pi/Project

[OAK-D Camera] 라즈베리파이 4B - Oak D 카메라 개발환경 세팅 RaspberryPi 4B and Oak-D setting

polarcompass 2023. 3. 7. 13:20
728x90

https://www.youtube.com/watch?v=7BkHcJu57Cg 

 

설치 명령어 사이트

https://core-electronics.com.au/guides/raspberry-pi/oak-d-lite-raspberry-pi/

 

Integrated Computer Vision Package - OAK-D Lite With Raspberry Pi Set Up - Tutorial Australia

If you ever needed a performance boost when running Machine Learnt AI Systems (like facial recognition) with a Raspberry Pi Single Board Computer then I have a solution for you. The OAK-D Lite. The Oak-D Lite is the Leatherman Multi-tool of the machine lea

core-electronics.com.au

 

프로그램 버전 안내
프로그램 명 버전
Raspberry Pi OS 64bit
Miniforge 4.11.0
Python 3.8 이상
OpenCV-python 4.5.1.48

 

솔루션 출처
Miniforge

https://velog.io/@yoonj1n/%EB%AF%B8%EB%8B%88%EC%BD%98%EB%8B%A4-Illegal-Instruction-error

 

(라즈베리파이 + Ubuntu) [ERROR] 미니콘다 Illegal Instruction error

기껏 열심히 깔아놨더니 안된다

velog.io

wget https://github.com/conda-forge/miniforge/releases/download/4.11.0-0/Miniforge-pypy3-4.11.0-0-Linux-aarch64.sh

 

Python 
python 가상환경 설정 및 명령어 모음 페이지
https://polarcompass.tistory.com/136
# 가상환경 생성
# conda create -n <가상환경이름> python=<버전>
conda create -n depai python=3.8 -y
# 가상환경 조회
conda env list
# 가상환경 진입
conda activate depai

 

OpenCV-python
문제가 발생하는 명령어
sudo python3 ColorCamera/rgb_preview.py
파이썬 버전 / 파이썬 가상환경 / opencv-python 버전 문제 등등을 복합적으로 확인 할 수 있는 명령어이다.
이 명령어를 무사히 통과하면 라즈베리파이 - Oak-D 카메라 연동이 문제없이 지나간다.
해결법

https://github.com/Project-MONAI/MONAILabel/discussions/869

 

AttributeError: partially initialized module 'cv2' has no attribute '_registerMatType' (most likely due to a circular import) ·

when I try to run monai label ,get the following error: File "", line 228, in _call_with_frames_removed File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-pac...

github.com

https://github.com/opencv/opencv-python/issues/591

 

ImportError: cannot import name '_registerMatType' from 'cv2.cv2' · Issue #591 · opencv/opencv-python

Trying to import cv2 in python 3.9.2 gives me the following error: File "C:\Users\My Name\AppData\Local\Programs\Python\Python39\lib\site-packages\cv2_init_.py", line 9, in from .cv2 impo...

github.com

구글 코랩 / opencv-python-headless<4.3 설치 등등...

위에서 제시하는 방법은 opencv-python-headless를 4.3 버전 이하로 코랩에서 실행하면 해결된다고 했지만

그보다는 opencv-python==4.5.1.48로 설치하면 해결 된다.

 

라즈베리파이 - Oak-D 설정 명령어
# 파이썬 3.8 버전
# 가상환경 진입 후 아래 명령어 실행

sudo apt-get update && upgrade
sudo curl -fL https://docs.luxonis.com/install_dependencies.sh | bash
python3 -m pip install depthai
git clone https://github.com/luxonis/depthai-python.git
cd depthai-python
cd examples
sudo python3 install_requirements.py
cd
sudo pip3 install opencv-python==4.5.1.48
sudo pip3 install -U numpy
sudo python3 -m pip install depthai --user
cd depthai-python/examples

# 위의 설치가 잘되었나 확인하는 예제 코드 실행
sudo python3 ColorCamera/rgb_preview.py

# 위 코드가 잘 실행되면 아래 코드로 진행
sudo git clone https://github.com/luxonis/depthai.git
cd depthai
sudo python3 install_requirements.py
cd
echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="03e7", MODE="0666"' | sudo tee /etc/udev/rules.d/80-movidius.rules
sudo udevadm control --reload-rules && sudo udevadm trigger

# 설치 확인 예제 코드
sudo git clone https://github.com/luxonis/depthai-experiments.git
sudo python3 -m pip install depthai-sdk
sudo python3 -m pip install --extra-index-url https://www.piwheels.org/simple/ depthai-sdk

# Cortic Technology Python Script Demos
sudo apt-get install freeglut3-dev
sudo pip3 install pywavefront
sudo pip3 install PyOpenGL
sudo pip3 install pygame_gui -U
sudo apt install libsdl2-ttf-2.0-0
sudo pip3 install pywavefront
sudo git clone https://github.com/cortictechnology/vision_ui.git
sudo git clone https://github.com/cortictechnology/heartrate_estimation.git
728x90