This repository consists of instructions to set up a Photobooth using 96Boards CE.
Table of Contents
- 1) Hardware
- 2) Software Setup
- 3) Hardware Setup
- 4) 96Boards Photobooth
- 5) Video Demonstration
1.1) Hardware Requirements
- 96Boards Compliant Power Supply
- D3 Mezzanine with OV5640 Camera Sensor
- Push Buttons
- Connecting Wires
2) Software Setup
Note: All of the instructions needs to be carried out in Dragonboard410c.
Flash Boot and Root file system images using the instructions provided in D3 Enginerring WiKi.
2.1) Setting up MRAA
Install MRAA from source using the instructions provided in MRAA documentation page.
2.2) Setting up OpenCV
Setup OpenCV using the instructions provided in Projects Org, just follow it for installing OpenCV. Only change required is to replace the cmake command with below one:
$ cmake -D CMAKE_BUILD_TYPE=RELEASE -DWITH_LIBV4L=ON -DWITH_GSTREAMER=ON -DWITH_OPENCL=ON -DBUILD_EXAMPLES=OFF -DBUILD_opencv_apps=OFF -DBUILD_DOCS=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_PRECOMPILED_HEADERS=OFF -DOPENCV_EXTRA_MODULES_PATH=<opencv_contrib>/modules ../
2.3) Setting up AWS S3
Setup AWS S3 bucket and Boto SDK using the instructions provided in Projects Org.
In addition to the above packages, install below libraries:
$ sudo apt-get update $ sudo apt-get install python3 $ sudo apt-get install python3-pip $ sudo pip3 install pillow $ sudo apt-get install qrencode
- Install Pyshortener
3) Hardware Setup
- Make sure Dragonboard410c is turned off
- Connect OV5640 to D3 Camera Mezzanine
- Place D3 Camera Mezzanine on top of Dragonboard
- Connect Linksprite LCD screen to Dragonboard
- Connect Capture Push button to Pin 12 of J5 connector on Camera Mezzanine
- Connect Filter Push button to Pin 10 of J5 connector on Camera Mezzanine
- Assemble the whole setup in a kit
- Power on Dragonboard using compatible power supply
Note: Push buttons needs to be connected in Pull down mode.
Note: You can also use USB camera for this project. Just provide the correct video source in
4) 96Boards Photobooth
After setting up all of the hardware and software mentioned above, follow the below steps to execute photobooth.
Replace the default S3 Bucket URL with your own S3 URL in the
url = "https://s3-ap-southeast-1.amazonaws.com/96boards-photobooth/" + "final/user_" + str(count) + ".png"
Note: By default, all the images will be pushed to the public
96boards-photoboothbucket created by 96Boards.
Now, clone the photobooth github repository.
$ git clone https://github.com/96boards-projects/photobooth.git
Finally, execute the photobooth as below:
$ mkdir captured final $ ./init.sh $ sudo python3 photobooth.py
- For changing the filter, press
- For capturing the image, press
After capturing the image, it will be uploaded to the S3 bucket with 96Boards watermark and the tinyurl/qrcode will be displayed for 10 seconds.