Magic Lantern Forum

Using Magic Lantern => Raw Video => Raw Video Postprocessing => Topic started by: ryan750mhz on November 18, 2017, 04:44:38 PM

Title: Strong artifacts
Post by: ryan750mhz on November 18, 2017, 04:44:38 PM
Just testing RAW on 50D, loaded the CDNG at resolve and got this very bad artifacts (strong green/purple high contrast lines) on my image, is this beyond "normal"?

came from Oct042017 nightly for 50D >> converted to Cdng via raw2cdng 1.7.9 >> Resolv

This is a Jpg export From Lightroom (adjusted WB)

(http://thumb.ibb.co/hQmJiR/M18_163500005.jpg) (http://ibb.co/hQmJiR)



This is a jpg export from Resolv

(http://thumb.ibb.co/hQmgk6/Untitled_1_2_1.jpg) (http://ibb.co/hQmgk6)
Title: Re: Strong artifacts
Post by: Walter Schulz on November 18, 2017, 06:38:13 PM
Without knowing about ML build version, settings, postprocessing tools: Yes. No. Maybe.
Title: Re: Strong artifacts
Post by: ryan750mhz on November 19, 2017, 12:39:09 AM
@Walter
sorry my bad, edited my post with details already
Title: Re: Strong artifacts
Post by: reddeercity on November 19, 2017, 05:29:00 AM
That's what you call aliasing & moiré problem -- the result of line skipping and pixel binding . Just search for aliasing & moiré patterns .
Take the 50D sensor size in photo mode 4752 x 3168 divide by 3 gets the camera resolution in 1:1 1584x1056 for video
But In 3X crop mode where every pixel is counted (no line skipping or pixel binding or at least minimal pixel binding)
So the lesson here is do not shoot -- bricks , power lines , wires anything that has fine patterns in 1:1 mode
but it's ok to shot that in 3X Crop mode where the problem dose not happen .
Title: Re: Strong artifacts
Post by: a1ex on November 19, 2017, 08:13:36 PM
Looks pretty strong; do you mind uploading a short MLV (1 second is more than enough) for this experiment (https://www.magiclantern.fm/forum/index.php?topic=20999) ?
Title: Re: Strong artifacts
Post by: ryan750mhz on November 20, 2017, 04:14:34 PM
Hi a1ex

here's the link for the MLV  :)

https://www.dropbox.com/s/h33p5z28cy6w34w/M18-1635.rar?dl=0
Title: Re: Strong artifacts
Post by: a1ex on November 20, 2017, 04:42:14 PM
Thanks; using the previous and next frame gives some minor improvement, but nothing worth showing.

However, I'm not getting your artifacts when rendering the image normally (dcraw -a -b 2), and I'm not even using an alias-friendly demosaic algorithm.

Before (original, uncorrected): M18-1635_000003-dcraw.jpg (http://a1ex.magiclantern.fm/bleeding-edge/raw/aliasing/M18-1635_000003-dcraw.jpg)
Corrected with 1 frame before/after: M18-1635_000003-dcraw-a11.jpg (http://a1ex.magiclantern.fm/bleeding-edge/raw/aliasing/M18-1635_000003-dcraw-a11.jpg)
Corrected with 3 frames before/after: M18-1635_000003-dcraw-a33.jpg (http://a1ex.magiclantern.fm/bleeding-edge/raw/aliasing/M18-1635_000003-dcraw-a33.jpg)

edit: also tried dcraw-float (https://ninedegreesbelow.com/photography/floating-point-dcraw.html); interpolation type 6 (LMMSE) does a good job reducing color artifacts without any additional trickery; I'd expect the same performance for any GUI raw processor that uses LMMSE (e.g. RawTherapee).

Same example with RawTherapee, LMMSE:

Before (original, uncorrected): M18-1635_000003-RT-LMMSE.jpg (http://a1ex.magiclantern.fm/bleeding-edge/raw/aliasing/M18-1635_000003-RT-LMMSE.jpg)
Corrected with 1 frame before/after: M18-1635_000003-RT-LMMSE-a11.jpg (http://a1ex.magiclantern.fm/bleeding-edge/raw/aliasing/M18-1635_000003-RT-LMMSE-a11.jpg)
Corrected with 3 frames before/after: M18-1635_000003-RT-LMMSE-a33.jpg (http://a1ex.magiclantern.fm/bleeding-edge/raw/aliasing/M18-1635_000003-RT-LMMSE-a33.jpg)
Title: Re: Strong artifacts
Post by: ilia3101 on November 20, 2017, 10:06:20 PM
Tried the MLV out in MLV App, with AMaZE demosaic, but the results looked worse than LMMSE:
(https://image.ibb.co/jAerNm/M18_1635_frame_00000.png)


@a1ex It seems to produce a result not much better than the 'not even alias-friendly demosaic algorithm' you used. And definitely much worse than LMMSE.
I'm sorry for hijacking the thread, but do you possibly know why AMaZE results in so much colour aliasing in MLV App?
I compared it with AMaZE in MLRV, and MLRV's AMaZE produced much less alising: https://github.com/ilia3101/MLV-App/issues/47
Title: Re: Strong artifacts
Post by: a1ex on November 20, 2017, 10:35:11 PM
Unable to answer without sitting down to debug it, but from what I remember since I've used AMaZE in cr2hdr, it seemed to prefer white balanced data as input (so it could know what's grayscale and handle aliasing better in these areas). At least that was my understanding (or maybe my implementation is also broken). I don't really understand how it works (tried to ask somebody who seemed to know (http://www.magiclantern.fm/forum/index.php?topic=10111.msg104208#msg104208)), only figured out how to call it.
Title: Re: Strong artifacts
Post by: ilia3101 on November 20, 2017, 11:17:04 PM
Ah yes, thanks for the white balance idea. I really must try that out.
And wow, that somebody really does make AMaZE sound particularly good (maybe its the original creator :)) )