/Photobox

GUI to control the Photobox camera and use it to capture images with set camera settings so all the users do is select the food load and capture images.

Primary LanguagePythonMIT LicenseMIT

PhotoBox fixture

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.

Forks Issues MIT License

Logo

Built With

Getting Started

$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.

Prerequisites

What things you need to install the software and how to install them

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

Installation

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

Tests

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

Deployment

  • 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!

What to do if you have a problem

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)

Contributing

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.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Vikram Seshadri Project Link: https://github.com/vikramsesh/Photobox

Acknowledgments