Saturday, March 19, 2016

Silent Toggler

The following script, an update from the previous versions, has been written to work on all ML enabled cameras, including the EOSM.

The functionality pivots around a simple idea, that many photographers want quick access to different ML features, ie without having to go in and out of the ML menus. In addition, many use a single set up for each feature, eg auto bracketing at, say, 2Ev.

The following features are accessible via 'the toggler' button. The default is the RATE key, but this is your choice on all cameras other than the EOSM, which uses the main dial's up (top) toggle. The button is simply changed in the script. The toggler cycles through the following:

  • ‘Black’ bookend exposure for differentiating (focus and/or exposure) brackets;
  • ETTR;
  • Auto bracketing;
  • Dual-ISO;
  • Full Res Silent Picture taking
Additionally, focus stacking feedback is provided after the first image is taken. Yellow means focus towards infinity, red towards the macro end and if you hit a sweet spot green will be seen. If green is not seen, simply move into the yellow just before going red.

To get the best out of the toggler script, you should set your preferred ML menu settings for ETTR, Auto bracketing, Dual-ISO and FRSP. My preferences, when using the toggler, are:
 

ETTR (via HalfDblShutter press) 
  • Trigger mode = Half Double Click 
  • Slowest Shutter = according to needs
  • Highlight Ignore = 0% or a few tenths of a % 
  • Midtone and Shadow SNR = 0 
  • Link to Dual = Off
Auto Bracketing (following a full shutter press)
  • Bracket Type = Exposure (Tv, Ae)
  • Frames = Autodetect
  • Ev increment = 2Ev
  • Sequence = 0 -+ -- ++
  • 2-second delay = Auto
  • ISO shifting = OFF
Dual-ISO (following a full shutter press)
  • Recovery ISO = 800
Silent Picture (via half shutter press)
  • Silent Mode = Full-res
  • Slit-Scan Mode = Top-Bottom
  • File Format = DNG
In addition I have the ML spotmeter on and in Ev mode, as this allows me to set the exposure for an auto exposure capture from the darkest frame, ie set at, say, -3-4 Ev. The ETTR, Dual-ISO and Silent Picture modules need to be switched on.

As some may not have used Silent Picture mode in ML before, I offer the following insight. The limits are that the exposure should be between 1/4 to 1/2 second to 15 seconds. Thus it is a feature that is not for hand holding. You will not be able to review the image captured in-camera. The capture is shutterless and totally silent. The capture that I use is a DNG, but there is another option, the MLV, but this requires more post processing. The DNG is accessible via, say, normal Lightroom ingestion (but your image will not have EXIF data attached to it).

The silent picture mode is great for when you wish to capture images without drawing audible notice to yourself :-)

As usual I welcome feedback and any suggestions to make ‘The Toggler’ better.

--[[    
    Still photography toggler script
    Version 1.0 (should work on all ML enabled cameras with the Lua module)
    Garry George March 2016
    http://photography.grayheron.net/
    Workflow toggler script to help with focus and exposure setting.
    Toggle through your workflow using the selected option ie a button or the top of the main dial or toggle switch.
    For focus feedback yellow means move more towards the infinity end, Red means move more towards macro end,
    Green means at the sweet spot. If Green not seen, move to just being in the yellow from being in the Red.
--]]
factor = 0.2
b1 = lens.dof_far
fp = lens.focal_distance
c1 = b1 - (b1 - fp*10)*factor
inf = 1000000
started = false
current_tv = 0
play = 0
toggler = 0
-- Change toggler value to your choice of button, eg KEY.RATE, KEY.UP, KEY.INFO or KEY.PLAY.
-- See http://davidmilligan.github.io/ml-lua/modules/constants.html for key constants
-- Default is KEY.RATE for non-EOSM cameras. EOSM self selects upper toggle on main dial as the EOSM doesn't have many buttons!
if camera.model_short == "EOSM" then toggler = KEY.UP else toggler = KEY.RATE end

event.keypress = function(key)
    if keymenu.submenu["Turn On/Off"].value == "Off" then
        started = false
        return true
    elseif key == toggler 
    then
    play = play + 1
    if play == 7 then play = 0 end
    return false
    elseif key == KEY.FULLSHUTTER and play ~= 6
        then
        b1 = lens.dof_far -- in mm
        fp = lens.focal_distance -- in cm
        c1 = b1 - (b1 - fp*10)*factor
        started = true
        return true
    elseif key == KEY.HALFSHUTTER and play == 6
        then
        b1 = lens.dof_far -- in mm
        fp = lens.focal_distance -- in cm
        c1 = b1 - (b1 - fp*10)*factor
        started = true
        return true
    end
end

lv.info
{
    name = "Info 1",
    value = "",
    priority = 100,
    update = function(this)
    this.value = ""
    if keymenu.submenu["Turn On/Off"].value == "On" and started and fp ~= 0
    then
            this.foreground = COLOR.BLACK
            a2 = lens.dof_near
            if a2 > b1 then
            this.background = COLOR.RED
            elseif a2 < c1 then
            this.background = COLOR.YELLOW
            else
            this.background = COLOR.GREEN1
            end
            if lens.dof_far >= inf then
            this.value = "INF"
            else
            this.value = "   "
            end
    else
    this.value = ""
    end
    end
}

lv.info
{
    name = "Info 2",
    priority = 100,
    value = "",
    update = function(this)
    if keymenu.submenu["Turn On/Off"].value == "On" then
        i = menu.set("Shoot","Advanced Bracket",0)
        i = menu.set("Expo","Auto ETTR",0)
        i = menu.set("Expo","Dual ISO",0)
        i = menu.set("Shoot","Silent Picture",0)
        this.foreground = COLOR.YELLOW
        this.background = COLOR.BLUE
            if play == 0 then
                current_tv = camera.shutter.ms
                this.value = " Off"
            elseif play == 1 then
                this.value = " BE "
                camera.shutter.ms = 1
                i = menu.set("Shoot","Advanced Bracket",0)
            elseif play == 2 then
                this.value = " Off"
                camera.shutter.ms = current_tv
            elseif play == 3 then
                this.value = "ETTR"
                i = menu.set("Expo","Auto ETTR",1)
                i = menu.set("Auto ETTR","Trigger mode",3)
            elseif play == 4 then
                this.value = "Auto"
                i = menu.set("Shoot","Advanced Bracket",1)
            elseif play == 5 then
                this.value = "Dual"
                i = menu.set("Expo","Dual ISO",1)
            elseif play == 6 then
                this.value = "FRSP"
                i = menu.set("Shoot","Silent Picture",1)
            else
                this.value = ""
            end                                   
        end
    end
}

keymenu = menu.new
{
    parent = "Shoot",
    name = "Landscape Helper",
    help = "Toggle through workflow",
    help2 = "Grab exposure or take picture as required",
    submenu =
    {
        {
            name = "Turn On/Off",
            help = "Switches the script on/off",
            help2 = "Provides access to ML functionality",
            choices = {"On","Off"},
        },
        {
            name = "Bracket to bracket overlap",
            help = "Amount to overlap each bracket",
            help2 = "% of FP-2-DoF(far) distance",
            choices = {"20","10", "5"},
            update = function(this)
            factor = tonumber(keymenu.submenu["Bracket to bracket overlap"].value)/100
            end,
        }
    }
}

Sunday, March 6, 2016

EOS-M for the Landscape Photographers

Many are drawn to the EOS-M because of the ML-enhanced videography: I am not one of those.

As a photographer I was attracted to the EOS-M, because I missed ML when I brought my first mirrorless, an A6000, and, after years with ML on my 5D3 and IR-converted 50D, I simply wanted ML on a mirrorless. So last week I grabbed a used EOS-M and M-2-EF adapter on ebay.

The EOS-M, with it’s 18-55mm kit lens is a great package. My first ‘add-on’ was an Neweer grip, which greatly helps with handling the EOS-M.

The real ‘downside’ of the EOS-M, however, is the lack of buttons. Like many photographers, we get used to our buttons and we know their position instinctively. Our workflow is button-base, eg back-button focus and ML-ETTR via the SET button etc.

In addition to lacking the buttons, the EOS-M, because of its touch screen UI, brings in other ‘complication’, eg the touch screen and various ‘missing’ ML features. For example, the ML EOS-M version doesn’t allow one to ETTR from the SET button. Also, you can not have ML ETTR (double half shutter) and ML Advanced bracketing on at the same time, so you are forced to keep going into the ML menu to change ML features: which on the EOS-M can be fiddly.

Because of the above, I have written a Lua ‘helper script’, specifically aimed at the EOS-M landscape photographer, that I hope some EOS-M users may get value out of, and use as a basis for your own ‘personalisation’, eg my ‘ML feature toggler idea’.

The usual caveats apply, eg: it works for me; you use it at you own risk etc etc.

In addition, I have only tested it with all the Lua demo scripts removed, and you are advised to do this. That is, I haven’t tested script-2-script (in)compatibility.

Once you put the script in the ML script folder, the script will start up automatically on camera start up. NOTE: once running you will lose the Main Dial’s top toggle functionality. To get this back to normal, switch off the script under the ML Shoot Menu.

NOTE also that the EOS-M (nothing to do with my script) suffers from a ‘feature’ that means the shutter can fail to work sometimes. If you get this, simply switch the camera off and on quickly.

The script provides two coloured feedback areas that appear in the top ML bar on the right. When you first switch your camera on you will see one of these, a blue rectangle with “off” showing, which tells you the script is running, but that none of the script functionality is in use.

To use the script simply use the Main Dial top-toggle. Each time you toggle the top of the Main Dial the blue rectangle will show you are accessing a different ML extended functionality, eg ML ETTR or ML bracketing. In addition, for my workflow, I have added in a dark-image feature (yes I know I could put my hand in front of the camera).

As soon as you take your first image, the second area of the script feedback comes into being. This is the area that gives you visual info for focus stacking in landscape mode. As with the bracketing and ETTR functionality, make sure you have all the ML settings to you liking, eg I use these setting: all SNR ETTRs setting to zero, DoF diffraction aware on and Advanced bracketing to Auto etc etc (you decide what you want).

As an example workflow, consider a focus (lens must report focus) bracket capture session:

  1. Ensure all ML background settings are correct, eg ETTR, DoF, Bracketing.
  2. Press the Main Dial top toggle until you see “ETTR” in the Blue Box.
  3. Do a double half shutter press to get a starting ETTR exposure and adjust as you see fit, eg using the ML Histo Bar (which I always have in ETTR Hint mode.
  4. Fine compose (and ETTR again if required) and focus on the closest thing that you need for your capture, eg using the EOS-M touch focus functionality.
  5. Toggle through the top of the Main Dial until you see “-BE” (for dark BookEnd) and grab an image.
  6. Toggle to “+BE” to return to the correct exposure and grab your first image. This will show a yellow box to the left of the blue box, telling you that your next image needs to be taken more towards the infinity end.
  7. Focus the lens towards the infinity end until you see either a green or red box. Green means take a picture, red means back off to ‘just’ yellow, ie you may not always get a green. The green ‘tolerance’ can be adjusted in the script’s menu and provides an indication of positive overlap, ie the default is 20%.
  8. Take another image and repeat 7 until you see INF in the left hand box, which means that DoF Far is at infinity, Consider taking an insurance shot beyond this, eg focus at infinity.
  9. Toggle to “-BE” and take another bookend image. You now have a focus bracket set with two dark frames as bookends to help you identify these in post processing.

If you wanted to also take a set of exposure brackets at each focus point, you simple toggle over until you see “Auto” and press the shutter to grab an ML auto bracket set (or a numbered bracket set if you set that option). Note you should consider toggling to the “-BE” to insert a dark frame between the exposure brackets. I also put two dark frames at the beginning and end of a focus/exposure set, to differentiate this complex set in post.

As I say, I wrote this script for my workflow, and the EOS-M ML-enhanced mirrorless camera for landscape photography. The EOS-M, with a few batteries, the lens adapter and a small tripod, represents the lowest weight I can imagine in the field for an ML-enhanced experience.

Finally, here is the script:


--[[    
    Manual Landscape bracketing helper script
    Version 0.1.0 for EOS-M
    Garry George March 2016
    http://photography.grayheron.net/
    Workflow helper script for focus and exposure bracketing for the EOS-M
    Toggle through the workflow using the top of the main dial.
    Yellow means move more towards the infinity end, Red means move more towards macro end,
    Green means at the sweet spot. If Green not seen, move to just being in the Yellow from being in the Red.
--]]
factor = 0.2
b1 = lens.dof_far
fp = lens.focal_distance
c1 = b1 - (b1 - fp*10)*factor
inf = 1000000
started = false
current_tv = 0
play = 0

event.keypress = function(key)
    if keymenu.submenu["Turn On/Off"].value == "Off" then
        started = false
        return true
    elseif key == 12
    then
    play = play + 1
    if play == 5 then play = 0 end
    return false
    elseif key == KEY.FULLSHUTTER
        then
        b1 = lens.dof_far -- in mm
        fp = lens.focal_distance -- in cm
        c1 = b1 - (b1 - fp*10)*factor
        started = true
        return true
    end
end

lv.info
{
    name = "Info 1",
    value = "",
    priority = 100,
    update = function(this)
    this.value = ""
    if keymenu.submenu["Turn On/Off"].value == "On" and started and fp ~= 0
    then
            this.foreground = COLOR.BLACK
            a2 = lens.dof_near
            if a2 > b1 then
            this.background = COLOR.RED
            elseif a2 < c1 then
            this.background = COLOR.YELLOW
            else
            this.background = COLOR.GREEN1
            end
            if lens.dof_far >= inf then
            this.value = "INF"
            else
            this.value = "   "
            end
    else
    this.value = ""
    end
    end
}

lv.info
{
    name = "Info 2",
    priority = 100,
    value = "",
    update = function(this)
    if keymenu.submenu["Turn On/Off"].value == "On" then
            i = menu.set("Shoot","Advanced Bracket",0)
            i = menu.set("Expo","Auto ETTR",0)
            this.foreground = COLOR.YELLOW
            this.background = COLOR.BLUE
            if keymenu.submenu["Turn On/Off"].value == "On" then
                if play == 0 then
                current_tv = camera.shutter.ms
                this.value = " Off"
                elseif play == 1 then
                this.value = "-BE "
                camera.shutter.ms = 1
                i = menu.set("Shoot","Advanced Bracket",0)
                elseif play == 2 then
                this.value = "BE+ "
                camera.shutter.ms = current_tv
                elseif play == 3 then
                this.value = "ETTR"
                i = menu.set("Expo","Auto ETTR",1)
                i = menu.set("Auto ETTR","Trigger mode",3)
                elseif play == 4 then
                this.value = "Auto"
                i = menu.set("Shoot","Advanced Bracket",1)
                else
                this.value = ""
                end                                   
            end
            end
            end
}

keymenu = menu.new
{
    parent = "Shoot",
    name = "Landscape Helper",
    help = "Toggle through workflow using top of main dial",
    help2 = "Grab exposure or take picture as required",
    submenu =
    {
        {
            name = "Turn On/Off",
            help = "Switches the script on/off",
            help2 = "Simply enables additional button functionality",
            choices = {"On","Off"},
        },
        {
            name = "Bracket to bracket overlap",
            help = "Amount to overlap each bracket",
            help2 = "% of FP-2-DoF(far) distance",
            choices = {"20","10", "5"},
            update = function(this)
            factor = tonumber(keymenu.submenu["Bracket to bracket overlap"].value)/100
            end,
        }
    }
}



Wednesday, March 2, 2016

Mini Magic

As readers of my posts know, I tend to lean towards the technical side of photography and am a passionate Magic Lantern user. Having said that, about a year ago I took an excursion into the Sony mirrorless world, with a purchase of the A6000.

Although the A6000 is most probably one of the best APS-C mirrorless systems you can buy, it was, for me, still lacking: as it didn’t have Magic Lantern! Hence, I didn’t have Auto Raw ETTR, Auto bracketing, Dual-ISO ‘bracketing’ and Lua scripting.

So this week I decided on a new tack and I purchased a camera that isn’t made any more, but allows me to run Magic Lantern: namely the Canon EOS-M.



The Digic 5 EOS-M is the original Canon attempt at an APS-C mirorless system and, critically, runs Magic Lantern: whereas the EOS-M3, say, doesn’t.

You can readily pick up second hand EOS-Ms on ebay and thus, after parting with a few pounds, I am now the happy owner of an EOS-M and a second hand Canon EOS-M-EF adapter; so I can use all my Canon lenses, in addition to the EOS-M 18-55 that came with the camera.

Being a camera with a touch screen, it initially feels like a point and shoot camera, and, I have to be honest I miss my 5D3 buttons! Nevertheless, initial testing is very positive. Magic Lantern loaded first time. Auto ETTR etc works and my Landscape Focus Stacking Helper script runs.

I’ll be putting the EOS-M through some more tests over the coming weeks and will report my findings in a future post. However, based on my experiments so far, anyone with a Canon and a love of Magic Lantern, would be well advised to pop over to ebay and buy a Canon EOS-M: before they all go :-)