Page 1 of 1
Could Defringe help with Blooming?
Posted: May 31st, 2013, 3:28 am
by tomczak
I've been fighting with blooming (or chroma fogging/halos) for a while now, and while I think blooming is caused by
different phenomenon than purple fringing, they both result in smearing of the image and perhaps a similar technique could be used to remove them in a semi-automated fashion.
http://www.dl-c.com/board/viewtopic.php?f=4&t=453
Since I noticed that for blooming to occur the background has to be dark and the edge that spills colour over it has to be bright (most likely reddish or bluish) and saturated, perhaps having a reversed threshold (i.e. a threshold that would only look for pixels darker than some value) and then applying the same radius/colour range desaturation as in Defringe could work?
I would love to experiment with it! Would it be feasible to split the Threshold slider in Defringe into lower and upper brightness thresholds? - it would retain all the current functionality of Defringe, but possibly allow to extend its usefulness even further.
Re: Could Defringe help with Blooming?
Posted: May 31st, 2013, 6:06 am
by tomczak
I have an addendum to the idea of dual Threshold slider in Defringe: while a little bit less flexible, perhaps it would be less confusing to retain a single slider but also have a switch "lower threshold = protect shadows = purple fringes?" and "upper threshold = protect highlights = chroma blooms? " for instance (set by default to '"lower threshold" so that the present functionality is intact)?
I can only speculate how effective thresholding shadows may be in removing blooms, but I really would like to test it as it may actually work...
Re: Could Defringe help with Blooming?
Posted: May 31st, 2013, 6:18 am
by jsachs
To experiment you could invert the image, defringe, and then invert it again. Alternatively you can create a mask based on a color range and then desaturate. My guess is that this will not work nearly as well for blooming as for purple fringing which depends on bright purple being absent from most photographs.
Re: Could Defringe help with Blooming?
Posted: June 1st, 2013, 4:44 pm
by den
Maciej... others...
I have not fully investigated the impact of the following suggested Defringe transform settings on the full image that you have provided to me...
- Suggested DeFringe Settings.jpg (35.47 KiB) Viewed 19987 times
...but when applied to your posted "IMG_2115_BloomingCrop" image results in the following:
- IMG_2115_BloomingCrop-Defringed.jpg (37.7 KiB) Viewed 19996 times
which has greatly reduced 'blooming', especially when followed with a medium radius Local Contrast Enhancement that is biased towards the dark half of edge contrasts...
...den...
Re: Could Defringe help with Blooming?
Posted: June 1st, 2013, 8:33 pm
by den
The following color hexagon illustration indicates the reasoning/analysis for the suggested Defringe transform settings...
The 'bloom' has a 7.2% Hue and a 53.2% Saturation in the HSV color space model... ...the Defringe default Hue and Saturation range is roughly 67 to 100% Hues with 0 to 100% Saturations [shown bottom left]. The transform's Hue sliders were moved to a narrow Hue range that included the image's probed 7.2% Hue/53.2% Saturation 'bloom' with the blending sliders/Radius/Threshold/Amount adjusted to a preference for the needed 'bloom' reduction [shown bottom right]...
- Defringe Range shift.jpg (47.89 KiB) Viewed 19949 times
...in this manner with the aid of the Readout Tool and a reference color hexagon, one can select preference Defringe transform Hue ranges that differ from the 'default'... ...just use a reference color hexagon image as the initial transform Input image, set the Hue sliders, then change the Input to the 'bloom'-ed image to adjust the remaining settings...
...den...
Re: Could Defringe help with Blooming?
Posted: June 2nd, 2013, 4:36 am
by tomczak
Just like Dan, I tried Jonathan's advise (Defringe on negative), and while chroma blooming can be removed, it's much harder to isolate chroma blooms than purple fringing - details that are not chroma blooms get selected and desaturated as well.
I tried another idea that seems promising and in principle could be automated as there are no adjustments other than Highpass radius and the degree of desaturation. It is based on R (and sometimes B) channels being softer on edges than G, which results in chroma ghosting.
The recipe: Highpass filter G, Highpass filter R, take absolute difference of that and use it as a mask to desaturate the chroma ghosting in the original image.
It seems to work on at least one test image with some effectiveness, the only problem is that since it uses individual channels it can't be, as far as I know, automated in a workflow.
Perhaps there is some other, better way of separating blurred chroma (or R or B) edges from sharper brightness (or G) edges and then correcting it?
I tried unbluring the edges of a channel such as R, by treating it as as a mask and feathering it with negative radius, as Jonathan suggested some time ago, but that doesn't work for me.
Re: Could Defringe help with Blooming?
Posted: June 3rd, 2013, 1:00 am
by tomczak
Just an addendum to the recipe above: regular difference of Highpass(Red or Blue) minus Highpass(Green) seems to mimic the ghosting and thus its removal better than using absolute difference.
This makes sense to me as Highpass on sharper G edge will produce greater halos on both sides of the edge than Highpass on more diffused R edge (that's the whole idea behind the technique), then subtracting the Green halos from Red/Blue halos will leave only the halos on the dark side of the edge (consistent with chroma smearing I want to remove) and cancel out to black on the other side (the side I don't want to touch).
When using such a mask in Saturation, preserve neither and HSL seems to work more subtly than HSV. Leave black slider alone and reduce white slider aggressively (the mask is not that bright).