Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (489)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (555)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Texturesynthesis using Image Quilting  (Read 6972 times)
0 Members and 1 Guest are viewing this topic.
Offline cylab

JGO Ninja


Medals: 43



« Posted 2009-02-17 14:50:22 »

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



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.

Mathias - I Know What [you] Did Last Summer!
Offline lhkbob

JGO Knight


Medals: 32



« Reply #1 - Posted 2009-02-17 15:58:12 »

On Mac 10.5, the JNLP fails with this stack trace:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
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.

Offline cylab

JGO Ninja


Medals: 43



« Reply #2 - Posted 2009-02-17 16:04:58 »

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

Mathias - I Know What [you] Did Last Summer!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline basil_
« Reply #3 - Posted 2009-02-17 17:17:35 »

love it! thanks alot  Roll Eyes
Offline cylab

JGO Ninja


Medals: 43



« Reply #4 - Posted 2009-02-17 17:30:14 »

love it! thanks alot  Roll Eyes
Smiley

Mathias - I Know What [you] Did Last Summer!
Offline cylab

JGO Ninja


Medals: 43



« Reply #5 - Posted 2009-02-17 17:33:48 »

On Mac 10.5, the JNLP fails with this stack trace:
1  
2  
3  
Caused by: java.lang.NoClassDefFoundError: javax/swing/GroupLayout$Group
   at net.highteq.imagequilting.Main.main(Main.java:28)
   ... 9 more


Please try again. I replaced GroupLayout with GridBagLayout.

Mathias - I Know What [you] Did Last Summer!
Offline basil_
« Reply #6 - Posted 2009-02-17 17:42:07 »

.. 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/)
Offline cylab

JGO Ninja


Medals: 43



« Reply #7 - Posted 2009-02-17 17:50:35 »

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.

Mathias - I Know What [you] Did Last Summer!
Offline jezek2
« Reply #8 - Posted 2009-02-17 18:27:05 »

Please try again. I replaced GroupLayout with GridBagLayout.

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.
Offline cylab

JGO Ninja


Medals: 43



« Reply #9 - Posted 2009-02-17 19:00:41 »

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...

Mathias - I Know What [you] Did Last Summer!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline lhkbob

JGO Knight


Medals: 32



« Reply #10 - Posted 2009-02-19 00:02:12 »

Please try again. I replaced GroupLayout with GridBagLayout.

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

Offline cylab

JGO Ninja


Medals: 43



« Reply #11 - Posted 2009-02-19 01:00:07 »

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

Mathias - I Know What [you] Did Last Summer!
Offline lhkbob

JGO Knight


Medals: 32



« Reply #12 - Posted 2009-02-19 16:09:58 »

I cleared my cache and re-ran it.  I think I'm cursed, since I got this exception:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
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.

Offline bienator

Senior Member




OutOfCoffeeException


« Reply #13 - Posted 2009-02-19 16:36:39 »

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

Offline cylab

JGO Ninja


Medals: 43



« Reply #14 - Posted 2009-02-19 18:18:24 »

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

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

Mathias - I Know What [you] Did Last Summer!
Offline lhkbob

JGO Knight


Medals: 32



« Reply #15 - Posted 2009-02-20 01:09:47 »

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 Undecided

Offline cylab

JGO Ninja


Medals: 43



« Reply #16 - Posted 2009-02-23 00:46:29 »

Made an update:

- Version 1.1 Smiley
- 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

Mathias - I Know What [you] Did Last Summer!
Offline lhkbob

JGO Knight


Medals: 32



« Reply #17 - Posted 2009-02-23 05:05:42 »

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.

Offline cylab

JGO Ninja


Medals: 43



« Reply #18 - Posted 2009-02-23 09:37:59 »

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.

Mathias - I Know What [you] Did Last Summer!
Offline bobjob

JGO Knight


Medals: 10
Projects: 4


David Aaron Muhar


« Reply #19 - Posted 2009-04-28 01:26:46 »

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.

My Projects
Games, Webcam chat, Video screencast, PDF tools.

Javagaming.org with chat room
Offline ewjordan

Junior Member





« Reply #20 - Posted 2009-04-28 20:48:39 »

This is awesome, great work!

+1 on tile-friendly results, that would be fantastic.  Can't wait to see the source!
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Nickropheliac (9 views)
2014-08-31 22:59:12

TehJavaDev (23 views)
2014-08-28 18:26:30

CopyableCougar4 (27 views)
2014-08-22 19:31:30

atombrot (40 views)
2014-08-19 09:29:53

Tekkerue (38 views)
2014-08-16 06:45:27

Tekkerue (34 views)
2014-08-16 06:22:17

Tekkerue (24 views)
2014-08-16 06:20:21

Tekkerue (34 views)
2014-08-16 06:12:11

Rayexar (72 views)
2014-08-11 02:49:23

BurntPizza (47 views)
2014-08-09 21:09:32
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!