Landscape Focus Bracketing Script - page 15 - Completed and Working Scripts - CHDK Forum supplierdeeply

Landscape Focus Bracketing Script

  • 247 Replies
  • 47551 Views
*

Offline reyalp

  • ******
  • 14080
Re: Landscape Focus Bracketing Script
« Reply #140 on: 15 / January / 2020, 03:14:53 »
Advertisements
Quote
but you get to decide how to do it.

I only need get the focal length, CoC and aperture at the start of the script.
I would expect that you could just get dof_info once, inside the initial half press after get_shooting becomes true.

Quote
I don't change aperture, just use it to calculate diffraction. I currently use dof.aperture, I wonder if I should use get_user_av96 instead?
The "user" values should be the value set in the canon UI for M/Av/Tv modes. If you are just getting the values once, getting the regular av96 inside half press should be fine.

I would hope the dof aperture value is equivalent to the av96 if you get it in half press, and it seems to be in a quick test, but the code is complicated enough that I'm not totally sure it is in every case.

I did verify that dof aperture can return different values outside of halfpress, so I would recommend not calling get_dofinfo outside of half press.
Quote
For example, is this the 'best' way:
Code: [Select]
press("shoot_half")   
repeat sleep(10) until get_shooting()
s = get_tv96()   
av = get_av96()
release("shoot_half")
repeat sleep(10) until (not get_shooting())
As long as waiting for the extra half press cycle isn't an issue (which I expect it isn't in your case) that seems like a good way to me.

Quote
I guess the same question for setting. I currently use

Code: [Select]
set_tv96_direct(s)
set_av96_direct(av)
set_sv96(sv96_market_to_real(iso_to_sv96(1600)))
Do you consider this the 'best way'
That should be fine. Note that overrides take effect for the next shot or half press cycle only. I noticed your script has code like
Code: [Select]
function bookend()
    set_tv96_direct(960)
    set_av96_direct(640)
    local ecnt = get_exp_count()
    myshoot()
    set_tv96_direct(s)
    set_av96_direct(av)
    press("shoot_half")
    repeat sleep(10) until get_shooting()
    sleep(500)
    release("shoot_half")
    repeat sleep(10) until (not get_shooting())
end
which will effectively throw away the the set tv/av values. It will set the propcase values, but they will normally be clobbered in the next half shoot.

ISO override has another quirk: after you use set_sv96, ISO mode is effectively set to auto after the shot the override is used in. So you should either set sv96 for each shot, or set ISO_MODE to a specific value. If you are only using specific, standard ISO stops like ISO 1600, you can just set ISO_MODE and not use set_sv96.

ISO_MODE stays set until ISO is changed in the UI or set_sv96 is used, so you don't need to set it every shot.

If you do use set_sv96, it's a good practice to save ISO_MODE at the start of the script, and restore it at the end.
Don't forget what the H stands for.

Re: Landscape Focus Bracketing Script
« Reply #141 on: 15 / January / 2020, 07:50:16 »


@reyalp


Many thanks for finding the time to educate/help me.


As I say, I'm used to ML Lua, not CHDK Lua.


I'll be up issuing my bracketing script soon and will refresh the CHDK info for it.


I'll then tweak the M3 version, which is different to the 'standard' CHDK version.


IMHO my script is a great tool for the landscape 'bracketeer', ie seeking a one stop shop for exposure and focus bracketing. But then again, I would say that, wouldn't I  ;)

*

Offline Caefix

  • *****
  • 945
  • Sorry, busy deleting test shots...
Re: Landscape Focus Bracketing Script
« Reply #142 on: 15 / January / 2020, 12:58:44 »
( ( ( :-X
void shooting_update_dof_values()      /// (not my code...) :haha

I´m not shure, haven´t verified on tripod, but dof.... seems to be influenced by...
zooming in | out, zoom steps, speed,...

&&   That could be useful values for Lua & Ubasic, too:
   camera_info.dof_values.distance_valid
   shooting_get_prop(camera_info.props.metering_mode)
« Last Edit: 15 / January / 2020, 13:58:32 by Caefix »
All lifetime is a loan from eternity.

Re: Landscape Focus Bracketing Script
« Reply #143 on: 15 / January / 2020, 14:37:58 »
@Caefix


I’m sorry to be blunt, but often see you posting here, but I have no idea what you are talking about.


*

Offline Caefix

  • *****
  • 945
  • Sorry, busy deleting test shots...
Re: Landscape Focus Bracketing Script
« Reply #144 on: 15 / January / 2020, 14:54:18 »
 :o `C´ stands for conspiracy, I guess, as allways.
Sorry for not endian confusion.
All lifetime is a loan from eternity.

Re: Landscape Focus Bracketing Script
« Reply #145 on: 13 / July / 2020, 10:01:00 »
Just an alert that I’ve tweaked the M3 version of my landscape bracketing script. The latest version can be downloaded from here: https://gist.github.com/pigeonhill/cdf25239bae6a4343e6431fb4c10c849


If you are unfamiliar with the need for this script, then this may help: https://chdk.fandom.com/wiki/Landscape_Focus_Bracketing_:_perfect_near_to_far_focus_brackets


I needed to tweak things as the M3 has a major weakness, ie no custom timer, so no controlled CHDK bracketing in continuous mode.


My script allows you to focus bracket from the current position or, automatically, from the focus minimum, to a stated infinity, based on an infinity blur. The infinity blur is a fraction of the overlap blur you select.


At each focus station, including the no focus bracketing option, you can capture the following exposure brackets, all assuming your base exposure is an ETTR one: 1*2Ev or 1*3Ev or 1*4Ev or 2Ev+4Ev or 2Ev+4Ev+6Ev or an iso invariant capture at ISO1600.


You can bookend the full bracket sequence with a dark frame if you wish.


The script appears pretty robust, and, as I say, it was written for landscapers, ie not macro work ;-)


As usual I welcome and feedback and suggestions to make the script better.
« Last Edit: 13 / July / 2020, 10:21:13 by pigeonhill »

*

Offline c_joerg

  • *****
  • 1248
Re: Landscape Focus Bracketing Script
« Reply #146 on: 14 / July / 2020, 01:55:13 »
The latest version can be downloaded from here: https://gist.github.com/pigeonhill/cdf25239bae6a4343e6431fb4c10c849

If I’m following the link and ‘Download ZIP’, the ZIP includes gfbs2.lua and not M3 Brackets.lua.

So you didn't dare to extend the script for the M10?

Have you ever tried a1ex focus_stack.m which is running under the free Octave?
My impression was that it can keep up with helicon focus.

https://www.magiclantern.fm/forum/index.php?topic=24937.msg226183#msg226183
Download
http://files.apertus.org/align_image_stack/

My Version in MATLAB
https://www.magiclantern.fm/forum/index.php?topic=24937.msg226276#msg226276
M100 100a, M3 121a, G9x II (1.00c), 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

Re: Landscape Focus Bracketing Script
« Reply #147 on: 14 / July / 2020, 02:55:13 »
@c_joerg

Quote
If I’m following the link and ‘Download ZIP’, the ZIP includes gfbs2.lua and not M3 Brackets.lua.

I don't know what is going on your end, I just followed the link and downloaded the zip and it is the M3 bracket script. Strange.

As I haven't (yet) got an M10, I haven't extended the script yet, ie can’t test  ;-)

I'll have a look at focus_stack.m: Does it handle handholding and frame to frame movement, ie landscape focus bracketing has large lens breathing movements?

Cheers

Garry
« Last Edit: 14 / July / 2020, 03:03:18 by pigeonhill »


*

Offline c_joerg

  • *****
  • 1248
Re: Landscape Focus Bracketing Script
« Reply #148 on: 14 / July / 2020, 04:21:05 »
I don't know what is going on your end, I just followed the link and downloaded the zip and it is the M3 bracket script. Strange.

Hmmm, really strange. I tried 3 times in the morning. Now it works….


I'll have a look at focus_stack.m: Does it handle handholding and frame to frame movement,
No.
There is a second script align_image_stack_finetune.m which has to run before.
M100 100a, M3 121a, G9x II (1.00c), 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

Re: Landscape Focus Bracketing Script
« Reply #149 on: 14 / July / 2020, 04:40:35 »
@c_joerg

Code: [Select]
There is a second script align_image_stack_finetune.m which has to run before
My gut feeling that that align function is optimised for macro work and not landscape, ie handling the lens breathing issue. But that’s a guess.

I usually find if Helicon Focus can’t handle the focus breathing, believe it or not, Photoshop CC can.

 

Related Topics