I'm looking to remove unwanted halo artifacts from an image, that is located in the LAB colorspace.
So my Question is: Given an image I in Lab-Colorspace, the gauss blurred L-Channel I(blur), a sharped L-Channel I(sharp), and the resulting sharpened Original L-Channel I(end).
How can I distract Halo-Artifacts from my resulting sharpened Original I(end), that mustnt be there?
I(end)=I+y*(I-I(blur));
The original image
The halos appear after sharpening the image with a gaussian filter. I have been searching for days for a useful attempt. As somebody wrote here vignetting is NOT equal to Halo-Artifacts.
Therefore I'm looking to implement an algorithm that uses only the L(uminance)-Channel within my picture.
Heres what I get:
Heres the sharp-mask I(sharp)=I-I(blur). As u can see there are lightnings produced at the transition of the building and the sky. how can i manage to remove those artifacts? Can I filter them also anyhow? mayybe another gauss-filter? enter image description here
Heres my MATLAB code so far, resulting in halo artifacts.
imageOrig = imread('HinduTemple_Small.tif');
imdisplay(imageOrig, 'RGB orginial',1);
[x,y,u]=size(imageOrig);
% Umwandeln in XYZ
simXYZ = imColorTransform (imageOrig,'ICCProfiles/AdobeRGB1998.icc',
'*XYZ');
%Umwandeln von XYZ zu Lab
labOrig = imXYZ2Lab (simXYZ);
labSharpened=labOrig;
%Separieren des Luminance-Channels
lChannel=labOrig(:,:,1);
%Erzeugen eines Tiefpass-Filters, ich habe mich für einen Gaussfilter
%entschieden, da dieser eine zuverlässige Filterung im Gegensatz zum
%Average-Filter verspricht, siehe hierzu
%https://de.wikipedia.org/wiki/Gleitender_Mittelwert#/media
/File:FrequenzSweepGlMWBinomial7.png
h = fspecial('gaussian', [100 100], 100);
lChannelFilter = imfilter(lChannel, h);
Gamma=0.5;
LChannelSharp=lChannel-lChannelFilter;
LChannelSharp= LChannelSharp;
lChannelnew=lChannel+Gamma*LChannelSharp;
labSharpened(:,:,1)=lChannelnew(:,:);
RGBSharp=imColorTransformMac(AntihalolabSharpened,'*Lab','ICCProfiles/AdobeRGB1998.icc');
imdisplay(Sharp, 'RGBsharpened with HALO local Contrasted',1);