Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AMaZE not working right?? #47

Closed
ilia3101 opened this issue Nov 19, 2017 · 31 comments
Closed

AMaZE not working right?? #47

ilia3101 opened this issue Nov 19, 2017 · 31 comments
Labels

Comments

@ilia3101
Copy link
Owner

ilia3101 commented Nov 19, 2017

Compare MLV App with amaze and bilinear:

AMaZE bilinear
mlvappamaze mlvappbilinear

You can see amount of colour artifacts increases!!! ...or at least doesn't decrease

Now look at MLRawViewer amaze vs bilinear:

AMaZE bilinear
mlrvamaze mlrvbilinear

Artifacts of colour are reduced.

What might be wrong?
I have had this suspicion for such a long time, but MLRawViewer really pointed it out to me today.

@bouncyball-git
Copy link
Collaborator

You mean AMaZE artifacts are less in mlrawviewer and it's opposite in mlvapp right?

@bouncyball-git
Copy link
Collaborator

I've been also thinking about it all the time from the beginning. I have no any idea why it's wrong though :(

@masc4ii
Copy link
Collaborator

masc4ii commented Nov 19, 2017

Same for my clip:
MLV App:
pic

MlRawViewer:
pic

None of these cyan edges on the water is present.

@masc4ii
Copy link
Collaborator

masc4ii commented Nov 19, 2017

One more thing: with saturation full right, these stripes are a very light cyan. With saturation full left (b&w), this are dark lines (see on the water, switch between the pics in tabs):
pic
pic

@bouncyball-git
Copy link
Collaborator

bouncyball-git commented Nov 19, 2017

In mlrawviewer use srgb or re709 for comparison with mlv app, not og space as you both did :)

btw exactly what color space we observing in the player of mlv app?

@masc4ii
Copy link
Collaborator

masc4ii commented Nov 19, 2017

I uploaded a short version of the clip for you to test:
Download1
And another one with so nice moiree...:
Download2

@ilia3101
Copy link
Owner Author

ilia3101 commented Nov 19, 2017

thanks for the clips :)

@bouncyball-git I found the 'HDR' mode in MLRawViewer was almost the same as MLV App's default tonemapped profile, so I did a direct comparison, tried to match them a bit:
screen shot 2017-11-19 at 13 59 49
Still clearly shows a difference.
As for what colour space MLV App uses or is, well that's still a mystery, though it is being treated as rec709 by ffmpeg, so we could probably think of it as rec709 for now, until we get it figured out a little better. I think it is also being displayed as rec709 (or maybe just the display's native values, but that should be approximate to rec709 on most good screens).. not 100% sure what the Qt display widget is doing. I was going to add an option where the user can specify what colour space their screen is most close to, so it can be output correctly for the screen. That will probably be coming with the planned colour management stuff.

@bouncyball-git
Copy link
Collaborator

I always dreamed to use OpenColorIO for color management of my future application ;) now I can say "for our cutest MLV App".

@bouncyball-git
Copy link
Collaborator

As for the images above: YES ugly artifacts are there and we have to understand why.

@masc4ii
Copy link
Collaborator

masc4ii commented Nov 19, 2017

It comes not from the processing. I disabled processing, exported a PNG and tried to process with another image tool. The artefacts are the same.

@ilia3101
Copy link
Owner Author

OpenColourIO is worth looking at. Maybe will come to MLV App 😉

Who might know about how to fix this issue? Is there someone on the magic lantern forum who knows about this kind of thing? I really wish this could just get fixed already.

@bouncyball-git
Copy link
Collaborator

We should ask there :)

@DeafEyeJedi
Copy link

DeafEyeJedi commented Nov 20, 2017 via email

@bouncyball-git
Copy link
Collaborator

Yeah, we need to sort out the quality of the AMaZE debayerer first.

@ilia3101
Copy link
Owner Author

http://www.magiclantern.fm/forum/index.php?topic=20995.msg193416#msg193416
Asked a1ex, suggestion is to try white balancing the image before AMaZE. If it works well, I'll add some kind of channel equalizing during the demosaic (and of course reset after to not ruin processing).

@ilia3101 ilia3101 added the bug label Nov 20, 2017
@bouncyball-git
Copy link
Collaborator

Hmm.. iunteresting how to apply WB (matrix?) to the bayered data. Is it done during normalization?

@masc4ii
Copy link
Collaborator

masc4ii commented Nov 21, 2017

Hm... don't know if that is the reason. If I comment out WB, I would then expect a picture with wrong colors, but without artefacts.
I commented the WB+exposure part out: The colors are wrong (okay), but the artefacts are still there.
Or was it wrong what I thought? EDIT: or do the artefact go away by doing some WB on the bayered data?!

@bouncyball-git
Copy link
Collaborator

I dug into darktable's related code today, it's pure C and source is huge, OpenCL is used all over there for image processing and matrix applying. AMaZE is CPU based thought and works fantastic. If I switch WB off in the interface then greenesh familiar debayered unprocessed look appears on the screen and small aliasing artifacts can be seen on the edges (almos exactly like on our mlv app with processing object wholly disabled). After turning WB on in darktabe aliasing is almost gone even when sharpening is applied.

@ilia3101
Copy link
Owner Author

ilia3101 commented Nov 21, 2017

No, it shouldn't be a matrix, as there's no way to blend the channels, just increase the value of red/blue pixels or decrease the green to get them equalised. I'll show what the results are soon.

@ilia3101
Copy link
Owner Author

I'll try and put it right in to the AMaZE demosaic() function.

@ilia3101
Copy link
Owner Author

Comment inside AMaZE seems to confirm the theory:
screen shot 2017-11-21 at 16 19 57

@ilia3101
Copy link
Owner Author

ilia3101 commented Nov 21, 2017

Apologies for the years of bad AMaZE.
screen shot 2017-11-21 at 17 31 04
6ed7e00 seems to have improved it.
Up next: automatic multiplier generation within AMaZE for even better channel balance.

Please try it out @masc4ii masc and see if its still worse than MLRawViewer on your clips

@masc4ii
Copy link
Collaborator

masc4ii commented Nov 21, 2017

WOW! I am impressed! Congratulations! This is so much better, also with my other clips!

@ilia3101
Copy link
Owner Author

maybe I'll leave this issue open for a little bit until I get the multipliers automated, as currently its most optimal for daytime white balance.

@masc4ii
Copy link
Collaborator

masc4ii commented Nov 21, 2017

I am still impressed and AMaZEd!!! This difference is unbelievable!
Before:
pic
After:
pic
You made me really happy today! :-) Now the results with my files are better than with Resolve.

@ilia3101
Copy link
Owner Author

Wow that's a great difference!!! Many shots will be saved. I was beginning to think that the 5D2 is completely doomed every time I used MLV App, but now that feeling will finally disappear :)

@bouncyball-git
Copy link
Collaborator

bouncyball-git commented Nov 22, 2017

Hey fantastic! I IS A REAL AMAZE!!! Hahaha I feel so better now too! :-D

@bouncyball-git
Copy link
Collaborator

Before
amaze_no_wb

After
amaze_fixed_wb

@bouncyball-git
Copy link
Collaborator

GREAT!

Uhm... Can it be tuned little bit more? :P

@masc4ii
Copy link
Collaborator

masc4ii commented Nov 22, 2017

I had to play around with the new version... sry for that :-)
youtube
Uploaded in 4K, but youtube knows even then how to crush the quality, hehe.
Edit: still not perfect, but way better than youtube:
https://vimeo.com/244015087

@bouncyball-git
Copy link
Collaborator

@ilia3101

Ни как не нарадуюсь как хорошо работает подлеченный AMaZE :-D. Спасибо!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants