Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Resynthisizer Heal Selection Runtime Error
#1
I'm using GIMP 2.10.8 (updated because of this issue) on Windows 10 Home Edition, with the 64-bit version of the Resynthesizer plugins/execs. I've used this plugin very frequently in the past with GIMP 2.8.x for fixing damaged BW images (family photos from the 50s/60s). My normal process for these RGB, 16-bit grayscale images is to:
  1. use Wavelet Decompose to create detail layers
  2. dup a detail layer
  3. use Levels to enhance the damage on the dupped layer
  4. paint over the damage on the dupped layer with color X
  5. select by color X
  6. click on the original detail layer so selection applies to it
  7. run Heal Selection.
Now when I do this the Heal Selection process throws an error (see attached image): "RuntimeError: The texture source is empty. Does any selection include non-transparent pixels?"
I dimly recall having an issue like this in the past. I definitely have the right layer selected and so far as I know (!) there are only non-transparent pixels in the select. The layer after decomposition is done is in mode Grain Merge. That was in the past no issue.

Anyone with any ideas? I'm stumped.


Attached Files Thumbnail(s)
   
Reply
#2
Nothing really wrong with your workflow (except you should look at painting in a selection using quickmask) and I can get your procedure to work without error.

That error message indicates an incorrect selection, difficult to say from your partial screenshot. This example trying to resynth in from surrounding transparency. https://i.imgur.com/X6ELlau.jpg

There are selections showing, that do not come from your painted-in mask

[Image: 0heCxCO.jpg]

First thing I would do is go back and check that selection.

Just for info: What version of wavelet decompose are you using? Does not quite look like the Gimp 2.10 version that I have in 2.10.8
Reply
#3
(12-20-2018, 02:56 PM)rich2005 Wrote: Nothing really wrong with your workflow (except you should look at painting in a selection using quickmask) and I can get your procedure to work without error.

That error message indicates an incorrect selection, difficult to say from your partial screenshot. This example trying to resynth in from surrounding transparency. https://i.imgur.com/X6ELlau.jpg

There are selections showing, that do not come from your painted-in mask

[Image: 0heCxCO.jpg]

First thing I would do is go back and check that selection.

Just for info: What version of wavelet decompose are you using? Does not quite look like the Gimp 2.10 version that I have in 2.10.8

rich2005 - Had hoped you'd be the person to respond. I apologize for leaving that layer visible in my screen cap. The layer with yellow on it is the layer from steps 2-5. I get the error doing step 6 after I've selected by color (clicking on the yellow of the dupped layer) then making the Scale layer active before running Heal Selection (which is supposed to run on the active layer unless something's changed).

I tried following my SOP on other images and they, too, result in this same error. I conclude perhaps my version, dated 10/17/2013 needs updating, especially given your comment. Do you have access to later executables of resynthesizer? I found my version from a post on this forum.

I tried to use G'MIC's InPaint (patch-based) but cannot replicated Pat Davids results from this tutorial no matter what I do.

https://patdavid.net/2014/02/getting-aro...nting.html
Reply
#4
rich2005 - FYI - the post from which I got the resynthesizer .zip file was your post: https://www.gimp-forum.net/Thread-Resynt...or-Windows
Reply
#5
I was wondering about the wavelet decompose version because of the layer naming - You have "layername"(scale #1) ..etc whereas my Gimp 2.10.8 produces a straight Scale 1 ...etc.

Resynthesizer has not changed much in 10 years, there is a slight tweak (edit: went from version 2.0.2 to 2.0.3) but you will need to compile a version for yourself, but that has nothing that impacts heal selection. The problem is not resynthesizer but your selection. Somewhere it is trying to pull in transparency which gives that error. It is actually difficult to get that error message. You need something like https://i.imgur.com/X6ELlau.jpg as before.

There is a update to the python plugins for Gimp 2.10 deprecated functions. Gimp normally works anyway using the old procedures but I will attach anyway. Replace what you have, see if it makes a difference.

Do you have heal transparency plugin installed? Try a heal transparency before heal selection.

I was going to suggest trying gmic inpaint as an alternative. If you use that, paint in the mask using the pencil tool. Any antialiasing in the mask produces a nasty outline.

If you want to post the full image as you have it, keep the active selection, it is saved with the .xcf file. Use maybe Dropbox and you might get a better answer. Not easy to comment on just your partial screenshot.
Reply
#6
rich2005 -- BINGO! You provided a possible clue -- when you said, in reference to using GMIC's InPaint, "if you use that, paint in the mask using the pencil tool ... any antialiasing in the mask ..." In the past I think I've always used the brush and not pencil when doing this, so I tried my SOP with pencil. I'll be honest that I'd not have thought this should change things since antialiasing does not use transparency, but I can't argue with results.

I copied the base layer into a new image, used *both* Wavelet Decompose and GMIC's Split Details (wavelet), which is where the layer naming you noticed comes from by the way (it does not create a layer group as the new 2.10.8 GIMIP Wavelet decompose does), and used Pencil to do the painting over the damage and now Heal Selection works on layers created by either method. And to see if the old image was amenable to this process I used pencil to do the painting on a layer in it and Heal Selection also works there. Curious, but as I said I cannot argue with success.

Now, I get a different issue, but that's for another day. For now I can continue my damage control.

A final question if I've not over-extended your generosity -- do you think the Heal Selection that comes with this version of Resythesizer capable of working correctly on 16-bit images?

Much thanks for your posts. I, for one, greatly appreciate it.
Reply
#7
Quote:..do you think the Heal Selection that comes with this version of Resythesizer capable of working correctly on 16-bit images?

Honestly I do not know. It does comment in the resynthesizer code "no less than 16-bit by C standard" So it might just work internally at 16 bit. I do know that gmic works internally at 32 bit floating point.

Subjectively Wink
From camera and a pair of RAW/jpeg. RAW into Gimp as 16 bit using Nufraw and jpeg 8 bit (as it is). Same selection/area/settings

Using resynthesizer/heal selection, the 16 bit image better result than the 8 bit.
Using inpaint (multi-scale) 16 bit better than 8 bit and generally inpaint better than resynthesizer.

However, all depends on the image and the eye-of-the-beholder.
Reply
#8
Thank you, sir! As I said, much appreciate your replies.
Reply
#9
(12-22-2018, 09:57 AM)rich2005 Wrote: I was wondering about the wavelet decompose version because of the layer naming - You have "layername"(scale #1) ..etc whereas my Gimp 2.10.8 produces a straight Scale 1 ...etc.

Resynthesizer has not changed much in 10 years, there is a slight tweak (edit: went from version 2.0.2 to 2.0.3) but you will need to compile a version for yourself, but that has nothing that impacts heal selection. The problem is not resynthesizer but your selection. Somewhere it is trying to pull in transparency which gives that error. It is actually difficult to get that error message. You need something like https://i.imgur.com/X6ELlau.jpg as before.

There is a update to the python plugins for Gimp 2.10 deprecated functions. Gimp normally works anyway using the old procedures but I will attach anyway. Replace what you have, see if it makes a difference.

Do you have heal transparency plugin installed? Try a heal transparency before heal selection.

I was going to suggest trying gmic inpaint as an alternative. If you use that, paint in the mask using the pencil tool. Any antialiasing in the mask produces a nasty outline.

If you want to post the full image as you have it, keep the active selection, it is saved with the .xcf file. Use maybe Dropbox and you might get a better answer. Not easy to comment on just your partial screenshot.

FYI - the .zip file you attached does not contain legit .py files with Python code -- their contents are .html files.
Reply
#10
Quote:FYI - the .zip file you attached does not contain legit .py files with Python code -- their contents are .html files.

Thank you. Yes, the files come from here: https://github.com/bootchk/resynthesizer...ginScripts and I did not follow along to the raw files.


A new zip attached:


Attached Files
.zip   update-plugin-heal-selection.py.zip (Size: 4.47 KB / Downloads: 509)
Reply


Forum Jump: