Magic Lantern Forum

Developing Magic Lantern => Feature Requests => Topic started by: RenatoPhoto on September 02, 2013, 02:11:32 PM

Title: Aliasing correction in 60FPS RAW Video
Post by: RenatoPhoto on September 02, 2013, 02:11:32 PM
Can the aliasing research included in the cr2hdr be applied to stretched 60/50/48 fps video?
I tried to use it with the DNG but it is not a dual iso file so it does not processes it. 
Title: Re: Aliasing correction in 60FPS RAW Video
Post by: a1ex on October 19, 2013, 05:03:58 PM
I've included the chroma smoothing algorithm from dual ISO in some modified versions of raw2dng:

http://www.magiclantern.fm/forum/index.php?topic=6658.msg83064#msg83064

Can you check if it has any effect on aliased shots? (be it good or bad)
Title: Re: Aliasing correction in 60FPS RAW Video
Post by: RenatoPhoto on October 19, 2013, 06:41:59 PM
Thanks, I ran some test and got some improvements in some cases.  I will do some tests again and post results.
Title: Re: Aliasing correction in 60FPS RAW Video
Post by: hjfilmspeed on October 19, 2013, 09:15:01 PM
ooooooo great idea!!!
I can shoot a lot of frames at 48fps 1920x508 (2:35:1) with 5d3 and 128 gig 1050x komputer bay card oct 8 nightly
Title: Re: Aliasing correction in 60FPS RAW Video
Post by: a1ex on October 19, 2013, 09:30:54 PM
Don't get too excited; this is not a proper fix for aliasing - all it can do is to hide some of the color artifacts. You may want to kick Harry Nyquist for discovering that ;)

Proper approaches would be:
- super-resolution (get info from past and future frames)
- optical filter (VAF)

I've found a virtualdub plugin that says it does super-resolution, but I didn't try it: http://www.infognition.com/super_resolution_vdf/
Title: Re: Aliasing correction in 60FPS RAW Video
Post by: hjfilmspeed on October 19, 2013, 09:36:18 PM
wow thats looks really great. Ill have to give it a whirl at some point. theres a free trial
Title: Re: Aliasing correction in 60FPS RAW Video
Post by: RenatoPhoto on October 20, 2013, 06:44:24 PM
Ok I tested some frames recorded with 7D at 60 fps.
Comparison between raw2dng from sept 06 vs cs2x2_ahdlike_noise oct 15th.

In this shot it makes a difference:
(http://s20.postimg.org/zeetxr2ct/raw2dng_Sept_06_vs_Oct15th_810.jpg)

Here I dont see much difference:

Here I don see as much but maybe it is because there is so much.
(http://s20.postimg.org/nqks37d7x/raw2dng_cs2x2_ahdlike_noise_20_10_000360.jpg)

Will have to test the superres.vcf
Title: Re: Aliasing correction in 60FPS RAW Video
Post by: a1ex on October 20, 2013, 06:50:45 PM
Try the others too. 2x2 is meant for minimal image alteration in order to remove pink dots.

Also, some DNGs would be great. I've got some success with edge-directed interpolation in dual ISO code, and I think it can be applied here too.
Title: Re: Aliasing correction in 60FPS RAW Video
Post by: RenatoPhoto on October 20, 2013, 08:13:43 PM
I tested all of the others and seem that the cs3x3 is a bit stronger.  The cs5x5 is not so good but it may apply for other cases..

Here is the two images, the cs3x3 cleans up more and even polishes some of the noise in the shadows.

(http://s20.postimg.org/t4o5ohsbx/raw2dng_cs2x2_cs3x3_000810.jpg)

(http://s20.postimg.org/3xd9o8p7x/raw2dng_cs2x2_cs3x3_ahdlike_000360.jpg)

Title: Re: Aliasing correction in 60FPS RAW Video
Post by: RenatoPhoto on October 20, 2013, 08:14:29 PM
I will send you the 2 dngs when in town.
Title: Re: Aliasing correction in 60FPS RAW Video
Post by: RenatoPhoto on October 25, 2013, 03:51:43 AM
Quote from: a1ex on October 20, 2013, 06:50:45 PM
Also, some DNGs would be great. I've got some success with edge-directed interpolation in dual ISO code, and I think it can be applied here too.
Sorry it took so long!!!
Here: 2 dngs for Alex
https://drive.google.com/file/d/0B9z8Y0rg-pu8VWhUeExNN2dWUEk/edit?usp=sharing
Title: Re: Aliasing correction in 60FPS RAW Video
Post by: a1ex on October 25, 2013, 09:49:29 AM
I doubt I'll be able to fix this kind of aliasing because of the Nyquist limit; something with jagged edges should be easier (you had an example in another thread).

Also, I tried to find out why edge-directed interpolation worked with dual ISO, and it seems to be because lines are grouped in pairs (2 scanned, 2 skipped), unlike here (one line sampled, a bunch of them skipped). That means, with dual ISO I have high-frequency detail enough to estimate diagonal lines and fine detail like hair or fur, but here I don't have any.
Title: Re: Aliasing correction in 60FPS RAW Video
Post by: RenatoPhoto on October 25, 2013, 02:14:01 PM
Quote from: a1ex on October 25, 2013, 09:49:29 AM
I doubt I'll be able to fix this kind of aliasing because of the Nyquist limit; something with jagged edges should be easier (you had an example in another thread).
I posted some images regarding banding here (dual iso)
http://www.magiclantern.fm/forum/index.php?topic=7139.msg84009#msg84009

do you want the originals?