Wednesday, August 29, 2007

Content Aware Image Resizing - A Seam Carving GUI

I built a simple Seam Carving GUI as a GUI front end to the implementation of the Seam Carving algorithm by Andy Owen[1].

I ran into Andy's comment to the Slashdot article about Content-Aware Image Resizing[2] and decided his late night hack was worth looking into. And hey, it worked! After a few days of seeing the impressive demonstration video about the SIGGRAPH paper on seam carving I found myself going back to Andy's implementation to manually grind some images through his C code and began thinking, lets get some GUI going on here!

So there you have it, two nights of feverish coding later (one with a slightly hindering amount of wine consumed during a MythBusters viewing session) and I have something to ship.

Enjoy, if you have any questions or suffer from the undeniable urge to lavishly complement this quick hack of a GUI, or more likely would like bellow your complaints about something your getting for free, you can reach me at gaberudy+seamcarving at gmail.com

TODO:
  • Copy and Paste
  • Drag and Drop
  • Do any sort or optimization of Andy's image stuff
  • Do the bit where you mark parts of the image to preserve or make go away
  • Read the paper and make it really work!

DOWNLOAD:
  • Build instructions and screenshots: here

[1] Andy is the nicest (and only) Australian I've ever met on the internet, I got his permission to do a GUI around his resizing code and he was very supportive, even adding in a feature or two for the cause.

[2] His was actually one of two comments that had links to quickly written code, but it was plain to see that Andy's was the proper implementation to follow up on as it received a (+5 Interesting) vs. the(+4 Interesting). Tsk tsk, not to mention the other link was cold dead.

Update: The latest version is no longer based on Andy's implementation but CAIR. See the seam-carving-gui project page for more.

18 comments:

Olivier said...

Thank you for this nice implementation! Here's an example using it:

http://www.olussier.com/photos/pagoda.jpg

The left part is the original picture, the center part is the seam carved version and the right part is a normal resize.

Gabe said...

Thanks Olivier,
I'm glad you liked it!

Smite said...

Awesome, if terribly slow on large images.

Can we expect any of the following?
1) jpg support
2) multi-threaded resizing (for multi-core systems)
3) The whole importance-painting thing shown at the end of the SIGGRAPH video

Even without those, great job! This should be very cool to play with.

Anonymous said...

I'm trying to compile it on OS X (with QT4 installed), but there doesn't appear to be a makefile in the directory, even after running qmake?

Anonymous said...

OK, it actually generated an xcode project file instead, but building it fails with 22 errors.

Gabe said...

smite: Jpg support is trivial, as it just requires I package the Qt JPEG codec plugin with the application, a simple oversight in my first hurried ship of the project.

It is indeed slow and there are lots of speed optimizations I can think of before warranting the complexity of multi-threading, this is on my list of things to do right after your third item. Apparently somebody did a Java version that includes painting the picture red and green to indicate save and delete regions, so naturally I have to try to one up that with proper masks for these regions.

anonymous: Mac OS X support should be just a matter of getting the right build settings, the C code is gnu99 C and it may take some build setting adjustments get that to compile. I'll look at it later on our Mac at work sometime, maybe even put up a Mac universal binary if all goes well.

fotocomics said...

I'm very happy for the gui, thank to do it and so quickly

I reported the news here quoting your blog
http://www.gimptalk.com/forum/topic/Any-Hope-For-A-Plugin-Doing-This-24209-last.html#186522

But ... any hope to have it as Gimp plugin? will be such a handy tool integrated with gimp workflow

fotocomics said...

OOPSS sorry the link was cutted and something wrong with tags

ii try again as plain text
http://www.gimptalk.com/forum/topic/
Any-Hope-For-A-Plugin-Doing-This-
24209-last.html#186522

Nathan deGargoyle said...

Thanks for the coding Gabe (and thanks fc for bringing it to my attention) but please sort out the jpg loading. It's a bind having to convert my pics to png to make this work.

Anonymous said...

This is really nice, it is a bit slow but the results are just nice. I know that people are suggesting some kind of gimp plugin.There is already a gimp plugin the liquid gimp plugin, but Gabe you might want to thing about making a Krita pluging since you use qt already.

Deliaresizer said...

Thanks for the implementation. I’ve got only one remark too make it worked a little bit slow when I’ve tried it on large images…but anyway that’s okay because I’ll stick with reshade for large images. I’m highly satisfied with their quality and accuracy.

Anonymous said...

How does this perform compared to Liquid Resize 0.67 (the last public release before Adobe bought it)?

Valencia said...

Good for people to know.

Gabe said...

I haven't used LiquidResize, maybe somebody can compare performance and post response. We use multiple threads to do computation, which should improve performance significantly on multi-core boxes.

Mark said...

The video showed resizing the photos by dragging the window handles - any chance that can be put in instead of having to type in a window size?

Also: the geek in me :) would like to see the lightning like lines zapping across the picture as it deletes the pixels. Is it possible to see that with an option?

Anonymous said...

I found this site using [url=http://google.com]google.com[/url] And i want to thank you for your work. You have done really very good site. Great work, great site! Thank you!

Sorry for offtopic

Anonymous said...
This post has been removed by a blog administrator.
Anonymous said...

[b][url=http://pohudey.in]ХУДЕЙ БЕЗ ПРОБЛЕМ!![/url][/b]
[url=http://pohudey.in][img]http://harizzzma.com/dieta1.jpg[/img][/url]







какой продукт исключить чтобы похудеть
хочу похудеть на 5 кг
как правильно похудеть сочинение
как похудеть в период лактации
книга диета доктора борменталя
кефирно фруктовая диета
таблетки для похудения идеал отзывы
правильное питание котят
эффективные диеты форум
как похудеть в бедрах
диета федоровой
похудение с помощью яблочного уксуса
как быстро похудеть дома
диета виктории карасевой
низкоуглеводная диета рецепты
похудеть нанотехнологии
джессика альба диета
энергетическая диета
гастрит у детей диета
диета протасова меню
диетические блюда из тыквы рецепты
похудение с помощью магии
фото похудевшие на кремлевской диете
кальциевая диета
розацеа диета
как избавиться от целлюлита медом
калорийность продуктов питания
луковая диета отзывы
скачать бесплатно аллен карр похудеть
я похудела на 15 кг
раздельное питание для похудения
костюм для похудения
дробная диета
препарат для похудения линдакса
вес тела и диета
простые и эффективные диеты
лариса долина кефирная диета
иголка в ухо для похудения
диета для спортсменов
как похудеть без запретов
клуб желающих похудеть похудеть
стенгазета здоровое питание
инсайт похудение
препарат xls для похудения описание
скачать комплекс упражнений для похудения
клизма для похудения
низкоуглеводная диета
клиника борменталь отзывы
польза диеты
раздельное питание меню на день
диета кормящая мать
диеты гречневая
сахарин во время гречневой диеты
кефирная диета полипы
супер эффективные диеты
диета на дом
как правильно выходить из диеты
рисовая диета 5 объемов
девятидневная диета отзывы
препараты для похудения меридиа
особенности гречневой диеты
как резко похудеть
диета при гипотериозе
диета кефир и огурцы
как похудела бочкарева
морские водоросли для похудения
аудио похудеть
аллан карр легкий способ сбросить вес
диетическая еда рецепты
диета при эпилепсии
сенна для похудения
легкие способы похудеть
жизнь после похудения мириманова
хронический пиелонефрит диета
обвертывания для похудения
чайная диета
похудевшие знаменитости
медицина похудение

[url=http://lengbadlipank.freehostia.com]как похудеть[/url]