Lens reflection removal

Hello all, I have a question about lens reflection removal, I took this long exposure shot using a home made ND filter / welding glass plate and the lens is slightly mirrored near the bottom left corner:

I had to swap colors as the welding glass has a green hue so the reflection appears like a purple smudge that I cannot un-see and it’s driving me crazy :smile:

Also, it’s nearly impossible to cover it by using healing / cloning tools because of the super straight lines of the marina wood planks!

Any suggestions on how to rectify this situation will be greatly appreciated as always :blush:

Here is one attempt using layers in GIMP 2.9:

Basic idea is to first remove the color from the lens flare, adjust the luminosity and then put the required color back in.

Step 1. Duplicate layer twice and desaturate top layer (I used Luma mode)
Step 2. Add black layer mask to BW layer and using soft brush paint paint white on the lens reflection area. Merge down. Now you have original layer and the one with black and white area where lens reflection was.
Step 3. Create a new transparency layer and using the dropper fill it with the brown color of the jetty. Add black layer mask. change the layer mode to color (HSL).
Step 4. Paint white (with low apcity brush) on the black layer mask and adjust opacity to taste.

I did the whole thing a bit fast. With more care, I am sure you will get far better result.

2 Likes

Thank you for your response :slightly_smiling_face:

It looks fine and it doesn’t catch the eye like the purple smudge do but, unfortunately, I’ve never worked with layers before and what you describe seems very complicated to me.

I’l give it a try though and hope to get the hang of it fast!

Well, this might give you a good motivation to start! Without using layers and masks, it is impossible to understand the true power of GIMP. Here are some hints (forgive me if these are too elementary).
1.Right clicking on a layer opens a menu from which you can add Layer Masks.
2. Clicking the drop down menu of the layer modes like Color (HSL). Opacity bars below the Menu mode allows you to control how much of the bottom layers are visible.
3. When you choose a tool (like brush), you can also control its mode and opacity from the Tool Menu Tab. You can create 0 Hardness brush (it doesn’t come by default) by clicking edit button on 25 Hardness brush and adjusting the hardness. It will give you a smoothest transition.

There are lots of tutorials on the net for GIMP. Enjoy :slightly_smiling_face:

Thanks again, as I said I will give it a try and I’ll let you know of the results!

There’s probably a few ways to approach this. I happened to already have GIMP open, so I took a quick stab at an idea.

  1. Wavelet Decompose
    Decompose the image to scales. This will isolate all of the details from the color information (somewhat). This way you can modify colors without smearing details.
    Then select the purple region and shift the colors to something that matches a bit better.
    This is probably overkill.

  2. Probably faster and (relatively) simpler is to select the purple-ish color, by color, and change the Hue/Saturation to suit:

  • Use GIMP’s “Select by Color Tool (Ctrl-O)”.
  • Select the purple-ish region by clicking on it. Hold Shift and click again to add to the selection.
  • Once you have the purple region selected, feather the selection to make the transition smoother.
  • Now you can use “Colors → Colorize” to shift the Hue to something closer to the surrounding color. Adjust Saturation and Lightness to suit.
  • Voila?

This was done very quickly while snacking, so spend some time and you should be able to get something decent.

7 Likes

Thanks David :+1:

After testing my “abilities” in all the proposed methods I got the best results with the last and simplest method:

Not 100% there obviously but at least the colors are more uniform and the unsuspected eye is not immediately drawn towards the trouble area :slightly_smiling_face:

1 Like

Once again, many thanks to all you good people for your help and quick response :clap:

/me mumbles something about the horizon not being straight

I fine tuned the horizon level in RT where the photo is displayed in much larger size but I must admit that it seems a bit off in smaller scale now that you mentioned it :face_with_raised_eyebrow:

I had to use Nikkon’s kit lens at its 55mm setting to achieve a “suck in” effect and maybe there is also some natural (or not) distortion to blame too?

By the way this is the waterfront of my city Thessaloniki, Greece with the opera house on the left and Mt. Olympus in the distance :sunglasses:

Where all the mess, we are living in, has started. Sayin hello to Athena!

Isn’t Greece part of Europe? :grin:

I wanted to show you how to remove the stray light manually using a paint brush:
https://filebin.net/4tikj4g342sqpvl1/gimp1.mp4

You simply pick a nearby correctly-colored patch using the color picker (keyboard shortcut “o”, or “shift+o” to get the color picker overlay panel), then paint over the discolored part. In this case, the “Color (LCH)” paintbrush mode worked best.

The problem is clearly visible when you view the image in HSV mode. The video demonstrates comparing the hue and saturation layers before and after the fix.

The stray light affects dark areas of the image. While dark areas are clear on a well calibrated screen, I’m recording a screencast which will be viewed on a wide variety of display devices - probably on mis/uncalibrated screens, smartphones, etc. I can no longer be sure that the problematic part of the image will be visible on these screens, since the problem lies in the shadows. How then do I make the problem, and the fix, clear on these unknown devices? GIMP lacks adjustment layers, but we can still make the preview temporarily brighter by creating a new white layer and setting its blending mode to “value”. That’s what I did in the video, and now the discolored purple part stands out very clearly.
https://filebin.net/4tikj4g342sqpvl1/gimp2.mp4

7 Likes

In some ways, Europe might be a part of Greece. Although the main problem, Monstroteratum furiosum, originates from Africa.
Morgan has made a serious contribution, so I will stop spamming the thread.

That’s the neatest way to deal with it so far! Thanks @Morgan_Hardwood for that. :slightly_smiling_face:

Greece is one of the oldest EU members since the '80s and also Europe is a greek word, as is Alexander, Olympus and Macedonia NOT to be confused with FYROM, a circus state of Slavs and Albanians trying to appropriate greek history, names and symbols :wink:

Thank you for your response! Very well laid out info :slight_smile:

I moved this thread to the Software > GIMP category, and tagged it as a tutorial. The techniques here are easy and very useful, applicable to many photos and situations, they are things all FLOSS photographers should know. Is there a more prominent place where such tutorials can be placed? Front page wiki?

@patdavid I couldn’t upload my videos directly so they’re linked from filebin. They will expire in 2 months, would be good to move them somewhere more permanent. I can sort out my youtube situation if they can’t be uploaded directly to the forum.

I don’t have videos currently set to upload directly to the forum, mostly due to size/xfer constraints. I’d defer to using something like YouTube if at all possible (or Vimeo), and letting the onebox embed the video (just paste the YouTube link on a line of it’s own).

This also means YouTube managers on the pixls.us google account can sort and categorize videos on the YouTube channel as well.

1 Like