A4000IS porting thread

  • 205 Replies
  • 15135 Views
*

Offline reyalp

  • ******
  • 9876
  • Publish
    Re: A4000IS porting thread
    « Reply #140 on: 30 / June / 2013, 22:54:29 »
    Advertisements
    Not sure if I'm doing this the right way, but when I go into <Alt>Misc Stuff->Show Memory Info when I'm in shooting mode I see 655712 bytes free, in playback mode I see 653072 bytes free, and when I hold down the record button and start recording video, I see 654672 bytes free.  So, there doesn't seem to be much difference between them.  CHDK size is 139692 bytes at offset 0x157ca4.
    640k ought to be enough for anyone :P

    Seriously though, that should be fine without using exmem. My D10 port has ~600k free using the current trunk.


    Don't forget what the H stands for.

  • Publish
    Re: A4000IS porting thread
    « Reply #141 on: 30 / June / 2013, 23:21:22 »
    Seriously though, that should be fine without using exmem. My D10 port has ~600k free using the current trunk.
    If I simply hold the camera in my hands while the intervalometer script is running, almost all the images come out ok.
    What seems strange is the OP's observation that his intervalometer script runs fine sitting in his hand but not on the "pole".  We know that burst shooting modes ("sports mode") need more memory,  but how this sounds like image stabilization might as well?     I noticed he did say "almost all the images come out ok".  That's why asked exactly which script he is using - might be one of those "shoot()" scripts that never check for focus / exposure lock prior to shoot_full().



    *

    Offline eponymous

    • *
    • 38
    • Canon A4000
  • Publish
    Re: A4000IS porting thread
    « Reply #142 on: 01 / July / 2013, 01:02:51 »
    @eponymous
    Which is your camera's firmware version?

    101b

    Should also add that the preview/thumbnail images are fine.

    I'll grab the scripts I've tried when I get to the right computer. I've used both "shoot" and half-press/full-press method. No af-locking. Also with IS both off and on.
    John

    *

    Offline reyalp

    • ******
    • 9876
  • Publish
    Re: A4000IS porting thread
    « Reply #143 on: 01 / July / 2013, 01:07:43 »
    I'll grab the scripts I've tried when I get to the right computer.
    An example of a bad image might also be helpful.
    Don't forget what the H stands for.


    *

    Offline eponymous

    • *
    • 38
    • Canon A4000
  • Publish
    Re: A4000IS porting thread
    « Reply #144 on: 01 / July / 2013, 03:12:29 »
    Here's one of the scripts that fails virtually every time on the pole:

    Code: [Select]
    @title Intervalometer
    @param s = interval (sec)
    @default s 5
    @param n = Number of Photos
    @default n 10
    @param d = Startup Delay (sec)
    @default d 30

    playsound 6

    set_zoom 0

    sleep d*1000

    for i = 1 to n
    shoot
    set_backlight 0
    sleep s*1000
    next i

    set_backlight 1
    playsound 7

    Slightly simpler versions also fail in the same way.
    John

  • Publish
    Re: A4000IS porting thread
    « Reply #145 on: 01 / July / 2013, 08:54:54 »
    Here's one of the scripts that fails virtually every time on the pole:
    ...
    Slightly simpler versions also fail in the same way.
    Thanks.  A perfectly normal script that just does a shoot() - nothing fancy - with a suitable delay between shots (5 seconds).   

    That leaves us with a script that works when the subject matter is essentially static but not when its moving.  Do you have any examples of it failing when "hand held" (i.e. stable) ?   

    We could modify the code to do a half_press and wait for focus / exposure lock prior to shooting.   If it fails to lock we can log the failure so we know what we are dealing with.  The problem though seems to be the actual "full_press" starts and then aborts part way through saving the image.  As srsa_4c pointed out,  that suggests a memory size issue but why that relates to motion vs still shooting is beyond me.

    You mentioned using IS off - I wonder if setting af_lock() would help (i.e. the camera detects a focus shift during shooting and aborts the current process - although that seems unlikely).
    « Last Edit: 01 / July / 2013, 08:56:31 by waterwingz »

    *

    Offline srsa_4c

    • ******
    • 3118
  • Publish
    Re: A4000IS porting thread
    « Reply #146 on: 01 / July / 2013, 13:09:24 »
    Attached is a test build (CHDK 1.2, diskboot only) with EXMEM disabled. Would be interesting to know whether using this solves the issue with jpeg, and whether it works stable. According to rkomar's free memory report, it should work without issues.

  • Publish
    Re: A4000IS porting thread
    « Reply #147 on: 02 / July / 2013, 17:48:10 »
    On a slightly different note, I'm having trouble setting the focus distance reliably with set_focus().  If I do the following (inside a shell script):

    chdkptp -c -e"luar set_focus($FOCUS)"
    chdkptp -c -e'shoot'
    chdkptp -c -e'luar set_aflock(1)'

    Then get_focus() sometimes returns something close to the value in $FOCUS, and sometimes wildly different.  The A4000 is completely P&S, and there is no manual focus on it.  It seems like the camera continues automatically adjusting the focus before it can be locked.

    The camera manual says that the focus can be locked inside the half-shoot/release cycle using the buttons.  Indeed, the following code works fine:

    chdkptp -c -e'luar set_aflock(0)' -e'luar press("shoot_half")' -e'luar sleep(1000)' -e'luar set_aflock(1)' -e'luar release("shoot_half")'

    except that the focus can be a bit hit and miss, depending on the subject of the photo.  I've searched this forum for tips on how to use set_focus(), but none of the results worked for me (either the focus value ended up being something else, or the camera crashed).  The only way I have found to be able to set the value is to put the above line inside a while loop and keep repeating until it hits the value I want.  This can take a while, and isn't guaranteed to ever stop, so it's a sucky solution.

    Does anyone have any tips on how to do this right with a P&S camera like the A4000?


    *

    Offline srsa_4c

    • ******
    • 3118
  • Publish
    Re: A4000IS porting thread
    « Reply #148 on: 03 / July / 2013, 09:54:48 »
    Does anyone have any tips on how to do this right with a P&S camera like the A4000?
    Have you tried adjusting the focus while the camera is in AF lock? Also, make sure that you don't have any continuous AF mode active (including servo AF, anything that tries to focus on faces or objects, etc), and that the particular recording mode you are using allows AF lock (try it by hand, not script).

  • Publish
    Re: A4000IS porting thread
    « Reply #149 on: 03 / July / 2013, 11:32:18 »
    Newbie at CHDK. Is it possible to control F-Stop? If so, I haven't found it yet. Any help?

     

    Related Topics