Hello guest, if you like this forum, why don't you register? https://fanrestore.com/member.php?action=register (December 14, 2021) x


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Quick and easy regrade using Gaussian Blur
#1
Found a neat little regrade method today that might be an alternative to having to manually create a LUT in DrDre for every single scene. I have only done one test, so there's probably lots of room for improvement, however I quite liked it, so I thought I'd share and maybe others can tune in and improve on it.

It has one major downside and that is: You can't really regrade any part of the image that isn't in both sources. So for example it won't work to regrade an Open Matte version with a scope versions colors. Well, I haven't tried it, but I can't imagine how it would work. Feel free to try it obviously.

Another downside is that it's not nearly as precise as the DrDre method, but on the other hand it's very quick so it may be something nice for tests or quick projects.

An upside is that it's not very susceptible to problems from noise, since it works with a strong blur.



Anyway, here's an example from Matrix. UHD, CAM, REGRADE
           


Proper screenshot comparison:

http://www.framecompare.com/image-compar...n/D77WPNNX

Here's how it works

This guide is based on Photoshop, but you can very likely easily adopt it for AviSynth+

1. Align both your source images. Convert the image to linear RGB in 32 bit floating point. I'm not sure how important the linear part is here, you can do your own experiments. If you're wondering how to do this, you need to create a Custom RGB profile with Gamma 1.0. There are guides for this on Google if you struggle. 32 bit floating point is important because some intermediate values may be over 100% and would be clipped in 8 or 16 bit.

2. Put the image you want to regrade on the bottom.

3. Duplicate this image and apply a 50 pixel radius Gaussian Blur. You can experiment with the radius, this one was simply my initial test.

4. Set the blurred duplicate to "Divide" layer mode.

5. Put the (aligned) reference image on top of these two layers and also apply a 50px Gaussian Blur (or whatever radius you used in step 3).

6. Set this blurred reference image to mode "multiply".

7. That's it.

It's pretty self-explanatory, as you can see. It basically equalizes the rough color tone in an area by dividing through the average (50px radius) color tone of that area and then multiplying with the average of that area in the reference image. And since the radius (50px) is so big, it of course misses small details, but on the other hand it's absolutely not distracted by noise and slight misalignment and shitty reference quality (like a cam) and stuff like that.

And the nice thing is, it doesn't even seem to produce any ringing artifacts, at least with the example I used, because while you are of course multiplying with a blurred image, you are dividing by another blurred image first which has (ideally) the same image geometry, so you should end up with an image that still looks good and smooth. Though I can't vouch that it will work for all examples. Maybe it won't work for some high contrast scenes, who knows.

Not a magic trick or anything, but I was kind of happy with my initial result and I think it might be good whenever you don't need 100% precision or your reference has really bad image quality. Maybe it falls apart with other examples, I'm not sure, but hey, it's something.

Feedback always welcome.
Reply
Thanks given by: Atreyo , GentlemenWalrus
#2
I did another test, trying to regrade the Die Hard UHD to the Netflix master. Here's my result:

http://www.framecompare.com/image-compar...n/D77YPNNX

           

While it's not perfect in direct comparison, it's actually as close as I ever got trying to regrade the UHD to the NF. You can see that there's kind of a mild shadow around bright areas resulting from this regrade method, however I don't think it's too apparent without a direct comparison. Considering how incredibly simple this is, might almost be worth trying to do the entire movie.

P.S. I used 30 pixel radius for this one
Reply
Thanks given by:
#3
I took your idea as an inspiration, and I did this:
  • regrade the UHD as BD using my avisynth script (doing that with DrDre's one should get the same results)
  • overlay(uhd,bd,mode="lighten") - gaussian blur applied on both sources here helps
  • mergechroma(regrade,overlay)
and result is better than simple regrade.

(top yours, middle mine, bottom BD)
[Image: attachment.php?aid=186]
[Image: aligned2-mine.jpg]
[Image: attachment.php?aid=185]

I wonder if it works in every case, though... and, of course the sources should be aligned perfectly!

Tom, can you try this with DrDre's tool, and see how it works?
Reply
Thanks given by:
#4
Not quite sure I understand your method fully, however I made an attempt with DrDre here, so you can try it with your method:

   

With that said, the UHD picture I posted is almost universally darker than the Netflix, because I essentially just applied to correct color profile in Photoshop and then reduced brightness until it didn't clip. So when you do a "lighten" from the Netflix on it, I think you might just end up getting the Netflix itself as a result, thus your method is essentially just taking a blurred chroma from the NF combined with a regrade using your method. Unless I misunderstand something.

Either way, using DrDre in combination with this kind of defeats the purpose of it being fast. Smile
Reply
Thanks given by:
#5
Well, DrDre's luma + overlay(uhd,bd,mode="lighten") chroma works very well:

[Image: aligned2-drdre2.jpg]

sure, it will not be faster, but it should get better color matching!
Reply
Thanks given by:
#6
Out of curiosity, what does the output of your raw regrade script look like? Basically just step 1 of what you said?
Reply
Thanks given by:
#7
P.S. What you think of this one? Wink Wink

   

http://www.framecompare.com/image-compar...n/D77G7NNX
Reply
Thanks given by:
#8
(2019-09-02, 03:10 PM)TomArrow Wrote: Out of curiosity, what does the output of your raw regrade script look like? Basically just step 1 of what you said?

Code:
uhd=imagesource("aligned2-uhd colorconverted.jpg").addborders(0,0,3,3).converttoyv12
bd =imagesource("aligned2-nf.jpg").addborders(0,0,3,3).converttoyv12
dre=imagesource("aligned2-uhd-drdre.jpg").addborders(0,0,3,3).converttoyv12

overlay(uhd2,bd2,mode="lighten")
mergechroma(dre,last)
Reply
Thanks given by:
#9
Oh, no I understand that. I meant, how does the image look when you only do a regrade with your own secret script?
Reply
Thanks given by:
#10
(2019-09-02, 04:59 PM)TomArrow Wrote: Oh, no I understand that. I meant, how does the image look when you only do a regrade with your own secret script?

[Image: aligned2-cm.jpg]
Reply
Thanks given by:


Forum Jump:


Users browsing this thread: 1 Guest(s)