Cov txheej txheem:

Augmented Reality (AR) rau Dragonboard410c lossis Dragonboard820c Siv OpenCV thiab Python 3.5: 4 Cov Kauj Ruam
Augmented Reality (AR) rau Dragonboard410c lossis Dragonboard820c Siv OpenCV thiab Python 3.5: 4 Cov Kauj Ruam

Video: Augmented Reality (AR) rau Dragonboard410c lossis Dragonboard820c Siv OpenCV thiab Python 3.5: 4 Cov Kauj Ruam

Video: Augmented Reality (AR) rau Dragonboard410c lossis Dragonboard820c Siv OpenCV thiab Python 3.5: 4 Cov Kauj Ruam
Video: Daily News Simplified 24-08-19 (The Hindu Newspaper - Current Affairs - Analysis for UPSC/IAS Exam) 2024, Kaum ib hlis
Anonim
Augmented Reality (AR) rau Dragonboard410c lossis Dragonboard820c Siv OpenCV thiab Python 3.5
Augmented Reality (AR) rau Dragonboard410c lossis Dragonboard820c Siv OpenCV thiab Python 3.5

Cov lus qhia no piav qhia yuav ua li cas rau nruab OpenCV, Python 3.5, thiab kev vam khom rau Python 3.5 kom ua tiav daim ntawv thov kev muaj tiag.

Kauj ruam 1: Yuav tsum tau ua

Koj yuav xav tau cov hauv qab no:

Dragonboard 410c lossis 820c;

Kev teeb tsa huv ntawm Linaro-alip/tus tsim tawm;

DB410c: Xeem hauv version v431.link

snapshots.linaro.org/96boards/dragonboard4..

DB820c: Xeem hauv version v228.link

snapshots.linaro.org/96boards/dragonboard8..

Tsawg kawg 16GB muaj peev xwm MicroSD Card (Yog tias siv Dragonboard 410c);

Rub tawm cov ntawv (hauv qhov kawg ntawm qib no), unzip thiab luam rau daim npav MicroSD;

Pom: Yog tias siv Dragonboard 820c, rub tawm cov ntawv, unzip thiab txav mus rau/home/*USER*/kom yooj yim siv cov lus txib;

  • USB Hub;
  • USB nas thiab keyboard;
  • Kev sib txuas hauv is taws nem.

Kauj Ruam 2: Mount MicroSD Card (Tsuas yog W/ Dragonboard410c)

Qhib lub davhlau ya nyob twg hauv Dragonboard;

  • Hauv lub davhlau ya nyob twg khiav fdisk:

$ sudo fdisk -l

  • Ntxig daim npav MicroSD rau hauv DragonBoard MicroSD daim npav qhov;
  • Khiav fdisk dua, nrhiav lub npe (thiab muab faib) ntawm cov cuab yeej tshiab hauv cov npe:

$ sudo fdisk -l

Mus rau hauv paus cov npe:

$ cd ~ ib

Tsim daim nplaub tshev:

$ mkdir sdfolder cov

Mount MicroSD daim npav:

mount /dev /sd_card_partition_name sdfolder

Kauj Ruam 3: Txhim Kho Cov Qauv Yuav Tsum Tau Ua

Qhib lub davhlau ya nyob twg hauv Dragonboard;

Hauv lub davhlau ya nyob twg, mus rau cov npe xaiv (siv "~" rau 820c thiab teeb tsa SDCard rau 410c):

(820c) $ cd

(410c) $ cd ~/sdfolder

Khiav zram.sh tsab ntawv:

$ sudo bash augmented_reality/scripts/zram.sh

Hloov kho qhov system:

sudo apt hloov tshiab && sudo apt hloov tshiab

Nruab cov pob no:

sudo apt install -y debootstrap schroot git curl pkg-config zip unzip sej python-pip g ++ zlib1g-dev openjdk-8-jdk libhdf5-dev libatlas-base-dev gfortran v4l-utils hdf5* libhdf5* libpng-dev build-essential cmake libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libjpeg-dev libtiff5-dev libavcodec-dev libavformat-dev libswscale-dev libv4l-dev libxvidcore-dev libgtk2.0-dev libgtk-3-dev

Mus rau phau ntawv no:

$ cd /usr /src

Rub tawm Python 3.5:

sudo wget

Extract lub pob:

$ sudo tar xzf Python-3.5.6.tgz

Rho tawm cov pob ntim:

$ sudo rm Python-3.5.6.tgz

Mus rau Python 3.5 cov npe:

$ cd Python-3.5.6

Pab kom ua kom zoo dua rau Python 3.5 muab tso ua ke:

$ sudo./configure-qhib-optimizations

Sau Python 3.5:

$ sudo ua altinstall

Txhim kho pip thiab teeb tsa cov cuab yeej:

$ sudo python3.5 -m pip nruab -hloov kho pip && python3.5 -m pip nruab -hloov kho setuptools

Nruab numpy:

$ python3.5 -m pip nruab numpy

Mus rau phau ntawv teev npe xaiv:

(820c) $ cd ~

(410c) $ cd ~/sdfolder

Clone OpenCV thiab OpenCV Pab cov chaw cia khoom:

$ sudo git clone -b 3.4 https://github.com/opencv/opencv.git && sudo git clone -b 3.4

Mus rau phau ntawv teev npe:

$ cd opencv

Tsim cov npe thiab mus rau nws:

$ sudo mkdir tsim && cd tsim

Khiav CMake:

$ sudo cmake -D CMAKE_BUILD_TYPE = RELEASE -D CMAKE_INSTALL_PREFIX =/usr/local -D BUILD_opencv_java = OFF -D BUILD_opencv_python = OFF -D BUILD_opencv_python3 = ON -D PYTHON3_DEFAULEX = $ $ uas python3.5) -D PYTHON_INCLUDE_DIR =/usr/local/suav nrog/python3.5m/-D INSTALL_C_EXAMPLES = OFF -D INSTALL_PYTHON3_EXAMPLES = OFF -D BUILD_EXAMPLES = OFF -D WITH_CUDA = OFF -D BLDS -DBUILD_TBB = ON -D OPENCV_ENABLE_NONFREE = ON -DBUILD_opencv_xfeatures2d = OFF -D OPENGL = ON -D OPENMP = ON -D ENABLE_NEON = ON -D BUILD_PERF_TESTS = OFF -D OPENCV_EXTRA_MODULES..

Sau OpenCV nrog 4 cores:

$ sudo ua -j 4

Nruab OpenCV:

$ sudo ua nruab

Mus rau phau ntawv teev npe xaiv:

(820c) $ cd ~

(410c) $ cd ~/sdfolder

Nruab Python3.5 cov tseev kom muaj:

$ sudo python3.5 -m pip install -r requirements.txt --no -cache -dir

Ntsuas ntshuam:

sej 3.5

> ntshuam cv2 >> ntshuam hwj chim

Kauj Ruam 4: Khiav AR Daim Ntawv Thov

Khiav daim ntawv thov AR
Khiav daim ntawv thov AR

Mus rau phau ntawv teev npe xaiv:

(820c) $ cd

(410c) $ cd ~/sdfolder

Mus rau augmented reality directory:

$ cd augmented_reality/

Khiav daim ntawv thov:

$ python3.5 app.py

Pom: Tam sim no txuas lub USB lub koob yees duab thiab qhib siv browser nrog lub rooj IP chaw nyob thiab chaw nres nkoj (piv txwv li 192.168.1.1:5000), luam tus qauv khaws tseg rau hauv daim nplaub tshev siv thiab muab tso rau ntawm xub ntiag ntawm lub vev xaib xws li cov duab nyob rau sab saum toj. Nws muaj peev xwm hloov pauv tsiaj los ntawm kev tawm tsam qhov chaws, mus rau kab 92 thiab hloov lub npe ua ntej kaw cov vis dis aus hais kom ua, cov tsiaj muaj av yog: nyuj, hma liab, pirate-nkoj-rog, nas thiab hma. Nws kuj tseem tuaj yeem hloov cov duab siv los ntawm kev hloov cov duab hauv daim nplaub tshev siv.

Pom zoo: