supplierdeeply

Night-time time-lapse

  • 80 Replies
  • 41606 Views
*

Offline fbonomi

  • ****
  • 469
  • A570IS SD1100/Ixus80
    • Francesco Bonomi
  • Publish
    Night-time time-lapse
    « on: 19 / August / 2008, 04:32:01 »
    Advertisements
    This script is used to shoot time-lapses that extend from day to night and viceversa.

    Current version: 14
    Requires the collaborative CHDK build ( the collaborative CHDK build )

    Enclosed files:
    set_14.zip: Script (run set_b_14.lua)
    set_14.pdf: Usage instructions (work in progress)
    « Last Edit: 19 / August / 2008, 04:39:14 by fbonomi »

    *

    Offline fbonomi

    • ****
    • 469
    • A570IS SD1100/Ixus80
      • Francesco Bonomi
  • Publish
    Re: Night-time time-lapse
    « Reply #1 on: 19 / August / 2008, 04:32:24 »
    After several weeks of work, this is the new version of my Timelapse with variable shutter speed

    Completely rewritten in Lua, it now supports sunset and dawn, and is rather good in adjustments.

    You can find an example here:
    all-night timelapse (boring, test 11)

    It's a very boring setting (no clouds, no lights, nothing to see), but it's just to test a full-night movie, with transitions from day to night and vice-versa.
    (sub-sampled to 392 frames of the 1960 original frames)

    I am quite satisfied of the results, the night is rather dark but that is what I specified in the settings.

    You have three .lua files

    set_b_14.lua : the main script (the one you have to execute)
    fb-lib.lua : a library of useful LUA functions
    dummy.lua : an empty file (see below)

    dummy.lua is useful to check the syntax of the scripts before copying them in the camera with a standard compiled Lua.
    On my PC I have a different dummy.lua that defines variables and functions that are not available in the standard Lua.
    You can run lua.exe set_b_14.lua and see if the syntax is ok (of course, the processing will be meaningless but the important is not to receive errors)

    This is the dummy.lua version I have on my PC
    Code: [Select]
    -- dummy library for PC

    function sleep(n)
     x=n
    end

    function print_screen(n)
     x=n
    end

    function get_tick_count(s)
     return 100
    end

    function press(s)
     x=n
    end

    function shoot(s)
     x=n
    end

    function shot_histo_enable(s)
     x=n
    end

    function  get_histo_range(n1,n2)
     return 100
    end

    function set_tv96_direct(n)
     x=n
    end

    function set_bv96(n)
     x=n
    end

    function set_sv96(n)
     x=n
    end


    function get_bv96()
     return 0
    end

    function get_av96()
     return 0
    end

    function press(n)
     x=n
    end

    function release(n)
     x=n
    end

    function get_day_seconds()
     return 80000
    end

    function shutdown()
    end

     a=0
     b=0
     c=0
     d=0
     e=0
     f=0
     g=0
     h=0
     i=0
     j=0
     k=0
     l=0
     m=0
     n=0
     o=0
     p=0
     q=0
     r=0
     s=0
     t=0
     v=0
     w=0
     x=0
     y=0
     z=0
     

    « Last Edit: 19 / August / 2008, 04:51:02 by fbonomi »

    *

    Offline fudgey

    • *****
    • 1705
    • a570is
  • Publish
    Re: Night-time time-lapse
    « Reply #2 on: 20 / August / 2008, 12:49:59 »
    I ran this on Juciphox 488 (a570is 1.00e) last night and after about 298 frames and 3 hours it stopped to an error: "not enough memory PRESS SHUTTER TO CLOSE" (at least that's what the log says, the battery had exhausted by morning).

    I used parameters 34 15 1 8, others defaults.

    *

    Offline fbonomi

    • ****
    • 469
    • A570IS SD1100/Ixus80
      • Francesco Bonomi
  • Publish
    Re: Night-time time-lapse
    « Reply #3 on: 20 / August / 2008, 13:26:04 »
    That's VERY strange!!!

    The "not enough memory" part comes from ldo.c or lstate.c (files regarding Lua)
    The "PRESS SHUTTER TO CLOSE" part comes from kbd.c, in a part relating to Lua

    I guess there must be some memory leak, probably in Lua.

    I have gone up to almost 2000 shots without errors (a570 1.01A, build 463). So, the configuration is very similar but not identical....

    My camera is busy running another timelapse, later tonight I will try to use build 488 on my camera, and see if it crashes similarly.

    thanks for letting me know!

    EDIT:
    last night's test here:
    nighttime timelapse (test 12)

    There are some "flashes" in luminosity, visible mainly in the artificial lights. I am enclosing two onsecutive frames. taken theoretically with the same exposure.

    Actually, it's not luminosity, there are a few frames that are slightly out of focus, even if I said "manual focus to infinity" (and the script set focus too) . ... GR!!!

    You can see the difference in the strong light at the bottom left (more faded in frame 783) and in the strong star (actually, Jupiter) that being slightly out of focus appears larger...

    It seems this camera isn't able to keep an exact focus...
    « Last Edit: 20 / August / 2008, 13:51:40 by fbonomi »


    *

    Offline fudgey

    • *****
    • 1705
    • a570is
  • Publish
    Re: Night-time time-lapse
    « Reply #4 on: 20 / August / 2008, 15:35:18 »
    Actually, it's not luminosity, there are a few frames that are slightly out of focus, even if I said "manual focus to infinity" (and the script set focus too) . ... GR!!!

    You can see the difference in the strong light at the bottom left (more faded in frame 783) and in the strong star (actually, Jupiter) that being slightly out of focus appears larger...

    It seems this camera isn't able to keep an exact focus...

    Hmmm now that you said this... only about three of the 300 images from last night two are in focus (inf), all others are badly out of focus. I didn't mention this before because I thought I just forgot to set it to manual focus the one last time before I actually started the script for good... now I'm thinking maybe it just failed?

    Actually one other thing I noticed but didn't recheck... juciphox defaults to "save script params" = Off (Why?...this is different from trunk behavior). Well I checked this option and then fiddled with script parameters and turned off the camera. I didn't run the script. Then after booting the camera, my settings were reset to defaults. Only after setting the parameters for the second time they were saved.

    Oh and does lua look for libs from anywhere but chdk/scripts? I don't want libraries there causing clutter.

    *

    Offline Jucifer

    • *****
    • 251
    • [A710IS]
  • Publish
    Re: Night-time time-lapse
    « Reply #5 on: 20 / August / 2008, 15:51:01 »
    Oh and does lua look for libs from anywhere but chdk/scripts? I don't want libraries there causing clutter.

    I think Lua looks for libs also from chdk/lualib...

    *

    Offline fbonomi

    • ****
    • 469
    • A570IS SD1100/Ixus80
      • Francesco Bonomi
  • Publish
    Re: Night-time time-lapse
    « Reply #6 on: 20 / August / 2008, 16:15:12 »
    Quote
    Hmmm now that you said this... only about three of the 300 images from last night two are in focus (inf), all others are badly out of focus.

    Well, setting focus manually should keep it until you change it, but as my camera's focus was floating I thought it wouldbe better to add a set_focus(65535) to set it to infinity. Maybe in your case removing those instructions will help (?)

    I have another a570 to test tonight, and I want to see both problems on this otehr camera.

    *

    Offline fudgey

    • *****
    • 1705
    • a570is
  • Publish
    Re: Night-time time-lapse
    « Reply #7 on: 20 / August / 2008, 16:39:02 »
    Btw, If I really did set the focus, I did it by putting the camera in manual focus and then doing the alt-up MF mode CHDK override shortcut trick. If I did it :P


    *

    Offline fe50

    • ******
    • 3033
    • IXUS50 & 860, SX10 Star WARs-Star RAWs
      • fe50
  • Publish
    Re: Night-time time-lapse
    « Reply #8 on: 20 / August / 2008, 16:52:43 »
    Oh and does lua look for libs from anywhere but chdk/scripts? I don't want libraries there causing clutter.

    I think Lua looks for libs also from chdk/lualib...

    @fudgey/Jucifer:

    ...some days ago i started the wikia LUA documentation: LUA_Syntax_short_manual...

    Quote
    Libraries

    Libraries are standard LUA scripts placed either in CHDK\SCRIPTS or CHDK\LUALIB, called within a script with

    Code: [Select]
    require "libname"where libname is the filename of the library file without '.lua' suffix.
    This means one can create a library of functions and recycle this lib in scripts with a call to require "libname".

    Library files were first searched from CHDK/SCRIPTS, and then if not found, from CHDK/LUALIB; if a file with the required name is available in both folders, the one from the first folder (CHDK\SCRIPTS) is used.

    *

    Offline fbonomi

    • ****
    • 469
    • A570IS SD1100/Ixus80
      • Francesco Bonomi
  • Publish
    Re: Night-time time-lapse
    « Reply #9 on: 20 / August / 2008, 17:01:16 »
    I might be able to test if there is a memory leak.

    in gui.c, at line 2745 there is gui_show_memory_info() that could be re-used...


     

    Related Topics