gPhoto2 is a crazy lib that allows your to control thousands of cameras via usb etc. I was going to use this lib for a project that I’m working on but I think im going to run out of time. I’m posting it to the boards to see if people are interested in playing with it.
you can read more about gPhoto2 here:
http://www.gphoto.org/
It would be killer to have an addon that could talk to any (well thousands of cameras) I used macports to install the lib.
Here is a really really rough hack but at least the lib is compiling in xocde with OF. download here:
http://www.toddvanderlin.com/OF/Camera.zip
Here is a video of it tethered to my mac via terminal It was firing really fast super cool.
http://vimeo.com/4593893
here is a list of supported cameras:
http://www.gphoto.org/proj/libgphoto2/support.php
Happy hacking
T
Wow, that list is huge. My ~5 year old camera is even on there!
From what I understand, though, it’s only good for Unix-like OSes? I.e., no Windows, and I should have installed Ubuntu by now anyway…?
arturo
May 12, 2009, 6:12pm
#3
Hey todd
so this is the library used under gnome to access the photos stored in a camera but from what i see in your video it also supports taking photos directly from the computer, right?
hmm i dont think so - sorry the video is a bit weird i was firing from the SLR and it was uploading.
arturo
May 12, 2009, 10:47pm
#5
ooh! i supposed so but for a moment i doubted, it would be so nice anyway being able to see the new photos as they’re taken is really interesting too
I misunderstood too, I thought this allowed you to remotely trigger the camera also…
grimus
May 12, 2009, 10:53pm
#7
it does it allows total access to the camera. I thought you were talking about isight or something oops
moka
May 13, 2009, 7:45am
#9
sweet. i might look into that too!
arturo
May 13, 2009, 8:29am
#10
uh, that’s so cool i always thought you could only trigger the camera with the propietary api from canon or whatever
julapy
May 13, 2009, 11:39am
#11
thats pretty sweet…
wonder if it would be possible to make an iphone app and use it as a remote trigger…
you would need to work out first if its possible to connect the iphone to the camera using their usb connection. or maybe wirelessly for wifi cameras.
L.
we should all try and get this thing to compile in OF. This link is great there is some nice stuff.
http://georgelandon.blogspot.com/2008/0 … n-xti.html
The code i posted will do a basic auto detection to find a camera plugged in I’m stuck after that.
#include "gphoto2.h" // put int the setup.h
//put in the setup()
GPContext * context = NULL;
CameraAbilitiesList * al = NULL;
CameraList camList = NULL;
GPPortInfoList portInfoList = NULL;
gp_list_new(&camList);
gp_abilities_list_new(&al);
gp_abilities_list_load(al, context);
gp_port_info_list_new(&portInfoList);
gp_port_info_list_load(portInfoList);
gp_abilities_list_detect(al, portInfoList, camList, context); //auto detect
if(gp_list_count(camList)) {
printf("--- List:%i ---\n", gp_list_count(camList));
for(int i=0; i<gp_list_count(camList); i++) {
const char *camName, *camValue;
gp_list_get_name(camList, i, &camName);
gp_list_get_value(camList, i, &camValue);
printf("--- Name:%s ---\n", camName);
printf("--- port:%s ---\n", camValue);
}
}
Connect a camera to your computer and run the above code in your setup. You should see the camera connected to your computer.