This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

[HELP] $100 seeking paid filter to remove purple fringing in old videos
#1
I'm restoring old films and TV series and keep running into a recurring image quality issue: strong edges often show a purple band or halo. The artifact appears consistently around candlelight in night scenes, as well as along high-contrast edges in daylight. Here are a few examples
[Image: 17799690947855.png] [Image: 17799692165459.png] [Image: 17799697362694.png] [Image: 17799698086766.png] [Image: 177996923833.png] [Image: 17253474587304.png]

I'm not entirely sure of the correct term – it may be related to “purple flare” or chromatic aberration. It’s very distracting and seriously degrades the viewing experience.
[Image: 17252817383445.png] [Image: 17253489853430.jpg]
The same clips frequently suffer from a related dark edge problem. For example, candle flames often show a dark line on one side and a purple fringe on the other – extremely annoying.


I'm looking for an effective method/workflow that can remove these artifacts. I will provide a short test video; you only need to process the segments shown in the screenshots (no need to run the entire clip).

test video clip
https://drive.google.com/file/d/1kmni1sN...sp=sharing

Key requirements:


Minimize luma (Y) channel processing as much as possible, and avoid noticeable detail loss. Ideally, the Y channel should be left mostly untouched, but limited processing is acceptable if it doesn’t degrade fine details significantly. This step serves as a pre-processing module before an AI model handles detail restoration, so preserving image information is critical.

Please note: the test source has been badly upscaled (not by me – I received it this way). You are free to downscale it if necessary.

If your solution meets my requirements, I'll pay $100 USD. Please provide a clear workflow (script, filter chain, or detailed steps) that I can apply.
Reply
#2
a. The whole clip has too much red in it.
b. that clip was badly resized and deinterlaced
c. chroma is shifted in some scenes
Quote:Minimize luma (Y) channel processing as much as possible, and avoid noticeable detail loss.
+
Quote: the test source has been badly upscaled (not by me – I received it this way). You are free to downscale it if necessary
those two contradict each other
I doubt that removing these chroma aberrations in this clip will also remove them in the original source.

=> is that the source you want to improve, or do you want to improve a version that is less processed?
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Offline between (including) 29th of June and 5th of July => RochHarz Festival
Reply
#3
Here's a quick fix:
  • Start Hybrid
  • load source
  • enable "Filtering->Vapoursynth->Custom->Insert before DeCross" and enter:
    # create edgemask edges = core.std.Prewitt(clip.std.ShufflePlanes(0, vs.GRAY)) bits = clip.format.bits_per_sample thr = 32 << (bits - 8) # scale threshold to bitdepth mask = core.std.Binarize(edges, threshold=thr) # increase width of mask, by using higher integer values, depending on source and resolution increase = 0 for _ in range(increase): mask = core.std.Maximum(mask) # optional: soften mask edges mask = core.std.BoxBlur(mask, hradius=1, vradius=1) # create desaturated version mid = 1 << (bits - 1) mult = 0.5 # 0.0 = grayscale chroma, 1.0 = unchanged desat = core.std.Expr( [clip], expr=[ "", # keep luma unchanged f"x {mid} - {mult} * {mid} +", f"x {mid} - {mult} * {mid} +" ] ) # merge original with desaturated version around edges clip = core.std.MaskedMerge(clip, desat, mask)
To see what happens and tweaking the values depending on your source:
  • enable "Filtering->Vapoursynth->Misc->Preview->Split Compare View" and set "FilterView mode" to "orginal|filtered|diff"
  • enabled "Filtering->Compare view" (lower right corner)
  • enabled "Filtering->Synth auto refresh" (lower right corner)
  • open Vapoursynth Preview (lower right corner)
then adjust the parameters, i.e. thr, increase, mult, if your source differs from the sample.
[Image: grafik.png]
The filtering should be fast, on any machine.
No filters used that do no come with Vapoursynth itself, so any tool which allows you to add custom Vapoursynth code should work fine.
(+ works on Linux, Mac, Windows)
Side note: if processing speed is an issue, external filters can replace the used filters:
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Offline between (including) 29th of June and 5th of July => RochHarz Festival
Reply
#4
Thanks a lot for your try. I will try it on my own.
Reply
#5
As an additional improvement, if using machine learning filters is an option, adding '1x_BleedOut_Compact_300k_net_g' after the suggested solution through vsmlrt or vsgan additionally improves the color edges.
(this is available through Hybrids vs-mlrt- and torch-add-ons)
Additionally, BasicVSR++ for general chroma fixes, helps a lot.
(script, clip)

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Offline between (including) 29th of June and 5th of July => RochHarz Festival
Reply
#6
Hi Selur, many thanks for your test, and sorry for the late reply. I've carefully checked your demo "withBasicVSR++onChroma.mp4". 

Yes, it works to remove the purple fringing, but at the same time, it also damages too many normal colors. 

Here's a sample: 
https://ibb.co/gMMNzQ6B

the colors of the girls' clothes and the flag become much duller. That cost is too high—this is unacceptable.
Reply
#7
Posted an updated version of the script addition over at videohelp.
The version allows controlling the strength&co by specifying values for different ranges.

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Offline between (including) 29th of June and 5th of July => RochHarz Festival
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)