This repository consists of instructions to set up a Photobooth using 96Boards CE.
- Dragonboard410c
- 96Boards Compliant Power Supply
- D3 Mezzanine with OV5640 Camera Sensor
- Push Buttons
- Connecting Wires
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.
Install MRAA from source using the instructions provided in MRAA documentation page.
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 ../
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
- 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
photobooth.py
.
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 photobooth.py
script.
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-photobooth
bucket 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
Filter
button - For capturing the image, press
Capture
button
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.