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

#101
Academic Corner / This may be of interest to some
December 21, 2018, 10:10:42 AM
I'm always looking for ways to get more out of my scripting experiments and came across this, which seems to hint at an alternative exposure bracketing approach.

http://www1.cs.columbia.edu/CAVE/publications/pdfs/Grossberg_CPMCV03.pdf

Any thoughts?

Cheers

Garry
#102
General Help Q&A / Scripts vs Modules
December 02, 2018, 09:25:23 AM
@a1ex

In the past I toyed with the idea of learning C and how to compile ML etc, but with Lua scripting I simply don't see the need.

So, my question is, am I missing anything by restricting my work to Lua?

What would a module, say, of my DoF Bar, give me that a script wouldn't?

Cheers

Garry
#103
General Development / I wonder
November 29, 2018, 10:33:53 AM
I know that some have been playing around with interfacing to ML via external controllers. I myself have played around with this https://www.magiclantern.fm/forum/index.php?topic=23006.msg208852;topicseen#msg208852

I just saw this https://www.elgato.com/en/gaming/stream-deck and I wondered if could act as a programmable interface for ML, eg plug this into your camera, via a USB adapter I'm sure, and have ML sense the stream deck and take appropriate actions.

But then again I guess it's a stupid idea with no technical basis ;-)
#104
Hardware and Accessories / 4k link
November 29, 2018, 09:29:38 AM
I'm not a videographer, but I thought some may be interested in this?

https://www.elgato.com/en/gaming/cam-link-4k
#105
General Help Q&A / Bitbucket
November 29, 2018, 09:14:25 AM
I've noticed the repo hasn't shown for a few days at https://bitbucket.org/hudson/magic-lantern
#106
Scripting Q&A / String functions
November 28, 2018, 11:51:21 PM
@a1ex

I've concluded that not all the string functions are in Lua. Am I right?

The following simply doesn't work

string.format("%.2f", num)
#107
General Development / What more can/should we do with ML?
November 27, 2018, 06:09:37 PM
As a photographer, and not a videographer, I am happy with the state of ML, eg: Dual-ISO; RAW ETTR; Auto Bracketing; and, of course, Lua scripting.
So, I would probably be content if the ML developers, eg @a1ex, said there will 'only' be stability updates on the photography side.

In this post, however, I've asked myself the question: "What other developments could help the photography users?"

I ask this question, as videography appears well supported by developers and users.

So here are three thoughts from me, as a starter for 10:
1. Relocatable Raw (LV) Histogram with increased readability
•   Why? The current histogram can clash with other ML and user generated (Lua) stuff: it can't be controlled in its general position. Also, one sometimes wants to be able to see the details of parts of the exposure data, eg at the highlight end for finer adjustment.
•   Thus I would suggest being able to:
a.   position the RAW histogram 'anywhere' on the screen – ML menu controlled
b.   scale it up (make it larger), eg x2 or x3 – ML menu controlled
c.   zoom into parts of the histogram, ie from X to Y, ie 0 (black) to 255 (or whatever, as white)  – ML menu controlled
•   Plus, Lua connectivity (see below).

2. Raw Histogram access in Lua
•   Why? At the moment Lua scripters, who wish to explore scripts that can potentially change exposure in a more informed way, eg based on the current/last image, can't do this at the moment, as Lua has no access to RAW histogram data.
•   Ideally one would like to access the Raw LV feed, but being able to interrogate the last captured image would be a great start.
•   CHDK offers the function 'get_histo_range <from> <to>'.

3. Lua Sub-image Raw data access
•   Why? Even if 2 above is doable, we would still 'only' have statistics on the entire image. An extension to the above would be to allow the Lua scripter to access the histogram info from a defined area of the last image (or the current LV screen if that was possible), eg  'get_histo_range <from> <to><x><y><w><h><mode>'
•   Mode could allow this function to be coupled to the current ML/Canon spotmeter or not, thus allowing various ways to control the location of the get_histo_range and define what you want  as feedback, eg so you could use this as a variable sized spotmeter, eg return Ev value of that area or % etc. Or mode could return the ETTR exposure of the area selected. All scriptable from within Lua.
•   With this, Lua scripters can start to explore creating exposure helpers, eg based on the first image taken, take 1 or more exposures. In other words a more informed approach to auto bracketing, ie under Lua user control.
•   As an example, differentiate an exposure for the sky, compared to the ground.

Personally, I remain a non C programmer, so will not be taking the above forward in the core C code. I do, however, look forward to being able to access such functionality in Lua in the future ;-)

Bottom line: this is very much my humble thoughts on stimulating a conversation on what else the we could do with ML (photo) functionality. I'm sure others will add to the list. Finally, this not a request; although, as a minimum, I hope it stimulates some discussion that doesn't get too personal ;-)
#108
The current depth of field (DoF) calculations in ML do a reasonable job of estimating the near and far DoFs, with or without diffraction.

However, some of you may have noted a strange result if you focus at infinity: have a look in the Focus menu in LV and you will see that the near DoF is different to the hyperfocal distance.

As you know, if you focus at the hyperfocal (H), the near DoF will be H/2 and the far DoF will be inifinity.

If you focus between H and short of infinity, the far DoF will, of course, remain at infinity, and the near DoF will move further away from H/2, until, at infinity it will be H.

The current ML C code estimates the near DoF as follows:

    lens_info.dof_near = fl + (fd*H-fl2)/(H+fd-2*fl); // in mm relative to the sensor plane

But, because we are using approximations and infinity is not infinity in ML, it's just a large number, you end up with the 'infinity anomaly' for the near DoF.

The ML code in focus.c should read:

if (fd>=655000)
   { lens_info.dof_near = H/2; // in mm relative to the sensor plane }
else
   { lens_info.dof_near = fl + (fdH-fl2)/(H+fd-2fl); // in


Using the fact that ML reports infinity as the distance 655350mm.

BTW my latest DoF Bar correctly reports things, so, at ML-reported infinity, DoF Bar and ML will report different near DoFs. DoF Bar can be downloaded from: https://gist.github.com/pigeonhill/fdbc6e2fbeed1206afcc47d69cee9591/revisions

The ML anomaly will not ruin anyone's day: I'm flagging this up for the perfectionists out there ;-)

I have flagged this in a bug report: https://bitbucket.org/hudson/magic-lantern/issues/2912/focusc-needs-updating-with-one-line-of which I hope will result in it being 'fixed' the next time @a1ex has a chance to refresh the core code.

#109
Scripting Corner / Depth of Field Bar
November 16, 2018, 02:22:57 PM
This thread is superseded by https://www.magiclantern.fm/forum/index.php?topic=25286.msg230159#msg230159

Back in May 2017 I introduced the idea of a focus bar for ML (https://www.magiclantern.fm/forum/index.php?topic=19505.0)

This first attempt was, in retrospect, too ambitious; as I attempted to cover everything to do with focusing. In other words in became too complicated and complex.

In this post I'm releasing a new 'focus bar' that is aimed at one thing, and, I believe, does this well. That is providing the 'best' focus info to inform our photography. The script is called DoF Bar and only runs in LV.

Here is a screen shot of the DoF Bar running on my 5D3.





The script's menu just has two sub-menus. The first simply toggles the DoF Bar on and off. The second allows the user to tell the script what he/she wishes the minimum focus to be shown as: note this doesn't need to correlate to the actual lens focus minimum. By default the minimum focus is 50cm.

The DoF Bar has three zones.

* Zone 1 (white) is from 0 to the minimum focus
* Zone 2 (green) is from the minimum focus to the hyperfocal point.
* Zone 3 (white/black/white) is from the hyperfocal point to 4x the hyperfocal distance.

Note that the black and white bars provide the following info: the green-back transition is at the hyperfocal; the black-white transition is at twice the hyperfocal; the white-black transition is at three times the hyperfocal; the end of the bar is at four times the hyperfocal. In blurs, assuming that an ML blur criterion of 30 has been set and (sic), for simplicity, that diffraction aware is off, these transitions occur at 30, 15, 10 and 7.5 microns.

The total required blur, ie ML set circle of confusion (CoC), is set in the normal ML menu. The user can have diffraction aware on or off.





For a full frame EOS, I suggest you set the ML blur (CoC) to 30, and for a crop EOS at 20; as, using the DOF Bar, you can achieve whatever infinity blur you need; but note that, because of the granularity of the Canon lens control, as you approach infinity the focus steps, and hence distance feedback, become rather coarse. Note that if diffraction aware is on, the defocus blur at the hyperfocal will, obviously, be less than the ML set CoC.

As the DoF Bar shows DoF info, you should switch off the ML DoF info display.

The left hand text, above the bar, shows the near depth of field distance.

The right hand text, above the bar, shows one of two pieces of information.

If the focus point is less than the hyperfocal, this box shows the far depth of field distance.

If the focus point is greater than zero, this box shows the infinity blur in microns. Obviously, when the focus is at infinity this will be zero; and when the focus is at the hyperfocal, this will be the defocus (sic) blur or CoC.

Note that infinity blurs less than, say, twice the size of a sensor pixel are rather wasted. So infinity blurs (FF) between 30 (ok quality) and, say, 10 (high quality) are where you should be aiming for; according to you image presentation needs, ie screen or a print being reviews by a judge in a competition.

Finally, below the bar, we see three hemispheres (dots). These dots correspond the current near depth of field, the focus distance and the far depth of field.
Thus in the example above we see the following: the near DoF is at 54cm; the far DoF at 1.4; the focus is at 71cm (from the lower ML menu); and the dots visually show this relative to the minimum focus, ie the white-green bar transition and the hyperfocal, ie the green-black bar transition.

But the DoF Bar has final feature that is the 'killer feature'. Namely, if you take an image, dots above the bar record the near DoF, the focus point and the far DoF of that captured image.

Thus the screen would look like this for our example above:





As we have not yet refocused, the upper and lower dots coincide. So let's now refocus to, say, 1.51m (as shown in the ML menu):





Here we see our new DoF info relative to the previous image and we see we have correctly focus bracketed, as the current near DoF is less than the last image's far DoF.

So let's take a second image here. The DoF bar now looks like this, with the upper dots having been reset to the latest captured image.





Finally, we keep refocusing and finally arrive at the position where we have a far DoF, infinity blur of 11 microns, ie a very high quality: as seen here.





Thus, in three images, we have focus bracketed from 54cm to infinity, and achieved an infinity blur of 11 microns.

I hope some find my latest script of value. I'm releasing it the script at the beta level, as I hope I may get some feedback to help refine it before I release it at version 1. The script may be downloaded here: https://gist.github.com/pigeonhill/fdbc6e2fbeed1206afcc47d69cee9591
#110
Tutorials and Creative Uses / Infinity Focusing
November 10, 2018, 12:03:36 PM
Unusually for me, I'm posting with no link to ML or Lua!

For the landscape photographers in the ML community, I thought you may be interested in my latest blog article: http://photography.grayheron.net/2018/11/infinity-focusing-in-your-head-rule-of.html

This introduces the Rule of 10 for landscape focusing.
#111
I thought I would share an experiment I've just successfully completed, whereby I can now wirelessly control ML states, for example image capture, Dual ISO, Advanced Bracketing and Auto ETTR, ie without touching the camera.

To achieve this I'm making use of the Foolography Unleashed dongle for my 5D3: https://www.foolography.com/products/unleashed/

The dongle is permanently plugged into my 5D3 and requires no batteries. The dongle's functionality allows it to control various, but not exhaustive, camera functions, via an app (I have mine running on my iPhone, iPad or  iPod).

The App's screen looks like this:





As a proof of principle, I decided to make use of the metering mode and the white balance. The WB has 9 different settings, so in theory I could set 9 different ML states. For now I've coded four, namely:
  State 1 (WB AWB): Dual ISO OFF, Auto ETTR OFF, (Auto) Advanced Bracketing OFF
  State 2 (WB Sunshine): Dual ISO ON
  State 3 (WB Shady): Get/set ETTR exposure
  State 4 (WB cloudy): Take an (auto) Advanced Bracket set

Once you have selected a state, by choosing the WB value that corresponds to that state, you then use the app to simply toggle, using the metering mode app button, between the two metering option extremes, top to bottom. The Lua script then does the rest.

For now I simply switch between the various states to achieve what I want. For instance, I might use the app like this:
  1.   Set state 1 to ensure everything off
  2.   Go to Sunshine WB and set my Dual ISO (100/800)
  3.   Go to Shady WB and set my exposure via ETTR
  4.   Press the shutter, via the app, and review the (low quality) image in the app

Alternatively, I could:
  1.   Set state 1 to ensure everything off
  2.   Go to Shady WB and set my base exposure via ETTR
  3.   Go to Cloudy WB and set Advanced Bracketing
  4.   Press the shutter, via the app, and let ML take the brackets, and review the (low quality) image in the app

Obviously, this is a simply demo or proof of principle of how to interact with ML without touching the camera. If I progress the idea I will tidy things up.

Also, there are limitations: the biggest being you need a look up table (or remember) to convert WBs into ML states.

For those interested, here is the (crude) script.


wb_value = -1
change = false
previous_meter_value = 0

function property.WB_MODE_LV:handler(value)
     wb_value = value
end

function property.METERING_MODE:handler(value)
     if (previous_meter_value == 3 and value == 5) then -- if previous metering value was 3 and the current one is 5
        change = true
        previous_meter_value = 0 -- clear variable
    else
        change = false
        previous_meter_value = value -- remember current metering value
    end
end

function watch(arg)
    if change == true then
        change = false
        if wb_value == 0 then -- set all states to off
            menu.set("Expo","Dual ISO",0)
            menu.set("Expo","Auto ETTR",0)
            menu.set("Shoot","Advanced Bracket",0)
        elseif wb_value == 1 then -- switch Dual ISO on
            menu.set("Expo","Dual ISO",1)
        elseif wb_value == 8 then -- set ETTR exposure (make sure you set ETTR for your needs)
            menu.set("Expo","Dual ISO",0)
            menu.set("Expo","Auto ETTR",1)
            menu.set("Shoot","Advanced Bracket",0)
            key.press(KEY.SET) -- ETTR must be configured for SET trigger
        elseif wb_value == 2 then -- Do Auto bracketing
            menu.set("Expo","Dual ISO",0)
            menu.set("Expo","Auto ETTR",0)
            menu.set("Shoot","Advanced Bracket",1)
        end
        wb_value = -1 -- clear variable
    end
    return true
end

event.shoot_task = watch



Bottom line: a bit of fun for me, but an insight into using ML, especially for those use cases where you don't wish to touch the camera and/or can't touch it.
#112
I've got a new project going that will, hopefully, allow me to wireless control ML states via a Lua script.

I have a means of talking to my 5D3 and changing some settings, eg WB and metering mode, which I'm using to 'do other things'.

The sample script below simply allows me to wirelessly trigger ETTR, as I've set ETTR to SET.

I'm not in LV mode as my wireless device needs to not (sic) be in LV mode.

If I press SET from the camera SET button, all is well, ie the ETTR comes on, does its stuff and LV switches off.

If I use the script (this is a proof of principle, thus lean) I keep getting the same behaviour.

The script looks out for the state change I'm after via the WB value (here just one is used to demo things).

The user then triggers that state change or function via the metering_mode being switch between two state.

Things work up to a point.

The ETTR gets triggered OK but then does a second ETTR and remain LV mode.

I've tried review on and off, and the get the same result.

Can anyone suggest the error of my ways?

Cheers

Garry


wb_value = -1
change = false
previous_meter_value = 0

function property.WB_MODE_LV:handler(value)
     wb_value = value
end

function property.METERING_MODE:handler(value)
     if (previous_meter_value == 3 and value == 5) then -- if previous metering value was 3 and the current one is 5
        change = true
        previous_meter_value = 0 -- clear variable
    else
        change = false
        previous_meter_value = value -- remember current metering value
    end
end

function watch(arg)
    if change == true then
        change = false -- in other words
        if wb_value == 1 then
            key.press(KEY.SET) -- ETTR configured for SET trigger
        end
    end
    return true
end

event.shoot_task = watch
#113
This post covers the two previous post I have written on using an ML-enhanced EOSM to 'simulate' a medium format camera.

For those of us that use Tilt & Shift lenses, I have the 24mm TSE Mk II, we are lucky enough to be able to do, what I call 'sensor bracketing': that is keeping the lens stationary and shifting the (camera) sensor by, say, +/- 12mm. Thus, say, allowing a pano to be created with (36+12+12 = 50mm) x 24mm (sensor) aspect ratio. Or a (24+12+12) x 36 ratio: as well as a few more complicated arrangements.

However, the Canon TSE 24mm is some $2000, although there are cheaper tilt/shift options as well, eg the Rokinon equivalent is 'only' about $750. As well as other shift-only adapters.

But what if you wanted to shift even more, say emulating a 645 Medium Format sensor through shifting, or as I call it 'sensor bracketing'?

This is where the Fotodiox RhinoCam 645 Adapter family comes in. There are two Canon versions. One allows you to use any EOS camera (at about $300) and the other allows you to use the EOSM (at about $200). As for lenses, you can use either Hasselblad H, Mamiya 645 and Pentax 645 Lenses.

As I have EOSMs operating in both the visible and IR bands, I decided to go the cheaper route and purchased the EOSM version for a Mamiya.




To be clear, this is not a technical camera, with front and rear standards, (but I hope to use ML doing this in time), but I am using a Mamiya 645 lens (I have a 45mm FL F/2.8 at the moment) and couple this to the Fotodiox RhinoCam adapter (https://fotodioxpro.com/collections/lens-mount-adapters/products/rhinocam-eosm), to create a 'virtual' medium format sensor back (my EOSM) through, as I say, what I call, 'sensor bracketing'.

The limitation of the approach is you require time to capture the medium format data, thus the technique is best suited for images where objects are not moving (by much) and/or you can tolerate movement, eg LE work.

I already had a 645 45mm lens, which I use with my Fotodiox (variable) ND Throttle on my 5D3 (or EOSM via an adapter). BTW the Throttle allows one to have the benefits of the variable ND, without the X effect you sometimes see with using a WA lens and a variable ND on the front of the lens.

But why bother with the RhinoCam?

The answer, of course, is easy: why not, it looks like fun and I can use ML to enhance the base technology :-)

On a more serious note this approach allows one to capture images for large prints, either 'full' 645 format (8 EOSM captures) or high resolution panos (6 EOSM captures), for high quality and/or large printing, ie competitions/exhibits etc. Unlike other approaches, eg pano heads etc, there is no distortion with this approach, as the lens remains fixed.

If printing at 300 dpi quality, using the native 3:2 ratio EOSM equates to a print that would be about 17.6x11. inch print.

If we now use the EOSM-645 Adapter in full 645 mode, ie 8 images, taken in two rows, with the EOSM in portrait mode we end up with essentially a 4:3 aspect ratio and with an image with a 120+ Mpix image, ie 12400 x 9820 pixels, or some 41x32 inches at 300 dpi

As for setting up the shot, an acceptable 645 hyperfocal distance (for now ignoring diffraction and using George Douvos's excellent TrueDoF-Pro App with diffraction on) is to use a (defocus) Circle of Confusion of 47 microns at F/20, is about 3.3m. Note we can use such small apertures as we are shooting medium format, albeit via 'sensor bracketing'.

However, we wish to do better than an infinity defocus blur of 47 microns, so we will half that to, say, 23 microns, giving a focus point at about 4-5m.

So let's cut to the chase. How does one use a 645 adapter? Plus, how does one post process the captured (sensor) bracket set?

First it is worth noting that the latest Lightroom and Photoshop CC can automatically stitch an exposure bracketed, pano set. Thus, in addition to the sensor brackets, one can factor in exposure brackets at each sensor bracket point, and, in post, push one button to process the bracket set. But be warned you need a computer that can take large images (speed and RAM).

Plus, to really give you a headache, you could also focus bracket as well! Thus one, full, 645 image, using the EOSM Fotodiox set up and, say, three exposure brackets, and two focus points, one final image would be composed of 8 (for the sensor bracketing) x 3 (for the exposure bracketing) x 2 (say, for two focus bracketing sets) images: that is 48 images! As I say, fun stuff.

But let's keep things simple for now and 'just' take a full 645 image using the Fotodiox adapter, ie 8 Dual-ISO sensor brackets.

I had to compose the image, upside down, so this really feels like 'old photography' [:-)], using the adapter's viewing 'screen'. I manually set focus on the lens (having first calibrated it at the required distance); having set the aperture on the lens to F/22. I then moved the camera to ETTR the brightest part of the image, using Magic Lantern.

BTW according to the needs of the scene, eg by reviewing the test image, I would now take additional exposures at: a fixed setting; set Dual-ISO; or use the ML bracketing, ie set to +, ++, +++ mode from the ETTR base.

I then took the required 'sensor brackets' at the 8 indicated positions on the Rhiocam.

Here is a (scaled down) version of the resultant test image.




Bottom line: once again ML helps us push our cameras to ever greater heights. For example, using a (cheap these days) EOSM, coupled to a (relatively cheap) 645 second hand lens and the (cheapish) RhinoCam adapter: we can take high dynamic range medium format images, allowing us to create huge prints!

http://photography.grayheron.net/2018/10/taking-eosm-to-new-heights.html
#114
Share Your Photos / Medium Format EOSM Example
October 20, 2018, 07:32:14 PM
This post may be of interest to the EOSM still photographers...although I sense we may be in the minority compared to the videographers  ;)

http://photography.grayheron.net/2018/10/eosm-medium-format-photography.html



#115
Duplicate Questions / Medium Format EOSM!
October 18, 2018, 10:14:17 PM
I thought some may be interested in my latest experiments, using ML of course: realizing a medium format EOSM.

http://photography.grayheron.net/2018/10/taking-eosm-to-new-heights.html
#116
General Help Q&A / EOSM: ETTR strangeness
October 18, 2018, 06:41:32 PM
Hopefully it is me being stupid...again!

Just upgraded to the latest Lua Fix Experimental build on my EOSM.

Have Dual, ETTR and Silent modules switched on.

SET triggering of ETTR doesn't work: double half shutter press does.

When attempting to use SET to trigger ETTR I see the animation circle attempting to run and if I let it run it triggers a Canon screen.

I've never had an issue with SET triggered ETTR before.

Is it me?
#117
General Help Q&A / ETTR, BULB mode and LE
October 08, 2018, 07:10:50 PM
@a1ex

I've been experimenting with my EOSM workflow for LE photography.

I have ETTR enabled and Expo Override on and Expo Sim on.

I have ETTR time set to way beyond what I'm shooting at, and all other ETTR attributes set to off or zero. ML bulb is on.

What I find is that sometimes (sic) the screen flashes, about a second, between different exposures, ie light and dark, and I hear a tick, as if the aperture is changing.

The biggest thing I see is that the ETTR warning says exposure limit reached, but when I look in the ML bulb setting the bulb is 'right'.

So my question is, can the ML ETTR be made slightly more intelligent and give a warning when the bulb is set to x seconds, rather than the exposure limit reached.

Cheers

Garry

#118
Scripting API suggestions / Notify Box position
September 02, 2018, 02:32:31 PM
@a1ex

I appreciate this is not a priority matter, however, the next time you update Lua, could you consider adding a position feature to the notify box.

The reason being that the fixed position often clashes with other ML info and having a single fixed position means you can't do two lines.

I was thinking something like this:

Quotenotify_box(text[, timeout=1000,[xpos,[ypos]]])
#119
Scripting Q&A / Help: It's Lua or my stupidity
August 28, 2018, 11:47:42 PM
@a1ex or someone

Hope you can put me out of my misery.

I simply can't work out what is going on here:

                dual_on = false
                if menu.get("Expo","Dual ISO") == "OFF" then
                    -- do nothing
                else
                    dual_on = true
                    dual_menu = menu.get("Expo","Dual ISO")
                    menu.set("Expo","Dual ISO","OFF")
                end


All I'm trying to do is detect if Dual ISO is on and switch it off until my code has run.

But the above does nothing.

I then switch Dual back on with:

if dual_on then
                    dual_on = false
                    menu.set("Expo","Dual ISO",dual_menu)
                end


Where am I going wrong?[/s]

SOLVED = my stupidity  ;)
#120
Share Your Photos / Hand Held Bracketing example
August 26, 2018, 09:12:32 PM
Just returned from a week on the Upper Loire and ended up in Montargis, where we visited the Sainte-Madelaine church.

This was an ideal opportunity to use my Hand Held Bracketing script with my EOSM.

The following image is an 18 image exposure-bracketed pano (3x6): as I say all hand held.

The processing was limited to Lightroom, but I did use PTLens in LR, to straighten out the columns.



#121
As ML shooters know, you really need to see the LCD to maximise the ML experience.

Over the time I've used ML I've tried various gadgets to help me with reading the LCD screen in bright sunlight.

Rather than make this post long, the still photographers amongst you may get something out of the latest post on my blog: http://photography.grayheron.net/2018/08/first-cut-from-ireland.html
#122
General Help Q&A / EOSM Auto Bracketing ‘light’
June 10, 2018, 02:20:53 PM
When use auto bracketing the self timer lamp on the front and the power lamp on the back of the camera light up and stay on when taking images.

Is there a way, through ML, to switch these two lights off?

The problem is, when shooting through glass, you risk getting the front lamp as a reflection. Also if taking single images the power light stays on and I am seeing a 'colour cast' in my IR converted camera and am hypothesising the power lamp might be the cause, ie internal reflections.

#123
Share Your Photos / IR post processing in LR
May 27, 2018, 05:43:18 PM
For those that like 'playing around' in the IR bands: I've just posted about ML-enhanced IR photography at: http://photography.grayheron.net/2018/05/infrared-post-processing-in-lightroom.html

As a flavour: here is one of the handheld images I took today with my trusty IR-converted EOSM:



#124
Scripting Q&A / EOSM RIGHT/LEFT Keys
May 23, 2018, 11:59:39 PM
Have just noticed a strangeness on my EOSMs.

I've been looking at keys, ie the number returned.

UP, DOWN and LEFT return the expected number.

RIGHT does not return a key value to Lua.

On the EOSM the right key is used to toggle between exposure and aperture. I wonder if this Canon 'control' overrides the Lua side and thus the right key is not accessible in Lua?

Can anyone, eg @a1ex, throw some light on this strangeness?
#125
General Help Q&A / ETTR and Auto Bracketing
May 23, 2018, 08:38:37 PM
@a1ex

I wonder if it would be possible for you to make ETTR and Auto Bracketing work together a little better.

My use case is simple. I always have ETTR on via half double press. But if Auto Bracketing is on I can't access ETTR.

What I ideally would like is to have both ETTR and AB active, with ETTR active from the half double press and AB being triggered via, say, a full press.

What do you think?

Cheers

Garry
#126
If you have an EOSM you may be interested in my latest blog at http://photography.grayheron.net/2018/05/eosm-script-set.html

These four scripts have been tuned for the EOSM, ie with its limited buttons but an active screen.

The scripts are:
- 1m is a Toggler, that allows you to control access to the other scripts and core ML functions such as ETTR, Dual-ISO and Auto-Bracketing;
- 2m is the Focus Bar;
- 3m is a Hand Held Helper script;
- 4m is a ND Helper script.

As I have written about these on past posts, I won't regurgitate how to use them here.
#127
Share Your Photos / Infra Red photography
May 07, 2018, 10:55:41 PM
In case there are any ML based IR photographers out there, I thought you might like a read of the last two posts on my blog: here is the second one http://photography.grayheron.net/2018/05/tent-rocks-in-infrared.html

First, ML is a great aid in IR photography, eg ETTR and my IR sensitive Focus Bar script; and second the latest release of LR allows you to carry out channel swapping via a LUT based profile, without having to go to Photoshop.

Cheers

Garry
#128
Scripting Q&A / Semaphore message
April 25, 2018, 06:52:57 PM
I hope someone can point me in the right direction, as I can't work out why I'm getting these messages; as they don't appear to stop my script running.

I'm running the latest Lua experimental version on my EOS(M).

Cheers

Garry



#129
Scripting Corner / ND Simulation Helper Script
April 17, 2018, 10:44:54 PM
This thread is superseded by https://www.magiclantern.fm/forum/index.php?topic=25731.0

Whenever we wish to take a Long Exposure (LE) image, we would ideally fit an ND filter that allowed us to capture the best image, eg continuing to control DoF, ie with aperture, and select the time required, ie for the effect we were looking to create.

I wrote this script for those occasions where you don't have the 'right' ND filter.

This version of the script was explicitly written for my 5D3, ie button locations and availability: but any competent Lua scripter will be able to recode to suit their needs. Also I have annotated the script with comments and highlighted hooks, eg where you can insert your own controls, eg to switch off one of your scripts that might conflict with the ND script.

I personally use the script with my Focus Bar script, and have 'deconflicted' the two, ie if the ND script is running, it will switch off the FB script. I also have allocated the script to my C3 custom mode.

With the script off, my screen looks like this:





Here we see the FB script running, with ML telling me (bottom left) I'm running in C3 config mode.

To switch the ND script on simply press RATE (which is 100% hijacked by the script, but personally I never use the RATE key). The screen will now switch to look something like this:





Here we see the script is showing that we are requesting 10 images and, of course, at a shutter of 1/4s this equates to 2.5s. The green text tells you that if you use the MENU and INFO keys you will be adjusting, down and up, the number of brackets (images) to take.

Normal access to the MENU and INFO keys is achieved by switching off the ND script, ie pressing RATE.

If you press the ZOOM key when the script is running, the screen looks like this:





This shows that, in addition to the 10 images, I am now requesting a 5s delay between images. This delay allows you to carry out 'people removal' bracketing, ie through post processing using Photoshop statistics. Once again you can use MENU and INFO to adjust the time delay.

The scripts main menu looks like this:





The ND only option shown means that only the requested images will be taken. The other option is ND+. In this case the script will take an ML advanced bracket sequence after the other images have been captured. Thus in post you will have a near perfect bracket set: the ND brackets that will be combined using the smart object stack mode technique and the exposure set, that you can blend in.

The first image delay is either 0, 2 or 5s. So switch of Canon delays.

The User feedback is off, audio, led or both. This is useful to help in tracking the script's start, which is achieved via a long (5s+) press of the SET button.

The Additional menu looks like this:





The bookmark is either NO or YES. YES will place a dark frame at the start and end of the capture sequence: to help differentiate a sequence in post.

Shadow SNR is a control variable that is between 0, 2, 4 or 6Ev and controls the ETTR shadow end. Use this to ensure the advanced bracketing starts at a shadow exposure that is 'brighter' than if the value was 0. The ETTL Set Time is there to help ensure the ETTR finds a solution.

The script will remember the top menu's state, but not the additional menu.

I'll be releasing the script on my blog at photography.grayheron.net and will write about post processing. But for now I'm giving ML friends early access to the script at: https://gist.github.com/pigeonhill/17b0101b99af0ad99b1032486a340f87

As usual I welcome all feedback.
#130
Scripting Q&A / Tracking camera state
April 15, 2018, 10:42:42 AM
@a1ex

I've played around with lots of ideas on the above, and I have been successful in some areas, eg

repeat -- hang around until ETTL value has stabilised
check_tv = camera.shutter.apex
msleep (scriptmenu.submenu["Settings"].submenu["ETTR Set Time?"].value*1000)  -- adjust this for your camera. The time delay allows the ML ETTR process to settle down
until check_tv == camera.shutter.apex


But I can't get the above approach to work when I'm wanting to pause the script until the camera has stopped taking images, especially when I don't know how many images it is going to take, eg when advanced bracketing.

Generically I was looking to use the above this way:

repeat -- hang around until something has happened that you are tracking
-- put stuff here that you want to do or do nothing
        sleep(1)
until {thing you are watching} == {true state}


The problem I have is, I cant't find a 'thing to watch' to detect the end of advanced bracketing, and I don't want my pause to negatively interact with advanced bracketing.

Do you have any ideas how I might approach this scripting challenge, ie pause a script (allowing other tasks (Canon and ML) to compete) and detect the restart condition, eg image taking using advanced bracketing has stopped.

Cheers

Garry
#131
@a1ex

We have discussed Advanced Bracketing before.

For me, as a Lua coder, it is a very powerful tool, however, it lacks finesse, as I have no control over it.

My latest scripting project is making use of the Auto Advanced Bracketing, but it is not fully meeting my needs.

As an example, if I start auto bracketing at a very fast shutter, eg 1/2000, the bracketing will stop when the shadow end is still very underexposed. I would say 2 stops at least underexposed.

Can I convince you to give the Lua coder (sic) a way to 'adjust' the auto bracketing, at least for the shadows?

Cheers

Garry

One thought is to
#132
Scripting Q&A / Understanding camera.wait
April 08, 2018, 11:27:27 AM
@a1ex

Now you have added in the camera.wait, can you give a little more info regarding its value.

I see you say that camera.shoot also waits until you can take an image, so where would you inject camera.wait.

Is there a situation that you are aware of that requires (sic) camera.wait?

Cheers

Gsrry
#133
Scripting API suggestions / Exploiting the Mode Dial
April 07, 2018, 08:21:54 AM
@a1ex

A thought.

Would it be possible to make use of the mode dial so that one could 'allocate' scripts to, say, C1 etc.

This way we could have scripts loaded that only get used if the mode dial is on C1 or C2, say.

Obviously the mode dials, I assume will be set the same, eg manual etc, as all we are doing is detecting in Lua, say via a property, the mode dial state, and acting on this.

As I say, just a thought.

Cheers

Garry
#134
Scripting API suggestions / Exposure feedback
March 30, 2018, 12:52:24 PM
@a1ex

As we know, when advanced auto bracketing is operating we are provided LV feedback on the last image, ie % over and under.

My suggestion is that Lua provide a similar feedback, ie on the exposure statistics of the last image.

Thus we would have the following fields that get info

Camera.exposure.over
Camera.exposure.under

A null return would indicate no last image to gather statistics on, yet.

The above functionality would allow us to be more inventive with our bracketing strategies.

I could even imagine, in time, additional functionality that allowed the user to specify an area on the image to gather the statistics in, eg relative to LV x y values.

Cheers

Garry

#135
Scripting API suggestions / AF control
March 24, 2018, 09:59:54 AM
Hope someone can help. Using Lua, is it possible to control, ie switch on and off, AF?
#136
Scripting Corner / Hand Held Helper Script
March 13, 2018, 06:28:13 PM
In case anyone is interested, here is my combined hand held helper script: a combination of two of my previous standalone scripts that did exposure and focus bracketing.

This script is ideally sorted for hand held wide angle situations, with minimal image to image movement.

You can choose to exposure bracket or focus bracket.

In exposure bracketing mode the script will maximise both time and ISO bracketing to cover the range, ie slowest shutter to highest ISO.

In focus bracketing mode the script will use aperture bracketing (at max closed down aperture); thus the script will work with non AF lenses, as long as aperture can be controlled.

The script can be downloaded from here: https://gist.github.com/pigeonhill/3c351242740c84f0581fa57ac27e0656
#137
Scripting Corner / Auto Hand Held Focus Stacking
March 05, 2018, 11:16:40 PM
If you have read my post you know I like exploring how to get more out of my Canon EOS through Lua scripting in Magic Lantern.

In a recent post I introduced a hand held exposure bracketing script, which is especially suited to wide angle (hand held) photography.

In this post I'm introducing a simple auto hand held focus bracketing script, once again, especially suited for wide angle photography where you need a 'little help' in the foreground.

The script can be downloaded from here: https://gist.github.com/pigeonhill/185a1b72e5a909d767f0ce9bdfb259e4

Surely I hear you say, why bother; as with a wide angle lens one can get a very large depth of field, from near to infinity. But sometimes you just need that additional foot of so in the near field.

The use case is where you are hand holding and have set your focus for the far field, say at 2-3 x the hyperfocal, to ensure a low infinity blur (see my blog at http://photography.grayheron.net/ for an explanation why you should not focus at the hyperfocal distance), but your near field just doesn't cover your needs.

Yes you could keep reducing the aperture, but, as we know, this brings in two negatives. First, diffraction blur increases and second dust jumps out of your images, especially in the sky.

Of course, if you were on a tripod, landscape focus bracketing would be easy through the use of my Focus Bar script. But what if you are hand holding and/or using a lens that doesn't report focus distance.

My Auto Hand Held Focus Stacking script might be worth trying out.

Once you have set up the menus for your needs, eg max ISO, min hand holding shutter and smallest aperture etc, all you need to do is set the base (open aperture) exposure and the script will attempt to take a second image at the smallest aperture. This is accomplished through shifting the shutter speed and ISO, ie to keep the 'same' exposure between the images.

Rather than explain things further, let's look at a test shot. The base (24mm) exposure was at F/3.5, 1/40s at ISO100. The focus was set past the hyperfocal distance to produce a sharp far field image:



But as we can see, the near field is rather out of focus.

The script decided in this case, because I set the smallest aperture at F/16, to take the second image at 1/40s (because this was close to my hand holding limit, no shutter advantage was possible with this image) and at an ISO of 2000:



Because we are at ISO 2000 the entire image exhibits poor SNR compared to the F/3.5 image; but the near field is now acceptably 'in focus'.

Once ingested into Lightroom it was a simple matter to use 'Match Total Exposure', if required, and do a round trip to Photoshop. Once the two images are stacked in Photoshop, they can be auto aligned and then it is a simple matter to mask in the near field detail that you need. Using this approach allows me to 'protect' such things as skies from small aperture effects (although, of course, there is no sky in this image). Here is the resultant blend:



Bottom line: Although I wrote the script as a 'bit of fun', I think it could be of value in some situations; where you need a little focus help in the near field. As usual I welcome feedback on this post.
#138
Hardware and Accessories / New Canon flash
February 28, 2018, 02:35:38 PM
Ok here it is if you haven't seen it https://youtu.be/eByS5e4oal4

But uses half double press.

Potential ML conflict. Or not?
#139
Scripting API suggestions / Version number
February 21, 2018, 06:39:46 AM
As the Lua environment and the API evolves, one 'problem' for scripters like me is to ensure a script is fit to run.

I was wondering if there was a way to keep track of the Lua module's version?

For instance a simple progression number, eg x, x+1 etc

This way a script can check this version number and take appropriate action, eg not run and/or provide user feedback.
#140
Share Your Photos / Another Hand Held Bracketing example
February 20, 2018, 11:04:52 PM
An example of another image from my Winchester Cathedral trip last weekend. Once again showing the power of my new (auto) Hand Held Bracketing script.

In this capture the script decided to take the following bracket set with the Irix 11mm lens set at F/5.6:

    ISO 100 @ 1/250s
    ISO 800 @ 1/250s
    ISO 6400 @ 1/250s
    ISO 6400 @ 1/30s
    ISO 6400 @ 1/125s

After ingesting into Lightroom, doing a lens correction on each image, followed by an HDR Merge, I used Auto Tone in the Basic Panel to establish a starting point for a few more tweaks.

I then did a round trip to Photoshop, where I used one of my favorite filters to bring out some local contrast detail, namely NEXT from www.knowhowtransfer.com

I must say, as I was hand holding, I'm personally pleased with the image. What do you think for a hand held capture?



#141
Share Your Photos / Hand Held Vertirama
February 18, 2018, 10:46:16 PM
I thought some may be intrigued by what you can do hand holding a camera with Magic Lantern.

This is a 15 image vertirama, made up of three sets of 5 brackets captured with my hand holding bracketing script.

The image was totally processed in Lightroom.



#142
Scripting Q&A / Units
February 12, 2018, 06:42:41 PM
I hope some kind soul can educate me.

I looking at menu set/get and trying to work out the units in and out.

For example, in ETTR min shutter the min is 16 and the max is 152.

160 equates to 1/8000.

But what's the conversion, ie these aren't APEX units.

Other menus seem to use 1/8 APEX units.

I'm a bit lost as I wish to set things myself, ie from a script, so I need to understand the units.
#143
Scripting Corner / Auto Hand Held Bracketing Script
February 11, 2018, 05:53:21 PM
This thread is superseded by https://www.magiclantern.fm/forum/index.php?topic=25731.0

This script attempts to create an 'optimized' set of brackets when hand holding.

The script may be downloaded from here: https://gist.github.com/pigeonhill/7efb6b13e34e366d2651ba574125a5fa

The script uses a two pass bracketing scheme and the idea for the script was triggered by reading https://people.csail.mit.edu/hasinoff/pubs/hasinoff-hdrnoise-2010.pdf

The script assumes you have set exposure to capture the highlights, eg using ETTR. You should have advanced bracketing off, so you can use ETTR as part of your capture workflow. The script will switch advanced bracketing on and off.

The first pass takes three brackets using ISO shifting up to the maximum ISO, which is sensibly assumed to be 6400 in the script.

The script will then see if a second pass can be accomplished, ie if the base shutter was above the minimum shutter. If a second pass can be taken the script will take two additional brackets from the minimum shutter speed and the maximum ISO, ie doing time bracketing at a fixed, max ISO.

Thus you will always get either 3 or 5 brackets, straddling 1/30s (or your minimum shutter) to the fastest shutter needed for the highlights, and from the lowest ISO you can use for the base highlight to ISO 6400.

As I explore the HHB script I will write about it on my blog at www.photography.grayheron.net.

As usual I welcome testers and feedback.
#144
Scripting Q&A / Shutter property question
February 11, 2018, 03:08:43 PM
@a1ex

Hope you can throw some light on this need.

I wish to track the number of images taken and use this to deconflict conflicts in a Lua script.

I tried using the property handler, but get strange results. Here is the test code:


count = 0

function property.SHUTTER:handler(value)
count = count + 1
end

function dis(arg)
display.print(tostring(count), 200, 140, FONT.LARGE,COLOR.BLACK,COLOR.WHITE)
end

event.shoot_task = dis


Count doesn't correlate with shutter actions and doesn't seem to work if the shutter is triggered through Canon, rather, than say ML advanced bracketing.

Also, when it does trigger, I get strange counts, ie if three brackets taken, I get a count of 4 most of the time.
#145
Tutorials and Creative Uses / Hand Held HDR
February 10, 2018, 10:43:03 AM
As some may have spotted, I've been exploring my hand held bracketing (HHB) options.

The main restriction with HHB is, of course, your slowest shutter speed. With a wide angle lens, where most of my HHB needs fall, you can get away with some slow shutters, eg down to, say, 1/20 or lower if you haven't been drinking :-)

The ML ETTR and Advanced Bracketing are two killer features.

First, ETTR will give me my base (highlight exposure), fit for my hand holding limit, say, 1/30s.

Then Advanced Bracketing, with Full ISO shifting gives me the 'best' chance of getting the shadows: all hand holding.

I set my Canon auto ISO range to a max of 6400 on my 5D3.

In the example below I set Advanced Bracketing to 3x3EV, and ETTR came in at 1/30s at ISO 200 (my base exposure).

Although using Advanced Bracketing in the 'simple' mode, I'm also seeing if I can script in some intelligence, ie multiple HHB sequences, according to where your base ETTR starts.

Anyway here is the result of today's HHB experiment:





#146
@a1ex or anyone

I'm about to start a new scripting project and wish to do a few things.

First I wish to trigger advanced bracketing from the script. At the moment advanced bracketing can't be explicitly triggered from a script, as far as I know.

Second, I wish to wait until the bracketing has finished and detect this, so I can change the bracketing parameters and, in the script, start another sequence.

Thirdly, when each sequence finishes, and is detected by Lua, eg a wait state looking for bracketing to stop, I ideally would like to know the camera setting at the end condition, eg shutter speed, aperture and ISO.

Am I too far off piste?

Cheers

Garry
#147
Some may be interested in my latest experiments, all using ML of course!

http://photography.grayheron.net/2018/02/optimised-strategy-for-hand-held.html
#148
Feature Requests / [Canon menu] ISO limit for ETTR
February 03, 2018, 08:48:10 AM
For me, as a photographer and not a videographer, auto ETTR is one of the great ML features.

Recognizing many things, such as DR and total noise (eg shot and read) it seems to follow the best logic, ie try and capture the most photons, based on the aperture and shutter limits you define, and only then start increasing ISO.

But as we know, although read noise may fall with increasing ISO, there is a bigger picture, ie higher ISOs mean less DR and Canon sensors/electronics are not ISOless over the ful ISO range like some other manufacturers' cameras.

Thus, for most Canon cameras, it is only after you start getting above around ISO 1600 that you move into the ISO invariant part of the camera, where we need to change exposure strategy, eg there is no point further reducing DR by increasing ISO, simply change the exposure in post.

I would therefore like to request/suggest that, in addition to the maximum shutter time in the ETTR settings, we also have the maximum ISO as a user menu item, in order to better control the ISOless characteristics that we do have as Canon shooters.

#149
As I use ML in the technique, some may be interested in my latest bit of fun: http://photography.grayheron.net/2018/01/an-alternativenew-approach-to-focus.html
#150
General Help Q&A / Auto Bracketing and highlights
January 01, 2018, 07:06:34 PM
I have a use case where I was hoping the auto bracketing would help.

Namely, set the exposure for the shadow capture and let the auto bracketing capture the highlights.

The scene has a high dynamic range and very bright light sources, which seem to create problems.

The problem I'm facing is that the auto bracketing stops short of addressing the very bright highlight, ie it is over exposed in that area in RAW.

Here is a zoomed in JPEG from LR:





The auto bracketing does not have any settings, like ETTR, I'm wondering if it would be helpful to give the user some control in the auto bracketing, eg how many stops to keep going after the ML algorithm thinks its finished.

Cheers

Garry