Dertimining the number of photos taken during a burst of continuous shooting - General Help and Assistance on using CHDK stable releases - CHDK Forum supplierdeeply

Dertimining the number of photos taken during a burst of continuous shooting

  • 5 Replies
  • 3921 Views
Advertisements
Question:

If I command the shoot button on a camera to be held down for k seconds in continuous shooting mode, what's the easiest way to tell how many photographs were taken?  (I have thought of inspecting the file system on the camera, but I feel that this method would be slow.)


Long story:

I need a way to determine the number of photos that are taken during a burst of continuous shooting for a script I am writing as part of a bus photography system. The system is supposed to take many photographs along a bus route and label each photograph with the geographic coordinates that it was taken at. It's comprised of a host computer that communicates with a SD880 camera and a GPS unit via USB using the PTP interface described here: http://chdk.wikia.com/wiki/PTP_Extension. Naturally, the script runs on the host computer. The system takes photographs in bursts because it is faster than taking them individually.  

My script has constants called SECS_PER_SHOT and SHOTS_PER_BURST, so for each burst the shoot button is pressed down for SECS_PER_SHOT * SHOTS_PER_BURST seconds, and I expect SHOTS_PER_BURST photos to be taken.  However, due to precision issues SHOTS_PER_BURST photos are not taken on every burst, e.g. sometimes SHOTS_PER_BURST - 1 or SHOTS_PER_BURST + 1 are taken. I need to create one GPS label for each photo, but that requires knowing how many photos were actually taken.
« Last Edit: 19 / August / 2010, 10:36:16 by jmgummes »

Going off my old notes, you can look around the 9th short of tag 4 within the Canon MakerNote section of the EXIF within each photo. You should find there a 16-bit sequence number that starts at 0 (or is it 1?) with each burst. Traverse through your photos, and when that sequence number resets it's the start of a new burst.

Thank you! That is definitely a much better solution than counting the number of files on the camera after each burst. However, it does seem a bit complicated to look through the header of each photo... do you know of any good python libraries for doing it? Also, I feel that the camera must have a dedicated region of memory for storing the current sequence number. Assuming that's the case, if I could find the memory address of the said region, then my problem is greatly simplified.

Quote
Also, I feel that the camera must have a dedicated region of memory for storing the current sequence number. Assuming that's the case, if I could find the memory address of the said region, then my problem is greatly simplified.

I found that the field is one of the property cases listed here: http://chdk.wikia.com/wiki/PropertyCase.  It looks like my problem is solved!  :D


*

Offline fudgey

  • *****
  • 1705
  • a570is
I'd imagine the script command get_exp_count, http://chdk.wikia.com/wiki/CHDK/MoreBest#New_uBASIC_and_LUA_Scripting_Commands.21, is what you're looking for?

When you said that "the script runs on the host computer" (the one that's also connected to the GPS) I was assuming that by that point you'd have PTP'ed the photos to the host and thus traversing the metadata of each photo seemed a reasonable path.
I'm a bit confused about which component of your code will be running where. As long as YOU're not confused, you should be fine. ;)

 

Related Topics