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
ColorMatch 3D (new colormatching tool)
#11
(2020-12-19, 10:29 AM)TomArrow Wrote: New version.

https://github.com/TomArrow/ColorMatch3D/releases/

Skipped the one in between. Last version added the option to work in CIELab instead of the sRGB of the images that are to be matched, the new function is a brightness equalization similar to what I did in the post above, but now you can just click on the option and have it done, whilst setting a blur radius for the equalization. It gives rather smooth results, but a downside is that the contrast of the reference isn't necessarily respected too well. I'll have to come up with some clever idea to further improve the results.

Smoothing the result is not implemented yet. Sadly I am right now fighting with constant BSOD issues on my PC whenever I work with Visual Studio, so it might take a while until I feel like touching it again. So far, enjoy.

Result I get with 15px equalization radius of the image above:
[Image: t2jTUbQd_t.jpg]

As you can see, the colors are alright, but the contrast is more or less ignored. Will need to come up with something clever to fix that.

Those colors are very good!
Reply
Thanks given by:
#12
Tada, new version. (0.4). Again on github.

[Image: k0CbhLLP_t.png]

I've added something on top of the equalization thingie, a histogram matching. It helps preserve the contrast, but reintroduces a few artifacts, so on top of this histogram matching, I have added a smoothing parameter for this histogram matching. The defaults were set to look good on the picture I linked, but different scenes may need more or less smoothing of the histogram.

And, I regret to say it, there's some kind of bug in the smoothing algorithm, because on some occasions, it will just completely ruin the result for no discernable reason. I think it's a flaw in my programming logic, will have to figure it out. In short, currently it's a kind of playing around to get decent results, but in some cases you can already get really nice results.

To help you decide if the match is going to be messed up by the smoothing, I autogenerate 3 files in the program folder showing the outcome of the histogram smoothing. If it didn't go well, you can tell by those 3 pngs very quickly without having to save out and try the 3d lut.

In short, the result now can be anything between atrocious to nearly perfect, depending on the material you feed it and the settings used. The whole equalization and histogram matching and histogram smoothing should only be used with problematic scenes to begin with tho, unless I can get it to work a bit more reliably in the future, so I recommend disabling it by default. Currently it's on by default.

In terms of generalizing ... it's still not great, but I think the best improvement there will come from a function to smooth the resulting LUT before saving it. Creating a LUT with this and smoothing it in 3D LUT Creator already gives beautiful or at least very useful results most of the time. Without smoothing, it is good enough to at least comfortably cover a larger frame of the stuff that was matched by now. So say you match to a Pan & Scan version, it should be good enough to cover the whole frame unless something crazy happens in another part of the frame.

The main strength of this so far is color fidelity when it comes to small details, which DrDre's tool can easily miss in my experience. For example if there's a small tiny item in the image that should have a particular color but most of the image is going in a different direction, DrDre will struggle to give it the right tone, but this tool should give pretty good results unless there are other issues with the frames.

As always, all feedback is appreciated.
Reply
Thanks given by:
#13
Hi, it's me again. Premiere won't accept my .cube file. Is it me or is it Premiere?

Also, thanks for your work. This new histogram matching thing is promising. The new image is ever so slightly too bright but this is very very close.
Reply
Thanks given by:
#14
(2020-12-22, 04:24 PM)Cactus Wrote: Hi, it's me again. Premiere won't accept my .cube file. Is it me or is it Premiere?

Also, thanks for your work. This new histogram matching thing is promising. The new image is ever so slightly too bright but this is very very close.

Can you zip the cube file and post it in this thread? I've encountered situations where the .cube file becomes corrupted, would like to see if maybe that's the case here.
Reply
Thanks given by:
#15
Here it is! Thanks.


Attached Files
.zip   1.zip (Size: 389.05 KB / Downloads: 1)
Reply
Thanks given by:
#16
Looks like you have the same problem as Dr. Cooper. Apparently on a non-English locale, floats are converted to strings using commas and not points. I will fix it once I get my PC properly reinstalled. In the meantime, just open the .cube file in a text editor and do a search & replace, turn all commas into points. Smile
Reply
Thanks given by:
#17
(2020-12-24, 12:48 PM)TomArrow Wrote: Looks like you have the same problem as Dr. Cooper. Apparently on a non-English locale, floats are converted to strings using commas and not points. I will fix it once I get my PC properly reinstalled. In the meantime, just open the .cube file in a text editor and do a search & replace, turn all commas into points. Smile

It works! Big Grin
Reply
Thanks given by:
#18
New version out!

https://github.com/TomArrow/ColorMatch3D.../tag/v0.42

Quote: Added post match smoothing, which finally makes the resulting LUTs rather generalizable
Added very very basic and rudimentary luminance protection for the post match smoothing
Added LCHab space, the cylindrical version of Lab, which will help preserve saturation when matching collages of scenes instead of one particular scene. Seems to do slightly worse than the other color spaces with single scene images. Use at your own discretion.
Made LUT saving significantly faster by switching to StringBuilder instead of adding strings together
A few other smaller non-dramatic changes under the hood

This can all probably still be improved but I think I've reached a little milestone. The output LUTs finally are usable without necessitating external smoothing, by using the internal smoothing. The default smoothing is a radius of 2 units. Units are basically the precision of the LUT, currently hardcoded to 32 units from 0 to 1.

More smoothing: LUT is more stable/has less artifacts, but loses precision.
Less smoothing/No smoothing: Maximum precision, but likely to produce artifacts and not generalize well to other scenes. Basically what you've already seen.

I've added a cylindrical version of the Lab color space too, this helps with matching collages. Helps preserve saturation better. Like when you have 20 different images in one collage that you want to match from one source to another. Due to grading differences this usually leads to desaturated colors (since for example a particular color in the source might be green in one reference image and magenta in another part of the reference image, and the two would cancel each other out and produce a rather neutral result). This color space is called LChab. For most scenes it will actually give slightly worse colors in my experience, but its nice for collages.

Next thing I wanna add is batch processing functionality.
Reply
Thanks given by:
#19
Batch processing!

https://github.com/TomArrow/ColorMatch3D.../tag/v0.43

Works exactly the same way as here: https://fanrestore.com/thread-3205.html

[Image: POhPivej_t.png]

Edit: It even processes image pairs in parallel for an extra speed boost! I'd guesstimate you can go through 10 image sets in normal full HD in less than 10 seconds depending on your PC and matching settings. Smile
Reply
Thanks given by:
#20
Do anybody still use this?
I load the images or the bulk folders but nothing happens.
Reply
Thanks given by:


Possibly Related Threads…
Thread Author Replies Views Last Post
  Another color matching tool - Match color.io alleycat 1 1,686 2021-09-09, 07:20 AM
Last Post: deleted user
  [Help] Tool: Taking an Image and Searching Every Frame within a Video for that Image? alexp120 4 3,340 2021-06-01, 12:40 PM
Last Post: alexp120
  DrDre Colormatching Problems PDB 1 2,066 2020-05-10, 06:00 PM
Last Post: PDB
  Searching for a tool CaveDoctor 3 3,370 2019-01-16, 02:04 AM
Last Post: spoRv
  Tool to undo improper image stabilization? trondmm 6 6,034 2018-03-10, 10:02 AM
Last Post: deleted user

Forum Jump:


Users browsing this thread: 1 Guest(s)