Tuesday, October 23, 2007

New Backend for the Seam Carving GUI

The original seam carving algorithm implementation that I based the Seam Carving GUI on was written as a quick and dirty project by Andy Owen. Andy has moved onto other things and I got an email from Brain_Recall (Joe) who was working on a more true to the paper implementation of the algorithm with his own optimizations (called CAIR). Joe’s work as really matured into some nice optimized, mutli-threaded code and produced much nicer results. Most noticeable is the resizing images to larger dimensions than the original.

So I modified the GUI to use CAIR (newest version on sf.net) and take advantage of its new features. I also threw in some itch features.

New features

  • Can set a quality parameter that gives you a quality/time tradeoff when resizing
  • View algorithm metrics on the image: grayscale, edge, and energy
  • Can specify weights (intensities) for retain/remove regions
  • 2-3X faster (especially on multi-core machines)
  • Undo/Repeat
Here is a screenshot of the GUI:



To give you an idea of the quality of CAIR, here are some more resized versions of the ball image.





Download Links:
Update: Sorry for all the mess with the Mac version. First I didn't bundle in Qt, then my upload continuously failed to the static Goggle Pages host.

Update: The new mac build should include JPEG support. Get it at the download page linked above.

13 comments:

iPivo said...

I just tried to use the MacOSX implementation of GUI and the application does not run, I'm using a MacBook with Tiger.

Since it is a binary file I assumed it would run after I copied to my application folder.

By the way, the link to the Mac implementation on the page is
~/SeamCarvingGui.
zip rather than
~/SeamCarvingGuiOSX.zip

Anyway, thanks for the Mac implementation, since I am barely compile anything I was anxiously waiting

Gabe said...

Hey ipivo, I'll look into this. I may have forgot to rebundle the QT libraries for redistribution into the application bundle.

Could you send me the Console output when you try to run it. There should be a Console application under Application->Utilities or something similar. Startup errors usually get spewed there.

iPivo said...

Hi gabe,
the Console Output reads:
dyld: Library not loaded: QtGui.framework/Versions/4/QtGui
Referenced from: /Applications/SeamCarvingGui.app/Contents…
…/MacOS/SeamCarvingGui
Reason: image not found
Oct 31 01:46:27 Gandalf crashdump[280]: SeamCarvingGui crashed
Oct 31 01:46:27 Gandalf crashdump[280]: crash report written to: /Users/Pivo/Library/Logs/CrashReporter/…
…SeamCarvingGui.crash.log


thanks for the patience.

Stoinov said...

hello gabe
I guess you know your GUI is great but I want to say it anyway.
I also want to ask if you're using the latest source from CAIR since your post is older than the latest source.

Anonymous said...

Gabe,

thanks for this, but when I try to run it in kubuntu gutsy 64 I ge tthe following error
/usr/share/qt3/bin/uic resizewidget.ui -o resizewidget.h
uic: File generated with too recent version of Qt Designer (4.0 vs. 3.3.7)
make: *** [resizewidget.h] Error 1
I have the libqt4-gui installes so if you could help me out.

Anonymous said...

Im still getting Errors with the OS X Version (downloaded 2007-11-01):

~/Desktop/SeamCarvingGui.app/Contents/MacOS/SeamCarvingGui
dyld: Library not loaded: QtGui.framework/Versions/4/QtGui
Referenced from: /Users/tobu/Desktop/SeamCarvingGui.app/Contents/MacOS/SeamCarvingGui
Reason: image not found
Trace/BPT trap

It says "Updated" so I assume you already tried to fix the QT bundeling problem, did you?

regards Tobias

Gabe said...

Re: OS X. I believe I have fixed the OS X distribution and bundled in the Qt4 framework. Let me know if there are any further issues.

Re: ubuntu user. From your error message, it appears you have Qt3 qmake and uic in your path. Make sure your path first points to the qt4 utilities. So qmake -version should show you a 4.x number.

@stoinov: I noticed there is a new CAIR on sf, I'll be updating to that soon.

Anonymous said...

Hi Gabe,
thanks, that was quick! Unfortunately I'm now getting a HTTP 404 when trying to download...
regards
Tobias

Anonymous said...

Same here, the Mac version leads to a 404. Hey, you realize the Tao of Mac linked to you? Kudos!

Gabe said...

I'm having a hard time uploading the Mac version. Probably because it's 10Mb. If I can't get it up today, I'll have to open a Google Code project to host the files. In the mean time I'll host the file on a temp server.

DR said...

Has anyone gotten the Mac OS X app to work under Leopard? Under 10.5 I can't seem to import any images (tried a few different common image formats). Thanks for setting this up Gabe!! Look forward to checking it out.

iPivo said...

I am running SeamCarving under tiger and it seems that it only supports .bmp and .png files.

Gabe said...

@ipivo Yes, It seams I was not bundling the QT image plugins with the Mac distribution, the new build should have it.