mirror of
https://github.com/CopterExpress/clover.git
synced 2026-05-26 11:43:25 +00:00
Install pyzbar to image (#225)
* Install pyzbar to image I suggest installing pyzbar to RPi image for making barcodes scanning easier during different competitions. * pyzbar: Add libzbar0 install * pyzbar: Add simple tests * pyzbar: Update docs
This commit is contained in:
@@ -95,6 +95,7 @@ libjpeg8 \
|
||||
tcpdump \
|
||||
ltrace \
|
||||
libpoco-dev \
|
||||
libzbar0 \
|
||||
python-rosdep \
|
||||
python-rosinstall-generator \
|
||||
python-wstool \
|
||||
@@ -157,6 +158,10 @@ echo_stamp "Installing ptvsd"
|
||||
my_travis_retry pip install ptvsd
|
||||
my_travis_retry pip3 install ptvsd
|
||||
|
||||
echo_stamp "Installing pyzbar"
|
||||
my_travis_retry pip install pyzbar
|
||||
my_travis_retry pip3 install pyzbar
|
||||
|
||||
echo_stamp "Add .vimrc"
|
||||
cat << EOF > /home/pi/.vimrc
|
||||
set mouse-=a
|
||||
|
||||
@@ -26,5 +26,6 @@ from pymavlink import mavutil
|
||||
import rpi_ws281x
|
||||
import pigpio
|
||||
from espeak import espeak
|
||||
from pyzbar import pyzbar
|
||||
|
||||
print cv2.getBuildInformation()
|
||||
|
||||
@@ -3,5 +3,6 @@
|
||||
# Make sure our Python 3 software is installed
|
||||
|
||||
import cv2
|
||||
from pyzbar import pyzbar
|
||||
|
||||
print(cv2.getBuildInformation())
|
||||
|
||||
@@ -94,13 +94,7 @@ The obtained images can be viewed using [web_video_server](web_video_server.md).
|
||||
|
||||
> **Hint** For high-speed recognition and positioning, it is better to use [ArUco markers](aruco.md).
|
||||
|
||||
To program actions of the copter upon detection of [QR codes](https://en.wikipedia.org/wiki/QR_code) you can use the [pyZBar](https://pypi.org/project/pyzbar/). It should be installed using pip:
|
||||
|
||||
```bash
|
||||
sudo apt update
|
||||
sudo apt install libzbar0
|
||||
sudo pip install pyzbar
|
||||
```
|
||||
To program actions of the copter for the detection of [QR codes](https://en.wikipedia.org/wiki/QR_code) you can use the [pyZBar](https://pypi.org/project/pyzbar/). This lib is installed in the last image for Raspberry Pi.
|
||||
|
||||
QR codes recognition in Python:
|
||||
|
||||
|
||||
@@ -98,13 +98,7 @@ image_pub.publish(bridge.cv2_to_imgmsg(cv_image, 'bgr8'))
|
||||
|
||||
> **Hint** Для высокоскоростного распознавания и позиционирования лучше использовать [ArUco-маркеры](aruco.md).
|
||||
|
||||
Для программирования различных действий коптера при детектировании нужных [QR-кодов](https://ru.wikipedia.org/wiki/QR-код) можно использовать библиотеку [pyZBar](https://pypi.org/project/pyzbar/). Ее нужно установить в помощью pip:
|
||||
|
||||
```bash
|
||||
sudo apt update
|
||||
sudo apt install libzbar0
|
||||
sudo pip install pyzbar
|
||||
```
|
||||
Для программирования различных действий коптера при детектировании нужных [QR-кодов](https://ru.wikipedia.org/wiki/QR-код) можно использовать библиотеку [pyZBar](https://pypi.org/project/pyzbar/). Она уже установлена в последнем образе для Raspberry Pi.
|
||||
|
||||
Распознавание QR-кодов на Python:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user