Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Technique for removing overhead cables from images
#1
To remove overhead cables in an image in Photoshop, I use the path and spot healing tools with following process, which is easy and accurate:
- create a new path from the paths panel
- draw a path over one of the cables with the pen tool
- with the new path layer selected open the spot healing brush, setting a suitable width, 0% hardness and set the ‘proximity match ‘ option on
- select the stroke path icon; a healing brush stroke appears on top of the path; PS analyses and then removes the stroke and heals the underlying image
- delete the path

Can a similar procedure be used in GIMP? If not what is the most effective way of editing out such cables in the image?
Reply
#2
This is a bit short since I am packing in for the day.

Two ways that I use.
(1) Using resynthesizer / heal plugins
Make a selection along the wire using the quick-mask tool and a white brush
Apply heal selection.
(2) Use the gmic plugin http://www.gmic.eu and one of the inpaint filters. Paint in 100% red using the pencil tool If a big image isolate with a selection. Apply inpaint.

examples https://i.imgur.com/Tgpl2O7.mp4

For Gimp 2.10 there is a resynthesizer plugin (get the partha version) here: https://www.gimp-forum.net/Thread-Resynt...7#pid12687

For Gimp 3.0 see: https://gimpchat.com/viewtopic.php?f=7&t=21535#p297067

-----
For Gimp 2.10 there was a plugin that works as you described, using the resynthesizer plugin and a path. Not sure it works anymore.
Reply
#3
(06-22-2025, 09:01 PM)bogaty2005 Wrote: To trochę za krótko, bo pakuję się na cały dzień.

Dwa sposoby, których używam.  
(1) Używanie wtyczek resynthesizer/heal
Dokonaj zaznaczenia wzdłuż przewodu za pomocą narzędzia quick-mask i białego pędzla
Zastosuj zaznaczenie heal.  
(2) Użyj wtyczki gmic http://www.gmic.eu i jednego z filtrów inpaint. Maluj w 100% na czerwono za pomocą narzędzia ołówka Jeśli duży obraz jest wyizolowany za pomocą zaznaczenia. Zastosuj inpaint.

przykłady https://i.imgur.com/Tgpl2O7.mp4

Dla Gimpa 2.10 jest wtyczka resynthesizer (pobierz wersję partha) tutaj: https://www.gimp-forum.net/Thread-Resynt...7#pid12687

Dla Gimpa 3.0 zobacz: https://gimpchat.com/viewtopic.php?f=7&t=21535#p297067

-----
Dla Gimpa 2.10 była wtyczka, która działała tak, jak opisałeś, używając wtyczki resynthesizer i ścieżki. Nie jestem pewien, czy nadal działa.
https://www.vicanek.de/imageprocessing/wireworm.htm

You can also use the one that works in GIMP 2.10

resynth_along_path.scm
I use it sometimes
Reply
#4
(06-22-2025, 09:01 PM)rich2005 Wrote: This is a bit short since I am packing in for the day.

Thanks for replying so promptly and so late - this is beyond my expectations in both respects.

You've been the important person on this forum for a long time, so you must have experienced a lot of dumb, and dumber, comments and questions. Forgive me, but I'm dumb, too:

- the useful links you have given me point to 'stuff' that's applicable to Windows. I do have that OS, but my primary desktop is a Linux based one. Are there equivalent links for resynthesizer for Linux?

- the link to the 'how to' mp4 you gave is most useful. Running it in VLC allows me to follow it closely and in detail. When I do so (under Linux) in GIMP 3.0.4 (a .deb AppImage version to which you kindly provided a link) and click on the final 'ok' in G'MIC repair/in-paint no processing takes place: I'm just left with my image and the lasso selection around the painted-over wires. Obviously it's a user error; from my description could you possibly suggest what it is that I am going wrong?
Reply
#5
(Yesterday, 11:30 AM)LateJunction Wrote: ...snip...
- the useful links you have given me point to 'stuff' that's applicable to Windows. I do have that OS, but my primary desktop is a Linux based one. Are there equivalent links for resynthesizer for Linux?

It depends on the linux you are using. Which one is it ?

If you can get this one to work https://www.gimp-forum.net/Thread-Gimp-3...9#pid44349 then it includes resynthesizer and the gmic plugins Otherwise you need a regular installation with a libgimp-dev to compile it.

Quote:- the link to the 'how to' mp4 you gave is most useful. Running it in VLC allows me to follow it closely and in detail. When I do so (under Linux) in GIMP 3.0.4 (a .deb AppImage version to which you kindly provided a link) and click on the final 'ok' in G'MIC repair/in-paint no processing takes place: I'm just left with my image and the lasso selection around the painted-over wires. Obviously it's a user error; from my description could you possibly suggest what it is that I am going wrong?

I put in the selection because for a large image the plugin takes forever. Was the selection inverted perhaps and selected everything except the wires ? Worth a check.

You do need pure red (R=100 % G=0 B=0 ) for the mask, a bit off and the plugin does not work. Use the pencil tool so there is no anti-aliasing which leaves a border.

If having trouble, make a smaller crop around some wires and try without making a selection, as a trial. Try using some of the other inpaint filters, some work better than others.
Reply
#6
(Yesterday, 11:49 AM)rich2005 Wrote:
(Yesterday, 11:30 AM)LateJunction Wrote: ...snip...
- the useful links you have given me point to 'stuff' that's applicable to Windows. I do have that OS, but my primary desktop is a Linux based one. Are there equivalent links for resynthesizer for Linux?

It depends on the linux you are using.  Which one is it ?

If you can get this one to work https://www.gimp-forum.net/Thread-Gimp-3...9#pid44349 then it includes resynthesizer and the gmic plugins  Otherwise you need a regular installation with a libgimp-dev to compile it.  

Quote:- the link to the 'how to' mp4 you gave is most useful. Running it in VLC allows me to follow it closely and in detail. When I do so (under Linux) in GIMP 3.0.4 (a .deb AppImage version to which you kindly provided a link) and click on the final 'ok' in G'MIC repair/in-paint no processing takes place: I'm just left with my image and the lasso selection around the painted-over wires. Obviously it's a user error; from my description could you possibly suggest what it is that I am going wrong?

I put in the selection because for a large image the plugin takes forever.  Was the selection inverted  perhaps and selected everything except the wires ? Worth a check.

You do need pure red (R=100 % G=0 B=0 )  for the mask, a bit off and the plugin does not work. Use the pencil tool  so there is no anti-aliasing which leaves a border.  

If having trouble,  make a smaller crop around some wires and try without making a selection,  as a trial.  Try using some of the other inpaint filters, some work better than others.

You identified the problem exactly - thank you:

- My 'red' was a little bit off.
- The selection was inverted (not easy to spot in GIMP) even though I was sure that I had corrected it (in fact I had inverted it).

Having corrected these errors, the technique works fine and is a little easier/quicker to use than the method I have used in Photoshop. Obviously there is a bit of messing about with the clone tool at the termination of overhead cables, where they run behind a part of a building, for example. Then, even with extreme care, there is some unintended 'healing' of the building edge.

And, as you suggested, the G'MIC plug-in doesn't need the creation of a selection with the lasso tool. The test images I tried were relatively small (40MB tiff) and I have a reasonable mid-range processor (9th gen i7) so the processing took less than a second or so without a selection.

So now, thanks to your guidance, I know how to process this common problem (overhead lines) in my images, in GIMP, allowing me to avoid using any Adobe products.
Reply
#7
Tested and  Resynthesize-along-a-path is still working on gimp 2.10.38, windows 10.  
https://www.gimp-forum.net/Thread-Resynt...ong-a-path
Reply
#8
The old RobA silent9.com site is gone, so I will add the script here.  It is for Gimp 2.10 I did have a look at a re-write for Gimp 3 but fell at the first hurdle.


Attached Files
.zip   ra_resynth_along_path.zip (Size: 2.61 KB / Downloads: 0)
Reply


Forum Jump: