gaberudy / seam-carving-gui Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/seam-carving-gui
Automatically exported from code.google.com/p/seam-carving-gui
The Seam Carving GUI is a GUI front end to CAIR[1], which is an implementation of Arial Shamir's seam carving algorithm. == A Little History == I ran into a comment by Andy Owen re the Slashdot article about Content-Aware Image Resizing[2] and decided his late night hack was cool enough to deserve an easy to use interface. Besides, after a few days of seeing the impressive demonstration video[3] about the SIGGRAPH paper on seam carving[4] I found myself wishing I could be doing seam carving on some images of my own. Thus version 1.0 through 1.3 of the Seam Carving GUI came to be. Andy has moved onto other things and I got an email from Brain_Recall (Joe) about his work on writing a more true-to-the-paper form of the algorithm. His stuff looked really quite impressive so I egged him on. Once his code was functionally complete I change the Seam Carving GUI to use CAIR for the backend. Not only does his code work much better for stretching images (and in general), but it's also multi-threaded and has a couple cool new features. So with the new backend, the Seam Carving GUI reached version 1.4. Since then I have been keeping up with improvements done in CAIR by Joe and adding features and documentation as requested from users came in. == Version History == 1.11 * Update to latest CAIR 2.19 (Brain_ReCall) * Twice as fast (Brain_ReCall) * Removed add weight parameter (Brain_ReCall) * Update build to Qt 4.5 with MSVC (Gabe) 1.10 * Update to latest CAIR 2.17 with speed improvements (Brain_ReCall) * Update progress bars to use new CAIR callbacks. (Gabe) 1.9 * Update to latest CAIR 2.15.1 (Brain_ReCall) * Added forward energy parameter (Brain_ReCall) * Progress bar for HD Quality (Brain_ReCall) * Retain/Remove/Clear Brush now scaled to zoom level (Brain_ReCall) * Upgraded to Qt 4.4.1 (Gabe) * Save/Load Mask as PNG (Gabe) * The Mask is saved/restored in undo/redo operations (Gabe) * Shortcuts changed to be platform specific (Gabe) 1.8 * Update to latest CAIR 2.13 * Performance improvements * CAIR license change to LGPL v2.1 * seam-carving-gui license change to GPL v2.0 1.7 * Update to latest CAIR * New choice of edge filter * Reorganized GUI a bit around “Remove” function * Added a few more tool tips 1.6: * Update to latest CAIR * Removed marked button (will shrink to remove marked, then expand to original size) * HD Mode * More parameters to teak hoe CAIR works * CAIR performance improvements 1.5: * Upgraded to CAIR 2.6.1 * Can view images horizontal energy function as well as vertical * Created a cursor when hovering over the image to represent the mark area size * Retain/Remove marks are also shrunk with the image (will not disappear) * You can select to erase areas marked for retain/remove == Technical Details == The GUI is written in Qt 4, and should be capable of being built on Mac, Linux and Windows. CAIR is written in C++ and is mostly unmodified from it's source besides some hooks for progress and canceling. It depends on pthreads which are native on Mac/Linux but have a port for building on Win32 (dll included for easy building). All platforms with the proper build environment (libqt4-dev in Ubuntu, otherwise get Qt4 from Trolltech) should be able to build the application. Under Linux run `qmake seam-carving-gui.pro` and then `make`. The Windows binary I provide is built with mingw and the mingw redistributable dll is included. == Platform Specific Instructions == Under Mac OS X with Qt Open Source Edition installed (from the pre-built dmg image), you can build the application from the command line as follows: $ qmake -spec macx-g++ seam-carving-gui.pro $ make $ open SeamCarvingGui.app To package Qt into the application to make it relocatable to another computer, you can run $ bash packageMac.sh Under Windows with MinGW, set your QMAKESPEC environment variable to win32-g++ and your QTDIR properly (usually handled by the installer). Then run the following commands: >qmake seam-carving-gui.pro >mingw32-make The executable will be placed in the "release" directory. Copy mingwm10.dll and pthreadVSE2.dll into the same directory to be self contained. Note: Under linux, your qmake make be named qmake-qt4 == A Little Wrap Up == Enjoy! If you have questions, complaints, or have a cool project you used this on, feel free to try and reach me at [email protected], and if I haven’t completely abandoned this project I may get back to you! For more information and updates goto: http://gabeiscoding.com or the Google Code project at: http://code.google.com/p/seam-carving-gui == A Little Reference Section == [1] http://brain.recall.googlepages.com/cair [2] http://science.slashdot.org/article.pl?sid=07/08/25/1835256 [3] http://www.youtube.com/watch?v=vIFCV2spKtg [4] http://www.faculty.idc.ac.il/arik
Opening CMYK document converts it to RGB without notification.
If the program can't work with CMYK data it should inform the user that the
opened image will be converted to RGB.
Original issue reported on code.google.com by [email protected]
on 13 Jul 2010 at 6:40
What steps will reproduce the problem?
1. input a image, and get the result.
2. input the same image, and get the result.
3. do it(2) many times, and compare the results.
What is the expected output? What do you see instead?
The results should be same, but they are not.
What version of the product are you using? On what operating system?
Src Seam Carving GUI 1.11, CAIR 2.19, Ubuntu LTS 12.04.
Please provide any additional information below.
I solved the problem, and I provide the diff file.
In CAIR, there are 4(you can set a different number) threads. They work together to do the same work. The main thread do 'sem_post' 4 times, and each worker thread do 'sem_wait' to get a semaphore to work. There is posibility that one worker may finish the work extreme fast and do 'sem_wait' again before other worker has a turn to run on cpu. For example, worker 0 calc energy on image block 0, worker 3 calc energy on image block 3, worker 2 calc energy on image block 2, worker 3 calc energy on image block 3. In this example worker 1 didn't work, and worker 3 worked twice.
I'm sorry for my poor English. I hope you can understand what I said. That's all.
Original issue reported on code.google.com by [email protected]
on 16 Jan 2014 at 7:26
Attachments:
What steps will reproduce the problem?
1. open panorama-like imgages with more than 10000 pixel width
What do you see instead?
Huge memory leak, program is eating up to 600 mb of RAM
What version of the product are you using? On what operating system?
1.10
Original issue reported on code.google.com by [email protected]
on 17 Nov 2008 at 3:10
It would be nice if the program would show open file name on the program title
bar. Like photoshop etc. That way you will now forget what file you have opened.
Original issue reported on code.google.com by [email protected]
on 13 Jul 2010 at 6:39
Thanks for this great product. It's the fastest and most flexible
retargeting software I know. But there is still one option "missing", the
animated carving that I love from
http://www.crystalxp.net/galerie/en.id.9572-liquid-resize-retarget-for-windows-l
iquid-resize-software.htm.
BTW just in case some TV manufacturer reads this: wouldn't it be great to
develop a realtime recarving chip or firmware that constantly monitors the
aspect ratio of the broadcasts and adapts it to the actual screen size?
Yes, most recent TV's already do that and they do a horrible job by either
creating black bars or stretching everything out of proportion.
Original issue reported on code.google.com by [email protected]
on 18 Mar 2010 at 12:57
Putting a bit in the README about the proper command to compile it would be
helpful. I had to come to the website to see that.
Original issue reported on code.google.com by morehart
on 2 Jan 2008 at 3:44
What steps will reproduce the problem?
1. Open a large ( > 25,000 pixels in one direction) image
2. Image is displayed distorted in the preview window
3.
What is the expected output? What do you see instead?
The Image. Not Distorted lines.
What version of the product are you using? On what operating system?
1.9 OS X
Please provide any additional information below.
Original issue reported on code.google.com by u.petri
on 29 Jan 2009 at 5:42
Attachments:
There are several places in the original CAIR.cpp code where a void pointer
is cast to int, which throws an error during compilation:
~/projects/seam-carving-gui$ make
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DBACKEND_CAIR -DQT_NO_DEBUG
-DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++
-I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtCore
-I/usr/include/qt4/QtGui -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I.
-I. -o CAIR.o cair/CAIR.cpp
cair/CAIR.cpp: In function ‘void* Edge_Quadrant(void*)’:
cair/CAIR.cpp:429: error: cast from ‘void*’ to ‘int’ loses precision
cair/CAIR.cpp: In function ‘void* Energy_Left(void*)’:
cair/CAIR.cpp:623: error: cast from ‘void*’ to ‘int’ loses precision
cair/CAIR.cpp: In function ‘void* Energy_Right(void*)’:
cair/CAIR.cpp:738: error: cast from ‘void*’ to ‘int’ loses precision
cair/CAIR.cpp: In function ‘void* Add_Quadrant(void*)’:
cair/CAIR.cpp:949: error: cast from ‘void*’ to ‘int’ loses precision
cair/CAIR.cpp: In function ‘void* Remove_Quadrant(void*)’:
cair/CAIR.cpp:1264: error: cast from ‘void*’ to ‘int’ loses precision
make: *** [CAIR.o] Error 1
This was easily fixed by including the inttypes.h header and casting to
intptr_t which should be portable, as changing those 4 lines made it
compile smoothly. Thanks for the software!
Original issue reported on code.google.com by [email protected]
on 5 Dec 2008 at 6:13
The problem is not accure while you using the software, is from using it
frequence and expirment the result from it , that lead leak of memory and
that would show you the blue screen which writen on it dump physical
memory and it would be hard to fix the problem .
Original issue reported on code.google.com by [email protected]
on 3 Dec 2008 at 6:44
Attachments:
In case anyone else runs into the same problem..
When I tried to build the app on linux using these commands:
qmake seam-carving-gui.pro
make
I was getting this error:
uic: File generated with too recent version of Qt Designer (4.0 vs. 3.3.7)
Then I figured out that the command qmake was linked to qmake-qt3, since i
had both versions installed, and i had to run "qmake-qt4
seam-carving-gui.pro" instead.
Original issue reported on code.google.com by [email protected]
on 29 Oct 2008 at 10:58
What steps will reproduce the problem?
1. any process, post photo load-in
2.
3.
What is the expected output? What do you see instead?
expect resize. See Application Quite dialoge
What version of the product are you using? On what operating system?
Latest build on OSX 10.5.4
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 19 Nov 2008 at 6:12
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.