Tuesday, January 27, 2015

GPhoto2 Notes

Using Canon A620 with Ubuntu 12.04 LTS

sudo apt-get install gphoto2

Plug in the camera via USB
Set camera to review mode (this camera only connects via PTP, has to be in review mode to activate this)
Docs say to click the PTPbutton but not needed

From command line:
gphoto2 --list-ports
Lists all possible ports gphoto2 could connect on.   Interesting, but I sure hoped I didn't have to use it.

gphoto2 --autodetect
Tries to autodetect the camera.  Luckily this worked for the A620.

gphoto2 --list-config
Lists all the configuration items that can be viewed/edited.

gphoto2 --get-config={listed config item]
Only ones that were interesting to me were mode (Auto/Tv/Av/Manual) and afdistance.  You can't actually control the focus.  For my application, I set the camera to program mode and set to infinity focus from the interface.

gphoto2 --set-config=item=value
Goofy syntax.  For example, gphoto2 --set-config=afdistance=0

gphoto2 --capture-image
Save photo to SD card.

gphoto2 --capture-image-and-download 
Save photo to local device. Can also add -filename blah.jpg afterward to specify filename.  Behind the scenes, I think this takes a picture to the SD card, copies it, and then deletes the file.  

During image capture, despite the camera being in review mode, the camera lens comes out and it takes a picture.

No comments:

Labels

Blog Archive

Contributors