KAP & UAV Exposure Control Intervalometer Script - page 2 - Completed and Working Scripts - CHDK Forum

KAP & UAV Exposure Control Intervalometer Script

  • 1068 Replies
  • 448737 Views
Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #10 on: 21 / October / 2013, 11:15:58 »
Advertisements
I posted the following in the KAP Forum, where David dismissed the new script on the same basis as here:

-----------

In my experience with my A590is, mid-range apertures seem to be a bit sharper than either wide open or completely stopped down.  So I would prefer to shoot at something like f/3.5 or f/4.0 since that produces better pictures for me.  But that's a preference, and for KAP in particular I would be willing to go wide open if it means I don't have to slow down the shutter speed, which is the most important determinant of getting sharp pictures.  The script manages those decisions automatically based on the user's parameter settings and the algorithms described in detail in the wiki linked to above.

The new script has the advantage of letting me set value preferences and ranges for all exposure components - shutter speed, ISO, and aperture or ND filter.  Someone who believes the aperture setting has no effect on sharpness can set his aperture preference to wide open and shoot on that basis, and he may still benefit from other features found in the script.  Or if he doesn't want to use the script, he can lock his aperture to wide open and just use the Custom Auto ISO function found in the CHDK menu, which works much as the script does, but without any aperture control.

So the script offers the user a good bit of flexibility to set the exposure preferences the way *he* wants to, without locking them in stone, and it provides within the script a few settings that normally require manual camera settings, such as going into manual focus, then setting focus to infinity, or zooming to a particular point.  In fact, if you use auto-run, everything would be automatic  - you would only have to hit the power button to turn on the camera.

By the way, I should mention that for my A590is, and presumably the A570is, the Focus setting "MF2" in the parameters is the one that works to go to manual focus at infinity.  Or if you want to use autofocus, just set that preference to "Off".

-------------
« Last Edit: 21 / October / 2013, 11:18:26 by peabody »

*

Offline reyalp

  • ******
  • 14125
Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #11 on: 22 / October / 2013, 13:07:44 »
Don't forget what the H stands for.

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #12 on: 30 / October / 2013, 06:38:56 »
I tested the script on my camera. I use a Canon IXUS 230 HS (ELPH310HS) version 1.00e. I noticed that when first installed, the script starts and works fine. When the camera is restarted, it fails with "could not load propcase.lua". I researched this a bit and it seems it's related to memory issues and pools. So I removed some of the functions that I didn't require for my camera like the iris control and some of the focusing methods. This got rid of the memory issues.

The next strange issue is that when the camera shuts down with the script running, on restart it crashes. When I press the shutter to stop script execution on reboot, the cam starts ok and then the script can be restarted.

Some of the uav control boards use 5V usb power to do the photo triggering. For cams without gps, this is great, because the position of the trigger is stored on the controllers storage. So in the end I removed the intervalometer too and replaced that with usb trigger, where a much longer pulse shuts down the camera.

It would be an interesting idea to extend the script to choose what happens with the usb trigger, but obviously I'm having troubles fitting the script in memory already. Is there any setting I can make to influence the use of memory?

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #13 on: 30 / October / 2013, 09:45:06 »
I tested the script on my camera. I use a Canon IXUS 230 HS (ELPH310HS) version 1.00e. I noticed that when first installed, the script starts and works fine. When the camera is restarted, it fails with "could not load propcase.lua". I researched this a bit and it seems it's related to memory issues and pools.
So if you start the camera "cold", have you loaded and run the script for an extended period of time (10 minutes) taking pictures?  Is it only when you stop the script and rerun it that you have this problem?

If so,  that's interesting as it says Lua is either not freeing all the memory it allocated or it's leaving it fragmented.  The script does explicit calls to collectgarbage() after each shot but clearly that's not enough.

I've noticed something similiar if a script crashes during testing - you need to power cycle the camera to get all your memory back.

Quote
So I removed some of the functions that I didn't require for my camera like the iris control and some of the focusing methods. This got rid of the memory issues.
Painful but whatever works.  On my "low memory" A1200 I never had to do that.

Quote
The next strange issue is that when the camera shuts down with the script running, on restart it crashes. When I press the shutter to stop script execution on reboot, the cam starts ok and then the script can be restarted.
Strange.  Just a guess here - do you have logging to the SD card enabled?  And by "shut down" do you mean you press the power button while the script is running?

Quote
Some of the uav control boards use 5V usb power to do the photo triggering. For cams without gps, this is great, because the position of the trigger is stored on the controllers storage. So in the end I removed the intervalometer too and replaced that with usb trigger, where a much longer pulse shuts down the camera.
I'm now glad I added the USB functionality too   :)

Quote
It would be an interesting idea to extend the script to choose what happens with the usb trigger, but obviously I'm having troubles fitting the script in memory already. Is there any setting I can make to influence the use of memory?
There are a couple of things to try.

First of all,  go to the Miscellaneous menu, click on Show Memory Info to give us some idea of how little memory you have.  There are better ways to get a break down of memory use using a small Lua script but that's a good start.   Your camera uses EXMEM - I suppose a look through the porting thread to see if that was the right choice might be in order.

Second, there are a lot of function at the top of the script that could be moved into their own Lua file and loaded as a module.  I have not tried this (yet) but this should relieve a lot of memory as only the compiled Lua pcode will stay in memory - not the source code (I'm told that the source stays in memory for the main program).  When I have some time I'll play with this as I'm curious to see how well it works.

Third,  if you are willing to give up working with and displaying nice "photographer" units ( like fractional seconds,  f-stops, and ISO sensitivity) and just work in APEX96 units (painful) then you can strip out all the  parts that convert back and forth in the @param sections and the print_av() print_sv() print_tv() functions. And things that have lots of options - like the backlight code, focus mode or zoom position can be shortened to just default to your current preference. 

Finally,  you can keep hacking away until you eventually have a one line script that just says "shoot()" if you work hard enough   ;)   It would be good to see if the module trick (step 2) works though.  It might also be good to dig up that Lua code snippet that gets all memory status - get_meminfo() - , add to the script and log how the memory management performs.

Or you could just use the script "as is" and restart the camera between runs.  I'm guessing there is enough space for your USB additions if you operate that way.

I'll ask about memory fragmentation on IRC tonight and see if there are any ideas.

« Last Edit: 30 / October / 2013, 09:50:20 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #14 on: 31 / October / 2013, 00:30:47 »
I tested the script on my camera. I use a Canon IXUS 230 HS (ELPH310HS) version 1.00e. I noticed that when first installed, the script starts and works fine. When the camera is restarted, it fails with "could not load propcase.lua". I researched this a bit and it seems it's related to memory issues and pools.
So if you start the camera "cold", have you loaded and run the script for an extended period of time (10 minutes) taking pictures?  Is it only when you stop the script and rerun it that you have this problem?
Further to all my above questions,  if you stop the script (when it has been launched after a cold start) by pressing the "Menu" key while it's running (rather than the shutter button or the power button),  can you then successfully restart and run the script?
Ported :   A1200    SD940   G10    Powershot N    G16

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #15 on: 04 / November / 2013, 06:34:55 »
I am using a not-released yet A2500 test version

I am doing Kap and multirotors so I have gotta luv this script  :D

I cannot figure out how to use this script properly.

Target speed : 1/1000
Max speed : 1/2000
Iso min : 200
Iso min : 400

I want to enforce infinite focus distance, but I am failing to
I have written :
Min Av : 8
Target Av : 8
Max Av : 8

So I am expecting 8 as Av but I am getting 2.8/3... What am I doing wrong ?

Thank you :-)

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #16 on: 04 / November / 2013, 08:51:42 »
I want to enforce infinite focus distance, but I am failing to
There is a choice of MF setting methods available as a user parameter for the script.  Not every one will work with every camera unfortunately but when they do they will force the focus to infinity.   If you use the AFLock method, which should work for your camera,  just be sure the camera is pointed at something off in the distance when the script starts.

Altenatively,  set the focus lock manually from the camera keypad.

Quote
I have written :
Min Av : 8
Target Av : 8
Max Av : 8
So I am expecting 8 as Av but I am getting 2.8/3... What am I doing wrong ?
Setting the Av (aperture) is only useful on cameras with an adjustable aperture.  The A2500 has a fixed aperture and thus will not respond to those settings.  (Any changes you see in the aperture reported in your picture's EXIF or the camera's on screen display are caused by changes in zoom position).

« Last Edit: 04 / November / 2013, 18:45:37 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #17 on: 04 / November / 2013, 15:14:04 »
OK, all clear now, I have learnt something new today.
Thank you for taking the time to educate me.

just be sure the camera is pointed at something off in the distance when the script starts.

So from my multirotor, I will therefore aim at the skyline, start the script, then put it on the ground and start flying.

A cool thing would have been to focus at the time of the very first picture and not when starting the script, so that delay before first picture can be used for taking off and elevate high enough before initial focus.
« Last Edit: 04 / November / 2013, 15:20:44 by philgib »

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #18 on: 04 / November / 2013, 16:05:00 »
So from my multirotor, I will therefore aim at the skyline, start the script, then put it on the ground and start flying.
The "trick" here is making sure the camera actually has something to "focus" on.  Clouds or a building way off in the distance work well here.   Clear blue skys do not.

Quote
A cool thing would have been to focus at the time of the very first picture and not when starting the script, so that delay before first picture can be used for taking off and elevate high enough before initial focus.
That's easy enough to add to the script but why not just let the camera focus before every shot then?   
Ported :   A1200    SD940   G10    Powershot N    G16

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #19 on: 05 / November / 2013, 00:09:52 »
That's easy enough to add to the script but why not just let the camera focus before every shot then?

- Unnecessary repetitive process for KAP, focus is always on infinity since kite is usually 50-150 meters high so one is enough

-This allows for faster shooting cadence, no time wasted between 2 shots

 

Related Topics


SimplePortal © 2008-2014, SimplePortal