Experiment 03 -- Remove Lens Flares

Here everybody can post his problems with PhotoLine
Benutzeravatar
photoken
Mitglied
Beiträge: 2162
Registriert: Sa 28 Sep 2013 01:25

Re: Experiment 03 -- Remove Lens Flares

Beitrag von photoken »

OK, I did some final finessing:
Used the Painting tool set to HSV mode and the "H" channel to paint with a dark, yellowish green over some of the areas that had too much of a dark red colour cast. Then I used the Brighten and Darken tools on a B&W Luminance layer to further adjust the values of some areas. Then I flattened the image and used the Darken tool directly on some small areas. After that, it was a matter of spot-knocking with the Remove Brush.

I added a Curves adjustment layer with these settings:
Curves final.jpg
to slightly darken just the darker areas (without sending them to featureless black) to compensate for the overall lack of good darks in the original image because it was shot directly into the sun.

Finally, I added a High Pass adjustment layer (blend mode = "Overlay") with a Size of 5.0 to slightly sharpen the image. (This is the equivalent of the notorious "Clarity" adjustment in other programs. :wink: )

The layers look like this:
layers final.png
And the result:
Lens Flare 01 final.jpg
Here's the link to the full-size image:
https://www.dropbox.com/l/72u4bUbOheBsynrTyqKmLn

There will always be some little things to fix, I guess, but this is enough for now. I'm happy with it. :D
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
Zuletzt geändert von photoken am So 01 Feb 2015 07:27, insgesamt 1-mal geändert.
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
Benutzeravatar
greenmorpher
Mitglied
Beiträge: 943
Registriert: Di 29 Mai 2007 14:42
Wohnort: Rabaul, Papua New Guinea

Re: Experiment 03 -- Remove Lens Flares

Beitrag von greenmorpher »

Terrifying! I'm going to live with flare!

Why did you ay the High Pass filter was the equivalent of the "notorious" clarity filter in other programs (presumably P'shop). Why "notorious"? And ewht does "High Pass" mean anyway?

cheers, geoff
Benutzeravatar
photoken
Mitglied
Beiträge: 2162
Registriert: Sa 28 Sep 2013 01:25

Re: Experiment 03 -- Remove Lens Flares

Beitrag von photoken »

greenmorpher hat geschrieben:Why did you ay the High Pass filter was the equivalent of the "notorious" clarity filter in other
The "Clarity" adjustment in other programs is way too seductive -- the temptation is really strong to apply it to everything. In PL, it's also "notorious" because, unlike other editing software, there is nothing anywhere that is labeled "Clarity". When you understand what those "Clarity" filters and adjustments do -- increasing the contrast at edges of areas -- then using the High Pass adjustment layer with a blend mode of "Overlay" is one of a couple of methods to get the "Clarity" effect in PL.

An in-depth explanation of the High-Pass filter (in Photoshop): http://www.digitalphotopro.com/software ... M21i8u_yCg
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
Benutzeravatar
Hoogo
Betatester
Beiträge: 4031
Registriert: So 03 Jul 2005 13:35
Wohnort: Mülheim/Ruhr

Re: Experiment 03 -- Remove Lens Flares

Beitrag von Hoogo »

At first I have a look at the channels.
Sometimes the flares come in a color that leaves one or two channels without that error.
And sometimes the object beneath the flare is of a quite uniform color. In that case all 3 channels are more or less the same, just with different brightness and contrast.
And when both events occur at the same time, then the problem can be solved quite good and easy with this receipt:

Replace the destroyed channel(s) by an intact one and use a curve to care for the different brightness & contrast.
Channels.jpg
The purple flare on the left is invisible in the green channel, so that one will be copied to the other two and adjusted.

Helpful tools for this are an adjustment layer "histogram correction" on top of the picture. Move the right edge far to the left so that it is easy to see small differences in dark areas later.
The panel "adjustment layer" will save a lot of clicks later, too.

1) Select the flare and quite some wood around it. Convert the selection into a new layer.
2) Use the channel mixer on this patch to copy the green channel into red and blue: Click on the button for grey output, type 0/100/0 into the 3 textboxes.
3) Now the patch looks black and white. The layer mode itself is still RGB, so some RGB curves can be applied to it.
4) Here I already created a curves layer, but without any adjustments, and enabled the histogram layer to make it all bright.
Step2.jpg
5) Drag & drop the curves in the layer list to the cutout part of the picture. Nothing happens, beside the curves layer is now a child layer of the patch, and it will only change the patch.
6) Turn the layer mode of the patch into "difference". Something dark blueish and reddish will appear.
7) Now open the panel "channel list". It's usually hidden beneath the layer list. Turn off all eyes but red.
Step3.jpg
8 ) Now check the panel "adjustment layer". It should show the curves, as the curves layer is still the active layer.
9 ) Select the red curve. Play around to make the wood-part as dark as you can. Ignore the flare part, it will appear much brighter.

10) Turn on green on the channel list, turn off red. Just to check that the batch turns black: The green channel was not changed, so there's no difference.
11) Turn on blue, turn off green. Go to the curves and adjust again.
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
Zuletzt geändert von Hoogo am Mo 02 Feb 2015 00:52, insgesamt 2-mal geändert.
----------------
Herr Doktor, ich bin mir ganz sicher, ich habe Atom! /Doctor, doctor, I'm sure, I've got atoms!
Benutzeravatar
Hoogo
Betatester
Beiträge: 4031
Registriert: So 03 Jul 2005 13:35
Wohnort: Mülheim/Ruhr

Re: Experiment 03 -- Remove Lens Flares

Beitrag von Hoogo »

12) Mostly done, now you only have to clean up all the helpers and make a better mask for the patch:
-Make all channels visible again,
-Go to the layer list, turn the layer mode of the patch into normal, turn off the histogram layer. The flare is gone:
Step4.jpg
Other errors are introduced,for example the sky, and also the grass and the house got the color of the woods.
Now it's a good moment to add a layer mask to the patch, fill it with black and paint the flare away in this mask with a white brush. This painting can be quite rough, there's only a small difference between the patch and the picture.

Sometimes you can have the luck that a flare is only visible in a single channel. Then you can have better quality when you don't select grey in the channel mixer, but only the channel with the error.

The huge green flare in this picture can be removed the same way, just with different channels.
The others are present in all channels.
Sometimes the channel mixer can still do with some subtraction, I will check for that.
Otherwise curves will still be a good idea, but it will take much better masking.
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
----------------
Herr Doktor, ich bin mir ganz sicher, ich habe Atom! /Doctor, doctor, I'm sure, I've got atoms!
Benutzeravatar
photoken
Mitglied
Beiträge: 2162
Registriert: Sa 28 Sep 2013 01:25

Re: Experiment 03 -- Remove Lens Flares

Beitrag von photoken »

Hoogo hat geschrieben:Replace the destroyed channel(s) by an intact one and use a curve to care for the different brightness & contrast.
Thanks for explaining this interesting technique. I have never used the Color Mixer, so this was good to learn. :)

I got good results using a simplified version of that procedure:
channel mixer 01.jpg
  1. Copy a "patch" from the original image layer to a new layer.
  2. Add a Color Mixer adjustment layer to the "patch" layer.
  3. Adjust the percentage sliders for each colour channel to get a good colour match as seen in the main editing window.
  4. Add a mask to the Color Mixer adjustment layer, fill the mask with black, and paint with white to apply and blend the Color Mixer adjustment to the patch.
I did that for 3 "patches" -- the mountain, the dark trees in the middle, and the lighter grassy area and surrounding trees. (The Automatic Lasso tool did a fine job of quickly creating the selections for the "patches".)

The larger multiple flare area is going to be much harder. :(
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
Benutzeravatar
Hoogo
Betatester
Beiträge: 4031
Registriert: So 03 Jul 2005 13:35
Wohnort: Mülheim/Ruhr

Re: Experiment 03 -- Remove Lens Flares

Beitrag von Hoogo »

Oh yes, you are right, you can take care of brightness and contrast with the channel mixer. Lower value in the slider for a channel gives less contrast, higher values in the slider for constant gives higher brightness. Curves may be a little bit more flexible, but channel mixer alone should do most of the time and takes less steps.

It is even easier and more elegant if you want to combine the method with the optical feedback of maximum darkness:
-Select the patch. It's not even necessary to cut it out and place it on an own layer.
-Create an adjustment layer "channel mixer". The selection automatically turns into a mask.
-Turn the mode of the patch into "difference".
-and so on...
----------------
Herr Doktor, ich bin mir ganz sicher, ich habe Atom! /Doctor, doctor, I'm sure, I've got atoms!
Benutzeravatar
photoken
Mitglied
Beiträge: 2162
Registriert: Sa 28 Sep 2013 01:25

Re: Experiment 03 -- Remove Lens Flares

Beitrag von photoken »

Hoogo hat geschrieben:Lower value in the slider for a channel gives less contrast, higher values in the slider for constant gives higher brightness.
Ah, yes. I didn't realize that -- it's a good thing to know.
Hoogo hat geschrieben:Curves may be a little bit more flexible, but channel mixer alone should do most of the time and takes less steps.
I'm experimenting with the Hue Editor for this. It gives more flexibility and control than the Channel Mixer. I find it easy to set a point across all 3 of its "channels", and I like being able to adjust the Hue, Brightness and Saturation individually, and in one dialog. Because those adjustments are on a curve, that helps with lens flares where there are variations across the shape of the flare itself.

You're right about not needing to copy the patch to its own layer. I find it more convenient to create Hue Editor adjustment layers for each selection on the image. As long as I make the initial selection slightly larger than necessary, I can paint on the mask of the Hue Editor to nicely blend in the correction with the unaltered areas of the image.
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
Benutzeravatar
dutchman
Mitglied
Beiträge: 477
Registriert: Do 21 Nov 2002 18:46
Wohnort: 72793 Pfullingen

Re: Experiment 03 -- Remove Lens Flares

Beitrag von dutchman »

Hi all,
I've tried to find a sophistcated way to create an acceptable solution, BUT...
This one is awesome.
Tried everything, which meet my skills. Nothing worked. Hours of work... for nothing !
OK to improve my PL skills.
So I did ordinary brush healing, brush copy and for the trees on the top of the hill I painted over the trees with a one pixel brush.
After that I sharpened and darkened the complete image.
This one I did in half an hour, because no color adjustments, layers, masks and tricks are needed.
After spending HOURS of testing and "try and error".
The result:
1280px-Lens_Flare1.jpg
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
Benutzeravatar
Hoogo
Betatester
Beiträge: 4031
Registriert: So 03 Jul 2005 13:35
Wohnort: Mülheim/Ruhr

Re: Experiment 03 -- Remove Lens Flares

Beitrag von Hoogo »

photoken hat geschrieben:I'm experimenting with the Hue Editor for this. It gives more flexibility and control than the Channel Mixer.
Usually I avoid filters that touch hue. I can't think of a natural effect that spins hue in a foto, so spinning back won't undo those effects.
Not that copying channels is any natural here... ;)

Curves are fine to undo effects where a uniform color was overlayed. But it needs finer masking.
----------------
Herr Doktor, ich bin mir ganz sicher, ich habe Atom! /Doctor, doctor, I'm sure, I've got atoms!
Benutzeravatar
photoken
Mitglied
Beiträge: 2162
Registriert: Sa 28 Sep 2013 01:25

Re: Experiment 03 -- Remove Lens Flares

Beitrag von photoken »

dutchman hat geschrieben: So I did ordinary brush healing, brush copy and for the trees on the top of the hill I painted over the trees with a one pixel brush.
After that I sharpened and darkened the complete image.
This one I did in half an hour, because no color adjustments, layers, masks and tricks are needed.
Looks great!

You're right -- these lens flares are so bad in places that I think the only way to correct them is by doing a lot of painting (and cloning) by hand.
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
Benutzeravatar
dutchman
Mitglied
Beiträge: 477
Registriert: Do 21 Nov 2002 18:46
Wohnort: 72793 Pfullingen

Re: Experiment 03 -- Remove Lens Flares

Beitrag von dutchman »

Hi Ken,
thanks, but your work ist the more sophisticated approach. Just fine!

If you didn't saw the original before, it's hard to see the manipulation. (I my opinion in both results).
And of course, I can "optimize" the result, but (as allways) my work is OK for me. (After spending hours of failures) I guess the same for you.

AFAICS there are three endresults? Correct?

Best regards from Stuttgart
toni
Benutzeravatar
Hoogo
Betatester
Beiträge: 4031
Registriert: So 03 Jul 2005 13:35
Wohnort: Mülheim/Ruhr

Re: Experiment 03 -- Remove Lens Flares

Beitrag von Hoogo »

The blue flare in the center is visible in all channels, least in red, worst in green.
I used the channel mixer with +200/-120/0 to create a b&w-picture where the flare was gone:
Flare.jpg
I kept following the receipt from above and colored with curves until I had minimum difference.
Still the receipt didn't work:
Flareb.jpg
...too noisy, no matter how perfect the masking would be. Denoising turned it into some cloudy stuff .

Now that I see the result it's obvious why it looks so bad:
If you would have taken 2 photos, one noiseless at very low ISO, one noisy at very high, and you subtract one from the other, you will get the noise pattern as result.
And it's not that much different if you subtract 2 similar channels from each other. The similarities extinct or at least decrease each other, while noise goes up. Mostly Jpg-artifacts here.

The result would have been good if the flare was much more present in the worst channel and less in the best channel, so that the channel mixer could work with less extreme values. And if it wasn't a jpg. Such a flare would have a deep, saturated color, this one was only faint blue.

I'll check curves alone for this spot.
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
----------------
Herr Doktor, ich bin mir ganz sicher, ich habe Atom! /Doctor, doctor, I'm sure, I've got atoms!
Benutzeravatar
photoken
Mitglied
Beiträge: 2162
Registriert: Sa 28 Sep 2013 01:25

Re: Experiment 03 -- Remove Lens Flares

Beitrag von photoken »

dutchman hat geschrieben:AFAICS there are three endresults? Correct?
Hi toni,
Yes, so far three of us are participating in this Experiment.
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
Benutzeravatar
photoken
Mitglied
Beiträge: 2162
Registriert: Sa 28 Sep 2013 01:25

Re: Experiment 03 -- Remove Lens Flares

Beitrag von photoken »

Hoogo hat geschrieben:The blue flare in the center is visible in all channels, least in red, worst in green.
Yes, the first thing you did was to look at the individual channels, and I think that is a very good approach. It seems to me that, as a general principle, if the flare is obvious in all three channels, it is most efficient to clone over that part of the flare, since there will be very little original image data to recover from those areas.
Hoogo hat geschrieben:If you would have taken 2 photos, one noiseless at very low ISO, one noisy at very high, and you subtract one from the other, you will get the noise pattern as result.
And it's not that much different if you subtract 2 similar channels from each other. The similarities extinct or at least decrease each other, while noise goes up. Mostly Jpg-artifacts here.
This brings up a point that I've long been curious about: One of the obvious features of Photoshop that is missing in PL is "Image Arithmetic", where images, layers, etc., can be combined in various ways. My questions for the Photoshop users are: Do you use that "Image Arithmetic" function? Would that be a valuable feature for PL to have?
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.