Intel Delta 8 course practice
- Download and install Adnroid Studio from https://developer.android.com/studio
- Create a new project. Keep default settings.
- Probably you'll face a error similar to the following:
Click onto highlighted link to resolve it. Then you may see the next one error:
Resolve it in the same way.
-
Plug in USB cable connected to device. Make sure that Developers Mode on the device is enabled. You may find an appropriate instructions for your version of OS.
-
Authorize an Android device.
-
Ubuntu
- Install Android Debug Bridge
$ sudo apt-get install adb
- Check device id
$ lsusb Bus 003 Device 008: ID 1bbb:9018 T & A Mobile Phones
- Add the following line to
/etc/udev/rules.d/51-android.rules
(create it if there is no file). The first 4 symbols are vendor's id and the last one are product's id:
SUBSYSTEM="usb", ATTRS{idVendor}=="1bbb", ATTRS{idProduct}=="9018", MODE=="0666"
Note that
sudo
directive may be required. Applysudo chmod a+rw /etc/udev/rules.d/51-android.rules
after all above.- Restart
adb
service. Probably, connection should be permitted from the device side (notification will appear). Check that device is detected byadb devices
.
$ sudo adb kill-server && sudo adb start-server && sudo adb devices List of devices attached PEJB25BF4MXAHN4 device
- In case of undetected device problem at Android Studio or permissions
problems just restart
adb
again and make sure that device is detected.
-
Windows
- No specific settings are required (tested on Windows 10).
- Launch a project on device by
Run->Run 'app'
. Select detected device.
- Python
- NumPy
sudo apt-get install python-pip && sudo pip install numpy
for Ubuntu
- Download OpenCV source code from https://github.com/opencv/opencv or using git:
git clone https://github.com/opencv/opencv --depth 1
- Create a folder for OpenCV's build.
cd /path/to/opencv
mkdir build && cd build
- Build OpenCV.
- Ubuntu
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_LIST=dnn,python2,videoio,highgui /path/to/opencv && make -j4
-
Windows
"C:\Program Files\CMake\bin\cmake.exe" ^ -DCMAKE_BUILD_TYPE=Release ^ -DBUILD_LIST=dnn,python2,videoio,highgui ^ -G "Visual Studio 14 Win64" /path/to/opencv "C:\Program Files\CMake\bin\cmake.exe" --build . --config Release -- /m:4
import cv2 as cv
img = cv.imread('/path/to/example.png')
cv.imshow('Hello!', img)
cv.waitKey()