is 1 frame / sec timelapse possible ? - page 2 - General Help and Assistance on using CHDK stable releases - CHDK Forum
supplierdeeply

is 1 frame / sec timelapse possible ?

  • 38 Replies
  • 13345 Views
Re: is 1 frame / sec timelapse possible ?
« Reply #10 on: 31 / December / 2012, 19:14:24 »
Advertisements
I can get the camera to go half-press, full-press, and un-press. The problem is that it won't stay in half-press after a full-press.  What I need it to do is stay in the half press mode while I send multiple full-press pulses.  That way I can get frames faster. 

Is CHDK not mean to work like this ?
I don't think its really an issue with CHDK.  Its more an issue with how the Ricoh CA-1 works.   AFAIK, the CA-1 does not have a mode where you can hold the half press and just generate full presses.  The nornal sequence is either a half-press followed but nothing ( cancel ) or a half-press followed by a full press (shoot).

Have you found anything to indicate that you can half-press the CA-1 switch,  then full press, then release back to half-press ?

I suppose I could modify the USB remote code to support this.  I don't think the  CA-1 will actually do that but allowing multiple full-press operations with the half press held should be possible and would not interfere with normal CA-1 operation.


Quote
Does full-press always reset the state back to unpressed ?
That is my understanding.   I have a CA-1 and that's the action I've seen on my scope. But I never tried letting up on the switch just enough to release the full press position while maintaining the half press.  I'll give it a go and report back.

Quote
I'm thinking now that I might need to use this in conjunction with my own script to handle the pulses and shooting states properly. 
Trying to catch CA-1 pulses in a script will be tricky but is possible.   It would be much easier to just have your Arduino implement a "two press" switch though ...
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline tavis

  • *
  • 15
Re: is 1 frame / sec timelapse possible ?
« Reply #11 on: 31 / December / 2012, 20:18:46 »
Quote
I suppose I could modify the USB remote code to support this.  I don't think the  CA-1 will actually do that but allowing multiple full-press operations with the half press held should be possible and would not interfere with normal CA-1 operation.

This would be great. 

Quote
It would be much easier to just have your Arduino implement a "two press" switch though
This approach is too slow.  I need faster frames than a full focus/exposuure / frame can give me. I need to simulate that constant half press so I can get multiple shots without focus and exposure delays.

Quote
Trying to catch CA-1 pulses in a script will be tricky but is possible.
Doesn't the get_usb_power function return that information ? 
Code: [Select]
do p = get_usb_power 3 until p>0
Is there a way to tell CHDK to lock focus and exposure so that full presses don't take so long ?

Re: is 1 frame / sec timelapse possible ?
« Reply #12 on: 31 / December / 2012, 20:41:22 »
Quote
I suppose I could modify the USB remote code to support this.  I don't think the  CA-1 will actually do that but allowing multiple full-press operations with the half press held should be possible and would not interfere with normal CA-1 operation.
This would be great. 
The CHDK devs would have to approve the change.  They tend to get fussy about customizations that don't add value for the normal user.  In this case,  it might be okay except I suspect you will end up with a scripting solution that won't need it.

Quote
It would be much easier to just have your Arduino implement a "two press" switch though
This approach is too slow.  I need faster frames than a full focus/exposuure / frame can give me. I need to simulate that constant half press so I can get multiple shots without focus and exposure delays.
If you go the CHDK scripting route rather than trying to use the built-in USB remote functions then you can use whatever approach you want. 

Quote
Trying to catch CA-1 pulses in a script will be tricky but is possible.
Doesn't the get_usb_power function return that information ? 
Code: [Select]
do p = get_usb_power 3 until p>0

You might be better off with
Code: [Select]
do p = get_usb_power 2 until p>0 But the issue is still that the code runs every 20 mSec and the Ricoh pulses are not much longer than that.   As you don't actually have a Ricoh you could just make the pulse 2x longer I guess.

Quote
Is there a way to tell CHDK to lock focus and exposure so that full presses don't take so long ?
Take a look at the hdr.bas or hdr.lua scripts included it the SCRIPT directory in the standard distribution.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14082
Re: is 1 frame / sec timelapse possible ?
« Reply #13 on: 31 / December / 2012, 21:14:58 »
So the Arduino starts a sequence of fast shots based on some external event? If this is correct then you might be able to just use the USB remote to trigger a script that does the actual shoot_half, shoot_full etc? In other words, does the Arduino have to control the timing of the individual shots, or just kick the whole thing off?
Don't forget what the H stands for.


*

Offline tavis

  • *
  • 15
Re: is 1 frame / sec timelapse possible ?
« Reply #14 on: 31 / December / 2012, 22:09:44 »
reyalp : the arduino needs to trigger each frame as it is also controlling the motion of a turntable.  Thus I need discreet control to trigger motion of the platter followed by a single shutter release, followed by another motion of platter etc.

So if I drop the whole CA-1 approach, what would be the best way to have the arduino trigger rapid individual frames without doing focus/exp for each frame ?  I haven't looked at hdr script yet so maybe that with a single button style trigger sent from the arduino it will work.

Thanks for all the help guys :)

-tavis

Re: is 1 frame / sec timelapse possible ?
« Reply #15 on: 01 / January / 2013, 00:09:29 »
So if I drop the whole CA-1 approach, what would be the best way to have the arduino trigger rapid individual frames without doing focus/exp for each frame ?  I haven't looked at hdr script yet so maybe that with a single button style trigger sent from the arduino it will work.
Have the arduino sent a long pulse ( 100 mSec) to request a half press.   Then send short pulses (50 mSec) each time you want the camera to take a shot.  Send a longer reset pulse when done ( 200 mSec).   A uBASIC or Lua script to accept a pulse width and lock focus / exposure if its 100 mSec,  shoot if its 50 mSec, and reset if its 200 mSec is pretty easy to code.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline tavis

  • *
  • 15
Re: is 1 frame / sec timelapse possible ?
« Reply #16 on: 01 / January / 2013, 14:20:32 »
Great! Thanks for the tips. I'll post my results here when I get them.

*

Offline lapser

  • *****
  • 1093
Re: is 1 frame / sec timelapse possible ?
« Reply #17 on: 02 / January / 2013, 05:57:43 »
Lapser : I would like to test out your experimental build if you have it for my camera and firmware.  (SX260 HS with latest firmware)
OK, here's something for you to test. I've modified the shoot() function to speed up shooting, and work with "shoot_half" down all the time, like you described doing manually.

When you start the attached script, it first takes full shots, the same as the current shoot() function. Press <set> to move on to the faster method. The shot timing is saved in the file A/CHDK/LOGS/LOG_0001.TXT.

This is just a test of one modification I'm working on to get the shot timing right, but it will give you the idea of how fast you can shoot in software.
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos


*

Offline tavis

  • *
  • 15
Re: is 1 frame / sec timelapse possible ?
« Reply #18 on: 02 / January / 2013, 13:44:30 »
That works excellent.  As fast or faster than what I can do manually with the shutter button.

Attached is the log.

BTW,  what are some of the improvements I should look for in this experimental build ?

*

Offline lapser

  • *****
  • 1093
Re: is 1 frame / sec timelapse possible ?
« Reply #19 on: 02 / January / 2013, 14:30:08 »
I'm in the process of simplifying the interface. I'm writing a new function:
shoot(shot_interval)
It waits at the point right before the shutter opens until the interval between the current and last shot time is shot_interval. It takes the shot, measures the exposure of the shot in memory (raw),  and optionally waits for up to 2 seconds(usual about 10 msec) for the Lua script to use it.

It should be able to do about 900 msec per shot in single shot mode, and 600 in continuous, but I think I may be able to get the single shot to work faster. You have to add the exposure (shutter open) time to that if it gets to be significant.

You can set up to 4 metering areas and let the script decide how to set the exposure from them. My current test version picks the metering area that gives the darkest exposure, which is better for sunsets when the sky is brightest at first, and the city lights are brighter later. But it's totally flexible. I think I can also return a set of exposure compensation values based on the shot histogram too.

I'll keep you posted. Thanks for your interest.


EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

 

Related Topics