Magic Lantern Forum

Developing Magic Lantern => General Development => Topic started by: a1ex on August 28, 2012, 11:12:33 PM

Title: [RESEARCH] DIGIC focus peaking
Post by: a1ex on August 28, 2012, 11:12:33 PM
If you like fast zebras, it may be possible to get focus peaking with a similar method - with DIGIC registers.

We have 4 scenarios for focus peaking:

- movie recording: we can only use C0F14xxx (display device), since these registers do not affect recording.
- photo mode (1x) or movie mode standby: we can also use registers that adjust image sharpness.
- zoom mode (5x, 10x): same as photo mode, but some registers may be different.
- playback mode: C0F14xxx (display device) or any custom image processing algorithm (not real-time).

The method of using sharpness registers looks very promising, at least for photo mode, so here are my findings on this:

- c0f2116c controls picture style sharpness: 0 = none, ffff0000 = max. It affects most of the other sharpness controls, so set a positive sharpness in picture style menu or in this register.
- c0f0f280 looks like a high-pass filter, but amplifies noise a lot. c0f2135c does some noise reduction and can be used here.
- c0f23164 enhances edges from bright areas, and looks great for peaking as long as the image is exposed to the right. If this could be configured to enhance edges from midtones, it's probably what we are looking for.
- c0f0f29c (cartoon look) enhances most edges, but it's too strong and adds a lot of noise. Doesn't work in zoom mode.
- other registers that seem to enhance edges or alter sharpness: c0f0f17c, c0f23140, c0f2314c, c0f2313c, c0f23134, c0f23128, c0f23124, c0f2311c, c0f23118, c0f230bc.

You can already try these things with some older binaries, or by compiling digic poke yourself, see  http://magiclantern.wikia.com/wiki/Register_Map/Brute_Force

If you notice other registers that can be used for focus peaking, please let me know.
Title: Re: [RESEARCH] DIGIC focus peaking
Post by: discocalculi on October 29, 2012, 08:17:24 PM
I've just started scracthing on it after your reports on c0f231xx, but it looks like for instance:

c0f2310c looks like slightly sharper diagonal patterns/outer contours (I was shooting at a white screen macbook)
c0f23110 interfers a lot more in the diagonal and outer contours than c0f2310c
c0f23114 slightly less interference than for instance c0f2310c, c0f2310. (for example when poking <<8 )
c0f23118 (for example when poking <<8 )

c0f23120 outer contour
c0f23124
c0f23128 (<<8 )
c0f2312c  (<<8 )
c0f23134 (<<8 )
c0f23140 (<<8 )
c0f23160  (<<8 )
c0f23168 (<<8 )
c0f2316c (<<8 )

... more to come...
Title: Re: [RESEARCH] DIGIC focus peaking
Post by: discocalculi on October 29, 2012, 08:58:13 PM
Found new stuff at 0xC0F230XX thanks when writing 0xFFFF0000 at c0f2116c...

http://magiclantern.wikia.com/wiki/Register_Map/Brute_Force/C0F2xxxx#C0F230xx
Title: Re: [RESEARCH] DIGIC focus peaking
Post by: discocalculi on October 29, 2012, 09:14:35 PM
... and also found some new stuff at c0f231xx...

http://magiclantern.wikia.com/wiki/Register_Map/Brute_Force/C0F2xxxx#C0F231xx
Title: Re: [RESEARCH] DIGIC focus peaking
Post by: a1ex on August 16, 2013, 09:52:19 AM
Went back to my notes and got it working:

https://bitbucket.org/hudson/magic-lantern/commits/227bf037ae1f5441b04c3552551b4dffb24c9de3

It's only sensitive to vertical edges, but it's done in the display device (just like fast zebras). So, it's instant and has nearly zero impact on CPU usage.

If you want different display modes, more contrast or whatever, you have to find them (see previous posts). I don't know how to program the display device, I'm only tweaking some existing settings / filters.
Title: Re: [RESEARCH] DIGIC focus peaking
Post by: dude on August 16, 2013, 11:32:25 AM
That s great- focus peaking is one of the most important things from ML, especially on the MK III.

I am excited!
Title: Re: [RESEARCH] DIGIC focus peaking
Post by: nanomad on August 16, 2013, 01:49:10 PM
Great find A1ex!
Title: Re: [RESEARCH] DIGIC focus peaking
Post by: arrinkiiii on August 16, 2013, 04:30:37 PM
Thank you  :D
Title: Re: [RESEARCH] DIGIC focus peaking
Post by: SteveScout on August 18, 2013, 01:51:50 PM
Cool, thanks for the amazin work. Is there already a build existing where we could try this out together with recording raw?
Title: Re: [RESEARCH] DIGIC focus peaking
Post by: Nachelsoul on August 18, 2013, 01:56:17 PM
Thanks A1ex for this invaluable feature. What a great imagination you have to find that!!!!!!
Title: Re: [RESEARCH] DIGIC focus peaking
Post by: ilguercio on August 18, 2013, 04:46:06 PM
So, do you reckon there is more around C0F14140 that could be found?
I think 1% builds for the 6D include Digic Poke so i would be fine with finding the addresses.
Title: Re: [RESEARCH] DIGIC focus peaking
Post by: 1% on August 18, 2013, 04:58:48 PM
You can look. This is working on everything I've tried so far.
Title: Re: [RESEARCH] DIGIC focus peaking
Post by: oddname on August 18, 2013, 07:15:41 PM
That digic-magic works wonders on raw-filming =D
Great find indeed.