Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - garry23

#51
Some be be interested in this, especially at the moment.

https://1.shortstack.com/VChq6Z
#53
General Chat / Entertainment
April 17, 2020, 08:52:56 AM
I thought some, who haven't seen this before, might be interested in the entertainment value, as we are in lockdown.

Stay safe

Garry

https://youtu.be/rqQ2kvc-LPE

https://xanglecs.com/
#54
General Chat / Near-Far, Zero-Noise Bracketing
March 08, 2020, 12:59:46 PM
Just in case a photographer is interested, here is a post I've just made: http://photography.grayheron.net/2020/03/near-far-zero-noise-bracketing.html

The technique will work with any camera, and of course ML RAW histogram rwill aid the exposure setting and ML has advanced ISO 2 image bracketing.
#55
General Chat / In-field lens calibration
March 07, 2020, 03:09:50 PM
Although this post is not ML related, I thought some may be interested in my latest experiments.

http://photography.grayheron.net/2020/03/in-field-manual-lens-micro-calibration.html
#57
Scripting Q&A / Sensor info
January 23, 2020, 06:41:12 PM
Does anyone know if any sensor info has been exposed through the Lua API?

Specifically, I want to get to the camera's pixel pitch, but knowing the other sensor info I will be able to estimate it, eg size of the sensor in mega pixels etc

I don't need it very accurately.

Cheers

Garry
#58
General Chat / Looking to the future
January 18, 2020, 08:02:10 AM
As many know, the technology in cameras is incredible and many see a far future where 'all' we need do is push one button to gather our photonic data for post processing later, i.e. 'fixing' exposure and focus in post.

Some are already providing us this computational approach, both in cameras and in phones, eg L16 camera, full ISO invariant sensors and the hint that sensors are arriving that will mean highlight saturation will be a thing of the past.

Of course ML developers have been moving us towards the future as well, for example Dual-ISO and scripting to create more intelligent programme modes etc.

For me ML remains a key technology, as it will act as a bridging technology for a long time, i.e. until camera manufactures create the 'right camera'. Thus ML  allows users to elevate their old, non computational cameras, to a higher level of functionality, thus bridging the gap between the past and the future of photography and videography.

Anyway, I thought some may be interested in this F stoppers post that adds to the conversation on the future of cameras.

https://fstoppers.com/originals/aperture-and-shutter-priority-modes-are-dead-its-time-get-rid-them-443813
#59
General Chat / New Canon Info
January 15, 2020, 08:55:26 PM
I thought some may be interested in this post https://www.strollswithmydog.com/canon-high-res-gd-lpf-aa/
#60
Scripting Q&A / Those damn semaphore timeouts...again!
January 13, 2020, 07:34:12 PM
I've tried to work out what is going 'wrong' with my latest DOFI code.

It is a simple code that generates repetitive semaphore messages, but I can't work out why.

The relevant code snippet looks like this:

function check_stuff()
    if menu.get("Focus","DOF Info") == "ON" then show = true else show = false end
    if (lv.overlays == 2 and (not menu.visible)) and show then update() end
    return true
end

DOFI_Menu = menu.new
{
    parent = "Focus",
    name = "DOF Info",
    help = "Helps with infinity focusing & focus bracketing",
    depends_on = DEPENDS_ON.LIVEVIEW,
    choices = {CON,COFF},
}

lv.info
{
    name = "DOFI",
    value = "",
    priority = 100,
    update = function(this)
        if (not show) then
            this.value = ""
        else
            this.background = COLOR.WHITE
            this.foreground = COLOR.BLACK
            if image_taken then
                if (x == last_x) then
                    this.background = COLOR.YELLOW
                    this.foreground = COLOR.BLACK
                elseif (ndof > last_fdof) or (fdof < last_ndof) then
                    this.background = COLOR.RED
                    this.foreground = COLOR.WHITE
                elseif (ndof < last_ndof) and (fdof > last_ndof) then
                    this.background = COLOR.GREEN1
                    this.foreground = COLOR.BLACK
                elseif (ndof > last_ndof) and (ndof <= last_fdof) then
                    this.background = COLOR.GREEN1
                    this.foreground = COLOR.BLACK
                end

                if x > infinity then
                    this.value = "INF"
                    this.background = COLOR.BLACK
                    this.foreground = COLOR.WHITE
                else
                    this.value = blurs
                end
            else
                this.value = blurs
            end
        end
    end
}

event.shoot_task = check_stuff


The semaphore is related to the menu, but why do I get it?

Does anyone have any insight?
#61
Share Your Photos / Extreme ETTR example
January 07, 2020, 10:59:51 PM
I thought some may be interested in my latest post: http://photography.grayheron.net/2020/01/extreme-ettr-processing.html
#62
This thread is superseded by https://www.magiclantern.fm/forum/index.php?topic=25286.msg230159#msg230159

***DOWNLOAD SCRIPT FROM HERE *** https://gist.github.com/pigeonhill/72dcef944db7bf1b11307dedeb2dc2f0

I'm starting 2020 with a new version of my focus bracketing helper script, called Depth of Field Info (DOFI). This version has had a UI overhaul and now integrates well into the overall ML UI.

The script provides the user with three key pieces of focus information:
   - The optical blur (in microns) at infinity
   - The diffraction blur through the scene
   - The total blur at infinity, which is the optical and diffraction taken in quadrature

Plus an estimate of the number of focus brackets required to go from the current position to infinity and whether the current image overlaps with the last image taken:
  - Yellow means the current image is at the same focus as the last one taken
  - Green means a positive overlap
  - Red means a negative overlap, ie a focus gap
  - White means that an image hasn't been taken yet, or that the focus length or aperture has changed

The script will only run with a lens that reports focus length, focus position and aperture. DOFI resets if aperture or focal length are changed.

All the above info is shown in ML's top info bar, ie in the right hand corner of the screen. DOFI is positioned under ML's Focus bar and can be switched off.

At start up the screen will look like this:



In this screen capture we see we are shooting at 24mm and at an aperture of f/8. I set the ML CoC (blur) to 30 microns, which defines the overlap blur to DOFI, and switched on diffraction aware, although using DOFI we do not need the ML DoF distances, as we will use DOFI to inform our focusing.

In the above we see we are focused at 91cm. We also see (top right) the DOFI information, ie #2:82/10/82, which tells us that we will need two focus brackets to cover from this position to infinity, and that the optical blur, at infinity, at this location, is 82 microns. Finally DOFI tells us that the diffraction blur is 10 microns and that the total blur at infinity is 92 microns, ie sqrt(82*82 + 10*10).

As an example of DOFI's use, lets assume we wish to focus stack from the macro end to infinity. At the macro end we would see the following:



Here we see that DOFI is saying that we will need four focus brackets, so let's get going and take our first image:



The only thing that changed was the DOFI field turned yellow, indicating that the current focus is the same as the last image captured. Thus if we refocus we can always come back to the last focus position by ensuring that the DOFI area is yellow.

As we refocus towards (or away from) infinity DOFI will turn green or red according to whether we have a focus gap. So all you need to do is refocus until you see red, then backoff slightly to green.

The following gif is illustrative:



Here we see I took the final image when the defocus blur at infinity was 9 microns, giving a total blur at infinity of 14 microns. As a point of reference, remember that the defocus blur at infinity, if you focus at the hyperfocal, is simply the circle of confusion, which needs to then be convolved with the diffraction. Thus, using DOFI, you can decide infinity blur quality, ie based on defocus or total blur.

I wrote DOFI for those that wish to control focus and want to have the flexibility to focus stack at any time, ie landscape photographers on a tripod.

As usual I welcome feedback, including ideas to improve DOFI.
#63
I thought some may be interested in my latest post: http://photography.grayheron.net/2019/12/theres-close-and-then-theres-venus.html
#64
General Help Q&A / Complex Menus
December 28, 2019, 11:45:09 PM
@a1ex

previously you told me that Lua doesn't handle 'complex menus' very well, ie at all.

I've tried to code up a solution in Lua and had partial success, see the function shutter below that takes the ML Expo Shutter and returns the shutter as a real number.

Where I'm failing is going the other way, ie pushing data to a complex menu item, like Desired FPS, see my attempt below, which doesn't work.

If you have any ideas about how to use Lua to solve complex menu interactions, I would be grateful.

--[[
TEST KEYS
]]

function shutter()
    local r = menu.get("Expo","Shutter","")
    local e = r:find(',')
    if e ~= nil then
        r = r:sub(1,(e-1))
    end
    if r:find('"') ~= nil then
        r = tonumber((r:gsub('"','')))
    else
        r = 1/(tonumber((r:sub(2))))
    end
    return r
end

local go = true
while go do
    msleep(1000)
    local r = menu.get("FPS override","Desired FPS","")
    local e = r:find("%(")
    r = r:sub(e) -- strip out the FPS part
    r = "0.23 "..r -- insert a new FPS
    menu.set("FPS override","Desired FPS",r)
    if key.last == KEY.UNPRESS_HALFSHUTTER then go = false end
end
#65
General Help Q&A / Debugging via console
December 28, 2019, 08:14:38 PM
Does anyone know if it's possible to scroll the console.

I'm trying to debug some Lua and the important stuff is at the beginning and the text feedback in the console is verbose and the stuff I need to read gets lost/hidden.

Cheers

Garry
#66
General Help Q&A / Back to back recording
December 15, 2019, 11:23:38 PM
@a1ex

Don't know if you have time to cast your eyes over this Err 70 problem I keep getting.

Here is the crash report:

QuoteASSERT: FALSE
at RscMgr.c:904, MovieRecorder:ff0ef42c
lv:1 mode:3

MovieRecorder stack: 1716f0 [171850-16f850]
0xUNKNOWN  @ de48:171848
0xUNKNOWN  @ 17bbc:171820
0x000178B4 @ ff0ebdf8:171808
0xUNKNOWN  @ 178e4:1717f8
0xUNKNOWN  @ 1796c:1717d8
0xFF1F06E4 @ ff1dafe0:171770
0xFF13C2D4 @ ff1f0730:171760
0x00001900 @ ff0ef428:171728
0x00069878 @ 69c1c:1716f0

Magic Lantern version : crop_rec_4k.2018Jul22.5D3123
Mercurial changeset   : c1e44b8e0183 (crop_rec_4k_mlv_snd) tip
Built on 2018-07-22 13:10:52 UTC by jenkins@nightly.
Free Memory  : 215K + 2491K

Here is the test code snippet:

for j = 1, clips do
    msleep(1000)
    movie.start()
    for i = 0, 5, 1 do task.yield(1000) end
    movie.stop()
    task.yield(1000)
end


That is, I record for 5 sec and repeat until clips is achieved
#67
General Help Q&A / Module replacement
December 11, 2019, 07:50:40 PM
I wonder if one of the gurus knows the answer to this question.

If I take the 4K experimental download and replace the Lua module with the Lua module from the Lua fix download, will this work, or are there changes in the ML core code that would create issues.

#68
I appreciate that Lua developments may not top priority, but I offer the following thought for when/if the next Lua iteration gets released.

Currently, key.wait only looks for one key. I believe it would be better if key.wait could include a list of keys that are ORed, ie one of the list of keys would trigger wait to continue ie



key.wait([key.1], [key.2], .... [key.n])



Update: plus would it be possible to have key.wait act in a similar way to the key event handler, i.e. when the wait key is detected, key.wait can either handle the key normally or ignore the key.
#69
General Help Q&A / Auto Bracketing termination
December 04, 2019, 02:10:49 PM
@a1ex

My memory is not as good as yours (so forgive me if you have already answered this question)  ;)

Is there a way in Lua to look for a particular Canon or ML state to detect that Auto bracketing has completed, when I don't know the number of images that will be captured.

For example, is there a test I can use for 'bracketing_test'?


    while bracketing_test do
        display.notify_box("bracketing running")
        task.yield(1000)
    end
    display.notify_box("bracketing finished")

#70
I thought some may be interested in my latest experiments: http://photography.grayheron.net/2019/11/no-more-nd-filters.html

Many thanks to those who have helped me understand the 'video stuff'.

Cheers

Garry
#71
Feature Requests / Lua drawing
November 18, 2019, 06:49:40 PM
Although not a priority, whenever the Lua module gets updated, I would like to suggest/request the developers consider adding the ability to draw within a bounding box.

At the moment, if I draw a line that goes, say, over the ML menu items, that is exactly what happens, ie the line writes on top of the ML menu.

With a bounding box, rect or circle ideally, feature, you could enable that first, draw your lines etc, knowing they would be restricted to only being displayed inside the bounding box. The bounding box would then be switched to allow other drawing and bounding boxes to be specify.

Another thought is to ensure that the ML stuff is always draw after the user graphics.

As I say, not a priority.
#72
Academic Corner / Underwater photography
November 13, 2019, 11:54:54 PM
I found this interesting and I thought others might as well.

This Algorithm Can Remove the Water from Underwater Photos, and the Results are Incredible
http://flip.it/QlkUdt
#73
Scripting Corner / Script for Tilt-Shift Lens
November 04, 2019, 06:10:39 PM
This thread is superseded by https://www.magiclantern.fm/forum/index.php?topic=25286.msg230159#msg230159

If you are lucky enough to own a tilt-shift lens, in my case a 24mm TS-EL II, you may be interested in my latest script.

Full details can be read here: http://photography.grayheron.net/2019/11/in-camera-ts-e-lens-simulation.html

The script can also be downloaded from the above link.

I'll update this post as I write more about the script.

As usual I welcome feedback.
#74
@a1ex

If you do have a few minutes I would welcome your insight.

I continue to seek a way to pause a script and fully wait for the advanced bracketing (AB) to finish.

I trigger the AB via a shoot() call, and wish to pause the script at this point until the AB has finished, and at that time continue doing other script 'stuff', including more shooting calls.

I've tried using sleep() within a repeat loop, ie tracking card_count, but this seems to stop the AB. Alsso this would fail if you were using AB in auto mode, ie not knowing how many brackets to take.

Do you have any pointers?

If not, would there be a chance to implement a scheme that allows the AB to be called and for the script to wait?

Cheers

Garry
#75
Scripting Corner / New Hand Held Bracketing Script
October 01, 2019, 10:04:11 PM
This thread is superseded by https://www.magiclantern.fm/forum/index.php?topic=25731.0

I've decided to update my hand held bracketing script by making better use of the ML bracketing capability. The script is best used with WA lenses.

The script is ideal for use in high dynamic situations such as cathedrals and where you can't use a tripod.

The script takes the min shutter from the ML ETTR. So set this up.

All you need to do is set the ML advanced bracketing to two frames, bracket type as exposure, EV increment to 3 or 4 Ev, according to your camera, sequence to 0 + ++, and ISO shifting to full. The script works best if your base ETTR ISO value is low, eg 100.

The script allows you to select a triggering button, but you can also do a long half shutter, for more than 3 seconds, to trigger the script. I personally prefer the half shutter approach.

You can add an addition delay if you wish, ie if using a button.

Finally, you can ask the script to show you the button/key value, if you don't know it. But switch this off after you know the button value.

The script will run in LV or non LV mode.

Once set up, the script should be used as follows.

1. ETTR to set the base exposure. I use SET to Trigger the ETTR.

2. If the base exposure is less than the min shutter, as set in the ETTR menu, then three brackets will be taken: at the base shutter and base ISO, the min shutter and the base ISO, and at the min shutter and base ISO + 3 or 4 Ev.

3. If the base exposure is the same or greater than the min shutter, the only two exposures are taken at the min shutter and base ISO, and at the min shutter and base ISO + 3 or 4 Ev.

Process your brackets as you wish.

Finally, as usual, watch out for conflicts with other scripts, ie switch these off if conflicts observed.

I'll write more about the script when I get a chance, including some examples. For now, you can download it from here https://gist.github.com/pigeonhill/96ac84ea5f1435b056120b4d03884425
#76
Scripting Q&A / PicStyle Key Strangeness
September 29, 2019, 12:08:06 PM
I'm using the latest Lua fix on a 5D3.

I've convinced myself something is 'strange' with the PicStyle key.

When I press it I get a key 20 return, which is UNPRESS_UDLR.

Does anyone have any insight.

My use case is to hijack the PicStyle key in my script.
#77
General Help Q&A / Dual ISO processing strangeness
September 26, 2019, 06:47:26 PM
I have a very stable Lightroom set up, that processes Dual ISOs seamlessly, until today.

I took a load of duals on my 5D3 and all of the images processed ok, as usual, other than half a dozen that refused to process.

I shot at 100/1600 and you can clearly see these are duals.

The LR plugin says, no dual, and doesn't process these few images.

As I say, I've never seen this before.

Has any one got any insight.

Cheers

Garry
#78
General Chat / Another 645 example, with the help of ML
September 01, 2019, 03:05:48 PM
If you are interested in taking 645 images, with the help of ML, you may be interested in my latest post: http://photography.grayheron.net/2019/09/further-thoughts-on-virtual-645.html
#79
I thought some may be interested in my latest FB post, showing the value of Dual-ISO.

https://m.facebook.com/story.php?story_fbid=2473140226126838&id=100002926557476&anchor_composer=false
#80
General Development / Realtime Histogram
July 06, 2019, 06:23:47 AM
We are beginning to see new functionality in cameras that seems to hint at new/additional ML features.

One that got my attention is the Olympus OM-D EM1 Mk II, which shows a histogram of the realtime development of a LE image. For example https://youtu.be/ECC_0g79xYQ

My 'obvious' question is: with the power of ML and the inginuity of the developers, could ML deliver a similar functionality?

Even if it was not continuous, it would be a game changer to show the histogram at discrete time points in the LE.
#81
Feature Requests / Keypress event handler in Lua
June 25, 2019, 09:35:29 AM
The current event handler either blocks or allows processing of a key.

Would it be possible to also include the ability to switch keys, eg key_1 pressed, but key_2 processed.

I know I can do it via scripting  ;)
#82
General Help Q&A / 5D3 Red Light ;-)
May 30, 2019, 08:04:48 AM
It may be me, as usual, however, I've just seen a strangeness associated with my 5D3 red light (bottom right at the back).

Running latest Lua Fix.

Switch on: light flashes as expected a few times.

Switch to LV light comes on an stays on.

Switch out of LV light stays on.

I've tried this with no scripts loaded and it's the same.

I've reformatted the CF card and removed the SD card: it's the same.

Does anyone have any insight.


Resolved: Although I was in photomode, I switched between video and photo mode a few times, and 'problem' has gone away.
#84
Share Your Photos / Focus Stacked Flax Field
May 19, 2019, 04:48:57 PM
Needed a break from working in our garden, so popped out to the flax field just up the road.

5D3, f/8, 1/200s, Dual ISO 100/1600.

Captured using my auto focus bracketing script: three images.

Processed in PS using simple layer masks.



#85
For those that are seeking perfect manually set focus brackets, you may wish to look at my latest script: Go here to download and read about the script: http://photography.grayheron.net/2019/05/multi-image-deep-focus-photography.html

I wrote this to complement my automatic focus bracketing script.

The two may be loaded together as they have been scripted to 'respect each other'.

As usual I welcome feedback and suggestions to make the script better.


#86
General Development / Focus distance strangeness
May 04, 2019, 10:10:57 AM
I've spent a long time trying to understand Canon focus reporting, which is what I believe ML reports. That is the distance between the subject and the sensor plane.

In EXIF data, the Canon maker info reports upper and lower figures for focus distance, and these don't seem to match the ML reporting well.

I just did the following test on a 24-105 F/4L.

Set the lens to 105mm, ie where one gets the max magnification and focused on a subject  (a test card) at about 2m away. I used auto focused and manual focus and always got a reasonable match to the ML reported focus distance.

I then changed focal length to 24mm and refocused, both trying auto and manual, and the ML focus distance now does not match the actual distance, which hasn't changed from the first test. It is reported well short.

Something is not right.

My simple conclusion is that the ML, Canon, focus distance reporting is only 'right' at the long focal length of a zoom lens. After all this is where Canon reports their maximum magnification in the spec.

Does anyone else have any insight here?
#87
General Help Q&A / LV Problem
April 22, 2019, 10:45:57 AM
Does anyone know why I get the following error stream?

It's driving me nuts!



#88
Scripting Q&A / Press question
April 19, 2019, 10:28:40 AM
@a1ex

If I want to trigger advanced bracketing in a script, I need to simulate a shutter press. The question is, what is the best way.

Do I need to do a full sequence, ie press(half), press(full), press(unpressfull), press(unpresshalf)?

Or some other sequence.

How do I pause the script to wait for advanced bracketing to finish, eg before I refocus etc.

Hope you can educate me.

Cheers

Garry
#89
Currently camera.aperture has .min and .max, allowing lens specific testing and setting.

Would it be possible to include .min and .max for shutter and ISO, so you can test/set the camera's min and max ec, shutter speed or ISO, which varies over cams.

Cheers

Garry
#90
Scripting Q&A / Managing mode change
April 17, 2019, 07:48:22 PM
@a1ex

I've stumbled again  :-[

What I'm trying to do is enter my script in any mode, ie M, Av or Tv, and in the script change/control both aperture and shutter speed, ie run the script in M mode.

Is there a way to switch modes in Lua?

If there is, I can't find it.

The alternative being to force the script to only run if in M mode.

As usual I'm hoping you have the answer  ;)

Cheers

Garry
#92
Scripting Q&A / lens.focus problem
April 16, 2019, 07:24:52 PM
@a1ex

As usual, I hope you can help.

I'm writing a new script and trying to use lens.focus.

I'm in LV but I get a console error saying lens.focus needs to run in LV.

Here is the area of the script that throws the error:

function set_focus(x)
    lv.resume()
    local current_x = lens.focus_distance
    if x == current_x then return x end
    if x > current_x then
        while lens.focus_distance < x do lens.focus(1,2,true) end
        while lens.focus_distance > x do lens.focus(-1,2,true) end
    else
        while lens.focus_distance > x do lens.focus(-1,2,true) end
        while lens.focus_distance < x do lens.focus(1,2,true) end
    end
    return lens.focus.focus_distance -- final focus distance, ie may not be extactly x ;-)
end


I simply can't work out what's happening.

Am I missing something?

BTW I'm on a 5D3 with the latest Lua fix.

Cheers

Garry
#93
Scripting API suggestions / set_focus()
April 14, 2019, 08:11:53 AM
@alex

Over at CHDK I can use set_focus() in Lua, see my post here https://chdk.fandom.com/wiki/Landscape_Focus_Bracketing_:_perfect_near_to_far_focus_brackets

As the G1X is an APS-C class camera, this is my preferred camera when doing deep focus landscape shots. For example this test image attached that I actually took with my G7X.





I see in the latest Lua fix experimental that you reference unlocking rack focus for EF lens, at least.

But to get the full power out of controlling the focus one needs to control focus position in Lua, which is currently only available by moving a fixed amount and looping until you have converged to your required focus position. I'm sure if I can do this in Lua, and I can and have, it would be more stable and faster doing in in C and having something like this:

set_focus (the current focus distance in mm)

get_focus may also be used directly in an expression where its numerical value might fit: set_focus ((3 * get_focus) / 2) would set a new focus distance 1.5X farther than the current distance.

Syntax:
set_focus(x)

Assuming you think it can be done (technically and your time), may I request you consider adding set_focus() to the next Lua fix update.

Cheers

Garry
#94
Scripting Q&A / Managing script to script conflicts
April 01, 2019, 05:53:54 PM
@a1ex

I'm looking to refactor my scripts so they work better together.

The issue I usually face is that script A looks to use a key 1, but so does script B.

I'm therefore looking to somehow use my cycler script as a master control script, ie to manage event.keypress and event.shoot_task, ie to deconflict scripts.

What I don't fully understand is how the keypress event is handled, ie does it pass through each script in turn?

When you have a spare moment, I hope you can throw some education my way  ;)

Cheers

Garry
#95
Scripting Q&A / Key management question
March 27, 2019, 08:43:33 PM
@a1ex

Hope you can quickly help and put me out of my misery.

'All' I'm trying to do is use event.keypress to look out only (sic) for a half shutter press and not a full shutter press.

My question is, when you do a full shutter press, does the key event handler go through the full sequence, ie halfshuuter, fullshuuter, fullshutterunpress, halfshutterunpress, or some other logic.

Thus if I look for and halfshutterunpress and a key.last == fullshutterunpress I should be ok. But when I try this, it doesn't seem to work.

Cheers

Garry
#96
Scripting Corner / Cycler
March 18, 2019, 11:07:34 PM
Previously I published a script I called 'The Toggler'; the idea being to gain quick access to various ML states without using the ML menus.

Although The Toggler worked, I believe it was a little too complicated, eg you would toggle forwards and backwards using various 'hijacked' keys.

I've now revisited The Toggler and simplified it, and, in the process, renamed it Cycler. Which can be downloaded here: https://gist.github.com/pigeonhill/7974b876c4fbf6de1b7ab1c3f64e77e6

The idea remains the same, ie quickly gain access to various ML states. The rationale being some ML features, eg ETTR and Auto Bracketing, not work together, ie one needs to be switched off or set up correctly.

Unlike The Toggler script, Cycler only needs one button. In the published script I have used PLAY. In the version I use on my EOSM, I cycle through the following ML states by simply double pressing [PLAY]:
   1.   Null: switch off all menus under control
   2.   Switch ETTR on
   3.   Switch off ETTR and switch on Auto Bracketing
   4.   Switch off Auto Bracketing and switch on Focus Zoom
   5.   Switch off Focus Zoom and switch on Dual-ISO

Note that Cycler requires you to handle additional sub-menus, ie 'all' it does is switch on or off a particular ML main menu. But note you could add in sub menu changes as well.

The script 'hijacks' the PLAY button by looking out for double presses in the following way:
   •   [PLAY]+(<1000ms)+[PLAY] = cycle to the next ML state
   •   [PLAY]+(>1000ms)+[PLAY] = [PLAY] functions as normal

Cycler only moves through the states in one (circular) direction. The time delay can be adjusted in the script.

The script is relatively simple and additional states can be added easily. All one has to do is manage switching on/off the previous state. Just follow the script's template.

Note, you can cycle between complex states, ie with multiple menu set calls.

Bottom line: Cycler is a simple script, that I personally find of value, especially on the EOSM with its limited buttons and when there may be clashes, eg access to the SET button or when using ETTR vs Auto Bracketing: I hope others find it of interest as well.

Finally, as usual, I welcome any feedback on the script.

#97
Scripting Q&A / Lua playing up?
March 17, 2019, 08:22:19 PM
@a1ex

I've reached a point where I believe there may (sic) be a Lua issue, ie rather than my bad programing ;-)

Here is the code:

--[[
Cycler
Version 0.1
Garry George April  2019
http://photography.grayheron.net/
--]]

config = 1
max_config = 5
-- Change the Cycler button to your choice, for example
-- B1 = PLAY and B2 = INFO on an 5D3, and B1 = INFO and B2 = PLAY on a EOSM
button_1 = KEY.INFO -- imode switch and set
button_2 = KEY.PLAY -- used to go forwards in imode
button_3 = KEY.MENU -- used to go backwards in imode
cycled = true
timer = dryos.ms_clock
timer_running = false

menu.set("Expo","Auto ETTR",0)
menu.set("Shoot","Advanced Bracket",0)
menu.set("Overlay","Waveform",0)
menu.set("Overlay","Magic Zoom",0)

function reset(k)
    if cycled then
        if config == 1 then
            -- normal play function, so reset everything
            menu.set("Expo","Auto ETTR",0)
            menu.set("Shoot","Advanced Bracket",0)
            menu.set("Overlay","Waveform",0)
            menu.set("Overlay","Magic Zoom",0)
        elseif config == 2 then -- switch on ETTR
            menu.set("Expo","Auto ETTR",1)
        elseif config == 3 then -- switch on bracketing
            menu.set("Expo","Auto ETTR",0)
            menu.set("Shoot","Advanced Bracket",1)
        elseif config == 4 then -- switch on Magic Zoom
            menu.set("Shoot","Advanced Bracket",0)
            menu.set("Overlay","Magic Zoom",1)
        elseif config == 5 then -- switch on Waveform
            menu.set("Shoot","Advanced Bracket",0)
            menu.set("Overlay","Waveform",1)
        end
        cycled = false
    else
        -- do nothing
    end
end

function test4reset(k)
    if k == button_2 then
        if timer_running then
            if dryos.ms_clock - timer < 500 then -- normal button action
                timer_running = false
                cycled = true
                return true
            else
                config = config + 1
                if config > max_config then config = 1 end
                cycled = true
                timer_running = false
                return false
            end
        else
            timer = dryos.ms_clock
            timer_running = true
            cycled = false
            return false
        end
       
    end
    cycled = false
    return true
end

event.shoot_task = reset
event.keypress = test4reset

lv.info
{
    name = "Cycler State",
    value = "",
    priority = 100,
    update = function(this)
    this.background = COLOR.WHITE
    this.foreground = COLOR.BLACK
        if config == 1 then
            this.value = "PLAY"
        elseif config == 2 then
            this.value = "ETTR"
        elseif config == 3 then
            this.value = "Auto"
        elseif config == 4 then
            this.value = "Zoom"
        elseif config == 5 then
            this.value = "Wave"
        end
    end
}


The problem occurs when you cycle through the options and reach the waveform option.

All this state does is switch off the previous ML state, ie Magic Zoom, and switch on waveform.

All other state changes work fine.

At the waveform state change, the cam (EOSM) freezes.

As I say, it may be my programing, but I don't believe so.

Cheers

Garry
#98
Tutorials and Creative Uses / Reflections on ML & CHDK
February 28, 2019, 08:08:04 PM
I thought I would write a few words on my experiences related to CHDK, as Magic Lantern and CHDK are 'close cousins'.

In particular, as a stills photographer, I wanted to flag up that some of the Canon P&S cameras are pretty good when you wish to travel light; and, therefore, having ML and CHDK, together, is a killer combination.

Yes, we have the (mirrorless) EOSM in our ML world, but this still needs lenses; and, when it comes to controlling focus, it suffers from the same limitations as other ML-EOS cameras, ie not being able to fully/robustly control focus position via Lua, compared to CHDK that is.

BTW this lack of (ML) focus control is why I wrote the DoF Bar script as a manual aid when focus stacking: that is, giving you more info than on the lens' DoF scale.

So I decided a few months ago to reacquaint myself with the CHDK P&S options. I had previously dabbled in CHDK when I purchased a pocketable S95 some 8 years ago: a very small 'footprint', but, of course, a very small (12-bit output) sensor. I then moved on from a 50D to a 5D3 and three EOSMs (vis, IR and 645), got into ML-Lua and 'forgot' about CHDK.

So, as a present to myself last Christmas, I bought two second hand Canon P&S cameras, with the largest sensors I could. Namely the G7X (1" sensor) and the G1X (APS-C class sensor).

I wasn't trying to emulate ML's full functionality, eg Dual-ISO, but I did want to see how far I could push the G1X and G7X as 'tripod-based' travel cameras: and potentially see what CHDK could do beyond ML. I also wanted a movable LCD for my low-level photography :-)

I thus set about writing a Lua script in CHDK to do something that I have failed to do with the ML and my interchangeable lens EOS cameras. That is write a robust (auto) bracketing script that worked from close-up, ie 'macro-like', to landscape, and automatically handled exposure and focus bracketing together.

The result is a Landscape Bracketing Script I have published on the CHDK forum: https://chdk.fandom.com/wiki/Landscape_Focus_Bracketing_:_perfect_near_to_far_focus_brackets

The script has the following functionality/features:
•   Seamless focus bracketing from the camera's minimum focus to a blur-defined infinity, ie specified as a fraction of the default/assumed defocus CoC;
•   Focus brackets can have one of four overlap options: None, ie the focus brackets touch at a defocus blur of the camera's CoC; 2/3 the CoC; half the CoC or at a diffraction aware blur that ensures the diffraction and defocus blur, taken in quadrature, equals the camera's CoC. BTW the CHDK default CoC is the classic crop-adjusted from an assumed FF 30 microns;
•   The script allows the user to select one of several focus stacking options, ie: from the current focus to a delta (mm) distance, useful for close up photography; from the current focus to the blur defined infinity; from the camera's min focus to the current focus; from the camera's min focus to the blur defined infinity, ie a full focus coverage. The script automatically 'finds' the camera's minimum focus;
•   Because focus stacking can result in many brackets, the script allows the user to identify a maximum number, ie as a warning. This can be switched off, ie max number of focus brackets = 0;
•   At each focus step the script also allows several exposure bracketing options, eg: two additional exposures at 1, 2 or 3EV and using a -/+, +/++ or -/-- logic; one additional bracket at an ISO 800 or ISO 1600, ie to capture a single ISOless-zone additional bracket, which may be useful if handholding (but note that many P&S camera can be assumed to be ISO invariant from the base ISO, unlike the EOS cameras); or a 'zero-noise' time bracket at +4Ev, ie to cover the shadows (but with increased blooming risk);
•   The user can select the blur-defined infinity where the focus bracketing will stop, ie at either CoC/2, CoC/3 or at CoC/4; which equates to 2H, 3H or 4H distances, where H is the hyperfocal distance (note an infinity blur of CoC/3 is about the limit, as going smaller than this means you risk pushing into the less than 2-sensel zone);
•   The script will, if requested, put a dark-frame bookend at the start and end of the focus-exposure bracket set. Useful in post to differentiate a bracketing set;
•   Finally, the script, if requested, will add a log entry in a log file, with the focus distance info for each focus.

As an example of what the script can do, I attach a few images that I took with my G7X.









The cathedral examples were taken using the +/++ exposure option and by focusing on the nearest point of interest. The garlic head is a ZN example where I focused on the front of the head and specified a 30mm delta from there.

As to using the script: my personal preference for landscapes is to use the CHDK log-based histogram to ETTR for the highlights and use the +/++ exposure bracketing or the Zero-Noise one.

I'll stop here as I think I've achieved what I wanted: that is alert the EOS/ML stills photographers out there, that there are some pretty good travel options in the CHDK world, eg the G7X and the G1X. That is as long as you are not looking for ML-specific 'stuff' such as Dual-ISO and RAW video; these are pretty good alternatives to, say, the EOSM.

As usual I welcome feedback, especially from others that have explored the Lua-based 'cross over world' between ML and CHDK.
#99
Tutorials and Creative Uses / Non ML dual ISO
February 20, 2019, 09:35:48 AM
Forgive me if you have seen this before https://youtu.be/g8hHFt3ChZ8
#100
I just came across the following channel, that I thought I would share.

Yes I know it's not Canon based, but some of the videos address genetic video/photography matters.

For example this one:  https://youtu.be/AcO0S1An_LY