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

KAP & UAV Exposure Control Intervalometer Script

  • 1068 Replies
  • 407882 Views
KAP & UAV Exposure Control Intervalometer Script
« on: 20 / October / 2013, 12:02:09 »
Advertisements
I've created a wiki page for a script designed to provide precision exposure control tailored specifically for KAP and UAV applications.   

link > KAP & UAV Exposure Control Script

The script attempts to use a user defined "fast" shutter speed by managing ISO settings and the adjustable iris / ND filter (if available).  Shutter speed is only lowered when all other options have been exhausted.

This is based on ideas discussed here : http://chdk.setepontos.com/index.php?topic=10754.0  and http://chdk.setepontos.com/index.php?topic=10762

Credit for the ideas, exposure calculation code, and much patient testing goes to peabody ( a.k.a. wayback on the KAP forums).

« Last Edit: 13 / August / 2017, 14:39:02 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline lapser

  • *****
  • 1093
Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #1 on: 20 / October / 2013, 13:09:55 »
Very nice script!

I was wondering how you got the camera to peel potatoes, until I looked up "KAP" and discovered it means "Kite Aerial Photography." I'd love to see some of the results.

My only suggestion would be to try reyalp's method of turning the display off with event_proc instead of set_backlight. I've been using it, and it really does turn the power off to the display, with resulting increase in battery life (15% versus 10% in my test). You can tell the power was off because it takes awhile for the light to turn back on, compared to set_backlight(1). It also doesn't turn back on with every picture, as long as the picture review is off.

This is the function I use. You can just replace "set_backlight" in the script with "backlight".
Code: [Select]
blight=1 -- backlight on / current state
bldisp=true -- turn off display with eventproc if true
if call_event_proc('DispDev_EnableEventProc') == -1 then
  if call_event_proc('DispDev.Create') == -1 then
    bldisp=false -- must turn off display with set_backlight
  end
end -- end of initialization code
function backlight(bl) -- bl=0 off, 1 on, -1 toggle
  if(bl<0)then bl=bitxor(blight,1)  -- toggles 0 or 1
  elseif (bl>1)then bl=1 end
  if(bl==blight)then return end -- don't double set to current state
  blight=bl
  if(bldisp)then
    if(bl==0)then call_event_proc('DispCon_TurnOffDisplay')
    else call_event_proc('DispCon_TurnOnDisplay') end
  else set_backlight(bl) end
end
I discovered something interesting about set_backlight while adding this function to my custom C code in CHDK. If you try to turn off the backlight by calling TurnOffBacklght() twice or more, without a "sleep" in between, the backlight doesn't go off. I assume this applies to set_backlight(0) if there is no sleep (lua yield) between calls, although I haven't tested it.
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #2 on: 20 / October / 2013, 13:36:07 »
My only suggestion would be to try reyalp's method of turning the display off with event_proc instead of set_backlight. I've been using it, and it really does turn the power off to the display, with resulting increase in battery life (15% versus 10% in my test).
Thanks.  Seems like a good idea but for a 5% power saving gain I think I'll pass for now.  There are enough things to go wrong with a new & complex script like this!  Adding a relatively untested method to toggle the backlight seems like one risk too many. 

In any case, I think that if I was really worried about power,  I'd also add the power saving modes from my Ultimate Intervalometer script.   

edit :  Might be interesting to also test and add here : Battery Intervalometer
« Last Edit: 20 / October / 2013, 13:53:08 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #3 on: 20 / October / 2013, 14:25:32 »
Just for interest, some SDM 1.86 Beta testers have used the following two uBasic commands for KAP,UAV and balloon flights to achieve the same result :-

set_max_iso_to o
shoot_fast_at 1/4000,z

'z' is a return variable that reports ISO used or shutter speed achieved, as appropriate.



Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #4 on: 20 / October / 2013, 14:58:50 »
Thanks for all your work on this, waterwingz.  I think the script will be of great benefit to kite flyers the world over.  Now, where did I leave my 7-foot Rokkaku?

I believe there is a problem with turning off the display instead of turning off the backlight.  But I'm having trouble bringing up what that problem is - or at least *was* in earlier versions of CHDK.  There's something that's disabled when you turn off the display.  Actually, I believe it's manual focus. In normal mode, if you turn on manual focus, then hit the display button and turn it off, when you turn it on again you will be back in autofocus.  That's the camera doing that, not CHDK, but you would have to get around that somehow if you wanted to use manual focus and still turn off the display.

 

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #5 on: 20 / October / 2013, 16:30:11 »
I believe there is a problem with turning off the display instead of turning off the backlight. 
I seem to recall that too.  And while the battery savings is interesting,  I'm not sure its really necessary on for a kite or UAV shooting sequence.   With just the backlight off, my experience shows 3 to 4 hours of shooting time.  Seems like a long time to hold onto a kite string?

Meanwhile,  having full control of not only the shutter speed and ISO values but aperture and ND filter settings as well - with the ability to easily adjust the ranges they work over - should give people plenty of things to experiment with and optimize their personal shooting experience.



Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline lapser

  • *****
  • 1093
Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #6 on: 21 / October / 2013, 02:09:09 »
I believe there is a problem with turning off the display instead of turning off the backlight.
When you turn off the display with the camera display button, it cancels manual focus and returns to auto-focus on some cameras, including the G1X. Using the event_proc method of turning off the display doesn't affect the manual focus.

Someone on YouTube said he returned his G1X because of this problem, even though he loved the camera. When I told them we had solved the problem, he said he might buy the camera again.

Another major advantage of turning off the display instead of the backlight is that it doesn't turn back on again after every picture (with picture review off). I tried to fix set_backlight() by repeatedly turning the backlight off every 10 msec, but the screen still flashed after every picture. This was unacceptable, especially at night.

As for being "untested", I've been using this method of turning off the display instead of backlight for a few months on my 4 cameras during time lapses. It's always worked without any problems at all. A typical time lapse for me is 5,000 pictures, so I think it's been tested pretty well.

I've included a display on/off feature in my new "switch_state" Lua function. I'll be posting the patch and custom builds (no compiling required) in the other thread next, so you're welcome to try it out there.
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #7 on: 21 / October / 2013, 07:27:49 »
having full control of not only the shutter speed and ISO values but aperture and ND filter settings as well - with the ability to easily adjust the ranges they work over - should give people plenty of things to experiment with and optimize their personal shooting experience.

Whilst that is true, I believe it is not necessary.
Consider the following settings from a user in Las Vegas in very bright conditions :-

Bv96 = 900
Sv96 = 465 (100 ISO real)
Tv96 = 1148 (1/4000 sec)
Av96 = 363 (f3.7 real)

Most shooting conditions will be in dimmer light where shutter speed need to be reduced and/or ISO increased.

The aperture will obviously not be made smaller (in physical size).



Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #8 on: 21 / October / 2013, 08:45:47 »
Whilst that is true, I believe it is not necessary.
You may very well believe its acceptable to force the camera's lens wide open and the ND filter out. 
( source link ).  The script offers choices to those who may have their own beliefs - especially the owners of G & S series cameras.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #9 on: 21 / October / 2013, 08:59:21 »
'believe' was a careless use of words, my conclusions are not based on belief but on practical experience and the hard data presented above.

By all means ignore the technical conclusions drawn from the data if you feel more comfortable with that.


 

Related Topics