Full-resolution silent pictures (silent.mo)

Started by a1ex, July 01, 2014, 05:11:15 PM

Previous topic - Next topic

0 Members and 4 Guests are viewing this topic.

k2121

When I shooting in DNG, it take some time to convert picture in camera.
MLV save frames faster.
650d.104 ML • SX1.200h CHDK

a1ex

Quote from: k2121 on April 16, 2017, 08:12:34 PM
when I shoot silent MLV with intervalometer, every picture is in individual MLV file.

Steps to reproduce?

(just tried on latest nightly, on both simple and full-res modes - each timelapse sequence is saved in a single MLV file)

k2121

I copy silent.mo and adv_int.mo from nightly 30 march to sd card and problem is still.
My build is raw_video_10bit_12bit_02apr.
Maybe i'ts bug of this build.
650d.104 ML • SX1.200h CHDK

togg

I'm surelly missing something so bear with me. When I select the experimental full res mode the half shutter press does nothing. How do I take the photo? I've tried the other buttons but no luck.

a1ex

Took a look at the code and the only code path that could result in "does nothing" would be if you start from some Canon dialog that does not go away on half-shutter (for example, the card full message) - very unlikely. Or, the trivial solution - if the silent pic option is turned off.

All other cases (incorrect shooting mode, incorrect settings, out of memory, autofocus and so on) should result in some error message (either in menu or on the screen), or at least some sort of screen activity.

That means... http://www.chiark.greenend.org.uk/~sgtatham/bugs.html

togg

Sorry A1ex, I was trying to solve different raw workflow things when I decided to try the silent module. I never thought it was a bug, just a stupid mistake of mine that someone else could catch fast, and it fact it is. I'm still not very familiar with the 5d3, the live view options confuse me, I was not in "photo mode". It works perfectly.

Was this discovered recently with the 4k advancements? Or do we had this for a long time? Incredible feature for stills on set and a lot of other situations. It's not easy to find a silent camera out there even mirrorless.

a1ex

In this case, you should get a warning message in the menu (so the behavior should be different from "does nothing").

The post dates appear to be valid. The 4K branch enables short exposures, but the regular version (at long exposures) was there since... the first post on this thread.




lureb74

Quote from: Greg on October 30, 2015, 02:31:21 PM
FRSP continuous :
You need nd filter simulation?
How does it work?

The camera take silent pictures in continuous mode, for example, Tv 0.5s, 4 frames :

0.5 + 0.5 + 0.5 + 0.5 = 2s

We can average frames in mlv_dump.

The movement of water/cloud will be like two seconds of exposure.
The image will 1EV more DR.

4 frames -> 1EV
16 frames -> 2EV
64 frames -> 3EV


Writing speed must be shorter than the exposure time.



one vs 20 frames :


Dual ISO alternately (100/1600, 1600/100, 100/1600...) :

I've never been convinced by the dual iso (loss of detail).
I think it should be a good solution, but I'm not 100% sure about because I do not tested in the landscape.



So in theory we get a huge DR.
100/1600 on the 500D give 2.2EV more.
If you averaged 16 frames, 2EV more DR.

Dual iso + 16 frames, give 4.2EV more for 500D  :o

Tree :


Interior :


Hi Greg,
Do this work on 5D3? I can't find anything in the forum...

spe42

Sorry for the repost (was trying to find this thread earlier, but only found the 14bit silent picture thread, so I started my own thread, here: http://www.magiclantern.fm/forum/index.php?topic=19679.msg185345#msg185345)
But this is what I was driving at:
Quoteis it possible to to separate the functionality of the liveview feature into "that which enables silent picture" and "that which must move the mirror away from the eyepiece?" eyepiece?"
Thanks.
the wrong man for thhe wrong job

dnlit

Guys, I'm sorry for being obviously dumb or something like that, but I don't understand why I can't take silent pics with exposure time longer than 16s with the nightly build from builds.magiclantern.fm (700D.114) when it seems to be possible according to this thread.

The link from @josevpn doesn't work anymore, https://bitbucket.org/Gr3g01/magic-lantern-frsp-long-expo/ is gone, and the PR is declined - because of "monkey patching"??

However, I found it here, updated it with the addresses from @hillibilli
Quote from: hillibilli on August 31, 2016, 08:00:19 PM
I have a 700D.114 and there the address of capture_err_time_addr is different to the value from @josepvm:

capture_err_time_addr = 0xff1e1dd8

The address of
bulb_end_addr is the same as @josepvm posted = 0x24960
Aaaand now my first 5 minute test-exposure worked very well :)
This is my compiled build: https://arxius.io/f/110e49fb

My question is: if this is possible, and working, why is it not merged? To me it is more important to have a feature that works rather than it being a "clean" solution.

Also, I think that I read somewhere (this forum and it's thread's are faar to huge IMO, to figure something out the first thing I have to do is sit down for two hours and read the forum), that somebody has found a workaround for the faster-than-~300ms-problem. If so, can somebody point me in the right direction?

And maybe we can do a list of features being implemented, but not currently in the nightly builds, and features declined? Like, things for testing, funny things nobody wants, etc.
Well, maybe there already is. Sorry for being dumb and not reading it all (the overview of all threads, and also all those 40 pages of this thread), I don't have the capacity for it IMO.

PS: Just noticed the code also still is here, it's @milank's version with support for the cams with bulb dial mode - I think?

a1ex

The approach was, indeed, a bit of a maintenance burden, as different camera models use different offsets (so it's easy to make mistakes). However, it is something that can be validated in recent QEMU (which, back then, wasn't advanced enough).

I'd also prefer to have it on top of the patch manager backend - which works pretty well, with one exception: when I take it outside, it gives ERR70. When I get back inside to track the error, it works fine.

For the above reasons, I did not decline the PR, but preferred to wait. Unfortunately, the PR was declined by the author.

Having a test suite would greatly help with reviewing such changes (for example, QEMU has a pretty good one, so I often do changes without fear of breaking things). It's a bit harder on the camera, where tests usually require user interaction (therefore time-consuming). Most of the recent QEMU progress is directed towards this; however, at the time of writing, the emulation is not yet able to pass the tests from selftest.mo or from api_test.lua.

Regarding the ~300ms problem - see http://www.magiclantern.fm/forum/index.php?topic=19300.msg183286#msg183286 (and first post from that thread). Integrating the change into crop_rec is an easy coding task; making the other modules play nice with it (such as ETTR or advanced intervalometer) may be more difficult. I might take a look at it later this summer, if I'll get a second chance to play with a 700D for a week or so, but can't really promise anything.

pulsar124

Here is a new interesting application for the FRSP feature: 3D scanning of real objects, via the method of photogrammetry (https://en.wikipedia.org/wiki/Comparison_of_photogrammetry_software). Basically, one has to take hundreds of pictures of the object from different angles, and use a smart software which would find and match features across the photos, and fit a model to it (3D model of the object + the camera positions + the model of the camera and lens).

Here is my simple setup for taking pictures (of small objects; the purpose is to reproduce objects using my 3D printer):

- a rotating platform driven by a stepper motor (1600 steps per full rotation);
- home photostudio lighting (two large softboxes and reflectors) using speedlights triggered by a single RF controller;
- camera (Canon 6D) on a tripod pointing at a small object sitting in the middle of the rotating platform, taking photos of the object at regular intervals (say every 2s - using the intervalometer feature of ML).

It all works pretty well, except that I don't wont to burn the shutter of my 6D for this stuff. It takes at least ~50 shots per object to build a model, and likely a few times more to also incorporate focus stacking into this (so probably ~250 shots per scan). FRSP would fit nicely here - if I could make it work with my setup.

At the very least, I need to have my flashes go off every time the intervalometer takes a FRSP photo. I saw reading the light from the camera LED suggested in this thread as the solution for this problem - can anyone give a reference to a page where this is discussed in detail? I couldn't find details in this thread. Specifically, I need to know if there is a lag between the LED flash and the actual FRSP exposure. If there is no lag, I can use a simple photodiode circuitry to do the trick, but with a lag I'll likely resort to using a microcontroller.

The first post in this thread mentions that when FRSP is used with  intervalometer, the shortest possible time interval is ~10 seconds. Is it still the case, specifically for 6D? Ideally, I'd like to use a 2s interval.

Has anyone tried Advanced Intervalometer module with FRSP? Will it work? My idea is to take continuous photos of the rotating object over the course of a few full rotations, while slowly shifting the focus from the foreground to the background of the object. My hope is that one doesn't need to do a bunch of focus stacking before running the photogrammetry software (this will significantly complicate the process); instead, one would just slowly vary the focal point while taking hundreds photos of the rotating object, and let the photogrammetry software find and match all the sharp features of the photos, which at the end should recover the whole extent of the object.

a1ex

QuoteI couldn't find details in this thread. Specifically, I need to know if there is a lag between the LED flash and the actual FRSP exposure.

You can turn on the LED whenever you need - even from a Lua script. However, turning it exactly in the middle of the exposure would require a background task (or polling) to check some low-level registers and figure out when the exposure started. Or, placing some hook in Canon's photo capture task. You may also have some luck with a fixed delay (trial and error).

Quote
The first post in this thread mentions that when FRSP is used with  intervalometer, the shortest possible time interval is ~10 seconds. Is it still the case, specifically for 6D?

You tell me.

The easiest way to reduce the file saving time is to port the lossless compression routines to 6D (easy coding task).

If you need even more speed and/or short exposure times without gradient, port the full-res LiveView (hint for 700D) and use mlv_lite (which is pipelined and optimized for fast writes).

pulsar124

Thanks! It does sound that a simple photodiode circuit will not do the trick. I have a few Arduino Nano lying around, will be playing with different lags and logics (if I recall correctly there is more than one LED flash per shot).

g3gg0

Quote from: pulsar124 on September 19, 2017, 09:07:20 PM
Here is a new interesting application for the FRSP feature: 3D scanning of real objects, via the method of photogrammetry (https://en.wikipedia.org/wiki/Comparison_of_photogrammetry_software).

yep. tried VisualSfm (years ago) several times using handheld shots. but most of the time the problem wasn't the amazing resolution you get using FRSP or MLV in general, but the fact that the items i scanned didn't have ideal textures for the SFM algos to recover the structure.
so it ended in giving up :)

maybe i am just too impatient...

Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

dfort

Did a very hackish fix to get lossless compressed Full Resoution Silent Pictures DNG files working with the EOSM and 700D without breaking it on the 5D3. Put up test builds on my bitbucket download page and submitted a pull request.

Not the ideal solution, basically it just uses the newer version of save_lossless_dng for the 5D3 and the older version of that function for all other cameras. The "RAW error, falling back to YUV overlays" warning has returned to the EOSM and 700D but the current version of silent.mo doesn't save the DNGs and gives no warning on these cameras.

pulsar124

Success! I managed to use an external flash with FRSP on my 6D, using pretty much the same setup as when I used my Arduino focus stacking macro rail with 50D. I just ran a 100-shots test, and there were no issues (black or partially exposed frames). This will be used to do photogrammetry (3D scanning from multiple images).

Here is my setup:

Untitled by First Last, on Flickr

The core is Arduino UNO running my simple code. It drives both the stepper motor via the stepper driver (which rotates the scanning platform, not shown here), and the small breadboard I just put together, with two optocouplers (PC817 - got 50 of them for 1$ from China), and two limiting resistors (220 Ohm). Also on the photo you can see one of my RF flash remote triggers Yongnuo (I have a bunch of Yongnuo 560III flashes in my home studio which can be triggered simultaneously with this trigger). The two connectors are to the stepper motor (white) and camera (black). The whole thing (including  the stepper motor) is powered by a single 12V power adapter.

As an initial guess I tried exactly the same timing settings which worked well on my old camera (50D),  and surprizingly they worked perfectly on 6D, despite 6D having twice slower write speed (40 MB/s vs 50D's 80 MB/s), and slower sensor read speed (0.3s vs 0.15s -ish). I used shutter speed 0.3s.

t=0.0s: shutter half-press initiated
t=1.1s: flash is  triggered (for 0.1s)
t=2.0s: shutter half-press released
t=6.0s: end of the cycle

As I speculated before, perhaps it is the fact that I am (half)pressing the shutter for quite a while (2s) that stabilizes the system, and results in highly accurate timings for the images. (SO that a constant delay works perfectly fine for the flash.)

Now back to the interesting stuff - making 3D scanning work...

pulsar124

My setup for 3D scanning using FRSP (see above) seems to work well, but one important feature is missing. For this kind of shooting (object size between 2-20 cm), DoF is fairly narrow, so one has to gradually shift the focus while shooting, and have a few full rotations of the object, to have between 2 to 10 focus positions for each full rotation. (So the 3D reconstruction software will be effectively doing focus stacking while reconstructing). To make it repeatable and automatic, a ML script would be needed which (a) detects when a FRSP picture has been taken, and (b) after each N such shots, it moves the focus by a predefined number of steps.

I've never done ML scripting (I am looking into it now), but it looks like a combination of custom_picture_taking() and focus() functions should do the trick - am I right? I can't find much documentation on custom_picture_taking() - can you point to any, or perhaps to some example scripts? Thanks!

a1ex

Ideally, camera.shoot() should take a silent picture if enabled (just like the intervalometer does, for example).

It's not covered by API tests though, so YMMV.

The CUSTOM_PICTURE_TAKING hook is meant for modules or scripts that can implement some custom photo capture modes (like silent.mo does). These custom modes would be used by intervalometer and other ML tools (such as focus stacking), if enabled.

pulsar124

In my case, silent pictures are triggered by an external switch (optocoupler connected to Arduino). I thought CUSTOM_PICTURE_TAKING can help me to detect these events - was I wrong? Perhaps key() function is the one I need to use here?

Pressing full-shutter while taking FRSP still results in a "normal" picture taken, as it used to be? It just occurred to me that I could use one more optocoupler (connected to the SHUTTER pin of the camera) to let my arduino rig communicate to camera when it has to move focus. But I suspect I'd have to be careful with timings - perhaps moving focus can only be done at certain times (e.g. not when FRSP image is recorded).

a1ex

Full-shutter was a black box to us, until very recently. Now I'm starting to understand how it works, thanks to some notes from Leegong (from NikonHacker).

I still don't know enough to override this event, but at least now I know where to look. I'm not yet sure whether the MPU initiates the photo capture and the mirror movement (if that's the case, we'd have to block it somehow, and in this case, I don't know whether the MPU would still send the shutter event, or just a generic BUSY message), or maybe the main CPU has to request all this stuff (in this case it should be easier to override this event).

edit: selftest.mo - fault emulation - lock-up ARM CPU, press full-shutter, mirror doesn't move it moves, just not consistent :(

Half-shutter is much easier to catch, as it doesn't have too many side effects (metering and maybe autofocus). However, when the GUI is locked, good luck detecting this event...

Yes, focus has to be done while the camera is in LiveView (and the LiveView must be actively refreshing; reading its state from Canon properties is not enough).

pulsar124

Thanks for the details, things are quite a bit more complicated than I imagined!

a1ex

After playing a bit with selftest.mo - fault emulation - lock-up ARM CPU (which does nothing more than cli(); while(1); on the ARM processor, thus blocking all the processes running there), the mirror still moves when pressing the shutter fully. That means the decision to move the mirror is taken on the MPU (a processor not under our control). Therefore, overriding it from photo mode is not going to be easy.

The behavior in LiveView is a little different, but I'm still not sure the full-shutter event gets communicated by the MPU in a way we can use to override it. On PowerShot firmware (CHDK), this event is handled like any other button, so they have no trouble overriding it (they use full-shutter press to start Lua scripts, for example).

sys73r

I realize the talk is way over technical but been trying to get full res silent pictures for awhile using the crop_rec module on the 5dmk3 and haven't been able to get the settings right:

Manual Mode: shutter 400, f/4.0, iso 8000. Back button focus enabled with the *
Live view Mode
Silent Pictures Enabled: Burst MLV
Crop mode: 3.5K 1:! centered 5x
shoot preferences: off

When I half press the shutter I only get 1932x1290 pictures. I'm pretty sure my settings aint right, would somebody please point me on the right direction?

thank you


a1ex

Any warnings in menu on the selected options?