|<< 
Wojciech Adam Koszek 
> Other





Image acquisition with Canon A510 camera and gphoto2 with FreeBSD

Wojciech A. Koszek
wkoszek@FreeBSD.org
2009.03.02

Introduction

I use camera only for technical purposes. Mostly when I get operating system kernel to panic for some reason and it isn't possible to obtain the panic message via serial port/FireWire. I used to just copy images directly from the camera, but moving SD card in and out didn't work for me in a longer term.

This page presents how to interact with my Canon PowerShot A510 camera with gphoto2.

Software installation and setup

Once I switch my camera to viewing photos, it apears on a USB bus as USB Generic Device:

	ugen0.4: <Canon Inc.> at usbus0

No further kernel-related installation is needed. gphoto2 operates on ugen(4) instance.

Obtaining photos

For the list of photos present in the camera's SD card type:

wkoszek@laptop:~# gphoto2 -L
	Nie ma plików w folderze '/'.                                                  
	Nie ma plików w folderze '/store_00010001'.
	Nie ma plików w folderze '/store_00010001/DCIM'.
	Jest 11 plików w folderze '/store_00010001/DCIM/111CANON'.
	#1     IMG_1166.JPG                 1006 KB 2048x1536 image/jpeg
	#2     IMG_1167.JPG                  786 KB 2048x1536 image/jpeg
[..]
	#10    IMG_1175.JPG                  884 KB 2048x1536 image/jpeg
	#11    IMG_1176.JPG                 1136 KB 2048x1536 image/jpeg
	Nie ma plików w folderze '/store_00010001/MISC'.
	Nie ma plików w folderze '/store_80000001'.

Obtaining all photos from the camera is very easy:

	wkoszek@laptop:/tmp/photo# gphoto2 -P
	Downloading 'IMG_1166.JPG' from folder '/store_00010001/DCIM/111CANON'...      
	Saving file as IMG_1166.JPG                                                    
	Downloading 'IMG_1167.JPG' from folder '/store_00010001/DCIM/111CANON'...
	Saving file as IMG_1167.JPG                                                    
	Downloading 'IMG_1168.JPG' from folder '/store_00010001/DCIM/111CANON'...
[..]
	Saving file as IMG_1175.JPG                                                    
	Downloading 'IMG_1176.JPG' from folder '/store_00010001/DCIM/111CANON'...
	Saving file as IMG_1176.JPG                                                    

So is obtaining miniatures:

	wkoszek@laptop:/tmp/photo# gphoto2 -T
	Downloading 'IMG_1166.JPG' from folder '/store_00010001/DCIM/111CANON'...      
	Saving file as thumb_IMG_1166.jpg
	Downloading 'IMG_1167.JPG' from folder '/store_00010001/DCIM/111CANON'...
	Saving file as thumb_IMG_1167.jpg
[..]
	Downloading 'IMG_1176.JPG' from folder '/store_00010001/DCIM/111CANON'...
	Saving file as thumb_IMG_1176.jpg

That's it.