Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Remove eyeglass distortion
#1
I am a newbie with GIMP 2.10.12
I am trying to remove the distortion introduced by glasses
I have come across this tutorial for photoshop
Basically the way I understand it:
1. Load image on layer 1
2. Select area inside eyeglass
3. Paste in new layer 2
4. Add layer mask to layer 2
5. Stretch image on layer 2. Layer mask should "restrict" the visible area to the original glass area

Well I am not getting it to work. Sorry I am pretty sure this is basic
When I stretch the image the layer mask is not covering anything. Appreciate any assistance...


Attached Files Image(s)
   
Reply
#2
Gimp works in different ways to PS. You need to know Gimp first. 
Amazing how many googleimages with glasses have no distortion Wink I found this one. The procedure might be.

   

1. Duplicate the layer. Menu  Layer -> Duplicate Layer Duplicated layer becomes active.
2. Make a selection of the area for correction. Free selection tool works. (I used a path here then path-to-selection, easier to see for an example) Consider how much to select, it might not be the whole lens.
3. Turn the selection to a layer mask. Layer -> Mask -> Add layer mask  There is an option in the dialogue for selection, enable that and click Add.
4. That gets a black layer mask, with a white area. Black is fully transparent  white is fully opaque. Click on the image icon to make it active. White border is active.

   

5. Now use the Warp tool and click drag to pull the area inside the lens to suit. Make a mistake Ctrl-Z (back-off) is your friend.
6. Save your image as a Gimp .xcf and layers / mask / selections are all saved in the image file Otherwise Export as a png or jpeg for a flattened (one layer) image.

Note: You can apply the correction directly one-layer and an active selection. However it is good practice to use a layer mask which is non-destructive (to one of the layers) Easy to fix mistakes at a later date.
Reply
#3
Thanks for the explanation!
What I struggle with is using the warp tool without distorting the image. It basically makes a big mess
Isnt there a way to select a square area and drag the corner to proportionally enlarge the image?
Reply
#4
(11-16-2019, 05:50 PM)garce Wrote: Thanks for the explanation!
What I struggle with is using the warp tool without distorting the image. It basically makes a big mess
Isnt there a way to select a square area and drag the corner to proportionally enlarge the image?

This would be the "Cage transform" tool.
Reply
#5
Quote: It basically makes a big mess
Isnt there a way to select a square area and drag the corner to proportionally enlarge the image?

You need to use a large brush. However, using cage transform equally easy, even easier a quick-n-dirty one layer, one selection fix.





direct link https://youtu.be/ec67L6r-Hk8 duration 1 min 40 seconds.
Reply
#6
(11-16-2019, 06:58 PM)rich2005 Wrote:
Quote: It basically makes a big mess
Isnt there a way to select a square area and drag the corner to proportionally enlarge the image?

You need to use a large brush. However, using cage transform equally easy, even easier a quick-n-dirty one layer, one selection fix.

direct link https://youtu.be/ec67L6r-Hk8 duration 1 min 40 seconds.

** Applause ***
Reply
#7
Thanks for the video. One thing to note, I have a high index lenses so the distortion is bigger than the sample... Maybe makes it harder to use the transform
I was able to use the scale tool
What I do is (step 5 ->):
5. Select scale tool (two icons left to warp tool, it has a small rectangle and a big one). Click on the eye area and a rectangle will appear. Click on a corner (lower side) and drag until you get proper sizing. Then on the dialogue box click scale and the scaled image will be visible only through the mask.
6. Anchor the floating layer: on the area below the layers click little anchor icon
7. Save, etc

Good way to start using GIMP for me Smile (never used any graphics editor before - other than basic irfanview stuff)
Reply


Forum Jump: