If you'd like to upload plug-ins, please create an account below. Otherwise (e.g. for download or commenting) you do not need one! Enjoy :-)
I've been trying to use Paul Harrison's "Resynthesizer" plug-in and script, and it seems that since it was created and now (GIMP 2.4.6) something has changed, and the script seems to be broken. I don't know enough script/fu to debug it (yet?), but what it looks like it's doing is filling the target area with a texture synthesized from the very top of the image, which in my photos is usually sky. I achieved a very amusing demonstration of this by first inverting (top for bottom) the image, then applying the script to the same patch, and it was filled with the wooden deck that used to be at the bottom but is now at the top.
I'm actually trying to do useful work with this (create images of people for a borchure) by removing things like power lines from backgrounds. I know I can "clone" and "heal", but it (for my skill level) looks funky when I use them.
I think the actual texture synthesizer (version 0.13b) still works, but I'm guessing there is something funny in the scripts.
Any script gurus here who can look?
Thanks & happy trails,
Stuart
plugin resynthesizer bug
The script calls the plugin. It strikes me that the plug-in itself is broken, not the script. (the script is in one language, Scheme, the plugin is in another language, C, towards the bottom of the script is the call to the plugin.) You can call the plugin more or less directly using Filters/Map/Resynthesize. I'm not sure, but that seems to be broken too, not just Filters/Enhance/SmartRemoveSelection and so forth.
It strikes me that it might be the change to Gimp around selection that is affecting Resynthesize. It seems like when you select, it is different than it used to be in Gimp. I'm a new Gimp user, I don't understand how it used to be and how it is now, I'm still feeling it out. Something about: selection creates a mask, and copy just copies the mask, not the image. Copy Visible does something else. Anyway, it strikes me that this change might have affected plugins like Resynthesize that read the current selection. Maybe there is a workaround.
I'm looking at the code, no promises.
Someone could report this bug to Ubuntu, it doesn't seem to have been reported there.
Has anyone fixed the error problem yet?
I am trying to get this to work with the newest gimp but no avail.
update to resynthesize possible bug
I've been playing with it.
Resynthesizer doesn't always seem to work as expected. I tried it on some examples posted to the web (the donkey picture from another texture synthesizer paper) and resynthesizer worked as advertised.
But it still is not working as I expect. I am working with grayscale, 2000 pixel square image from an old ink stippled art. I use the plugin directly (not via scripts, ie using Filter>Map>Resynthesizer. It produces what is described elsewhere in this thread: replaces the selection with mostly white. I tried futzing with the parameters, to no avail. I am selecting a small horse within a small homogeneous image of a pasture. I would have expected it to sample or clone the neighborhood, the pasture around the horse, but it seems to sample the whole image, which includes many other textures.
The algorithm as I understand it so far looks for a best match in the whole image. It has a limit on how many matching attempts it makes. Maybe there are too many good matches in a grayscale, or maybe the image is so large that it doesn't find a good match within the limit. Maybe it starts looking in the upper left, and the best match comes from the white sky until the limit is reached.
It could be just a limitation of the plugin, a special case that it was not designed to handle (it seems like other texture synthesizers wrestle with special case images.) Or it could be user error, ie not understanding how to set the controls (or whether the script sets the parameters for this case better.) Or it could be a bug.
butch
plashless, off banks of noon
Fixed smart-remove.scm see Heal selection
Uploaded a fixed script today. See the "Heal selection" script thread.
plashless, off banks of noon
update to resynthesize possible bug
"I am working with grayscale, 2000 pixel square "
Depend what you mean for "Grayscale"
If the image is in Grayscale IMAGE MODE most Gimp plugin will not work at all..but some may try to work with delusive results
But is easy to solve :
Image/Image mode/RGB
, this will not change the look of the image in any way, but will allow the Gimp plugin to work as they should.
(of course if your image looked as a greyscale but was already in RGB mode problem is somewhere else...but check it !! )
Resynthesizer Just Adds the Blue Sky When Used
Same here. I have no computer programming background, so the script of smart-remove.scm is confusing to me.
Anyways, here is the script based on WordPad.
; Smart Remove
; Smart selection eraser.
; Requires resynthesizer plug-in.
; Paul Harrison (pfh@logarithmic.net)
(define (script-fu-smart-remove img layer corpus-border)
(cond
((= 0 (car (gimp-selection-bounds img)))
(gimp-message "To use this script-fu, first select the region you wish to remove.")
)
(#t (let*
(
(width (car (gimp-drawable-width layer)))
(height (car (gimp-drawable-height layer)))
(dupe (car (gimp-image-duplicate img)))
(channel (car (gimp-selection-save dupe)))
)
(gimp-selection-grow dupe corpus-border)
(gimp-selection-invert dupe)
(let*
(
(old-background (car (gimp-context-get-background)))
(channel2 (car (gimp-selection-save dupe)))
)
(gimp-selection-load channel)
(gimp-context-set-background '(255 255 255))
(gimp-edit-clear channel2)
(gimp-context-set-background old-background)
(gimp-selection-load channel2)
)
(gimp-selection-invert dupe)
(let*
(
(bounds (gimp-selection-bounds dupe))
(x1 (nth 1 bounds))
(y1 (nth 2 bounds))
(x2 (nth 3 bounds))
(y2 (nth 4 bounds))
)
(gimp-image-crop dupe (- x2 x1) (- y2 y1) x1 y1)
)
(gimp-selection-invert dupe)
(plug-in-resynthesizer
1
img
layer
0
0
1
layer ;hmm, seems to work, was (car (gimp-image-get-active-layer dupe))
-1
-1
0.0 0.117 16 500)
(gimp-image-delete dupe)
(gimp-displays-flush)
) ) ))
(script-fu-register "script-fu-smart-remove"
"/Filters/Enhance/Smart remove selection..."
"Remove an object from an image by extending surrounding texture to cover it.
Requires resynthesizer plug-in."
"Paul Harrison (pfh@logarithmic.net)"
"Paul Harrison"
"13/9/2000"
"RGB* GRAY*"
SF-IMAGE "Input Image" 0
SF-DRAWABLE "Input Layer" 0
SF-ADJUSTMENT "Radius to take texture from" '(100 7 1000 1.0 1.0 0 1)
)
Hopefully someone knows how to decipher this and to solve this problem
Resynthesizer
sure that cannot work.
That is badly reformatted :with a line as
"layer ;hmm, seems to work, was (car (gimp-image-get-active-layer dupe))" no script may work.
should be
layer
;hmm, seems to work, was (car (gimp-image-get-active-layer ;dupe))
that after ";" is not code but a comment and the ";" should be at beginning of the line
So please do not use Word or similar to copy and paste script but only the Notepad...better Notepad+ because even the Windows notepad sometimes break the lines
; comment in resynthesizer script
PhotoComix,
Respectfully, I think you are mistaken.
That is a comment, and in the Scheme language in which gimp plugin scripts are written, comments can begin in the middle of a line.
Also, the script as posted appears to match what is distributed, I don't think it was altered by the posting. (It didn't need to be posted, anyone interested in fixing it would know where to find the script. Likewise my quibbling shouldn't be posted.)
butch
plashless, off banks of noon
; comment in resynthesizer script
I know that was a comment i will be not so sure that comments may be inserted in the middle of a line.
Maybe that is compatible with Scheme in general but not with the Script Fu implementation .
But on this point i hope somebody more competent may clear the doubt
Resynthesizer
I believe there is much confusion about the plugin and the scripts.
Resynthesizer is a plugin, i fear no more maintained and that is a pity, but should still work on gimp 2.6.
Then there are 2 scripts,as that you posted
obviously they strictly need the Resynthesizer plugin installed or they will never work... (a script can't contain a plugin only call it.)
Then is quite possible that the 2 script need a update to work with Gimp 2.6...
i believe 1 was already updated by FX Foundry (please use site search to find Fx-Foundry) so you may try to ask them to update also the other (if not yet updated)
I am almost sure that 1 was updated by FX Foundry because then i found weird see included in a script pack a script that was not self-standing but that instead require a 3d party plugin to work
RESYNTHESIZER PROBLEM
I'm using GIMP 2.4.7 with Windows Vista... I installeed resynthesizer, made a selection to remove/replace on my photo and used resynthesize (Filters-Map-Resynthesize) but all it did was cut out the selection and left the white background?? I tried adjusting the settings in the dialog, but you can't change imagename/background ouput. Any Suggestions??
White background
Hi dHenbery:
Yeah, for me the white turned out to be copied from the strip of sky at the top of my image - try an image with something else at the top and see if it changes.
Happy trails,
Stuart
Resynthesizer
the script included were 2, if i 'm not wrong 1 just doesn't work anymore and issue a error message, you mean here that the other do no give error messages but weird results?
maybe if you copy the scripts (and error messages if any), upload a sample that illustrate the mistake and post everything on the gimpuser mail list or on http://www.gimptalk.com/forum/gimp-plugins,-filters,-and-scripts-f9.html, you will get better chance to find somebody willing to fix it
workinngggg ura. coool. me
workinngggg ura. coool. me happy.


error message
2.6.1 under ubuntu generates the error message:
"Error: eval: unbound variable: plug-in resynthesizer"
I don't know anything about scripting...but I sure wish this still worked...
error message
You have a SCRIPT that require a extra plugin , resyntetizer
Do you have also that PLUGIN ?