Texturesynthesis using Image Quilting

I just finished implementing my personal version of Efros’ and Freemans Image Quilting Algorithm:

http://cylab.codewut.de/imagequilting/quiltershot.jpg

If you are interested, you can lauch the tool here.
CAUTION: Low values for Step Width can cause (very) long generation times or OutOfMemory Errors - but might achieve the best result images :wink:

Source code will follow as soon as I cleaned it up a bit.
Please report bugs and platform specs.

On Mac 10.5, the JNLP fails with this stack trace:

java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at com.sun.javaws.Launcher.executeApplication(Launcher.java:1332)
	at com.sun.javaws.Launcher.executeMainClass(Launcher.java:1270)
	at com.sun.javaws.Launcher.doLaunchApp(Launcher.java:1117)
	at com.sun.javaws.Launcher.run(Launcher.java:105)
	at java.lang.Thread.run(Thread.java:613)
Caused by: java.lang.NoClassDefFoundError: javax/swing/GroupLayout$Group
	at net.highteq.imagequilting.Main.main(Main.java:28)
	... 9 more

It looks cool, though, from the screenshot.

Damn. GroupLayout is Java 6 only :confused: I’ll change the layout as soon as possible.

love it! thanks alot ::slight_smile:

:slight_smile:

Please try again. I replaced GroupLayout with GridBagLayout.

… but, just saying:

what 'bout recreating “tiling” done one one image, exactly in the same way on another image (same sized) ?

… something like …

  • image 1 is a small brick texture as you can see in the first attachment

  • result is just perfect sized up image

  • image 2 is a normal map matching the first image … just like the one in the 2nd attachment

  • redoing tiling will create a not so good fitting big normal map since it has different color information. obvious.

so, what about redoing the first composition just in the same way on another image?

would boost the productivity.

(images are taken from opengl shader designer http://www.typhoonlabs.com/)

Yes, you are right. I already thought about exportable distribution maps, so I can do the actual image composition in a shader. So if I just hold this distribution map in memory and add another button to generate an image without analysing, this should be done already.

There is no need to replace it, if using NetBeans (as you presumably do) just set “Layout Generation Style” to “Swing Layout Extension Library” in form properties or in global settings (applies to newly created forms). NetBeans will then automatically add the required library to your application.

Thanks for the hint, but already changed it. Actually I find GroupLayout unnerving most of the times. I just used it, because I thought, it would be quicker (but wasn’t!!!) :wink: GridBagLayout is so much more predictable…

It didn’t work. I still get the same exception complaining about GroupLayout. I used the same link in the first post.

Sorry, I forgot the darn ProgressBar dialog… Please try again (should launch V1.0.3 or you have to clear your webstart cache)

I cleared my cache and re-ran it. I think I’m cursed, since I got this exception:

java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at com.sun.javaws.Launcher.executeApplication(Launcher.java:1332)
	at com.sun.javaws.Launcher.executeMainClass(Launcher.java:1270)
	at com.sun.javaws.Launcher.doLaunchApp(Launcher.java:1117)
	at com.sun.javaws.Launcher.run(Launcher.java:105)
	at java.lang.Thread.run(Thread.java:613)
Caused by: java.lang.NoSuchMethodError: javax.swing.JButton.setHideActionText(Z)V
	at net.highteq.imagequilting.MainWindow.initComponents(MainWindow.java:916)
	at net.highteq.imagequilting.MainWindow.<init>(MainWindow.java:135)
	at net.highteq.imagequilting.Main.main(Main.java:28)
	... 9 more

You don’t have to fix it if you don’t want to, but I’ll let you know anyway.

we really need a java6 emulator for the mac folks ;). Its really a pain in the ass to stay backwards compatible on the desktop :confused:

Thank you very much for testing it. I’ve uploaded version 1.0.4, which should (hopefully) be fixed now.

It works now! Hurrah, and is definitely fun to play with.

I actually have Java 1.6, which I use for development; JWS just insists on using 1.5 and I haven’t bothered hacking the folder structure to get it to use something else :-\

Made an update:

  • Version 1.1 :slight_smile:
  • Performance enhancements
  • Memory consumption fixes - should be hard to run out of memory now
    (depends on the result size now, not the stepwidth anymore)
  • Adjustable patch gathering tolerance
  • Cached distribution maps to quilt multiple (same sized) images in the same way
    (you should disable blending for normal maps, though)

Enjoy and launch it here

Definitely seems faster, so bravo! There is a bug where selecting a blend option, or checking on of the tweak options (cut, patch, diff) cause it to start generating the image.

Actually this was on purpose, since the options work with an already generated distribution map, so won’t take much time. It might be irritating though, that they also trigger a full regeneration if some other options where changed, too… i’ll think about it.

I know this is an older thread, but this app is great.

I was wondering is it possible to implement seamless images?
so that the patches along the sides are halved and linked with the patch on the other side.