Skip to content

Raspberry Pi camera installed on pan-tilt servo platform with face recognition and automatic tracking

License

Notifications You must be signed in to change notification settings

inemov/servo_moving_camera

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

servo_moving_camera

Raspberry Pi camera installed on pan-tilt servo platform with face recognition and automatic tracking

pyqt5

Hardware

Software

sudo apt install python3
sudo apt-get install python3-venv
python3 -m venv cv

NOTE: multiple SIP installations can cause errors when importing PyQt5 in python. If below solution does not work, then burn image backup on SD card and try something else. Don't try to install something else on top of non working image.

  1. take SD card image backup NOTE: not all SIP's are compatible with all PyQt5. Read installation documentation to check compatibility.

  2. download required PyQt5 source, for example: PyQt5_gpl-5.12.3.tar.gz from https://riverbankcomputing.com/software/pyqt/download5 (see also in code\install-pyqt5)

  3. download required SIP source, for example: sip-4.19.14.tar.gz from https://riverbankcomputing.com/software/sip/download (see also in code\install-pyqt5)

  4. place the archives in convenient directory, for example: /home/pi

  5. from terminal go to the directory where archieves are located:

cd /home/pi
  1. unzip the archives using:
tar -xzvf PyQt5_gpl-5.12.3.tar.gz
tar -xzvf sip-4.19.14.tar.gz
  1. go to virtual environment:
workon cv
  1. install QT Core:
sudo apt-get install qt5-default
  1. configure SIP:
cd /home/pi/sip-4.19.14
python configure.py --sip-module PyQt5.sip
  1. build and install SIP make:
make
sudo make install
  1. configure PyQt5:
cd /home/pi/PyQt5_gpl-5.12.3
python configure.py
  1. build and install PyQt5 make:
make
sudo make install

NOTE: building PyQt5 make takes 2 hours in Raspberry Pi 3 A+, installing takes another 15 min

  1. Solve cv2 imshow bug in pyqt5:
sudo nano /etc/xdg/qt5ct/qt5ct.conf

replace style=gtk2 with style=gtk3 ctrl+x y ENTER

  • Configure script and autostart: Take all .py .xml .csv files from repository code folder to Raspberry PI \home\pi\pan-tilt-control In terminal:
crontab -e

add at the end

@reboot DISPLAY=:0 /home/pi/pan-tilt-control/astart.sh >> /home/pi/pan-tilt-control/reboot.log 2>&1

About

Raspberry Pi camera installed on pan-tilt servo platform with face recognition and automatic tracking

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published