You are here

Resynthesizer Strangeness

I'm tearing my hair out. I've used resynthesizer in the manual filters->map mode many times, but go for long periods of time between needing to use it. In the past, sometimes I can get it to work, but I have problems getting it to work with. I've gone back and forth between creating a new pictures for the selected input, and also using a layer in the same photo. Either seem to work at times, almost like it's random, which I'm sure it's not. When it works, it works fabulous, otherwise I can kill hours trying to find the right combination of selections and layers until something MIGHT eventually work. Right now I'm giving up for the time being. This is important as I have a client waiting for a photo to be post-processed. There are some online tutorials, but none of them work exactly as advertised.

Can anyone with experience solving this problem help?



If you describe exactly what you want to do and download a test image, I might be able to help.

I don't have a good conceptual model of the Filter>Map>Resynthesize functions. The tutorials show it doing many things, depending on the input. For example "applying texture" if the input map is a grayscale of the source image (this is just off the top of my head, not to be relied on, just an example.) I think the separate (in terms of the user's conceptual model) functions might deserve their own GUI, so you don't have to think so much about the inputs.

Thus, I can't give a simple explanation of all the functions, and I suspect few people can. But maybe we can help with a specific use.

Do you mean the tutorials don't work when you use the images from the tutorials, or when you apply the technique to your images?

OK, I want to remove a selection of a photo and replace it from a sample from the same photo. This is demonstrated in the tutorial at:

I have gotten it to work before, but it doesn't work exactly as presented, probably a version change thing. I know I've experimented with where the layers exist (in a new photo, or as a temp layer in the same photo).

Am I allowed to post a photo here for demonstration purposes?

You have to host it yourself, though. (Provide an URL) Photos cannot be uploaded to the registry itself.

OK, didn't think I could post it here. I'll look for a place.

If you just want to replace a selection with its immediate surroundings, it is easier to use Filter>Enhance>Heal selection than to use Filter>Map>Resynthesize. But as you might have discovered, for some cases, for example near the edge of the image or if the selection does not have homogenous surroundings (eg a discontinuity, horizon, edge etc.) then the results might not be satisfactory. Only then would I use Filter>Map>Resynthesize, which additionally lets you choose a layer (that is remote from the surroundings of the selection you are trying to fix or heal) as the source of the texture.

Note that there IS a bug in the original Filter>Enhance>Smart remove selection, which was fixed and renamed to Filter>Enhance>Heal selection. See the Gimp Registry.

I don't think the bug in Filter>Enhance>Smart remove selection should affect Filter>Map>Resynthesize, since the bug was in a script separate from Filter>Map>Resynthesize (a GUI and engine all in one plugin, written in C, not a script.)

Again, does the demo you linked to not work for you, or just not work on your image? Also, the demo you linked to has two parts, only the second part uses a separate layer. Which one doesn't work for you?

Sorry, but you should be very specific and detailed. If its just a misunderstanding on your part, we can't help unless we know what you are thinking and anticipating. If it is a bug, we need to reproduce the problem.

The heal function won't work, partly for the reason you mentioned. The area to be replaced is both near the border and other areas that I don't want to be included into the replaced area. I need to work from a sample, or copied area/layer.

As I have stated, it has worked for me in the past, but I have usually had great difficulty finding the right way to copy/paste/create new photo to get it to work. I don't think it's a bug. I think it's a documentation problem.

I just want to EXACTLY what the author of the tutorial in the "MOON" example did for the last edit to the photo at the URL listed in my previous post did. The instructions seem to be missing a step, or I am not following them correctly.

As far as more details, I don't know how to be more helpful. I always hated supporting people that would only say "it just doesn't work," but that really is what's happening. I get no feedback from the plugin, it runs and there is no change to the photo.


OK I tried that resynthesizer demo (not exactly like the demo, I omitted the first several fixes to the image and skipped to the last fix starting with a rotation) both with separate layers and separate images as the source texture.

I was able to reproduce your symptoms (plugin finishes quietly but with no changes to the image) WHEN the target layer (the one you want the changes to be in) was not the active layer. Could that be it? I am not sure this happens if you follow the demo exactly, but can happen if you futz with layers. (And you can't follow the demo exactly, it is outdated and not rigorous.)

If you don't think that is the problem, maybe I will keep looking. I did see one other instance of the problem, but I was not being methodical enough to know exactly what I had done, and couldn't reproduce it.

I agree that is frustrating. I think the plugin should be more user friendly and warn you that zero pixels were changed.

I have a fuzzy recollection that this is a common occurrence in Gimp: if the intended layer is not active, the results can be confusing.

I also saw some strangeness when the Quick Mask was on: the other layer didn't appear in the plugin's pulldown selection widget like I thought it should. Unrelated I think. (Was the Quick Mask the active layer? I am not a Gimp expert.)

Note the other (source) layer MUST have the same number of channels (an alpha channel for example) as the target layer does. But I think the plugin warns about that, after you've already chosen a mismatched layer. I wouldn't expect the plugin's pulldown selection widget to include an other layer that didn't have the same number of channels. And I might have seen some strangeness here also, but again, not methodical enough in my testing.

I've futzed with layers a lot, especially on which is active. It doesn't seem to make a difference, except I do get an error on channels sometimes with the new layer. I sometimes get an error on the size of the selection being too small also, but haven't been able to pinpoint what that's about.

I am hvaing two problem on two different MacBooks.

1 - I can copy a selection for the source texture, but adding it as a new layer GIMP seems to not be using the copied image, but other image data that happened to be on the clipboard from my Photoshop session. Very weird.

2 - On laptop #2 the problem I am having is that even though I copy a selection for the source texture to a new layer, the layer name stays at 'clipboard'. I click on the background, and when I launch resynthesizer it doesn't see the new layer as a source. If I select the new layer it sees itself but of course the resynth is not very good.



since I installed a new copy of Ubuntu, then GIMP then resynthesizer.

Same not recognising layers problem

I had better success with version .13b in Windows, not sure if that will be the same for Linux versions.

I think I found the combination that I found before I lost all my notes when my system / hard drives crashed.

1. Select a RECTANGULAR area you want to take the sample from. This is NOT the texture source sample and my notes do not cover textures.

2. "edit->copy"

3. "edit->paste as->new image"

4. Switch to the new image.

5. Go to the layers window

6. Remove the alpha layer - The critical piece

7. Go back to the image you are editing. Select a target area you want to fill with the sample from step 1.

8. Now "filters->map->resynthesize" should allow you to select the newly created source image.

This works on SuSE Linux 11.1 with resynthesize v. 0.16-1.2

Just used your instructions with an image and was very very impressed. Just saved the information to a text file and stored it in the plug-ins folder to remind me when I need it again. Thanks Jim!

OK, here's what I did. For me it seems that the plugin doesn't like the whole background image thing.

I selected the texture source and pasted that as a new layer, its called clipboard.

Then I selected a part of the background and pasted into a new layer. Its called clipboard#1.

Then I went to layer clipboard#1 and used the lassoo tool to select the area I need to resynthesize.

Hey presto!

OK, here's what I did. For me it seems that the plugin doesn't like the whole background image thing.

I selected the texture source and pasted that as a new layer, its called clipboard.

Then I selected a part of the background and pasted into a new layer. Its called clipboard#1.

Then I went to layer clipboard#1 and used the lassoo tool to select the area I need to resynthesize.

Hey presto!

Subscribe to Comments for "Resynthesizer Strangeness"