To install ghpto2, there is Sage gonzalo who puts it together in one command, so download the script. And execute. It takes a long time to execute, but it succeeds without catching anything.
wget https://raw.githubusercontent.com/gonzalo/gphoto2-updater/master/gphoto2-updater.sh
chmod 755 gphoto2-updater.sh
sudo ./gphoto2-updater.sh
1) Install last development version
2) Install last stable release (libgphoto 2.5.14; gphoto 2.5.14)
3) Quit
=>Select 2
Allow python to call gpohoto2.
sudo pip3 install gphoto2
sudo pip install gphoto2
Required for programs that use the GUI. pyQt5 could not be installed. .. ..
sudo apt-get install python-pyqt4
sudo apt-get install python3-pyqt4
examples
Download examples from git, run it, and it works.
git clone https://github.com/jim-easterbrook/python-gphoto2
cd python-gphoto2/examples
python3 camera-summary.py
While looking at the manual, try executing a command that seems to be possible immediately. The camera used was the EOS-M3.
gphoto2 --capture-image-and-download
This is a command to shoot with the current camera settings and transfer the image to the Raspberry Pi side. After the transfer, the images will be deleted from the main unit, and if there are image files in the directory on the Raspberry Pi side, they will be serialized **. It's amazing.
When measured with the time
command, it took just over 13 seconds from shooting 24M RAW + JPEG to completing the image transfer. It takes about 3 seconds from focusing to the release of the shutter, and another 3 seconds to start image transfer. Is this the ability of the camera?
# time sudo gphoto2 --capture-image-and-download
New file storage location: /store_00010001/DCIM/187_0917/IMG_2413.CR2 file IMG_2413.Save as CR2
Files in the camera/store_00010001/DCIM/187_0917/IMG_2413.I'm removing CR2
New file storage location: /store_00010001/DCIM/187_0917/IMG_2413.IMG a JPG file_2413.Save as JPG
Files in the camera/store_00010001/DCIM/187_0917/IMG_2413.I'm deleting JPG
real 0m13.243s
user 0m1.090s
sys 0m0.980s
gphoto2 --capture-preview
The live view image is transferred as a still image. In the case of this camera, it was saved at 480x320. The shutter does not release. The measurement result with this time
command is a little over 2 seconds.
If capture_preview.jpg is in a directory, adding "--skip-existing" will exit without overwriting, and adding "--force-overwrite" will force it to be overwritten.
# time sudo gphoto2 --capture-preview
Capture file_preview.Save as jpg
real 0m2.434s
user 0m0.220s
sys 0m0.060s
gphoto2 --capture-movie
** Continuously capture live view images and transfer as MJPEG **. This is amazing. In the case of this camera, it was saved at 480x320. The shutter does not release.
The manual says that the number of seconds is specified, but the number of shots that can be taken is one more. The frame rate is unknown. Is it possible on the camera side?
By the way, there is VLC as a viewer that supports MJPEG.
#time sudo gphoto2 --capture-movie 30
Capturing 30 preview frames as movie to 'movie.mjpg'.
Movie capture finished (31 frames)
real 0m3.030s
user 0m0.170s
sys 0m0.160s
Recommended Posts