The program helps users control the capture images and removes the guesswork of the camera settings for specific food loads used. It was designed to keep the camera settings and the file naming metrics consistent across multiple fixtures. This project was designed to aid personel with minimum technical knowledge about programming or camera operations.
$sudo apt-get update
$sudo apt-get upgrade
Check python version using the following command in the terminal
$python --version
If version is not python3 or above, follow instructions on Python3 default to change default python to Python3 if its not already version 3.
What things you need to install the software and how to install them
- Python 3 or greater - Python 3 installation if it's not already present
- gPhoto2 & libgphoto2 - Library used to control the camera parameters and retrieve image from the DSLR
- PyQt5 - GUI for the python script
- omxplayer - Camera LiveView
- matplotlib - To view images
A small library that aims at hiding the various difficulties of dlopening libraries from programmers. It is a system independent dlopen wrapper for GNU libtool.
$sudo apt-get install libltdl-dev
- gphoto2 - Download gphoto latest version from gphoto2 Extract the .tar file in Downloads
$cd <extracted file location>
$./configure
$make
$sudo make install
$cd
$sudo apt-get install gphoto2
$pip3 install gphoto2
- qt5 and QtCreator
$sudo apt-get install qt5-default pyqt5-dev pyqt5-dev-tools
$sudo apt-get install qtcreator
- Omxplayer python wrapper
$ pip3 install omxplayer-wrapper
- Matplotlib
$ pip3 install matplotlib
Update and Upgrade the libraries
$sudo apt-get update
$sudo apt-get upgrade
Copy the uiFiles folder to the location you want to run the program from. Depending on the features you need, copy v1,v2 or v3 to the same folder. For v3, also copy liveview.py to the same folder.
chmod +x main.py
Testing gphoto2 and camera interaction
$gphoto2 --auto-detect
$gphoto2 --capture-image-and-download
Testing Live View - Setting resolution using --win. Ctrl+c or q to quit omxplayer
$mkfifo fifo.mjpg
$gphoto2 --capture-movie --stdout> fifo.mjpg & omxplayer -o hdmi --win "0 0 820 525" fifo.mjpg
- Make sure all the prerequisites are installed.
- Python3 should be the default.
- Make the script executable Open the terminal Ctrl+Alt+T and follow the steps listed below
$cd <folder to execute scripts from> (eg.$cd /home/pi/Desktop)
$chmod +x main.py
You are all set to enjoy the program. CLICK AWAY!
If you find a problem in the UI or with any dependencies or general bug reports, then please report it on the GitHub "issues" page (https://github.com/vikramsesh/Photobox/issues)
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Vikram Seshadri Project Link: https://github.com/vikramsesh/Photobox
- jim-easterbrook - best examples on gphoto2
- Raspberry Pi community
- Python community
- Co-workers
- Img Shields
- Microsoft PowerToys
- Choose an Open Source License