Shutterless stack shooting with Magic Lantern

A forum to ask questions, post setups, and generally discuss anything having to do with photomacrography and photomicroscopy.

Moderators: rjlittlefield, ChrisR, Chris S., Pau

pierre
Posts: 288
Joined: Mon Jan 04, 2010 12:37 pm
Location: France, Var, Toulon

Shutterless stack shooting with Magic Lantern

Post by pierre »

Hello,

Thanks for sharing this Pontop

ML is now available, in early test version, for the 70D.
Regards

Pierre

nielsgeode
Posts: 306
Joined: Tue Jul 31, 2012 11:47 am
Location: Groningen, Netherlands

Post by nielsgeode »

For me it looked very interesting, since it reduces shutter wear and of course vibrations.

From a cost perspective I considered:

-Shutter lifetime: 100k clicks, cost to replace: ca. 130 GBP = 175 EUR = 200 USD.
-Filesize CR2 from 18MPix = ca. 18 MB at 100 iso; DNG = ca. 29 MB at 100 ISO
If you always keep your raw files (which I do) the difference is 11 MB of extra space per image. For 100k images, this is 1100 GB of extra space which I backup twice to prevent data loss in case of harddrive crash. A WD RED 4 TB (saves 3717 GB) costs 175 EUR so the additional storage costs including its backup are about a 150 euros which is pretty close to the cost of a new shutter.

Then, EXIF data is highly limited in the DNG's compared to the CR2's, which for me is also a downside since I use it regularly to search for photos in lightroom. There is also the exposure gradient for faster shutter speeds.

So I concluded that for me it mekes more sense to keep saving CR2's and every now and then spend the money for a new shutter.

pulsar123
Posts: 146
Joined: Fri Jun 12, 2015 12:36 pm

Post by pulsar123 »

Sorry for reviving this old thread, but I just wanted to share my findings regarding usability of the Full Resolution Silent Picture (FRSP; or electronic shutter) mode in Canon's DSLRs for macro focus stacking. Here is my contribution to the official FRSP thread:

http://www.magiclantern.fm/forum/index. ... #msg162692

The main points:

- FRSP seems to work well with an external flash (which was the must for me), once you figure out the values of a few relevant delays. (But see the caveats below.)
- One should use an external device which can be programmed to independently trigger the camera's AF (half-press) and external flash (via hot shoe or PC connector). I already reprogrammed my Arduino based automated macro rail, "Fast Stacker", to enable the FRSP support; once I polish and fully test the software I will release the new version on my wikia page.
- It seems to be working well - I ran a long test of 283 electronic shutter pics using an external flash set at 1/16 power, all the shots but one were exposed perfectly (no gradients); one shot was black - could be a hickup with my flash (I used half-discharged Eneloops, and no external battery), or more likely I need to fine tune my delays' values.
- Most of the timings should be camera and memory card specific. My camera is Canon 50D, the card is Lexar Pro 1000x 32GB.
- Caveats:
-- This mode requires fairly long exposure times (at least 0.8s for my camera), the actual exposure under FRSP is even longer (around 1s). That means that to eliminate the background light contamination your studio should be pretty dark.
-- Second potential consequence of rather long exposures - noise can become a problem (this is to be tested).
-- In my tests, there should be at least 6s between shots, which makes "continuous stacking mode" on my rail not useful. Instead one has to use non-continuous mode, but this is probably the norm for extreme macro photographers anyway.
-- I use DNG format to save silent pics, and for some reason they don't show up inside my camera after taking the pics - I can only see them in a computer. This makes almost useless the super convenient "Pause" feature of my macro rail (because one cannot review the recently taken shots to determine when something went wrong). Perhaps I can use the other format, MLV (but I will need to determine delays for MLV as they appear to be totally different from DNG delays), or may be I will find a solution for DNG pics not showing up inside my camera.
-- Silent pics are ~50% larger than CR2 files, and they require separate color calibration. Not sure about the noise properties of the silent pics, and if Raw processing software like ACR can handle them as well as CR2's.
-- According to the FRSP author, one can potentially brick your camera by using this feature, as it is constantly changing some camera registers which are not supposed to be touched. I haven't seen a single user complaining of bricking his/her camera in the long FRSP thread, so likely the risk is very small.
-- Not clear if camera's battery is used more or less under FRSP - on one hand, it does use Live View and the camera's screen ~20-30% of the time; on the other hand, mirror doesn't move, and shutter is not used, so not sure.
- Positive aspects:
-- This is an electronic shutter, so one can go crazy doing super-massive focus stacks - no more worries about wearing off the moving parts in your camera!
-- Neither mirror nor shutter are used during focus stacking (leaving the rail movement the only movement), which should substantially reduce camera vibrations - great for extreme macro stacking!
-- Apparently even DSLRs with a broken shutter (Error 99) can be used for focus stacking in the FRSP regime (read the long FRSP thread on magic lantern forum for some details), so potentially one could score an almost free camera with a broken shutter on ebay or locally, to be a dedicated focus stacking camera.

ChrisR
Site Admin
Posts: 8668
Joined: Sat Mar 14, 2009 3:58 am
Location: Near London, UK

Post by ChrisR »

Interesting.
Can you only use the approx 1 second exposure time? Is the problem with going shorter, about the
" some exposure gradient because of different timing of the first and second electronic shutter. "?

I'm reflecting on the self-cocking Compur shutter on my desk. Add an RC servo? Probably not very durable, but cheap. It has a PC flash connection of course.
There are electronically operated shutters - I have one somewhere. Again, probably not good for 100,000 exposures, but around $50 I think.
Then you have to isolate the vibrations!
Chris R

pulsar123
Posts: 146
Joined: Fri Jun 12, 2015 12:36 pm

Post by pulsar123 »

ChrisR wrote:Interesting.
Can you only use the approx 1 second exposure time? Is the problem with going shorter, about the
" some exposure gradient because of different timing of the first and second electronic shutter. "?

I'm reflecting on the self-cocking Compur shutter on my desk. Add an RC servo? Probably not very durable, but cheap. It has a PC flash connection of course.
There are electronically operated shutters - I have one somewhere. Again, probably not good for 100,000 exposures, but around $50 I think.
Then you have to isolate the vibrations!

My understanding is that with a flash there should be no gradient present, and this is indeed what I observed. Here are some details:

- The problem with using flash with FRSP is that after initiating a shot (by half-pressing the shutter button, or triggering the AF relay externally), it takes a variable (and fairly large) amount of time until the sensor actually starts gathering light. Let's call this variable delay dt_shot.
- Once sensor starts capturing the data, it does it simultaneously for all pixel rows. Then after a certain fairly short time (camera specific) light gathering gradually stops, starting from the top row of pixels. As a result, when using continuous light, top rows will look darker than the bottom rows (the gradient artifact). If you increase the camera's exposure, this will add a constant factor to the reading time of all rows, which will reduce the gradient effect (but will never eliminate it entirely).
- As a flash impulse is extremely short, no gradient will be present. If the flash happened between the time when light gathering (by all rows) started and the time when light gathering stopped for the top row, all pixel rows will get exactly the same amount of light - meaning zero gradient effect.
- If on the other hand the flash is triggered after the top row stopped gathering light, a fraction of the top rows will be black, the rest will be properly exposed. I observed both this and the previous situations in my tests, when varying the flash delay.
- Obviously if the flash goes off after the last (bottom) row stopped gathering light, the shot will be totally black - as observed.

The trick is to find such a value of the delay between initiating the shot and triggering the flash which would allow you to use as short exposure as possible and result in all shots being properly exposed, despite the internal variability of dt_shot.

Exposure needs to be long enough to cover the extreme dt_shot cases, and it seems it needs to be at least 0.8s for my 50D. I'll do more testing to see if it can be reduced further (perhaps by using MLV format for storing the data).

pulsar123
Posts: 146
Joined: Fri Jun 12, 2015 12:36 pm

Post by pulsar123 »

This is the picture I have about FRSP, which suggests the best way to trigger the flash. Please let me know if you find serious flaws with this picture.

ImageFRSP + flash by First Last, on Flickr

Horizontal line is the time axis. Large red rectangular curve is the half-press button - zero when it is not pressed, at a high position when pressed. The duration of the press is dt_AF - it should be long enough for ML to interpret this as a silent picture (not as a command to switch to Live View). In my tests dt_AF=0.8s or more for Canon 50D.

I am assuming that the time from initiating a shot (the rise of the red curve) to the time when light capturing starts, simultaneously by all pixel rows, is variable, with sort of normal (Gaussian) probability distribution (the blue bell curve). dt_exp after the light gathering started, the very top pixel row stops gathering light (followed later by the rows below). dt_exp=top_row_exposure_time (measured to be ~1/30s for my 50D by people in this thread) + the camera exposure time, and should have a fixed (not variable) value. (Or perhaps it is the maximum of the two values, not their sum?) So the end of light capture will have the same bell shape as the blue line, just shifted to the right by dt_exp.

The top panel shows the situation when camera exposure is short (say 0.1s or less), resulting in the blue and green bell curves partially overlapping. Now you can see there is no perfect spot to trigger the flash; the best spot (thick black vertical line) is half-way between the bell curves, but even there there will be some shots (represented by the green filled area) where the light capture of the top row ended before the flash - resulting in some (or all) of the top rows being dark. For a similar fraction of shots (represented by solid blue area) flash goes off even before the capture started, which will always result in all rows being black.

So let's increase the camera exposure! (Bottom panel). Now the two bell curves are well separated, so one can choose such a time to trigger the flash (at a later time, compared to the top panel) when neither "capture ended before the flash" nor "flash goes off before the capture" problems ever happen. (Well, if the distributions are truly Gaussian - which I doubt - there still will be a very small chance of the either problem happening; but this will affect only a tiny fraction of all shots).

I think these plots (if they indeed capture the essence of what's going on) give a good idea regarding how to choose the three time delay parameters involved - dt_AF, dt_exp, and dt_flash. In particular, camera exposure should be comparable or larger than the total width of either of the bell curves. (From my measurements, it is ~0.8s for 50D). It is also obvious that dt_flash is a function of exposure - the larger the exposure is, the larger dt_flash becomes (it always tracks the half-way point between the two bell curves.)

I hope this will help other people interested in using a flash with FRSP, for macro focus stacking.

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

These are very encouraging results.

I find it particularly interesting that you can get flash triggering even with no mechanical shutter action. I've always suspected that the restriction of no flash with EFSC was an arbitrary restriction, not a fundamental limitation of the hardware, and I think this confirms that idea.

I notice that you're working with 50D. Do you know anything about how this feature works with lower class cameras, such as my Canon T1i (500D) or more modern bodies in the same line?

--Rik

pulsar123
Posts: 146
Joined: Fri Jun 12, 2015 12:36 pm

Post by pulsar123 »

rjlittlefield wrote:These are very encouraging results.

I find it particularly interesting that you can get flash triggering even with no mechanical shutter action. I've always suspected that the restriction of no flash with EFSC was an arbitrary restriction, not a fundamental limitation of the hardware, and I think this confirms that idea.

I notice that you're working with 50D. Do you know anything about how this feature works with lower class cameras, such as my Canon T1i (500D) or more modern bodies in the same line?

--Rik
I am only familiar with my 50D, but from what I read in the FRSP thread all other models which support FRSP work in the same fashion - the only difference is in timings.

ChrisR
Site Admin
Posts: 8668
Joined: Sat Mar 14, 2009 3:58 am
Location: Near London, UK

Post by ChrisR »

OK, I'm missing something.
What's making it happen?
I assumed it was controlled by the half-press as the input, the red line.
But the exposure end comes before that.
So there's another input?

(Or you've got something like an Anticipative Fuse we used to send the lads to Stores for. You know, the type which blow before the current gets too high...)
Chris R

pulsar123
Posts: 146
Joined: Fri Jun 12, 2015 12:36 pm

Post by pulsar123 »

ChrisR wrote:OK, I'm missing something.
What's making it happen?
I assumed it was controlled by the half-press as the input, the red line.
But the exposure end comes before that.
So there's another input?

(Or you've got something like an Anticipative Fuse we used to send the lads to Stores for. You know, the type which blow before the current gets too high...)
My plots are for the situation when an external device (like my Arduino macro rail) can independently operate camera's AF (half-press) and external flash (via PC connector). The red curve describes what the AF relay does - if you trigger it and hold for a while (at least 0.8s for 50D), at some point Magic Lantern will interpret this as initiating a silent picture. The length (dt_AF) doesn't really matter for flash triggering, as long as dt_AF>0.8s. Exposure end can happen before or after the end of the half-press - apparently this doesn't make a difference.

ChrisR
Site Admin
Posts: 8668
Joined: Sat Mar 14, 2009 3:58 am
Location: Near London, UK

Post by ChrisR »

That makes sense!
I was lead astray by Rik :shock:
where he wrote
I find it particularly interesting that you can get flash triggering even with no mechanical shutter action. I've always suspected that the restriction of no flash with EFSC was an arbitrary restriction, not a fundamental limitation of the hardware, and I think this confirms that idea.
:lol:

So you can't get the camera to fire the flash -?
Chris R

pulsar123
Posts: 146
Joined: Fri Jun 12, 2015 12:36 pm

Post by pulsar123 »

ChrisR wrote:That makes sense!
I was lead astray by Rik :shock:
where he wrote
I find it particularly interesting that you can get flash triggering even with no mechanical shutter action. I've always suspected that the restriction of no flash with EFSC was an arbitrary restriction, not a fundamental limitation of the hardware, and I think this confirms that idea.
:lol:

So you can't get the camera to fire the flash -?
I personally think that should be possible, but from the response of FRSP developers it does sound they have no interest in pursuing this line, probably because this is a niche market for them. (By far the biggest market for FRSP is the timelapse video crowd.) If there is a way to trigger flash from inside Magic Lantern (which I am not sure of), one could simply introduce a flash delay constant into ML.

Instead, I opted for using my Arduino rail to do both camera and flash triggering (and also moving the camera) - I think it actually makes sense to minimize the dependence on Magic Lantern, and concentrate operations inside a single device - automated macro rail.

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

ChrisR wrote:That makes sense!
I was lead astray by Rik :shock:
where he wrote
I find it particularly interesting that you can get flash triggering even with no mechanical shutter action. I've always suspected that the restriction of no flash with EFSC was an arbitrary restriction, not a fundamental limitation of the hardware, and I think this confirms that idea.
:lol:

So you can't get the camera to fire the flash -?
Mea culpa -- I either misread, got confused with etalon's report, got distracted by something else, or suffered brain malfunction for some other reason. I have no idea which -- possibly multiple!

The issue has come up before, of variable timing when using an external trigger to flash during a long exposure started by electronic shutter. Ah yes, here it is, documented as Canon T1i: EFSC has large variation in shutter delay. On a quick re-read, it looks like I had to use a long shutter-open time also, due to unavoidable variations in shutter timing with respect to the shutter trigger pulse.

--Rik

pulsar123
Posts: 146
Joined: Fri Jun 12, 2015 12:36 pm

Post by pulsar123 »

rjlittlefield: Interesting thread (and 5 years old!), lots of useful information there. Indeed, we both arrived to similar conclusions, that we need ~0.6-0.8s exposure to use flash with Live View (and Magic Lantern).

pulsar123
Posts: 146
Joined: Fri Jun 12, 2015 12:36 pm

Post by pulsar123 »

I am happy to report here that after doing more testing of FRSP + flash (for macro focus stacking purposes) I got much better timings. Specifically, I managed to reduce the camera exposure from 0.8s down to 0.25s, with the same level of reliability (only one black frame out of 284 shots - similar to my previous best case scenario with 0.8s exposure). I actually did a few changes compared to my previous setup, not sure which of them was the main culprit for much better timings. In particular, I switched to MLV from DNG; I put to "Auto" long exposure noise reduction in my camera (it was "Always on"); and I significantly extended the shutter half-press time (from ~1s to ~2s). I am still using the same 1 shot every 6s frame rate. (Will try to reduce it in future tests.) By the way, I didn't realize that the timing of when you depress half-press also matters (before I assumed only the timing of engaging the half-press matters).

The new setup has the following sequence of events (camera: 50D; exposure: 1/4s; MLV format; Lexar 1000x card):

1) 0.0s: the half-press is enabled
2) 1.1s: external flash is triggered
3) 2.0s: the half-press is disengaged
4) 6.0s: going back to step (1)

A small caveat: the first shot is always black with the above settings, if you start from the Live View screen. There is a simple workaround for that: before starting focus stacking, briefly press the camera's half-shutter: the camera will take one shot (dark; one can use it later to fix hot pixels in your stack) and will exit LV (black screen). Now if you initiate focus stacking with the above timings, all the frames - including the first one - will be flash exposed.

Second important finding: this morning I made a number of dark frame shots at different exposures (from 1/160s to 0.8s), using both regular shutter and FRSP. When I processed them in the same fashion (using command line dcraw utility: dcraw -T -6 -W -b 500 file_name ; this command increases the brightness of dark shots by a factor of 500x, to make noise much more obvious), I didn't see a significant difference in the noise levels of all these shots, made both with shutter and FRSP.

Specifically, I wanted to compare the situation when I am doing focus stacking using shutter with 1/160s + external flash versus FRSP at 1/4s + flash. Be the judge: here are the two corresponding dark frames, brightened by the same factor (500x), and the noise seems to be pretty much at the same level in both cases:

ImageNoise test: FRSP at 1/4s by First Last, on Flickr
ImageNoise test: shutter at 1/160s by First Last, on Flickr

This alleviates the biggest concern I had with using FRSP + flash for focus stacking - the noise level (because of the longer exposure).

So now, with significantly shorter exposures (1/4s - meaning your studio doesn't have to be very dark) and the quality of the shots being the same or even better (same noise levels; mirror/shutter caused vibrations are eliminated), FRSP seems to be a great tool for macro focus stacking with an external flash - if you have the proper gadget (like my Fast Stacker) to trigger both camera and flash with specified time intervals, ans also to move the camera between shots. I will be releasing very soon the next public version of my rail's software (v1.14) which adds the FRSP support for Canon cameras.

Post Reply Previous topicNext topic