Skip to content
ivmech edited this page Dec 19, 2014 · 2 revisions

Sample python script ivport_fast.py is capturing faster than raspistill and switching camera with using GPIO levels one by one in loop that captures with using ivport_fast.sh capture. Before using it, required dependency python-rpi.gpio have to be installed with sudo apt-get install python-rpi.gpio command from the Terminal.

Changing Permissions of Shell Scripts and Daemon File

First it is needed to be change permissions of ivport_fast.sh and ivportfastcamd files with;

chmod +x ivport_fast.sh

chmod +x ivportfastcamd

Starting Ivport Fast Capture

Therefore it can be started with sudo python ivport_fast.py from the Terminal.

It saves out_0.jpg, out_1.jpg, out_2.jpg, out_3.jpg to working directory.

Capture names and resolutions can be changed in ivport_fast.sh bash script.

...
output_file="out_%d.jpg"
height="480"
width="640"
...

Capture timing can be changed in ivport_fast.py python scrpt.

...
def capture():
    do = "./ivport_fast.sh capture"
    #time.sleep(0.7)
    os.system(do)
    time.sleep(0.3)
...

Note: ivportfastcamd binary daemon is based on raspicam and raspifastcamd at Niklas Rother's Rasperry Pi Userland repository.

Clone this wiki locally