reading image from camera

classic Classic list List threaded Threaded
56 messages Options
123
Reply | Threaded
Open this post in threaded view
|

reading image from camera

rough_neck
Hello,

I would like to be able to read the image from the camera directly, a little at a time
without storing it in gphoto2s memory.

like this:

int image_data_offset;
int length_read;
int ret;
char buf[1024];

gp_camera_capture(....);

fp=fopen("image.jpg","wb");

image_data_offet=0;

while(1) {
    ret=gp_camera_get_image(image_data_offset,buf, 1024, &length_read);
    if (ret<0) break;
    write(fp,buf,length_read);
     image_data_offset +=length_read;
}
fclose(fp);

Here is reading 1024 image bytes at a time from the camera, and saving it to a local file.

Do you know which gphoto API that I can use so I can have a code like the above where
I can basically seek to a position of the cameras image and read a certain amount of image data
without storing the image in gphoto2's memory?

I need access to the image data itself, a little at a time, but without storing the whole image in
gphoto2s memory.

Or, do you know where in the code it reads the data from the camera before it saves it somewhere like to a file or memory or whatever? The spot in the code must be high enough so that it will work for different cameras.

Thanks


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
Gphoto-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-devel
Reply | Threaded
Open this post in threaded view
|

difference between --capture-image and --trigger-capture

rough_neck
Hello,

Anybody knows the difference between the following commands?

--capture-image

--trigger-capture

Thanks


------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Gphoto-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-devel
Reply | Threaded
Open this post in threaded view
|

Re: difference between --capture-image and --trigger-capture

Marcus Meissner
On Fri, Oct 05, 2012 at 10:45:06AM -0700, N S wrote:
> Hello,
>
> Anybody knows the difference between the following commands?
>
> --capture-image
>
> --trigger-capture

trigger capture is a new approach I am trying with 2.5 where capture is started,
but control handed back to the caller. The caller has to use wait_for_event
to poll for the capture finished and object added events.

It is currently not enabled for any camera, first ones will be likely Nikon.

Ciao, Marcus

------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Gphoto-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-devel
Reply | Threaded
Open this post in threaded view
|

Re: difference between --capture-image and --trigger-capture

rough_neck
anybody knows what this command does? 

gphoto2 --set-config capture=on

What does the "capture=on" do? Is that like a bulb mode? What if I say "capture=off" what would that do?

Thanks



From: Marcus Meissner <[hidden email]>
To: N S <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Sent: Friday, October 5, 2012 3:08 PM
Subject: Re: [gphoto-devel] difference between --capture-image and --trigger-capture

On Fri, Oct 05, 2012 at 10:45:06AM -0700, N S wrote:
> Hello,
>
> Anybody knows the difference between the following commands?
>
> --capture-image
>
> --trigger-capture

trigger capture is a new approach I am trying with 2.5 where capture is started,
but control handed back to the caller. The caller has to use wait_for_event
to poll for the capture finished and object added events.

It is currently not enabled for any camera, first ones will be likely Nikon.

Ciao, Marcus



------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Gphoto-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-devel
Reply | Threaded
Open this post in threaded view
|

Re: difference between --capture-image and --trigger-capture

Marcus Meissner-4
On Mon, Oct 15, 2012 at 10:27:55AM -0700, N S wrote:
> anybody knows what this command does? 
>
> gphoto2 --set-config capture=on
>
>
> What does the "capture=on" do? Is that like a bulb mode? What if I say "capture=off" what would that do?

Some cameras need to be switched into a "normal file retrieval" and "capture mode",
namely the Canon Powershot and the Canon EOS series.

This is the toggle configuration property for this.

On the Canon Powershot e.g. it switches events modes and extends the lens with "on"
and retracts it with "off".
On Canon EOS it changes also some event modes.


This setting is not "bulb mode" related.

Ciao, Marcus

------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Gphoto-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-devel
Reply | Threaded
Open this post in threaded view
|

gphoto2 crashing when taking high resolution picture

rough_neck
Hello,

I'm using gphoto2 on a small embedded linux device with only around 4Mb RAM.

I have a quick project where I use gphoto2 to take a picture, then the image over a
TCP/IP link, I dont want to store the image on the local memory, only on the camera.

Everything works fine, until I put my camera in RAW mode to take high
res pictures.

Soon as I take a picture it crashes. The same code runs fine when I run it on my
PC/Ubunto box with a lot more memory.

The image size is around 18Mytes. Somehow gphoto2 is trying to download the
image into its memory as you can see from the crash dump below. OF course
theres not enough RAM for that.

I'm using gp_camera_capture, is there another function that just takes the picture
and leaves it as a FILE  on the camera without downloading it?

The other problem is, when I want to send the image over the TCP/IP link, I
need to get the image FILE a little at a time (since it cant fit into memory), do you
know to do that?

Anyhelp would be appreciated since I'm totally stuck.

My current code is like this 

void capture_it(Camera *camera, GPContext *context)
{
    int retval;
    CameraFile *file;
    CameraFilePath camera_file_path;

    printf("Capturing.....\n");
    strcpy(camera_file_path.folder, "/");
    strcpy(camera_file_path.name, "foo.jpg");
    retval = gp_camera_capture(camera, GP_CAPTURE_IMAGE, &camera_file_path, context);    <----- CRASHES INSIDE HERE
    printf("  Retval: %d\n", retval);
    ....
    ....

as soon as it executes the gp_camera_capture line, it crashes inside that function, dumps out all this (see below where it shows memory allocation failure)

Capturing.....
Downloading... [snip]
[ 8646.800000] Call Trace:[<8026423c>] 0x8026423c
[ 8646.810000] [<8026423c>] 0x8026423c
[ 8646.810000] [<800ac9a0>] 0x800ac9a0
[ 8646.810000] [<800acbb8>] 0x800acbb8
[ 8646.820000] [<800acb10>] 0x800acb10
[ 8646.820000] [<800ad170>] 0x800ad170
[ 8646.820000] [<800affb4>] 0x800affb4
[ 8646.830000] [<800abe8c>] 0x800abe8c
[ 8646.830000] [<801d01b0>] 0x801d01b0
[ 8646.830000] [<800e0a58>] 0x800e0a58
[ 8646.840000] [<800c0ec4>] 0x800c0ec4
[ 8646.840000] [<800c3c4c>] 0x800c3c4c
[ 8646.840000] [<802049e4>] 0x802049e4
[ 8646.850000] [<800c40a4>] 0x800c40a4
[ 8646.850000] [<8006bf30>] 0x8006bf30
[ 8646.860000] [<800ea3a4>] 0x800ea3a4
[ 8646.860000] [<801d160c>] 0x801d160c
[ 8646.860000] [<800e7dc4>] 0x800e7dc4
[ 8646.870000] [<800e8c98>] 0x800e8c98
[ 8646.870000] [<80063060>] 0x80063060
[ 8646.870000]
[ 8646.870000] Mem-Info:
[ 8646.880000] Normal per-cpu:
[ 8646.880000] CPU    0: hi:    0, btch:   1 usd:   0
[ 8646.880000] active_anon:4920 inactive_anon:13 isolated_anon:0
[ 8646.880000]  active_file:0 inactive_file:11 isolated_file:0
[ 8646.880000]  unevictable:0 dirty:0 writeback:0 unstable:0
[ 8646.880000]  free:180 slab_reclaimable:258 slab_unreclaimable:1061
[ 8646.880000]  mapped:5 shmem:32 pagetables:58 bounce:0
[ 8646.910000] Normal free:720kB min:720kB low:900kB high:1080kB active_anon:19680kB inactive_anon:52kB active_file:0kB inactive_file:44kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:32512kB mlocked:0kB dirty:0kB writeback:0kB mapped:20kB shmem:128kB slab_reclaimable:1032kB slab_unreclaimable:4244kB kernel_stack:296kB pagetables:232kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:4264 all_unreclaimable? yes
[ 8646.950000] lowmem_reserve[]: 0 0
[ 8646.950000] Normal: 0*4kB 0*8kB 1*16kB 0*32kB 1*64kB 1*128kB 0*256kB 1*512kB 0*1024kB 0*2048kB 0*4096kB = 720kB
[ 8646.960000] 43 total pagecache pages
[ 8646.970000] 0 pages in swap cache
[ 8646.970000] Swap cache stats: add 0, delete 0, find 0/0
[ 8646.980000] Free swap  = 0kB
[ 8646.980000] Total swap = 0kB
[ 8646.980000] 8192 pages RAM
[ 8646.980000] 823 pages reserved
[ 8646.990000] 17 pages shared
[ 8646.990000] 7114 pages non-shared
[ 8646.990000] [ pid ]   uid  tgid total_vm      rss cpu oom_adj oom_score_adj name
[ 8647.000000] [  428]     0   428      375       19   0       0             0 ash
[ 8647.010000] [  533]     0   533      377       20   0       0             0 syslogd
[ 8647.020000] [  535]     0   535      372       16   0       0             0 klogd
[ 8647.020000] [  537]     0   537      211       29   0       0             0 hotplug2
[ 8647.030000] [  543]     0   543      215       15   0       0             0 ubusd
[ 8647.040000] [  549]     0   549      377       45   0       0             0 netifd
[ 8647.050000] [  702]     0   702      375       18   0       0             0 watchdog
[ 8647.050000] [  812]     0   812      350       25   0       0             0 hostapd
[ 8647.060000] [ 1061]     0  1061      288       19   0       0             0 dropbear
[ 8647.070000] [ 1072]     0  1072      373       16   0       0             0 telnetd
[ 8647.080000] [ 1107] 65534  1107      237       23   0       0             0 dnsmasq
[ 8647.080000] [ 1120]     0  1120      375       19   0       0             0 ntpd
[ 8647.090000] [ 1307]     0  1307     5539     4624   0       0             0 gphoto2
[ 8647.100000] Out of memory: Kill process 1307 (gphoto2) score 598 or sacrifice child  <<<<<<<<<<<<<<---------- OUT OF MEMORY
[ 8647.110000] Killed process 1307 (gphoto2) total-vm:22156kB, anon-rss:18496kB, file-rss:0kB
[ 8647.120000] gphoto2: page allocation failure: order:0, mode:0x20058              <<<<<<<<<<<------------- ALLOCATION FAILURE
[ 8647.120000] Call Trace:[<8026423c>] 0x8026423c
[ 8647.130000] [<8026423c>] 0x8026423c
[ 8647.130000] [<800add48>] 0x800add48
[ 8647.130000] [<800b0048>] 0x800b0048
[ 8647.140000] [<800aa528>] 0x800aa528
[ 8647.140000] [<800ff668>] 0x800ff668
[ 8647.140000] [<800da208>] 0x800da208
[ 8647.150000] [<800b61d8>] 0x800b61d8
[ 8647.150000] [<80125378>] 0x80125378
[ 8647.150000] [<8008a7dc>] 0x8008a7dc
[ 8647.160000] [<80125a34>] 0x80125a34
[ 8647.160000] [<80126ee4>] 0x80126ee4
[ 8647.160000] [<8015ea8c>] 0x8015ea8c
[ 8647.170000] [<800b3050>] 0x800b3050
[ 8647.170000] [<800af20c>] 0x800af20c
[ 8647.170000] [<800b33d4>] 0x800b33d4
[ 8647.180000] [<800abd94>] 0x800abd94
[ 8647.180000] [<800c0ec4>] 0x800c0ec4
[ 8647.180000] [<800c3c4c>] 0x800c3c4c
[ 8647.190000] [<80160ba4>] 0x80160ba4
[ 8647.190000] [<800c40a4>] 0x800c40a4
[ 8647.200000] [<8006bf30>] 0x8006bf30
[ 8647.200000] [<8007c48c>] 0x8007c48c
[ 8647.200000] [<80094548>] 0x80094548
[ 8647.210000] [<80094704>] 0x80094704
[ 8647.210000] [<80094b48>] 0x80094b48
[ 8647.210000] [<802678e4>] 0x802678e4
[ 8647.220000] [<800771a0>] 0x800771a0
[ 8647.220000] [<80063060>] 0x80063060
[ 8647.220000]
[ 8647.220000] Mem-Info:
[ 8647.230000] Normal per-cpu:
[ 8647.230000] CPU    0: hi:    0, btch:   1 usd:   0
[ 8647.230000] active_anon:4920 inactive_anon:13 isolated_anon:0
[ 8647.230000]  active_file:0 inactive_file:11 isolated_file:0
[ 8647.230000]  unevictable:0 dirty:0 writeback:0 unstable:0
[ 8647.230000]  free:180 slab_reclaimable:258 slab_unreclaimable:1061
[ 8647.230000]  mapped:5 shmem:32 pagetables:58 bounce:0
[ 8647.260000] Normal free:720kB min:720kB low:900kB high:1080kB active_anon:19680kB inactive_anon:52kB active_file:0kB inactive_file:44kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:32512kB mlocked:0kB dirty:0kB writeback:0kB mapped:20kB shmem:128kB slab_reclaimable:1032kB slab_unreclaimable:4244kB kernel_stack:296kB pagetables:232kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:4264 all_unreclaimable? yes
[ 8647.300000] lowmem_reserve[]: 0 0
[ 8647.300000] Normal: 0*4kB 0*8kB 1*16kB 0*32kB 1*64kB 1*128kB 0*256kB 1*512kB 0*1024kB 0*2048kB 0*4096kB = 720kB
[ 8647.310000] 43 total pagecache pages
[ 8647.320000] 0 pages in swap cache
[ 8647.320000] Swap cache stats: add 0, delete 0, find 0/0
[ 8647.330000] Free swap  = 0kB
[ 8647.330000] Total swap = 0kB
[ 8647.330000] 8192 pages RAM
[ 8647.330000] 823 pages reserved
[ 8647.340000] 17 pages shared
[ 8647.340000] 7114 pages non-shared
Killed



------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Gphoto-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-devel
Reply | Threaded
Open this post in threaded view
|

Re: gphoto2 crashing when taking high resolution picture

Dan Fandrich
On Mon, Oct 22, 2012 at 06:56:16AM -0700, N S wrote:

> I'm using gphoto2 on a small embedded linux device with only around 4Mb RAM.
>
> I have a quick project where I use gphoto2 to take a picture, then the image
> over a
> TCP/IP link, I dont want to store the image on the local memory, only on the
> camera.
>
> Everything works fine, until I put my camera in RAW mode to take high
> res pictures.
>
> Soon as I take a picture it crashes. The same code runs fine when I run it on
> my
> PC/Ubunto box with a lot more memory.
>
> The image size is around 18Mytes. Somehow gphoto2 is trying to download the
> image into its memory as you can see from the crash dump below. OF course
> theres not enough RAM for that.
>
> I'm using gp_camera_capture, is there another function that just takes the
> picture
> and leaves it as a FILE  on the camera without downloading it?
>
> The other problem is, when I want to send the image over the TCP/IP link, I
> need to get the image FILE a little at a time (since it cant fit into memory),
> do you
> know to do that?

You should be able to use the gp_camera_file_read() function to download an
image a bit at a time.

>>> Dan

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Gphoto-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-devel
Reply | Threaded
Open this post in threaded view
|

Re: gphoto2 crashing when taking high resolution picture

Marcus Meissner
In reply to this post by rough_neck
On Mon, Oct 22, 2012 at 06:56:16AM -0700, N S wrote:

> Hello,
>
> I'm using gphoto2 on a small embedded linux device with only around 4Mb RAM.
>
> I have a quick project where I use gphoto2 to take a picture, then the image over a
>
> TCP/IP link, I dont want to store the image on the local memory, only on the camera.
>
> Everything works fine, until I put my camera in RAW mode to take high
>
> res pictures.
>
> Soon as I take a picture it crashes. The same code runs fine when I run it on my
>
> PC/Ubunto box with a lot more memory.
>
> The image size is around 18Mytes. Somehow gphoto2 is trying to download the
> image into its memory as you can see from the crash dump below. OF course
> theres not enough RAM for that.
>
> I'm using gp_camera_capture, is there another function that just takes the picture
>
> and leaves it as a FILE  on the camera without downloading it?
>
> The other problem is, when I want to send the image over the TCP/IP link, I
>
> need to get the image FILE a little at a time (since it cant fit into memory), do you
>
> know to do that?
>
> Anyhelp would be appreciated since I'm totally stuck.
> My current code is like this 
>
> void capture_it(Camera *camera, GPContext *context)
> {
>     int retval;
>     CameraFile *file;
>     CameraFilePath camera_file_path;
>
>     printf("Capturing.....\n");

...
>     strcpy(camera_file_path.folder, "/");
>     strcpy(camera_file_path.name, "foo.jpg");

This part is useless, as camera_file_path is a "OUT" only structure from gp_camera_capture.

>     retval = gp_camera_capture(camera, GP_CAPTURE_IMAGE, &camera_file_path, context);    <----- CRASHES INSIDE HERE
>     printf("  Retval: %d\n", retval);
>     ....
>
> as soon as it executes the gp_camera_capture line, it crashes inside that function, dumps out all this (see below where it shows memory allocation failure)

The question is: what mode do you use?

Do you use capture to SDRAM or capture to CARD?

In "capture to SDRAM" mode, the image is download in full to the machine
on capture completion currently. This is kind of unavoidable with the
current API.

In "capture to CARD" you can then download it via gp_file_new_from_fd or gp_file_new_from_handler
or gp_camera_file_read() (latter 2 in 2.5.0 only)

Ciao, Marcus

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Gphoto-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-devel
Reply | Threaded
Open this post in threaded view
|

Re: gphoto2 crashing when taking high resolution picture

rough_neck
Hello,

Thanks for the tip. I was experimenting today and noticed that I can get
it to work even using internal RAM (rather than the SD card)  and in
RAW high resoution mode. Here is what I did....

I use gp_camera_wait_for_event to wait for me to manually press the
shutter release on the camera to take a picture, generating an event.

When the event came in, I use gp_camaera_file_read which takes an
offset and size, allowing me to get smaller chunks of the image at a
time from the camera, until the whole 18Mbyte image was received.

So it only crashes when I use gp_camera_capture to force the camera
to take the picture, since its trying for some reason to get the whole
image into RAM.

Is there another API function other than gp_camera_capture, that generates
both capture AND an EVENT that can be caught by gp_camera_wait_for_event?

Thanks



From: Marcus Meissner <[hidden email]>
To: N S <[hidden email]>
Cc: Marcus Meissner <[hidden email]>; "[hidden email]" <[hidden email]>
Sent: Monday, October 22, 2012 4:52 PM
Subject: Re: [gphoto-devel] gphoto2 crashing when taking high resolution picture

On Mon, Oct 22, 2012 at 06:56:16AM -0700, N S wrote:

> Hello,
>
> I'm using gphoto2 on a small embedded linux device with only around 4Mb RAM.
>
> I have a quick project where I use gphoto2 to take a picture, then the image over a
>
> TCP/IP link, I dont want to store the image on the local memory, only on the camera.
>
> Everything works fine, until I put my camera in RAW mode to take high
>
> res pictures.
>
> Soon as I take a picture it crashes. The same code runs fine when I run it on my
>
> PC/Ubunto box with a lot more memory.
>
> The image size is around 18Mytes. Somehow gphoto2 is trying to download the
> image into its memory as you can see from the crash dump below. OF course
> theres not enough RAM for that.
>
> I'm using gp_camera_capture, is there another function that just takes the picture
>
> and leaves it as a FILE  on the camera without downloading it?
>
> The other problem is, when I want to send the image over the TCP/IP link, I
>
> need to get the image FILE a little at a time (since it cant fit into memory), do you
>
> know to do that?
>
> Anyhelp would be appreciated since I'm totally stuck.
> My current code is like this 
>
> void capture_it(Camera *camera, GPContext *context)
> {
>     int retval;
>     CameraFile *file;
>     CameraFilePath camera_file_path;
>
>     printf("Capturing.....\n");

...
>     strcpy(camera_file_path.folder, "/");
>     strcpy(camera_file_path.name, "foo.jpg");

This part is useless, as camera_file_path is a "OUT" only structure from gp_camera_capture.

>     retval = gp_camera_capture(camera, GP_CAPTURE_IMAGE, &camera_file_path, context);    <----- CRASHES INSIDE HERE
>     printf("  Retval: %d\n", retval);
>     ....
>
> as soon as it executes the gp_camera_capture line, it crashes inside that function, dumps out all this (see below where it shows memory allocation failure)

The question is: what mode do you use?

Do you use capture to SDRAM or capture to CARD?

In "capture to SDRAM" mode, the image is download in full to the machine
on capture completion currently. This is kind of unavoidable with the
current API.

In "capture to CARD" you can then download it via gp_file_new_from_fd or gp_file_new_from_handler
or gp_camera_file_read() (latter 2 in 2.5.0 only)

Ciao, Marcus



------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Gphoto-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-devel
Reply | Threaded
Open this post in threaded view
|

Re: burst mode

rough_neck
In reply to this post by Marcus Meissner
Hello,

Does anybody know if gphoto2 is capable of doing burst mode? 

I want to be able to take lots of pictures as fast as possible keeping the images 
on the camera (SD card or RAM).

Thanks


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Gphoto-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-devel
Reply | Threaded
Open this post in threaded view
|

Re: burst mode

Marcus Meissner
On Fri, Oct 26, 2012 at 06:16:32AM -0700, N S wrote:
> Hello,
>
> Does anybody know if gphoto2 is capable of doing burst mode? 
>
> I want to be able to take lots of pictures as fast as possible keeping the images 
> on the camera (SD card or RAM).

Yes.

For Nikon there is a config option for burstmode.

the config options:
burstnumber

and perhaps
burstinterval

Ciao, Marcus

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Gphoto-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-devel
Reply | Threaded
Open this post in threaded view
|

Re: burst mode

rough_neck

Thanks for the response,

How would I do it, would it be

set_config_action(&gp_param,"burst number", 10);
gp_camera_trigger_capture(camera,context);

would that capture 5 images fast?

Thanks


From: Marcus Meissner <[hidden email]>
To: N S <[hidden email]>
Cc: "[hidden email]" <[hidden email]>; Marcus Meissner <[hidden email]>
Sent: Friday, October 26, 2012 9:24 AM
Subject: Re: [gphoto-devel] burst mode

On Fri, Oct 26, 2012 at 06:16:32AM -0700, N S wrote:
> Hello,
>
> Does anybody know if gphoto2 is capable of doing burst mode? 
>
> I want to be able to take lots of pictures as fast as possible keeping the images 
> on the camera (SD card or RAM).

Yes.

For Nikon there is a config option for burstmode.

the config options:
burstnumber

and perhaps
burstinterval

Ciao, Marcus



------------------------------------------------------------------------------
WINDOWS 8 is here.
Millions of people.  Your app in 30 days.
Visit The Windows 8 Center at Sourceforge for all your go to resources.
http://windows8center.sourceforge.net/
join-generation-app-and-make-money-coding-fast/
_______________________________________________
Gphoto-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-devel
Reply | Threaded
Open this post in threaded view
|

Re: burst mode

Marcus Meissner-4
On Fri, Oct 26, 2012 at 12:25:58PM -0700, N S wrote:

>
>
> Thanks for the response,
>
> How would I do it, would it be
>
> set_config_action(&gp_param,"burst number", 10);
> gp_camera_trigger_capture(camera,context);
>
> would that capture 5 images fast?

When I write "burstnumber" I did not leave out a space intentionally,
as it is written without space.

I just tried with my D7000:

gphoto2 --set-config burstnumber=5 --capture-image-and-download --wait-event-and-download=10s

and it captured and downloaded 5 images, so it should work if you use "burstnumber"

Ciao, Marcus

------------------------------------------------------------------------------
WINDOWS 8 is here.
Millions of people.  Your app in 30 days.
Visit The Windows 8 Center at Sourceforge for all your go to resources.
http://windows8center.sourceforge.net/
join-generation-app-and-make-money-coding-fast/
_______________________________________________
Gphoto-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-devel
Reply | Threaded
Open this post in threaded view
|

Re: burst mode

rough_neck
Macus,

I have a D7000 too, I like it.

Sadly I cant use --capture-image with my
embedded system doesnt have much memory, I can only use
--trigger-capture, but that doesnt seem to work with burstnumber
it just takes one pocture and gives a bunch of messages

logon@ubuntu:~$ gphoto2 --set-config burstnumber=5 --trigger-capture --wait-event-and-download=20s
Waiting for 20 seconds for events from camera. Press Ctrl-C to abort.         
UNKNOWN PTP Property d1a4 changed
UNKNOWN PTP Property d1f1 changed
Downloading 'DSC_3309.JPG' from folder '/store_00010001/DCIM/102D7000'...
Saving file as DSC_3309.JPG                                                   
Deleting 'DSC_3309.JPG' from folder '/store_00010001/DCIM/102D7000'...
UNKNOWN PTP Property d1a4 changed
UNKNOWN PTP Property d1f1 changed
UNKNOWN PTP Property d1b1 changed
UNKNOWN PTP Property d1b1 changed
UNKNOWN PTP Property d1b1 changed
UNKNOWN PTP Property d1b1 changed
UNKNOWN PTP Property d1b1 changed
UNKNOWN PTP Property d1b1 changed
logon@ubuntu:~$
logon@ubuntu:~$ ls
DSC_3310.JPG
logon@ubuntu:~$





From: Marcus Meissner <[hidden email]>
To: N S <[hidden email]>
Cc: Marcus Meissner <[hidden email]>; "[hidden email]" <[hidden email]>
Sent: Saturday, October 27, 2012 2:24 PM
Subject: Re: [gphoto-devel] burst mode

On Fri, Oct 26, 2012 at 12:25:58PM -0700, N S wrote:

>
>
> Thanks for the response,
>
> How would I do it, would it be
>
> set_config_action(&gp_param,"burst number", 10);
> gp_camera_trigger_capture(camera,context);
>
> would that capture 5 images fast?

When I write "burstnumber" I did not leave out a space intentionally,
as it is written without space.

I just tried with my D7000:

gphoto2 --set-config burstnumber=5 --capture-image-and-download --wait-event-and-download=10s

and it captured and downloaded 5 images, so it should work if you use "burstnumber"

Ciao, Marcus



------------------------------------------------------------------------------
WINDOWS 8 is here.
Millions of people.  Your app in 30 days.
Visit The Windows 8 Center at Sourceforge for all your go to resources.
http://windows8center.sourceforge.net/
join-generation-app-and-make-money-coding-fast/
_______________________________________________
Gphoto-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-devel
Reply | Threaded
Open this post in threaded view
|

Re: burst mode

Marcus Meissner-4
On Sun, Oct 28, 2012 at 06:23:03AM -0700, N S wrote:

> Macus,
>
> I have a D7000 too, I like it.
>
> Sadly I cant use --capture-image with my
> embedded system doesnt have much memory, I can only use
> --trigger-capture, but that doesnt seem to work with burstnumber
> it just takes one pocture and gives a bunch of messages
>
> logon@ubuntu:~$ gphoto2 --set-config burstnumber=5 --trigger-capture --wait-event-and-download=20s
> Waiting for 20 seconds for events from camera. Press Ctrl-C to abort.         
> UNKNOWN PTP Property d1a4 changed
> UNKNOWN PTP Property d1f1 changed
> Downloading 'DSC_3309.JPG' from folder '/store_00010001/DCIM/102D7000'...
> Saving file as DSC_3309.JPG                                                   
> Deleting 'DSC_3309.JPG' from folder '/store_00010001/DCIM/102D7000'...
> UNKNOWN PTP Property d1a4 changed
> UNKNOWN PTP Property d1f1 changed
> UNKNOWN PTP Property d1b1 changed
> UNKNOWN PTP Property d1b1 changed
> UNKNOWN PTP Property d1b1 changed
> UNKNOWN PTP Property d1b1 changed
> UNKNOWN PTP Property d1b1 changed
> UNKNOWN PTP Property d1b1 changed

What is reported when you do
        gphoto2 --get-config burstnumber

On D7000:
$ gphoto2 --get-config burstnumber
Label: Burst Number                                                            
Type: RANGE
Current: 1
Bottom: 1
Top: 100
Step: 1


Ciao, Marcus

------------------------------------------------------------------------------
WINDOWS 8 is here.
Millions of people.  Your app in 30 days.
Visit The Windows 8 Center at Sourceforge for all your go to resources.
http://windows8center.sourceforge.net/
join-generation-app-and-make-money-coding-fast/
_______________________________________________
Gphoto-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-devel
Reply | Threaded
Open this post in threaded view
|

Re: D90 problem!!!

rough_neck
In reply to this post by Marcus Meissner-4
Marcus,

I see that gphoto2 supports lots of cameras, I was wondering where
you guys get the cameras you use for testing. It must be expensive
if you have to buy them all.....

Has any camera been damaged by using gphoto while developing
the code or by someone using the software?

I been using my D7000 with gphoto2 for several weeks
with zero problems...

Then yesterday I borrowed by brothers Nikon D90 and
tried it with gphoto.

After issuing a few gphoto commands to the D90, suddenly the
D90 has permanently lost the ability to auto focus when
LIVE-VIEW is  OFF.

If I turn LIVE-VIEW to ON where I can see the live image
on the camera LCD screen, auto focus works, but if I turn it
OFF, and look through the view finder, and try to take a
picture, it tries to auto focus for while but always fails and
doesnt take the picture anymore.

Even after disconnecting it from the computer, taking out the
battery, resetting all the settings, changing lenses, nothing I
do will make it auto focus anymore.

Of course I made sure auto focus is turned on in the camera settings
and also on the lens itself, but doesnt help.

My brother will be pissed that I messed up  his camera, but
I dont know what I did, I cant rememer what gphoto commands
I issued, I cant imagine that any command would cause this.

Unless there is some error in the PTP protocol or gphoto itself
that messed up the camera's firmware or memory or calibration data?

Does anybody have any ideas, has this happenned to anyone else?

I have only a few hours to solve the problem before my brother
gets here. He warned be not to mess up his camera and now look
what happenned!! Its unbelievable!

Maybe if I try to re-flash the D90's firmware from Nikon will help?
Maybe I make it worse since I never reflashed a camera before.

Thanks a lot for any help!!!

------------------------------------------------------------------------------
WINDOWS 8 is here.
Millions of people.  Your app in 30 days.
Visit The Windows 8 Center at Sourceforge for all your go to resources.
http://windows8center.sourceforge.net/
join-generation-app-and-make-money-coding-fast/
_______________________________________________
Gphoto-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-devel
Reply | Threaded
Open this post in threaded view
|

Re: D90 problem!!!

Marcus Meissner-4
Hi,


> I see that gphoto2 supports lots of cameras, I was wondering where
> you guys get the cameras you use for testing. It must be expensive
> if you have to buy them all.....

We don't ... I personally own mirror using cameras:

a Nikons D90 and D7000 (the D90 likely to be sold or given as present
to someone soonish), a Canon EOS 1000D, a Olympus E-640.


I also bought a lot of older (cheaper) cameras on ebay.


So I rely on users reporting things and also occasionaly on borrowing other
cameras from colleagues or friends.
 
> Has any camera been damaged by using gphoto while developing
> the code or by someone using the software?

The only reports so far were wear and tear on camera mechanics
after several thousands of shots.

No firmware corruption issues were reported yet.

 

> I been using my D7000 with gphoto2 for several weeks
> with zero problems...
>
> Then yesterday I borrowed by brothers Nikon D90 and
>
> tried it with gphoto.
>
> After issuing a few gphoto commands to the D90, suddenly the
> D90 has permanently lost the ability to auto focus when
> LIVE-VIEW is  OFF.
>
> If I turn LIVE-VIEW to ON where I can see the live image
> on the camera LCD screen, auto focus works, but if I turn it
> OFF, and look through the view finder, and try to take a
> picture, it tries to auto focus for while but always fails and
> doesnt take the picture anymore.

 
> Even after disconnecting it from the computer, taking out the
> battery, resetting all the settings, changing lenses, nothing I
> do will make it auto focus anymore.

Umm. This is bad.
 
> Of course I made sure auto focus is turned on in the camera settings
> and also on the lens itself, but doesnt help.
> My brother will be pissed that I messed up  his camera, but
> I dont know what I did, I cant rememer what gphoto commands
> I issued, I cant imagine that any command would cause this.

I don't think libgphoto2 can cause this.

> Unless there is some error in the PTP protocol or gphoto itself
> that messed up the camera's firmware or memory or calibration data?

There might be firmware update commands, but it is not likely
they got triggered.

> Does anybody have any ideas, has this happenned to anyone else?
>
> I have only a few hours to solve the problem before my brother
> gets here. He warned be not to mess up his camera and now look
> what happenned!! Its unbelievable!
>
>
> Maybe if I try to re-flash the D90's firmware from Nikon will help?
>
> Maybe I make it worse since I never reflashed a camera before.

I have no idea either to do that or if it will help :/

Ciao, Marcus

------------------------------------------------------------------------------
WINDOWS 8 is here.
Millions of people.  Your app in 30 days.
Visit The Windows 8 Center at Sourceforge for all your go to resources.
http://windows8center.sourceforge.net/
join-generation-app-and-make-money-coding-fast/
_______________________________________________
Gphoto-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-devel
Reply | Threaded
Open this post in threaded view
|

Re: PTP/Camera Busy

rough_neck
Hello,

Yes I got more problems.

I'm using photo in a program, and many times it crash or hang,
or doesn't execute the command to the camera.

After debugging I find out that many times what causes that is that
the camera or PTP (or something) is busy. 

So what I did was if I get anything back except GP_OK, I
just sit in a usleep loop and try the command over and over again until
I get GP_OK back, and that seems to work.

So, is there a function I can call before trying any photo
command, that lets me know if its busy, so I can wait until
its not busy before executing a command?

I think that would be very useful instead of going inside every
gphoto function and putting in a retry loop.

Thanks


------------------------------------------------------------------------------
WINDOWS 8 is here.
Millions of people.  Your app in 30 days.
Visit The Windows 8 Center at Sourceforge for all your go to resources.
http://windows8center.sourceforge.net/
join-generation-app-and-make-money-coding-fast/
_______________________________________________
Gphoto-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-devel
Reply | Threaded
Open this post in threaded view
|

Re: PTP/Camera Busy

Marcus Meissner-4
On Sun, Oct 28, 2012 at 11:52:36AM -0700, N S wrote:

> Hello,
>
> Yes I got more problems.
>
> I'm using photo in a program, and many times it crash or hang,
> or doesn't execute the command to the camera.
>
> After debugging I find out that many times what causes that is that
> the camera or PTP (or something) is busy. 
>
> So what I did was if I get anything back except GP_OK, I
> just sit in a usleep loop and try the command over and over again until
> I get GP_OK back, and that seems to work.

What kind of command patterns do you emit?

> So, is there a function I can call before trying any photo
> command, that lets me know if its busy, so I can wait until
> its not busy before executing a command?

As I am not sure what you do, this is hard to say.
 
> I think that would be very useful instead of going inside every
> gphoto function and putting in a retry loop.

Of course.

CIao, Marcus

------------------------------------------------------------------------------
WINDOWS 8 is here.
Millions of people.  Your app in 30 days.
Visit The Windows 8 Center at Sourceforge for all your go to resources.
http://windows8center.sourceforge.net/
join-generation-app-and-make-money-coding-fast/
_______________________________________________
Gphoto-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-devel
Reply | Threaded
Open this post in threaded view
|

Re: D90 problem!!!

Rogier Wolff
In reply to this post by rough_neck
On Sun, Oct 28, 2012 at 06:52:53AM -0700, N S wrote:
> Unless there is some error in the PTP protocol or gphoto itself
> that messed up the camera's firmware or memory or calibration data?

It should NEVER be possible for a program on the computer to mess with
the camera in such a way that it is permanently damaged. On the other
hand, it might be possible to change a setting that you don't know how
to change back.

        Roger.

--
** [hidden email] ** http://www.BitWizard.nl/ ** +31-15-2600998 **
**    Delftechpark 26 2628 XH  Delft, The Netherlands. KVK: 27239233    **
*-- BitWizard writes Linux device drivers for any device you may have! --*
The plan was simple, like my brother-in-law Phil. But unlike
Phil, this plan just might work.

------------------------------------------------------------------------------
WINDOWS 8 is here.
Millions of people.  Your app in 30 days.
Visit The Windows 8 Center at Sourceforge for all your go to resources.
http://windows8center.sourceforge.net/
join-generation-app-and-make-money-coding-fast/
_______________________________________________
Gphoto-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-devel
123